gmhd.c
资源名称:NETVIDEO.rar [点击查看]
上传用户:sun1608
上传日期:2007-02-02
资源大小:6116k
文件大小:1k
源码类别:
流媒体/Mpeg4/MP4
开发平台:
Visual C++
- #include "quicktime.h"
- int quicktime_gmhd_init(quicktime_gmhd_t *gmhd)
- {
- quicktime_gmin_init(&(gmhd->gmin));
- }
- int quicktime_gmhd_delete(quicktime_gmhd_t *gmhd)
- {
- quicktime_gmin_delete(&(gmhd->gmin));
- }
- int quicktime_gmhd_dump(quicktime_gmhd_t *gmhd)
- {
- printf(" generic media headern");
- quicktime_gmin_dump(&gmhd->gmin);
- }
- int quicktime_read_gmhd(quicktime_t *file, quicktime_gmhd_t *gmhd, quicktime_atom_t *parent_atom)
- {
- quicktime_atom_t leaf_atom;
- do {
- quicktime_atom_read_header(file, &leaf_atom);
- if (quicktime_atom_is(&leaf_atom, "gmin")) {
- quicktime_read_gmin(file, &(gmhd->gmin));
- } else {
- quicktime_atom_skip(file, &leaf_atom);
- }
- } while (quicktime_position(file) < parent_atom->end);
- }
- int quicktime_write_gmhd(quicktime_t *file, quicktime_gmhd_t *gmhd)
- {
- quicktime_atom_t atom;
- quicktime_atom_write_header(file, &atom, "gmhd");
- quicktime_write_gmin(file, &(gmhd->gmin));
- quicktime_atom_write_footer(file, &atom);
- }