Debian Codegraph @

src/demuxer/ES_AAC.h

raw
1 /*
2 * Copyright (C) 2013-2021 Jean-Luc Barrière
3 * Copyright (C) 2005-2014 Team Kodi (https://kodi.tv)
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSE.md for more information.
7 */
8
9 #ifndef ES_AAC_H
10 #define ES_AAC_H
11
12 #include "elementaryStream.h"
13 #include "bitstream.h"
14
15 namespace TSDemux
16 {
17 class ES_AAC : public ElementaryStream
18 {
19 private:
20 int m_SampleRate;
21 int m_Channels;
22 int m_BitRate;
23 int m_FrameSize;
24
25 int64_t m_PTS; /* pts of the current frame */
26 int64_t m_DTS; /* dts of the current frame */
27
28 bool m_Configured;
29 int m_AudioMuxVersion_A;
30 int m_FrameLengthType;
31
32 int FindHeaders(uint8_t *buf, int buf_size);
33 bool ParseLATMAudioMuxElement(CBitstream *bs);
34 void ReadStreamMuxConfig(CBitstream *bs);
35 void ReadAudioSpecificConfig(CBitstream *bs);
36 uint32_t LATMGetValue(CBitstream *bs) { return bs->readBits(bs->readBits(2) * 8); }
37
38 public:
39 ES_AAC(uint16_t pes_pid);
40 virtual ~ES_AAC();
41
42 virtual void Parse(STREAM_PKT* pkt);
43 virtual void Reset();
44 };
45 }
46
47 #endif /* ES_AAC_H */