25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
646B

  1. #include "mov-internal.h"
  2. #include <errno.h>
  3. #include <stdlib.h>
  4. #include <assert.h>
  5. // 8.8.5 Movie Fragment Header Box (p70)
  6. int mov_read_mfhd(struct mov_t* mov, const struct mov_box_t* box)
  7. {
  8. (void)box;
  9. mov_buffer_r32(&mov->io); /* version & flags */
  10. mov_buffer_r32(&mov->io); /* sequence_number */
  11. return mov_buffer_error(&mov->io);
  12. }
  13. size_t mov_write_mfhd(const struct mov_t* mov, uint32_t fragment)
  14. {
  15. mov_buffer_w32(&mov->io, 16); /* size */
  16. mov_buffer_write(&mov->io, "mfhd", 4);
  17. mov_buffer_w32(&mov->io, 0); /* version & flags */
  18. mov_buffer_w32(&mov->io, fragment); /* sequence_number */
  19. return 16;
  20. }