diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-06-05 13:17:09 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-06-05 13:17:09 +0200 |
commit | 6d643a134e88c2cff1672bd1e72ebcb0dbe8b969 (patch) | |
tree | c98d9aabf7a084209251ea9d3855e19562aaaade | |
parent | 686aadaf01d3374034d18cae1f45e36a3c3d80df (diff) |
check: add registry rescan test
-rw-r--r-- | tests/check/generic/plugin-test.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/check/generic/plugin-test.c b/tests/check/generic/plugin-test.c index 7c35847..ed80bbb 100644 --- a/tests/check/generic/plugin-test.c +++ b/tests/check/generic/plugin-test.c @@ -36,6 +36,51 @@ GST_START_TEST (test_ffmpeg_plugin) GST_END_TEST; +GST_START_TEST (test_ffmpeg_update_reg) +{ + GstElement *encoder, *muxer, *decoder; + + /* Ask for elements the first time */ + encoder = gst_element_factory_make ("ffenc_mpeg2video", "sink"); + GST_DEBUG ("Creating element ffenc_mpeg2video %p", encoder); + fail_unless (encoder != NULL); + + decoder = gst_element_factory_make ("ffdec_mpeg2video", "sink"); + GST_DEBUG ("Creating element ffdec_mpeg2video %p", decoder); + fail_unless (decoder != NULL); + + muxer = gst_element_factory_make ("ffmux_dvd", "sink"); + GST_DEBUG ("Creating element ffmux_dvd %p", muxer); + fail_unless (muxer != NULL); + + gst_object_unref (encoder); + gst_object_unref (decoder); + gst_object_unref (muxer); + + GST_DEBUG ("calls gst_update_registry"); + gst_update_registry (); + + /* Ask for elements the second time */ + + encoder = gst_element_factory_make ("ffenc_mpeg2video", "sink"); + GST_DEBUG ("Creating element ffenc_mpeg2video %p", encoder); + fail_unless (encoder != NULL); + + decoder = gst_element_factory_make ("ffdec_mpeg2video", "sink"); + GST_DEBUG ("Creating element ffdec_mpeg2video %p", decoder); + fail_unless (decoder != NULL); + + muxer = gst_element_factory_make ("ffmux_dvd", "sink"); + GST_DEBUG ("Creating element ffmux_dvd %p", muxer); + fail_unless (muxer != NULL); + + gst_object_unref (encoder); + gst_object_unref (decoder); + gst_object_unref (muxer); +} + +GST_END_TEST; + Suite * plugin_test_suite (void) { @@ -47,6 +92,7 @@ plugin_test_suite (void) suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_ffmpeg_plugin); + tcase_add_test (tc_chain, test_ffmpeg_update_reg); return s; } |