home *** CD-ROM | disk | FTP | other *** search
/ Geek 6 / Geek-006.iso / linux / video / xmovie-1.5.3.tar.gz / xmovie-1.5.3.tar / xmovie-1.5.3 / quicktime / edts.c < prev    next >
C/C++ Source or Header  |  2000-11-29  |  1KB  |  45 lines

  1. #include "quicktime.h"
  2.  
  3. void quicktime_edts_init(quicktime_edts_t *edts)
  4. {
  5.     quicktime_elst_init(&(edts->elst));
  6. }
  7.  
  8. void quicktime_edts_delete(quicktime_edts_t *edts)
  9. {
  10.     quicktime_elst_delete(&(edts->elst));
  11. }
  12.  
  13. void quicktime_edts_init_table(quicktime_edts_t *edts)
  14. {
  15.     quicktime_elst_init_all(&(edts->elst));
  16. }
  17.  
  18. void quicktime_read_edts(quicktime_t *file, quicktime_edts_t *edts, quicktime_atom_t *edts_atom)
  19. {
  20.     quicktime_atom_t leaf_atom;
  21.  
  22.     do
  23.     {
  24.         quicktime_atom_read_header(file, &leaf_atom);
  25.         if(quicktime_atom_is(&leaf_atom, "elst"))
  26.             { quicktime_read_elst(file, &(edts->elst)); }
  27.         else
  28.             quicktime_atom_skip(file, &leaf_atom);
  29.     }while(quicktime_position(file) < edts_atom->end);
  30. }
  31.  
  32. void quicktime_edts_dump(quicktime_edts_t *edts)
  33. {
  34.     printf("  edit atom (edts)\n");
  35.     quicktime_elst_dump(&(edts->elst));
  36. }
  37.  
  38. void quicktime_write_edts(quicktime_t *file, quicktime_edts_t *edts, long duration)
  39. {
  40.     quicktime_atom_t atom;
  41.     quicktime_atom_write_header(file, &atom, "edts");
  42.     quicktime_write_elst(file, &(edts->elst), duration);
  43.     quicktime_atom_write_footer(file, &atom);
  44. }
  45.