Commit 04f521f1 authored by Julien Moutte Moutte's avatar Julien Moutte Moutte
Browse files

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.
parent 2bc2709c
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:
......
......@@ -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;
}
......
......@@ -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 */
......
......@@ -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;
}
......
......@@ -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 */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment