GstQuery: GStreamer 1.0 Core Reference Manual

## GstQuery GstQuery |

## Functions

#define | GST_QUERY_MAKE_TYPE()
#define | GST_QUERY_TYPE()
#define | GST_QUERY_TYPE_NAME()
#define | GST_QUERY_IS_UPSTREAM()
#define | GST_QUERY_IS_DOWNSTREAM()
#define | GST_QUERY_IS_SERIALIZED()
GstQueryTypeFlags | gst_query_type_get_flags ()
const gchar * | gst_query_type_get_name ()
GQuark | gst_query_type_to_quark ()
GstQuery * | gst_query_ref ()
void | gst_query_unref ()
GstQuery * | gst_query_copy ()
#define | gst_query_make_writable()
#define | gst_query_is_writable()
gboolean | gst_query_replace ()
GstStructure * | gst_query_writable_structure ()
GstQuery * | gst_query_new_custom ()
const GstStructure * | gst_query_get_structure ()
GstQuery * | gst_query_new_convert ()
void | gst_query_set_convert ()
void | gst_query_parse_convert ()
GstQuery * | gst_query_new_position ()
void | gst_query_set_position ()
void | gst_query_parse_position ()
GstQuery * | gst_query_new_duration ()
void | gst_query_set_duration ()
void | gst_query_parse_duration ()
GstQuery * | gst_query_new_latency ()
void | gst_query_parse_latency ()
void | gst_query_set_latency ()
GstQuery * | gst_query_new_seeking ()
void | gst_query_set_seeking ()
void | gst_query_parse_seeking ()
GstQuery * | gst_query_new_formats ()
void | gst_query_set_formats ()
void | gst_query_set_formatsv ()
void | gst_query_parse_n_formats ()
void | gst_query_parse_nth_format ()
GstQuery * | gst_query_new_segment ()
void | gst_query_set_segment ()
void | gst_query_parse_segment ()
GstQuery * | gst_query_new_caps ()
void | gst_query_parse_caps ()
void | gst_query_set_caps_result ()
void | gst_query_parse_caps_result ()
GstQuery * | gst_query_new_accept_caps ()
void | gst_query_parse_accept_caps ()
void | gst_query_set_accept_caps_result ()
void | gst_query_parse_accept_caps_result ()
GstQuery * | gst_query_new_buffering ()
void | gst_query_set_buffering_percent ()
void | gst_query_parse_buffering_percent ()
void | gst_query_set_buffering_stats ()
void | gst_query_parse_buffering_stats ()
void | gst_query_set_buffering_range ()
void | gst_query_parse_buffering_range ()
gboolean | gst_query_add_buffering_range ()
guint | gst_query_get_n_buffering_ranges ()
gboolean | gst_query_parse_nth_buffering_range ()
GstQuery * | gst_query_new_uri ()
void | gst_query_parse_uri ()
void | gst_query_set_uri ()
void | gst_query_parse_uri_redirection ()
void | gst_query_set_uri_redirection ()
void | gst_query_parse_uri_redirection_permanent ()
void | gst_query_set_uri_redirection_permanent ()
GstQuery * | gst_query_new_allocation ()
void | gst_query_parse_allocation ()
void | gst_query_add_allocation_pool ()
guint | gst_query_get_n_allocation_pools ()
void | gst_query_parse_nth_allocation_pool ()
void | gst_query_set_nth_allocation_pool ()
void | gst_query_remove_nth_allocation_pool ()
void | gst_query_add_allocation_param ()
guint | gst_query_get_n_allocation_params ()
void | gst_query_parse_nth_allocation_param ()
void | gst_query_set_nth_allocation_param ()
void | gst_query_remove_nth_allocation_param ()
void | gst_query_add_allocation_meta ()
guint | gst_query_get_n_allocation_metas ()
GType | gst_query_parse_nth_allocation_meta ()
void | gst_query_remove_nth_allocation_meta ()
gboolean | gst_query_find_allocation_meta ()
GstQuery * | gst_query_new_scheduling ()
void | gst_query_parse_scheduling ()
void | gst_query_set_scheduling ()
void | gst_query_add_scheduling_mode ()
guint | gst_query_get_n_scheduling_modes ()
GstPadMode | gst_query_parse_nth_scheduling_mode ()
gboolean | gst_query_has_scheduling_mode ()
gboolean | gst_query_has_scheduling_mode_with_flags ()
GstQuery * | gst_query_new_drain ()
GstQuery * | gst_query_new_context ()
void | gst_query_set_context ()
void | gst_query_parse_context ()
gboolean | gst_query_parse_context_type ()

