</parameters>
</function>
<function name="parse_buffering_percent" c:identifier="gst_play_message_parse_buffering_percent" version="1.20">
- <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given buffering-percent @msg and extract the corresponding value</doc>
+ <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given buffering @msg and extract the corresponding value</doc>
<source-position filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.h"/>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</parameters>
</function>
<function name="parse_duration_updated" c:identifier="gst_play_message_parse_duration_updated" version="1.20">
- <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given duration @msg and extract the corresponding #GstClockTime</doc>
+ <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given duration-changed @msg and extract the corresponding #GstClockTime</doc>
<source-position filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.h"/>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</parameters>
</function>
<function name="parse_media_info_updated" c:identifier="gst_play_message_parse_media_info_updated" version="1.20">
- <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given @msg and extract the corresponding media information</doc>
+ <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given media-info-updated @msg and extract the corresponding media information</doc>
<source-position filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.h"/>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</parameters>
</function>
<function name="parse_muted_changed" c:identifier="gst_play_message_parse_muted_changed" version="1.20">
- <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given @msg and extract the corresponding audio muted state</doc>
+ <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given mute-changed @msg and extract the corresponding audio muted state</doc>
<source-position filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.h"/>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</parameters>
</function>
<function name="parse_position_updated" c:identifier="gst_play_message_parse_position_updated" version="1.20">
- <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given position @msg and extract the corresponding #GstClockTime</doc>
+ <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given position-updated @msg and extract the corresponding #GstClockTime</doc>
<source-position filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.h"/>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</parameters>
</function>
<function name="parse_state_changed" c:identifier="gst_play_message_parse_state_changed" version="1.20">
- <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given state @msg and extract the corresponding #GstPlayState</doc>
+ <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given state-changed @msg and extract the corresponding #GstPlayState</doc>
<source-position filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.h"/>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</parameters>
</function>
<function name="parse_video_dimensions_changed" c:identifier="gst_play_message_parse_video_dimensions_changed" version="1.20">
- <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given @msg and extract the corresponding video dimensions</doc>
+ <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given video-dimensions-changed @msg and extract the corresponding video dimensions</doc>
<source-position filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.h"/>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</parameters>
</function>
<function name="parse_volume_changed" c:identifier="gst_play_message_parse_volume_changed" version="1.20">
- <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given @msg and extract the corresponding audio volume</doc>
+ <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given volume-changed @msg and extract the corresponding audio volume</doc>
<source-position filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.h"/>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</parameters>
</function>
<function name="parse_warning" c:identifier="gst_play_message_parse_warning" version="1.20">
- <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given error @msg and extract the corresponding #GError warning</doc>
+ <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given warning @msg and extract the corresponding #GError</doc>
<source-position filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.h"/>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</parameters>
</function>
<function name="play_message_parse_buffering_percent" c:identifier="gst_play_message_parse_buffering_percent" moved-to="PlayMessage.parse_buffering_percent" version="1.20">
- <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given buffering-percent @msg and extract the corresponding value</doc>
+ <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given buffering @msg and extract the corresponding value</doc>
<source-position filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.h"/>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</parameters>
</function>
<function name="play_message_parse_duration_updated" c:identifier="gst_play_message_parse_duration_updated" moved-to="PlayMessage.parse_duration_updated" version="1.20">
- <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given duration @msg and extract the corresponding #GstClockTime</doc>
+ <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given duration-changed @msg and extract the corresponding #GstClockTime</doc>
<source-position filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.h"/>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</parameters>
</function>
<function name="play_message_parse_media_info_updated" c:identifier="gst_play_message_parse_media_info_updated" moved-to="PlayMessage.parse_media_info_updated" version="1.20">
- <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given @msg and extract the corresponding media information</doc>
+ <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given media-info-updated @msg and extract the corresponding media information</doc>
<source-position filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.h"/>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</parameters>
</function>
<function name="play_message_parse_muted_changed" c:identifier="gst_play_message_parse_muted_changed" moved-to="PlayMessage.parse_muted_changed" version="1.20">
- <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given @msg and extract the corresponding audio muted state</doc>
+ <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given mute-changed @msg and extract the corresponding audio muted state</doc>
<source-position filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.h"/>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</parameters>
</function>
<function name="play_message_parse_position_updated" c:identifier="gst_play_message_parse_position_updated" moved-to="PlayMessage.parse_position_updated" version="1.20">
- <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given position @msg and extract the corresponding #GstClockTime</doc>
+ <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given position-updated @msg and extract the corresponding #GstClockTime</doc>
<source-position filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.h"/>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</parameters>
</function>
<function name="play_message_parse_state_changed" c:identifier="gst_play_message_parse_state_changed" moved-to="PlayMessage.parse_state_changed" version="1.20">
- <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given state @msg and extract the corresponding #GstPlayState</doc>
+ <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given state-changed @msg and extract the corresponding #GstPlayState</doc>
<source-position filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.h"/>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</parameters>
</function>
<function name="play_message_parse_video_dimensions_changed" c:identifier="gst_play_message_parse_video_dimensions_changed" moved-to="PlayMessage.parse_video_dimensions_changed" version="1.20">
- <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given @msg and extract the corresponding video dimensions</doc>
+ <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given video-dimensions-changed @msg and extract the corresponding video dimensions</doc>
<source-position filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.h"/>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</parameters>
</function>
<function name="play_message_parse_volume_changed" c:identifier="gst_play_message_parse_volume_changed" moved-to="PlayMessage.parse_volume_changed" version="1.20">
- <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given @msg and extract the corresponding audio volume</doc>
+ <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given volume-changed @msg and extract the corresponding audio volume</doc>
<source-position filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.h"/>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</parameters>
</function>
<function name="play_message_parse_warning" c:identifier="gst_play_message_parse_warning" moved-to="PlayMessage.parse_warning" version="1.20">
- <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given error @msg and extract the corresponding #GError warning</doc>
+ <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.c">Parse the given warning @msg and extract the corresponding #GError</doc>
<source-position filename="../subprojects/gst-plugins-bad/gst-libs/gst/play/gstplay.h"/>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
return g_str_equal (gst_structure_get_name (data), GST_PLAY_MESSAGE_DATA);
}
-#define PARSE_MESSAGE_FIELD(msg, field, value_type, value) G_STMT_START { \
+#define PARSE_MESSAGE_FIELD(msg, expected_msg_type, field, value_type, value) G_STMT_START { \
const GstStructure *data = NULL; \
+ GstPlayMessage msg_type; \
g_return_if_fail (gst_play_is_play_message (msg)); \
+ gst_play_message_parse_type (msg, &msg_type); \
+ g_return_if_fail (msg_type == expected_msg_type); \
data = gst_message_get_structure (msg); \
gst_structure_get (data, field, value_type, value, NULL); \
} G_STMT_END
void
gst_play_message_parse_type (GstMessage * msg, GstPlayMessage * type)
{
- PARSE_MESSAGE_FIELD (msg, GST_PLAY_MESSAGE_DATA_TYPE,
- GST_TYPE_PLAY_MESSAGE, type);
+ const GstStructure *data = NULL;
+ g_return_if_fail (gst_play_is_play_message (msg));
+ data = gst_message_get_structure (msg);
+ gst_structure_get (data, GST_PLAY_MESSAGE_DATA_TYPE, GST_TYPE_PLAY_MESSAGE,
+ type, NULL);
}
/**
* @msg: A #GstMessage
* @duration: (out) (optional): the resulting duration
*
- * Parse the given duration @msg and extract the corresponding #GstClockTime
+ * Parse the given duration-changed @msg and extract the corresponding #GstClockTime
*
* Since: 1.20
*/
gst_play_message_parse_duration_updated (GstMessage * msg,
GstClockTime * duration)
{
- PARSE_MESSAGE_FIELD (msg, GST_PLAY_MESSAGE_DATA_DURATION,
- GST_TYPE_CLOCK_TIME, duration);
+ PARSE_MESSAGE_FIELD (msg, GST_PLAY_MESSAGE_DURATION_CHANGED,
+ GST_PLAY_MESSAGE_DATA_DURATION, GST_TYPE_CLOCK_TIME, duration);
}
/**
* @msg: A #GstMessage
* @position: (out) (optional): the resulting position
*
- * Parse the given position @msg and extract the corresponding #GstClockTime
+ * Parse the given position-updated @msg and extract the corresponding #GstClockTime
*
* Since: 1.20
*/
gst_play_message_parse_position_updated (GstMessage * msg,
GstClockTime * position)
{
- PARSE_MESSAGE_FIELD (msg, GST_PLAY_MESSAGE_DATA_POSITION,
- GST_TYPE_CLOCK_TIME, position);
+ PARSE_MESSAGE_FIELD (msg, GST_PLAY_MESSAGE_POSITION_UPDATED,
+ GST_PLAY_MESSAGE_DATA_POSITION, GST_TYPE_CLOCK_TIME, position);
}
/**
* @msg: A #GstMessage
* @state: (out) (optional): the resulting play state
*
- * Parse the given state @msg and extract the corresponding #GstPlayState
+ * Parse the given state-changed @msg and extract the corresponding #GstPlayState
*
* Since: 1.20
*/
void
gst_play_message_parse_state_changed (GstMessage * msg, GstPlayState * state)
{
- PARSE_MESSAGE_FIELD (msg, GST_PLAY_MESSAGE_DATA_PLAY_STATE,
- GST_TYPE_PLAY_STATE, state);
+ PARSE_MESSAGE_FIELD (msg, GST_PLAY_MESSAGE_STATE_CHANGED,
+ GST_PLAY_MESSAGE_DATA_PLAY_STATE, GST_TYPE_PLAY_STATE, state);
}
/**
* @msg: A #GstMessage
* @percent: (out) (optional): the resulting buffering percent
*
- * Parse the given buffering-percent @msg and extract the corresponding value
+ * Parse the given buffering @msg and extract the corresponding value
*
* Since: 1.20
*/
void
gst_play_message_parse_buffering_percent (GstMessage * msg, guint * percent)
{
- PARSE_MESSAGE_FIELD (msg, GST_PLAY_MESSAGE_DATA_BUFFERING_PERCENT,
- G_TYPE_UINT, percent);
+ PARSE_MESSAGE_FIELD (msg, GST_PLAY_MESSAGE_BUFFERING,
+ GST_PLAY_MESSAGE_DATA_BUFFERING_PERCENT, G_TYPE_UINT, percent);
}
/**
gst_play_message_parse_error (GstMessage * msg, GError ** error,
GstStructure ** details)
{
- PARSE_MESSAGE_FIELD (msg, GST_PLAY_MESSAGE_DATA_ERROR, G_TYPE_ERROR, error);
- PARSE_MESSAGE_FIELD (msg, GST_PLAY_MESSAGE_DATA_ERROR_DETAILS,
- GST_TYPE_STRUCTURE, details);
+ PARSE_MESSAGE_FIELD (msg, GST_PLAY_MESSAGE_ERROR, GST_PLAY_MESSAGE_DATA_ERROR,
+ G_TYPE_ERROR, error);
+ PARSE_MESSAGE_FIELD (msg, GST_PLAY_MESSAGE_ERROR,
+ GST_PLAY_MESSAGE_DATA_ERROR_DETAILS, GST_TYPE_STRUCTURE, details);
}
/**
* @error: (out) (optional) (transfer full): the resulting warning
* @details: (out) (optional) (nullable) (transfer full): A #GstStructure containing additional details about the warning
*
- * Parse the given error @msg and extract the corresponding #GError warning
+ * Parse the given warning @msg and extract the corresponding #GError
*
* Since: 1.20
*/
gst_play_message_parse_warning (GstMessage * msg, GError ** error,
GstStructure ** details)
{
- PARSE_MESSAGE_FIELD (msg, GST_PLAY_MESSAGE_DATA_WARNING, G_TYPE_ERROR, error);
- PARSE_MESSAGE_FIELD (msg, GST_PLAY_MESSAGE_DATA_WARNING, GST_TYPE_STRUCTURE,
- details);
+ PARSE_MESSAGE_FIELD (msg, GST_PLAY_MESSAGE_WARNING,
+ GST_PLAY_MESSAGE_DATA_WARNING, G_TYPE_ERROR, error);
+ PARSE_MESSAGE_FIELD (msg, GST_PLAY_MESSAGE_WARNING,
+ GST_PLAY_MESSAGE_DATA_WARNING_DETAILS, GST_TYPE_STRUCTURE, details);
}
/**
* @width: (out) (optional): the resulting video width
* @height: (out) (optional): the resulting video height
*
- * Parse the given @msg and extract the corresponding video dimensions
+ * Parse the given video-dimensions-changed @msg and extract the corresponding video dimensions
*
* Since: 1.20
*/
gst_play_message_parse_video_dimensions_changed (GstMessage * msg,
guint * width, guint * height)
{
- PARSE_MESSAGE_FIELD (msg, GST_PLAY_MESSAGE_DATA_VIDEO_WIDTH,
- G_TYPE_UINT, width);
- PARSE_MESSAGE_FIELD (msg, GST_PLAY_MESSAGE_DATA_VIDEO_HEIGHT,
- G_TYPE_UINT, height);
+ PARSE_MESSAGE_FIELD (msg, GST_PLAY_MESSAGE_VIDEO_DIMENSIONS_CHANGED,
+ GST_PLAY_MESSAGE_DATA_VIDEO_WIDTH, G_TYPE_UINT, width);
+ PARSE_MESSAGE_FIELD (msg, GST_PLAY_MESSAGE_VIDEO_DIMENSIONS_CHANGED,
+ GST_PLAY_MESSAGE_DATA_VIDEO_HEIGHT, G_TYPE_UINT, height);
}
/**
* @msg: A #GstMessage
* @info: (out) (optional) (transfer full): the resulting media info
*
- * Parse the given @msg and extract the corresponding media information
+ * Parse the given media-info-updated @msg and extract the corresponding media information
*
* Since: 1.20
*/
gst_play_message_parse_media_info_updated (GstMessage * msg,
GstPlayMediaInfo ** info)
{
- PARSE_MESSAGE_FIELD (msg, GST_PLAY_MESSAGE_DATA_MEDIA_INFO,
- GST_TYPE_PLAY_MEDIA_INFO, info);
+ PARSE_MESSAGE_FIELD (msg, GST_PLAY_MESSAGE_MEDIA_INFO_UPDATED,
+ GST_PLAY_MESSAGE_DATA_MEDIA_INFO, GST_TYPE_PLAY_MEDIA_INFO, info);
}
/**
* @msg: A #GstMessage
* @volume: (out) (optional): the resulting audio volume
*
- * Parse the given @msg and extract the corresponding audio volume
+ * Parse the given volume-changed @msg and extract the corresponding audio volume
*
* Since: 1.20
*/
void
gst_play_message_parse_volume_changed (GstMessage * msg, gdouble * volume)
{
- PARSE_MESSAGE_FIELD (msg, GST_PLAY_MESSAGE_DATA_VOLUME, G_TYPE_DOUBLE,
- volume);
+ PARSE_MESSAGE_FIELD (msg, GST_PLAY_MESSAGE_VOLUME_CHANGED,
+ GST_PLAY_MESSAGE_DATA_VOLUME, G_TYPE_DOUBLE, volume);
}
/**
* @msg: A #GstMessage
* @muted: (out) (optional): the resulting audio muted state
*
- * Parse the given @msg and extract the corresponding audio muted state
+ * Parse the given mute-changed @msg and extract the corresponding audio muted state
*
* Since: 1.20
*/
void
gst_play_message_parse_muted_changed (GstMessage * msg, gboolean * muted)
{
- PARSE_MESSAGE_FIELD (msg, GST_PLAY_MESSAGE_DATA_IS_MUTED, G_TYPE_BOOLEAN,
- muted);
+ PARSE_MESSAGE_FIELD (msg, GST_PLAY_MESSAGE_MUTE_CHANGED,
+ GST_PLAY_MESSAGE_DATA_IS_MUTED, G_TYPE_BOOLEAN, muted);
}