aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorLRN <lrn1986@gmail.com>2012-09-14 11:50:13 +0000
committerLRN <lrn1986@gmail.com>2012-09-14 11:50:13 +0000
commit51ad50c54928c66545b9995e70db5fee3e34fe31 (patch)
treefa8579df5c79c826010a0ac47d5ed588475ea8c7 /src/plugins
parent759cf0c0d64f776ad8acfaea8cd9f8e8189341f9 (diff)
downloadlibextractor-51ad50c54928c66545b9995e70db5fee3e34fe31.tar.gz
libextractor-51ad50c54928c66545b9995e70db5fee3e34fe31.zip
More verbosity to GStreamer extractor test
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/gstreamer_extractor.c4
-rw-r--r--src/plugins/test_gstreamer.c18
2 files changed, 18 insertions, 4 deletions
diff --git a/src/plugins/gstreamer_extractor.c b/src/plugins/gstreamer_extractor.c
index 498309c..be35f09 100644
--- a/src/plugins/gstreamer_extractor.c
+++ b/src/plugins/gstreamer_extractor.c
@@ -45,7 +45,7 @@ GST_DEBUG_CATEGORY_STATIC (gstreamer_extractor);
45 * and kill it. 45 * and kill it.
46 * In microseconds. 46 * In microseconds.
47 */ 47 */
48#define DATA_TIMEOUT 80000 /* 80ms */ 48#define DATA_TIMEOUT 80000LL /* 80ms */
49 49
50/** 50/**
51 * Struct mapping GSTREAMER tags to LE tags. 51 * Struct mapping GSTREAMER tags to LE tags.
@@ -1772,6 +1772,8 @@ _data_timeout (struct PrivStruct *ps)
1772 gint64 now = g_get_monotonic_time (); 1772 gint64 now = g_get_monotonic_time ();
1773 if (now - ps->last_data_request_time > DATA_TIMEOUT) 1773 if (now - ps->last_data_request_time > DATA_TIMEOUT)
1774 { 1774 {
1775 GST_ERROR ("GstDiscoverer I/O timed out (last heard from discoverer on %lld, now is %lld, difference is %lld > %lld",
1776 ps->last_data_request_time, now, now - ps->last_data_request_time, DATA_TIMEOUT);
1775 ps->timeout_id = 0; 1777 ps->timeout_id = 0;
1776 g_main_loop_quit (ps->loop); 1778 g_main_loop_quit (ps->loop);
1777 return FALSE; 1779 return FALSE;
diff --git a/src/plugins/test_gstreamer.c b/src/plugins/test_gstreamer.c
index 742ef91..083773b 100644
--- a/src/plugins/test_gstreamer.c
+++ b/src/plugins/test_gstreamer.c
@@ -135,6 +135,7 @@ main (int argc, char *argv[])
135 pre_test = discoverer_main (dc, "testdata/gstreamer_30_and_33.asf"); 135 pre_test = discoverer_main (dc, "testdata/gstreamer_30_and_33.asf");
136 if (GST_DISCOVERER_MISSING_PLUGINS != pre_test) 136 if (GST_DISCOVERER_MISSING_PLUGINS != pre_test)
137 { 137 {
138 int test_result;
138 struct SolutionData thirty_and_thirtythree_sol[] = 139 struct SolutionData thirty_and_thirtythree_sol[] =
139 { 140 {
140 { 141 {
@@ -297,12 +298,16 @@ main (int argc, char *argv[])
297 { "testdata/30_and_33.asf", thirty_and_thirtythree_sol }, 298 { "testdata/30_and_33.asf", thirty_and_thirtythree_sol },
298 { NULL, NULL } 299 { NULL, NULL }
299 }; 300 };
300 result += (0 == ET_main ("gstreamer", ps) ? 0 : 1); 301 g_print ("Running asf test on GStreamer:\n");
302 test_result = (0 == ET_main ("gstreamer", ps) ? 0 : 1);
303 g_print ("asf GStreamer test result: %s\n", test_result == 0 ? "OK" : "FAILED");
304 result += test_result;
301 } 305 }
302 306
303 pre_test = discoverer_main (dc, "testdata/gstreamer_barsandtone.flv"); 307 pre_test = discoverer_main (dc, "testdata/gstreamer_barsandtone.flv");
304 if (pre_test != GST_DISCOVERER_MISSING_PLUGINS) 308 if (pre_test != GST_DISCOVERER_MISSING_PLUGINS)
305 { 309 {
310 int test_result;
306 struct SolutionData barsandtone_sol[] = 311 struct SolutionData barsandtone_sol[] =
307 { 312 {
308 { 313 {
@@ -492,12 +497,16 @@ main (int argc, char *argv[])
492 { "testdata/barsandtone.flv", barsandtone_sol }, 497 { "testdata/barsandtone.flv", barsandtone_sol },
493 { NULL, NULL } 498 { NULL, NULL }
494 }; 499 };
495 result += (0 == ET_main ("gstreamer", ps) ? 0 : 1); 500 g_print ("Running flv test on GStreamer:\n");
501 test_result = (0 == ET_main ("gstreamer", ps) ? 0 : 1);
502 g_print ("flv GStreamer test result: %s\n", test_result == 0 ? "OK" : "FAILED");
503 result += test_result;
496 } 504 }
497 505
498 pre_test = discoverer_main (dc, "testdata/gstreamer_sample_sorenson.mov"); 506 pre_test = discoverer_main (dc, "testdata/gstreamer_sample_sorenson.mov");
499 if (pre_test != GST_DISCOVERER_MISSING_PLUGINS) 507 if (pre_test != GST_DISCOVERER_MISSING_PLUGINS)
500 { 508 {
509 int test_result;
501 struct SolutionData sample_sorenson_sol[] = 510 struct SolutionData sample_sorenson_sol[] =
502 { 511 {
503 { 512 {
@@ -692,7 +701,10 @@ main (int argc, char *argv[])
692 { "testdata/gstreamer_sample_sorenson.mov", sample_sorenson_sol }, 701 { "testdata/gstreamer_sample_sorenson.mov", sample_sorenson_sol },
693 { NULL, NULL } 702 { NULL, NULL }
694 }; 703 };
695 result += (0 == ET_main ("gstreamer", ps) ? 0 : 1); 704 g_print ("Running mov test on GStreamer:\n");
705 test_result = (0 == ET_main ("gstreamer", ps) ? 0 : 1);
706 g_print ("mov GStreamer test result: %s\n", test_result == 0 ? "OK" : "FAILED");
707 result += test_result;
696 } 708 }
697 709
698 pre_test = discoverer_main (dc, "testdata/matroska_flame.mkv"); 710 pre_test = discoverer_main (dc, "testdata/matroska_flame.mkv");