## Types and Values

struct | GstQuery
enum | GstQueryTypeFlags
#define | GST_QUERY_TYPE_BOTH
enum | GstQueryType
enum | GstBufferingMode
enum | GstSchedulingFlags

## Object Hierarchy

        GBoxed
        ╰── GstQuery

## Includes

    #include <gst/gst.h>

## Description

## Functions

### GST_QUERY_MAKE_TYPE()

    #define             GST_QUERY_MAKE_TYPE(num,flags)

### GST_QUERY_TYPE()

    #define GST_QUERY_TYPE(query)  (((GstQuery*)(query))->type)

### GST_QUERY_TYPE_NAME()

    #define GST_QUERY_TYPE_NAME(query) (gst_query_type_get_name(GST_QUERY_TYPE(query)))

### GST_QUERY_IS_UPSTREAM()

    #define GST_QUERY_IS_UPSTREAM(ev)       !!(GST_QUERY_TYPE (ev) & GST_QUERY_TYPE_UPSTREAM)

### GST_QUERY_IS_DOWNSTREAM()

    #define GST_QUERY_IS_DOWNSTREAM(ev)     !!(GST_QUERY_TYPE (ev) & GST_QUERY_TYPE_DOWNSTREAM)

### GST_QUERY_IS_SERIALIZED()

    #define GST_QUERY_IS_SERIALIZED(ev)     !!(GST_QUERY_TYPE (ev) & GST_QUERY_TYPE_SERIALIZED)

### gst_query_type_get_flags ()

    GstQueryTypeFlags
    gst_query_type_get_flags (GstQueryType type);

### gst_query_type_get_name ()

    const gchar *
    gst_query_type_get_name (GstQueryType type);

### gst_query_type_to_quark ()

    GQuark
    gst_query_type_to_quark (GstQueryType type);

### gst_query_ref ()

    GstQuery *
    gst_query_ref (GstQuery *q);

### gst_query_unref ()

    void
    gst_query_unref (GstQuery *q);

### gst_query_copy ()

    GstQuery *
    gst_query_copy (const GstQuery *q);

### gst_query_make_writable()

    #define         gst_query_make_writable(q)      GST_QUERY_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (q)))

### gst_query_is_writable()

    #define         gst_query_is_writable(q)     gst_mini_object_is_writable (GST_MINI_OBJECT_CAST (q))

### gst_query_replace ()

    gboolean
    gst_query_replace (GstQuery **old_query,
                       GstQuery *new_query);

### gst_query_writable_structure ()

    GstStructure *
    gst_query_writable_structure (GstQuery *query);

### gst_query_new_custom ()

    GstQuery *
    gst_query_new_custom (GstQueryType type,
                          GstStructure *structure);

### gst_query_get_structure ()

    const GstStructure *
    gst_query_get_structure (GstQuery *query);

### gst_query_new_convert ()

    GstQuery *
    gst_query_new_convert (GstFormat src_format,
                           gint64 value,
                           GstFormat dest_format);

### gst_query_set_convert ()

    void
    gst_query_set_convert (GstQuery *query,
                           GstFormat src_format,
                           gint64 src_value,
                           GstFormat dest_format,
                           gint64 dest_value);

### gst_query_parse_convert ()

    void
    gst_query_parse_convert (GstQuery *query,
                             GstFormat *src_format,
                             gint64 *src_value,
                             GstFormat *dest_format,
                             gint64 *dest_value);

### gst_query_new_position ()

    GstQuery *
    gst_query_new_position (GstFormat format);

### gst_query_set_position ()

    void
    gst_query_set_position (GstQuery *query,
                            GstFormat format,
                            gint64 cur);

### gst_query_parse_position ()

    void
    gst_query_parse_position (GstQuery *query,
                              GstFormat *format,
                              gint64 *cur);

### gst_query_new_duration ()

    GstQuery *
    gst_query_new_duration (GstFormat format);

### gst_query_set_duration ()

    void
    gst_query_set_duration (GstQuery *query,
                            GstFormat format,
                            gint64 duration);

