3 * Copyright (C) 2005-2013 Team XBMC
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with XBMC; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
22 #include "DVDVideoCodec.h"
23 #include "cores/dvdplayer/DVDStreamInfo.h"
24 #include "cores/VideoRenderers/RenderFeatures.h"
25 #include "guilib/Geometry.h"
26 #include "rendering/RenderSystem.h"
27 #include "threads/Thread.h"
29 typedef struct am_private_t am_private_t;
33 class CAMLCodec : public CThread
39 bool OpenDecoder(CDVDStreamInfo &hints);
43 int Decode(uint8_t *pData, size_t size, double dts, double pts);
45 bool GetPicture(DVDVideoPicture* pDvdVideoPicture);
46 void SetSpeed(int speed);
51 virtual void Process();
54 double GetPlayerPtsSeconds();
55 void SetVideoPtsSeconds(double pts);
56 void ShowMainVideo(const bool show);
57 void SetVideoZoom(const float zoom);
58 void SetVideoContrast(const int contrast);
59 void SetVideoBrightness(const int brightness);
60 void SetVideoSaturation(const int saturation);
61 void GetRenderFeatures(Features &renderFeatures);
62 void SetVideo3dMode(const int mode3d);
63 std::string GetStereoMode();
64 static void RenderFeaturesCallBack(const void *ctx, Features &renderFeatures);
65 void SetVideoRect(const CRect &SrcRect, const CRect &DestRect);
66 static void RenderUpdateCallBack(const void *ctx, const CRect &SrcRect, const CRect &DestRect);
70 am_private_t *am_private;
71 CDVDStreamInfo m_hints;
73 volatile int64_t m_1st_pts;
74 volatile int64_t m_cur_pts;
75 volatile int64_t m_cur_pictcnt;
76 volatile int64_t m_old_pictcnt;
77 volatile double m_timesize;
78 volatile int64_t m_vbufsize;
85 RENDER_STEREO_MODE m_stereo_mode;
86 RENDER_STEREO_VIEW m_stereo_view;