Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

38 Zeilen
1.3KB

  1. #include "mov-internal.h"
  2. #include <stdlib.h>
  3. #include <string.h>
  4. #include <assert.h>
  5. // 8.8.3 Track Extends Box (p69)
  6. int mov_read_trex(struct mov_t* mov, const struct mov_box_t* box)
  7. {
  8. uint32_t track_ID;
  9. struct mov_track_t* track;
  10. (void)box;
  11. mov_buffer_r32(&mov->io); /* version & flags */
  12. track_ID = mov_buffer_r32(&mov->io); /* track_ID */
  13. track = mov_fetch_track(mov, track_ID);
  14. if (NULL == track) return -1;
  15. track->trex.default_sample_description_index = mov_buffer_r32(&mov->io); /* default_sample_description_index */
  16. track->trex.default_sample_duration = mov_buffer_r32(&mov->io); /* default_sample_duration */
  17. track->trex.default_sample_size = mov_buffer_r32(&mov->io); /* default_sample_size */
  18. track->trex.default_sample_flags = mov_buffer_r32(&mov->io); /* default_sample_flags */
  19. return mov_buffer_error(&mov->io);
  20. }
  21. size_t mov_write_trex(const struct mov_t* mov)
  22. {
  23. mov_buffer_w32(&mov->io, 12 + 20); /* size */
  24. mov_buffer_write(&mov->io, "trex", 4);
  25. mov_buffer_w32(&mov->io, 0); /* version & flags */
  26. mov_buffer_w32(&mov->io, mov->track->tkhd.track_ID); /* track_ID */
  27. mov_buffer_w32(&mov->io, 1); /* default_sample_description_index */
  28. mov_buffer_w32(&mov->io, 0); /* default_sample_duration */
  29. mov_buffer_w32(&mov->io, 0); /* default_sample_size */
  30. mov_buffer_w32(&mov->io, 0); /* default_sample_flags */
  31. return 32;
  32. }