atom_gmin.cpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  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/
  6. *
  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.
  11. *
  12. * The Original Code is MPEG4IP.
  13. *
  14. * Contributer has declined to give copyright information, and gives
  15. * it freely to the world.
  16. *
  17. * Contributor(s):
  18. */
  19. #include "mp4common.h"
  20. MP4GminAtom::MP4GminAtom()
  21. : MP4Atom("gmin")
  22. {
  23. AddVersionAndFlags(); /* 0, 1 */
  24. AddProperty(new MP4Integer16Property("graphicsMode")); /* 2 */
  25. AddProperty(new MP4Integer16Property("opColorRed")); /* 3 */
  26. AddProperty(new MP4Integer16Property("opColorGreen")); /* 4 */
  27. AddProperty(new MP4Integer16Property("opColorBlue")); /* 5 */
  28. AddProperty(new MP4Integer16Property("balance")); /* 6 */
  29. AddReserved("reserved", 2); /* 7 */
  30. }
  31. void MP4GminAtom::Generate()
  32. {
  33. MP4Atom::Generate();
  34. ((MP4Integer16Property*)m_pProperties[2])->SetValue(0x0040);
  35. ((MP4Integer16Property*)m_pProperties[3])->SetValue(0x8000);
  36. ((MP4Integer16Property*)m_pProperties[4])->SetValue(0x8000);
  37. ((MP4Integer16Property*)m_pProperties[5])->SetValue(0x8000);
  38. ((MP4Integer16Property*)m_pProperties[6])->SetValue(0x0000);
  39. }