diff options
author | Edward Hervey <edward.hervey@collabora.co.uk> | 2011-12-30 11:41:17 +0100 |
---|---|---|
committer | Edward Hervey <edward.hervey@collabora.co.uk> | 2011-12-30 11:41:17 +0100 |
commit | f70a623418a52eada0278002f8d266d49957b3d5 (patch) | |
tree | fc54fd9fab400e886b11a9a2b313478b66dd7969 /gst/frei0r | |
parent | d5aaefa59f9ef4153644a2aa254c39a3a9d108e3 (diff) | |
parent | d465188879cd4dd0735e3fbcaeb83d98f217ed88 (diff) | |
download | gstreamer-plugins-bad-f70a623418a52eada0278002f8d266d49957b3d5.tar.gz |
Merge remote-tracking branch 'origin/master' into 0.11-premerge
Conflicts:
docs/libs/Makefile.am
ext/kate/gstkatetiger.c
ext/opus/gstopusdec.c
ext/xvid/gstxvidenc.c
gst-libs/gst/basecamerabinsrc/Makefile.am
gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.c
gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.h
gst-libs/gst/video/gstbasevideocodec.c
gst-libs/gst/video/gstbasevideocodec.h
gst-libs/gst/video/gstbasevideodecoder.c
gst-libs/gst/video/gstbasevideoencoder.c
gst/asfmux/gstasfmux.c
gst/audiovisualizers/gstwavescope.c
gst/camerabin2/gstcamerabin2.c
gst/debugutils/gstcompare.c
gst/frei0r/gstfrei0rmixer.c
gst/mpegpsmux/mpegpsmux.c
gst/mpegtsmux/mpegtsmux.c
gst/mxf/mxfmux.c
gst/videomeasure/gstvideomeasure_ssim.c
gst/videoparsers/gsth264parse.c
gst/videoparsers/gstmpeg4videoparse.c
Diffstat (limited to 'gst/frei0r')
-rw-r--r-- | gst/frei0r/gstfrei0rmixer.c | 42 | ||||
-rw-r--r-- | gst/frei0r/gstfrei0rmixer.h | 4 |
2 files changed, 25 insertions, 21 deletions
diff --git a/gst/frei0r/gstfrei0rmixer.c b/gst/frei0r/gstfrei0rmixer.c index c337e07aa..fd8ff7e60 100644 --- a/gst/frei0r/gstfrei0rmixer.c +++ b/gst/frei0r/gstfrei0rmixer.c @@ -120,7 +120,7 @@ gst_frei0r_mixer_change_state (GstElement * element, GstStateChange transition) case GST_STATE_CHANGE_NULL_TO_READY: break; case GST_STATE_CHANGE_READY_TO_PAUSED: - gst_collect_pads_start (self->collect); + gst_collect_pads2_start (self->collect); break; case GST_STATE_CHANGE_PAUSED_TO_PLAYING: break; @@ -129,11 +129,11 @@ gst_frei0r_mixer_change_state (GstElement * element, GstStateChange transition) } /* Stop before calling the parent's state change function as - * GstCollectPads might take locks and we would deadlock in that + * GstCollectPads2 might take locks and we would deadlock in that * case */ if (transition == GST_STATE_CHANGE_PAUSED_TO_READY) - gst_collect_pads_stop (self->collect); + gst_collect_pads2_stop (self->collect); ret = GST_ELEMENT_CLASS (g_type_class_peek_parent (klass))->change_state @@ -488,7 +488,7 @@ gst_frei0r_mixer_src_event (GstPad * pad, GstEvent * event) /* check if we are flushing */ if (flags & GST_SEEK_FLAG_FLUSH) { /* make sure we accept nothing anymore and return WRONG_STATE */ - gst_collect_pads_set_flushing (self->collect, TRUE); + gst_collect_pads2_set_flushing (self->collect, TRUE); /* flushing seek, start flush downstream, the flush will be done * when all pads received a FLUSH_STOP. */ @@ -532,7 +532,7 @@ gst_frei0r_mixer_sink0_event (GstPad * pad, GstEvent * event) break; } - /* now GstCollectPads can take care of the rest, e.g. EOS */ + /* now GstCollectPads2 can take care of the rest, e.g. EOS */ ret = self->collect_event (pad, event); gst_object_unref (self); @@ -541,7 +541,7 @@ gst_frei0r_mixer_sink0_event (GstPad * pad, GstEvent * event) } static GstFlowReturn -gst_frei0r_mixer_collected (GstCollectPads * pads, GstFrei0rMixer * self) +gst_frei0r_mixer_collected (GstCollectPads2 * pads, GstFrei0rMixer * self) { GstBuffer *inbuf0 = NULL, *inbuf1 = NULL, *inbuf2 = NULL; GstBuffer *outbuf = NULL; @@ -575,15 +575,15 @@ gst_frei0r_mixer_collected (GstCollectPads * pads, GstFrei0rMixer * self) return ret; for (l = pads->data; l; l = l->next) { - GstCollectData *cdata = l->data; + GstCollectData2 *cdata = l->data; if (cdata->pad == self->sink0) { - inbuf0 = gst_collect_pads_pop (pads, cdata); + inbuf0 = gst_collect_pads2_pop (pads, cdata); segment = &cdata->segment; } else if (cdata->pad == self->sink1) { - inbuf1 = gst_collect_pads_pop (pads, cdata); + inbuf1 = gst_collect_pads2_pop (pads, cdata); } else if (cdata->pad == self->sink2) { - inbuf2 = gst_collect_pads_pop (pads, cdata); + inbuf2 = gst_collect_pads2_pop (pads, cdata); } } @@ -675,22 +675,26 @@ gst_frei0r_mixer_class_init (GstFrei0rMixerClass * klass, gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, gst_caps_ref (caps)); gst_element_class_add_pad_template (gstelement_class, templ); + gst_object_unref (templ); templ = gst_pad_template_new ("sink_0", GST_PAD_SINK, GST_PAD_ALWAYS, gst_caps_ref (caps)); gst_element_class_add_pad_template (gstelement_class, templ); + gst_object_unref (templ); templ = gst_pad_template_new ("sink_1", GST_PAD_SINK, GST_PAD_ALWAYS, gst_caps_ref (caps)); gst_element_class_add_pad_template (gstelement_class, templ); + gst_object_unref (templ); if (klass->info->plugin_type == F0R_PLUGIN_TYPE_MIXER3) { templ = gst_pad_template_new ("sink_2", GST_PAD_SINK, GST_PAD_ALWAYS, gst_caps_ref (caps)); gst_element_class_add_pad_template (gstelement_class, templ); + gst_object_unref (templ); } gst_caps_unref (caps); @@ -704,9 +708,9 @@ gst_frei0r_mixer_init (GstFrei0rMixer * self, GstFrei0rMixerClass * klass) self->property_cache = gst_frei0r_property_cache_init (klass->properties, klass->n_properties); - self->collect = gst_collect_pads_new (); - gst_collect_pads_set_function (self->collect, - (GstCollectPadsFunction) gst_frei0r_mixer_collected, self); + self->collect = gst_collect_pads2_new (); + gst_collect_pads2_set_function (self->collect, + (GstCollectPads2Function) gst_frei0r_mixer_collected, self); self->src = gst_pad_new_from_template (gst_element_class_get_pad_template @@ -730,8 +734,8 @@ gst_frei0r_mixer_init (GstFrei0rMixer * self, GstFrei0rMixerClass * klass) GST_DEBUG_FUNCPTR (gst_frei0r_mixer_set_caps)); gst_pad_set_query_function (self->sink0, GST_DEBUG_FUNCPTR (gst_frei0r_mixer_sink_query)); - gst_collect_pads_add_pad (self->collect, self->sink0, - sizeof (GstCollectData), NULL); + gst_collect_pads2_add_pad (self->collect, self->sink0, + sizeof (GstCollectData2)); self->collect_event = (GstPadEventFunction) GST_PAD_EVENTFUNC (self->sink0); gst_pad_set_event_function (self->sink0, GST_DEBUG_FUNCPTR (gst_frei0r_mixer_sink0_event)); @@ -746,8 +750,8 @@ gst_frei0r_mixer_init (GstFrei0rMixer * self, GstFrei0rMixerClass * klass) GST_DEBUG_FUNCPTR (gst_frei0r_mixer_set_caps)); gst_pad_set_query_function (self->sink0, GST_DEBUG_FUNCPTR (gst_frei0r_mixer_sink_query)); - gst_collect_pads_add_pad (self->collect, self->sink1, - sizeof (GstCollectData), NULL); + gst_collect_pads2_add_pad (self->collect, self->sink1, + sizeof (GstCollectData2)); gst_element_add_pad (GST_ELEMENT_CAST (self), self->sink1); if (klass->info->plugin_type == F0R_PLUGIN_TYPE_MIXER3) { @@ -760,8 +764,8 @@ gst_frei0r_mixer_init (GstFrei0rMixer * self, GstFrei0rMixerClass * klass) GST_DEBUG_FUNCPTR (gst_frei0r_mixer_set_caps)); gst_pad_set_query_function (self->sink0, GST_DEBUG_FUNCPTR (gst_frei0r_mixer_sink_query)); - gst_collect_pads_add_pad (self->collect, self->sink2, - sizeof (GstCollectData), NULL); + gst_collect_pads2_add_pad (self->collect, self->sink2, + sizeof (GstCollectData2)); gst_element_add_pad (GST_ELEMENT_CAST (self), self->sink2); } diff --git a/gst/frei0r/gstfrei0rmixer.h b/gst/frei0r/gstfrei0rmixer.h index 7cb66005e..19bb2d987 100644 --- a/gst/frei0r/gstfrei0rmixer.h +++ b/gst/frei0r/gstfrei0rmixer.h @@ -22,7 +22,7 @@ #include <gst/gst.h> #include <gst/video/video.h> -#include <gst/base/gstcollectpads.h> +#include <gst/base/gstcollectpads2.h> #include "frei0r.h" #include "gstfrei0r.h" @@ -42,7 +42,7 @@ typedef struct _GstFrei0rMixerClass GstFrei0rMixerClass; struct _GstFrei0rMixer { GstElement parent; - GstCollectPads *collect; + GstCollectPads2 *collect; GstPad *src; GstPad *sink0, *sink1, *sink2; |