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.

33 lines
768B

  1. #include "mov-internal.h"
  2. size_t mov_write_dref(const struct mov_t* mov)
  3. {
  4. mov_buffer_w32(&mov->io, 28); /* size */
  5. mov_buffer_write(&mov->io, "dref", 4);
  6. mov_buffer_w32(&mov->io, 0); /* version & flags */
  7. mov_buffer_w32(&mov->io, 1); /* entry count */
  8. mov_buffer_w32(&mov->io, 12); /* size */
  9. //FIXME add the alis and rsrc atom
  10. mov_buffer_write(&mov->io, "url ", 4);
  11. mov_buffer_w32(&mov->io, 1); /* version & flags */
  12. return 28;
  13. }
  14. size_t mov_write_dinf(const struct mov_t* mov)
  15. {
  16. size_t size;
  17. uint64_t offset;
  18. size = 8 /* Box */;
  19. offset = mov_buffer_tell(&mov->io);
  20. mov_buffer_w32(&mov->io, 0); /* size */
  21. mov_buffer_write(&mov->io, "dinf", 4);
  22. size += mov_write_dref(mov);
  23. mov_write_size(mov, offset, size); /* update size */
  24. return size;
  25. }