Commit 0a53651b authored by Wim Taymans's avatar Wim Taymans

gst/gstevent.c: Rename some more @cur to @start to fix docs.

Original commit message from CVS:
* gst/gstevent.c: (gst_event_new_seek), (gst_event_parse_seek):
Rename some more @cur to @start to fix docs.
* gst/gstsegment.c: (gst_segment_set_seek):
Fix typo.
time and start must always stay in sync as defined in design doc.
* gst/gsttaglist.c: (gst_tag_list_is_empty):
Rename param to fix docs.
* tests/check/gst/gstsegment.c: (GST_START_TEST):
Check that start and time are in sync.
* tests/check/pipelines/parse-launch.c:
(gst_parse_test_element_change_state):
Activate pad before adding to the element.
parent 89814eed
2006-10-09 Wim Taymans <wim@fluendo.com>
* gst/gstevent.c: (gst_event_new_seek), (gst_event_parse_seek):
Rename some more @cur to @start to fix docs.
* gst/gstsegment.c: (gst_segment_set_seek):
Fix typo.
time and start must always stay in sync as defined in design doc.
* gst/gsttaglist.c: (gst_tag_list_is_empty):
Rename param to fix docs.
* tests/check/gst/gstsegment.c: (GST_START_TEST):
Check that start and time are in sync.
* tests/check/pipelines/parse-launch.c:
(gst_parse_test_element_change_state):
Activate pad before adding to the element.
2006-10-09 Wim Taymans <wim@fluendo.com>
* docs/design/part-qos.txt:
......
......@@ -823,31 +823,31 @@ gst_event_parse_qos (GstEvent * event, gdouble * proportion,
*/
GstEvent *
gst_event_new_seek (gdouble rate, GstFormat format, GstSeekFlags flags,
GstSeekType cur_type, gint64 cur, GstSeekType stop_type, gint64 stop)
GstSeekType start_type, gint64 start, GstSeekType stop_type, gint64 stop)
{
g_return_val_if_fail (rate != 0.0, NULL);
if (format == GST_FORMAT_TIME) {
GST_CAT_INFO (GST_CAT_EVENT,
"creating seek rate %lf, format TIME, flags %d, "
"cur_type %d, cur %" GST_TIME_FORMAT ", "
"start_type %d, start %" GST_TIME_FORMAT ", "
"stop_type %d, stop %" GST_TIME_FORMAT,
rate, flags, cur_type, GST_TIME_ARGS (cur),
rate, flags, start_type, GST_TIME_ARGS (start),
stop_type, GST_TIME_ARGS (stop));
} else {
GST_CAT_INFO (GST_CAT_EVENT,
"creating seek rate %lf, format %d, flags %d, "
"cur_type %d, cur %" G_GINT64_FORMAT ", "
"start_type %d, start %" G_GINT64_FORMAT ", "
"stop_type %d, stop %" G_GINT64_FORMAT,
rate, format, flags, cur_type, cur, stop_type, stop);
rate, format, flags, start_type, start, stop_type, stop);
}
return gst_event_new_custom (GST_EVENT_SEEK,
gst_structure_new ("GstEventSeek", "rate", G_TYPE_DOUBLE, rate,
"format", GST_TYPE_FORMAT, format,
"flags", GST_TYPE_SEEK_FLAGS, flags,
"cur_type", GST_TYPE_SEEK_TYPE, cur_type,
"cur", G_TYPE_INT64, cur,
"cur_type", GST_TYPE_SEEK_TYPE, start_type,
"cur", G_TYPE_INT64, start,
"stop_type", GST_TYPE_SEEK_TYPE, stop_type,
"stop", G_TYPE_INT64, stop, NULL));
}
......@@ -858,8 +858,8 @@ gst_event_new_seek (gdouble rate, GstFormat format, GstSeekFlags flags,
* @rate: result location for the rate
* @format: result location for the stream format
* @flags: result location for the #GstSeekFlags
* @cur_type: result location for the #GstSeekType of the current position
* @cur: result location for the current postion expressed in @format
* @start_type: result location for the #GstSeekType of the start position
* @start: result location for the start postion expressed in @format
* @stop_type: result location for the #GstSeekType of the stop position
* @stop: result location for the stop postion expressed in @format
*
......@@ -867,8 +867,8 @@ gst_event_new_seek (gdouble rate, GstFormat format, GstSeekFlags flags,
*/
void
gst_event_parse_seek (GstEvent * event, gdouble * rate,
GstFormat * format, GstSeekFlags * flags, GstSeekType * cur_type,
gint64 * cur, GstSeekType * stop_type, gint64 * stop)
GstFormat * format, GstSeekFlags * flags, GstSeekType * start_type,
gint64 * start, GstSeekType * stop_type, gint64 * stop)
{
const GstStructure *structure;
......@@ -882,11 +882,11 @@ gst_event_parse_seek (GstEvent * event, gdouble * rate,
*format = g_value_get_enum (gst_structure_get_value (structure, "format"));
if (flags)
*flags = g_value_get_flags (gst_structure_get_value (structure, "flags"));
if (cur_type)
*cur_type =
if (start_type)
*start_type =
g_value_get_enum (gst_structure_get_value (structure, "cur_type"));
if (cur)
*cur = g_value_get_int64 (gst_structure_get_value (structure, "cur"));
if (start)
*start = g_value_get_int64 (gst_structure_get_value (structure, "cur"));
if (stop_type)
*stop_type =
g_value_get_enum (gst_structure_get_value (structure, "stop_type"));
......
......@@ -312,7 +312,7 @@ gst_segment_set_seek (GstSegment * segment, gdouble rate,
update_stop = FALSE;
break;
case GST_SEEK_TYPE_SET:
/* stop folds required value */
/* stop holds required value */
break;
case GST_SEEK_TYPE_CUR:
if (segment->stop != -1)
......@@ -353,7 +353,7 @@ gst_segment_set_seek (GstSegment * segment, gdouble rate,
if (update_stop && rate < 0.0) {
segment->last_stop = stop;
}
segment->time = segment->last_stop;
segment->time = start;
segment->stop = stop;
if (update)
......
......@@ -470,7 +470,7 @@ gst_tag_list_new (void)
/**
* gst_tag_list_is_empty:
* @taglist: A #GstTagList.
* @list: A #GstTagList.
*
* Checks if the given taglist is empty.
*
......@@ -479,12 +479,12 @@ gst_tag_list_new (void)
* Since: 0.10.11
*/
gboolean
gst_tag_list_is_empty (const GstTagList * taglist)
gst_tag_list_is_empty (const GstTagList * list)
{
g_return_val_if_fail (taglist != NULL, FALSE);
g_return_val_if_fail (GST_IS_TAG_LIST (taglist), FALSE);
g_return_val_if_fail (list != NULL, FALSE);
g_return_val_if_fail (GST_IS_TAG_LIST (list), FALSE);
return (gst_structure_n_fields ((GstStructure *) taglist) == 0);
return (gst_structure_n_fields ((GstStructure *) list) == 0);
}
/**
......
......@@ -395,6 +395,7 @@ GST_START_TEST (segment_seek_reverse)
GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_SET, 100, &update);
fail_unless (segment.start == 0);
fail_unless (segment.stop == 100);
fail_unless (segment.time == 0);
fail_unless (segment.last_stop == 100);
/* update */
......@@ -404,6 +405,7 @@ GST_START_TEST (segment_seek_reverse)
GST_SEEK_TYPE_SET, 10, GST_SEEK_TYPE_CUR, -20, &update);
fail_unless (segment.start == 10);
fail_unless (segment.stop == 80);
fail_unless (segment.time == 10);
fail_unless (segment.last_stop == 80);
gst_segment_set_seek (&segment, -1.0,
......@@ -412,6 +414,7 @@ GST_START_TEST (segment_seek_reverse)
GST_SEEK_TYPE_SET, 20, GST_SEEK_TYPE_NONE, 0, &update);
fail_unless (segment.start == 20);
fail_unless (segment.stop == 80);
fail_unless (segment.time == 20);
fail_unless (segment.last_stop == 80);
}
......
......@@ -512,6 +512,8 @@ gst_parse_test_element_change_state (GstElement * element,
ghost = gst_ghost_pad_new ("src", pad);
fail_if (ghost == NULL, "Failed to create ghost pad");
/* activate and add */
gst_pad_set_active (ghost, TRUE);
gst_element_add_pad (GST_ELEMENT (src), ghost);
gst_object_unref (pad);
}
......
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