mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 04:00:37 +00:00
gl: use new gst_element_foreach_sink_pad()
Instead of gst_aggregator_iterate_sinkpads() which will soon be removed. https://bugzilla.gnome.org/show_bug.cgi?id=785679
This commit is contained in:
parent
a534d8d74c
commit
77277c46f9
2 changed files with 9 additions and 10 deletions
|
@ -561,12 +561,12 @@ context_error:
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
_upload_frames (GstAggregator * agg, GstAggregatorPad * agg_pad,
|
gst_gl_mixer_upload_frames (GstElement * element, GstPad * sink_pad,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GstVideoAggregatorPad *vaggpad = GST_VIDEO_AGGREGATOR_PAD (agg_pad);
|
GstVideoAggregatorPad *vaggpad = GST_VIDEO_AGGREGATOR_PAD (sink_pad);
|
||||||
GstGLMixerPad *pad = GST_GL_MIXER_PAD (agg_pad);
|
GstGLMixerPad *pad = GST_GL_MIXER_PAD (sink_pad);
|
||||||
GstGLMixer *mix = GST_GL_MIXER (agg);
|
GstGLMixer *mix = GST_GL_MIXER (element);
|
||||||
|
|
||||||
pad->current_texture = 0;
|
pad->current_texture = 0;
|
||||||
if (vaggpad->buffer != NULL) {
|
if (vaggpad->buffer != NULL) {
|
||||||
|
@ -585,7 +585,7 @@ _upload_frames (GstAggregator * agg, GstAggregatorPad * agg_pad,
|
||||||
|
|
||||||
if (!gst_video_frame_map (&gl_frame, &gl_info, vaggpad->buffer,
|
if (!gst_video_frame_map (&gl_frame, &gl_info, vaggpad->buffer,
|
||||||
GST_MAP_READ | GST_MAP_GL)) {
|
GST_MAP_READ | GST_MAP_GL)) {
|
||||||
GST_ERROR_OBJECT (agg_pad, "Failed to map input frame");
|
GST_ERROR_OBJECT (pad, "Failed to map input frame");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -615,8 +615,8 @@ gst_gl_mixer_process_textures (GstGLMixer * mix, GstBuffer * outbuf)
|
||||||
|
|
||||||
out_tex = (GstGLMemory *) out_frame.map[0].memory;
|
out_tex = (GstGLMemory *) out_frame.map[0].memory;
|
||||||
|
|
||||||
if (!gst_aggregator_iterate_sinkpads (GST_AGGREGATOR (mix),
|
if (!gst_element_foreach_sink_pad (GST_ELEMENT_CAST (mix),
|
||||||
(GstAggregatorPadForeachFunc) _upload_frames, NULL)) {
|
gst_gl_mixer_upload_frames, NULL)) {
|
||||||
res = FALSE;
|
res = FALSE;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1095,7 +1095,7 @@ _fixate_caps (GstAggregator * agg, GstCaps * caps)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
_reset_pad_gl (GstAggregator * agg, GstAggregatorPad * aggpad, gpointer udata)
|
_reset_pad_gl (GstElement * agg, GstPad * aggpad, gpointer udata)
|
||||||
{
|
{
|
||||||
const GstGLFuncs *gl = GST_GL_BASE_MIXER (agg)->context->gl_vtable;
|
const GstGLFuncs *gl = GST_GL_BASE_MIXER (agg)->context->gl_vtable;
|
||||||
GstGLVideoMixerPad *pad = GST_GL_VIDEO_MIXER_PAD (aggpad);
|
GstGLVideoMixerPad *pad = GST_GL_VIDEO_MIXER_PAD (aggpad);
|
||||||
|
@ -1128,8 +1128,7 @@ _reset_gl (GstGLContext * context, GstGLVideoMixer * video_mixer)
|
||||||
video_mixer->checker_vbo = 0;
|
video_mixer->checker_vbo = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_aggregator_iterate_sinkpads (GST_AGGREGATOR (video_mixer), _reset_pad_gl,
|
gst_element_foreach_sink_pad (GST_ELEMENT (video_mixer), _reset_pad_gl, NULL);
|
||||||
NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue