This repository has been archived by the owner on Jul 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
/
MatroskaCodecIDs.h
68 lines (55 loc) · 2.17 KB
/
MatroskaCodecIDs.h
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
/*
* MatroskaCodecIDs.h
*
* MatroskaCodecIDs.h - Codec and language IDs for conversion between Matroska and QuickTime
*
*
* Copyright (c) 2006 David Conrad
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef __MATROSKACODECIDS_H__
#define __MATROSKACODECIDS_H__
#include <QuickTime/QuickTime.h>
#include <AudioToolbox/AudioToolbox.h>
#ifdef __cplusplus
#include <matroska/KaxTracks.h>
#include <matroska/KaxTrackEntryData.h>
#include "CodecIDs.h"
using namespace libmatroska;
// these CodecIDs need special handling since they correspond to many fourccs
#define MKV_V_MS "V_MS/VFW/FOURCC"
#define MKV_A_MS "A_MS/ACM"
#define MKV_V_QT "V_QUICKTIME"
// these codecs have their profile as a part of the CodecID
#define MKV_A_PCM_BIG "A_PCM/INT/BIG"
#define MKV_A_PCM_LIT "A_PCM/INT/LIT"
#define MKV_A_PCM_FLOAT "A_PCM/FLOAT/IEEE"
typedef CF_ENUM(int, DescExtDirection) {
kToKaxTrackEntry,
kToSampleDescription
};
extern ComponentResult MkvFinishSampleDescription(KaxTrackEntry *tr_entry, SampleDescriptionHandle desc, DescExtDirection dir);
extern ComponentResult MkvFinishAudioDescription(KaxTrackEntry *tr_entry, Handle *cookie, AudioStreamBasicDescription *asbd, AudioChannelLayout *acl);
extern FourCharCode MkvGetFourCC(KaxTrackEntry *tr_entry);
extern "C"{
#endif
extern AudioChannelLayout GetDefaultChannelLayout(AudioStreamBasicDescription *asbd);
extern uint8_t *CreateEsdsFromSetupData(uint8_t *codecPrivate, size_t vosLen, size_t *esdsLen, int trackID, bool audio, bool write_version);
#ifdef __cplusplus
}
#endif
#endif