From: Wim Taymans Date: Mon, 9 Oct 2006 17:15:39 +0000 (+0000) Subject: gst/gstevent.c: Rename some more @cur to @start to fix docs. X-Git-Tag: RELEASE-0_10_11~79 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0a53651b1fb072c3db43a9697b9d08f2b263ea90;p=platform%2Fupstream%2Fgstreamer.git 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. --- diff --git a/ChangeLog b/ChangeLog index 807f543..1535df9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,24 @@ 2006-10-09 Wim Taymans + * 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 + * docs/design/part-qos.txt: Fix typo. diff --git a/gst/gstevent.c b/gst/gstevent.c index 0964480..6a58169 100644 --- a/gst/gstevent.c +++ b/gst/gstevent.c @@ -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")); diff --git a/gst/gstsegment.c b/gst/gstsegment.c index 641631e..b639625 100644 --- a/gst/gstsegment.c +++ b/gst/gstsegment.c @@ -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) diff --git a/gst/gsttaglist.c b/gst/gsttaglist.c index 2c6cbc2..31822ab 100644 --- a/gst/gsttaglist.c +++ b/gst/gsttaglist.c @@ -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); } /** diff --git a/tests/check/gst/gstsegment.c b/tests/check/gst/gstsegment.c index 98f38f2..e3c4e0c 100644 --- a/tests/check/gst/gstsegment.c +++ b/tests/check/gst/gstsegment.c @@ -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); } diff --git a/tests/check/pipelines/parse-launch.c b/tests/check/pipelines/parse-launch.c index 0cf5a33..e65a9ca 100644 --- a/tests/check/pipelines/parse-launch.c +++ b/tests/check/pipelines/parse-launch.c @@ -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); }