From 6d643a134e88c2cff1672bd1e72ebcb0dbe8b969 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 5 Jun 2009 13:17:09 +0200 Subject: check: add registry rescan test --- tests/check/generic/plugin-test.c | 46 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) 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; } -- cgit v1.2.3