### gst_query_parse_duration ()

    void
    gst_query_parse_duration (GstQuery *query,
                              GstFormat *format,
                              gint64 *duration);

### gst_query_new_latency ()

    GstQuery *
    gst_query_new_latency (void);

### gst_query_parse_latency ()

    void
    gst_query_parse_latency (GstQuery *query,
                             gboolean *live,
                             GstClockTime *min_latency,
                             GstClockTime *max_latency);

### gst_query_set_latency ()

    void
    gst_query_set_latency (GstQuery *query,
                           gboolean live,
                           GstClockTime min_latency,
                           GstClockTime max_latency);

### gst_query_new_seeking ()

    GstQuery *
    gst_query_new_seeking (GstFormat format);

### gst_query_set_seeking ()

    void
    gst_query_set_seeking (GstQuery *query,
                           GstFormat format,
                           gboolean seekable,
                           gint64 segment_start,
                           gint64 segment_end);

### gst_query_parse_seeking ()

    void
    gst_query_parse_seeking (GstQuery *query,
                             GstFormat *format,
                             gboolean *seekable,
                             gint64 *segment_start,
                             gint64 *segment_end);

### gst_query_new_formats ()

    GstQuery *
    gst_query_new_formats (void);

### gst_query_set_formats ()

    void
    gst_query_set_formats (GstQuery *query,
                           gint n_formats,
                           ...);

### gst_query_set_formatsv ()

    void
    gst_query_set_formatsv (GstQuery *query,
                            gint n_formats,
                            const GstFormat *formats);

### gst_query_parse_n_formats ()

    void
    gst_query_parse_n_formats (GstQuery *query,
                               guint *n_formats);

### gst_query_parse_nth_format ()

    void
    gst_query_parse_nth_format (GstQuery *query,
                                guint nth,
                                GstFormat *format);

### gst_query_new_segment ()

    GstQuery *
    gst_query_new_segment (GstFormat format);

### gst_query_set_segment ()

    void
    gst_query_set_segment (GstQuery *query,
                           gdouble rate,
                           GstFormat format,
                           gint64 start_value,
                           gint64 stop_value);

### gst_query_parse_segment ()

    void
    gst_query_parse_segment (GstQuery *query,
                             gdouble *rate,
                             GstFormat *format,
                             gint64 *start_value,
                             gint64 *stop_value);

### gst_query_new_caps ()

    GstQuery *
    gst_query_new_caps (GstCaps *filter);

### gst_query_parse_caps ()

    void
    gst_query_parse_caps (GstQuery *query,
                          GstCaps **filter);

### gst_query_set_caps_result ()

    void
    gst_query_set_caps_result (GstQuery *query,
                               GstCaps *caps);

### gst_query_parse_caps_result ()

    void
    gst_query_parse_caps_result (GstQuery *query,
                                 GstCaps **caps);

### gst_query_new_accept_caps ()

    GstQuery *
    gst_query_new_accept_caps (GstCaps *caps);

### gst_query_parse_accept_caps ()

    void
    gst_query_parse_accept_caps (GstQuery *query,
                                 GstCaps **caps);

### gst_query_set_accept_caps_result ()

    void
    gst_query_set_accept_caps_result (GstQuery *query,
                                      gboolean result);

### gst_query_parse_accept_caps_result ()

    void
    gst_query_parse_accept_caps_result (GstQuery *query,
                                        gboolean *result);

### gst_query_new_buffering ()

    GstQuery *
    gst_query_new_buffering (GstFormat format);

### gst_query_set_buffering_percent ()

    void
    gst_query_set_buffering_percent (GstQuery *query,
                                     gboolean busy,
                                     gint percent);

### gst_query_parse_buffering_percent ()

    void
    gst_query_parse_buffering_percent (GstQuery *query,
                                       gboolean *busy,
                                       gint *percent);

### gst_query_set_buffering_stats ()

    void
    gst_query_set_buffering_stats (GstQuery *query,
                                   GstBufferingMode mode,
                                   gint avg_in,
                                   gint avg_out,
                                   gint64 buffering_left);

### gst_query_parse_buffering_stats ()

    void
    gst_query_parse_buffering_stats (GstQuery *query,
                                     GstBufferingMode *mode,
                                     gint *avg_in,
                                     gint *avg_out,
                                     gint64 *buffering_left);

