summaryrefslogtreecommitdiff
path: root/ext/gl
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2017-11-02 12:17:38 +0000
committerTim-Philipp Müller <tim@centricular.com>2017-12-09 19:32:30 +0000
commit77277c46f999e276008066c748cf84948487e7b1 (patch)
tree2497f30f63fddf601ae6273b4ad7cb4297c53ce1 /ext/gl
parenta534d8d74cffd53aaa92984925963f26ebc0ab2f (diff)
downloadgstreamer-plugins-base-77277c46f999e276008066c748cf84948487e7b1.tar.gz
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
Diffstat (limited to 'ext/gl')
-rw-r--r--ext/gl/gstglmixer.c14
-rw-r--r--ext/gl/gstglvideomixer.c5
2 files changed, 9 insertions, 10 deletions
diff --git a/ext/gl/gstglmixer.c b/ext/gl/gstglmixer.c
index a4742a6d3..06b50134c 100644
--- a/ext/gl/gstglmixer.c
+++ b/ext/gl/gstglmixer.c
@@ -561,12 +561,12 @@ context_error:
}
static gboolean
-_upload_frames (GstAggregator * agg, GstAggregatorPad * agg_pad,
+gst_gl_mixer_upload_frames (GstElement * element, GstPad * sink_pad,
gpointer user_data)
{
- GstVideoAggregatorPad *vaggpad = GST_VIDEO_AGGREGATOR_PAD (agg_pad);
- GstGLMixerPad *pad = GST_GL_MIXER_PAD (agg_pad);
- GstGLMixer *mix = GST_GL_MIXER (agg);
+ GstVideoAggregatorPad *vaggpad = GST_VIDEO_AGGREGATOR_PAD (sink_pad);
+ GstGLMixerPad *pad = GST_GL_MIXER_PAD (sink_pad);
+ GstGLMixer *mix = GST_GL_MIXER (element);
pad->current_texture = 0;
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,
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;
}
@@ -615,8 +615,8 @@ gst_gl_mixer_process_textures (GstGLMixer * mix, GstBuffer * outbuf)
out_tex = (GstGLMemory *) out_frame.map[0].memory;
- if (!gst_aggregator_iterate_sinkpads (GST_AGGREGATOR (mix),
- (GstAggregatorPadForeachFunc) _upload_frames, NULL)) {
+ if (!gst_element_foreach_sink_pad (GST_ELEMENT_CAST (mix),
+ gst_gl_mixer_upload_frames, NULL)) {
res = FALSE;
goto out;
}
diff --git a/ext/gl/gstglvideomixer.c b/ext/gl/gstglvideomixer.c
index 1bef5fd7d..91e5ad263 100644
--- a/ext/gl/gstglvideomixer.c
+++ b/ext/gl/gstglvideomixer.c
@@ -1095,7 +1095,7 @@ _fixate_caps (GstAggregator * agg, GstCaps * caps)
}
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;
GstGLVideoMixerPad *pad = GST_GL_VIDEO_MIXER_PAD (aggpad);
@@ -1128,8 +1128,7 @@ _reset_gl (GstGLContext * context, GstGLVideoMixer * video_mixer)
video_mixer->checker_vbo = 0;
}
- gst_aggregator_iterate_sinkpads (GST_AGGREGATOR (video_mixer), _reset_pad_gl,
- NULL);
+ gst_element_foreach_sink_pad (GST_ELEMENT (video_mixer), _reset_pad_gl, NULL);
}
static void