# GstGLQuery

A GstGLQuery represents and holds an OpenGL query object. Various types of queries can be run or counters retrieved.

## GstGLQuery

Opaque GstGLQuery struct

## GstGL.GLQuery

Opaque GstGL.GLQuery struct

## GstGL.GLQuery

Opaque GstGL.GLQuery struct

### Methods

#### gst_gl_query_counter

    gst_gl_query_counter (GstGLQuery * query)

Record the result of a counter

Parameters:

`query` –

a GstGLQuery

Since : 1.10

#### GstGL.GLQuery.prototype.counter

    function GstGL.GLQuery.prototype.counter(): {
        // javascript wrapper for 'gst_gl_query_counter'
    }

Record the result of a counter

Parameters:

`query` (GstGL.GLQuery) –

a GstGL.GLQuery

Since : 1.10

#### GstGL.GLQuery.counter

    def GstGL.GLQuery.counter (self):
        #python wrapper for 'gst_gl_query_counter'

Record the result of a counter

Parameters:

`query` (GstGL.GLQuery) –

a GstGL.GLQuery

Since : 1.10

#### gst_gl_query_end

    gst_gl_query_end (GstGLQuery * query)

End counting the query

Parameters:

`query` –

a GstGLQuery

Since : 1.10

#### GstGL.GLQuery.prototype.end

    function GstGL.GLQuery.prototype.end(): {
        // javascript wrapper for 'gst_gl_query_end'
    }

End counting the query

Parameters:

`query` (GstGL.GLQuery) –

a GstGL.GLQuery

Since : 1.10

#### GstGL.GLQuery.end

    def GstGL.GLQuery.end (self):
        #python wrapper for 'gst_gl_query_end'

End counting the query

Parameters:

`query` (GstGL.GLQuery) –

a GstGL.GLQuery

Since : 1.10

#### gst_gl_query_free

    gst_gl_query_free (GstGLQuery * query)

Frees a GstGLQuery

Parameters:

`query` –

a GstGLQuery

Since : 1.10

#### GstGL.GLQuery.prototype.free

    function GstGL.GLQuery.prototype.free(): {
        // javascript wrapper for 'gst_gl_query_free'
    }

Frees a GstGL.GLQuery

Parameters:

`query` (GstGL.GLQuery) –

a GstGL.GLQuery

Since : 1.10

#### GstGL.GLQuery.free

    def GstGL.GLQuery.free (self):
        #python wrapper for 'gst_gl_query_free'

Frees a GstGL.GLQuery

Parameters:

`query` (GstGL.GLQuery) –

a GstGL.GLQuery

Since : 1.10

#### gst_gl_query_init

    gst_gl_query_init (GstGLQuery * query,
                       GstGLContext * context,
                       GstGLQueryType query_type)

Parameters:

`query` –

a GstGLQuery

`context` –

a GstGLContext

`query_type` –

the GstGLQueryType

Since : 1.10

#### GstGL.GLQuery.prototype.init

    function GstGL.GLQuery.prototype.init(context: GstGL.GLContext, query_type: GstGL.GLQueryType): {
        // javascript wrapper for 'gst_gl_query_init'
    }

Parameters:

`query` (GstGL.GLQuery) –

a GstGL.GLQuery

`context` (GstGL.GLContext) –

a GstGL.GLContext

`query_type` (GstGL.GLQueryType) –

the GstGL.GLQueryType

Since : 1.10

#### GstGL.GLQuery.init

    def GstGL.GLQuery.init (self, context, query_type):
        #python wrapper for 'gst_gl_query_init'

Parameters:

`query` (GstGL.GLQuery) –

a GstGL.GLQuery

`context` (GstGL.GLContext) –

a GstGL.GLContext

`query_type` (GstGL.GLQueryType) –

the GstGL.GLQueryType

Since : 1.10

#### gst_gl_query_result

    guint64
    gst_gl_query_result (GstGLQuery * query)

