+2007-12-21 Tim-Philipp Müller <tim at centricular dot net>
+
+ * tests/check/elements/playbin.c: (test_sink_usage_video_only_stream),
+ (test_suburi_error_unknowntype), (test_suburi_error_invalidfile),
+ (test_suburi_error_wrongproto), (test_missing_primary_decoder):
+ * tests/check/libs/cddabasesrc.c: (GST_START_TEST), (GST_START_TEST),
+ (cddabasesrc_suite):
+ Don't use GST_PLUGIN_DEFINE_STATIC, it's not portable and will be
+ deprecated in the future (see #498924).
+
2007-12-21 Tim-Philipp Müller <tim at centricular dot net>
* gst/playback/gststreamselector.c: (gst_selector_pad_event):
#ifndef GST_DISABLE_REGISTRY
+static GType gst_red_video_src_get_type (void);
+static GType gst_codec_src_get_type (void);
+
#define DEFINE_TEST(func) \
static void func (void); \
\
GstElement *playbin, *fakevideosink, *fakeaudiosink;
GstState cur_state, pending_state;
+ fail_unless (gst_element_register (NULL, "redvideosrc", GST_RANK_PRIMARY,
+ gst_red_video_src_get_type ()));
+
playbin = gst_element_factory_make ("playbin", "playbin");
fail_unless (playbin != NULL, "Failed to create playbin element");
{
GstElement *playbin, *fakesink;
+ fail_unless (gst_element_register (NULL, "redvideosrc", GST_RANK_PRIMARY,
+ gst_red_video_src_get_type ()));
+
playbin = gst_element_factory_make ("playbin", "playbin");
fail_unless (playbin != NULL, "Failed to create playbin element");
{
GstElement *playbin, *fakesink;
+ fail_unless (gst_element_register (NULL, "redvideosrc", GST_RANK_PRIMARY,
+ gst_red_video_src_get_type ()));
+
playbin = gst_element_factory_make ("playbin", "playbin");
fail_unless (playbin != NULL, "Failed to create playbin element");
{
GstElement *playbin, *fakesink;
+ fail_unless (gst_element_register (NULL, "redvideosrc", GST_RANK_PRIMARY,
+ gst_red_video_src_get_type ()));
+
playbin = gst_element_factory_make ("playbin", "playbin");
fail_unless (playbin != NULL, "Failed to create playbin element");
GError *err = NULL;
GstBus *bus;
+ fail_unless (gst_element_register (NULL, "codecsrc", GST_RANK_PRIMARY,
+ gst_codec_src_get_type ()));
+
playbin = create_playbin ("codec://");
fail_unless_equals_int (gst_element_set_state (playbin, GST_STATE_READY),
{
}
-static gboolean
-plugin_init (GstPlugin * plugin)
-{
- if (!gst_element_register (plugin, "redvideosrc", GST_RANK_PRIMARY,
- gst_red_video_src_get_type ())) {
- return FALSE;
- }
- if (!gst_element_register (plugin, "codecsrc", GST_RANK_PRIMARY,
- gst_codec_src_get_type ())) {
- return FALSE;
- }
- return TRUE;
-}
-
-GST_PLUGIN_DEFINE_STATIC
- (GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- "playbin-test-elements",
- "static elements for the playbin unit test",
- plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
-
#endif /* GST_DISABLE_REGISTRY */
return buf;
}
-static gboolean
-plugin_init (GstPlugin * plugin)
-{
- if (!gst_element_register (plugin, "cdfoosrc", GST_RANK_SECONDARY,
- GST_TYPE_CD_FOO_SRC))
- return FALSE;
-
- return TRUE;
-}
-
-
-GST_PLUGIN_DEFINE_STATIC (GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- "cdfoosrc",
- "Read audio from CD",
- plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
-
GST_START_TEST (test_discid_calculations)
{
GstElement *foosrc;
gint i;
+ fail_unless (gst_element_register (NULL, "cdfoosrc", GST_RANK_SECONDARY,
+ GST_TYPE_CD_FOO_SRC));
+
foosrc = gst_element_factory_make ("cdfoosrc", "cdfoosrc");
for (i = 0; i < G_N_ELEMENTS (test_discs); ++i) {
GstPad *sinkpad;
gint i;
+ fail_unless (gst_element_register (NULL, "cdfoosrc", GST_RANK_SECONDARY,
+ GST_TYPE_CD_FOO_SRC));
+
pipeline = gst_pipeline_new ("pipeline");
foosrc = gst_element_factory_make ("cdfoosrc", "cdfoosrc");
fakesink = gst_element_factory_make ("fakesink", "fakesink");
return s;
}
-int
-main (int argc, char **argv)
-{
- int nf;
-
- Suite *s = cddabasesrc_suite ();
- SRunner *sr = srunner_create (s);
-
- gst_check_init (&argc, &argv);
-
- srunner_run_all (sr, CK_NORMAL);
- nf = srunner_ntests_failed (sr);
- srunner_free (sr);
-
- return nf;
-}
+GST_CHECK_MAIN (cddabasesrc)