1 /*
2  *      Copyright (C) 2005-2013 Team XBMC
3  *      http://www.xbmc.org
4  *
5  *  This Program is free software; you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation; either version 2, or (at your option)
8  *  any later version.
9  *
10  *  This Program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with XBMC; see the file COPYING.  If not, see
17  *  <http://www.gnu.org/licenses/>.
18  *
19  */
20 
21 #ifndef ES_AC3_H
22 #define ES_AC3_H
23 
24 #include "elementaryStream.h"
25 
26 namespace TSDemux
27 {
28   class ES_AC3 : public ElementaryStream
29   {
30   private:
31     int         m_SampleRate;
32     int         m_Channels;
33     int         m_BitRate;
34     int         m_FrameSize;
35 
36     int64_t     m_PTS;                /* pts of the current frame */
37     int64_t     m_DTS;                /* dts of the current frame */
38 
39     int FindHeaders(uint8_t *buf, int buf_size);
40 
41   public:
42     ES_AC3(uint16_t pid);
43     virtual ~ES_AC3();
44 
45     virtual void Parse(STREAM_PKT* pkt);
46     virtual void Reset();
47   };
48 }
49 
50 #endif /* ES_AC3_H */
51