123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- #include "mp4common.h"
- MP4TfhdAtom::MP4TfhdAtom()
- : MP4Atom("tfhd")
- {
- AddVersionAndFlags();
- AddProperty(
- new MP4Integer32Property("trackId"));
- }
- void MP4TfhdAtom::AddProperties(u_int32_t flags)
- {
- if (flags & 0x01) {
-
- AddProperty(
- new MP4Integer64Property("baseDataOffset"));
- }
- if (flags & 0x02) {
- AddProperty(
- new MP4Integer32Property("sampleDescriptionIndex"));
- }
- if (flags & 0x08) {
- AddProperty(
- new MP4Integer32Property("defaultSampleDuration"));
- }
- if (flags & 0x10) {
- AddProperty(
- new MP4Integer32Property("defaultSampleSize"));
- }
- if (flags & 0x20) {
- AddProperty(
- new MP4Integer32Property("defaultSampleFlags"));
- }
- }
- void MP4TfhdAtom::Read()
- {
-
- ReadProperties(0, 3);
-
- AddProperties(GetFlags());
-
- ReadProperties(3);
- Skip();
- }
|