mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-10 08:22:32 +00:00
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:
parent
2bc2709c85
commit
04f521f191
5 changed files with 49 additions and 0 deletions
|
@ -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>
|
2005-10-13 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
* docs/gst/gstreamer-sections.txt:
|
* docs/gst/gstreamer-sections.txt:
|
||||||
|
|
|
@ -550,6 +550,24 @@ gst_collectpads_event (GstPad * pad, GstEvent * event)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
break;
|
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:
|
default:
|
||||||
goto beach;
|
goto beach;
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,9 @@ typedef struct _GstCollectData
|
||||||
GstPad *pad;
|
GstPad *pad;
|
||||||
GstBuffer *buffer;
|
GstBuffer *buffer;
|
||||||
guint pos;
|
guint pos;
|
||||||
|
gint64 segment_start;
|
||||||
|
gint64 segment_stop;
|
||||||
|
gint64 stream_time;
|
||||||
} GstCollectData;
|
} GstCollectData;
|
||||||
|
|
||||||
/* function will be called when all pads have data */
|
/* function will be called when all pads have data */
|
||||||
|
|
|
@ -550,6 +550,24 @@ gst_collectpads_event (GstPad * pad, GstEvent * event)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
break;
|
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:
|
default:
|
||||||
goto beach;
|
goto beach;
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,9 @@ typedef struct _GstCollectData
|
||||||
GstPad *pad;
|
GstPad *pad;
|
||||||
GstBuffer *buffer;
|
GstBuffer *buffer;
|
||||||
guint pos;
|
guint pos;
|
||||||
|
gint64 segment_start;
|
||||||
|
gint64 segment_stop;
|
||||||
|
gint64 stream_time;
|
||||||
} GstCollectData;
|
} GstCollectData;
|
||||||
|
|
||||||
/* function will be called when all pads have data */
|
/* function will be called when all pads have data */
|
||||||
|
|
Loading…
Reference in a new issue