-Subproject commit b7abb510aa14e8692df39ea8c2c758e37d8a8d8a
+Subproject commit e903f88a7388f0b463204ea1f960a4ace840175b
GST_BUFFER_TIMESTAMP (buf) = timestamp;
float_to_int (samples, (int16_t *) GST_BUFFER_DATA (buf), flags);
- gst_pad_push (srcpad, buf);
+ gst_pad_push (srcpad, GST_DATA (buf));
return 0;
}
static void dvdnavsrc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
static void dvdnavsrc_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
-static GstBuffer * dvdnavsrc_get (GstPad *pad);
+static GstData * dvdnavsrc_get (GstPad *pad);
/*static GstBuffer * dvdnavsrc_get_region (GstPad *pad,gulong offset,gulong size); */
static gboolean dvdnavsrc_event (GstPad *pad, GstEvent *event);
static const GstEventMask*
}
}
-static GstBuffer *
+static GstData *
dvdnavsrc_get (GstPad *pad)
{
DVDNavSrc *src;
static void dvdreadsrc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
static void dvdreadsrc_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
-/*static GstBuffer * dvdreadsrc_get (GstPad *pad); */
+/*static GstData * dvdreadsrc_get (GstPad *pad); */
static void dvdreadsrc_loop (GstElement *element);
/*static GstBuffer * dvdreadsrc_get_region (GstPad *pad,gulong offset,gulong size); */
}
GST_BUFFER_SIZE(buf) = cur_output_size * DVD_VIDEO_LB_LEN;
- gst_pad_push(priv->srcpad, buf);
+ gst_pad_push(priv->srcpad, GST_DATA (buf));
priv->cur_pack = next_vobu;
}
}
return 0;
}
-static GstBuffer *
+static GstData *
dvdreadsrc_get (GstPad *pad)
{
DVDReadSrc *dvdreadsrc;
const GValue *value, GParamSpec *pspec);
static void gst_lame_get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec);
-static void gst_lame_chain (GstPad *pad, GstBuffer *buf);
+static void gst_lame_chain (GstPad *pad, GstData *_data);
static gboolean gst_lame_setup (GstLame *lame);
static GstElementStateReturn gst_lame_change_state (GstElement *element);
}
static void
-gst_lame_chain (GstPad *pad, GstBuffer *buf)
+gst_lame_chain (GstPad *pad, GstData *_data)
{
+ GstBuffer *buf = GST_BUFFER (_data);
GstLame *lame;
GstBuffer *outbuf;
gchar *mp3_data = NULL;
GST_BUFFER_OFFSET (outbuf) = lame->last_offs;
GST_BUFFER_DURATION (outbuf) = lame->last_duration;
- gst_pad_push (lame->srcpad,outbuf);
+ gst_pad_push (lame->srcpad,GST_DATA (outbuf));
lame->last_ts = GST_CLOCK_TIME_NONE;
}
}
if (eos) {
- gst_pad_push (lame->srcpad, GST_BUFFER (gst_event_new (GST_EVENT_EOS)));
+ gst_pad_push (lame->srcpad, GST_DATA (gst_event_new (GST_EVENT_EOS))));
gst_element_set_eos (GST_ELEMENT (lame));
}
}
gint64 src_value, GstFormat
*dest_format, gint64 *dest_value);
-static void gst_mad_chain (GstPad *pad, GstBuffer *buffer);
+static void gst_mad_chain (GstPad *pad, GstData *_data);
static GstElementStateReturn
gst_mad_change_state (GstElement *element);
{
discont = gst_event_new_discontinuous (FALSE, GST_FORMAT_TIME,
time, NULL);
- gst_pad_push (mad->srcpad, GST_BUFFER (discont));
+ gst_pad_push (mad->srcpad, GST_DATA (discont));
}
break;
}
}
static void
-gst_mad_chain (GstPad *pad, GstBuffer *buffer)
+gst_mad_chain (GstPad *pad, GstData *_data)
{
+ GstBuffer *buffer = GST_BUFFER (_data);
GstMad *mad;
gchar *data;
glong size;
}
}
- gst_pad_push (mad->srcpad, outbuffer);
+ gst_pad_push (mad->srcpad, GST_DATA (outbuffer));
}
mad->total_samples += nsamples;
static GstElementStateReturn
gst_mpeg2dec_change_state (GstElement *element);
-static void gst_mpeg2dec_chain (GstPad *pad, GstBuffer *buffer);
+static void gst_mpeg2dec_chain (GstPad *pad, GstData *_data);
static GstElementClass *parent_class = NULL;
/*static guint gst_mpeg2dec_signals[LAST_SIGNAL] = { 0 };*/
}
static void
-gst_mpeg2dec_chain (GstPad *pad, GstBuffer *buf)
+gst_mpeg2dec_chain (GstPad *pad, GstData *_data)
{
+ GstBuffer *buf = GST_BUFFER (_data);
GstMpeg2dec *mpeg2dec = GST_MPEG2DEC (gst_pad_get_parent (pad));
guint32 size;
guint8 *data, *end;
else {
/* TODO set correct offset here based on frame number */
GST_BUFFER_DURATION (outbuf) = mpeg2dec->frame_period;
- gst_pad_push (mpeg2dec->srcpad, outbuf);
+ gst_pad_push (mpeg2dec->srcpad, GST_DATA (outbuf));
}
}
if (info->discard_fbuf && info->discard_fbuf->id) {
memcpy (GST_BUFFER_DATA (udbuf), info->user_data, info->user_data_len);
- gst_pad_push (mpeg2dec->userdatapad, udbuf);
+ gst_pad_push (mpeg2dec->userdatapad, GST_DATA (udbuf));
}
}
}
static void gst_ac3parse_init (GstAc3Parse *ac3parse);
static void gst_ac3parse_chain (GstPad *pad,
- GstBuffer *buf);
+ GstData *data);
static void gst_ac3parse_set_property (GObject *object,
guint prop_id,
}
static void
-gst_ac3parse_chain (GstPad *pad, GstBuffer *buf)
+gst_ac3parse_chain (GstPad *pad, GstData *_data)
{
+ GstBuffer *buf = GST_BUFFER (_data);
GstAc3Parse *ac3parse;
guchar *data;
glong size,offset = 0;
offset += bpf;
if (ac3parse->skip == 0 && GST_PAD_IS_LINKED(ac3parse->srcpad)) {
GST_DEBUG ("ac3parse: pushing buffer of %d bytes",GST_BUFFER_SIZE(outbuf));
- gst_pad_push(ac3parse->srcpad,outbuf);
+ gst_pad_push(ac3parse->srcpad,GST_DATA (outbuf));
}
else {
GST_DEBUG ("ac3parse: skipping buffer of %d bytes",GST_BUFFER_SIZE(outbuf));
GST_DEBUG ("Sending strem %d of size %d", stream->id , segment_info->chunk_size);
GST_INFO ( "Pushing pad");
- gst_pad_push (stream->pad, stream->payload);
+ gst_pad_push (stream->pad, GST_DATA (stream->payload));
}
stream->frag_offset = 0;
asf_demux->last_seek, stream->delay, asf_demux->last_seek + stream->delay);
discont = gst_event_new_discontinuous (FALSE, GST_FORMAT_TIME,
asf_demux->last_seek + stream->delay , NULL);
- gst_pad_push (stream->pad, GST_BUFFER (discont));
+ gst_pad_push (stream->pad, GST_DATA (discont));
}
}
break;
stream->connected == TRUE &&
GST_PAD_IS_USABLE (stream->pad) &&
stream->eos == FALSE) {
- buffer = gst_pad_pull (stream->pad);
+ buffer = GST_BUFFER (gst_pad_pull (stream->pad));
if (GST_IS_EVENT (buffer)) {
gst_asfmux_handle_event (stream->pad, GST_EVENT (buffer));
} else {
gst_asfmux_put_flush (GstAsfMux *asfmux)
{
gst_pad_push (asfmux->srcpad,
- GST_BUFFER (gst_event_new_flush ()));
+ GST_DATA (gst_event_new_flush ()));
}
/* write an asf chunk (only used in streaming case) */
gst_asfmux_put_byte (header, 1); /* ??? */
gst_asfmux_put_byte (header, 1); /* ??? */
- gst_pad_push (asfmux->srcpad, header);
+ gst_pad_push (asfmux->srcpad, GST_DATA (header));
asfmux->write_header = FALSE;
}
GstBuffer *footer = gst_buffer_new_and_alloc (16);
GST_BUFFER_SIZE (footer) = 0;
gst_asfmux_put_chunk (footer, asfmux, 0x4524, 0, 0); /* end of stream */
- gst_pad_push (asfmux->srcpad, footer);
+ gst_pad_push (asfmux->srcpad, GST_DATA (footer));
} else if (gst_asfmux_can_seek (asfmux)) {
/* rewrite an updated header */
guint64 filesize;
gst_pad_query (asfmux->srcpad, GST_QUERY_POSITION,
&fmt, &filesize);
event = gst_event_new_seek (GST_SEEK_METHOD_SET | GST_FORMAT_BYTES, 0);
- gst_pad_push (asfmux->srcpad, GST_BUFFER (event));
+ gst_pad_push (asfmux->srcpad, GST_DATA (event));
gst_asfmux_file_start (asfmux, filesize, filesize - asfmux->data_offset);
event = gst_event_new_seek (GST_SEEK_METHOD_SET | GST_FORMAT_BYTES, filesize);
- gst_pad_push (asfmux->srcpad, GST_BUFFER (event));
+ gst_pad_push (asfmux->srcpad, GST_DATA (event));
}
gst_asfmux_put_flush (asfmux);
GST_BUFFER_SIZE (packet) = GST_ASF_PACKET_SIZE - header_size;
/* send packet over */
- gst_pad_push (asfmux->srcpad, header);
- gst_pad_push (asfmux->srcpad, packet);
+ gst_pad_push (asfmux->srcpad, GST_DATA (header));
+ gst_pad_push (asfmux->srcpad, GST_DATA (packet));
gst_asfmux_put_flush (asfmux);
asfmux->num_packets++;
asfmux->packet_frames = 0;
/* simply finish off the file and send EOS */
gst_asfmux_file_stop (asfmux);
gst_pad_push (asfmux->srcpad,
- GST_BUFFER (gst_event_new (GST_EVENT_EOS)));
+ GST_DATA (gst_event_new (GST_EVENT_EOS)));
gst_element_set_eos (GST_ELEMENT(asfmux));
return FALSE;
}
static void gst_mp3parse_class_init (GstMPEGAudioParseClass *klass);
static void gst_mp3parse_init (GstMPEGAudioParse *mp3parse);
-static void gst_mp3parse_chain (GstPad *pad,GstBuffer *buf);
+static void gst_mp3parse_chain (GstPad *pad,GstData *_data);
static long bpf_from_header (GstMPEGAudioParse *parse, unsigned long header);
static int head_check (unsigned long head);
}
static void
-gst_mp3parse_chain (GstPad *pad, GstBuffer *buf)
+gst_mp3parse_chain (GstPad *pad, GstData *_data)
{
+ GstBuffer *buf = GST_BUFFER (_data);
GstMPEGAudioParse *mp3parse;
guchar *data;
glong size,offset = 0;
GST_BUFFER_DURATION(outbuf) = 8 * (GST_SECOND/1000) * GST_BUFFER_SIZE(outbuf) / mp3parse->bit_rate;
if (GST_PAD_CAPS (mp3parse->srcpad) != NULL) {
- gst_pad_push(mp3parse->srcpad,outbuf);
+ gst_pad_push(mp3parse->srcpad,GST_DATA (outbuf));
} else {
GST_DEBUG ("No capsnego yet, delaying buffer push");
gst_buffer_unref (outbuf);
discont = gst_event_new_discontinuous (FALSE, GST_FORMAT_TIME,
current_time, NULL);
- gst_pad_push (mpeg_demux->video_stream[i]->pad, GST_BUFFER (discont));
+ gst_pad_push (mpeg_demux->video_stream[i]->pad, GST_DATA (discont));
}
if (mpeg_demux->audio_stream[i] &&
GST_PAD_IS_USABLE (mpeg_demux->audio_stream[i]->pad))
discont = gst_event_new_discontinuous (FALSE, GST_FORMAT_TIME,
current_time, NULL);
- gst_pad_push (mpeg_demux->audio_stream[i]->pad, GST_BUFFER (discont));
+ gst_pad_push (mpeg_demux->audio_stream[i]->pad, GST_DATA (discont));
}
}
}
event = gst_event_new_discontinuous (FALSE, GST_FORMAT_TIME,
MPEGTIME_TO_GSTTIME (time), NULL);
- gst_pad_push (*outpad, GST_BUFFER (event));
+ gst_pad_push (*outpad, GST_DATA (event));
}
}
else {
GST_DEBUG ("pushing buffer of len %d id %d, ts %" G_GINT64_FORMAT,
datalen, id, GST_BUFFER_TIMESTAMP (outbuf));
- gst_pad_push (outpad, outbuf);
+ gst_pad_push (outpad, GST_DATA (outbuf));
}
return TRUE;
GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
GST_BUFFER_OFFSET (outbuf) = GST_BUFFER_OFFSET (buffer) + headerlen + 4;
- gst_pad_push(*outpad,outbuf);
+ gst_pad_push(*outpad, GST_DATA (outbuf));
}
}
GST_DEBUG ("current_scr %" G_GINT64_FORMAT, time);
if (GST_PAD_IS_USABLE (mpeg_parse->srcpad))
- gst_pad_push (mpeg_parse->srcpad, GST_BUFFER (data));
+ gst_pad_push (mpeg_parse->srcpad, GST_DATA (data));
else
gst_data_unref (data);
}
MPEGTIME_TO_GSTTIME (mpeg_parse->current_scr), NULL);
if (GST_PAD_IS_USABLE (mpeg_parse->srcpad))
- gst_pad_push (mpeg_parse->srcpad, GST_BUFFER (event));
+ gst_pad_push (mpeg_parse->srcpad, GST_DATA (event));
else
gst_event_unref (event);
}
gst_rfc2250_enc_new_buffer (GstRFC2250Enc *enc)
{
if (enc->packet) {
- gst_pad_push (enc->srcpad, enc->packet);
+ gst_pad_push (enc->srcpad, GST_DATA (enc->packet));
}
enc->packet = gst_buffer_new ();
enc->flags = 0;
}
else {
if (enc->packet) {
- gst_pad_push (enc->srcpad, enc->packet);
+ gst_pad_push (enc->srcpad, GST_DATA (enc->packet));
enc->packet = NULL;
enc->flags = 0;
enc->remaining = enc->MTU;
for(i=0;i<rmdemux->n_streams;i++){
GstPad *pad = rmdemux->streams[i]->pad;
if(pad){
- gst_pad_push(pad, GST_BUFFER(gst_event_new(GST_EVENT_EOS)));
+ gst_pad_push(pad, GST_DATA(gst_event_new(GST_EVENT_EOS)));
}
}
stream = gst_rmdemux_get_stream_by_id(rmdemux, id);
if(stream->pad){
- gst_pad_push(stream->pad, buffer);
+ gst_pad_push(stream->pad, GST_DATA (buffer));
}
rmdemux->chunk_index++;
static void gst_synaesthesia_get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec);
-static void gst_synaesthesia_chain (GstPad *pad, GstBuffer *buf);
+static void gst_synaesthesia_chain (GstPad *pad, GstData *_data);
static GstElementStateReturn
gst_synaesthesia_change_state (GstElement *element);
}
static void
-gst_synaesthesia_chain (GstPad *pad, GstBuffer *bufin)
+gst_synaesthesia_chain (GstPad *pad, GstData *_data)
{
+ GstBuffer *bufin = GST_BUFFER (_data);
GstSynaesthesia *synaesthesia;
GstBuffer *bufout;
guint32 samples_in;
synaesthesia->next_time += GST_SECOND / synaesthesia->fps;
- gst_pad_push (synaesthesia->srcpad, bufout);
+ gst_pad_push (synaesthesia->srcpad, GST_DATA (bufout));
gst_buffer_unref (bufin);