mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
gst/gstevent.h (gst_event_new_new_segment) (gst_event_parse_new_segment, gst_event_new_buffer_size)
Original commit message from CVS: 2005-11-22 Andy Wingo <wingo@pobox.com> * gst/gstevent.h (gst_event_new_new_segment) (gst_event_parse_new_segment, gst_event_new_buffer_size) (gst_event_parse_buffer_size, gst_ghost_pad_new_no_target): Renamed from *_newsegment, *_buffersize, *_notarget. * scripts/update-funcnames: New script, performs the changes listed above.
This commit is contained in:
parent
e9606ada93
commit
19858fd9f0
22 changed files with 78 additions and 43 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2005-11-22 Andy Wingo <wingo@pobox.com>
|
||||
|
||||
* gst/gstevent.h (gst_event_new_new_segment)
|
||||
(gst_event_parse_new_segment, gst_event_new_buffer_size)
|
||||
(gst_event_parse_buffer_size, gst_ghost_pad_new_no_target):
|
||||
Renamed from *_newsegment, *_buffersize, *_notarget.
|
||||
|
||||
* scripts/update-funcnames: New script, performs the changes
|
||||
listed above.
|
||||
|
||||
2005-11-22 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/base/gstbasesink.c: (gst_base_sink_handle_object):
|
||||
|
|
|
@ -65,7 +65,7 @@ GST_START_TEST (create_custom_events)
|
|||
gboolean update;
|
||||
|
||||
event =
|
||||
gst_event_new_newsegment (FALSE, 0.5, GST_FORMAT_TIME, 1, G_MAXINT64,
|
||||
gst_event_new_new_segment (FALSE, 0.5, GST_FORMAT_TIME, 1, G_MAXINT64,
|
||||
0xdeadbeef);
|
||||
fail_if (event == NULL);
|
||||
fail_unless (GST_EVENT_TYPE (event) == GST_EVENT_NEWSEGMENT);
|
||||
|
@ -73,7 +73,7 @@ GST_START_TEST (create_custom_events)
|
|||
fail_unless (GST_EVENT_IS_DOWNSTREAM (event));
|
||||
fail_unless (GST_EVENT_IS_SERIALIZED (event));
|
||||
|
||||
gst_event_parse_newsegment (event, &update, &rate, &format, &start, &end,
|
||||
gst_event_parse_new_segment (event, &update, &rate, &format, &start, &end,
|
||||
&base);
|
||||
fail_unless (update == FALSE);
|
||||
fail_unless (rate == 0.5);
|
||||
|
|
|
@ -119,7 +119,7 @@ GST_START_TEST (test_ghost_pad_notarget)
|
|||
fail_unless (gst_bin_add (GST_BIN (b1), sink));
|
||||
fail_unless (gst_bin_add (GST_BIN (b1), b2));
|
||||
|
||||
srcpad = gst_ghost_pad_new_notarget ("src", GST_PAD_SRC);
|
||||
srcpad = gst_ghost_pad_new_no_target ("src", GST_PAD_SRC);
|
||||
fail_unless (srcpad != NULL);
|
||||
sinkpad = gst_element_get_pad (sink, "sink");
|
||||
fail_unless (sinkpad != NULL);
|
||||
|
|
|
@ -63,7 +63,7 @@ Ghostpads
|
|||
|
||||
* Creating a ghostpad without a target
|
||||
|
||||
gst_ghost_pad_new_notarget (char *name, GstPadDirection dir)
|
||||
gst_ghost_pad_new_no_target (char *name, GstPadDirection dir)
|
||||
|
||||
1) create new GstGhostPad X
|
||||
2) X name set to @name
|
||||
|
|
|
@ -635,18 +635,18 @@ GST_EVENT_MAKE_TYPE
|
|||
|
||||
gst_event_copy
|
||||
gst_event_get_structure
|
||||
gst_event_new_buffersize
|
||||
gst_event_new_buffer_size
|
||||
gst_event_new_custom
|
||||
gst_event_new_eos
|
||||
gst_event_new_flush_start
|
||||
gst_event_new_flush_stop
|
||||
gst_event_new_navigation
|
||||
gst_event_new_newsegment
|
||||
gst_event_new_new_segment
|
||||
gst_event_new_qos
|
||||
gst_event_new_seek
|
||||
gst_event_new_tag
|
||||
gst_event_parse_buffersize
|
||||
gst_event_parse_newsegment
|
||||
gst_event_parse_buffer_size
|
||||
gst_event_parse_new_segment
|
||||
gst_event_parse_qos
|
||||
gst_event_parse_seek
|
||||
gst_event_parse_tag
|
||||
|
@ -712,7 +712,7 @@ gst_format_get_type
|
|||
<TITLE>GstGhostPad</TITLE>
|
||||
GstGhostPad
|
||||
gst_ghost_pad_new
|
||||
gst_ghost_pad_new_notarget
|
||||
gst_ghost_pad_new_no_target
|
||||
gst_ghost_pad_set_target
|
||||
gst_ghost_pad_get_target
|
||||
<SUBSECTION Standard>
|
||||
|
|
|
@ -586,7 +586,7 @@ gst_base_sink_handle_object (GstBaseSink * basesink, GstPad * pad,
|
|||
|
||||
/* the newsegment event is needed to bring the buffer timestamps to the
|
||||
* stream time and to drop samples outside of the playback segment. */
|
||||
gst_event_parse_newsegment (event, &update, &rate, &format,
|
||||
gst_event_parse_new_segment (event, &update, &rate, &format,
|
||||
&start, &stop, &time);
|
||||
|
||||
basesink->have_newsegment = TRUE;
|
||||
|
|
|
@ -449,7 +449,7 @@ gst_base_src_default_newsegment (GstBaseSrc * src)
|
|||
GST_DEBUG_OBJECT (src, "Sending newsegment from %" G_GINT64_FORMAT
|
||||
" to %" G_GINT64_FORMAT, src->segment.start, src->segment.stop);
|
||||
|
||||
event = gst_event_new_newsegment (FALSE, 1.0,
|
||||
event = gst_event_new_new_segment (FALSE, 1.0,
|
||||
GST_FORMAT_BYTES, src->segment.start, src->segment.stop,
|
||||
src->segment.start);
|
||||
|
||||
|
|
|
@ -1065,8 +1065,8 @@ gst_base_transform_event (GstPad * pad, GstEvent * event)
|
|||
gint64 start, stop, time;
|
||||
gboolean update;
|
||||
|
||||
gst_event_parse_newsegment (event, &update, &rate, &format, &start, &stop,
|
||||
&time);
|
||||
gst_event_parse_new_segment (event, &update, &rate, &format, &start,
|
||||
&stop, &time);
|
||||
|
||||
gst_segment_set_newsegment (&trans->segment, update, rate, format, start,
|
||||
stop, time);
|
||||
|
|
|
@ -605,7 +605,7 @@ gst_collect_pads_event (GstPad * pad, GstEvent * event)
|
|||
GstFormat format;
|
||||
gboolean update;
|
||||
|
||||
gst_event_parse_newsegment (event, &update, &rate, &format,
|
||||
gst_event_parse_new_segment (event, &update, &rate, &format,
|
||||
&start, &stop, &time);
|
||||
|
||||
gst_segment_set_newsegment (&data->segment, update, rate, format,
|
||||
|
|
|
@ -345,7 +345,7 @@ gst_file_sink_event (GstBaseSink * sink, GstEvent * event)
|
|||
gint64 soffset, eoffset;
|
||||
GstFormat format;
|
||||
|
||||
gst_event_parse_newsegment (event, NULL, NULL, &format, &soffset,
|
||||
gst_event_parse_new_segment (event, NULL, NULL, &format, &soffset,
|
||||
&eoffset, NULL);
|
||||
|
||||
if (format == GST_FORMAT_BYTES) {
|
||||
|
|
|
@ -400,7 +400,7 @@ gst_event_new_eos (void)
|
|||
}
|
||||
|
||||
/**
|
||||
* gst_event_new_newsegment:
|
||||
* gst_event_new_new_segment:
|
||||
* @update: is this segment an update to a previous one
|
||||
* @rate: a new rate for playback
|
||||
* @format: The format of the segment values
|
||||
|
@ -429,7 +429,7 @@ gst_event_new_eos (void)
|
|||
* Returns: A new newsegment event.
|
||||
*/
|
||||
GstEvent *
|
||||
gst_event_new_newsegment (gboolean update, gdouble rate, GstFormat format,
|
||||
gst_event_new_new_segment (gboolean update, gdouble rate, GstFormat format,
|
||||
gint64 start_value, gint64 stop_value, gint64 stream_time)
|
||||
{
|
||||
g_return_val_if_fail (rate != 0.0, NULL);
|
||||
|
@ -467,7 +467,7 @@ gst_event_new_newsegment (gboolean update, gdouble rate, GstFormat format,
|
|||
}
|
||||
|
||||
/**
|
||||
* gst_event_parse_newsegment:
|
||||
* gst_event_parse_new_segment:
|
||||
* @event: The event to query
|
||||
* @update: A pointer to the update flag of the segment
|
||||
* @rate: A pointer to the rate of the segment
|
||||
|
@ -479,9 +479,9 @@ gst_event_new_newsegment (gboolean update, gdouble rate, GstFormat format,
|
|||
* Get the start, stop and format in the newsegment event.
|
||||
*/
|
||||
void
|
||||
gst_event_parse_newsegment (GstEvent * event, gboolean * update, gdouble * rate,
|
||||
GstFormat * format, gint64 * start_value, gint64 * stop_value,
|
||||
gint64 * stream_time)
|
||||
gst_event_parse_new_segment (GstEvent * event, gboolean * update,
|
||||
gdouble * rate, GstFormat * format, gint64 * start_value,
|
||||
gint64 * stop_value, gint64 * stream_time)
|
||||
{
|
||||
const GstStructure *structure;
|
||||
|
||||
|
@ -542,7 +542,7 @@ gst_event_parse_tag (GstEvent * event, GstTagList ** taglist)
|
|||
|
||||
/* buffersize event */
|
||||
/**
|
||||
* gst_event_new_buffersize:
|
||||
* gst_event_new_buffer_size:
|
||||
* @format: buffer format
|
||||
* @minsize: minimum buffer size
|
||||
* @maxsize: maximum buffer size
|
||||
|
@ -556,7 +556,7 @@ gst_event_parse_tag (GstEvent * event, GstTagList ** taglist)
|
|||
* Returns: a new #GstEvent
|
||||
*/
|
||||
GstEvent *
|
||||
gst_event_new_buffersize (GstFormat format, gint64 minsize,
|
||||
gst_event_new_buffer_size (GstFormat format, gint64 minsize,
|
||||
gint64 maxsize, gboolean async)
|
||||
{
|
||||
GST_CAT_INFO (GST_CAT_EVENT,
|
||||
|
@ -573,7 +573,7 @@ gst_event_new_buffersize (GstFormat format, gint64 minsize,
|
|||
}
|
||||
|
||||
/**
|
||||
* gst_event_parse_buffersize:
|
||||
* gst_event_parse_buffer_size:
|
||||
* @event: The event to query
|
||||
* @format: A pointer to store the format in
|
||||
* @minsize: A pointer to store the minsize in
|
||||
|
@ -583,7 +583,7 @@ gst_event_new_buffersize (GstFormat format, gint64 minsize,
|
|||
* Get the format, minsize, maxsize and async-flag in the buffersize event.
|
||||
*/
|
||||
void
|
||||
gst_event_parse_buffersize (GstEvent * event, GstFormat * format,
|
||||
gst_event_parse_buffer_size (GstEvent * event, GstFormat * format,
|
||||
gint64 * minsize, gint64 * maxsize, gboolean * async)
|
||||
{
|
||||
const GstStructure *structure;
|
||||
|
|
|
@ -339,10 +339,10 @@ GstEvent * gst_event_new_flush_stop (void);
|
|||
GstEvent * gst_event_new_eos (void);
|
||||
|
||||
/* newsegment events */
|
||||
GstEvent* gst_event_new_newsegment (gboolean update, gdouble rate, GstFormat format,
|
||||
GstEvent* gst_event_new_new_segment (gboolean update, gdouble rate, GstFormat format,
|
||||
gint64 start_value, gint64 stop_value,
|
||||
gint64 stream_time);
|
||||
void gst_event_parse_newsegment (GstEvent *event, gboolean *update, gdouble *rate,
|
||||
void gst_event_parse_new_segment (GstEvent *event, gboolean *update, gdouble *rate,
|
||||
GstFormat *format, gint64 *start_value, gint64 *stop_value,
|
||||
gint64 *stream_time);
|
||||
/* tag event */
|
||||
|
@ -350,9 +350,9 @@ GstEvent* gst_event_new_tag (GstTagList *taglist);
|
|||
void gst_event_parse_tag (GstEvent *event, GstTagList **taglist);
|
||||
|
||||
/* buffer */
|
||||
GstEvent * gst_event_new_buffersize (GstFormat format, gint64 minsize, gint64 maxsize,
|
||||
GstEvent * gst_event_new_buffer_size (GstFormat format, gint64 minsize, gint64 maxsize,
|
||||
gboolean async);
|
||||
void gst_event_parse_buffersize (GstEvent *event, GstFormat *format, gint64 *minsize,
|
||||
void gst_event_parse_buffer_size (GstEvent *event, GstFormat *format, gint64 *minsize,
|
||||
gint64 *maxsize, gboolean *async);
|
||||
|
||||
/* QOS events */
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* are accociated with sink and source pads of the child elements.
|
||||
*
|
||||
* If the target pad is known at creation time, gst_ghost_pad_new() is the
|
||||
* function to use to get a ghost-pad. Otherwise one can use gst_ghost_pad_new_notarget()
|
||||
* function to use to get a ghost-pad. Otherwise one can use gst_ghost_pad_new_no_target()
|
||||
* to create the ghost-pad and use gst_ghost_pad_set_target() to establish the
|
||||
* accociation later on.
|
||||
*
|
||||
|
@ -753,7 +753,7 @@ gst_ghost_pad_dispose (GObject * object)
|
|||
}
|
||||
|
||||
/**
|
||||
* gst_ghost_pad_new_notarget:
|
||||
* gst_ghost_pad_new_no_target:
|
||||
* @name: the name of the new pad, or NULL to assign a default name.
|
||||
* @dir: the direction of the ghostpad
|
||||
*
|
||||
|
@ -766,7 +766,7 @@ gst_ghost_pad_dispose (GObject * object)
|
|||
* Returns: a new #GstPad, or NULL in case of an error.
|
||||
*/
|
||||
GstPad *
|
||||
gst_ghost_pad_new_notarget (const gchar * name, GstPadDirection dir)
|
||||
gst_ghost_pad_new_no_target (const gchar * name, GstPadDirection dir)
|
||||
{
|
||||
GstPad *ret;
|
||||
|
||||
|
@ -801,7 +801,7 @@ gst_ghost_pad_new (const gchar * name, GstPad * target)
|
|||
g_return_val_if_fail (GST_IS_PAD (target), NULL);
|
||||
g_return_val_if_fail (!gst_pad_is_linked (target), NULL);
|
||||
|
||||
if ((ret = gst_ghost_pad_new_notarget (name, GST_PAD_DIRECTION (target)))) {
|
||||
if ((ret = gst_ghost_pad_new_no_target (name, GST_PAD_DIRECTION (target)))) {
|
||||
g_object_set (G_OBJECT (ret),
|
||||
"template", GST_PAD_PAD_TEMPLATE (target), NULL);
|
||||
gst_ghost_pad_set_target (GST_GHOST_PAD (ret), target);
|
||||
|
|
|
@ -43,7 +43,7 @@ typedef struct _GstGhostPadClass GstGhostPadClass;
|
|||
GType gst_ghost_pad_get_type (void);
|
||||
|
||||
GstPad* gst_ghost_pad_new (const gchar *name, GstPad *target);
|
||||
GstPad* gst_ghost_pad_new_notarget (const gchar *name, GstPadDirection dir);
|
||||
GstPad* gst_ghost_pad_new_no_target (const gchar *name, GstPadDirection dir);
|
||||
|
||||
GstPad* gst_ghost_pad_get_target (GstGhostPad *gpad);
|
||||
gboolean gst_ghost_pad_set_target (GstGhostPad *gpad, GstPad *newtarget);
|
||||
|
|
|
@ -586,7 +586,7 @@ gst_base_sink_handle_object (GstBaseSink * basesink, GstPad * pad,
|
|||
|
||||
/* the newsegment event is needed to bring the buffer timestamps to the
|
||||
* stream time and to drop samples outside of the playback segment. */
|
||||
gst_event_parse_newsegment (event, &update, &rate, &format,
|
||||
gst_event_parse_new_segment (event, &update, &rate, &format,
|
||||
&start, &stop, &time);
|
||||
|
||||
basesink->have_newsegment = TRUE;
|
||||
|
|
|
@ -449,7 +449,7 @@ gst_base_src_default_newsegment (GstBaseSrc * src)
|
|||
GST_DEBUG_OBJECT (src, "Sending newsegment from %" G_GINT64_FORMAT
|
||||
" to %" G_GINT64_FORMAT, src->segment.start, src->segment.stop);
|
||||
|
||||
event = gst_event_new_newsegment (FALSE, 1.0,
|
||||
event = gst_event_new_new_segment (FALSE, 1.0,
|
||||
GST_FORMAT_BYTES, src->segment.start, src->segment.stop,
|
||||
src->segment.start);
|
||||
|
||||
|
|
|
@ -1065,8 +1065,8 @@ gst_base_transform_event (GstPad * pad, GstEvent * event)
|
|||
gint64 start, stop, time;
|
||||
gboolean update;
|
||||
|
||||
gst_event_parse_newsegment (event, &update, &rate, &format, &start, &stop,
|
||||
&time);
|
||||
gst_event_parse_new_segment (event, &update, &rate, &format, &start,
|
||||
&stop, &time);
|
||||
|
||||
gst_segment_set_newsegment (&trans->segment, update, rate, format, start,
|
||||
stop, time);
|
||||
|
|
|
@ -605,7 +605,7 @@ gst_collect_pads_event (GstPad * pad, GstEvent * event)
|
|||
GstFormat format;
|
||||
gboolean update;
|
||||
|
||||
gst_event_parse_newsegment (event, &update, &rate, &format,
|
||||
gst_event_parse_new_segment (event, &update, &rate, &format,
|
||||
&start, &stop, &time);
|
||||
|
||||
gst_segment_set_newsegment (&data->segment, update, rate, format,
|
||||
|
|
|
@ -345,7 +345,7 @@ gst_file_sink_event (GstBaseSink * sink, GstEvent * event)
|
|||
gint64 soffset, eoffset;
|
||||
GstFormat format;
|
||||
|
||||
gst_event_parse_newsegment (event, NULL, NULL, &format, &soffset,
|
||||
gst_event_parse_new_segment (event, NULL, NULL, &format, &soffset,
|
||||
&eoffset, NULL);
|
||||
|
||||
if (format == GST_FORMAT_BYTES) {
|
||||
|
|
25
scripts/update-funcnames
Executable file
25
scripts/update-funcnames
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if test -z "$1" -o -n "$2"; then
|
||||
echo "Usage: $0 FILE" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
file=$1
|
||||
|
||||
function subst () {
|
||||
from=$1
|
||||
to=$2
|
||||
if grep -q $from $file; then
|
||||
echo "$file: $from->$to"
|
||||
perl -i -p -e "s/$from/$to/g" $file
|
||||
fi
|
||||
}
|
||||
|
||||
subst gst_event_new_newsegment gst_event_new_new_segment
|
||||
subst gst_event_parse_newsegment gst_event_parse_new_segment
|
||||
subst gst_event_new_buffersize gst_event_new_buffer_size
|
||||
subst gst_event_parse_buffersize gst_event_parse_buffer_size
|
||||
subst gst_ghost_pad_new_notarget gst_ghost_pad_new_no_target
|
|
@ -65,7 +65,7 @@ GST_START_TEST (create_custom_events)
|
|||
gboolean update;
|
||||
|
||||
event =
|
||||
gst_event_new_newsegment (FALSE, 0.5, GST_FORMAT_TIME, 1, G_MAXINT64,
|
||||
gst_event_new_new_segment (FALSE, 0.5, GST_FORMAT_TIME, 1, G_MAXINT64,
|
||||
0xdeadbeef);
|
||||
fail_if (event == NULL);
|
||||
fail_unless (GST_EVENT_TYPE (event) == GST_EVENT_NEWSEGMENT);
|
||||
|
@ -73,7 +73,7 @@ GST_START_TEST (create_custom_events)
|
|||
fail_unless (GST_EVENT_IS_DOWNSTREAM (event));
|
||||
fail_unless (GST_EVENT_IS_SERIALIZED (event));
|
||||
|
||||
gst_event_parse_newsegment (event, &update, &rate, &format, &start, &end,
|
||||
gst_event_parse_new_segment (event, &update, &rate, &format, &start, &end,
|
||||
&base);
|
||||
fail_unless (update == FALSE);
|
||||
fail_unless (rate == 0.5);
|
||||
|
|
|
@ -119,7 +119,7 @@ GST_START_TEST (test_ghost_pad_notarget)
|
|||
fail_unless (gst_bin_add (GST_BIN (b1), sink));
|
||||
fail_unless (gst_bin_add (GST_BIN (b1), b2));
|
||||
|
||||
srcpad = gst_ghost_pad_new_notarget ("src", GST_PAD_SRC);
|
||||
srcpad = gst_ghost_pad_new_no_target ("src", GST_PAD_SRC);
|
||||
fail_unless (srcpad != NULL);
|
||||
sinkpad = gst_element_get_pad (sink, "sink");
|
||||
fail_unless (sinkpad != NULL);
|
||||
|
|
Loading…
Reference in a new issue