glimagesinkelement: GStreamer Base Plugins 1.0 Plugins Reference Manual

## glimagesinkelement glimagesinkelement |

## Properties

GstGLContext * | context | Read
gboolean | force-aspect-ratio | Read / Write
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
GstFraction | pixel-aspect-ratio | Read / Write
GstGLRotateMethod | rotate-method | Read / Write
GstValueArray | render-rectangle | 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 `“context”` property

      “context”                  GstGLContext *

Get OpenGL context.

Owner: GstGLImageSink

Flags: Read

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

      “force-aspect-ratio”       gboolean

When enabled, scaling will respect original aspect ratio.

Owner: GstGLImageSink

Flags: Read / Write

Default value: TRUE

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

      “handle-events”            gboolean

When enabled, XEvents will be selected and handled.

Owner: GstGLImageSink

Flags: Read / Write

Default value: TRUE

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

      “ignore-alpha”             gboolean

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

Owner: GstGLImageSink

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.

Owner: GstGLImageSink

Flags: Read / Write

Default value: GST_GL_STEREO_DOWNMIX_ANAGLYPH_GREEN_MAGENTA_DUBOIS

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

      “output-multiview-flags”   GstVideoMultiviewFlags

Output multiview layout modifier flags.

Owner: GstGLImageSink

Flags: Read / Write

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

      “output-multiview-mode”    GstVideoMultiviewMode

Choose output mode for multiview/3D video.

Owner: GstGLImageSink

Flags: Read / Write

Default value: GST_VIDEO_MULTIVIEW_MODE_MONO

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

      “pixel-aspect-ratio”       GstFraction

The pixel aspect ratio of the device.

Owner: GstGLImageSink

Flags: Read / Write

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

      “rotate-method”            GstGLRotateMethod

rotate method.

Owner: GstGLImageSink

Flags: Read / Write

Default value: Identity (no rotation)

### The `“render-rectangle”` property

      “render-rectangle”         GstValueArray

The render rectangle ('<x, y, width, height>').

Owner: GstGLImageSink

Flags: Write

## 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