mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
message: rename variable
Rename the new_base_time variable to reset_time, which looks better.
This commit is contained in:
parent
3798b5fe5b
commit
b0a827cc6b
6 changed files with 23 additions and 24 deletions
13
gst/gstbin.c
13
gst/gstbin.c
|
@ -227,7 +227,7 @@ static void gst_bin_state_changed (GstElement * element, GstState oldstate,
|
|||
static GstStateChangeReturn gst_bin_get_state_func (GstElement * element,
|
||||
GstState * state, GstState * pending, GstClockTime timeout);
|
||||
static void bin_handle_async_done (GstBin * bin, GstStateChangeReturn ret,
|
||||
gboolean flag_pending, gboolean new_base_time);
|
||||
gboolean flag_pending, gboolean reset_time);
|
||||
static void bin_handle_async_start (GstBin * bin);
|
||||
static void bin_push_state_continue (BinContinueData * data);
|
||||
static void bin_do_eos (GstBin * bin);
|
||||
|
@ -2885,7 +2885,7 @@ was_no_preroll:
|
|||
*/
|
||||
static void
|
||||
bin_handle_async_done (GstBin * bin, GstStateChangeReturn ret,
|
||||
gboolean flag_pending, gboolean new_base_time)
|
||||
gboolean flag_pending, gboolean reset_time)
|
||||
{
|
||||
GstState current, pending, target;
|
||||
GstStateChangeReturn old_ret;
|
||||
|
@ -2913,7 +2913,7 @@ bin_handle_async_done (GstBin * bin, GstStateChangeReturn ret,
|
|||
target = GST_STATE_TARGET (bin);
|
||||
pending = GST_STATE_PENDING (bin) = target;
|
||||
|
||||
amessage = gst_message_new_async_done (GST_OBJECT_CAST (bin), new_base_time);
|
||||
amessage = gst_message_new_async_done (GST_OBJECT_CAST (bin), reset_time);
|
||||
|
||||
old_state = GST_STATE (bin);
|
||||
/* this is the state we should go to next */
|
||||
|
@ -3333,13 +3333,13 @@ gst_bin_handle_message_func (GstBin * bin, GstMessage * message)
|
|||
}
|
||||
case GST_MESSAGE_ASYNC_DONE:
|
||||
{
|
||||
gboolean new_base_time;
|
||||
gboolean reset_time;
|
||||
GstState target;
|
||||
|
||||
GST_DEBUG_OBJECT (bin, "ASYNC_DONE message %p, %s", message,
|
||||
src ? GST_OBJECT_NAME (src) : "(NULL)");
|
||||
|
||||
gst_message_parse_async_done (message, &new_base_time);
|
||||
gst_message_parse_async_done (message, &reset_time);
|
||||
|
||||
GST_OBJECT_LOCK (bin);
|
||||
bin_do_message_forward (bin, message);
|
||||
|
@ -3361,8 +3361,7 @@ gst_bin_handle_message_func (GstBin * bin, GstMessage * message)
|
|||
* need to set the pending_done flag so that at the end of the state
|
||||
* change we can see if we need to verify pending async elements, hence
|
||||
* the TRUE argument here. */
|
||||
bin_handle_async_done (bin, GST_STATE_CHANGE_SUCCESS, TRUE,
|
||||
new_base_time);
|
||||
bin_handle_async_done (bin, GST_STATE_CHANGE_SUCCESS, TRUE, reset_time);
|
||||
} else {
|
||||
GST_DEBUG_OBJECT (bin, "there are more async elements pending");
|
||||
}
|
||||
|
|
|
@ -890,10 +890,10 @@ gst_message_new_async_start (GstObject * src)
|
|||
/**
|
||||
* gst_message_new_async_done:
|
||||
* @src: (transfer none): The object originating the message.
|
||||
* @new_base_time: if a new base_time should be set on the element
|
||||
* @reset_time: if the running_time should be reset
|
||||
*
|
||||
* The message is posted when elements completed an ASYNC state change.
|
||||
* @new_base_time is set to TRUE when the element requests a new base_time
|
||||
* @reset_time is set to TRUE when the element requests a new running_time
|
||||
* before going to PLAYING.
|
||||
*
|
||||
* Returns: (transfer full): The new async_done message.
|
||||
|
@ -901,13 +901,13 @@ gst_message_new_async_start (GstObject * src)
|
|||
* MT safe.
|
||||
*/
|
||||
GstMessage *
|
||||
gst_message_new_async_done (GstObject * src, gboolean new_base_time)
|
||||
gst_message_new_async_done (GstObject * src, gboolean reset_time)
|
||||
{
|
||||
GstMessage *message;
|
||||
GstStructure *structure;
|
||||
|
||||
structure = gst_structure_id_new (GST_QUARK (MESSAGE_ASYNC_DONE),
|
||||
GST_QUARK (NEW_BASE_TIME), G_TYPE_BOOLEAN, new_base_time, NULL);
|
||||
GST_QUARK (RESET_TIME), G_TYPE_BOOLEAN, reset_time, NULL);
|
||||
message = gst_message_new_custom (GST_MESSAGE_ASYNC_DONE, src, structure);
|
||||
|
||||
return message;
|
||||
|
@ -1605,14 +1605,14 @@ gst_message_parse_duration (GstMessage * message, GstFormat * format,
|
|||
/**
|
||||
* gst_message_parse_async_done:
|
||||
* @message: A valid #GstMessage of type GST_MESSAGE_ASYNC_DONE.
|
||||
* @new_base_time: (out): Result location for the new_base_time or NULL
|
||||
* @reset_time: (out): Result location for the reset_time or NULL
|
||||
*
|
||||
* Extract the new_base_time from the async_done message.
|
||||
* Extract the reset_time from the async_done message.
|
||||
*
|
||||
* MT safe.
|
||||
*/
|
||||
void
|
||||
gst_message_parse_async_done (GstMessage * message, gboolean * new_base_time)
|
||||
gst_message_parse_async_done (GstMessage * message, gboolean * reset_time)
|
||||
{
|
||||
GstStructure *structure;
|
||||
|
||||
|
@ -1620,10 +1620,10 @@ gst_message_parse_async_done (GstMessage * message, gboolean * new_base_time)
|
|||
g_return_if_fail (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ASYNC_DONE);
|
||||
|
||||
structure = GST_MESSAGE_STRUCTURE (message);
|
||||
if (new_base_time)
|
||||
*new_base_time =
|
||||
if (reset_time)
|
||||
*reset_time =
|
||||
g_value_get_boolean (gst_structure_id_get_value (structure,
|
||||
GST_QUARK (NEW_BASE_TIME)));
|
||||
GST_QUARK (RESET_TIME)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -496,8 +496,8 @@ GstMessage * gst_message_new_latency (GstObject * src);
|
|||
GstMessage * gst_message_new_async_start (GstObject * src);
|
||||
|
||||
/* ASYNC_DONE */
|
||||
GstMessage * gst_message_new_async_done (GstObject * src, gboolean new_base_time);
|
||||
void gst_message_parse_async_done (GstMessage *message, gboolean *new_base_time);
|
||||
GstMessage * gst_message_new_async_done (GstObject * src, gboolean reset_time);
|
||||
void gst_message_parse_async_done (GstMessage *message, gboolean *reset_time);
|
||||
|
||||
/* STRUCTURE CHANGE */
|
||||
GstMessage * gst_message_new_structure_change (GstObject * src, GstStructureChangeType type,
|
||||
|
|
|
@ -550,13 +550,13 @@ gst_pipeline_handle_message (GstBin * bin, GstMessage * message)
|
|||
switch (GST_MESSAGE_TYPE (message)) {
|
||||
case GST_MESSAGE_ASYNC_DONE:
|
||||
{
|
||||
gboolean new_base_time;
|
||||
gboolean reset_time;
|
||||
|
||||
gst_message_parse_async_done (message, &new_base_time);
|
||||
gst_message_parse_async_done (message, &reset_time);
|
||||
|
||||
/* reset our running time if we need to distribute a new base_time to the
|
||||
* children. */
|
||||
if (new_base_time)
|
||||
if (reset_time)
|
||||
reset_start_time (pipeline);
|
||||
|
||||
break;
|
||||
|
|
|
@ -33,7 +33,7 @@ static const gchar *_quark_strings[] = {
|
|||
"gerror", "debug", "buffer-percent", "buffering-mode",
|
||||
"avg-in-rate", "avg-out-rate", "buffering-left",
|
||||
"estimated-total", "old-state", "new-state", "pending-state",
|
||||
"clock", "ready", "position", "new-base-time", "live", "min-latency",
|
||||
"clock", "ready", "position", "reset-time", "live", "min-latency",
|
||||
"max-latency", "busy", "type", "owner", "update", "applied-rate",
|
||||
"start", "stop", "minsize", "maxsize", "async", "proportion",
|
||||
"diff", "timestamp", "flags", "cur-type", "cur", "stop-type",
|
||||
|
|
|
@ -55,7 +55,7 @@ typedef enum _GstQuarkId
|
|||
GST_QUARK_CLOCK = 26,
|
||||
GST_QUARK_READY = 27,
|
||||
GST_QUARK_POSITION = 28,
|
||||
GST_QUARK_NEW_BASE_TIME = 29,
|
||||
GST_QUARK_RESET_TIME = 29,
|
||||
GST_QUARK_LIVE = 30,
|
||||
GST_QUARK_MIN_LATENCY = 31,
|
||||
GST_QUARK_MAX_LATENCY = 32,
|
||||
|
|
Loading…
Reference in a new issue