mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
bad: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763081
This commit is contained in:
parent
82a39d2227
commit
e92bbb2a83
14 changed files with 32 additions and 46 deletions
|
@ -227,8 +227,7 @@ gst_ca_opengl_layer_sink_class_init (GstCAOpenGLLayerSinkClass * klass)
|
|||
"Sink/Video", "A video sink based on CAOpenGLLayer",
|
||||
"Matthew Waters <matthew@centricular.com>");
|
||||
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
gst_static_pad_template_get (&gst_ca_opengl_layer_sink_template));
|
||||
gst_element_class_add_static_pad_template (element_class, &gst_ca_opengl_layer_sink_template);
|
||||
|
||||
gobject_class->finalize = gst_ca_opengl_layer_sink_finalize;
|
||||
|
||||
|
|
|
@ -103,12 +103,10 @@ gst_gl_color_convert_element_class_init (GstGLColorConvertElementClass * klass)
|
|||
|
||||
bt_class->passthrough_on_same_caps = TRUE;
|
||||
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
gst_static_pad_template_get
|
||||
(&gst_gl_color_convert_element_src_pad_template));
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
gst_static_pad_template_get
|
||||
(&gst_gl_color_convert_element_sink_pad_template));
|
||||
gst_element_class_add_static_pad_template (element_class,
|
||||
&gst_gl_color_convert_element_src_pad_template);
|
||||
gst_element_class_add_static_pad_template (element_class,
|
||||
&gst_gl_color_convert_element_sink_pad_template);
|
||||
|
||||
gst_element_class_set_metadata (element_class,
|
||||
"OpenGL color converter", "Filter/Converter/Video",
|
||||
|
|
|
@ -73,10 +73,10 @@ gst_gl_download_element_class_init (GstGLDownloadElementClass * klass)
|
|||
|
||||
bt_class->passthrough_on_same_caps = TRUE;
|
||||
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
gst_static_pad_template_get (&gst_gl_download_element_src_pad_template));
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
gst_static_pad_template_get (&gst_gl_download_element_sink_pad_template));
|
||||
gst_element_class_add_static_pad_template (element_class,
|
||||
&gst_gl_download_element_src_pad_template);
|
||||
gst_element_class_add_static_pad_template (element_class,
|
||||
&gst_gl_download_element_sink_pad_template);
|
||||
|
||||
gst_element_class_set_metadata (element_class,
|
||||
"OpenGL uploader", "Filter/Video",
|
||||
|
|
|
@ -73,8 +73,7 @@ gst_gl_filter_bin_class_init (GstGLFilterBinClass * klass)
|
|||
gobject_class->set_property = gst_gl_filter_bin_set_property;
|
||||
gobject_class->get_property = gst_gl_filter_bin_get_property;
|
||||
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
gst_static_pad_template_get (&_src_pad_template));
|
||||
gst_element_class_add_static_pad_template (element_class, &_src_pad_template);
|
||||
|
||||
upload_caps = gst_gl_upload_get_input_template_caps ();
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
|
|
|
@ -570,8 +570,8 @@ gst_glimage_sink_class_init (GstGLImageSinkClass * klass)
|
|||
G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_generic,
|
||||
G_TYPE_BOOLEAN, 3, GST_GL_TYPE_CONTEXT, G_TYPE_UINT, G_TYPE_UINT);
|
||||
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
gst_static_pad_template_get (&gst_glimage_sink_template));
|
||||
gst_element_class_add_static_pad_template (element_class,
|
||||
&gst_glimage_sink_template);
|
||||
|
||||
gobject_class->finalize = gst_glimage_sink_finalize;
|
||||
|
||||
|
|
|
@ -380,10 +380,8 @@ gst_gl_mixer_class_init (GstGLMixerClass * klass)
|
|||
gobject_class->get_property = gst_gl_mixer_get_property;
|
||||
gobject_class->set_property = gst_gl_mixer_set_property;
|
||||
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
gst_static_pad_template_get (&src_factory));
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
gst_static_pad_template_get (&sink_factory));
|
||||
gst_element_class_add_static_pad_template (element_class, &src_factory);
|
||||
gst_element_class_add_static_pad_template (element_class, &sink_factory);
|
||||
|
||||
agg_class->sinkpads_type = GST_TYPE_GL_MIXER_PAD;
|
||||
agg_class->sink_query = gst_gl_mixer_sink_query;
|
||||
|
|
|
@ -169,8 +169,7 @@ gst_gl_mixer_bin_class_init (GstGLMixerBinClass * klass)
|
|||
G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_generic,
|
||||
GST_TYPE_ELEMENT, 0);
|
||||
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
gst_static_pad_template_get (&src_factory));
|
||||
gst_element_class_add_static_pad_template (element_class, &src_factory);
|
||||
|
||||
upload_caps = gst_gl_upload_get_input_template_caps ();
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
|
|
|
@ -102,8 +102,8 @@ gst_gl_src_bin_class_init (GstGLSrcBinClass * klass)
|
|||
"Infrastructure to process GL textures",
|
||||
"Matthew Waters <matthew@centricular.com>");
|
||||
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
gst_static_pad_template_get (&gst_gl_src_bin_template));
|
||||
gst_element_class_add_static_pad_template (element_class,
|
||||
&gst_gl_src_bin_template);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -150,10 +150,8 @@ gst_gl_stereo_mix_class_init (GstGLStereoMixClass * klass)
|
|||
GST_TYPE_GL_STEREO_DOWNMIX_MODE_TYPE, DEFAULT_DOWNMIX,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
gst_static_pad_template_get (&src_factory));
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
gst_static_pad_template_get (&sink_factory));
|
||||
gst_element_class_add_static_pad_template (element_class, &src_factory);
|
||||
gst_element_class_add_static_pad_template (element_class, &sink_factory);
|
||||
|
||||
agg_class->sinkpads_type = GST_TYPE_GL_STEREO_MIX_PAD;
|
||||
agg_class->stop = gst_gl_stereo_mix_stop;
|
||||
|
|
|
@ -139,12 +139,10 @@ gst_gl_stereosplit_class_init (GstGLStereoSplitClass * klass)
|
|||
element_class->change_state = stereosplit_change_state;
|
||||
element_class->set_context = stereosplit_set_context;
|
||||
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
gst_static_pad_template_get (&sink_template));
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
gst_static_pad_template_get (&src_left_template));
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
gst_static_pad_template_get (&src_right_template));
|
||||
gst_element_class_add_static_pad_template (element_class, &sink_template);
|
||||
gst_element_class_add_static_pad_template (element_class, &src_left_template);
|
||||
gst_element_class_add_static_pad_template (element_class,
|
||||
&src_right_template);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -178,8 +178,7 @@ gst_gl_test_src_class_init (GstGLTestSrcClass * klass)
|
|||
"Source/Video", "Creates a test video stream",
|
||||
"David A. Schleef <ds@schleef.org>");
|
||||
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
gst_static_pad_template_get (&src_factory));
|
||||
gst_element_class_add_static_pad_template (element_class, &src_factory);
|
||||
|
||||
element_class->set_context = gst_gl_test_src_set_context;
|
||||
element_class->change_state = gst_gl_test_src_change_state;
|
||||
|
|
|
@ -80,8 +80,8 @@ gst_gl_upload_element_class_init (GstGLUploadElementClass * klass)
|
|||
|
||||
bt_class->passthrough_on_same_caps = TRUE;
|
||||
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
gst_static_pad_template_get (&gst_gl_upload_element_src_pad_template));
|
||||
gst_element_class_add_static_pad_template (element_class,
|
||||
&gst_gl_upload_element_src_pad_template);
|
||||
|
||||
upload_caps = gst_gl_upload_get_input_template_caps ();
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
|
|
|
@ -133,10 +133,8 @@ gst_gl_video_flip_class_init (GstGLVideoFlipClass * klass)
|
|||
GST_PARAM_CONTROLLABLE | G_PARAM_READWRITE | G_PARAM_CONSTRUCT |
|
||||
G_PARAM_STATIC_STRINGS));
|
||||
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
gst_static_pad_template_get (&_src_template));
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
gst_static_pad_template_get (&_sink_template));
|
||||
gst_element_class_add_static_pad_template (element_class, &_src_template);
|
||||
gst_element_class_add_static_pad_template (element_class, &_sink_template);
|
||||
|
||||
gst_element_class_set_metadata (element_class, "OpenGL video flip filter",
|
||||
"Filter/Effect/Video", "Flip video on the GPU",
|
||||
|
|
|
@ -142,10 +142,10 @@ gst_gl_filter_class_init (GstGLFilterClass * klass)
|
|||
|
||||
klass->transform_internal_caps = default_transform_internal_caps;
|
||||
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
gst_static_pad_template_get (&gst_gl_filter_src_pad_template));
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
gst_static_pad_template_get (&gst_gl_filter_sink_pad_template));
|
||||
gst_element_class_add_static_pad_template (element_class,
|
||||
&gst_gl_filter_src_pad_template);
|
||||
gst_element_class_add_static_pad_template (element_class,
|
||||
&gst_gl_filter_sink_pad_template);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue