aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-08-06 10:54:05 +0000
committerChristian Grothoff <christian@grothoff.org>2012-08-06 10:54:05 +0000
commit5cd73490f15e8fbf8cbc66b52bb353653524c7bb (patch)
treee7037da59dc9fa45973f3ef433323075d364dd75
parent16f6a0bc587da46e3b702d04e67c24cb8ee697cc (diff)
downloadlibextractor-5cd73490f15e8fbf8cbc66b52bb353653524c7bb.tar.gz
libextractor-5cd73490f15e8fbf8cbc66b52bb353653524c7bb.zip
adding another test
-rw-r--r--src/plugins/Makefile.am4
-rw-r--r--src/plugins/test_mpeg.c30
-rw-r--r--src/plugins/testdata/mpeg_alien.mpgbin0 -> 3201028 bytes
3 files changed, 33 insertions, 1 deletions
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index a7652dd..31f3718 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -15,7 +15,9 @@ EXTRA_DIST = template_extractor.c \
15 testdata/ogg_courseclear.ogg \ 15 testdata/ogg_courseclear.ogg \
16 testdata/gif_image.gif \ 16 testdata/gif_image.gif \
17 testdata/rpm_test.rpm \ 17 testdata/rpm_test.rpm \
18 testdata/flac_kraftwerk.flac 18 testdata/flac_kraftwerk.flac \
19 testdata/mpeg_alien.mpg \
20 testdata/mpeg_melt.mpg
19 21
20if HAVE_VORBISFILE 22if HAVE_VORBISFILE
21PLUGIN_OGG=libextractor_ogg.la 23PLUGIN_OGG=libextractor_ogg.la
diff --git a/src/plugins/test_mpeg.c b/src/plugins/test_mpeg.c
index ab92f5e..b30930c 100644
--- a/src/plugins/test_mpeg.c
+++ b/src/plugins/test_mpeg.c
@@ -73,10 +73,40 @@ main (int argc, char *argv[])
73 }, 73 },
74 { 0, 0, NULL, NULL, 0, -1 } 74 { 0, 0, NULL, NULL, 0, -1 }
75 }; 75 };
76 struct SolutionData alien_sol[] =
77 {
78 {
79 EXTRACTOR_METATYPE_MIMETYPE,
80 EXTRACTOR_METAFORMAT_UTF8,
81 "text/plain",
82 "video/mpeg",
83 strlen ("video/mpeg") + 1,
84 0
85 },
86 {
87 EXTRACTOR_METATYPE_IMAGE_DIMENSIONS,
88 EXTRACTOR_METAFORMAT_UTF8,
89 "text/plain",
90 "320x240",
91 strlen ("320x240") + 1,
92 0
93 },
94 {
95 EXTRACTOR_METATYPE_FORMAT_VERSION,
96 EXTRACTOR_METAFORMAT_UTF8,
97 "text/plain",
98 "MPEG1",
99 strlen ("MPEG1") + 1,
100 0
101 },
102 { 0, 0, NULL, NULL, 0, -1 }
103 };
76 struct ProblemSet ps[] = 104 struct ProblemSet ps[] =
77 { 105 {
78 { "testdata/mpeg_melt.mpg", 106 { "testdata/mpeg_melt.mpg",
79 melt_sol }, 107 melt_sol },
108 { "testdata/mpeg_alien.mpg",
109 alien_sol },
80 { NULL, NULL } 110 { NULL, NULL }
81 }; 111 };
82 return ET_main ("mpeg", ps); 112 return ET_main ("mpeg", ps);
diff --git a/src/plugins/testdata/mpeg_alien.mpg b/src/plugins/testdata/mpeg_alien.mpg
new file mode 100644
index 0000000..aaa468a
--- /dev/null
+++ b/src/plugins/testdata/mpeg_alien.mpg
Binary files differ