mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 17:18:15 +00:00
message: add step-start message
This commit is contained in:
parent
4530151ad2
commit
e969b3a399
6 changed files with 40 additions and 2 deletions
|
@ -1146,6 +1146,8 @@ gst_message_new_latency
|
|||
gst_message_new_async_start
|
||||
gst_message_parse_async_start
|
||||
gst_message_new_async_done
|
||||
gst_message_new_step_start
|
||||
gst_message_parse_step_start
|
||||
|
||||
GstStructureChangeType
|
||||
gst_message_new_structure_change
|
||||
|
|
|
@ -110,6 +110,7 @@ static GstMessageQuarks message_quarks[] = {
|
|||
{GST_MESSAGE_ASYNC_START, "async-start", 0},
|
||||
{GST_MESSAGE_ASYNC_DONE, "async-done", 0},
|
||||
{GST_MESSAGE_REQUEST_STATE, "request-state", 0},
|
||||
{GST_MESSAGE_STEP_START, "step-start", 0},
|
||||
{0, NULL, 0}
|
||||
};
|
||||
|
||||
|
@ -1723,3 +1724,28 @@ gst_message_parse_step_done (GstMessage * message, GstFormat * format,
|
|||
g_value_get_uint64 (gst_structure_id_get_value (message->structure,
|
||||
GST_QUARK (DURATION)));
|
||||
}
|
||||
|
||||
GstMessage *
|
||||
gst_message_new_step_start (GstObject * src, gboolean active)
|
||||
{
|
||||
GstMessage *message;
|
||||
GstStructure *structure;
|
||||
|
||||
structure = gst_structure_id_new (GST_QUARK (MESSAGE_STEP_START),
|
||||
GST_QUARK (ACTIVE), G_TYPE_BOOLEAN, active, NULL);
|
||||
message = gst_message_new_custom (GST_MESSAGE_STEP_START, src, structure);
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
void
|
||||
gst_message_parse_step_start (GstMessage * message, gboolean * active)
|
||||
{
|
||||
g_return_if_fail (GST_IS_MESSAGE (message));
|
||||
g_return_if_fail (GST_MESSAGE_TYPE (message) == GST_MESSAGE_STEP_START);
|
||||
|
||||
if (active)
|
||||
*active =
|
||||
g_value_get_boolean (gst_structure_id_get_value (message->structure,
|
||||
GST_QUARK (ACTIVE)));
|
||||
}
|
||||
|
|
|
@ -84,6 +84,7 @@ typedef struct _GstMessageClass GstMessageClass;
|
|||
* @GST_MESSAGE_REQUEST_STATE: Posted by elements when they want the pipeline to
|
||||
* change state. This message is a suggestion to the application which can
|
||||
* decide to perform the state change on (part of) the pipeline. Since: 0.10.23.
|
||||
* @GST_MESSAGE_STEP_START: A stepping operation was started.
|
||||
* @GST_MESSAGE_ANY: mask for all of the above messages.
|
||||
*
|
||||
* The different message types that are available.
|
||||
|
@ -117,6 +118,7 @@ typedef enum
|
|||
GST_MESSAGE_ASYNC_START = (1 << 20),
|
||||
GST_MESSAGE_ASYNC_DONE = (1 << 21),
|
||||
GST_MESSAGE_REQUEST_STATE = (1 << 22),
|
||||
GST_MESSAGE_STEP_START = (1 << 23),
|
||||
GST_MESSAGE_ANY = ~0
|
||||
} GstMessageType;
|
||||
|
||||
|
@ -463,6 +465,10 @@ const GValue * gst_message_get_stream_status_object (GstMessage *message);
|
|||
GstMessage * gst_message_new_request_state (GstObject * src, GstState state);
|
||||
void gst_message_parse_request_state (GstMessage * message, GstState *state);
|
||||
|
||||
/* STEP_START */
|
||||
GstMessage * gst_message_new_step_start (GstObject * src, gboolean active);
|
||||
void gst_message_parse_step_start (GstMessage * message, gboolean *active);
|
||||
|
||||
/* custom messages */
|
||||
GstMessage * gst_message_new_custom (GstMessageType type,
|
||||
GstObject * src,
|
||||
|
|
|
@ -47,7 +47,7 @@ static const gchar *_quark_strings[] = {
|
|||
"GstQueryPosition", "GstQueryDuration", "GstQueryLatency", "GstQueryConvert",
|
||||
"GstQuerySegment", "GstQuerySeeking", "GstQueryFormats", "GstQueryBuffering",
|
||||
"GstQueryURI", "GstEventStep", "GstMessageStepDone", "amount", "flush",
|
||||
"intermediate"
|
||||
"intermediate", "GstMessageStepStart", "active"
|
||||
};
|
||||
|
||||
GQuark _priv_gst_quark_table[GST_QUARK_MAX];
|
||||
|
|
|
@ -114,8 +114,10 @@ typedef enum _GstQuarkId
|
|||
GST_QUARK_AMOUNT = 85,
|
||||
GST_QUARK_FLUSH = 86,
|
||||
GST_QUARK_INTERMEDIATE = 87,
|
||||
GST_QUARK_MESSAGE_STEP_START = 88,
|
||||
GST_QUARK_ACTIVE = 89,
|
||||
|
||||
GST_QUARK_MAX = 88
|
||||
GST_QUARK_MAX = 90
|
||||
} GstQuarkId;
|
||||
|
||||
extern GQuark _priv_gst_quark_table[GST_QUARK_MAX];
|
||||
|
|
|
@ -493,6 +493,7 @@ EXPORTS
|
|||
gst_message_new_state_changed
|
||||
gst_message_new_state_dirty
|
||||
gst_message_new_step_done
|
||||
gst_message_new_step_start
|
||||
gst_message_new_stream_status
|
||||
gst_message_new_structure_change
|
||||
gst_message_new_tag
|
||||
|
@ -512,6 +513,7 @@ EXPORTS
|
|||
gst_message_parse_segment_start
|
||||
gst_message_parse_state_changed
|
||||
gst_message_parse_step_done
|
||||
gst_message_parse_step_start
|
||||
gst_message_parse_stream_status
|
||||
gst_message_parse_structure_change
|
||||
gst_message_parse_tag
|
||||
|
|
Loading…
Reference in a new issue