mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +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_pad_use_fixed_caps (asfmux->srcpad);
|
||||||
gst_element_add_pad (GST_ELEMENT (asfmux), asfmux->srcpad);
|
gst_element_add_pad (GST_ELEMENT (asfmux), asfmux->srcpad);
|
||||||
|
|
||||||
asfmux->collect = gst_collect_pads2_new ();
|
asfmux->collect = gst_collect_pads_new ();
|
||||||
gst_collect_pads2_set_function (asfmux->collect,
|
gst_collect_pads_set_function (asfmux->collect,
|
||||||
(GstCollectPads2Function) GST_DEBUG_FUNCPTR (gst_asf_mux_collected),
|
(GstCollectPadsFunction) GST_DEBUG_FUNCPTR (gst_asf_mux_collected),
|
||||||
asfmux);
|
asfmux);
|
||||||
|
|
||||||
asfmux->payloads = NULL;
|
asfmux->payloads = NULL;
|
||||||
|
@ -1851,7 +1851,7 @@ gst_asf_mux_process_buffer (GstAsfMux * asfmux, GstAsfPad * pad,
|
||||||
AsfPayload *payload;
|
AsfPayload *payload;
|
||||||
|
|
||||||
payload = g_malloc0 (sizeof (AsfPayload));
|
payload = g_malloc0 (sizeof (AsfPayload));
|
||||||
payload->pad = (GstCollectData2 *) pad;
|
payload->pad = (GstCollectData *) pad;
|
||||||
payload->data = buf;
|
payload->data = buf;
|
||||||
|
|
||||||
GST_LOG_OBJECT (asfmux,
|
GST_LOG_OBJECT (asfmux,
|
||||||
|
@ -1911,7 +1911,7 @@ gst_asf_mux_process_buffer (GstAsfMux * asfmux, GstAsfPad * pad,
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
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);
|
GstAsfMux *asfmux = GST_ASF_MUX_CAST (data);
|
||||||
GstFlowReturn ret = GST_FLOW_OK;
|
GstFlowReturn ret = GST_FLOW_OK;
|
||||||
|
@ -1937,15 +1937,15 @@ gst_asf_mux_collected (GstCollectPads2 * collect, gpointer data)
|
||||||
walk = asfmux->collect->data;
|
walk = asfmux->collect->data;
|
||||||
while (walk) {
|
while (walk) {
|
||||||
GstAsfPad *pad;
|
GstAsfPad *pad;
|
||||||
GstCollectData2 *data;
|
GstCollectData *data;
|
||||||
GstClockTime time;
|
GstClockTime time;
|
||||||
|
|
||||||
data = (GstCollectData2 *) walk->data;
|
data = (GstCollectData *) walk->data;
|
||||||
pad = (GstAsfPad *) data;
|
pad = (GstAsfPad *) data;
|
||||||
|
|
||||||
walk = g_slist_next (walk);
|
walk = g_slist_next (walk);
|
||||||
|
|
||||||
buf = gst_collect_pads2_peek (collect, data);
|
buf = gst_collect_pads_peek (collect, data);
|
||||||
if (buf == NULL) {
|
if (buf == NULL) {
|
||||||
GST_LOG_OBJECT (asfmux, "Pad %s has no buffers",
|
GST_LOG_OBJECT (asfmux, "Pad %s has no buffers",
|
||||||
GST_PAD_NAME (pad->collect.pad));
|
GST_PAD_NAME (pad->collect.pad));
|
||||||
|
@ -1980,7 +1980,7 @@ gst_asf_mux_collected (GstCollectPads2 * collect, gpointer data)
|
||||||
/* we have data */
|
/* we have data */
|
||||||
GST_LOG_OBJECT (asfmux, "selected pad %s with time %" GST_TIME_FORMAT,
|
GST_LOG_OBJECT (asfmux, "selected pad %s with time %" GST_TIME_FORMAT,
|
||||||
GST_PAD_NAME (best_pad->collect.pad), GST_TIME_ARGS (best_time));
|
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);
|
ret = gst_asf_mux_process_buffer (asfmux, best_pad, buf);
|
||||||
} else {
|
} else {
|
||||||
/* no data, let's finish it up */
|
/* no data, let's finish it up */
|
||||||
|
@ -2279,8 +2279,8 @@ gst_asf_mux_request_new_pad (GstElement * element,
|
||||||
collect_size = sizeof (GstAsfVideoPad);
|
collect_size = sizeof (GstAsfVideoPad);
|
||||||
}
|
}
|
||||||
collect_pad = (GstAsfPad *)
|
collect_pad = (GstAsfPad *)
|
||||||
gst_collect_pads2_add_pad_full (asfmux->collect, newpad, collect_size,
|
gst_collect_pads_add_pad_full (asfmux->collect, newpad, collect_size,
|
||||||
(GstCollectData2DestroyNotify) (gst_asf_mux_pad_reset), TRUE);
|
(GstCollectDataDestroyNotify) (gst_asf_mux_pad_reset), TRUE);
|
||||||
|
|
||||||
/* set up pad */
|
/* set up pad */
|
||||||
collect_pad->is_audio = is_audio;
|
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;
|
collect_pad->stream_number = asfmux->stream_number;
|
||||||
|
|
||||||
/* FIXME: hacked way to override/extend the event function of
|
/* 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.
|
* the element no access to events.
|
||||||
*/
|
*/
|
||||||
asfmux->collect_event = (GstPadEventFunction) GST_PAD_EVENTFUNC (newpad);
|
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->packet_size = asfmux->prop_packet_size;
|
||||||
asfmux->preroll = asfmux->prop_preroll;
|
asfmux->preroll = asfmux->prop_preroll;
|
||||||
asfmux->merge_stream_tags = asfmux->prop_merge_stream_tags;
|
asfmux->merge_stream_tags = asfmux->prop_merge_stream_tags;
|
||||||
gst_collect_pads2_start (asfmux->collect);
|
gst_collect_pads_start (asfmux->collect);
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
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;
|
asfmux->state = GST_ASF_MUX_STATE_NONE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/base/gstcollectpads2.h>
|
#include <gst/base/gstcollectpads.h>
|
||||||
#include <gst/riff/riff-media.h>
|
#include <gst/riff/riff-media.h>
|
||||||
|
|
||||||
#include "gstasfobjects.h"
|
#include "gstasfobjects.h"
|
||||||
|
@ -57,7 +57,7 @@ enum _GstAsfMuxState
|
||||||
|
|
||||||
struct _GstAsfPad
|
struct _GstAsfPad
|
||||||
{
|
{
|
||||||
GstCollectData2 collect;
|
GstCollectData collect;
|
||||||
|
|
||||||
gboolean is_audio;
|
gboolean is_audio;
|
||||||
guint8 stream_number;
|
guint8 stream_number;
|
||||||
|
@ -143,7 +143,7 @@ struct _GstAsfMux
|
||||||
/* pads */
|
/* pads */
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
|
|
||||||
GstCollectPads2 *collect;
|
GstCollectPads *collect;
|
||||||
GstPadEventFunction collect_event;
|
GstPadEventFunction collect_event;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/base/gstbytereader.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_PAYLOAD_IS_KEYFRAME(pay) ((pay->stream_number & 0x80) != 0)
|
||||||
#define ASF_MILI_TO_100NANO(v) (v * 10000)
|
#define ASF_MILI_TO_100NANO(v) (v * 10000)
|
||||||
|
@ -75,7 +75,7 @@ typedef struct _AsfPayload
|
||||||
guint32 presentation_time;
|
guint32 presentation_time;
|
||||||
GstBuffer *data;
|
GstBuffer *data;
|
||||||
|
|
||||||
GstCollectData2 *pad;
|
GstCollectData *pad;
|
||||||
|
|
||||||
/* simple index info */
|
/* simple index info */
|
||||||
gboolean has_packet_info;
|
gboolean has_packet_info;
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/base/gstcollectpads2.h>
|
#include <gst/base/gstcollectpads.h>
|
||||||
#include <gst/video/video.h>
|
#include <gst/video/video.h>
|
||||||
|
|
||||||
#include "gstcompare.h"
|
#include "gstcompare.h"
|
||||||
|
@ -110,7 +110,7 @@ static void gst_compare_reset (GstCompare * overlay);
|
||||||
|
|
||||||
static gboolean gst_compare_query (GstPad * pad, GstObject * parent,
|
static gboolean gst_compare_query (GstPad * pad, GstObject * parent,
|
||||||
GstQuery * query);
|
GstQuery * query);
|
||||||
static GstFlowReturn gst_compare_collect_pads (GstCollectPads2 * cpads,
|
static GstFlowReturn gst_compare_collect_pads (GstCollectPads * cpads,
|
||||||
GstCompare * comp);
|
GstCompare * comp);
|
||||||
|
|
||||||
static GstStateChangeReturn gst_compare_change_state (GstElement * element,
|
static GstStateChangeReturn gst_compare_change_state (GstElement * element,
|
||||||
|
@ -184,9 +184,9 @@ gst_compare_class_init (GstCompareClass * klass)
|
||||||
static void
|
static void
|
||||||
gst_compare_init (GstCompare * comp)
|
gst_compare_init (GstCompare * comp)
|
||||||
{
|
{
|
||||||
comp->cpads = gst_collect_pads2_new ();
|
comp->cpads = gst_collect_pads_new ();
|
||||||
gst_collect_pads2_set_function (comp->cpads,
|
gst_collect_pads_set_function (comp->cpads,
|
||||||
(GstCollectPads2Function) GST_DEBUG_FUNCPTR (gst_compare_collect_pads),
|
(GstCollectPadsFunction) GST_DEBUG_FUNCPTR (gst_compare_collect_pads),
|
||||||
comp);
|
comp);
|
||||||
|
|
||||||
comp->sinkpad = gst_pad_new_from_static_template (&sink_factory, "sink");
|
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_pad_set_query_function (comp->checkpad, gst_compare_query);
|
||||||
gst_element_add_pad (GST_ELEMENT (comp), comp->checkpad);
|
gst_element_add_pad (GST_ELEMENT (comp), comp->checkpad);
|
||||||
|
|
||||||
gst_collect_pads2_add_pad_full (comp->cpads, comp->sinkpad,
|
gst_collect_pads_add_pad_full (comp->cpads, comp->sinkpad,
|
||||||
sizeof (GstCollectData2), NULL, TRUE);
|
sizeof (GstCollectData), NULL, TRUE);
|
||||||
gst_collect_pads2_add_pad_full (comp->cpads, comp->checkpad,
|
gst_collect_pads_add_pad_full (comp->cpads, comp->checkpad,
|
||||||
sizeof (GstCollectData2), NULL, TRUE);
|
sizeof (GstCollectData), NULL, TRUE);
|
||||||
|
|
||||||
comp->srcpad = gst_pad_new_from_static_template (&src_factory, "src");
|
comp->srcpad = gst_pad_new_from_static_template (&src_factory, "src");
|
||||||
gst_pad_set_query_function (comp->srcpad, gst_compare_query);
|
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
|
static GstFlowReturn
|
||||||
gst_compare_collect_pads (GstCollectPads2 * cpads, GstCompare * comp)
|
gst_compare_collect_pads (GstCollectPads * cpads, GstCompare * comp)
|
||||||
{
|
{
|
||||||
GstBuffer *buf1, *buf2;
|
GstBuffer *buf1, *buf2;
|
||||||
GstCaps *caps1, *caps2;
|
GstCaps *caps1, *caps2;
|
||||||
|
|
||||||
buf1 = gst_collect_pads2_pop (comp->cpads,
|
buf1 = gst_collect_pads_pop (comp->cpads,
|
||||||
gst_pad_get_element_private (comp->sinkpad));
|
gst_pad_get_element_private (comp->sinkpad));
|
||||||
caps1 = gst_pad_get_current_caps (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));
|
gst_pad_get_element_private (comp->checkpad));
|
||||||
caps2 = gst_pad_get_current_caps (comp->checkpad);
|
caps2 = gst_pad_get_current_caps (comp->checkpad);
|
||||||
|
|
||||||
|
@ -665,10 +665,10 @@ gst_compare_change_state (GstElement * element, GstStateChange transition)
|
||||||
switch (transition) {
|
switch (transition) {
|
||||||
case GST_STATE_CHANGE_NULL_TO_READY:
|
case GST_STATE_CHANGE_NULL_TO_READY:
|
||||||
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
||||||
gst_collect_pads2_start (comp->cpads);
|
gst_collect_pads_start (comp->cpads);
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||||
gst_collect_pads2_stop (comp->cpads);
|
gst_collect_pads_stop (comp->cpads);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -52,7 +52,7 @@ struct _GstCompare {
|
||||||
GstPad *sinkpad;
|
GstPad *sinkpad;
|
||||||
GstPad *checkpad;
|
GstPad *checkpad;
|
||||||
|
|
||||||
GstCollectPads2 *cpads;
|
GstCollectPads *cpads;
|
||||||
|
|
||||||
gint count;
|
gint count;
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,7 @@ gst_frei0r_mixer_change_state (GstElement * element, GstStateChange transition)
|
||||||
case GST_STATE_CHANGE_NULL_TO_READY:
|
case GST_STATE_CHANGE_NULL_TO_READY:
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
||||||
gst_collect_pads2_start (self->collect);
|
gst_collect_pads_start (self->collect);
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
||||||
break;
|
break;
|
||||||
|
@ -129,11 +129,11 @@ gst_frei0r_mixer_change_state (GstElement * element, GstStateChange transition)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Stop before calling the parent's state change function as
|
/* 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
|
* case
|
||||||
*/
|
*/
|
||||||
if (transition == GST_STATE_CHANGE_PAUSED_TO_READY)
|
if (transition == GST_STATE_CHANGE_PAUSED_TO_READY)
|
||||||
gst_collect_pads2_stop (self->collect);
|
gst_collect_pads_stop (self->collect);
|
||||||
|
|
||||||
ret =
|
ret =
|
||||||
GST_ELEMENT_CLASS (g_type_class_peek_parent (klass))->change_state
|
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 */
|
/* check if we are flushing */
|
||||||
if (flags & GST_SEEK_FLAG_FLUSH) {
|
if (flags & GST_SEEK_FLAG_FLUSH) {
|
||||||
/* make sure we accept nothing anymore and return WRONG_STATE */
|
/* 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
|
/* flushing seek, start flush downstream, the flush will be done
|
||||||
* when all pads received a FLUSH_STOP. */
|
* when all pads received a FLUSH_STOP. */
|
||||||
|
@ -532,7 +532,7 @@ gst_frei0r_mixer_sink0_event (GstPad * pad, GstEvent * event)
|
||||||
break;
|
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);
|
ret = self->collect_event (pad, event);
|
||||||
|
|
||||||
gst_object_unref (self);
|
gst_object_unref (self);
|
||||||
|
@ -541,7 +541,7 @@ gst_frei0r_mixer_sink0_event (GstPad * pad, GstEvent * event)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
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 *inbuf0 = NULL, *inbuf1 = NULL, *inbuf2 = NULL;
|
||||||
GstBuffer *outbuf = NULL;
|
GstBuffer *outbuf = NULL;
|
||||||
|
@ -575,15 +575,15 @@ gst_frei0r_mixer_collected (GstCollectPads2 * pads, GstFrei0rMixer * self)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
for (l = pads->data; l; l = l->next) {
|
for (l = pads->data; l; l = l->next) {
|
||||||
GstCollectData2 *cdata = l->data;
|
GstCollectData *cdata = l->data;
|
||||||
|
|
||||||
if (cdata->pad == self->sink0) {
|
if (cdata->pad == self->sink0) {
|
||||||
inbuf0 = gst_collect_pads2_pop (pads, cdata);
|
inbuf0 = gst_collect_pads_pop (pads, cdata);
|
||||||
segment = &cdata->segment;
|
segment = &cdata->segment;
|
||||||
} else if (cdata->pad == self->sink1) {
|
} 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) {
|
} 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 =
|
self->property_cache =
|
||||||
gst_frei0r_property_cache_init (klass->properties, klass->n_properties);
|
gst_frei0r_property_cache_init (klass->properties, klass->n_properties);
|
||||||
|
|
||||||
self->collect = gst_collect_pads2_new ();
|
self->collect = gst_collect_pads_new ();
|
||||||
gst_collect_pads2_set_function (self->collect,
|
gst_collect_pads_set_function (self->collect,
|
||||||
(GstCollectPads2Function) gst_frei0r_mixer_collected, self);
|
(GstCollectPadsFunction) gst_frei0r_mixer_collected, self);
|
||||||
|
|
||||||
self->src =
|
self->src =
|
||||||
gst_pad_new_from_template (gst_element_class_get_pad_template
|
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_DEBUG_FUNCPTR (gst_frei0r_mixer_set_caps));
|
||||||
gst_pad_set_query_function (self->sink0,
|
gst_pad_set_query_function (self->sink0,
|
||||||
GST_DEBUG_FUNCPTR (gst_frei0r_mixer_sink_query));
|
GST_DEBUG_FUNCPTR (gst_frei0r_mixer_sink_query));
|
||||||
gst_collect_pads2_add_pad (self->collect, self->sink0,
|
gst_collect_pads_add_pad (self->collect, self->sink0,
|
||||||
sizeof (GstCollectData2));
|
sizeof (GstCollectData));
|
||||||
self->collect_event = (GstPadEventFunction) GST_PAD_EVENTFUNC (self->sink0);
|
self->collect_event = (GstPadEventFunction) GST_PAD_EVENTFUNC (self->sink0);
|
||||||
gst_pad_set_event_function (self->sink0,
|
gst_pad_set_event_function (self->sink0,
|
||||||
GST_DEBUG_FUNCPTR (gst_frei0r_mixer_sink0_event));
|
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_DEBUG_FUNCPTR (gst_frei0r_mixer_set_caps));
|
||||||
gst_pad_set_query_function (self->sink0,
|
gst_pad_set_query_function (self->sink0,
|
||||||
GST_DEBUG_FUNCPTR (gst_frei0r_mixer_sink_query));
|
GST_DEBUG_FUNCPTR (gst_frei0r_mixer_sink_query));
|
||||||
gst_collect_pads2_add_pad (self->collect, self->sink1,
|
gst_collect_pads_add_pad (self->collect, self->sink1,
|
||||||
sizeof (GstCollectData2));
|
sizeof (GstCollectData));
|
||||||
gst_element_add_pad (GST_ELEMENT_CAST (self), self->sink1);
|
gst_element_add_pad (GST_ELEMENT_CAST (self), self->sink1);
|
||||||
|
|
||||||
if (klass->info->plugin_type == F0R_PLUGIN_TYPE_MIXER3) {
|
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_DEBUG_FUNCPTR (gst_frei0r_mixer_set_caps));
|
||||||
gst_pad_set_query_function (self->sink0,
|
gst_pad_set_query_function (self->sink0,
|
||||||
GST_DEBUG_FUNCPTR (gst_frei0r_mixer_sink_query));
|
GST_DEBUG_FUNCPTR (gst_frei0r_mixer_sink_query));
|
||||||
gst_collect_pads2_add_pad (self->collect, self->sink2,
|
gst_collect_pads_add_pad (self->collect, self->sink2,
|
||||||
sizeof (GstCollectData2));
|
sizeof (GstCollectData));
|
||||||
gst_element_add_pad (GST_ELEMENT_CAST (self), self->sink2);
|
gst_element_add_pad (GST_ELEMENT_CAST (self), self->sink2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/video/video.h>
|
#include <gst/video/video.h>
|
||||||
#include <gst/base/gstcollectpads2.h>
|
#include <gst/base/gstcollectpads.h>
|
||||||
|
|
||||||
#include "frei0r.h"
|
#include "frei0r.h"
|
||||||
#include "gstfrei0r.h"
|
#include "gstfrei0r.h"
|
||||||
|
@ -42,7 +42,7 @@ typedef struct _GstFrei0rMixerClass GstFrei0rMixerClass;
|
||||||
struct _GstFrei0rMixer {
|
struct _GstFrei0rMixer {
|
||||||
GstElement parent;
|
GstElement parent;
|
||||||
|
|
||||||
GstCollectPads2 *collect;
|
GstCollectPads *collect;
|
||||||
GstPad *src;
|
GstPad *src;
|
||||||
GstPad *sink0, *sink1, *sink2;
|
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 void release_buffer_cb (guint8 * data, void *user_data);
|
||||||
|
|
||||||
static gboolean mpegpsdemux_prepare_srcpad (MpegPsMux * mux);
|
static gboolean mpegpsdemux_prepare_srcpad (MpegPsMux * mux);
|
||||||
static GstFlowReturn mpegpsmux_collected (GstCollectPads2 * pads,
|
static GstFlowReturn mpegpsmux_collected (GstCollectPads * pads,
|
||||||
MpegPsMux * mux);
|
MpegPsMux * mux);
|
||||||
static GstPad *mpegpsmux_request_new_pad (GstElement * element,
|
static GstPad *mpegpsmux_request_new_pad (GstElement * element,
|
||||||
GstPadTemplate * templ, const gchar * name);
|
GstPadTemplate * templ, const gchar * name);
|
||||||
|
@ -153,9 +153,9 @@ mpegpsmux_init (MpegPsMux * mux, MpegPsMuxClass * g_class)
|
||||||
gst_pad_use_fixed_caps (mux->srcpad);
|
gst_pad_use_fixed_caps (mux->srcpad);
|
||||||
gst_element_add_pad (GST_ELEMENT (mux), mux->srcpad);
|
gst_element_add_pad (GST_ELEMENT (mux), mux->srcpad);
|
||||||
|
|
||||||
mux->collect = gst_collect_pads2_new ();
|
mux->collect = gst_collect_pads_new ();
|
||||||
gst_collect_pads2_set_function (mux->collect,
|
gst_collect_pads_set_function (mux->collect,
|
||||||
(GstCollectPads2Function) GST_DEBUG_FUNCPTR (mpegpsmux_collected), mux);
|
(GstCollectPadsFunction) GST_DEBUG_FUNCPTR (mpegpsmux_collected), mux);
|
||||||
|
|
||||||
mux->psmux = psmux_new ();
|
mux->psmux = psmux_new ();
|
||||||
psmux_set_write_func (mux->psmux, new_packet_cb, mux);
|
psmux_set_write_func (mux->psmux, new_packet_cb, mux);
|
||||||
|
@ -371,7 +371,7 @@ mpegpsmux_create_streams (MpegPsMux * mux)
|
||||||
|
|
||||||
/* Create the streams */
|
/* Create the streams */
|
||||||
while (walk) {
|
while (walk) {
|
||||||
GstCollectData2 *c_data = (GstCollectData2 *) walk->data;
|
GstCollectData *c_data = (GstCollectData *) walk->data;
|
||||||
MpegPsPadData *ps_data = (MpegPsPadData *) walk->data;
|
MpegPsPadData *ps_data = (MpegPsPadData *) walk->data;
|
||||||
|
|
||||||
walk = g_slist_next (walk);
|
walk = g_slist_next (walk);
|
||||||
|
@ -396,11 +396,11 @@ mpegpsmux_choose_best_stream (MpegPsMux * mux)
|
||||||
/* Choose from which stream to mux with */
|
/* Choose from which stream to mux with */
|
||||||
|
|
||||||
MpegPsPadData *best = NULL;
|
MpegPsPadData *best = NULL;
|
||||||
GstCollectData2 *c_best = NULL;
|
GstCollectData *c_best = NULL;
|
||||||
GSList *walk;
|
GSList *walk;
|
||||||
|
|
||||||
for (walk = mux->collect->data; walk != NULL; walk = g_slist_next (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;
|
MpegPsPadData *ps_data = (MpegPsPadData *) walk->data;
|
||||||
|
|
||||||
if (ps_data->eos == FALSE) {
|
if (ps_data->eos == FALSE) {
|
||||||
|
@ -408,7 +408,7 @@ mpegpsmux_choose_best_stream (MpegPsMux * mux)
|
||||||
GstBuffer *buf;
|
GstBuffer *buf;
|
||||||
|
|
||||||
ps_data->queued_buf = 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 (buf != NULL) {
|
||||||
if (ps_data->prepare_func) {
|
if (ps_data->prepare_func) {
|
||||||
|
@ -469,7 +469,7 @@ mpegpsmux_choose_best_stream (MpegPsMux * mux)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (c_best) {
|
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;
|
return best;
|
||||||
|
@ -490,7 +490,7 @@ mpegpsmux_push_gop_list (MpegPsMux * mux)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
mpegpsmux_collected (GstCollectPads2 * pads, MpegPsMux * mux)
|
mpegpsmux_collected (GstCollectPads * pads, MpegPsMux * mux)
|
||||||
{
|
{
|
||||||
/* main muxing function */
|
/* main muxing function */
|
||||||
|
|
||||||
|
@ -597,7 +597,7 @@ mpegpsmux_request_new_pad (GstElement * element,
|
||||||
|
|
||||||
pad = gst_pad_new_from_template (templ, name);
|
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));
|
sizeof (MpegPsPadData));
|
||||||
if (pad_data == NULL)
|
if (pad_data == NULL)
|
||||||
goto pad_failure;
|
goto pad_failure;
|
||||||
|
@ -614,7 +614,7 @@ mpegpsmux_request_new_pad (GstElement * element,
|
||||||
could_not_add:
|
could_not_add:
|
||||||
GST_ELEMENT_ERROR (element, STREAM, FAILED,
|
GST_ELEMENT_ERROR (element, STREAM, FAILED,
|
||||||
("Internal data stream error."), ("Could not add pad to element"));
|
("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);
|
gst_object_unref (pad);
|
||||||
return NULL;
|
return NULL;
|
||||||
pad_failure:
|
pad_failure:
|
||||||
|
@ -649,7 +649,7 @@ mpegpsmux_release_pad (GstElement * element, GstPad * pad)
|
||||||
mux->video_stream_id = 0;
|
mux->video_stream_id = 0;
|
||||||
GST_OBJECT_UNLOCK (pad);
|
GST_OBJECT_UNLOCK (pad);
|
||||||
|
|
||||||
gst_collect_pads2_remove_pad (mux->collect, pad);
|
gst_collect_pads_remove_pad (mux->collect, pad);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -763,12 +763,12 @@ mpegpsmux_change_state (GstElement * element, GstStateChange transition)
|
||||||
case GST_STATE_CHANGE_NULL_TO_READY:
|
case GST_STATE_CHANGE_NULL_TO_READY:
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
||||||
gst_collect_pads2_start (mux->collect);
|
gst_collect_pads_start (mux->collect);
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||||
gst_collect_pads2_stop (mux->collect);
|
gst_collect_pads_stop (mux->collect);
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_READY_TO_NULL:
|
case GST_STATE_CHANGE_READY_TO_NULL:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
#define __MPEGPSMUX_H__
|
#define __MPEGPSMUX_H__
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/base/gstcollectpads2.h>
|
#include <gst/base/gstcollectpads.h>
|
||||||
#include <gst/base/gstadapter.h>
|
#include <gst/base/gstadapter.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
@ -70,7 +70,7 @@ struct MpegPsMux {
|
||||||
|
|
||||||
guint video_stream_id; /* stream id of primary video stream */
|
guint video_stream_id; /* stream id of primary video stream */
|
||||||
|
|
||||||
GstCollectPads2 *collect; /* pads collector */
|
GstCollectPads *collect; /* pads collector */
|
||||||
|
|
||||||
PsMux *psmux;
|
PsMux *psmux;
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ struct MpegPsMuxClass {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MpegPsPadData {
|
struct MpegPsPadData {
|
||||||
GstCollectData2 collect; /* Parent */
|
GstCollectData collect; /* Parent */
|
||||||
|
|
||||||
guint8 stream_id;
|
guint8 stream_id;
|
||||||
guint8 stream_id_ext;
|
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 release_buffer_cb (guint8 * data, void *user_data);
|
||||||
|
|
||||||
static void mpegtsdemux_prepare_srcpad (MpegTsMux * mux);
|
static void mpegtsdemux_prepare_srcpad (MpegTsMux * mux);
|
||||||
static GstFlowReturn mpegtsmux_collected (GstCollectPads2 * pads,
|
static GstFlowReturn mpegtsmux_collected (GstCollectPads * pads,
|
||||||
MpegTsMux * mux);
|
MpegTsMux * mux);
|
||||||
static GstPad *mpegtsmux_request_new_pad (GstElement * element,
|
static GstPad *mpegtsmux_request_new_pad (GstElement * element,
|
||||||
GstPadTemplate * templ, const gchar * name);
|
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_pad_set_event_function (mux->srcpad, mpegtsmux_src_event);
|
||||||
gst_element_add_pad (GST_ELEMENT (mux), mux->srcpad);
|
gst_element_add_pad (GST_ELEMENT (mux), mux->srcpad);
|
||||||
|
|
||||||
mux->collect = gst_collect_pads2_new ();
|
mux->collect = gst_collect_pads_new ();
|
||||||
gst_collect_pads2_set_function (mux->collect,
|
gst_collect_pads_set_function (mux->collect,
|
||||||
(GstCollectPads2Function) GST_DEBUG_FUNCPTR (mpegtsmux_collected), mux);
|
(GstCollectPadsFunction) GST_DEBUG_FUNCPTR (mpegtsmux_collected), mux);
|
||||||
|
|
||||||
mux->tsmux = tsmux_new ();
|
mux->tsmux = tsmux_new ();
|
||||||
tsmux_set_write_func (mux->tsmux, new_packet_cb, mux);
|
tsmux_set_write_func (mux->tsmux, new_packet_cb, mux);
|
||||||
|
@ -523,7 +523,7 @@ mpegtsmux_create_streams (MpegTsMux * mux)
|
||||||
|
|
||||||
/* Create the streams */
|
/* Create the streams */
|
||||||
while (walk) {
|
while (walk) {
|
||||||
GstCollectData2 *c_data = (GstCollectData2 *) walk->data;
|
GstCollectData *c_data = (GstCollectData *) walk->data;
|
||||||
MpegTsPadData *ts_data = (MpegTsPadData *) walk->data;
|
MpegTsPadData *ts_data = (MpegTsPadData *) walk->data;
|
||||||
gchar *name = NULL;
|
gchar *name = NULL;
|
||||||
|
|
||||||
|
@ -583,11 +583,11 @@ static MpegTsPadData *
|
||||||
mpegtsmux_choose_best_stream (MpegTsMux * mux)
|
mpegtsmux_choose_best_stream (MpegTsMux * mux)
|
||||||
{
|
{
|
||||||
MpegTsPadData *best = NULL;
|
MpegTsPadData *best = NULL;
|
||||||
GstCollectData2 *c_best = NULL;
|
GstCollectData *c_best = NULL;
|
||||||
GSList *walk;
|
GSList *walk;
|
||||||
|
|
||||||
for (walk = mux->collect->data; walk != NULL; walk = g_slist_next (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;
|
MpegTsPadData *ts_data = (MpegTsPadData *) walk->data;
|
||||||
|
|
||||||
if (ts_data->eos == FALSE) {
|
if (ts_data->eos == FALSE) {
|
||||||
|
@ -595,7 +595,7 @@ mpegtsmux_choose_best_stream (MpegTsMux * mux)
|
||||||
GstBuffer *buf;
|
GstBuffer *buf;
|
||||||
|
|
||||||
ts_data->queued_buf = 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 (buf != NULL) {
|
||||||
if (ts_data->prepare_func) {
|
if (ts_data->prepare_func) {
|
||||||
|
@ -657,14 +657,14 @@ mpegtsmux_choose_best_stream (MpegTsMux * mux)
|
||||||
}
|
}
|
||||||
if (c_best) {
|
if (c_best) {
|
||||||
GstBuffer *buffer;
|
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);
|
gst_buffer_unref (buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
return best;
|
return best;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define COLLECT_DATA_PAD(collect_data) (((GstCollectData2 *)(collect_data))->pad)
|
#define COLLECT_DATA_PAD(collect_data) (((GstCollectData *)(collect_data))->pad)
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
mpegtsmux_sink_event (GstPad * pad, GstEvent * event)
|
mpegtsmux_sink_event (GstPad * pad, GstEvent * event)
|
||||||
|
@ -848,7 +848,7 @@ out:
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
mpegtsmux_collected (GstCollectPads2 * pads, MpegTsMux * mux)
|
mpegtsmux_collected (GstCollectPads * pads, MpegTsMux * mux)
|
||||||
{
|
{
|
||||||
GstFlowReturn ret = GST_FLOW_OK;
|
GstFlowReturn ret = GST_FLOW_OK;
|
||||||
MpegTsPadData *best = NULL;
|
MpegTsPadData *best = NULL;
|
||||||
|
@ -991,7 +991,7 @@ mpegtsmux_request_new_pad (GstElement * element,
|
||||||
pad = gst_pad_new_from_template (templ, pad_name);
|
pad = gst_pad_new_from_template (templ, pad_name);
|
||||||
g_free (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));
|
sizeof (MpegTsPadData));
|
||||||
if (pad_data == NULL)
|
if (pad_data == NULL)
|
||||||
goto pad_failure;
|
goto pad_failure;
|
||||||
|
@ -1020,7 +1020,7 @@ stream_exists:
|
||||||
could_not_add:
|
could_not_add:
|
||||||
GST_ELEMENT_ERROR (element, STREAM, FAILED,
|
GST_ELEMENT_ERROR (element, STREAM, FAILED,
|
||||||
("Internal data stream error."), ("Could not add pad to element"));
|
("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);
|
gst_object_unref (pad);
|
||||||
return NULL;
|
return NULL;
|
||||||
pad_failure:
|
pad_failure:
|
||||||
|
@ -1038,7 +1038,7 @@ mpegtsmux_release_pad (GstElement * element, GstPad * pad)
|
||||||
GST_DEBUG_OBJECT (mux, "Pad %" GST_PTR_FORMAT " being released", pad);
|
GST_DEBUG_OBJECT (mux, "Pad %" GST_PTR_FORMAT " being released", pad);
|
||||||
|
|
||||||
if (mux->collect) {
|
if (mux->collect) {
|
||||||
gst_collect_pads2_remove_pad (mux->collect, pad);
|
gst_collect_pads_remove_pad (mux->collect, pad);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* chain up */
|
/* chain up */
|
||||||
|
@ -1300,12 +1300,12 @@ mpegtsmux_change_state (GstElement * element, GstStateChange transition)
|
||||||
case GST_STATE_CHANGE_NULL_TO_READY:
|
case GST_STATE_CHANGE_NULL_TO_READY:
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
||||||
gst_collect_pads2_start (mux->collect);
|
gst_collect_pads_start (mux->collect);
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||||
gst_collect_pads2_stop (mux->collect);
|
gst_collect_pads_stop (mux->collect);
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_READY_TO_NULL:
|
case GST_STATE_CHANGE_READY_TO_NULL:
|
||||||
if (mux->adapter)
|
if (mux->adapter)
|
||||||
|
|
|
@ -84,7 +84,7 @@
|
||||||
#define __MPEGTSMUX_H__
|
#define __MPEGTSMUX_H__
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/base/gstcollectpads2.h>
|
#include <gst/base/gstcollectpads.h>
|
||||||
#include <gst/base/gstadapter.h>
|
#include <gst/base/gstadapter.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
@ -108,7 +108,7 @@ struct MpegTsMux {
|
||||||
|
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
|
|
||||||
GstCollectPads2 *collect;
|
GstCollectPads *collect;
|
||||||
|
|
||||||
TsMux *tsmux;
|
TsMux *tsmux;
|
||||||
TsMuxProgram **programs;
|
TsMuxProgram **programs;
|
||||||
|
@ -139,7 +139,7 @@ struct MpegTsMuxClass {
|
||||||
#define MPEG_TS_PAD_DATA(data) ((MpegTsPadData *)(data))
|
#define MPEG_TS_PAD_DATA(data) ((MpegTsPadData *)(data))
|
||||||
|
|
||||||
struct MpegTsPadData {
|
struct MpegTsPadData {
|
||||||
GstCollectData2 collect; /* Parent */
|
GstCollectData collect; /* Parent */
|
||||||
|
|
||||||
gint pid;
|
gint pid;
|
||||||
TsMuxStream *stream;
|
TsMuxStream *stream;
|
||||||
|
|
|
@ -146,9 +146,9 @@ gst_mxf_mux_init (GstMXFMux * mux, GstMXFMuxClass * g_class)
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
gst_element_add_pad (GST_ELEMENT (mux), mux->srcpad);
|
gst_element_add_pad (GST_ELEMENT (mux), mux->srcpad);
|
||||||
|
|
||||||
mux->collect = gst_collect_pads2_new ();
|
mux->collect = gst_collect_pads_new ();
|
||||||
gst_collect_pads2_set_function (mux->collect,
|
gst_collect_pads_set_function (mux->collect,
|
||||||
(GstCollectPads2Function) GST_DEBUG_FUNCPTR (gst_mxf_mux_collected), mux);
|
(GstCollectPadsFunction) GST_DEBUG_FUNCPTR (gst_mxf_mux_collected), mux);
|
||||||
|
|
||||||
gst_mxf_mux_reset (mux);
|
gst_mxf_mux_reset (mux);
|
||||||
}
|
}
|
||||||
|
@ -209,7 +209,7 @@ gst_mxf_mux_reset (GstMXFMux * mux)
|
||||||
g_object_unref (cpad->adapter);
|
g_object_unref (cpad->adapter);
|
||||||
g_free (cpad->mapping_data);
|
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;
|
mux->state = GST_MXF_MUX_STATE_HEADER;
|
||||||
|
@ -268,7 +268,7 @@ gst_mxf_mux_handle_sink_event (GstPad * pad, GstEvent * event)
|
||||||
break;
|
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)
|
if (ret)
|
||||||
ret = mux->collect_event (pad, event);
|
ret = mux->collect_event (pad, event);
|
||||||
gst_object_unref (mux);
|
gst_object_unref (mux);
|
||||||
|
@ -420,13 +420,13 @@ gst_mxf_mux_request_new_pad (GstElement * element,
|
||||||
pad = gst_pad_new_from_template (templ, name);
|
pad = gst_pad_new_from_template (templ, name);
|
||||||
g_free (name);
|
g_free (name);
|
||||||
cpad = (GstMXFMuxPad *)
|
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->last_timestamp = 0;
|
||||||
cpad->adapter = gst_adapter_new ();
|
cpad->adapter = gst_adapter_new ();
|
||||||
cpad->writer = writer;
|
cpad->writer = writer;
|
||||||
|
|
||||||
/* FIXME: hacked way to override/extend the event function of
|
/* 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.
|
* element no access to events.
|
||||||
*/
|
*/
|
||||||
mux->collect_event = (GstPadEventFunction) GST_PAD_EVENTFUNC (pad);
|
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_object_unref (cpad->adapter);
|
||||||
g_free (cpad->mapping_data);
|
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); */
|
gst_element_remove_pad (element, pad); */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1099,7 +1099,7 @@ gst_mxf_mux_handle_buffer (GstMXFMux * mux, GstMXFMuxPad * cpad)
|
||||||
GstBuffer *packet;
|
GstBuffer *packet;
|
||||||
GstFlowReturn ret = GST_FLOW_OK;
|
GstFlowReturn ret = GST_FLOW_OK;
|
||||||
guint8 slen, ber[9];
|
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);
|
&& !cpad->have_complete_edit_unit && cpad->collect.buffer == NULL);
|
||||||
|
|
||||||
if (cpad->have_complete_edit_unit) {
|
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);
|
cpad->source_track->parent.track_id, cpad->pos);
|
||||||
buf = NULL;
|
buf = NULL;
|
||||||
} else if (!flush) {
|
} else if (!flush) {
|
||||||
buf = gst_collect_pads2_pop (mux->collect, &cpad->collect);
|
buf = gst_collect_pads_pop (mux->collect, &cpad->collect);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buf) {
|
if (buf) {
|
||||||
|
@ -1369,7 +1369,7 @@ _sort_mux_pads (gconstpointer a, gconstpointer b)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
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);
|
GstMXFMux *mux = GST_MXF_MUX (user_data);
|
||||||
GstMXFMuxPad *best = NULL;
|
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,
|
gst_util_uint64_scale ((mux->last_gc_position + 1) * GST_SECOND,
|
||||||
mux->min_edit_rate.d, mux->min_edit_rate.n);
|
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)
|
if (!pad_eos)
|
||||||
eos = FALSE;
|
eos = FALSE;
|
||||||
|
|
||||||
|
@ -1482,12 +1482,12 @@ gst_mxf_mux_change_state (GstElement * element, GstStateChange transition)
|
||||||
case GST_STATE_CHANGE_NULL_TO_READY:
|
case GST_STATE_CHANGE_NULL_TO_READY:
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
||||||
gst_collect_pads2_start (mux->collect);
|
gst_collect_pads_start (mux->collect);
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||||
gst_collect_pads2_stop (mux->collect);
|
gst_collect_pads_stop (mux->collect);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/base/gstadapter.h>
|
#include <gst/base/gstadapter.h>
|
||||||
#include <gst/base/gstcollectpads2.h>
|
#include <gst/base/gstcollectpads.h>
|
||||||
|
|
||||||
#include "mxfessence.h"
|
#include "mxfessence.h"
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ G_BEGIN_DECLS
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
GstCollectData2 collect;
|
GstCollectData collect;
|
||||||
|
|
||||||
guint64 pos;
|
guint64 pos;
|
||||||
GstClockTime last_timestamp;
|
GstClockTime last_timestamp;
|
||||||
|
@ -71,7 +71,7 @@ typedef struct _GstMXFMux {
|
||||||
GstElement element;
|
GstElement element;
|
||||||
|
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
GstCollectPads2 *collect;
|
GstCollectPads *collect;
|
||||||
|
|
||||||
/* <private> */
|
/* <private> */
|
||||||
GstPadEventFunction collect_event;
|
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,
|
static GstStateChangeReturn gst_ssim_change_state (GstElement * element,
|
||||||
GstStateChange transition);
|
GstStateChange transition);
|
||||||
|
|
||||||
static GstFlowReturn gst_ssim_collected (GstCollectPads2 * pads,
|
static GstFlowReturn gst_ssim_collected (GstCollectPads * pads,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
static GstElementClass *parent_class = NULL;
|
static GstElementClass *parent_class = NULL;
|
||||||
|
@ -901,7 +901,7 @@ gst_ssim_src_event (GstPad * pad, GstEvent * event)
|
||||||
/* check if we are flushing */
|
/* check if we are flushing */
|
||||||
if (flags & GST_SEEK_FLAG_FLUSH) {
|
if (flags & GST_SEEK_FLAG_FLUSH) {
|
||||||
/* make sure we accept nothing anymore and return WRONG_STATE */
|
/* 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
|
/* flushing seek, start flush downstream, the flush will be done
|
||||||
* when all pads received a FLUSH_STOP. */
|
* when all pads received a FLUSH_STOP. */
|
||||||
|
@ -991,7 +991,7 @@ gst_ssim_sink_event (GstPad * pad, GstEvent * event)
|
||||||
break;
|
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 ("Dispatching %s event on pad %s:%s", GST_EVENT_TYPE_NAME (event),
|
||||||
GST_DEBUG_PAD_NAME (pad));
|
GST_DEBUG_PAD_NAME (pad));
|
||||||
ret = ssim->collect_event (pad, event);
|
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_pad_set_getcaps_function (newpad,
|
||||||
GST_DEBUG_FUNCPTR (gst_ssim_sink_getcaps));
|
GST_DEBUG_FUNCPTR (gst_ssim_sink_getcaps));
|
||||||
gst_pad_set_setcaps_function (newpad, GST_DEBUG_FUNCPTR (gst_ssim_setcaps));
|
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
|
/* 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
|
* element no access to events
|
||||||
*/
|
*/
|
||||||
GST_DEBUG_OBJECT (ssim, "Current collect_event is %p, changing to %p",
|
GST_DEBUG_OBJECT (ssim, "Current collect_event is %p, changing to %p",
|
||||||
|
@ -1233,7 +1233,7 @@ could_not_add_src:
|
||||||
could_not_add_sink:
|
could_not_add_sink:
|
||||||
{
|
{
|
||||||
GST_DEBUG_OBJECT (ssim, "could not add sink pad");
|
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);
|
gst_object_unref (newpad);
|
||||||
return NULL;
|
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_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);
|
gst_element_remove_pad (element, pad);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1267,8 +1267,8 @@ gst_ssim_init (GstSSim * ssim)
|
||||||
ssim->sinkcaps = NULL;
|
ssim->sinkcaps = NULL;
|
||||||
|
|
||||||
/* keep track of the sinkpads requested */
|
/* keep track of the sinkpads requested */
|
||||||
ssim->collect = gst_collect_pads2_new ();
|
ssim->collect = gst_collect_pads_new ();
|
||||||
gst_collect_pads2_set_function (ssim->collect,
|
gst_collect_pads_set_function (ssim->collect,
|
||||||
GST_DEBUG_FUNCPTR (gst_ssim_collected), ssim);
|
GST_DEBUG_FUNCPTR (gst_ssim_collected), ssim);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1407,7 +1407,7 @@ gst_ssim_regenerate_windows (GstSSim * ssim)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_ssim_collected (GstCollectPads2 * pads, gpointer user_data)
|
gst_ssim_collected (GstCollectPads * pads, gpointer user_data)
|
||||||
{
|
{
|
||||||
GstSSim *ssim;
|
GstSSim *ssim;
|
||||||
GSList *collected;
|
GSList *collected;
|
||||||
|
@ -1440,12 +1440,12 @@ gst_ssim_collected (GstCollectPads2 * pads, gpointer user_data)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (collected = pads->data; collected; collected = g_slist_next (collected)) {
|
for (collected = pads->data; collected; collected = g_slist_next (collected)) {
|
||||||
GstCollectData2 *collect_data;
|
GstCollectData *collect_data;
|
||||||
GstBuffer *inbuf;
|
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) {
|
if (inbuf == NULL) {
|
||||||
GST_LOG_OBJECT (ssim, "channel %p: no bytes available", collect_data);
|
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;
|
for (collected = pads->data; collected;
|
||||||
collected = g_slist_next (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) {
|
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_DEBUG_OBJECT (ssim, "Original stream - flags(0x%x), timestamp(%"
|
||||||
GST_TIME_FORMAT "), duration(%" GST_TIME_FORMAT ")",
|
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");
|
GST_LOG_OBJECT (ssim, "starting to cycle through streams");
|
||||||
|
|
||||||
for (collected = pads->data; collected; collected = g_slist_next (collected)) {
|
for (collected = pads->data; collected; collected = g_slist_next (collected)) {
|
||||||
GstCollectData2 *collect_data;
|
GstCollectData *collect_data;
|
||||||
GstBuffer *inbuf;
|
GstBuffer *inbuf;
|
||||||
guint8 *indata;
|
guint8 *indata;
|
||||||
|
|
||||||
collect_data = (GstCollectData2 *) collected->data;
|
collect_data = (GstCollectData *) collected->data;
|
||||||
|
|
||||||
if (collect_data->pad != ssim->orig) {
|
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);
|
indata = GST_BUFFER_DATA (inbuf);
|
||||||
|
|
||||||
|
@ -1659,7 +1659,7 @@ gst_ssim_change_state (GstElement * element, GstStateChange transition)
|
||||||
ssim->segment_position = 0;
|
ssim->segment_position = 0;
|
||||||
ssim->segment_rate = 1.0;
|
ssim->segment_rate = 1.0;
|
||||||
gst_segment_init (&ssim->segment, GST_FORMAT_UNDEFINED);
|
gst_segment_init (&ssim->segment, GST_FORMAT_UNDEFINED);
|
||||||
gst_collect_pads2_start (ssim->collect);
|
gst_collect_pads_start (ssim->collect);
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
||||||
break;
|
break;
|
||||||
|
@ -1667,7 +1667,7 @@ gst_ssim_change_state (GstElement * element, GstStateChange transition)
|
||||||
/* need to unblock the collectpads before calling the
|
/* need to unblock the collectpads before calling the
|
||||||
* parent change_state so that streaming can finish
|
* parent change_state so that streaming can finish
|
||||||
*/
|
*/
|
||||||
gst_collect_pads2_stop (ssim->collect);
|
gst_collect_pads_stop (ssim->collect);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define __GST_SSIM_H__
|
#define __GST_SSIM_H__
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/base/gstcollectpads2.h>
|
#include <gst/base/gstcollectpads.h>
|
||||||
#include <gst/video/video.h>
|
#include <gst/video/video.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
@ -85,7 +85,7 @@ struct _GstSSim {
|
||||||
|
|
||||||
gint padcount;
|
gint padcount;
|
||||||
|
|
||||||
GstCollectPads2 *collect;
|
GstCollectPads *collect;
|
||||||
GstPad *orig;
|
GstPad *orig;
|
||||||
|
|
||||||
gint frame_rate;
|
gint frame_rate;
|
||||||
|
|
|
@ -318,7 +318,7 @@ gchar *
|
||||||
ks_guid_to_string (const GUID * guid)
|
ks_guid_to_string (const GUID * guid)
|
||||||
{
|
{
|
||||||
return g_strdup_printf ("{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
|
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[2], guid->Data4[3], guid->Data4[4], guid->Data4[5],
|
||||||
guid->Data4[6], guid->Data4[7]);
|
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'),
|
"format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('d', 'v', 's', 'd'),
|
||||||
NULL);
|
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) {
|
sizeof (subtype_guid) - sizeof (subtype_guid.Data1)) == 0) {
|
||||||
guint8 *p = (guint8 *) & subtype_guid.Data1;
|
guint8 *p = (guint8 *) & subtype_guid.Data1;
|
||||||
|
|
||||||
|
@ -240,7 +240,7 @@ ks_video_format_to_structure (GUID subtype_guid, GUID format_guid)
|
||||||
|
|
||||||
if (!structure) {
|
if (!structure) {
|
||||||
GST_DEBUG ("Unknown DirectShow Video GUID %08x-%04x-%04x-%04x-%08x%04x",
|
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, *(DWORD *) & subtype_guid.Data4[2],
|
||||||
*(WORD *) & subtype_guid.Data4[6]);
|
*(WORD *) & subtype_guid.Data4[6]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue