1 #include "funcprotos.h"
6 void quicktime_delete_avcc(quicktime_avcc_t
*avcc
)
8 if(avcc
->data
) free(avcc
->data
);
11 // Set esds header to a copy of the argument
12 void quicktime_set_avcc_header(quicktime_avcc_t
*avcc
,
21 avcc
->data
= calloc(1, size
);
22 memcpy(avcc
->data
, data
, size
);
23 avcc
->data_size
= size
;
26 void quicktime_write_avcc(quicktime_t
*file
,
27 quicktime_avcc_t
*avcc
)
29 quicktime_atom_t atom
;
30 quicktime_atom_write_header(file
, &atom
, "avcC");
31 quicktime_write_data(file
, avcc
->data
, avcc
->data_size
);
32 quicktime_atom_write_footer(file
, &atom
);
37 int quicktime_read_avcc(quicktime_t
*file
,
38 quicktime_atom_t
*parent_atom
,
39 quicktime_avcc_t
*avcc
)
41 avcc
->data_size
= parent_atom
->size
- 8;
42 avcc
->data
= calloc(1, avcc
->data_size
+ 1024);
43 quicktime_read_data(file
,
46 quicktime_atom_skip(file
, parent_atom
);
50 void quicktime_avcc_dump(quicktime_avcc_t
*avcc
)
53 printf(" h264 description\n");
54 printf(" data_size=0x%x\n", avcc
->data_size
);
56 for(i
= 0; i
< avcc
->data_size
; i
++)
58 printf("0x%02x ", (unsigned char)avcc
->data
[i
]);