123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- #include "mp4common.h"
- MP4UrlAtom::MP4UrlAtom(const char *type)
- : MP4Atom(type)
- {
- AddVersionAndFlags();
- AddProperty(new MP4StringProperty("location"));
- }
- void MP4UrlAtom::Read()
- {
-
- ReadProperties(0, 2);
-
- if (!(GetFlags() & 1)) {
-
- ReadProperties(2);
- }
- Skip();
- }
- void MP4UrlAtom::Write()
- {
- MP4StringProperty* pLocationProp =
- (MP4StringProperty*)m_pProperties[2];
-
-
-
- if (pLocationProp->GetValue() == NULL) {
- SetFlags(GetFlags() | 1);
- pLocationProp->SetImplicit(true);
- } else {
- SetFlags(GetFlags() & 0xFFFFFE);
- pLocationProp->SetImplicit(false);
- }
-
- MP4Atom::Write();
- }
|