mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
message: add timeout to progress message
Add a timeout member to the progress messages to let the application know about the timeout so that it can do some gui things with it.
This commit is contained in:
parent
fab02a497a
commit
ea21e404a7
3 changed files with 6 additions and 4 deletions
|
@ -2104,7 +2104,7 @@ gst_message_new_progress (GstObject * src, GstProgressType type,
|
|||
{
|
||||
GstMessage *message;
|
||||
GstStructure *structure;
|
||||
gint percent = 100;
|
||||
gint percent = 100, timeout = -1;
|
||||
|
||||
g_return_val_if_fail (code != NULL, NULL);
|
||||
g_return_val_if_fail (text != NULL, NULL);
|
||||
|
@ -2116,7 +2116,8 @@ gst_message_new_progress (GstObject * src, GstProgressType type,
|
|||
GST_QUARK (TYPE), GST_TYPE_PROGRESS_TYPE, type,
|
||||
GST_QUARK (CODE), G_TYPE_STRING, code,
|
||||
GST_QUARK (TEXT), G_TYPE_STRING, text,
|
||||
GST_QUARK (PERCENT), G_TYPE_INT, percent, NULL);
|
||||
GST_QUARK (PERCENT), G_TYPE_INT, percent,
|
||||
GST_QUARK (TIMEOUT), G_TYPE_INT, timeout, NULL);
|
||||
message = gst_message_new_custom (GST_MESSAGE_PROGRESS, src, structure);
|
||||
|
||||
return message;
|
||||
|
|
|
@ -50,7 +50,7 @@ static const gchar *_quark_strings[] = {
|
|||
"intermediate", "GstMessageStepStart", "active", "eos", "sink-message",
|
||||
"message", "GstMessageQOS", "running-time", "stream-time", "jitter",
|
||||
"quality", "processed", "dropped", "buffering-ranges", "GstMessageProgress",
|
||||
"code", "text", "percent"
|
||||
"code", "text", "percent", "timeout"
|
||||
};
|
||||
|
||||
GQuark _priv_gst_quark_table[GST_QUARK_MAX];
|
||||
|
|
|
@ -131,8 +131,9 @@ typedef enum _GstQuarkId
|
|||
GST_QUARK_CODE = 102,
|
||||
GST_QUARK_TEXT = 103,
|
||||
GST_QUARK_PERCENT = 104,
|
||||
GST_QUARK_TIMEOUT = 105,
|
||||
|
||||
GST_QUARK_MAX = 105
|
||||
GST_QUARK_MAX = 106
|
||||
} GstQuarkId;
|
||||
|
||||
extern GQuark _priv_gst_quark_table[GST_QUARK_MAX];
|
||||
|
|
Loading…
Reference in a new issue