mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
collectpads2: rename to collectpads
This commit is contained in:
parent
156d80d74b
commit
6578797245
17 changed files with 135 additions and 135 deletions
|
@ -335,9 +335,9 @@ gst_asf_mux_init (GstAsfMux * asfmux)
|
|||
gst_pad_use_fixed_caps (asfmux->srcpad);
|
||||
gst_element_add_pad (GST_ELEMENT (asfmux), asfmux->srcpad);
|
||||
|
||||
asfmux->collect = gst_collect_pads2_new ();
|
||||
gst_collect_pads2_set_function (asfmux->collect,
|
||||
(GstCollectPads2Function) GST_DEBUG_FUNCPTR (gst_asf_mux_collected),
|
||||
asfmux->collect = gst_collect_pads_new ();
|
||||
gst_collect_pads_set_function (asfmux->collect,
|
||||
(GstCollectPadsFunction) GST_DEBUG_FUNCPTR (gst_asf_mux_collected),
|
||||
asfmux);
|
||||
|
||||
asfmux->payloads = NULL;
|
||||
|
@ -1851,7 +1851,7 @@ gst_asf_mux_process_buffer (GstAsfMux * asfmux, GstAsfPad * pad,
|
|||
AsfPayload *payload;
|
||||
|
||||
payload = g_malloc0 (sizeof (AsfPayload));
|
||||
payload->pad = (GstCollectData2 *) pad;
|
||||
payload->pad = (GstCollectData *) pad;
|
||||
payload->data = buf;
|
||||
|
||||
GST_LOG_OBJECT (asfmux,
|
||||
|
@ -1911,7 +1911,7 @@ gst_asf_mux_process_buffer (GstAsfMux * asfmux, GstAsfPad * pad,
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_asf_mux_collected (GstCollectPads2 * collect, gpointer data)
|
||||
gst_asf_mux_collected (GstCollectPads * collect, gpointer data)
|
||||
{
|
||||
GstAsfMux *asfmux = GST_ASF_MUX_CAST (data);
|
||||
GstFlowReturn ret = GST_FLOW_OK;
|
||||
|
@ -1937,15 +1937,15 @@ gst_asf_mux_collected (GstCollectPads2 * collect, gpointer data)
|
|||
walk = asfmux->collect->data;
|
||||
while (walk) {
|
||||
GstAsfPad *pad;
|
||||
GstCollectData2 *data;
|
||||
GstCollectData *data;
|
||||
GstClockTime time;
|
||||
|
||||
data = (GstCollectData2 *) walk->data;
|
||||
data = (GstCollectData *) walk->data;
|
||||
pad = (GstAsfPad *) data;
|
||||
|
||||
walk = g_slist_next (walk);
|
||||
|
||||
buf = gst_collect_pads2_peek (collect, data);
|
||||
buf = gst_collect_pads_peek (collect, data);
|
||||
if (buf == NULL) {
|
||||
GST_LOG_OBJECT (asfmux, "Pad %s has no buffers",
|
||||
GST_PAD_NAME (pad->collect.pad));
|
||||
|
@ -1980,7 +1980,7 @@ gst_asf_mux_collected (GstCollectPads2 * collect, gpointer data)
|
|||
/* we have data */
|
||||
GST_LOG_OBJECT (asfmux, "selected pad %s with time %" GST_TIME_FORMAT,
|
||||
GST_PAD_NAME (best_pad->collect.pad), GST_TIME_ARGS (best_time));
|
||||
buf = gst_collect_pads2_pop (collect, &best_pad->collect);
|
||||
buf = gst_collect_pads_pop (collect, &best_pad->collect);
|
||||
ret = gst_asf_mux_process_buffer (asfmux, best_pad, buf);
|
||||
} else {
|
||||
/* no data, let's finish it up */
|
||||
|
@ -2279,8 +2279,8 @@ gst_asf_mux_request_new_pad (GstElement * element,
|
|||
collect_size = sizeof (GstAsfVideoPad);
|
||||
}
|
||||
collect_pad = (GstAsfPad *)
|
||||
gst_collect_pads2_add_pad_full (asfmux->collect, newpad, collect_size,
|
||||
(GstCollectData2DestroyNotify) (gst_asf_mux_pad_reset), TRUE);
|
||||
gst_collect_pads_add_pad_full (asfmux->collect, newpad, collect_size,
|
||||
(GstCollectDataDestroyNotify) (gst_asf_mux_pad_reset), TRUE);
|
||||
|
||||
/* set up pad */
|
||||
collect_pad->is_audio = is_audio;
|
||||
|
@ -2294,7 +2294,7 @@ gst_asf_mux_request_new_pad (GstElement * element,
|
|||
collect_pad->stream_number = asfmux->stream_number;
|
||||
|
||||
/* FIXME: hacked way to override/extend the event function of
|
||||
* GstCollectPads2; because it sets its own event function giving
|
||||
* GstCollectPads; because it sets its own event function giving
|
||||
* the element no access to events.
|
||||
*/
|
||||
asfmux->collect_event = (GstPadEventFunction) GST_PAD_EVENTFUNC (newpad);
|
||||
|
@ -2391,12 +2391,12 @@ gst_asf_mux_change_state (GstElement * element, GstStateChange transition)
|
|||
asfmux->packet_size = asfmux->prop_packet_size;
|
||||
asfmux->preroll = asfmux->prop_preroll;
|
||||
asfmux->merge_stream_tags = asfmux->prop_merge_stream_tags;
|
||||
gst_collect_pads2_start (asfmux->collect);
|
||||
gst_collect_pads_start (asfmux->collect);
|
||||
break;
|
||||
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
||||
break;
|
||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||
gst_collect_pads2_stop (asfmux->collect);
|
||||
gst_collect_pads_stop (asfmux->collect);
|
||||
asfmux->state = GST_ASF_MUX_STATE_NONE;
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
|
||||
#include <gst/gst.h>
|
||||
#include <gst/base/gstcollectpads2.h>
|
||||
#include <gst/base/gstcollectpads.h>
|
||||
#include <gst/riff/riff-media.h>
|
||||
|
||||
#include "gstasfobjects.h"
|
||||
|
@ -57,7 +57,7 @@ enum _GstAsfMuxState
|
|||
|
||||
struct _GstAsfPad
|
||||
{
|
||||
GstCollectData2 collect;
|
||||
GstCollectData collect;
|
||||
|
||||
gboolean is_audio;
|
||||
guint8 stream_number;
|
||||
|
@ -143,7 +143,7 @@ struct _GstAsfMux
|
|||
/* pads */
|
||||
GstPad *srcpad;
|
||||
|
||||
GstCollectPads2 *collect;
|
||||
GstCollectPads *collect;
|
||||
GstPadEventFunction collect_event;
|
||||
};
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <glib.h>
|
||||
#include <gst/gst.h>
|
||||
#include <gst/base/gstbytereader.h>
|
||||
#include <gst/base/gstcollectpads2.h>
|
||||
#include <gst/base/gstcollectpads.h>
|
||||
|
||||
#define ASF_PAYLOAD_IS_KEYFRAME(pay) ((pay->stream_number & 0x80) != 0)
|
||||
#define ASF_MILI_TO_100NANO(v) (v * 10000)
|
||||
|
@ -75,7 +75,7 @@ typedef struct _AsfPayload
|
|||
guint32 presentation_time;
|
||||
GstBuffer *data;
|
||||
|
||||
GstCollectData2 *pad;
|
||||
GstCollectData *pad;
|
||||
|
||||
/* simple index info */
|
||||
gboolean has_packet_info;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include <string.h>
|
||||
|
||||
#include <gst/gst.h>
|
||||
#include <gst/base/gstcollectpads2.h>
|
||||
#include <gst/base/gstcollectpads.h>
|
||||
#include <gst/video/video.h>
|
||||
|
||||
#include "gstcompare.h"
|
||||
|
@ -110,7 +110,7 @@ static void gst_compare_reset (GstCompare * overlay);
|
|||
|
||||
static gboolean gst_compare_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
static GstFlowReturn gst_compare_collect_pads (GstCollectPads2 * cpads,
|
||||
static GstFlowReturn gst_compare_collect_pads (GstCollectPads * cpads,
|
||||
GstCompare * comp);
|
||||
|
||||
static GstStateChangeReturn gst_compare_change_state (GstElement * element,
|
||||
|
@ -184,9 +184,9 @@ gst_compare_class_init (GstCompareClass * klass)
|
|||
static void
|
||||
gst_compare_init (GstCompare * comp)
|
||||
{
|
||||
comp->cpads = gst_collect_pads2_new ();
|
||||
gst_collect_pads2_set_function (comp->cpads,
|
||||
(GstCollectPads2Function) GST_DEBUG_FUNCPTR (gst_compare_collect_pads),
|
||||
comp->cpads = gst_collect_pads_new ();
|
||||
gst_collect_pads_set_function (comp->cpads,
|
||||
(GstCollectPadsFunction) GST_DEBUG_FUNCPTR (gst_compare_collect_pads),
|
||||
comp);
|
||||
|
||||
comp->sinkpad = gst_pad_new_from_static_template (&sink_factory, "sink");
|
||||
|
@ -198,10 +198,10 @@ gst_compare_init (GstCompare * comp)
|
|||
gst_pad_set_query_function (comp->checkpad, gst_compare_query);
|
||||
gst_element_add_pad (GST_ELEMENT (comp), comp->checkpad);
|
||||
|
||||
gst_collect_pads2_add_pad_full (comp->cpads, comp->sinkpad,
|
||||
sizeof (GstCollectData2), NULL, TRUE);
|
||||
gst_collect_pads2_add_pad_full (comp->cpads, comp->checkpad,
|
||||
sizeof (GstCollectData2), NULL, TRUE);
|
||||
gst_collect_pads_add_pad_full (comp->cpads, comp->sinkpad,
|
||||
sizeof (GstCollectData), NULL, TRUE);
|
||||
gst_collect_pads_add_pad_full (comp->cpads, comp->checkpad,
|
||||
sizeof (GstCollectData), NULL, TRUE);
|
||||
|
||||
comp->srcpad = gst_pad_new_from_static_template (&src_factory, "src");
|
||||
gst_pad_set_query_function (comp->srcpad, gst_compare_query);
|
||||
|
@ -557,16 +557,16 @@ gst_compare_buffers (GstCompare * comp, GstBuffer * buf1, GstCaps * caps1,
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_compare_collect_pads (GstCollectPads2 * cpads, GstCompare * comp)
|
||||
gst_compare_collect_pads (GstCollectPads * cpads, GstCompare * comp)
|
||||
{
|
||||
GstBuffer *buf1, *buf2;
|
||||
GstCaps *caps1, *caps2;
|
||||
|
||||
buf1 = gst_collect_pads2_pop (comp->cpads,
|
||||
buf1 = gst_collect_pads_pop (comp->cpads,
|
||||
gst_pad_get_element_private (comp->sinkpad));
|
||||
caps1 = gst_pad_get_current_caps (comp->sinkpad);
|
||||
|
||||
buf2 = gst_collect_pads2_pop (comp->cpads,
|
||||
buf2 = gst_collect_pads_pop (comp->cpads,
|
||||
gst_pad_get_element_private (comp->checkpad));
|
||||
caps2 = gst_pad_get_current_caps (comp->checkpad);
|
||||
|
||||
|
@ -665,10 +665,10 @@ gst_compare_change_state (GstElement * element, GstStateChange transition)
|
|||
switch (transition) {
|
||||
case GST_STATE_CHANGE_NULL_TO_READY:
|
||||
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
||||
gst_collect_pads2_start (comp->cpads);
|
||||
gst_collect_pads_start (comp->cpads);
|
||||
break;
|
||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||
gst_collect_pads2_stop (comp->cpads);
|
||||
gst_collect_pads_stop (comp->cpads);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -52,7 +52,7 @@ struct _GstCompare {
|
|||
GstPad *sinkpad;
|
||||
GstPad *checkpad;
|
||||
|
||||
GstCollectPads2 *cpads;
|
||||
GstCollectPads *cpads;
|
||||
|
||||
gint count;
|
||||
|
||||
|
|
|
@ -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_pads2_start (self->collect);
|
||||
gst_collect_pads_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
|
||||
* GstCollectPads2 might take locks and we would deadlock in that
|
||||
* GstCollectPads might take locks and we would deadlock in that
|
||||
* case
|
||||
*/
|
||||
if (transition == GST_STATE_CHANGE_PAUSED_TO_READY)
|
||||
gst_collect_pads2_stop (self->collect);
|
||||
gst_collect_pads_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_pads2_set_flushing (self->collect, TRUE);
|
||||
gst_collect_pads_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 GstCollectPads2 can take care of the rest, e.g. EOS */
|
||||
/* now GstCollectPads 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 (GstCollectPads2 * pads, GstFrei0rMixer * self)
|
||||
gst_frei0r_mixer_collected (GstCollectPads * pads, GstFrei0rMixer * self)
|
||||
{
|
||||
GstBuffer *inbuf0 = NULL, *inbuf1 = NULL, *inbuf2 = NULL;
|
||||
GstBuffer *outbuf = NULL;
|
||||
|
@ -575,15 +575,15 @@ gst_frei0r_mixer_collected (GstCollectPads2 * pads, GstFrei0rMixer * self)
|
|||
return ret;
|
||||
|
||||
for (l = pads->data; l; l = l->next) {
|
||||
GstCollectData2 *cdata = l->data;
|
||||
GstCollectData *cdata = l->data;
|
||||
|
||||
if (cdata->pad == self->sink0) {
|
||||
inbuf0 = gst_collect_pads2_pop (pads, cdata);
|
||||
inbuf0 = gst_collect_pads_pop (pads, cdata);
|
||||
segment = &cdata->segment;
|
||||
} else if (cdata->pad == self->sink1) {
|
||||
inbuf1 = gst_collect_pads2_pop (pads, cdata);
|
||||
inbuf1 = gst_collect_pads_pop (pads, cdata);
|
||||
} else if (cdata->pad == self->sink2) {
|
||||
inbuf2 = gst_collect_pads2_pop (pads, cdata);
|
||||
inbuf2 = gst_collect_pads_pop (pads, cdata);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -708,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_pads2_new ();
|
||||
gst_collect_pads2_set_function (self->collect,
|
||||
(GstCollectPads2Function) gst_frei0r_mixer_collected, self);
|
||||
self->collect = gst_collect_pads_new ();
|
||||
gst_collect_pads_set_function (self->collect,
|
||||
(GstCollectPadsFunction) gst_frei0r_mixer_collected, self);
|
||||
|
||||
self->src =
|
||||
gst_pad_new_from_template (gst_element_class_get_pad_template
|
||||
|
@ -734,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_pads2_add_pad (self->collect, self->sink0,
|
||||
sizeof (GstCollectData2));
|
||||
gst_collect_pads_add_pad (self->collect, self->sink0,
|
||||
sizeof (GstCollectData));
|
||||
self->collect_event = (GstPadEventFunction) GST_PAD_EVENTFUNC (self->sink0);
|
||||
gst_pad_set_event_function (self->sink0,
|
||||
GST_DEBUG_FUNCPTR (gst_frei0r_mixer_sink0_event));
|
||||
|
@ -750,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_pads2_add_pad (self->collect, self->sink1,
|
||||
sizeof (GstCollectData2));
|
||||
gst_collect_pads_add_pad (self->collect, self->sink1,
|
||||
sizeof (GstCollectData));
|
||||
gst_element_add_pad (GST_ELEMENT_CAST (self), self->sink1);
|
||||
|
||||
if (klass->info->plugin_type == F0R_PLUGIN_TYPE_MIXER3) {
|
||||
|
@ -764,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_pads2_add_pad (self->collect, self->sink2,
|
||||
sizeof (GstCollectData2));
|
||||
gst_collect_pads_add_pad (self->collect, self->sink2,
|
||||
sizeof (GstCollectData));
|
||||
gst_element_add_pad (GST_ELEMENT_CAST (self), self->sink2);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include <gst/gst.h>
|
||||
#include <gst/video/video.h>
|
||||
#include <gst/base/gstcollectpads2.h>
|
||||
#include <gst/base/gstcollectpads.h>
|
||||
|
||||
#include "frei0r.h"
|
||||
#include "gstfrei0r.h"
|
||||
|
@ -42,7 +42,7 @@ typedef struct _GstFrei0rMixerClass GstFrei0rMixerClass;
|
|||
struct _GstFrei0rMixer {
|
||||
GstElement parent;
|
||||
|
||||
GstCollectPads2 *collect;
|
||||
GstCollectPads *collect;
|
||||
GstPad *src;
|
||||
GstPad *sink0, *sink1, *sink2;
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ static gboolean new_packet_cb (guint8 * data, guint len, void *user_data);
|
|||
static void release_buffer_cb (guint8 * data, void *user_data);
|
||||
|
||||
static gboolean mpegpsdemux_prepare_srcpad (MpegPsMux * mux);
|
||||
static GstFlowReturn mpegpsmux_collected (GstCollectPads2 * pads,
|
||||
static GstFlowReturn mpegpsmux_collected (GstCollectPads * pads,
|
||||
MpegPsMux * mux);
|
||||
static GstPad *mpegpsmux_request_new_pad (GstElement * element,
|
||||
GstPadTemplate * templ, const gchar * name);
|
||||
|
@ -153,9 +153,9 @@ mpegpsmux_init (MpegPsMux * mux, MpegPsMuxClass * g_class)
|
|||
gst_pad_use_fixed_caps (mux->srcpad);
|
||||
gst_element_add_pad (GST_ELEMENT (mux), mux->srcpad);
|
||||
|
||||
mux->collect = gst_collect_pads2_new ();
|
||||
gst_collect_pads2_set_function (mux->collect,
|
||||
(GstCollectPads2Function) GST_DEBUG_FUNCPTR (mpegpsmux_collected), mux);
|
||||
mux->collect = gst_collect_pads_new ();
|
||||
gst_collect_pads_set_function (mux->collect,
|
||||
(GstCollectPadsFunction) GST_DEBUG_FUNCPTR (mpegpsmux_collected), mux);
|
||||
|
||||
mux->psmux = psmux_new ();
|
||||
psmux_set_write_func (mux->psmux, new_packet_cb, mux);
|
||||
|
@ -371,7 +371,7 @@ mpegpsmux_create_streams (MpegPsMux * mux)
|
|||
|
||||
/* Create the streams */
|
||||
while (walk) {
|
||||
GstCollectData2 *c_data = (GstCollectData2 *) walk->data;
|
||||
GstCollectData *c_data = (GstCollectData *) walk->data;
|
||||
MpegPsPadData *ps_data = (MpegPsPadData *) walk->data;
|
||||
|
||||
walk = g_slist_next (walk);
|
||||
|
@ -396,11 +396,11 @@ mpegpsmux_choose_best_stream (MpegPsMux * mux)
|
|||
/* Choose from which stream to mux with */
|
||||
|
||||
MpegPsPadData *best = NULL;
|
||||
GstCollectData2 *c_best = NULL;
|
||||
GstCollectData *c_best = NULL;
|
||||
GSList *walk;
|
||||
|
||||
for (walk = mux->collect->data; walk != NULL; walk = g_slist_next (walk)) {
|
||||
GstCollectData2 *c_data = (GstCollectData2 *) walk->data;
|
||||
GstCollectData *c_data = (GstCollectData *) walk->data;
|
||||
MpegPsPadData *ps_data = (MpegPsPadData *) walk->data;
|
||||
|
||||
if (ps_data->eos == FALSE) {
|
||||
|
@ -408,7 +408,7 @@ mpegpsmux_choose_best_stream (MpegPsMux * mux)
|
|||
GstBuffer *buf;
|
||||
|
||||
ps_data->queued_buf = buf =
|
||||
gst_collect_pads2_peek (mux->collect, c_data);
|
||||
gst_collect_pads_peek (mux->collect, c_data);
|
||||
|
||||
if (buf != NULL) {
|
||||
if (ps_data->prepare_func) {
|
||||
|
@ -469,7 +469,7 @@ mpegpsmux_choose_best_stream (MpegPsMux * mux)
|
|||
}
|
||||
}
|
||||
if (c_best) {
|
||||
gst_buffer_unref (gst_collect_pads2_pop (mux->collect, c_best));
|
||||
gst_buffer_unref (gst_collect_pads_pop (mux->collect, c_best));
|
||||
}
|
||||
|
||||
return best;
|
||||
|
@ -490,7 +490,7 @@ mpegpsmux_push_gop_list (MpegPsMux * mux)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
mpegpsmux_collected (GstCollectPads2 * pads, MpegPsMux * mux)
|
||||
mpegpsmux_collected (GstCollectPads * pads, MpegPsMux * mux)
|
||||
{
|
||||
/* main muxing function */
|
||||
|
||||
|
@ -597,7 +597,7 @@ mpegpsmux_request_new_pad (GstElement * element,
|
|||
|
||||
pad = gst_pad_new_from_template (templ, name);
|
||||
|
||||
pad_data = (MpegPsPadData *) gst_collect_pads2_add_pad (mux->collect, pad,
|
||||
pad_data = (MpegPsPadData *) gst_collect_pads_add_pad (mux->collect, pad,
|
||||
sizeof (MpegPsPadData));
|
||||
if (pad_data == NULL)
|
||||
goto pad_failure;
|
||||
|
@ -614,7 +614,7 @@ mpegpsmux_request_new_pad (GstElement * element,
|
|||
could_not_add:
|
||||
GST_ELEMENT_ERROR (element, STREAM, FAILED,
|
||||
("Internal data stream error."), ("Could not add pad to element"));
|
||||
gst_collect_pads2_remove_pad (mux->collect, pad);
|
||||
gst_collect_pads_remove_pad (mux->collect, pad);
|
||||
gst_object_unref (pad);
|
||||
return NULL;
|
||||
pad_failure:
|
||||
|
@ -649,7 +649,7 @@ mpegpsmux_release_pad (GstElement * element, GstPad * pad)
|
|||
mux->video_stream_id = 0;
|
||||
GST_OBJECT_UNLOCK (pad);
|
||||
|
||||
gst_collect_pads2_remove_pad (mux->collect, pad);
|
||||
gst_collect_pads_remove_pad (mux->collect, pad);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -763,12 +763,12 @@ mpegpsmux_change_state (GstElement * element, GstStateChange transition)
|
|||
case GST_STATE_CHANGE_NULL_TO_READY:
|
||||
break;
|
||||
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
||||
gst_collect_pads2_start (mux->collect);
|
||||
gst_collect_pads_start (mux->collect);
|
||||
break;
|
||||
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
||||
break;
|
||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||
gst_collect_pads2_stop (mux->collect);
|
||||
gst_collect_pads_stop (mux->collect);
|
||||
break;
|
||||
case GST_STATE_CHANGE_READY_TO_NULL:
|
||||
break;
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
#define __MPEGPSMUX_H__
|
||||
|
||||
#include <gst/gst.h>
|
||||
#include <gst/base/gstcollectpads2.h>
|
||||
#include <gst/base/gstcollectpads.h>
|
||||
#include <gst/base/gstadapter.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
@ -70,7 +70,7 @@ struct MpegPsMux {
|
|||
|
||||
guint video_stream_id; /* stream id of primary video stream */
|
||||
|
||||
GstCollectPads2 *collect; /* pads collector */
|
||||
GstCollectPads *collect; /* pads collector */
|
||||
|
||||
PsMux *psmux;
|
||||
|
||||
|
@ -88,7 +88,7 @@ struct MpegPsMuxClass {
|
|||
};
|
||||
|
||||
struct MpegPsPadData {
|
||||
GstCollectData2 collect; /* Parent */
|
||||
GstCollectData collect; /* Parent */
|
||||
|
||||
guint8 stream_id;
|
||||
guint8 stream_id_ext;
|
||||
|
|
|
@ -151,7 +151,7 @@ static gboolean new_packet_cb (guint8 * data, guint len, void *user_data,
|
|||
static void release_buffer_cb (guint8 * data, void *user_data);
|
||||
|
||||
static void mpegtsdemux_prepare_srcpad (MpegTsMux * mux);
|
||||
static GstFlowReturn mpegtsmux_collected (GstCollectPads2 * pads,
|
||||
static GstFlowReturn mpegtsmux_collected (GstCollectPads * pads,
|
||||
MpegTsMux * mux);
|
||||
static GstPad *mpegtsmux_request_new_pad (GstElement * element,
|
||||
GstPadTemplate * templ, const gchar * name);
|
||||
|
@ -228,9 +228,9 @@ mpegtsmux_init (MpegTsMux * mux, MpegTsMuxClass * g_class)
|
|||
gst_pad_set_event_function (mux->srcpad, mpegtsmux_src_event);
|
||||
gst_element_add_pad (GST_ELEMENT (mux), mux->srcpad);
|
||||
|
||||
mux->collect = gst_collect_pads2_new ();
|
||||
gst_collect_pads2_set_function (mux->collect,
|
||||
(GstCollectPads2Function) GST_DEBUG_FUNCPTR (mpegtsmux_collected), mux);
|
||||
mux->collect = gst_collect_pads_new ();
|
||||
gst_collect_pads_set_function (mux->collect,
|
||||
(GstCollectPadsFunction) GST_DEBUG_FUNCPTR (mpegtsmux_collected), mux);
|
||||
|
||||
mux->tsmux = tsmux_new ();
|
||||
tsmux_set_write_func (mux->tsmux, new_packet_cb, mux);
|
||||
|
@ -523,7 +523,7 @@ mpegtsmux_create_streams (MpegTsMux * mux)
|
|||
|
||||
/* Create the streams */
|
||||
while (walk) {
|
||||
GstCollectData2 *c_data = (GstCollectData2 *) walk->data;
|
||||
GstCollectData *c_data = (GstCollectData *) walk->data;
|
||||
MpegTsPadData *ts_data = (MpegTsPadData *) walk->data;
|
||||
gchar *name = NULL;
|
||||
|
||||
|
@ -583,11 +583,11 @@ static MpegTsPadData *
|
|||
mpegtsmux_choose_best_stream (MpegTsMux * mux)
|
||||
{
|
||||
MpegTsPadData *best = NULL;
|
||||
GstCollectData2 *c_best = NULL;
|
||||
GstCollectData *c_best = NULL;
|
||||
GSList *walk;
|
||||
|
||||
for (walk = mux->collect->data; walk != NULL; walk = g_slist_next (walk)) {
|
||||
GstCollectData2 *c_data = (GstCollectData2 *) walk->data;
|
||||
GstCollectData *c_data = (GstCollectData *) walk->data;
|
||||
MpegTsPadData *ts_data = (MpegTsPadData *) walk->data;
|
||||
|
||||
if (ts_data->eos == FALSE) {
|
||||
|
@ -595,7 +595,7 @@ mpegtsmux_choose_best_stream (MpegTsMux * mux)
|
|||
GstBuffer *buf;
|
||||
|
||||
ts_data->queued_buf = buf =
|
||||
gst_collect_pads2_peek (mux->collect, c_data);
|
||||
gst_collect_pads_peek (mux->collect, c_data);
|
||||
|
||||
if (buf != NULL) {
|
||||
if (ts_data->prepare_func) {
|
||||
|
@ -657,14 +657,14 @@ mpegtsmux_choose_best_stream (MpegTsMux * mux)
|
|||
}
|
||||
if (c_best) {
|
||||
GstBuffer *buffer;
|
||||
if ((buffer = gst_collect_pads2_pop (mux->collect, c_best)))
|
||||
if ((buffer = gst_collect_pads_pop (mux->collect, c_best)))
|
||||
gst_buffer_unref (buffer);
|
||||
}
|
||||
|
||||
return best;
|
||||
}
|
||||
|
||||
#define COLLECT_DATA_PAD(collect_data) (((GstCollectData2 *)(collect_data))->pad)
|
||||
#define COLLECT_DATA_PAD(collect_data) (((GstCollectData *)(collect_data))->pad)
|
||||
|
||||
static gboolean
|
||||
mpegtsmux_sink_event (GstPad * pad, GstEvent * event)
|
||||
|
@ -848,7 +848,7 @@ out:
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
mpegtsmux_collected (GstCollectPads2 * pads, MpegTsMux * mux)
|
||||
mpegtsmux_collected (GstCollectPads * pads, MpegTsMux * mux)
|
||||
{
|
||||
GstFlowReturn ret = GST_FLOW_OK;
|
||||
MpegTsPadData *best = NULL;
|
||||
|
@ -991,7 +991,7 @@ mpegtsmux_request_new_pad (GstElement * element,
|
|||
pad = gst_pad_new_from_template (templ, pad_name);
|
||||
g_free (pad_name);
|
||||
|
||||
pad_data = (MpegTsPadData *) gst_collect_pads2_add_pad (mux->collect, pad,
|
||||
pad_data = (MpegTsPadData *) gst_collect_pads_add_pad (mux->collect, pad,
|
||||
sizeof (MpegTsPadData));
|
||||
if (pad_data == NULL)
|
||||
goto pad_failure;
|
||||
|
@ -1020,7 +1020,7 @@ stream_exists:
|
|||
could_not_add:
|
||||
GST_ELEMENT_ERROR (element, STREAM, FAILED,
|
||||
("Internal data stream error."), ("Could not add pad to element"));
|
||||
gst_collect_pads2_remove_pad (mux->collect, pad);
|
||||
gst_collect_pads_remove_pad (mux->collect, pad);
|
||||
gst_object_unref (pad);
|
||||
return NULL;
|
||||
pad_failure:
|
||||
|
@ -1038,7 +1038,7 @@ mpegtsmux_release_pad (GstElement * element, GstPad * pad)
|
|||
GST_DEBUG_OBJECT (mux, "Pad %" GST_PTR_FORMAT " being released", pad);
|
||||
|
||||
if (mux->collect) {
|
||||
gst_collect_pads2_remove_pad (mux->collect, pad);
|
||||
gst_collect_pads_remove_pad (mux->collect, pad);
|
||||
}
|
||||
|
||||
/* chain up */
|
||||
|
@ -1300,12 +1300,12 @@ mpegtsmux_change_state (GstElement * element, GstStateChange transition)
|
|||
case GST_STATE_CHANGE_NULL_TO_READY:
|
||||
break;
|
||||
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
||||
gst_collect_pads2_start (mux->collect);
|
||||
gst_collect_pads_start (mux->collect);
|
||||
break;
|
||||
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
||||
break;
|
||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||
gst_collect_pads2_stop (mux->collect);
|
||||
gst_collect_pads_stop (mux->collect);
|
||||
break;
|
||||
case GST_STATE_CHANGE_READY_TO_NULL:
|
||||
if (mux->adapter)
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
#define __MPEGTSMUX_H__
|
||||
|
||||
#include <gst/gst.h>
|
||||
#include <gst/base/gstcollectpads2.h>
|
||||
#include <gst/base/gstcollectpads.h>
|
||||
#include <gst/base/gstadapter.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
@ -108,7 +108,7 @@ struct MpegTsMux {
|
|||
|
||||
GstPad *srcpad;
|
||||
|
||||
GstCollectPads2 *collect;
|
||||
GstCollectPads *collect;
|
||||
|
||||
TsMux *tsmux;
|
||||
TsMuxProgram **programs;
|
||||
|
@ -139,7 +139,7 @@ struct MpegTsMuxClass {
|
|||
#define MPEG_TS_PAD_DATA(data) ((MpegTsPadData *)(data))
|
||||
|
||||
struct MpegTsPadData {
|
||||
GstCollectData2 collect; /* Parent */
|
||||
GstCollectData collect; /* Parent */
|
||||
|
||||
gint pid;
|
||||
TsMuxStream *stream;
|
||||
|
|
|
@ -146,9 +146,9 @@ gst_mxf_mux_init (GstMXFMux * mux, GstMXFMuxClass * g_class)
|
|||
gst_caps_unref (caps);
|
||||
gst_element_add_pad (GST_ELEMENT (mux), mux->srcpad);
|
||||
|
||||
mux->collect = gst_collect_pads2_new ();
|
||||
gst_collect_pads2_set_function (mux->collect,
|
||||
(GstCollectPads2Function) GST_DEBUG_FUNCPTR (gst_mxf_mux_collected), mux);
|
||||
mux->collect = gst_collect_pads_new ();
|
||||
gst_collect_pads_set_function (mux->collect,
|
||||
(GstCollectPadsFunction) GST_DEBUG_FUNCPTR (gst_mxf_mux_collected), mux);
|
||||
|
||||
gst_mxf_mux_reset (mux);
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ gst_mxf_mux_reset (GstMXFMux * mux)
|
|||
g_object_unref (cpad->adapter);
|
||||
g_free (cpad->mapping_data);
|
||||
|
||||
gst_collect_pads2_remove_pad (mux->collect, cpad->collect.pad);
|
||||
gst_collect_pads_remove_pad (mux->collect, cpad->collect.pad);
|
||||
}
|
||||
|
||||
mux->state = GST_MXF_MUX_STATE_HEADER;
|
||||
|
@ -268,7 +268,7 @@ gst_mxf_mux_handle_sink_event (GstPad * pad, GstEvent * event)
|
|||
break;
|
||||
}
|
||||
|
||||
/* now GstCollectPads2 can take care of the rest, e.g. EOS */
|
||||
/* now GstCollectPads can take care of the rest, e.g. EOS */
|
||||
if (ret)
|
||||
ret = mux->collect_event (pad, event);
|
||||
gst_object_unref (mux);
|
||||
|
@ -420,13 +420,13 @@ gst_mxf_mux_request_new_pad (GstElement * element,
|
|||
pad = gst_pad_new_from_template (templ, name);
|
||||
g_free (name);
|
||||
cpad = (GstMXFMuxPad *)
|
||||
gst_collect_pads2_add_pad (mux->collect, pad, sizeof (GstMXFMuxPad));
|
||||
gst_collect_pads_add_pad (mux->collect, pad, sizeof (GstMXFMuxPad));
|
||||
cpad->last_timestamp = 0;
|
||||
cpad->adapter = gst_adapter_new ();
|
||||
cpad->writer = writer;
|
||||
|
||||
/* FIXME: hacked way to override/extend the event function of
|
||||
* GstCollectPads2; because it sets its own event function giving the
|
||||
* GstCollectPads; because it sets its own event function giving the
|
||||
* element no access to events.
|
||||
*/
|
||||
mux->collect_event = (GstPadEventFunction) GST_PAD_EVENTFUNC (pad);
|
||||
|
@ -450,7 +450,7 @@ gst_mxf_mux_release_pad (GstElement * element, GstPad * pad)
|
|||
g_object_unref (cpad->adapter);
|
||||
g_free (cpad->mapping_data);
|
||||
|
||||
gst_collect_pads2_remove_pad (mux->collect, pad);
|
||||
gst_collect_pads_remove_pad (mux->collect, pad);
|
||||
gst_element_remove_pad (element, pad); */
|
||||
}
|
||||
|
||||
|
@ -1099,7 +1099,7 @@ gst_mxf_mux_handle_buffer (GstMXFMux * mux, GstMXFMuxPad * cpad)
|
|||
GstBuffer *packet;
|
||||
GstFlowReturn ret = GST_FLOW_OK;
|
||||
guint8 slen, ber[9];
|
||||
gboolean flush = ((cpad->collect.state & GST_COLLECT_PADS2_STATE_EOS)
|
||||
gboolean flush = ((cpad->collect.state & GST_COLLECT_PADS_STATE_EOS)
|
||||
&& !cpad->have_complete_edit_unit && cpad->collect.buffer == NULL);
|
||||
|
||||
if (cpad->have_complete_edit_unit) {
|
||||
|
@ -1108,7 +1108,7 @@ gst_mxf_mux_handle_buffer (GstMXFMux * mux, GstMXFMuxPad * cpad)
|
|||
cpad->source_track->parent.track_id, cpad->pos);
|
||||
buf = NULL;
|
||||
} else if (!flush) {
|
||||
buf = gst_collect_pads2_pop (mux->collect, &cpad->collect);
|
||||
buf = gst_collect_pads_pop (mux->collect, &cpad->collect);
|
||||
}
|
||||
|
||||
if (buf) {
|
||||
|
@ -1369,7 +1369,7 @@ _sort_mux_pads (gconstpointer a, gconstpointer b)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_mxf_mux_collected (GstCollectPads2 * pads, gpointer user_data)
|
||||
gst_mxf_mux_collected (GstCollectPads * pads, gpointer user_data)
|
||||
{
|
||||
GstMXFMux *mux = GST_MXF_MUX (user_data);
|
||||
GstMXFMuxPad *best = NULL;
|
||||
|
@ -1430,7 +1430,7 @@ gst_mxf_mux_collected (GstCollectPads2 * pads, gpointer user_data)
|
|||
gst_util_uint64_scale ((mux->last_gc_position + 1) * GST_SECOND,
|
||||
mux->min_edit_rate.d, mux->min_edit_rate.n);
|
||||
|
||||
pad_eos = cpad->collect.state & GST_COLLECT_PADS2_STATE_EOS;
|
||||
pad_eos = cpad->collect.state & GST_COLLECT_PADS_STATE_EOS;
|
||||
if (!pad_eos)
|
||||
eos = FALSE;
|
||||
|
||||
|
@ -1482,12 +1482,12 @@ gst_mxf_mux_change_state (GstElement * element, GstStateChange transition)
|
|||
case GST_STATE_CHANGE_NULL_TO_READY:
|
||||
break;
|
||||
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
||||
gst_collect_pads2_start (mux->collect);
|
||||
gst_collect_pads_start (mux->collect);
|
||||
break;
|
||||
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
||||
break;
|
||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||
gst_collect_pads2_stop (mux->collect);
|
||||
gst_collect_pads_stop (mux->collect);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include <gst/gst.h>
|
||||
#include <gst/base/gstadapter.h>
|
||||
#include <gst/base/gstcollectpads2.h>
|
||||
#include <gst/base/gstcollectpads.h>
|
||||
|
||||
#include "mxfessence.h"
|
||||
|
||||
|
@ -41,7 +41,7 @@ G_BEGIN_DECLS
|
|||
|
||||
typedef struct
|
||||
{
|
||||
GstCollectData2 collect;
|
||||
GstCollectData collect;
|
||||
|
||||
guint64 pos;
|
||||
GstClockTime last_timestamp;
|
||||
|
@ -71,7 +71,7 @@ typedef struct _GstMXFMux {
|
|||
GstElement element;
|
||||
|
||||
GstPad *srcpad;
|
||||
GstCollectPads2 *collect;
|
||||
GstCollectPads *collect;
|
||||
|
||||
/* <private> */
|
||||
GstPadEventFunction collect_event;
|
||||
|
|
|
@ -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 (GstCollectPads2 * pads,
|
||||
static GstFlowReturn gst_ssim_collected (GstCollectPads * 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_pads2_set_flushing (ssim->collect, TRUE);
|
||||
gst_collect_pads_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 GstCollectPads2 can take care of the rest, e.g. EOS */
|
||||
/* now GstCollectPads 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,10 +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_pads2_add_pad (ssim->collect, newpad, sizeof (GstCollectData2));
|
||||
gst_collect_pads_add_pad (ssim->collect, newpad, sizeof (GstCollectData));
|
||||
|
||||
/* FIXME: hacked way to override/extend the event function of
|
||||
* GstCollectPads2; because it sets its own event function giving the
|
||||
* GstCollectPads; 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",
|
||||
|
@ -1233,7 +1233,7 @@ could_not_add_src:
|
|||
could_not_add_sink:
|
||||
{
|
||||
GST_DEBUG_OBJECT (ssim, "could not add sink pad");
|
||||
gst_collect_pads2_remove_pad (ssim->collect, newpad);
|
||||
gst_collect_pads_remove_pad (ssim->collect, newpad);
|
||||
gst_object_unref (newpad);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1248,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_pads2_remove_pad (ssim->collect, pad);
|
||||
gst_collect_pads_remove_pad (ssim->collect, pad);
|
||||
gst_element_remove_pad (element, pad);
|
||||
}
|
||||
|
||||
|
@ -1267,8 +1267,8 @@ gst_ssim_init (GstSSim * ssim)
|
|||
ssim->sinkcaps = NULL;
|
||||
|
||||
/* keep track of the sinkpads requested */
|
||||
ssim->collect = gst_collect_pads2_new ();
|
||||
gst_collect_pads2_set_function (ssim->collect,
|
||||
ssim->collect = gst_collect_pads_new ();
|
||||
gst_collect_pads_set_function (ssim->collect,
|
||||
GST_DEBUG_FUNCPTR (gst_ssim_collected), ssim);
|
||||
}
|
||||
|
||||
|
@ -1407,7 +1407,7 @@ gst_ssim_regenerate_windows (GstSSim * ssim)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_ssim_collected (GstCollectPads2 * pads, gpointer user_data)
|
||||
gst_ssim_collected (GstCollectPads * pads, gpointer user_data)
|
||||
{
|
||||
GstSSim *ssim;
|
||||
GSList *collected;
|
||||
|
@ -1440,12 +1440,12 @@ gst_ssim_collected (GstCollectPads2 * pads, gpointer user_data)
|
|||
}
|
||||
|
||||
for (collected = pads->data; collected; collected = g_slist_next (collected)) {
|
||||
GstCollectData2 *collect_data;
|
||||
GstCollectData *collect_data;
|
||||
GstBuffer *inbuf;
|
||||
|
||||
collect_data = (GstCollectData2 *) collected->data;
|
||||
collect_data = (GstCollectData *) collected->data;
|
||||
|
||||
inbuf = gst_collect_pads2_peek (pads, collect_data);
|
||||
inbuf = gst_collect_pads_peek (pads, collect_data);
|
||||
|
||||
if (inbuf == NULL) {
|
||||
GST_LOG_OBJECT (ssim, "channel %p: no bytes available", collect_data);
|
||||
|
@ -1469,12 +1469,12 @@ gst_ssim_collected (GstCollectPads2 * pads, gpointer user_data)
|
|||
|
||||
for (collected = pads->data; collected;
|
||||
collected = g_slist_next (collected)) {
|
||||
GstCollectData2 *collect_data;
|
||||
GstCollectData *collect_data;
|
||||
|
||||
collect_data = (GstCollectData2 *) collected->data;
|
||||
collect_data = (GstCollectData *) collected->data;
|
||||
|
||||
if (collect_data->pad == ssim->orig) {
|
||||
orgbuf = gst_collect_pads2_pop (pads, collect_data);;
|
||||
orgbuf = gst_collect_pads_pop (pads, collect_data);;
|
||||
|
||||
GST_DEBUG_OBJECT (ssim, "Original stream - flags(0x%x), timestamp(%"
|
||||
GST_TIME_FORMAT "), duration(%" GST_TIME_FORMAT ")",
|
||||
|
@ -1491,14 +1491,14 @@ gst_ssim_collected (GstCollectPads2 * pads, gpointer user_data)
|
|||
GST_LOG_OBJECT (ssim, "starting to cycle through streams");
|
||||
|
||||
for (collected = pads->data; collected; collected = g_slist_next (collected)) {
|
||||
GstCollectData2 *collect_data;
|
||||
GstCollectData *collect_data;
|
||||
GstBuffer *inbuf;
|
||||
guint8 *indata;
|
||||
|
||||
collect_data = (GstCollectData2 *) collected->data;
|
||||
collect_data = (GstCollectData *) collected->data;
|
||||
|
||||
if (collect_data->pad != ssim->orig) {
|
||||
inbuf = gst_collect_pads2_pop (pads, collect_data);
|
||||
inbuf = gst_collect_pads_pop (pads, collect_data);
|
||||
|
||||
indata = GST_BUFFER_DATA (inbuf);
|
||||
|
||||
|
@ -1659,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_pads2_start (ssim->collect);
|
||||
gst_collect_pads_start (ssim->collect);
|
||||
break;
|
||||
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
||||
break;
|
||||
|
@ -1667,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_pads2_stop (ssim->collect);
|
||||
gst_collect_pads_stop (ssim->collect);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#define __GST_SSIM_H__
|
||||
|
||||
#include <gst/gst.h>
|
||||
#include <gst/base/gstcollectpads2.h>
|
||||
#include <gst/base/gstcollectpads.h>
|
||||
#include <gst/video/video.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
@ -85,7 +85,7 @@ struct _GstSSim {
|
|||
|
||||
gint padcount;
|
||||
|
||||
GstCollectPads2 *collect;
|
||||
GstCollectPads *collect;
|
||||
GstPad *orig;
|
||||
|
||||
gint frame_rate;
|
||||
|
|
|
@ -318,7 +318,7 @@ gchar *
|
|||
ks_guid_to_string (const GUID * guid)
|
||||
{
|
||||
return g_strdup_printf ("{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
|
||||
guid->Data1, guid->Data2, guid->Data3, guid->Data4[0], guid->Data4[1],
|
||||
guid->Data1, guid->Data, guid->Data3, guid->Data4[0], guid->Data4[1],
|
||||
guid->Data4[2], guid->Data4[3], guid->Data4[4], guid->Data4[5],
|
||||
guid->Data4[6], guid->Data4[7]);
|
||||
}
|
||||
|
|
|
@ -229,7 +229,7 @@ ks_video_format_to_structure (GUID subtype_guid, GUID format_guid)
|
|||
"format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('d', 'v', 's', 'd'),
|
||||
NULL);
|
||||
}
|
||||
} else if (memcmp (&subtype_guid.Data2, &MEDIASUBTYPE_FOURCC.Data2,
|
||||
} else if (memcmp (&subtype_guid.Data, &MEDIASUBTYPE_FOURCC.Data,
|
||||
sizeof (subtype_guid) - sizeof (subtype_guid.Data1)) == 0) {
|
||||
guint8 *p = (guint8 *) & subtype_guid.Data1;
|
||||
|
||||
|
@ -240,7 +240,7 @@ ks_video_format_to_structure (GUID subtype_guid, GUID format_guid)
|
|||
|
||||
if (!structure) {
|
||||
GST_DEBUG ("Unknown DirectShow Video GUID %08x-%04x-%04x-%04x-%08x%04x",
|
||||
subtype_guid.Data1, subtype_guid.Data2, subtype_guid.Data3,
|
||||
subtype_guid.Data1, subtype_guid.Data, subtype_guid.Data3,
|
||||
*(WORD *) subtype_guid.Data4, *(DWORD *) & subtype_guid.Data4[2],
|
||||
*(WORD *) & subtype_guid.Data4[6]);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue