-
Notifications
You must be signed in to change notification settings - Fork 258
Expand file tree
/
Copy pathCodecParser.h
More file actions
68 lines (58 loc) · 1.47 KB
/
CodecParser.h
File metadata and controls
68 lines (58 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
* Copyright (C) 2023 Team Kodi
* This file is part of Kodi - https://kodi.tv
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSES/README.md for more information.
*/
#include <bento4/Ap4Ac3Parser.h>
#include <bento4/Ap4Ac4Parser.h>
#include <bento4/Ap4AdtsParser.h>
#include <bento4/Ap4Eac3Parser.h>
#include <kodi/addon-instance/Inputstream.h>
namespace adaptive
{
constexpr AP4_UI32 AP4_ADTS_HEADER_SIZE = 7;
constexpr AP4_UI32 AP4_ADTS_SYNC_MASK = 0xFFF6;
constexpr AP4_UI32 AP4_ADTS_SYNC_PATTERN = 0xFFF0;
constexpr AP4_UI32 AP4_AC3_SYNC_PATTERN = 0x0B77;
constexpr AP4_UI32 AP4_AC4_SYNC_MASK = 0xFFF0;
constexpr AP4_UI32 AP4_AC4_SYNC_PATTERN = 0x0AC40;
enum class AdtsType
{
NONE,
AAC,
AC3,
EAC3,
AC4
};
class ATTR_DLL_LOCAL CAdaptiveAdtsParser : public AP4_AdtsParser
{
public:
CAdaptiveAdtsParser() {}
AP4_Result FindFrameHeader(AP4_AacFrame& frame);
};
class ATTR_DLL_LOCAL CAdaptiveAc3Parser : public AP4_Ac3Parser
{
public:
CAdaptiveAc3Parser() {}
AP4_Result FindFrameHeader(AP4_Ac3Frame& frame);
};
class ATTR_DLL_LOCAL CAdaptiveAc4Parser : public AP4_Ac4Parser
{
public:
CAdaptiveAc4Parser() {}
AP4_Result FindFrameHeader(AP4_Ac4Frame& frame);
};
class ATTR_DLL_LOCAL CAdaptiveEac3Parser : public AP4_Eac3Parser
{
public:
CAdaptiveEac3Parser() {}
AP4_Result FindFrameHeader(AP4_Eac3Frame& frame);
};
class ATTR_DLL_LOCAL CAdaptiveAdtsHeaderParser
{
public:
static AdtsType GetAdtsType(AP4_ByteStream* stream);
};
} // namespace adaptive