2
* The contents of this file are subject to the Mozilla Public
3
* License Version 1.1 (the "License"); you may not use this file
4
* except in compliance with the License. You may obtain a copy of
5
* the License at http://www.mozilla.org/MPL/
7
* Software distributed under the License is distributed on an "AS
8
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
9
* implied. See the License for the specific language governing
10
* rights and limitations under the License.
12
* The Original Code is MPEG4IP.
14
* The Initial Developer of the Original Code is Cisco Systems Inc.
15
* Portions created by Cisco Systems Inc. are
16
* Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved.
19
* Dave Mackie dmackie@cisco.com
22
#include "mp4common.h"
24
MP4TfhdAtom::MP4TfhdAtom()
27
AddVersionAndFlags(); /* 0, 1 */
29
new MP4Integer32Property("trackId"));
32
void MP4TfhdAtom::AddProperties(u_int32_t flags)
35
// note this property is signed 64!
37
new MP4Integer64Property("baseDataOffset"));
41
new MP4Integer32Property("sampleDescriptionIndex"));
45
new MP4Integer32Property("defaultSampleDuration"));
49
new MP4Integer32Property("defaultSampleSize"));
53
new MP4Integer32Property("defaultSampleFlags"));
57
void MP4TfhdAtom::Read()
59
/* read atom version, flags, and trackId */
62
/* need to create the properties based on the atom flags */
63
AddProperties(GetFlags());
65
/* now we can read the remaining properties */
68
Skip(); // to end of atom