1 #include "funcprotos.h"
5 void quicktime_vmhd_init(quicktime_vmhd_t
*vmhd
)
9 vmhd
->graphics_mode
= 64;
10 vmhd
->opcolor
[0] = 32768;
11 vmhd
->opcolor
[1] = 32768;
12 vmhd
->opcolor
[2] = 32768;
15 void quicktime_vmhd_init_video(quicktime_t
*file
,
16 quicktime_vmhd_t
*vmhd
,
23 void quicktime_vmhd_delete(quicktime_vmhd_t
*vmhd
)
27 void quicktime_vmhd_dump(quicktime_vmhd_t
*vmhd
)
29 printf(" video media header\n");
30 printf(" version %d\n", vmhd
->version
);
31 printf(" flags %d\n", vmhd
->flags
);
32 printf(" graphics_mode %d\n", vmhd
->graphics_mode
);
33 printf(" opcolor %d %d %d\n", vmhd
->opcolor
[0], vmhd
->opcolor
[1], vmhd
->opcolor
[2]);
36 void quicktime_read_vmhd(quicktime_t
*file
, quicktime_vmhd_t
*vmhd
)
39 vmhd
->version
= quicktime_read_char(file
);
40 vmhd
->flags
= quicktime_read_int24(file
);
41 vmhd
->graphics_mode
= quicktime_read_int16(file
);
42 for(i
= 0; i
< 3; i
++)
43 vmhd
->opcolor
[i
] = quicktime_read_int16(file
);
46 void quicktime_write_vmhd(quicktime_t
*file
, quicktime_vmhd_t
*vmhd
)
48 quicktime_atom_t atom
;
50 quicktime_atom_write_header(file
, &atom
, "vmhd");
52 quicktime_write_char(file
, vmhd
->version
);
53 quicktime_write_int24(file
, vmhd
->flags
);
54 quicktime_write_int16(file
, vmhd
->graphics_mode
);
56 for(i
= 0; i
< 3; i
++)
57 quicktime_write_int16(file
, vmhd
->opcolor
[i
]);
59 quicktime_atom_write_footer(file
, &atom
);