newsegment API update.

Original commit message from CVS:
* ext/dv/gstdvdemux.c: (gst_dvdemux_handle_sink_event),
(gst_dvdemux_demux_frame):
* ext/flac/gstflacdec.c: (gst_flacdec_write):
* gst/auparse/gstauparse.c: (gst_auparse_chain):
* gst/avi/gstavidemux.c: (gst_avi_demux_stream_header),
(gst_avi_demux_handle_seek):
* gst/goom/gstgoom.c: (gst_goom_event):
* gst/wavenc/gstwavenc.c: (gst_wavenc_stop_file):
* gst/wavparse/gstwavparse.c: (gst_wavparse_handle_seek),
(gst_wavparse_stream_headers), (gst_wavparse_stream_data),
(gst_wavparse_loop), (gst_wavparse_pad_convert),
(gst_wavparse_srcpad_event):
newsegment API update.
This commit is contained in:
Wim Taymans 2005-10-11 16:33:08 +00:00
parent d9100aa5d0
commit 3a6dd6c30c
9 changed files with 30 additions and 17 deletions

View file

@ -1,3 +1,19 @@
2005-10-11 Wim Taymans <wim@fluendo.com>
* ext/dv/gstdvdemux.c: (gst_dvdemux_handle_sink_event),
(gst_dvdemux_demux_frame):
* ext/flac/gstflacdec.c: (gst_flacdec_write):
* gst/auparse/gstauparse.c: (gst_auparse_chain):
* gst/avi/gstavidemux.c: (gst_avi_demux_stream_header),
(gst_avi_demux_handle_seek):
* gst/goom/gstgoom.c: (gst_goom_event):
* gst/wavenc/gstwavenc.c: (gst_wavenc_stop_file):
* gst/wavparse/gstwavparse.c: (gst_wavparse_handle_seek),
(gst_wavparse_stream_headers), (gst_wavparse_stream_data),
(gst_wavparse_loop), (gst_wavparse_pad_convert),
(gst_wavparse_srcpad_event):
newsegment API update.
2005-10-11 Andy Wingo <wingo@pobox.com> 2005-10-11 Andy Wingo <wingo@pobox.com>
* ext/speex/gstspeexenc.c: Signedness cleanups. * ext/speex/gstspeexenc.c: Signedness cleanups.

2
common

@ -1 +1 @@
Subproject commit 221ccc0dc85b2d38bc5e2fc3f21cd80971777791 Subproject commit 615cf4d4506ef1ffb1f600c434fced1fa26b0f44

View file

@ -598,7 +598,7 @@ gst_dvdemux_handle_sink_event (GstPad * pad, GstEvent * event)
GST_STREAM_LOCK (pad); GST_STREAM_LOCK (pad);
/* parse byte start and stop positions */ /* parse byte start and stop positions */
gst_event_parse_newsegment (event, NULL, &format, gst_event_parse_newsegment (event, NULL, NULL, &format,
&dvdemux->start_byte, &dvdemux->stop_byte, NULL); &dvdemux->start_byte, &dvdemux->stop_byte, NULL);
/* and queue a DISCONT before sending the next set of buffers */ /* and queue a DISCONT before sending the next set of buffers */
@ -873,7 +873,7 @@ gst_dvdemux_demux_frame (GstDVDemux * dvdemux, const guint8 * data)
} }
} }
event = gst_event_new_newsegment (1.0, GST_FORMAT_TIME, event = gst_event_new_newsegment (FALSE, 1.0, GST_FORMAT_TIME,
dvdemux->start_timestamp, dvdemux->stop_timestamp, 0); dvdemux->start_timestamp, dvdemux->stop_timestamp, 0);
gst_dvdemux_send_event (dvdemux, event); gst_dvdemux_send_event (dvdemux, event);

View file

