gstplayer: GStreamer Bad Plugins 1.0 Library Reference Manual

## gstplayer gstplayer |

## Functions

GstPlayer * | gst_player_new ()
void | gst_player_play ()
void | gst_player_pause ()
void | gst_player_stop ()
void | gst_player_seek ()
void | gst_player_set_uri ()
gchar * | gst_player_get_uri ()
GstClockTime | gst_player_get_duration ()
GstClockTime | gst_player_get_position ()
void | gst_player_set_volume ()
void | gst_player_set_mute ()
gdouble | gst_player_get_volume ()
gboolean | gst_player_get_mute ()
GstElement * | gst_player_get_pipeline ()
void | gst_player_set_position_update_interval ()
guint | gst_player_get_position_update_interval ()
const gchar * | gst_player_state_get_name ()
const gchar * | gst_player_error_get_name ()
GstPlayerMediaInfo * | gst_player_get_media_info ()
GList * | gst_player_get_audio_streams ()
GList * | gst_player_get_video_streams ()
GList * | gst_player_get_subtitle_streams ()
gboolean | gst_player_set_audio_track ()
gboolean | gst_player_set_video_track ()
gboolean | gst_player_set_subtitle_track ()
GstPlayerAudioInfo * | gst_player_get_current_audio_track ()
GstPlayerVideoInfo * | gst_player_get_current_video_track ()
GstPlayerSubtitleInfo * | gst_player_get_current_subtitle_track ()
void | gst_player_set_audio_track_enabled ()
void | gst_player_set_video_track_enabled ()
void | gst_player_set_subtitle_track_enabled ()
gboolean | gst_player_set_subtitle_uri ()
gchar * | gst_player_get_subtitle_uri ()
gboolean | gst_player_set_visualization ()
void | gst_player_set_visualization_enabled ()
gchar * | gst_player_get_current_visualization ()
const gchar * | gst_player_color_balance_type_get_name ()
gboolean | gst_player_has_color_balance ()
void | gst_player_set_color_balance ()
gdouble | gst_player_get_color_balance ()
GstVideoMultiviewMode | gst_player_get_multiview_mode ()
void | gst_player_set_multiview_mode ()
GstVideoMultiviewFlags | gst_player_get_multiview_flags ()
void | gst_player_set_multiview_flags ()
gint64 | gst_player_get_audio_video_offset ()
void | gst_player_set_audio_video_offset ()
gdouble | gst_player_get_rate ()
void | gst_player_set_rate ()

## Properties

gint64 | audio-video-offset | Read / Write
GstPlayerAudioInfo * | current-audio-track | Read
GstPlayerSubtitleInfo * | current-subtitle-track | Read
GstPlayerVideoInfo * | current-video-track | Read
guint64 | duration | Read
GstPlayerMediaInfo * | media-info | Read
gboolean | mute | Read / Write
GstElement * | pipeline | Read
guint64 | position | Read
guint | position-update-interval | Read / Write
gdouble | rate | Read / Write
GstPlayerSignalDispatcher * | signal-dispatcher | Write / Construct Only
gchar * | suburi | Read / Write
gchar * | uri | Read / Write
GstVideoMultiviewFlags | video-multiview-flags | Read / Write
GstVideoMultiviewFramePacking | video-multiview-mode | Read / Write
GstPlayerVideoRenderer * | video-renderer | Write / Construct Only
gdouble | volume | Read / Write

## Signals

void | buffering | No Hooks
void | duration-changed | No Hooks
void | end-of-stream | No Hooks
void | error | No Hooks
void | media-info-updated | No Hooks
void | mute-changed | No Hooks
void | position-updated | No Hooks
void | seek-done | No Hooks
void | state-changed | No Hooks
void | uri-loaded | No Hooks
void | video-dimensions-changed | No Hooks
void | volume-changed | No Hooks
void | warning | No Hooks

## Types and Values

| GstPlayer
enum | GstPlayerState
#define | GST_PLAYER_ERROR
enum | GstPlayerError
enum | GstPlayerColorBalanceType
| GstPlayerSignalDispatcher
struct | GstPlayerSignalDispatcherInterface
| GstPlayerVideoRenderer
struct | GstPlayerVideoRendererInterface

## Object Hierarchy

        GEnum
        ├── GstPlayerColorBalanceType
        ├── GstPlayerError
        ╰── GstPlayerState
        GInterface
        ├── GstPlayerSignalDispatcher
        ╰── GstPlayerVideoRenderer
        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstPlayer

