DtvKit_ATSC3.0
Loading...
Searching...
No Matches
atsc_core_streamer_isobmff_maker.h
Go to the documentation of this file.
1/*******************************************************************************
2 * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3 *
4 * This file is part of a DTVKit Software Component
5 * You are permitted to copy, modify or distribute this file subject to the terms
6 * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
7 *
8 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
9 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
10 * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
11 *
12 * If you or your organisation is not a member of DTVKit then you have access
13 * to this source code outside of the terms of the licence agreement
14 * and you are expected to delete this and any associated files immediately.
15 * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
16 *******************************************************************************/
17
18#include <iostream>
19
21#include "atsc_core_utils_bitcalc.h"
22
28
29public:
30
38 {
39
40 }
41
48 int32_t Make(uint8_t* pdata, Isobmff::sMp4_t mp4);
49
56 int32_t MakeInit(uint8_t* pdata, Isobmff::sMp4_t mp4);
57
64 int32_t MakeMoof(uint8_t* pdata, Isobmff::sMp4_t mp4);
65
72 void set_default_sample_duration(int32_t iValue)
73 {
74 mDefaultSampleDuration = iValue;
75 }
76
77private:
78
85 int32_t MakeStyp(uint8_t* pdata, Isobmff::sFtypH_t ftyp);
86
93 int32_t MakeTfdt(uint8_t* pdata, Isobmff::sTfdtH_t tfdt);
94
101 int32_t MakeMfhd(uint8_t *pdata, Isobmff::sMfhdH_t mfhd);
102
109 int32_t MakeFtyp(uint8_t* pdata, Isobmff::sFtypH_t ftyp);
110
117 int32_t MakeMoov(uint8_t* pdata, Isobmff::sMoovH_t moov);
118
125 int32_t MakeTrak(uint8_t* pdata, Isobmff::sTrakH_t trak);
126
133 int32_t MakeMvex(uint8_t* pdata, Isobmff::sMvexH_t mvex);
134
141 int32_t MakeTkhd(uint8_t* pdata, Isobmff::sTkhdH_t tkhd);
142
149 int32_t MakeMvex(uint8_t* pdata, Isobmff::sMvexH_t mvex, Isobmff::sMvhdH_t mvhd);
150
157 int32_t MakeTfhd(uint8_t* pdata, Isobmff::sTfhdH_t tfhd);
158
165 int32_t MakeMvhd(uint8_t* pdata, Isobmff::sMvhdH_t mvhd);
166
173 int32_t MakeMehd(uint8_t* pdata, Isobmff::sMehdH_t mehd);
174
181 int32_t MakeTrex(uint8_t* pdata, Isobmff::sTrexH_t trex);
182
189 int32_t MakeMoof(uint8_t* pdata, Isobmff::sMoofH_t moof);
190
197 int32_t MakeTraf(uint8_t* pdata, Isobmff::sTrafH_t traf);
198
205 int32_t MakeTrun(uint8_t* pdata, Isobmff::sTrunH_t trun);
206
213 int32_t SetTrunDataOffset(uint8_t* pdata, uint32_t iDataLen, uint32_t iDataOffset);
214
215 int32_t mDefaultSampleDuration;
224 static int32_t get_boxsize(uint8_t* pdata, const char* box)
225 {
226 uint32_t iBoxSize = (uint32_t)(pdata[0] << 24);
227 iBoxSize += (uint32_t)(pdata[1] << 16);
228 iBoxSize += (uint32_t)(pdata[2] << 8);
229 iBoxSize += (uint32_t)(pdata[3]);
230
231 if (memcmp(pdata + 4, box, 4) == 0)
232 {
233 return (int32_t)iBoxSize;
234 }
235
236 return 0;
237
238 }
239
240};
Definition atsc_core_streamer_isobmff_maker.h:27
int32_t Make(uint8_t *pdata, Isobmff::sMp4_t mp4)
Generates the 'sMp4_t' header.
CIsoBmffMaker()
NA.
Definition atsc_core_streamer_isobmff_maker.h:37
int32_t MakeInit(uint8_t *pdata, Isobmff::sMp4_t mp4)
Generates the 'int' box.
void set_default_sample_duration(int32_t iValue)
Set the Sample Duration.
Definition atsc_core_streamer_isobmff_maker.h:72
Definition atsc_core_streamer_isobmff.h:578
Definition atsc_core_streamer_isobmff.h:610
Definition atsc_core_streamer_isobmff.h:371
Definition atsc_core_streamer_isobmff.h:497
Definition atsc_core_streamer_isobmff.h:508
Definition atsc_core_streamer_isobmff.h:600
Definition atsc_core_streamer_isobmff.h:589
Definition atsc_core_streamer_isobmff.h:220
Definition atsc_core_streamer_isobmff.h:461
Definition atsc_core_streamer_isobmff.h:438
Definition atsc_core_streamer_isobmff.h:382
Definition atsc_core_streamer_isobmff.h:472
Definition atsc_core_streamer_isobmff.h:405
Definition atsc_core_streamer_isobmff.h:546
Definition atsc_core_streamer_isobmff.h:415