dinf.c
上传用户:luping1608
上传日期:2007-01-06
资源大小:38k
文件大小:1k
源码类别:

多媒体

开发平台:

Unix_Linux

  1. #include "quicktime.h"
  2. int quicktime_dinf_init(quicktime_dinf_t *dinf)
  3. {
  4. quicktime_dref_init(&(dinf->dref));
  5. }
  6. int quicktime_dinf_delete(quicktime_dinf_t *dinf)
  7. {
  8. quicktime_dref_delete(&(dinf->dref));
  9. }
  10. int quicktime_dinf_init_all(quicktime_dinf_t *dinf)
  11. {
  12. quicktime_dref_init_all(&(dinf->dref));
  13. }
  14. int quicktime_dinf_dump(quicktime_dinf_t *dinf)
  15. {
  16. printf("    data information (dinf)n");
  17. quicktime_dref_dump(&(dinf->dref));
  18. }
  19. int quicktime_read_dinf(quicktime_t *file, quicktime_dinf_t *dinf, quicktime_atom_t *dinf_atom)
  20. {
  21. quicktime_atom_t leaf_atom;
  22. do
  23. {
  24. quicktime_atom_read_header(file->stream, &leaf_atom);
  25. if(quicktime_atom_is(&leaf_atom, "dref"))
  26. { quicktime_read_dref(file, &(dinf->dref)); }
  27. else
  28. quicktime_atom_skip(file, &leaf_atom);
  29. }while(quicktime_position(file) < dinf_atom->end);
  30. }
  31. int quicktime_write_dinf(quicktime_t *file, quicktime_dinf_t *dinf)
  32. {
  33. quicktime_atom_t atom;
  34. quicktime_atom_write_header(file, &atom, "dinf");
  35. quicktime_write_dref(file, &(dinf->dref));
  36. quicktime_atom_write_footer(file, &atom);
  37. }