Parameters:

`query` –

a GstGLQuery

Returns –

the result of the query

Since : 1.10

#### GstGL.GLQuery.prototype.result

    function GstGL.GLQuery.prototype.result(): {
        // javascript wrapper for 'gst_gl_query_result'
    }

Parameters:

`query` (GstGL.GLQuery) –

a GstGL.GLQuery

Returns (Number) –

the result of the query

Since : 1.10

#### GstGL.GLQuery.result

    def GstGL.GLQuery.result (self):
        #python wrapper for 'gst_gl_query_result'

Parameters:

`query` (GstGL.GLQuery) –

a GstGL.GLQuery

Returns (int) –

the result of the query

Since : 1.10

#### gst_gl_query_start

    gst_gl_query_start (GstGLQuery * query)

Start counting the query

Parameters:

`query` –

a GstGLQuery

Since : 1.10

#### GstGL.GLQuery.prototype.start

    function GstGL.GLQuery.prototype.start(): {
        // javascript wrapper for 'gst_gl_query_start'
    }

Start counting the query

Parameters:

`query` (GstGL.GLQuery) –

a GstGL.GLQuery

Since : 1.10

#### GstGL.GLQuery.start

    def GstGL.GLQuery.start (self):
        #python wrapper for 'gst_gl_query_start'

Start counting the query

Parameters:

`query` (GstGL.GLQuery) –

a GstGL.GLQuery

Since : 1.10

#### gst_gl_query_unset

    gst_gl_query_unset (GstGLQuery * query)

Free any dynamically allocated resources

Parameters:

`query` –

a GstGLQuery

Since : 1.10

#### GstGL.GLQuery.prototype.unset

    function GstGL.GLQuery.prototype.unset(): {
        // javascript wrapper for 'gst_gl_query_unset'
    }

Free any dynamically allocated resources

Parameters:

`query` (GstGL.GLQuery) –

a GstGL.GLQuery

Since : 1.10

#### GstGL.GLQuery.unset

    def GstGL.GLQuery.unset (self):
        #python wrapper for 'gst_gl_query_unset'

Free any dynamically allocated resources

Parameters:

`query` (GstGL.GLQuery) –

a GstGL.GLQuery

Since : 1.10

### Functions

#### gst_gl_query_local_gl_context

    gboolean
    gst_gl_query_local_gl_context (GstElement * element,
                                   GstPadDirection direction,
                                   GstGLContext ** context_ptr)

Performs a GST_QUERY_CONTEXT query of type "gst.gl.local_context" on all GstPad in element of direction for the local OpenGL context used by GStreamer elements.

Parameters:

`element` –

a GstElement to query from

`direction` –

the GstPadDirection to query

`context_ptr` ( [inout]) –

location containing the current and/or resulting GstGLContext

Returns –

whether context_ptr contains a GstGLContext

#### GstGL.prototype.gl_query_local_gl_context

    function GstGL.prototype.gl_query_local_gl_context(element: Gst.Element, direction: Gst.PadDirection, context_ptr: GstGL.GLContext): {
        // javascript wrapper for 'gst_gl_query_local_gl_context'
    }

Performs a GST_QUERY_CONTEXT query of type "gst.gl.local_context" on all Gst.Pad in element of direction for the local OpenGL context used by GStreamer elements.

Parameters:

`element` (Gst.Element) –

a Gst.Element to query from

`direction` (Gst.PadDirection) –

the Gst.PadDirection to query

`context_ptr` (GstGL.GLContext) –

location containing the current and/or resulting GstGL.GLContext

Returns a tuple made of:

(Number ) –

whether context_ptr contains a GstGL.GLContext

`context_ptr` (GstGL.GLContext ) –

whether context_ptr contains a GstGL.GLContext

