mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 18:20:44 +00:00
plugin: guard pointers to pad query functions
Since gstreamer 1.4 is not required to have pad query functions if the query vmethods are used. This patch guards out the pad query functions for gstreamer < 1.4 Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com> https://bugzilla.gnome.org/show_bug.cgi?id=757629
This commit is contained in:
parent
ea802072d1
commit
1efe569639
2 changed files with 10 additions and 3 deletions
|
@ -199,13 +199,17 @@ gst_vaapi_plugin_base_init (GstVaapiPluginBase * plugin,
|
|||
|
||||
/* sink pad */
|
||||
plugin->sinkpad = gst_element_get_static_pad (GST_ELEMENT (plugin), "sink");
|
||||
plugin->sinkpad_query = GST_PAD_QUERYFUNC (plugin->sinkpad);
|
||||
gst_video_info_init (&plugin->sinkpad_info);
|
||||
#if !GST_CHECK_VERSION(1,4,0)
|
||||
plugin->sinkpad_query = GST_PAD_QUERYFUNC (plugin->sinkpad);
|
||||
#endif
|
||||
|
||||
/* src pad */
|
||||
if (!(GST_OBJECT_FLAGS (plugin) & GST_ELEMENT_FLAG_SINK)) {
|
||||
plugin->srcpad = gst_element_get_static_pad (GST_ELEMENT (plugin), "src");
|
||||
#if !GST_CHECK_VERSION(1,4,0)
|
||||
plugin->srcpad_query = GST_PAD_QUERYFUNC (plugin->srcpad);
|
||||
#endif
|
||||
}
|
||||
gst_video_info_init (&plugin->srcpad_info);
|
||||
}
|
||||
|
|
|
@ -121,7 +121,6 @@ struct _GstVaapiPluginBase
|
|||
gboolean sinkpad_caps_changed;
|
||||
gboolean sinkpad_caps_is_raw;
|
||||
GstVideoInfo sinkpad_info;
|
||||
GstPadQueryFunction sinkpad_query;
|
||||
GstBufferPool *sinkpad_buffer_pool;
|
||||
guint sinkpad_buffer_size;
|
||||
|
||||
|
@ -129,9 +128,13 @@ struct _GstVaapiPluginBase
|
|||
GstCaps *srcpad_caps;
|
||||
gboolean srcpad_caps_changed;
|
||||
GstVideoInfo srcpad_info;
|
||||
GstPadQueryFunction srcpad_query;
|
||||
GstBufferPool *srcpad_buffer_pool;
|
||||
|
||||
#if !GST_CHECK_VERSION(1,4,0)
|
||||
GstPadQueryFunction srcpad_query;
|
||||
GstPadQueryFunction sinkpad_query;
|
||||
#endif
|
||||
|
||||
GstVaapiDisplay *display;
|
||||
GstVaapiDisplayType display_type;
|
||||
GstVaapiDisplayType display_type_req;
|
||||
|
|
Loading…
Reference in a new issue