## Prerequisites

GstPlayerSignalDispatcher requires GObject.

GstPlayerVideoRenderer requires GObject.

## Known Implementations

GstPlayerVideoRenderer is implemented by GstPlayerVideoOverlayVideoRenderer.

## Description

## Functions

### gst_player_new ()

    GstPlayer *
    gst_player_new (GstPlayerVideoRenderer *video_renderer,
                    GstPlayerSignalDispatcher *signal_dispatcher);

### gst_player_play ()

    void
    gst_player_play (GstPlayer *player);

### gst_player_pause ()

    void
    gst_player_pause (GstPlayer *player);

### gst_player_stop ()

    void
    gst_player_stop (GstPlayer *player);

### gst_player_seek ()

    void
    gst_player_seek (GstPlayer *player,
                     GstClockTime position);

### gst_player_set_uri ()

    void
    gst_player_set_uri (GstPlayer *player,
                        const gchar *uri);

### gst_player_get_uri ()

    gchar *
    gst_player_get_uri (GstPlayer *player);

### gst_player_get_duration ()

    GstClockTime
    gst_player_get_duration (GstPlayer *player);

### gst_player_get_position ()

    GstClockTime
    gst_player_get_position (GstPlayer *player);

### gst_player_set_volume ()

    void
    gst_player_set_volume (GstPlayer *player,
                           gdouble val);

### gst_player_set_mute ()

    void
    gst_player_set_mute (GstPlayer *player,
                         gboolean val);

### gst_player_get_volume ()

    gdouble
    gst_player_get_volume (GstPlayer *player);

### gst_player_get_mute ()

    gboolean
    gst_player_get_mute (GstPlayer *player);

### gst_player_get_pipeline ()

    GstElement *
    gst_player_get_pipeline (GstPlayer *player);

### gst_player_set_position_update_interval ()

    void
    gst_player_set_position_update_interval
                                   (GstPlayer *player,
                                    guint interval);

### gst_player_get_position_update_interval ()

    guint
    gst_player_get_position_update_interval
                                   (GstPlayer *player);

### gst_player_state_get_name ()

    const gchar *
    gst_player_state_get_name (GstPlayerState state);

### gst_player_error_get_name ()

    const gchar *
    gst_player_error_get_name (GstPlayerError error);

### gst_player_get_media_info ()

    GstPlayerMediaInfo *
    gst_player_get_media_info (GstPlayer *player);

### gst_player_get_audio_streams ()

    GList *
    gst_player_get_audio_streams (const GstPlayerMediaInfo *info);

### gst_player_get_video_streams ()

    GList *
    gst_player_get_video_streams (const GstPlayerMediaInfo *info);

### gst_player_get_subtitle_streams ()

    GList *
    gst_player_get_subtitle_streams (const GstPlayerMediaInfo *info);

### gst_player_set_audio_track ()

    gboolean
    gst_player_set_audio_track (GstPlayer *player,
                                gint stream_index);

### gst_player_set_video_track ()

    gboolean
    gst_player_set_video_track (GstPlayer *player,
                                gint stream_index);

### gst_player_set_subtitle_track ()

    gboolean
    gst_player_set_subtitle_track (GstPlayer *player,
                                   gint stream_index);

### gst_player_get_current_audio_track ()

    GstPlayerAudioInfo *
    gst_player_get_current_audio_track (GstPlayer *player);

### gst_player_get_current_video_track ()

    GstPlayerVideoInfo *
    gst_player_get_current_video_track (GstPlayer *player);

### gst_player_get_current_subtitle_track ()

    GstPlayerSubtitleInfo *
    gst_player_get_current_subtitle_track (GstPlayer *player);

### gst_player_set_audio_track_enabled ()

    void
    gst_player_set_audio_track_enabled (GstPlayer *player,
                                        gboolean enabled);

### gst_player_set_video_track_enabled ()

    void
    gst_player_set_video_track_enabled (GstPlayer *player,
                                        gboolean enabled);

### gst_player_set_subtitle_track_enabled ()

    void
    gst_player_set_subtitle_track_enabled (GstPlayer *player,
                                           gboolean enabled);

### gst_player_set_subtitle_uri ()

    gboolean
    gst_player_set_subtitle_uri (GstPlayer *player,
                                 const gchar *uri);

### gst_player_get_subtitle_uri ()

    gchar *
    gst_player_get_subtitle_uri (GstPlayer *player);

