mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
query: Remove the TOC query, it's not very useful now that we have sticky events
This commit is contained in:
parent
67324c4998
commit
1b75a55b19
3 changed files with 1 additions and 86 deletions
|
@ -2254,10 +2254,6 @@ gst_query_parse_nth_scheduling_mode
|
|||
gst_query_has_scheduling_mode
|
||||
|
||||
gst_query_new_drain
|
||||
|
||||
gst_query_new_toc
|
||||
gst_query_parse_toc
|
||||
gst_query_set_toc
|
||||
<SUBSECTION Standard>
|
||||
GstQueryClass
|
||||
GST_QUERY
|
||||
|
|
|
@ -110,7 +110,6 @@ static GstQueryQuarks query_quarks[] = {
|
|||
{GST_QUERY_ACCEPT_CAPS, "accept-caps", 0},
|
||||
{GST_QUERY_CAPS, "caps", 0},
|
||||
{GST_QUERY_DRAIN, "drain", 0},
|
||||
{GST_QUERY_TOC, "toc", 0},
|
||||
|
||||
{0, NULL, 0}
|
||||
};
|
||||
|
@ -2334,75 +2333,3 @@ gst_query_new_drain (void)
|
|||
|
||||
return query;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_query_new_toc:
|
||||
*
|
||||
* Constructs a new query TOC query object. Use gst_query_unref()
|
||||
* when done with it. A TOC query is used to query the full TOC with
|
||||
* the UID marker for TOC extending (to insert some new entries).
|
||||
*
|
||||
* Returns: A #GstQuery.
|
||||
*/
|
||||
GstQuery *
|
||||
gst_query_new_toc (void)
|
||||
{
|
||||
GstQuery *query;
|
||||
GstStructure *structure;
|
||||
|
||||
structure = gst_structure_new_id_empty (GST_QUARK (QUERY_TOC));
|
||||
query = gst_query_new_custom (GST_QUERY_TOC, structure);
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_query_set_toc:
|
||||
* @query: a #GstQuery with query type GST_QUERY_TOC.
|
||||
* @toc: (transfer none): the GstToc to set.
|
||||
* @extend_uid: UID which can be used for TOC extending (may be NULL),
|
||||
* 0 means root TOC level.
|
||||
*
|
||||
* Answer a TOC query by setting appropriate #GstToc structure.
|
||||
*/
|
||||
void
|
||||
gst_query_set_toc (GstQuery * query, GstToc * toc, const gchar * extend_uid)
|
||||
{
|
||||
g_return_if_fail (query != NULL);
|
||||
g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_TOC);
|
||||
g_return_if_fail (gst_query_is_writable (query));
|
||||
g_return_if_fail (toc != NULL);
|
||||
|
||||
gst_structure_id_set (GST_QUERY_STRUCTURE (query),
|
||||
GST_QUARK (TOC), GST_TYPE_TOC, toc,
|
||||
GST_QUARK (EXTEND_UID), G_TYPE_STRING, extend_uid, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_query_parse_toc:
|
||||
* @query: a #GstQuery.
|
||||
* @toc: (out) (allow-none) (transfer full): the storage for the received
|
||||
* TOC (may be NULL).
|
||||
* @extend_uid: (out) (allow-none) (transfer full): the storage for the
|
||||
received extend UID marker (may be NULL), 0 means root TOC level.
|
||||
*
|
||||
* Parse a TOC query, writing the TOC into @toc as a newly
|
||||
* allocated #GstToc and extend UID into @extend_uid, if the respective parameters
|
||||
* are non-NULL. Use @extend_uid value to insert new entries into the TOC
|
||||
* (@extend_uid will act as root entry for newly inserted entries).
|
||||
* Free @toc with gst_toc_unref() and @extend_uid with g_free() after usage.
|
||||
*/
|
||||
void
|
||||
gst_query_parse_toc (GstQuery * query, GstToc ** toc, gchar ** extend_uid)
|
||||
{
|
||||
const GstStructure *structure;
|
||||
|
||||
g_return_if_fail (query != NULL);
|
||||
g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_TOC);
|
||||
|
||||
structure = gst_query_get_structure (query);
|
||||
|
||||
gst_structure_id_get (structure,
|
||||
GST_QUARK (TOC), GST_TYPE_TOC, toc,
|
||||
GST_QUARK (EXTEND_UID), G_TYPE_STRING, extend_uid, NULL);
|
||||
}
|
||||
|
|
|
@ -102,8 +102,6 @@ typedef enum {
|
|||
* @GST_QUERY_ACCEPT_CAPS: the accept caps query
|
||||
* @GST_QUERY_CAPS: the caps query
|
||||
* @GST_QUERY_DRAIN: wait till all serialized data is consumed downstream
|
||||
* @GST_QUERY_TOC: query the full table of contents (TOC) with the marker
|
||||
* for an entry which can be used to extend received TOC. Since 0.10.37.
|
||||
*
|
||||
* Standard predefined Query types
|
||||
*/
|
||||
|
@ -127,8 +125,7 @@ typedef enum {
|
|||
GST_QUERY_SCHEDULING = GST_QUERY_MAKE_TYPE (150, FLAG(UPSTREAM)),
|
||||
GST_QUERY_ACCEPT_CAPS = GST_QUERY_MAKE_TYPE (160, FLAG(BOTH)),
|
||||
GST_QUERY_CAPS = GST_QUERY_MAKE_TYPE (170, FLAG(BOTH)),
|
||||
GST_QUERY_DRAIN = GST_QUERY_MAKE_TYPE (180, FLAG(DOWNSTREAM) | FLAG(SERIALIZED)),
|
||||
GST_QUERY_TOC = GST_QUERY_MAKE_TYPE (190, FLAG(BOTH))
|
||||
GST_QUERY_DRAIN = GST_QUERY_MAKE_TYPE (180, FLAG(DOWNSTREAM) | FLAG(SERIALIZED))
|
||||
} GstQueryType;
|
||||
#undef FLAG
|
||||
|
||||
|
@ -478,11 +475,6 @@ void gst_query_parse_caps_result (GstQuery *query, GstCaps **c
|
|||
/* drain query */
|
||||
GstQuery * gst_query_new_drain (void) G_GNUC_MALLOC;
|
||||
|
||||
/* TOC query */
|
||||
GstQuery * gst_query_new_toc (void);
|
||||
void gst_query_set_toc (GstQuery *query, GstToc *toc, const gchar *extend_uid);
|
||||
void gst_query_parse_toc (GstQuery *query, GstToc **toc, gchar **extend_uid);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_QUERY_H__ */
|
||||
|
|
Loading…
Reference in a new issue