#### GstGL.gl_query_local_gl_context

    def GstGL.gl_query_local_gl_context (element, direction, context_ptr):
        #python wrapper for 'gst_gl_query_local_gl_context'

Performs a GST_QUERY_CONTEXT query of type "gst.gl.local_context" on all Gst.Pad in element of direction for the local OpenGL context used by GStreamer elements.

Parameters:

`element` (Gst.Element) –

a Gst.Element to query from

`direction` (Gst.PadDirection) –

the Gst.PadDirection to query

`context_ptr` (GstGL.GLContext) –

location containing the current and/or resulting GstGL.GLContext

Returns a tuple made of:

(bool ) –

whether context_ptr contains a GstGL.GLContext

`context_ptr` (GstGL.GLContext ) –

whether context_ptr contains a GstGL.GLContext

#### gst_gl_query_new

    GstGLQuery *
    gst_gl_query_new (GstGLContext * context,
                      GstGLQueryType query_type)

Free with gst_gl_query_free

Parameters:

`context` –

a GstGLContext

`query_type` –

the GstGLQueryType to create

Returns –

a new GstGLQuery

Since : 1.10

## Function Macros

### gst_gl_query_counter_log

    #define gst_gl_query_counter_log(query,cat,level,object,format,...) \
      G_STMT_START {    \
        GST_GL_ASYNC_CAT_LEVEL_LOG (&(query)->debug, cat, level, object, format, __VA_ARGS__); \
        gst_gl_async_debug_freeze (&(query)->debug); \
        gst_gl_query_counter (query); \
        gst_gl_async_debug_thaw (&(query)->debug); \
      } G_STMT_END

### gst_gl_query_counter_log_valist

    #define gst_gl_query_counter_log_valist(query,cat,level,object,format,varargs) \
      G_STMT_START {    \
        GST_GL_ASYNC_CAT_LEVEL_LOG_valist (&(query)->debug, cat, level, object, format, varargs); \
        gst_gl_async_debug_freeze (&(query)->debug); \
        gst_gl_query_counter (query); \
        gst_gl_async_debug_thaw (&(query)->debug); \
      } G_STMT_END

### gst_gl_query_start_log

    #define gst_gl_query_start_log(query,cat,level,object,format,...) \
      G_STMT_START {    \
        GST_GL_ASYNC_CAT_LEVEL_LOG (&(query)->debug, cat, level, object, format, __VA_ARGS__); \
        gst_gl_async_debug_freeze (&(query)->debug); \
        gst_gl_query_start (query); \
        gst_gl_async_debug_thaw (&(query)->debug); \
      } G_STMT_END

### gst_gl_query_start_log_valist

    #define gst_gl_query_start_log_valist(query,cat,level,object,format,varargs) \
      G_STMT_START {    \
        GST_GL_ASYNC_CAT_LEVEL_LOG_valist (&(query)->debug, cat, level, object, format, varargs); \
        gst_gl_async_debug_freeze (&(query)->debug); \
        gst_gl_query_start (query); \
        gst_gl_async_debug_thaw (&(query)->debug); \
      } G_STMT_END

## Enumerations

### GstGLQueryType

##### Members

`GST_GL_QUERY_NONE` (0) –

no query

`GST_GL_QUERY_TIME_ELAPSED` (1) –

query the time elapsed

`GST_GL_QUERY_TIMESTAMP` (2) –

query the current time

### GstGL.GLQueryType

##### Members

`GstGL.GLQueryType.NONE` (0) –

no query

`GstGL.GLQueryType.TIME_ELAPSED` (1) –

query the time elapsed

`GstGL.GLQueryType.TIMESTAMP` (2) –

query the current time

### GstGL.GLQueryType

##### Members

`GstGL.GLQueryType.NONE` (0) –

no query

`GstGL.GLQueryType.TIME_ELAPSED` (1) –

query the time elapsed

`GstGL.GLQueryType.TIMESTAMP` (2) –

query the current time

The results of the search are