### gst_player_set_visualization ()

    gboolean
    gst_player_set_visualization (GstPlayer *player,
                                  const gchar *name);

### gst_player_set_visualization_enabled ()

    void
    gst_player_set_visualization_enabled (GstPlayer *player,
                                          gboolean enabled);

### gst_player_get_current_visualization ()

    gchar *
    gst_player_get_current_visualization (GstPlayer *player);

### gst_player_color_balance_type_get_name ()

    const gchar *
    gst_player_color_balance_type_get_name
                                   (GstPlayerColorBalanceType type);

### gst_player_has_color_balance ()

    gboolean
    gst_player_has_color_balance (GstPlayer *player);

### gst_player_set_color_balance ()

    void
    gst_player_set_color_balance (GstPlayer *player,
                                  GstPlayerColorBalanceType type,
                                  gdouble value);

### gst_player_get_color_balance ()

    gdouble
    gst_player_get_color_balance (GstPlayer *player,
                                  GstPlayerColorBalanceType type);

### gst_player_get_multiview_mode ()

    GstVideoMultiviewMode
    gst_player_get_multiview_mode (GstPlayer *player);

### gst_player_set_multiview_mode ()

    void
    gst_player_set_multiview_mode (GstPlayer *player,
                                   GstVideoMultiviewMode mode);

### gst_player_get_multiview_flags ()

    GstVideoMultiviewFlags
    gst_player_get_multiview_flags (GstPlayer *player);

### gst_player_set_multiview_flags ()

    void
    gst_player_set_multiview_flags (GstPlayer *player,
                                    GstVideoMultiviewFlags flags);

### gst_player_get_audio_video_offset ()

    gint64
    gst_player_get_audio_video_offset (GstPlayer *player);

### gst_player_set_audio_video_offset ()

    void
    gst_player_set_audio_video_offset (GstPlayer *player,
                                       gint64 offset);

### gst_player_get_rate ()

    gdouble
    gst_player_get_rate (GstPlayer *player);

### gst_player_set_rate ()

    void
    gst_player_set_rate (GstPlayer *player,
                         gdouble rate);

## Types and Values

### GstPlayer

    typedef struct _GstPlayer GstPlayer;

### enum GstPlayerState

#### Members

GST_PLAYER_STATE_STOPPED |  |
GST_PLAYER_STATE_BUFFERING |  |
GST_PLAYER_STATE_PAUSED |  |
GST_PLAYER_STATE_PLAYING |  |

### GST_PLAYER_ERROR

    #define      GST_PLAYER_ERROR                         (gst_player_error_quark ())

### enum GstPlayerError

#### Members

GST_PLAYER_ERROR_FAILED |  |

### enum GstPlayerColorBalanceType

#### Members

GST_PLAYER_COLOR_BALANCE_BRIGHTNESS |  |
GST_PLAYER_COLOR_BALANCE_CONTRAST |  |
GST_PLAYER_COLOR_BALANCE_SATURATION |  |
GST_PLAYER_COLOR_BALANCE_HUE |  |

### GstPlayerSignalDispatcher

    typedef struct _GstPlayerSignalDispatcher GstPlayerSignalDispatcher;

### struct GstPlayerSignalDispatcherInterface

    struct GstPlayerSignalDispatcherInterface {
      GTypeInterface parent_iface;

      void (*dispatch) (GstPlayerSignalDispatcher * self,
                        GstPlayer * player,
                        GstPlayerSignalDispatcherFunc emitter,
                        gpointer data,
                        GDestroyNotify destroy);
    };

### GstPlayerVideoRenderer

    typedef struct _GstPlayerVideoRenderer GstPlayerVideoRenderer;

### struct GstPlayerVideoRendererInterface

    struct GstPlayerVideoRendererInterface {
      GTypeInterface parent_iface;

      GstElement * (*create_video_sink) (GstPlayerVideoRenderer * self, GstPlayer * player);
    };

## Property Details

### The `“audio-video-offset”` property

      “audio-video-offset”       gint64

The synchronisation offset between audio and video in nanoseconds.

Flags: Read / Write

Default value: 0

### The `“current-audio-track”` property

      “current-audio-track”      GstPlayerAudioInfo *

Current audio track information.

Flags: Read

### The `“current-subtitle-track”` property

      “current-subtitle-track”   GstPlayerSubtitleInfo *

Current audio subtitle information.

Flags: Read

