## glimagesinkelement

glimagesinkelement

## Properties

gchar * | display | Read / Write
gpointer | client-data | Write
gpointer | client-draw-callback | Write
gpointer | client-reshape-callback | Write
gboolean | force-aspect-ratio | Read / Write
GstGLContext * | other-context | Read / Write
GstFraction | pixel-aspect-ratio | Read / Write
GstGLContext * | context | Read
gboolean | handle-events | Read / Write
gboolean | ignore-alpha | Read / Write
GstGLStereoDownmix | output-multiview-downmix-mode | Read / Write
GstVideoMultiviewFlags | output-multiview-flags | Read / Write
GstVideoMultiviewMode | output-multiview-mode | Read / Write
GstGLRotateMethod | rotate-method | Read / Write

## Signals

gboolean | client-draw | Run Last
gboolean | client-reshape | Run Last

## Types and Values

struct | GstGLImageSink

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstElement
                    ╰── GstBaseSink
                        ╰── GstVideoSink
                            ╰── GstGLImageSink

## Implemented Interfaces

GstGLImageSink implements GstVideoOverlay and GstNavigation.

## Description

## Synopsis

### Element Information

plugin | opengl
author | Julien Isorce <julien.isorce@gmail.com>
class | Sink/Video

### Element Pads

name | sink
direction | sink
presence | always
details | video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], texture-target=(string){ 2D, external-oes }
| video/x-raw(memory:GLMemory, meta:GstVideoOverlayComposition), format=(string)RGBA, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], texture-target=(string){ 2D, external-oes }

## Functions

## Types and Values

### struct GstGLImageSink

    struct GstGLImageSink;

## Property Details

### The `“display”` property

      “display”                  gchar *

Display name.

Flags: Read / Write

Default value: NULL

### The `“client-data”` property

      “client-data”              gpointer

Pass data to the draw and reshape callbacks.

Flags: Write

### The `“client-draw-callback”` property

      “client-draw-callback”     gpointer

Define a custom draw callback in a client code.

Flags: Write

### The `“client-reshape-callback”` property

      “client-reshape-callback”  gpointer

Define a custom reshape callback in a client code.

Flags: Write

### The `“force-aspect-ratio”` property

      “force-aspect-ratio”       gboolean

When enabled, scaling will respect original aspect ratio.

Flags: Read / Write

Default value: TRUE

### The `“other-context”` property

      “other-context”            GstGLContext *

Give an external OpenGL context with which to share textures.

Flags: Read / Write

### The `“pixel-aspect-ratio”` property

      “pixel-aspect-ratio”       GstFraction

The pixel aspect ratio of the device.

Flags: Read / Write

### The `“context”` property

      “context”                  GstGLContext *

Get OpenGL context.

Flags: Read

### The `“handle-events”` property

      “handle-events”            gboolean

When enabled, XEvents will be selected and handled.

Flags: Read / Write

Default value: TRUE

### The `“ignore-alpha”` property

      “ignore-alpha”             gboolean

When enabled, alpha will be ignored and converted to black.

Flags: Read / Write

Default value: TRUE

### The `“output-multiview-downmix-mode”` property

      “output-multiview-downmix-mode” GstGLStereoDownmix

Output anaglyph type to generate when downmixing to mono.

Flags: Read / Write

Default value: Dubois optimised Green-Magenta anaglyph

### The `“output-multiview-flags”` property

      “output-multiview-flags”   GstVideoMultiviewFlags

Output multiview layout modifier flags.

Flags: Read / Write

### The `“output-multiview-mode”` property

      “output-multiview-mode”    GstVideoMultiviewMode

Choose output mode for multiview/3D video.

Flags: Read / Write

Default value: GST_VIDEO_MULTIVIEW_MODE_MONO

### The `“rotate-method”` property

      “rotate-method”            GstGLRotateMethod

rotate method.

Flags: Read / Write

Default value: Identity (no rotation)

## Signal Details

### The `“client-draw”` signal

    gboolean
    user_function (GstGLImageSink *object,
                   GstGLContext   *texture,
                   GstSample      *width,
                   gpointer        user_data)

Will be emitted before actually drawing the texture. The client should redraw the surface/contents with the `texture` , `width` and `height` and and return `TRUE`.

#### Parameters

object | the GstGLImageSink |
texture | the guint id of the texture. |
width | the guint width of the texture. |
height | the guint height of the texture. |
user_data | user data set when the signal handler was connected. |

#### Returns

whether the texture was redrawn by the signal. If not, a default redraw will occur.

Flags: Run Last

### The `“client-reshape”` signal

    gboolean
    user_function (GstGLImageSink *object,
                   GstGLContext   *width,
                   guint           height,
                   guint           Returns,
                   gpointer        user_data)

The client should resize the surface/window/viewport with the `width` and `height` and return `TRUE`.

#### Parameters

object | the GstGLImageSink |
width | the guint width of the texture. |
height | the guint height of the texture. |
user_data | user data set when the signal handler was connected. |

#### Returns

whether the content area was resized by the signal. If not, a default viewport resize will occur.

Flags: Run Last