@ -437,7 +437,7 @@ gst_flacdec_write (const FLAC__SeekableStreamDecoder * decoder,
format = GST_FORMAT_TIME; format = GST_FORMAT_TIME;
gst_flacdec_convert_src (flacdec->srcpad, GST_FORMAT_DEFAULT, gst_flacdec_convert_src (flacdec->srcpad, GST_FORMAT_DEFAULT,
flacdec->total_samples, &format, &time); flacdec->total_samples, &format, &time);
newsegment = gst_event_new_newsegment (1.0, GST_FORMAT_TIME, time, newsegment = gst_event_new_newsegment (FALSE, 1.0, GST_FORMAT_TIME, time,
GST_CLOCK_TIME_NONE, 0); GST_CLOCK_TIME_NONE, 0);
if (!gst_pad_push_event (flacdec->srcpad, newsegment)) if (!gst_pad_push_event (flacdec->srcpad, newsegment))

View file

@ -370,7 +370,7 @@ Samples :
event = NULL; event = NULL;
event = gst_event_new_newsegment (1.0, GST_FORMAT_DEFAULT, event = gst_event_new_newsegment (FALSE, 1.0, GST_FORMAT_DEFAULT,
0, GST_CLOCK_TIME_NONE, 0); 0, GST_CLOCK_TIME_NONE, 0);

View file

@ -1957,7 +1957,7 @@ done:
} }
/* send initial discont */ /* send initial discont */
avi->seek_event = gst_event_new_newsegment (1.0, avi->seek_event = gst_event_new_newsegment (FALSE, 1.0,
GST_FORMAT_TIME, (gint64) 0, GST_FORMAT_TIME, (gint64) 0,
(gint64) (((gfloat) avi->stream[0].strh->scale) * (gint64) (((gfloat) avi->stream[0].strh->scale) *
avi->stream[0].strh->length / avi->stream[0].strh->length /
@ -1989,7 +1989,7 @@ gst_avi_demux_handle_seek (GstAviDemux * avi, guint64 time)
avi->last_seek = time; avi->last_seek = time;
avi->current_entry = avi->seek_entry; avi->current_entry = avi->seek_entry;
avi->seek_event = gst_event_new_newsegment (1.0, avi->seek_event = gst_event_new_newsegment (FALSE, 1.0,
GST_FORMAT_TIME, time, GST_FORMAT_TIME, time,
(gint64) (((gfloat) avi->stream[0].strh->scale) * (gint64) (((gfloat) avi->stream[0].strh->scale) *
avi->stream[0].strh->length / avi->stream[0].strh->length /

View file

@ -291,7 +291,8 @@ gst_goom_event (GstPad * pad, GstEvent * event)
gint64 start = 0, stop = 0; gint64 start = 0, stop = 0;
GstFormat format; GstFormat format;
gst_event_parse_newsegment (event, NULL, &format, &start, &stop, NULL); gst_event_parse_newsegment (event, NULL, NULL, &format, &start, &stop,
NULL);
gst_adapter_clear (goom->adapter); gst_adapter_clear (goom->adapter);
goom->audio_basetime = start; goom->audio_basetime = start;
goom->samples_consumed = 0; goom->samples_consumed = 0;

View file

@ -264,7 +264,7 @@ gst_wavenc_stop_file (GstWavEnc * wavenc)
GstEvent *event; GstEvent *event;
GstBuffer *outbuf; GstBuffer *outbuf;
event = gst_event_new_newsegment (1.0, GST_FORMAT_TIME, event = gst_event_new_newsegment (FALSE, 1.0, GST_FORMAT_TIME,
0, GST_CLOCK_TIME_NONE, 0); 0, GST_CLOCK_TIME_NONE, 0);
gst_pad_push_event (wavenc->srcpad, event); gst_pad_push_event (wavenc->srcpad, event);

View file

@ -730,8 +730,7 @@ gst_wavparse_handle_seek (GstWavParse * wav, gboolean update)
wav->offset, wav->dataleft, GST_TIME_ARGS (start_time), wav->offset, wav->dataleft, GST_TIME_ARGS (start_time),
GST_TIME_ARGS (stop_time)); GST_TIME_ARGS (stop_time));
/* wav->seek_event = gst_event_new_newsegment (!update, wav->segment_rate, */ wav->seek_event = gst_event_new_newsegment (!update, wav->segment_rate,
wav->seek_event = gst_event_new_newsegment (wav->segment_rate,
GST_FORMAT_TIME, start_time, stop_time, 0); GST_FORMAT_TIME, start_time, stop_time, 0);
if (flush) if (flush)
@ -854,8 +853,7 @@ gst_wavparse_stream_headers (GstWavParse * wav)
wav->segment_stop = (gint64) GST_SECOND *wav->datasize / wav->bps; wav->segment_stop = (gint64) GST_SECOND *wav->datasize / wav->bps;
/* Initial discont */ /* Initial discont */
/* wav->seek_event = gst_event_new_newsegment (FALSE, 1.0, */ wav->seek_event = gst_event_new_newsegment (FALSE, 1.0,
wav->seek_event = gst_event_new_newsegment (1.0,
GST_FORMAT_TIME, wav->segment_start, wav->segment_stop, 0); GST_FORMAT_TIME, wav->segment_start, wav->segment_stop, 0);
return GST_FLOW_OK; return GST_FLOW_OK;
@ -1027,8 +1025,8 @@ pause:
if (GST_FLOW_IS_FATAL (ret)) { if (GST_FLOW_IS_FATAL (ret)) {
/* for fatal errors we post an error message */ /* for fatal errors we post an error message */
GST_ELEMENT_ERROR (wav, STREAM, STOPPED, GST_ELEMENT_ERROR (wav, STREAM, STOPPED,
("streaming stopped, reason %d", ret), ("streaming stopped, reason %s", gst_flow_get_name (ret)),
("streaming stopped, reason %d", ret)); ("streaming stopped, reason %s", gst_flow_get_name (ret)));
gst_pad_push_event (wav->srcpad, gst_event_new_eos ()); gst_pad_push_event (wav->srcpad, gst_event_new_eos ());
} }
} }
@ -1220,8 +1218,6 @@ gst_wavparse_srcpad_event (GstPad * pad, GstEvent * event)
GST_DEBUG ("event %d", GST_EVENT_TYPE (event)); GST_DEBUG ("event %d", GST_EVENT_TYPE (event));
/* TODO : we need to call handle_seek */
switch (GST_EVENT_TYPE (event)) { switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEEK: case GST_EVENT_SEEK:
{ {