e0982881175061474ed60223ae9e4a8469b40f4f
[vuplus_xbmc] / xbmc / cores / paplayer / DVDPlayerCodec.h
1 #ifndef DVDPLAYER_CODEC_H_
2 #define DVDPLAYER_CODEC_H_
3
4 /*
5  *      Copyright (C) 2005-2013 Team XBMC
6  *      http://xbmc.org
7  *
8  *  This Program is free software; you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation; either version 2, or (at your option)
11  *  any later version.
12  *
13  *  This Program is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  *  GNU General Public License for more details.
17  *
18  *  You should have received a copy of the GNU General Public License
19  *  along with XBMC; see the file COPYING.  If not, see
20  *  <http://www.gnu.org/licenses/>.
21  *
22  */
23
24 #include "ICodec.h"
25
26 #include "cores/dvdplayer/DVDDemuxers/DVDDemux.h"
27 #include "cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodec.h"
28 #include "cores/dvdplayer/DVDInputStreams/DVDInputStream.h"
29
30 class DVDPlayerCodec : public ICodec
31 {
32 public:
33   DVDPlayerCodec();
34   virtual ~DVDPlayerCodec();
35
36   virtual bool Init(const CStdString &strFile, unsigned int filecache);
37   virtual void DeInit();
38   virtual int64_t Seek(int64_t iSeekTime);
39   virtual int ReadPCM(BYTE *pBuffer, int size, int *actualsize);
40   virtual bool CanInit();
41   virtual bool CanSeek();
42   virtual CAEChannelInfo GetChannelInfo() {return m_ChannelInfo;}
43
44   void SetContentType(const CStdString &strContent);
45
46 private:
47   CDVDDemux* m_pDemuxer;
48   CDVDInputStream* m_pInputStream;
49   CDVDAudioCodec* m_pAudioCodec;
50
51   CStdString m_strContentType;
52
53   std::string m_strFileName;
54
55   int m_nAudioStream;
56
57   int m_audioPos;
58   DemuxPacket* m_pPacket ;
59
60   BYTE *m_decoded;
61   int  m_nDecodedLen;
62
63   CAEChannelInfo m_ChannelInfo;
64
65   bool m_bInited;
66 };
67
68 #endif