mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
glbasemixer: Remove own decide_allocation, use GstAggregator's
https://bugzilla.gnome.org/show_bug.cgi?id=746529
This commit is contained in:
parent
d3c2ccb3dd
commit
9897c5c80d
3 changed files with 11 additions and 10 deletions
|
@ -455,15 +455,10 @@ static gboolean
|
|||
gst_gl_base_mixer_decide_allocation (GstAggregator * agg, GstQuery * query)
|
||||
{
|
||||
GstGLBaseMixer *mix = GST_GL_BASE_MIXER (agg);
|
||||
GstGLBaseMixerClass *mix_class = GST_GL_BASE_MIXER_GET_CLASS (mix);
|
||||
|
||||
if (!_get_gl_context (mix))
|
||||
return FALSE;
|
||||
|
||||
if (mix_class->decide_allocation)
|
||||
if (!mix_class->decide_allocation (mix, query))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -92,7 +92,6 @@ struct _GstGLBaseMixerClass
|
|||
GstGLAPI supported_gl_api;
|
||||
|
||||
gboolean (*propose_allocation) (GstGLBaseMixer * mix, GstGLBaseMixerPad * pad, GstQuery * decide_query, GstQuery *query);
|
||||
gboolean (*decide_allocation) (GstGLBaseMixer * mix, GstQuery * decide_query);
|
||||
|
||||
gpointer _padding[GST_PADDING];
|
||||
};
|
||||
|
|
|
@ -334,7 +334,7 @@ static void gst_gl_mixer_set_property (GObject * object, guint prop_id,
|
|||
static void gst_gl_mixer_get_property (GObject * object, guint prop_id,
|
||||
GValue * value, GParamSpec * pspec);
|
||||
|
||||
static gboolean gst_gl_mixer_decide_allocation (GstGLBaseMixer * mix,
|
||||
static gboolean gst_gl_mixer_decide_allocation (GstAggregator * agg,
|
||||
GstQuery * query);
|
||||
|
||||
static void gst_gl_mixer_finalize (GObject * object);
|
||||
|
@ -367,12 +367,12 @@ gst_gl_mixer_class_init (GstGLMixerClass * klass)
|
|||
agg_class->stop = gst_gl_mixer_stop;
|
||||
agg_class->start = gst_gl_mixer_start;
|
||||
agg_class->negotiated_src_caps = _negotiated_caps;
|
||||
agg_class->decide_allocation = gst_gl_mixer_decide_allocation;
|
||||
|
||||
videoaggregator_class->aggregate_frames = gst_gl_mixer_aggregate_frames;
|
||||
videoaggregator_class->find_best_format = _find_best_format;
|
||||
|
||||
mix_class->propose_allocation = gst_gl_mixer_propose_allocation;
|
||||
mix_class->decide_allocation = gst_gl_mixer_decide_allocation;
|
||||
|
||||
/* Register the pad class */
|
||||
g_type_class_ref (GST_TYPE_GL_MIXER_PAD);
|
||||
|
@ -475,17 +475,24 @@ _mixer_create_fbo (GstGLContext * context, GstGLMixer * mix)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_gl_mixer_decide_allocation (GstGLBaseMixer * base_mix, GstQuery * query)
|
||||
gst_gl_mixer_decide_allocation (GstAggregator * agg, GstQuery * query)
|
||||
{
|
||||
GstGLBaseMixer *base_mix = GST_GL_BASE_MIXER (agg);
|
||||
GstGLMixer *mix = GST_GL_MIXER (base_mix);
|
||||
GstGLMixerClass *mixer_class = GST_GL_MIXER_GET_CLASS (mix);
|
||||
GstGLContext *context = base_mix->context;
|
||||
GstGLContext *context;
|
||||
GstBufferPool *pool = NULL;
|
||||
GstStructure *config;
|
||||
GstCaps *caps;
|
||||
guint min, max, size;
|
||||
gboolean update_pool;
|
||||
|
||||
if (!GST_AGGREGATOR_CLASS (gst_gl_mixer_parent_class)->decide_allocation (agg,
|
||||
query))
|
||||
return FALSE;
|
||||
|
||||
context = base_mix->context;
|
||||
|
||||
g_mutex_lock (&mix->priv->gl_resource_lock);
|
||||
mix->priv->gl_resource_ready = FALSE;
|
||||
if (mix->fbo)
|
||||
|
|
Loading…
Reference in a new issue