### The `“current-video-track”` property

      “current-video-track”      GstPlayerVideoInfo *

Current video track information.

Flags: Read

### The `“duration”` property

      “duration”                 guint64

Duration.

Flags: Read

Default value: 18446744073709551615

### The `“media-info”` property

      “media-info”               GstPlayerMediaInfo *

Current media information.

Flags: Read

### The `“mute”` property

      “mute”                     gboolean

Mute.

Flags: Read / Write

Default value: FALSE

### The `“pipeline”` property

      “pipeline”                 GstElement *

GStreamer pipeline that is used.

Flags: Read

### The `“position”` property

      “position”                 guint64

Current Position.

Flags: Read

Default value: 18446744073709551615

### The `“position-update-interval”` property

      “position-update-interval” guint

Interval in milliseconds between two position-updated signals.Pass 0 to stop updating the position.

Flags: Read / Write

Allowed values: <= 10000

Default value: 100

### The `“rate”` property

      “rate”                     gdouble

Playback rate.

Flags: Read / Write

Allowed values: [-64,64]

Default value: 1

### The `“signal-dispatcher”` property

      “signal-dispatcher”        GstPlayerSignalDispatcher *

Dispatcher for the signals to e.g. event loops.

Flags: Write / Construct Only

### The `“suburi”` property

      “suburi”                   gchar *

Current Subtitle URI.

Flags: Read / Write

Default value: NULL

### The `“uri”` property

      “uri”                      gchar *

Current URI.

Flags: Read / Write

Default value: NULL

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

      “video-multiview-flags”    GstVideoMultiviewFlags

Override details of the multiview frame layout.

Flags: Read / Write

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

      “video-multiview-mode”     GstVideoMultiviewFramePacking

Re-interpret a video stream as one of several frame-packed stereoscopic modes.

Flags: Read / Write

Default value: GST_VIDEO_MULTIVIEW_FRAME_PACKING_NONE

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

      “video-renderer”           GstPlayerVideoRenderer *

Video renderer to use for rendering videos.

Flags: Write / Construct Only

### The `“volume”` property

      “volume”                   gdouble

Volume.

Flags: Read / Write

Allowed values: [0,10]

Default value: 1

## Signal Details

### The `“buffering”` signal

    void
    user_function (GstPlayer *gstplayer,
                   gint       arg1,
                   gpointer   user_data)

Flags: No Hooks

### The `“duration-changed”` signal

    void
    user_function (GstPlayer *gstplayer,
                   guint64    arg1,
                   gpointer   user_data)

Flags: No Hooks

### The `“end-of-stream”` signal

    void
    user_function (GstPlayer *gstplayer,
                   gpointer   user_data)

Flags: No Hooks

### The `“error”` signal

    void
    user_function (GstPlayer *gstplayer,
                   GError    *arg1,
                   gpointer   user_data)

Flags: No Hooks

### The `“media-info-updated”` signal

    void
    user_function (GstPlayer          *gstplayer,
                   GstPlayerMediaInfo *arg1,
                   gpointer            user_data)

Flags: No Hooks

### The `“mute-changed”` signal

    void
    user_function (GstPlayer *gstplayer,
                   gpointer   user_data)

Flags: No Hooks

### The `“position-updated”` signal

    void
    user_function (GstPlayer *gstplayer,
                   guint64    arg1,
                   gpointer   user_data)

Flags: No Hooks

### The `“seek-done”` signal

    void
    user_function (GstPlayer *gstplayer,
                   guint64    arg1,
                   gpointer   user_data)

Flags: No Hooks

### The `“state-changed”` signal

    void
    user_function (GstPlayer     *gstplayer,
                   GstPlayerState arg1,
                   gpointer       user_data)

Flags: No Hooks

### The `“uri-loaded”` signal

    void
    user_function (GstPlayer *gstplayer,
                   gchar     *arg1,
                   gpointer   user_data)

Flags: No Hooks

### The `“video-dimensions-changed”` signal

    void
    user_function (GstPlayer *gstplayer,
                   gint       arg1,
                   gint       arg2,
                   gpointer   user_data)

Flags: No Hooks

### The `“volume-changed”` signal

    void
    user_function (GstPlayer *gstplayer,
                   gpointer   user_data)

Flags: No Hooks

### The `“warning”` signal

    void
    user_function (GstPlayer *gstplayer,
                   GError    *arg1,
                   gpointer   user_data)

Flags: No Hooks