### gst_query_set_buffering_range ()

    void
    gst_query_set_buffering_range (GstQuery *query,
                                   GstFormat format,
                                   gint64 start,
                                   gint64 stop,
                                   gint64 estimated_total);

### gst_query_parse_buffering_range ()

    void
    gst_query_parse_buffering_range (GstQuery *query,
                                     GstFormat *format,
                                     gint64 *start,
                                     gint64 *stop,
                                     gint64 *estimated_total);

### gst_query_add_buffering_range ()

    gboolean
    gst_query_add_buffering_range (GstQuery *query,
                                   gint64 start,
                                   gint64 stop);

### gst_query_get_n_buffering_ranges ()

    guint
    gst_query_get_n_buffering_ranges (GstQuery *query);

### gst_query_parse_nth_buffering_range ()

    gboolean
    gst_query_parse_nth_buffering_range (GstQuery *query,
                                         guint index,
                                         gint64 *start,
                                         gint64 *stop);

### gst_query_new_uri ()

    GstQuery *
    gst_query_new_uri (void);

### gst_query_parse_uri ()

    void
    gst_query_parse_uri (GstQuery *query,
                         gchar **uri);

### gst_query_set_uri ()

    void
    gst_query_set_uri (GstQuery *query,
                       const gchar *uri);

### gst_query_parse_uri_redirection ()

    void
    gst_query_parse_uri_redirection (GstQuery *query,
                                     gchar **uri);

### gst_query_set_uri_redirection ()

    void
    gst_query_set_uri_redirection (GstQuery *query,
                                   const gchar *uri);

### gst_query_parse_uri_redirection_permanent ()

    void
    gst_query_parse_uri_redirection_permanent
                                   (GstQuery *query,
                                    gboolean *permanent);

### gst_query_set_uri_redirection_permanent ()

    void
    gst_query_set_uri_redirection_permanent
                                   (GstQuery *query,
                                    gboolean permanent);

### gst_query_new_allocation ()

    GstQuery *
    gst_query_new_allocation (GstCaps *caps,
                              gboolean need_pool);

### gst_query_parse_allocation ()

    void
    gst_query_parse_allocation (GstQuery *query,
                                GstCaps **caps,
                                gboolean *need_pool);

### gst_query_add_allocation_pool ()

    void
    gst_query_add_allocation_pool (GstQuery *query,
                                   GstBufferPool *pool,
                                   guint size,
                                   guint min_buffers,
                                   guint max_buffers);

### gst_query_get_n_allocation_pools ()

    guint
    gst_query_get_n_allocation_pools (GstQuery *query);

### gst_query_parse_nth_allocation_pool ()

    void
    gst_query_parse_nth_allocation_pool (GstQuery *query,
                                         guint index,
                                         GstBufferPool **pool,
                                         guint *size,
                                         guint *min_buffers,
                                         guint *max_buffers);

### gst_query_set_nth_allocation_pool ()

    void
    gst_query_set_nth_allocation_pool (GstQuery *query,
                                       guint index,
                                       GstBufferPool *pool,
                                       guint size,
                                       guint min_buffers,
                                       guint max_buffers);

### gst_query_remove_nth_allocation_pool ()

    void
    gst_query_remove_nth_allocation_pool (GstQuery *query,
                                          guint index);

### gst_query_add_allocation_param ()

    void
    gst_query_add_allocation_param (GstQuery *query,
                                    GstAllocator *allocator,
                                    const GstAllocationParams *params);

### gst_query_get_n_allocation_params ()

    guint
    gst_query_get_n_allocation_params (GstQuery *query);

### gst_query_parse_nth_allocation_param ()

    void
    gst_query_parse_nth_allocation_param (GstQuery *query,
                                          guint index,
                                          GstAllocator **allocator,
                                          GstAllocationParams *params);

### gst_query_set_nth_allocation_param ()

    void
    gst_query_set_nth_allocation_param (GstQuery *query,
                                        guint index,
                                        GstAllocator *allocator,
                                        const GstAllocationParams *params);

### gst_query_remove_nth_allocation_param ()

    void
    gst_query_remove_nth_allocation_param (GstQuery *query,
                                           guint index);

### gst_query_add_allocation_meta ()

    void
    gst_query_add_allocation_meta (GstQuery *query,
                                   GType api,
                                   const GstStructure *params);

### gst_query_get_n_allocation_metas ()

    guint
    gst_query_get_n_allocation_metas (GstQuery *query);

### gst_query_parse_nth_allocation_meta ()

    GType
    gst_query_parse_nth_allocation_meta (GstQuery *query,
                                         guint index,
                                         const GstStructure **params);

### gst_query_remove_nth_allocation_meta ()

    void
    gst_query_remove_nth_allocation_meta (GstQuery *query,
                                          guint index);

### gst_query_find_allocation_meta ()

    gboolean
    gst_query_find_allocation_meta (GstQuery *query,
                                    GType api,
                                    guint *index);

### gst_query_new_scheduling ()

    GstQuery *
    gst_query_new_scheduling (void);

### gst_query_parse_scheduling ()

    void
    gst_query_parse_scheduling (GstQuery *query,
                                GstSchedulingFlags *flags,
                                gint *minsize,
                                gint *maxsize,
                                gint *align);

### gst_query_set_scheduling ()

    void
    gst_query_set_scheduling (GstQuery *query,
                              GstSchedulingFlags flags,
                              gint minsize,
                              gint maxsize,
                              gint align);

### gst_query_add_scheduling_mode ()

    void
    gst_query_add_scheduling_mode (GstQuery *query,
                                   GstPadMode mode);

### gst_query_get_n_scheduling_modes ()

    guint
    gst_query_get_n_scheduling_modes (GstQuery *query);

### gst_query_parse_nth_scheduling_mode ()

    GstPadMode
    gst_query_parse_nth_scheduling_mode (GstQuery *query,
                                         guint index);

### gst_query_has_scheduling_mode ()

    gboolean
    gst_query_has_scheduling_mode (GstQuery *query,
                                   GstPadMode mode);

### gst_query_has_scheduling_mode_with_flags ()

    gboolean
    gst_query_has_scheduling_mode_with_flags
                                   (GstQuery *query,
                                    GstPadMode mode,
                                    GstSchedulingFlags flags);

### gst_query_new_drain ()

    GstQuery *
    gst_query_new_drain (void);

### gst_query_new_context ()

    GstQuery *
    gst_query_new_context (const gchar *context_type);

### gst_query_set_context ()

    void
    gst_query_set_context (GstQuery *query,
                           GstContext *context);

### gst_query_parse_context ()

    void
    gst_query_parse_context (GstQuery *query,
                             GstContext **context);

### gst_query_parse_context_type ()

    gboolean
    gst_query_parse_context_type (GstQuery *query,
                                  const gchar **context_type);

## Types and Values

### struct GstQuery

    struct GstQuery {
      GstMiniObject mini_object;

      GstQueryType type;
    };

### enum GstQueryTypeFlags

#### Members

GST_QUERY_TYPE_UPSTREAM |  |
GST_QUERY_TYPE_DOWNSTREAM |  |
GST_QUERY_TYPE_SERIALIZED |  |

### GST_QUERY_TYPE_BOTH

    #define             GST_QUERY_TYPE_BOTH

### enum GstQueryType

#### Members

GST_QUERY_UNKNOWN |  |
GST_QUERY_POSITION |  |
GST_QUERY_DURATION |  |
GST_QUERY_LATENCY |  |
GST_QUERY_JITTER |  |
GST_QUERY_RATE |  |
GST_QUERY_SEEKING |  |
GST_QUERY_SEGMENT |  |
GST_QUERY_CONVERT |  |
GST_QUERY_FORMATS |  |
GST_QUERY_BUFFERING |  |
GST_QUERY_CUSTOM |  |
GST_QUERY_URI |  |
GST_QUERY_ALLOCATION |  |
GST_QUERY_SCHEDULING |  |
GST_QUERY_ACCEPT_CAPS |  |
GST_QUERY_CAPS |  |
GST_QUERY_DRAIN |  |
GST_QUERY_CONTEXT |  |

### enum GstBufferingMode

#### Members

GST_BUFFERING_STREAM |  |
GST_BUFFERING_DOWNLOAD |  |
GST_BUFFERING_TIMESHIFT |  |
GST_BUFFERING_LIVE |  |

### enum GstSchedulingFlags

#### Members

GST_SCHEDULING_FLAG_SEEKABLE |  |
GST_SCHEDULING_FLAG_SEQUENTIAL |  |
GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED |  |