mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
vaapisink: create display at open()
Instead of creating the VA display before setting the bus to the
element, it is created when the element is opened.
Basically, this commit is a revert of
5e5d62cac7
That was done when the GStreamer's context sharing was not mature
enough as now. There is no reason to keep this hack.
This commit is contained in:
parent
8555eaf079
commit
a567955c6d
1 changed files with 1 additions and 17 deletions
|
@ -1214,9 +1214,7 @@ gst_vaapisink_display_changed (GstVaapiPluginBase * plugin)
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_vaapisink_start (GstBaseSink * base_sink)
|
gst_vaapisink_start (GstBaseSink * base_sink)
|
||||||
{
|
{
|
||||||
GstVaapiSink *const sink = GST_VAAPISINK_CAST (base_sink);
|
return gst_vaapisink_ensure_display (GST_VAAPISINK_CAST (base_sink));
|
||||||
|
|
||||||
return gst_vaapi_plugin_base_open (GST_VAAPI_PLUGIN_BASE (sink));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -1685,19 +1683,6 @@ gst_vaapisink_event (GstBaseSink * base_sink, GstEvent * event)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
gst_vaapisink_set_bus (GstElement * element, GstBus * bus)
|
|
||||||
{
|
|
||||||
/* Make sure to allocate a VA display in the sink element first,
|
|
||||||
so that upstream elements could query a display that was
|
|
||||||
allocated here, and that exactly matches what the user
|
|
||||||
requested through the "display" property */
|
|
||||||
if (!GST_ELEMENT_BUS (element) && bus)
|
|
||||||
gst_vaapisink_ensure_display (GST_VAAPISINK_CAST (element));
|
|
||||||
|
|
||||||
GST_ELEMENT_CLASS (gst_vaapisink_parent_class)->set_bus (element, bus);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_vaapisink_class_init (GstVaapiSinkClass * klass)
|
gst_vaapisink_class_init (GstVaapiSinkClass * klass)
|
||||||
{
|
{
|
||||||
|
@ -1732,7 +1717,6 @@ gst_vaapisink_class_init (GstVaapiSinkClass * klass)
|
||||||
videosink_class->show_frame = GST_DEBUG_FUNCPTR (gst_vaapisink_show_frame);
|
videosink_class->show_frame = GST_DEBUG_FUNCPTR (gst_vaapisink_show_frame);
|
||||||
|
|
||||||
element_class->set_context = gst_vaapi_base_set_context;
|
element_class->set_context = gst_vaapi_base_set_context;
|
||||||
element_class->set_bus = gst_vaapisink_set_bus;
|
|
||||||
gst_element_class_set_static_metadata (element_class,
|
gst_element_class_set_static_metadata (element_class,
|
||||||
"VA-API sink", "Sink/Video", GST_PLUGIN_DESC,
|
"VA-API sink", "Sink/Video", GST_PLUGIN_DESC,
|
||||||
"Gwenole Beauchesne <gwenole.beauchesne@intel.com>");
|
"Gwenole Beauchesne <gwenole.beauchesne@intel.com>");
|
||||||
|
|
Loading…
Reference in a new issue