mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
videoaggregator: Get the buffer from the pool if available
https://bugzilla.gnome.org/show_bug.cgi?id=746529
This commit is contained in:
parent
70e2b4b416
commit
74db4fa64e
3 changed files with 0 additions and 47 deletions
|
@ -580,20 +580,6 @@ no_decide_allocation:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GstBufferPool *
|
|
||||||
gst_gl_base_mixer_get_buffer_pool (GstGLBaseMixer * mix)
|
|
||||||
{
|
|
||||||
GstBufferPool *pool;
|
|
||||||
|
|
||||||
GST_OBJECT_LOCK (mix);
|
|
||||||
pool = mix->priv->pool;
|
|
||||||
if (pool)
|
|
||||||
gst_object_ref (pool);
|
|
||||||
GST_OBJECT_UNLOCK (mix);
|
|
||||||
|
|
||||||
return pool;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_gl_base_mixer_get_property (GObject * object,
|
gst_gl_base_mixer_get_property (GObject * object,
|
||||||
guint prop_id, GValue * value, GParamSpec * pspec)
|
guint prop_id, GValue * value, GParamSpec * pspec)
|
||||||
|
|
|
@ -99,7 +99,5 @@ struct _GstGLBaseMixerClass
|
||||||
|
|
||||||
GType gst_gl_base_mixer_get_type(void);
|
GType gst_gl_base_mixer_get_type(void);
|
||||||
|
|
||||||
GstBufferPool *gst_gl_base_mixer_get_buffer_pool (GstGLBaseMixer * mix);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif /* __GST_GL_BASE_MIXER_H__ */
|
#endif /* __GST_GL_BASE_MIXER_H__ */
|
||||||
|
|
|
@ -322,8 +322,6 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink_%u",
|
||||||
);
|
);
|
||||||
|
|
||||||
static gboolean gst_gl_mixer_src_query (GstAggregator * agg, GstQuery * query);
|
static gboolean gst_gl_mixer_src_query (GstAggregator * agg, GstQuery * query);
|
||||||
static GstFlowReturn gst_gl_mixer_get_output_buffer (GstVideoAggregator *
|
|
||||||
videoaggregator, GstBuffer ** outbuf);
|
|
||||||
static gboolean gst_gl_mixer_stop (GstAggregator * agg);
|
static gboolean gst_gl_mixer_stop (GstAggregator * agg);
|
||||||
static gboolean gst_gl_mixer_start (GstAggregator * agg);
|
static gboolean gst_gl_mixer_start (GstAggregator * agg);
|
||||||
|
|
||||||
|
@ -371,7 +369,6 @@ gst_gl_mixer_class_init (GstGLMixerClass * klass)
|
||||||
agg_class->negotiated_src_caps = _negotiated_caps;
|
agg_class->negotiated_src_caps = _negotiated_caps;
|
||||||
|
|
||||||
videoaggregator_class->aggregate_frames = gst_gl_mixer_aggregate_frames;
|
videoaggregator_class->aggregate_frames = gst_gl_mixer_aggregate_frames;
|
||||||
videoaggregator_class->get_output_buffer = gst_gl_mixer_get_output_buffer;
|
|
||||||
videoaggregator_class->find_best_format = _find_best_format;
|
videoaggregator_class->find_best_format = _find_best_format;
|
||||||
|
|
||||||
mix_class->propose_allocation = gst_gl_mixer_propose_allocation;
|
mix_class->propose_allocation = gst_gl_mixer_propose_allocation;
|
||||||
|
@ -465,34 +462,6 @@ gst_gl_mixer_src_query (GstAggregator * agg, GstQuery * query)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
|
||||||
gst_gl_mixer_get_output_buffer (GstVideoAggregator * videoaggregator,
|
|
||||||
GstBuffer ** outbuf)
|
|
||||||
{
|
|
||||||
GstGLMixer *mix = GST_GL_MIXER (videoaggregator);
|
|
||||||
GstBufferPool *pool;
|
|
||||||
GstFlowReturn ret;
|
|
||||||
|
|
||||||
pool =
|
|
||||||
gst_gl_base_mixer_get_buffer_pool (GST_GL_BASE_MIXER (videoaggregator));
|
|
||||||
|
|
||||||
if (!pool)
|
|
||||||
return GST_FLOW_NOT_NEGOTIATED;
|
|
||||||
|
|
||||||
if (!gst_buffer_pool_is_active (pool)) {
|
|
||||||
if (!gst_buffer_pool_set_active (pool, TRUE)) {
|
|
||||||
GST_ELEMENT_ERROR (mix, RESOURCE, SETTINGS,
|
|
||||||
("failed to activate bufferpool"), ("failed to activate bufferpool"));
|
|
||||||
return GST_FLOW_ERROR;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = gst_buffer_pool_acquire_buffer (pool, outbuf, NULL);
|
|
||||||
gst_object_unref (pool);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_mixer_create_fbo (GstGLContext * context, GstGLMixer * mix)
|
_mixer_create_fbo (GstGLContext * context, GstGLMixer * mix)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue