You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
899B

  1. #include "mov-internal.h"
  2. #include <assert.h>
  3. // 8.8.13 Level Assignment Box (p77)
  4. int mov_read_leva(struct mov_t* mov, const struct mov_box_t* box)
  5. {
  6. unsigned int i, level_count;
  7. unsigned int assignment_type;
  8. mov_buffer_r32(&mov->io); /* version & flags */
  9. level_count = mov_buffer_r8(&mov->io); /* level_count */
  10. for (i = 0; i < level_count; i++)
  11. {
  12. mov_buffer_r32(&mov->io); /* track_id */
  13. assignment_type = mov_buffer_r8(&mov->io); /* padding_flag & assignment_type */
  14. assignment_type &= 0x7F; // 7-bits
  15. if (0 == assignment_type)
  16. {
  17. mov_buffer_r32(&mov->io); /* grouping_type */
  18. }
  19. else if (1 == assignment_type)
  20. {
  21. mov_buffer_r32(&mov->io); /* grouping_type */
  22. mov_buffer_r32(&mov->io); /* grouping_type_parameter */
  23. }
  24. else if (4 == assignment_type)
  25. {
  26. mov_buffer_r32(&mov->io); /* sub_track_id */
  27. }
  28. }
  29. (void)box;
  30. return mov_buffer_error(&mov->io);
  31. }