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 "threads/Thread.h"
28 typedef struct am_private_t am_private_t;
32 class CAMLCodec : public CThread
38 bool OpenDecoder(CDVDStreamInfo &hints);
42 int Decode(uint8_t *pData, size_t size, double dts, double pts);
44 bool GetPicture(DVDVideoPicture* pDvdVideoPicture);
45 void SetSpeed(int speed);
50 virtual void Process();
53 double GetPlayerPtsSeconds();
54 void SetVideoPtsSeconds(double pts);
55 void ShowMainVideo(const bool show);
56 void SetVideoZoom(const float zoom);
57 void SetVideoContrast(const int contrast);
58 void SetVideoBrightness(const int brightness);
59 void SetVideoSaturation(const int saturation);
60 void GetRenderFeatures(Features &renderFeatures);
61 static void RenderFeaturesCallBack(const void *ctx, Features &renderFeatures);
62 void SetVideoRect(const CRect &SrcRect, const CRect &DestRect);
63 static void RenderUpdateCallBack(const void *ctx, const CRect &SrcRect, const CRect &DestRect);
67 am_private_t *am_private;
68 CDVDStreamInfo m_hints;
70 volatile int64_t m_1st_pts;
71 volatile int64_t m_cur_pts;
72 volatile int64_t m_cur_pictcnt;
73 volatile int64_t m_old_pictcnt;
74 volatile double m_timesize;
75 volatile int64_t m_vbufsize;