[cosmetics] update date in GPL header
[vuplus_xbmc] / xbmc / cores / dvdplayer / DVDCodecs / Video / DVDVideoCodecLibMpeg2.h
1 #pragma once
2
3 /*
4  *      Copyright (C) 2005-2013 Team XBMC
5  *      http://www.xbmc.org
6  *
7  *  This Program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License as published by
9  *  the Free Software Foundation; either version 2, or (at your option)
10  *  any later version.
11  *
12  *  This Program is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  *  GNU General Public License for more details.
16  *
17  *  You should have received a copy of the GNU General Public License
18  *  along with XBMC; see the file COPYING.  If not, see
19  *  <http://www.gnu.org/licenses/>.
20  *
21  */
22
23 #include "DVDVideoCodec.h"
24 #include "DllLibMpeg2.h"
25
26 class CDVDVideoCodecLibMpeg2 : public CDVDVideoCodec
27 {
28 public:
29   CDVDVideoCodecLibMpeg2();
30   virtual ~CDVDVideoCodecLibMpeg2();
31   virtual bool Open(CDVDStreamInfo &hints, CDVDCodecOptions &options);
32   virtual void Dispose();
33   virtual int Decode(BYTE* pData, int iSize, double dts, double pts);
34   virtual void Reset();
35   virtual bool GetPicture(DVDVideoPicture* pDvdVideoPicture);
36   virtual bool GetUserData(DVDVideoUserData* pDvdVideoUserData);
37
38   virtual void SetDropState(bool bDrop);
39   virtual const char* GetName() { return "libmpeg2"; }
40
41 protected:
42   DVDVideoPicture* GetBuffer(unsigned int width, unsigned int height);
43   inline void ReleaseBuffer(DVDVideoPicture* pPic);
44   inline void DeleteBuffer(DVDVideoPicture* pPic);
45
46   int GuessAspect(const mpeg2_sequence_t *sequence, unsigned int *pixel_width, unsigned int *pixel_height);
47
48   mpeg2dec_t* m_pHandle;
49   const mpeg2_info_t* m_pInfo;
50   DllLibMpeg2 m_dll;
51
52   unsigned int m_irffpattern;
53   bool m_bFilm; //Signals that we have film material
54   bool m_bIs422;
55
56   int m_hurry;
57   double m_dts;
58   double m_dts2;
59   //The buffer of pictures we need
60   DVDVideoPicture m_pVideoBuffer[3];
61   DVDVideoPicture* m_pCurrentBuffer;
62 };