You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avformat/tests/imf: add CPL timecode test
This commit is contained in:
committed by
Zane van Iperen
parent
94922f6cab
commit
906219e3ca
@@ -70,6 +70,11 @@ const char *cpl_doc =
|
|||||||
" <Id>urn:uuid:8e097bb0-cff7-4969-a692-bad47bfb528f</Id>"
|
" <Id>urn:uuid:8e097bb0-cff7-4969-a692-bad47bfb528f</Id>"
|
||||||
" </EssenceDescriptor>"
|
" </EssenceDescriptor>"
|
||||||
"</EssenceDescriptorList>"
|
"</EssenceDescriptorList>"
|
||||||
|
"<CompositionTimecode>"
|
||||||
|
"<TimecodeDropFrame>false</TimecodeDropFrame>"
|
||||||
|
"<TimecodeRate>24</TimecodeRate>"
|
||||||
|
"<TimecodeStartAddress>02:10:01.23</TimecodeStartAddress>"
|
||||||
|
"</CompositionTimecode>"
|
||||||
"<EditRate>24000 1001</EditRate>"
|
"<EditRate>24000 1001</EditRate>"
|
||||||
"<SegmentList>"
|
"<SegmentList>"
|
||||||
"<Segment>"
|
"<Segment>"
|
||||||
@@ -288,6 +293,7 @@ static int test_cpl_parsing(void)
|
|||||||
{
|
{
|
||||||
xmlDocPtr doc;
|
xmlDocPtr doc;
|
||||||
FFIMFCPL *cpl;
|
FFIMFCPL *cpl;
|
||||||
|
char tc_buf[AV_TIMECODE_STR_SIZE];
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
doc = xmlReadMemory(cpl_doc, strlen(cpl_doc), NULL, NULL, 0);
|
doc = xmlReadMemory(cpl_doc, strlen(cpl_doc), NULL, NULL, 0);
|
||||||
@@ -306,6 +312,7 @@ static int test_cpl_parsing(void)
|
|||||||
printf("%s\n", cpl->content_title_utf8);
|
printf("%s\n", cpl->content_title_utf8);
|
||||||
printf(AV_PRI_URN_UUID "\n", AV_UUID_ARG(cpl->id_uuid));
|
printf(AV_PRI_URN_UUID "\n", AV_UUID_ARG(cpl->id_uuid));
|
||||||
printf("%i %i\n", cpl->edit_rate.num, cpl->edit_rate.den);
|
printf("%i %i\n", cpl->edit_rate.num, cpl->edit_rate.den);
|
||||||
|
printf("%s\n", av_timecode_make_string(cpl->tc, tc_buf, 0));
|
||||||
|
|
||||||
printf("Marker resource count: %" PRIu32 "\n", cpl->main_markers_track->resource_count);
|
printf("Marker resource count: %" PRIu32 "\n", cpl->main_markers_track->resource_count);
|
||||||
for (uint32_t i = 0; i < cpl->main_markers_track->resource_count; i++) {
|
for (uint32_t i = 0; i < cpl->main_markers_track->resource_count; i++) {
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
FFMPEG sample content
|
FFMPEG sample content
|
||||||
urn:uuid:8713c020-2489-45f5-a9f7-87be539e20b5
|
urn:uuid:8713c020-2489-45f5-a9f7-87be539e20b5
|
||||||
24000 1001
|
24000 1001
|
||||||
|
02:10:01:23
|
||||||
Marker resource count: 2
|
Marker resource count: 2
|
||||||
Marker resource 0
|
Marker resource 0
|
||||||
Marker 0
|
Marker 0
|
||||||
|
Reference in New Issue
Block a user