gst/base/gstcollectpads.*: Handle newsegment and store informations in CollectData.

Original commit message from CVS:
2005-10-13  Julien MOUTTE  <julien@moutte.net>

* gst/base/gstcollectpads.c: (gst_collectpads_event),
(gst_collectpads_chain):
* gst/base/gstcollectpads.h: Handle newsegment and store
informations
in CollectData.
This commit is contained in:
Julien Moutte 2005-10-13 14:55:17 +00:00
parent 2bc2709c85
commit 04f521f191
5 changed files with 49 additions and 0 deletions

View file

@ -1,3 +1,10 @@
2005-10-13 Julien MOUTTE <julien@moutte.net>
* gst/base/gstcollectpads.c: (gst_collectpads_event),
(gst_collectpads_chain):
* gst/base/gstcollectpads.h: Handle newsegment and store informations
in CollectData.
2005-10-13 Stefan Kost <ensonic@users.sf.net>
* docs/gst/gstreamer-sections.txt:

View file

@ -550,6 +550,24 @@ gst_collectpads_event (GstPad * pad, GstEvent * event)
return TRUE;
break;
}
case GST_EVENT_NEWSEGMENT:
{
gint64 segment_start, segment_stop, stream_time;
gdouble segment_rate;
GstFormat format;
gboolean update;
gst_event_parse_newsegment (event, &update, &segment_rate, &format,
&segment_start, &segment_stop, &stream_time);
if (format == GST_FORMAT_TIME) {
data->segment_start = segment_start;
data->segment_stop = segment_start;
data->stream_time = stream_time;
}
goto beach;
}
default:
goto beach;
}

View file

@ -42,6 +42,9 @@ typedef struct _GstCollectData
GstPad *pad;
GstBuffer *buffer;
guint pos;
gint64 segment_start;
gint64 segment_stop;
gint64 stream_time;
} GstCollectData;
/* function will be called when all pads have data */

View file

@ -550,6 +550,24 @@ gst_collectpads_event (GstPad * pad, GstEvent * event)
return TRUE;
break;
}
case GST_EVENT_NEWSEGMENT:
{
gint64 segment_start, segment_stop, stream_time;
gdouble segment_rate;
GstFormat format;
gboolean update;
gst_event_parse_newsegment (event, &update, &segment_rate, &format,
&segment_start, &segment_stop, &stream_time);
if (format == GST_FORMAT_TIME) {
data->segment_start = segment_start;
data->segment_stop = segment_start;
data->stream_time = stream_time;
}
goto beach;
}
default:
goto beach;
}

View file

@ -42,6 +42,9 @@ typedef struct _GstCollectData
GstPad *pad;
GstBuffer *buffer;
guint pos;
gint64 segment_start;
gint64 segment_stop;
gint64 stream_time;
} GstCollectData;
/* function will be called when all pads have data */