mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 23:18:52 +00:00
newsegment API update.
Original commit message from CVS: * ext/mad/gstid3tag.c: (gst_id3_tag_sink_event): * ext/mad/gstmad.c: (gst_mad_chain): * gst/mpegaudioparse/gstmpegaudioparse.c: (gst_mp3parse_sink_event), (gst_mp3parse_chain): * gst/realmedia/rmdemux.c: (gst_rmdemux_perform_seek), (gst_rmdemux_chain), (gst_rmdemux_add_stream): newsegment API update.
This commit is contained in:
parent
fae42be53d
commit
f7690579ef
6 changed files with 23 additions and 13 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2005-10-11 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* ext/mad/gstid3tag.c: (gst_id3_tag_sink_event):
|
||||||
|
* ext/mad/gstmad.c: (gst_mad_chain):
|
||||||
|
* gst/mpegaudioparse/gstmpegaudioparse.c:
|
||||||
|
(gst_mp3parse_sink_event), (gst_mp3parse_chain):
|
||||||
|
* gst/realmedia/rmdemux.c: (gst_rmdemux_perform_seek),
|
||||||
|
(gst_rmdemux_chain), (gst_rmdemux_add_stream):
|
||||||
|
newsegment API update.
|
||||||
|
|
||||||
2005-10-06 Wim Taymans <wim@fluendo.com>
|
2005-10-06 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* ext/amrnb/amrnbdec.c:
|
* ext/amrnb/amrnbdec.c:
|
||||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
||||||
Subproject commit 7d175466d3319fe55327608ea1f7a20619ab5634
|
Subproject commit 615cf4d4506ef1ffb1f600c434fced1fa26b0f44
|
|
@ -795,8 +795,8 @@ gst_id3_tag_sink_event (GstPad * pad, GstEvent * event)
|
||||||
GstFormat format = GST_FORMAT_UNDEFINED;
|
GstFormat format = GST_FORMAT_UNDEFINED;
|
||||||
gint64 value, end_value;
|
gint64 value, end_value;
|
||||||
|
|
||||||
gst_event_parse_newsegment (event, NULL, &format, &value, &end_value,
|
gst_event_parse_newsegment (event, NULL, NULL, &format, &value,
|
||||||
NULL);
|
&end_value, NULL);
|
||||||
|
|
||||||
if (format == GST_FORMAT_BYTES || format == GST_FORMAT_DEFAULT) {
|
if (format == GST_FORMAT_BYTES || format == GST_FORMAT_DEFAULT) {
|
||||||
if (value !=
|
if (value !=
|
||||||
|
@ -845,15 +845,15 @@ gst_id3_tag_sink_event (GstPad * pad, GstEvent * event)
|
||||||
gdouble rate;
|
gdouble rate;
|
||||||
gint64 value, end_value, base;
|
gint64 value, end_value, base;
|
||||||
|
|
||||||
gst_event_parse_newsegment (event, &rate, &format, &value, &end_value,
|
gst_event_parse_newsegment (event, NULL, &rate, &format, &value,
|
||||||
&base);
|
&end_value, &base);
|
||||||
if (format == GST_FORMAT_BYTES || format == GST_FORMAT_DEFAULT) {
|
if (format == GST_FORMAT_BYTES || format == GST_FORMAT_DEFAULT) {
|
||||||
if (value > tag->v2tag_size) {
|
if (value > tag->v2tag_size) {
|
||||||
value -= tag->v2tag_size;
|
value -= tag->v2tag_size;
|
||||||
gst_event_unref (event);
|
gst_event_unref (event);
|
||||||
event =
|
event =
|
||||||
gst_event_new_newsegment (rate, format, value, end_value,
|
gst_event_new_newsegment (FALSE, rate, format, value,
|
||||||
base);
|
end_value, base);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (tag->srcpad)
|
if (tag->srcpad)
|
||||||
|
|
|
@ -1491,10 +1491,11 @@ gst_mad_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
|
|
||||||
if (do_send_discont) {
|
if (do_send_discont) {
|
||||||
gst_pad_push_event (mad->srcpad,
|
gst_pad_push_event (mad->srcpad,
|
||||||
gst_event_new_newsegment (1.0, GST_FORMAT_TIME,
|
gst_event_new_newsegment (FALSE, 1.0, GST_FORMAT_TIME,
|
||||||
GST_BUFFER_TIMESTAMP (outbuffer), GST_CLOCK_TIME_NONE, 0));
|
GST_BUFFER_TIMESTAMP (outbuffer), GST_CLOCK_TIME_NONE, 0));
|
||||||
do_send_discont = FALSE;
|
do_send_discont = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = gst_pad_push (mad->srcpad, outbuffer);
|
result = gst_pad_push (mad->srcpad, outbuffer);
|
||||||
if (result != GST_FLOW_OK) {
|
if (result != GST_FLOW_OK) {
|
||||||
goto end;
|
goto end;
|
||||||
|
|
|
@ -293,7 +293,7 @@ gst_mp3parse_sink_event (GstPad * pad, GstEvent * event)
|
||||||
{
|
{
|
||||||
GstFormat format;
|
GstFormat format;
|
||||||
|
|
||||||
gst_event_parse_newsegment (event, NULL, &format, NULL, NULL, NULL);
|
gst_event_parse_newsegment (event, NULL, NULL, &format, NULL, NULL, NULL);
|
||||||
|
|
||||||
if (format != GST_FORMAT_TIME)
|
if (format != GST_FORMAT_TIME)
|
||||||
mp3parse->last_ts = 0;
|
mp3parse->last_ts = 0;
|
||||||
|
|
|
@ -389,7 +389,6 @@ gst_rmdemux_validate_offset (GstRMDemux * rmdemux)
|
||||||
rmdemux->offset);
|
rmdemux->offset);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Can we also be seeking to a 'DATA' chunk header? Check this.
|
// TODO: Can we also be seeking to a 'DATA' chunk header? Check this.
|
||||||
// Also, for the case we currently handle, can we check any more? It's pretty
|
// Also, for the case we currently handle, can we check any more? It's pretty
|
||||||
// sucky to not be validating a little more heavily than this...
|
// sucky to not be validating a little more heavily than this...
|
||||||
|
@ -584,7 +583,7 @@ gst_rmdemux_perform_seek (GstRMDemux * rmdemux, gboolean flush)
|
||||||
gst_rmdemux_send_event (rmdemux, gst_event_new_flush_stop ());
|
gst_rmdemux_send_event (rmdemux, gst_event_new_flush_stop ());
|
||||||
|
|
||||||
/* create the discont event we are going to send out */
|
/* create the discont event we are going to send out */
|
||||||
event = gst_event_new_newsegment (1.0,
|
event = gst_event_new_newsegment (FALSE, 1.0,
|
||||||
GST_FORMAT_TIME, (gint64) rmdemux->segment_start,
|
GST_FORMAT_TIME, (gint64) rmdemux->segment_start,
|
||||||
(gint64) rmdemux->segment_stop, 0);
|
(gint64) rmdemux->segment_stop, 0);
|
||||||
|
|
||||||
|
@ -1032,7 +1031,7 @@ gst_rmdemux_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
|
|
||||||
GST_LOG_OBJECT (rmdemux, "no more pads.");
|
GST_LOG_OBJECT (rmdemux, "no more pads.");
|
||||||
gst_rmdemux_send_event (rmdemux,
|
gst_rmdemux_send_event (rmdemux,
|
||||||
gst_event_new_newsegment (1.0, GST_FORMAT_TIME, (gint64) 0,
|
gst_event_new_newsegment (FALSE, 1.0, GST_FORMAT_TIME, (gint64) 0,
|
||||||
(gint64) - 1, 0));
|
(gint64) - 1, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1344,7 +1343,7 @@ gst_rmdemux_add_stream (GstRMDemux * rmdemux, GstRMDemuxStream * stream)
|
||||||
gst_element_add_pad (GST_ELEMENT (rmdemux), stream->pad);
|
gst_element_add_pad (GST_ELEMENT (rmdemux), stream->pad);
|
||||||
|
|
||||||
gst_pad_push_event (stream->pad,
|
gst_pad_push_event (stream->pad,
|
||||||
gst_event_new_newsegment (1.0, GST_FORMAT_TIME, (gint64) 0,
|
gst_event_new_newsegment (FALSE, 1.0, GST_FORMAT_TIME, (gint64) 0,
|
||||||
(gint64) - 1, 0));
|
(gint64) - 1, 0));
|
||||||
|
|
||||||
/* If there's some extra data then send it as the first packet */
|
/* If there's some extra data then send it as the first packet */
|
||||||
|
|
Loading…
Reference in a new issue