* @format: The format of the segment values
* @start: the start value of the segment
* @stop: the stop value of the segment
- * @position: stream position
+ * @time: the time value of the segment
*
* Allocate a new newsegment event with the given format/values tripplets
*
*/
GstEvent *
gst_event_new_new_segment (gboolean update, gdouble rate, GstFormat format,
- gint64 start, gint64 stop, gint64 position)
+ gint64 start, gint64 stop, gint64 time)
{
return gst_event_new_new_segment_full (update, rate, 1.0, format, start,
- stop, position);
+ stop, time);
}
/**
* @format: (out): A pointer to the format of the newsegment values
* @start: (out): A pointer to store the start value in
* @stop: (out): A pointer to store the stop value in
- * @position: (out): A pointer to store the stream time in
+ * @time: (out): A pointer to store the time value in
*
- * Get the update flag, rate, format, start, stop and position in the
+ * Get the update flag, rate, format, start, stop and time in the
* newsegment event. In general, gst_event_parse_new_segment_full() should
* be used instead of this, to also retrieve the applied_rate value of the
* segment. See gst_event_new_new_segment_full() for a full description
void
gst_event_parse_new_segment (GstEvent * event, gboolean * update,
gdouble * rate, GstFormat * format, gint64 * start,
- gint64 * stop, gint64 * position)
+ gint64 * stop, gint64 * time)
{
gst_event_parse_new_segment_full (event, update, rate, NULL, format, start,
- stop, position);
+ stop, time);
}
/**
* @format: The format of the segment values
* @start: The start value of the segment
* @stop: The stop value of the segment
- * @position: stream position
+ * @time: the time value of the segment
*
* Allocate a new newsegment event with the given format/values triplets.
*
* unneeded data. The valid range is expressed with the @start and @stop
* values.
*
- * The position value of the segment is used in conjunction with the start
+ * The time value of the segment is used in conjunction with the start
* value to convert the buffer timestamps into the stream time. This is
* usually done in sinks to report the current stream_time.
- * @position represents the stream_time of a buffer carrying a timestamp of
- * @start. @position cannot be -1.
+ * @time represents the stream_time of a buffer carrying a timestamp of
+ * @start. @time cannot be -1.
*
* @start cannot be -1, @stop can be -1. If there
* is a valid @stop given, it must be greater or equal the @start, including
*
* After a newsegment event, the buffer stream time is calculated with:
*
- * position + (TIMESTAMP(buf) - start) * ABS (rate * applied_rate)
+ * time + (TIMESTAMP(buf) - start) * ABS (rate * applied_rate)
*
* Returns: (transfer full): a new newsegment event.
*
GstEvent *
gst_event_new_new_segment_full (gboolean update, gdouble rate,
gdouble applied_rate, GstFormat format, gint64 start, gint64 stop,
- gint64 position)
+ gint64 time)
{
GstEvent *event;
GstStructure *structure;
GST_CAT_INFO (GST_CAT_EVENT,
"creating newsegment update %d, rate %lf, format GST_FORMAT_TIME, "
"start %" GST_TIME_FORMAT ", stop %" GST_TIME_FORMAT
- ", position %" GST_TIME_FORMAT,
+ ", time %" GST_TIME_FORMAT,
update, rate, GST_TIME_ARGS (start),
- GST_TIME_ARGS (stop), GST_TIME_ARGS (position));
+ GST_TIME_ARGS (stop), GST_TIME_ARGS (time));
} else {
GST_CAT_INFO (GST_CAT_EVENT,
"creating newsegment update %d, rate %lf, format %s, "
- "start %" G_GINT64_FORMAT ", stop %" G_GINT64_FORMAT ", position %"
+ "start %" G_GINT64_FORMAT ", stop %" G_GINT64_FORMAT ", time %"
G_GINT64_FORMAT, update, rate, gst_format_get_name (format), start,
- stop, position);
+ stop, time);
}
- g_return_val_if_fail (position != -1, NULL);
+ g_return_val_if_fail (time != -1, NULL);
g_return_val_if_fail (start != -1, NULL);
if (stop != -1)
g_return_val_if_fail (start <= stop, NULL);
GST_QUARK (FORMAT), GST_TYPE_FORMAT, format,
GST_QUARK (START), G_TYPE_INT64, start,
GST_QUARK (STOP), G_TYPE_INT64, stop,
- GST_QUARK (POSITION), G_TYPE_INT64, position, NULL);
+ GST_QUARK (TIME), G_TYPE_INT64, time, NULL);
event = gst_event_new_custom (GST_EVENT_NEWSEGMENT, structure);
return event;
* @format: (out): A pointer to the format of the newsegment values
* @start: (out): A pointer to store the start value in
* @stop: (out): A pointer to store the stop value in
- * @position: (out): A pointer to store the stream time in
+ * @time: (out): A pointer to store the time value in
*
* Get the update, rate, applied_rate, format, start, stop and
- * position in the newsegment event. See gst_event_new_new_segment_full()
+ * time in the newsegment event. See gst_event_new_new_segment_full()
* for a full description of the newsegment event.
*
* Since: 0.10.6
void
gst_event_parse_new_segment_full (GstEvent * event, gboolean * update,
gdouble * rate, gdouble * applied_rate, GstFormat * format,
- gint64 * start, gint64 * stop, gint64 * position)
+ gint64 * start, gint64 * stop, gint64 * time)
{
const GstStructure *structure;
*stop =
g_value_get_int64 (gst_structure_id_get_value (structure,
GST_QUARK (STOP)));
- if (G_LIKELY (position))
- *position =
+ if (G_LIKELY (time))
+ *time =
g_value_get_int64 (gst_structure_id_get_value (structure,
- GST_QUARK (POSITION)));
+ GST_QUARK (TIME)));
}
/**