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/videomeasure | |
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/videomeasure')
-rw-r--r-- | gst/videomeasure/gstvideomeasure_ssim.c | 43 | ||||
-rw-r--r-- | gst/videomeasure/gstvideomeasure_ssim.h | 4 |
2 files changed, 23 insertions, 24 deletions
diff --git a/gst/videomeasure/gstvideomeasure_ssim.c b/gst/videomeasure/gstvideomeasure_ssim.c index 9242c002c..3a354bd67 100644 --- a/gst/videomeasure/gstvideomeasure_ssim.c +++ b/gst/videomeasure/gstvideomeasure_ssim.c @@ -114,7 +114,7 @@ static void gst_ssim_release_pad (GstElement * element, GstPad * pad); static GstStateChangeReturn gst_ssim_change_state (GstElement * element, GstStateChange transition); -static GstFlowReturn gst_ssim_collected (GstCollectPads * pads, +static GstFlowReturn gst_ssim_collected (GstCollectPads2 * pads, gpointer user_data); static GstElementClass *parent_class = NULL; @@ -901,7 +901,7 @@ gst_ssim_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 (ssim->collect, TRUE); + gst_collect_pads2_set_flushing (ssim->collect, TRUE); /* flushing seek, start flush downstream, the flush will be done * when all pads received a FLUSH_STOP. */ @@ -991,7 +991,7 @@ gst_ssim_sink_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 */ GST_DEBUG ("Dispatching %s event on pad %s:%s", GST_EVENT_TYPE_NAME (event), GST_DEBUG_PAD_NAME (pad)); ret = ssim->collect_event (pad, event); @@ -1158,11 +1158,10 @@ gst_ssim_request_new_pad (GstElement * element, GstPadTemplate * templ, gst_pad_set_getcaps_function (newpad, GST_DEBUG_FUNCPTR (gst_ssim_sink_getcaps)); gst_pad_set_setcaps_function (newpad, GST_DEBUG_FUNCPTR (gst_ssim_setcaps)); - gst_collect_pads_add_pad (ssim->collect, newpad, sizeof (GstCollectData), - NULL); + gst_collect_pads2_add_pad (ssim->collect, newpad, sizeof (GstCollectData2)); /* FIXME: hacked way to override/extend the event function of - * GstCollectPads; because it sets its own event function giving the + * GstCollectPads2; because it sets its own event function giving the * element no access to events */ GST_DEBUG_OBJECT (ssim, "Current collect_event is %p, changing to %p", @@ -1234,7 +1233,7 @@ could_not_add_src: could_not_add_sink: { GST_DEBUG_OBJECT (ssim, "could not add sink pad"); - gst_collect_pads_remove_pad (ssim->collect, newpad); + gst_collect_pads2_remove_pad (ssim->collect, newpad); gst_object_unref (newpad); return NULL; } @@ -1249,7 +1248,7 @@ gst_ssim_release_pad (GstElement * element, GstPad * pad) GST_DEBUG_OBJECT (ssim, "release pad %s:%s", GST_DEBUG_PAD_NAME (pad)); - gst_collect_pads_remove_pad (ssim->collect, pad); + gst_collect_pads2_remove_pad (ssim->collect, pad); gst_element_remove_pad (element, pad); } @@ -1268,8 +1267,8 @@ gst_ssim_init (GstSSim * ssim) ssim->sinkcaps = NULL; /* keep track of the sinkpads requested */ - ssim->collect = gst_collect_pads_new (); - gst_collect_pads_set_function (ssim->collect, + ssim->collect = gst_collect_pads2_new (); + gst_collect_pads2_set_function (ssim->collect, GST_DEBUG_FUNCPTR (gst_ssim_collected), ssim); } @@ -1408,7 +1407,7 @@ gst_ssim_regenerate_windows (GstSSim * ssim) } static GstFlowReturn -gst_ssim_collected (GstCollectPads * pads, gpointer user_data) +gst_ssim_collected (GstCollectPads2 * pads, gpointer user_data) { GstSSim *ssim; GSList *collected; @@ -1441,12 +1440,12 @@ gst_ssim_collected (GstCollectPads * pads, gpointer user_data) } for (collected = pads->data; collected; collected = g_slist_next (collected)) { - GstCollectData *collect_data; + GstCollectData2 *collect_data; GstBuffer *inbuf; - collect_data = (GstCollectData *) collected->data; + collect_data = (GstCollectData2 *) collected->data; - inbuf = gst_collect_pads_peek (pads, collect_data); + inbuf = gst_collect_pads2_peek (pads, collect_data); if (inbuf == NULL) { GST_LOG_OBJECT (ssim, "channel %p: no bytes available", collect_data); @@ -1470,12 +1469,12 @@ gst_ssim_collected (GstCollectPads * pads, gpointer user_data) for (collected = pads->data; collected; collected = g_slist_next (collected)) { - GstCollectData *collect_data; + GstCollectData2 *collect_data; - collect_data = (GstCollectData *) collected->data; + collect_data = (GstCollectData2 *) collected->data; if (collect_data->pad == ssim->orig) { - orgbuf = gst_collect_pads_pop (pads, collect_data);; + orgbuf = gst_collect_pads2_pop (pads, collect_data);; GST_DEBUG_OBJECT (ssim, "Original stream - flags(0x%x), timestamp(%" GST_TIME_FORMAT "), duration(%" GST_TIME_FORMAT ")", @@ -1492,14 +1491,14 @@ gst_ssim_collected (GstCollectPads * pads, gpointer user_data) GST_LOG_OBJECT (ssim, "starting to cycle through streams"); for (collected = pads->data; collected; collected = g_slist_next (collected)) { - GstCollectData *collect_data; + GstCollectData2 *collect_data; GstBuffer *inbuf; guint8 *indata; - collect_data = (GstCollectData *) collected->data; + collect_data = (GstCollectData2 *) collected->data; if (collect_data->pad != ssim->orig) { - inbuf = gst_collect_pads_pop (pads, collect_data); + inbuf = gst_collect_pads2_pop (pads, collect_data); indata = GST_BUFFER_DATA (inbuf); @@ -1660,7 +1659,7 @@ gst_ssim_change_state (GstElement * element, GstStateChange transition) ssim->segment_position = 0; ssim->segment_rate = 1.0; gst_segment_init (&ssim->segment, GST_FORMAT_UNDEFINED); - gst_collect_pads_start (ssim->collect); + gst_collect_pads2_start (ssim->collect); break; case GST_STATE_CHANGE_PAUSED_TO_PLAYING: break; @@ -1668,7 +1667,7 @@ gst_ssim_change_state (GstElement * element, GstStateChange transition) /* need to unblock the collectpads before calling the * parent change_state so that streaming can finish */ - gst_collect_pads_stop (ssim->collect); + gst_collect_pads2_stop (ssim->collect); break; default: break; diff --git a/gst/videomeasure/gstvideomeasure_ssim.h b/gst/videomeasure/gstvideomeasure_ssim.h index 57e0907fb..2760d032a 100644 --- a/gst/videomeasure/gstvideomeasure_ssim.h +++ b/gst/videomeasure/gstvideomeasure_ssim.h @@ -21,7 +21,7 @@ #define __GST_SSIM_H__
#include <gst/gst.h>
-#include <gst/base/gstcollectpads.h>
+#include <gst/base/gstcollectpads2.h>
#include <gst/video/video.h>
G_BEGIN_DECLS
@@ -85,7 +85,7 @@ struct _GstSSim { gint padcount;
- GstCollectPads *collect;
+ GstCollectPads2 *collect;
GstPad *orig;
gint frame_rate;
|