gst_query_set_uri
gst_query_parse_uri_redirection
gst_query_set_uri_redirection
+gst_query_parse_uri_redirection_permanent
+gst_query_set_uri_redirection_permanent
gst_query_new_allocation
gst_query_parse_allocation
"GstEventStreamStart", "stream-id", "GstQueryContext",
"GstMessageNeedContext", "GstMessageHaveContext", "context", "context-type",
"GstMessageStreamStart", "group-id", "uri-redirection",
- "GstMessageDeviceAdded", "GstMessageDeviceRemoved", "device"
+ "GstMessageDeviceAdded", "GstMessageDeviceRemoved", "device",
+ "uri-redirection-permanent"
};
GQuark _priv_gst_quark_table[GST_QUARK_MAX];
GST_QUARK_MESSAGE_DEVICE_ADDED = 170,
GST_QUARK_MESSAGE_DEVICE_REMOVED = 171,
GST_QUARK_DEVICE = 172,
- GST_QUARK_MAX = 173
+ GST_QUARK_URI_REDIRECTION_PERMANENT = 173,
+ GST_QUARK_MAX = 174
} GstQuarkId;
extern GQuark _priv_gst_quark_table[GST_QUARK_MAX];
}
/**
+ * gst_query_set_uri_redirection_permanent:
+ * @query: a #GstQuery with query type GST_QUERY_URI
+ * @permanent: whether the redirect is permanent or not
+ *
+ * Answer a URI query by setting the requested URI redirection
+ * to permanent or not.
+ *
+ * Since: 1.4
+ */
+void
+gst_query_set_uri_redirection_permanent (GstQuery * query, gboolean permanent)
+{
+ GstStructure *structure;
+
+ g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_URI);
+ g_return_if_fail (gst_query_is_writable (query));
+
+ structure = GST_QUERY_STRUCTURE (query);
+ gst_structure_id_set (structure, GST_QUARK (URI_REDIRECTION_PERMANENT),
+ G_TYPE_BOOLEAN, permanent, NULL);
+}
+
+/**
+ * gst_query_parse_uri_redirection_permanent:
+ * @query: a #GstQuery
+ * @permanent: (out) (allow-none): if the URI redirection is permanent
+ * (may be NULL)
+ *
+ * Parse an URI query, and set @permanent to %TRUE if there is a redirection
+ * and it should be considered permanent. If a redirection is permanent,
+ * applications should update their internal storage of the URI, otherwise
+ * they should make all future requests to the original URI.
+ *
+ * Since: 1.4
+ */
+void
+gst_query_parse_uri_redirection_permanent (GstQuery * query,
+ gboolean * permanent)
+{
+ GstStructure *structure;
+
+ g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_URI);
+
+ structure = GST_QUERY_STRUCTURE (query);
+ if (permanent) {
+ if (!gst_structure_id_get (structure, GST_QUARK (URI_REDIRECTION_PERMANENT),
+ G_TYPE_BOOLEAN, permanent, NULL))
+ *permanent = FALSE;
+ }
+}
+
+/**
* gst_query_new_allocation:
* @caps: the negotiated caps
* @need_pool: return a pool
void gst_query_set_uri (GstQuery *query, const gchar *uri);
void gst_query_parse_uri_redirection (GstQuery *query, gchar **uri);
void gst_query_set_uri_redirection (GstQuery *query, const gchar *uri);
+void gst_query_parse_uri_redirection_permanent (GstQuery *query, gboolean * permanent);
+void gst_query_set_uri_redirection_permanent (GstQuery *query, gboolean permanent);
/* allocation query */
GstQuery * gst_query_new_allocation (GstCaps *caps, gboolean need_pool) G_GNUC_MALLOC;
gst_query_parse_segment
gst_query_parse_uri
gst_query_parse_uri_redirection
+ gst_query_parse_uri_redirection_permanent
gst_query_remove_nth_allocation_meta
gst_query_remove_nth_allocation_param
gst_query_remove_nth_allocation_pool
gst_query_set_segment
gst_query_set_uri
gst_query_set_uri_redirection
+ gst_query_set_uri_redirection_permanent
gst_query_type_flags_get_type
gst_query_type_get_flags
gst_query_type_get_name