playsink: GStreamer Base Plugins 1.0 Plugins Reference Manual

## playsink playsink |

## Properties

GstElement * | audio-sink | Read / Write
gint64 | av-offset | Read / Write
GstPlayFlags | flags | Read / Write
gboolean | force-aspect-ratio | Read / Write
gboolean | mute | Read / Write
GstSample * | sample | Read
GstPlaySinkSendEventMode | send-event-mode | Read / Write
gchar * | subtitle-encoding | Read / Write
gchar * | subtitle-font-desc | Write
GstElement * | text-sink | Read / Write
GstElement * | video-sink | Read / Write
GstElement * | vis-plugin | Read / Write
gdouble | volume | Read / Write
GstElement * | audio-filter | Read / Write
GstElement * | video-filter | Read / Write

## Signals

GstSample* | convert-sample | Action
gboolean | reconfigure | Action

## Types and Values

| GstPlaySink

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstElement
                    ╰── GstBin
                        ╰── GstPlaySink

## Implemented Interfaces

GstPlaySink implements GstChildProxy, GstStreamVolume, GstVideoOverlay, GstNavigation and GstColorBalance.

## Description

## Synopsis

### Element Information

plugin | playback
author | Wim Taymans <wim.taymans@gmail.com>
class | Generic/Bin/Sink

### Element Pads

name | audio_raw_sink
direction | sink
presence | request
details | ANY

name | audio_sink
direction | sink
presence | request
details | ANY

name | text_sink
direction | sink
presence | request
details | ANY

name | video_raw_sink
direction | sink
presence | request
details | ANY

name | video_sink
direction | sink
presence | request
details | ANY

## Functions

## Types and Values

### GstPlaySink

    typedef struct _GstPlaySink GstPlaySink;

## Property Details

### The `“audio-sink”` property

      “audio-sink”               GstElement *

Set the used audio sink element. NULL will use the default sink. playsink must be in `GST_STATE_NULL`

Flags: Read / Write

### The `“av-offset”` property

      “av-offset”                gint64

Control the synchronisation offset between the audio and video streams. Positive values make the audio ahead of the video and negative values make the audio go behind the video.

Flags: Read / Write

Default value: 0

### The `“flags”` property

      “flags”                    GstPlayFlags

Control the behaviour of playsink.

Flags: Read / Write

Default value: Render the video stream|Render the audio stream|Render subtitles|Use software volume|Use software color balance

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

      “force-aspect-ratio”       gboolean

When enabled, scaling will respect original aspect ratio.

Flags: Read / Write

Default value: TRUE

### The `“mute”` property

      “mute”                     gboolean

Mute the audio channel without changing the volume.

Flags: Read / Write

Default value: FALSE

### The `“sample”` property

      “sample”                   GstSample *

Get the currently rendered or prerolled sample in the video sink. The GstCaps in the sample will describe the format of the buffer.

Flags: Read

### The `“send-event-mode”` property

      “send-event-mode”          GstPlaySinkSendEventMode

How to send events received in send_event function.

Flags: Read / Write

Default value: Default GstBin's send_event handling (default)

### The `“subtitle-encoding”` property

      “subtitle-encoding”        gchar *

Encoding to assume if input subtitles are not in UTF-8 encoding. If not set, the GST_SUBTITLE_ENCODING environment variable will be checked for an encoding to use. If that is not set either, ISO-8859-15 will be assumed.

Flags: Read / Write

Default value: NULL

### The `“subtitle-font-desc”` property

      “subtitle-font-desc”       gchar *

Pango font description of font to be used for subtitle rendering.

Flags: Write

Default value: NULL

### The `“text-sink”` property

      “text-sink”                GstElement *

Set the used text sink element. NULL will use the default sink. playsink must be in `GST_STATE_NULL`

Flags: Read / Write

### The `“video-sink”` property

      “video-sink”               GstElement *

Set the used video sink element. NULL will use the default sink. playsink must be in `GST_STATE_NULL`

Flags: Read / Write

### The `“vis-plugin”` property

      “vis-plugin”               GstElement *

the visualization element to use (NULL = default).

Flags: Read / Write

### The `“volume”` property

      “volume”                   gdouble

Get or set the current audio stream volume. 1.0 means 100%, 0.0 means mute. This uses a linear volume scale.

Flags: Read / Write

Allowed values: [0,10]

Default value: 1

### The `“audio-filter”` property

      “audio-filter”             GstElement *

Set the audio filter element/bin to use. Will apply on a best-effort basis unless GST_PLAY_FLAG_FORCE_FILTERS is set. playsink must be in `GST_STATE_NULL`

Flags: Read / Write

### The `“video-filter”` property

      “video-filter”             GstElement *

Set the video filter element/bin to use. Will apply on a best-effort basis unless GST_PLAY_FLAG_FORCE_FILTERS is set. playsink must be in `GST_STATE_NULL`

Flags: Read / Write

## Signal Details

### The `“convert-sample”` signal

    GstSample*
    user_function (GstPlaySink *playsink,
                   GstCaps     *caps,
                   gpointer     user_data)

Action signal to retrieve the currently playing video sample in the format specified by `caps` . If `caps` is `NULL`, no conversion will be performed and this function is equivalent to the “sample” property.

#### Parameters

playsink | a GstPlaySink |
caps | the target format of the sample |
user_data | user data set when the signal handler was connected. |

#### Returns

a GstSample of the current video sample converted to caps. The caps in the sample will describe the final layout of the buffer data. `NULL` is returned when no current sample can be retrieved or when the conversion failed.

Flags: Action

### The `“reconfigure”` signal

    gboolean
    user_function (GstPlaySink *gstplaysink,
                   gpointer     user_data)

Flags: Action