## ClutterGstVideoTexture ClutterGstVideoTexture — Actor for playback of video files. |

## Functions

ClutterActor * | clutter_gst_video_texture_new ()
GstElement * | clutter_gst_video_texture_get_pipeline ()
CoglHandle | clutter_gst_video_texture_get_idle_material ()
void | clutter_gst_video_texture_set_idle_material ()
gchar * | clutter_gst_video_texture_get_user_agent ()
void | clutter_gst_video_texture_set_user_agent ()
void | clutter_gst_video_texture_set_seek_flags ()
ClutterGstSeekFlags | clutter_gst_video_texture_get_seek_flags ()
ClutterGstBufferingMode | clutter_gst_video_texture_get_buffering_mode ()
void | clutter_gst_video_texture_set_buffering_mode ()
GList * | clutter_gst_video_texture_get_audio_streams ()
gint | clutter_gst_video_texture_get_audio_stream ()
void | clutter_gst_video_texture_set_audio_stream ()
GList * | clutter_gst_video_texture_get_subtitle_tracks ()
gint | clutter_gst_video_texture_get_subtitle_track ()
void | clutter_gst_video_texture_set_subtitle_track ()

## Properties

CoglHandle * | idle-material | Read / Write
GstFraction | pixel-aspect-ratio | Read / Write

## Types and Values

struct | ClutterGstVideoTexture
struct | ClutterGstVideoTextureClass

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── ClutterActor
                ╰── ClutterTexture
                    ╰── ClutterGstVideoTexture

## Implemented Interfaces

ClutterGstVideoTexture implements ClutterContainer, ClutterScriptable, ClutterAnimatable, AtkImplementorIface, ClutterMedia and ClutterGstPlayer.

## Description

ClutterGstVideoTexture is a ClutterTexture that plays video files.

## Functions

### clutter_gst_video_texture_new ()

    ClutterActor *
    clutter_gst_video_texture_new (void);

Creates a video texture.

This function has to be called from Clutter's main thread. While GStreamer will spawn threads to do its work, we want all the GL calls to happen in the same thread. Clutter-gst knows which thread it is by assuming this constructor is called from the Clutter thread.

#### Returns

the newly created video texture actor

### clutter_gst_video_texture_get_pipeline ()

    GstElement *
    clutter_gst_video_texture_get_pipeline
                                   (ClutterGstVideoTexture *texture);

Retrieves the GstPipeline used by the `texture` , for direct use with GStreamer API.

#### Parameters

texture | a ClutterGstVideoTexture |

#### Returns

the pipeline element used by the video texture.

[transfer none]

### clutter_gst_video_texture_get_idle_material ()

    CoglHandle
    clutter_gst_video_texture_get_idle_material
                                   (ClutterGstVideoTexture *texture);

Retrieves the material used to draw when no media is being played.

#### Parameters

texture | a ClutterGstVideoTexture |

#### Returns

the CoglHandle of the idle material.

[transfer none]

Since 1.2

### clutter_gst_video_texture_set_idle_material ()

    void
    clutter_gst_video_texture_set_idle_material
                                   (ClutterGstVideoTexture *texture,
                                    CoglHandle material);

Sets a material to use to draw when no media is being played. The ClutterGstVideoTexture holds a reference of the `material` .

The default idle material will paint the ClutterGstVideoTexture in black. If `COGL_INVALID_HANDLE` is given as `material` to this function, this default idle material will be used.

#### Parameters

texture | a ClutterGstVideoTexture |
material | the handle of a Cogl material |

Since 1.2

### clutter_gst_video_texture_get_user_agent ()

    gchar *
    clutter_gst_video_texture_get_user_agent
                                   (ClutterGstVideoTexture *texture);

Retrieves the user agent used when streaming.

#### Parameters

texture | a ClutterGstVideoTexture |

#### Returns

the user agent used. The returned string has to be freed with `g_free()`

Since 1.2

### clutter_gst_video_texture_set_user_agent ()

    void
    clutter_gst_video_texture_set_user_agent
                                   (ClutterGstVideoTexture *texture,
                                    const gchar *user_agent);

Sets the user agent to use when streaming.

When streaming content, you might want to set a custom user agent, eg. to promote your software, make it appear in statistics or because the server requires a special user agent you want to impersonate.

#### Parameters

texture | a ClutterGstVideoTexture |
user_agent | the user agent |

Since 1.2

### clutter_gst_video_texture_set_seek_flags ()

    void
    clutter_gst_video_texture_set_seek_flags
                                   (ClutterGstVideoTexture *texture,
                                    ClutterGstSeekFlags flags);

Seeking can be done with several trade-offs. Clutter-gst defaults to `CLUTTER_GST_SEEK_FLAG_NONE`.

#### Parameters

texture | a ClutterGstVideoTexture |
flags | a combination of ClutterGstSeekFlags |

Since 1.4

### clutter_gst_video_texture_get_seek_flags ()

    ClutterGstSeekFlags
    clutter_gst_video_texture_get_seek_flags
                                   (ClutterGstVideoTexture *texture);

Get the current value of the seek-flags property.

#### Parameters

texture | a ClutterGstVideoTexture |

#### Returns

a combination of ClutterGstSeekFlags

Since 1.4

### clutter_gst_video_texture_get_buffering_mode ()

    ClutterGstBufferingMode
    clutter_gst_video_texture_get_buffering_mode
                                   (ClutterGstVideoTexture *texture);

#### Parameters

texture | a ClutterGstVideoTexture |

#### Returns

a ClutterGstBufferingMode

Since 1.4

### clutter_gst_video_texture_set_buffering_mode ()

    void
    clutter_gst_video_texture_set_buffering_mode
                                   (ClutterGstVideoTexture *texture,
                                    ClutterGstBufferingMode mode);

#### Parameters

texture | a ClutterGstVideoTexture |
mode | a ClutterGstBufferingMode |

Since 1.4

### clutter_gst_video_texture_get_audio_streams ()

    GList *
    clutter_gst_video_texture_get_audio_streams
                                   (ClutterGstVideoTexture *texture);

Get the list of audio streams of the current media.

#### Parameters

texture | a ClutterGstVideoTexture |

#### Returns

a list of GstTagList describing the available audio streams.

[transfer none][element-type Gst.TagList]

Since 1.4

### clutter_gst_video_texture_get_audio_stream ()

    gint
    clutter_gst_video_texture_get_audio_stream
                                   (ClutterGstVideoTexture *texture);

Get the current audio stream. The number returned in the index of the audio stream playing in the list returned by `clutter_gst_video_texture_get_audio_streams()`.

#### Parameters

texture | a ClutterGstVideoTexture |

#### Returns

the index of the current audio stream, -1 if the media has no audio stream

Since 1.4

### clutter_gst_video_texture_set_audio_stream ()

    void
    clutter_gst_video_texture_set_audio_stream
                                   (ClutterGstVideoTexture *texture,
                                    gint index_);

Set the audio stream to play. `index_` is the index of the stream in the list returned by `clutter_gst_video_texture_get_audio_streams()`.

#### Parameters

texture | a ClutterGstVideoTexture |
index_ | the index of the audio stream |

Since 1.4

### clutter_gst_video_texture_get_subtitle_tracks ()

    GList *
    clutter_gst_video_texture_get_subtitle_tracks
                                   (ClutterGstVideoTexture *texture);

Get the list of subtitles tracks of the current media.

#### Parameters

texture | a ClutterGstVideoTexture |

#### Returns

a list of GstTagList describing the available subtitles tracks.

[transfer none][element-type Gst.TagList]

Since 1.4

### clutter_gst_video_texture_get_subtitle_track ()

    gint
    clutter_gst_video_texture_get_subtitle_track
                                   (ClutterGstVideoTexture *texture);

Get the current subtitles track. The number returned is the index of the subitles track in the list returned by `clutter_gst_video_texture_get_subtitle_tracks()`.

#### Parameters

texture | a ClutterGstVideoTexture |

#### Returns

the index of the current subtitlest track, -1 if the media has no subtitles track or if the subtitles have been turned off

Since 1.4

### clutter_gst_video_texture_set_subtitle_track ()

    void
    clutter_gst_video_texture_set_subtitle_track
                                   (ClutterGstVideoTexture *texture,
                                    gint index_);

Set the subtitles track to play. `index_` is the index of the stream in the list returned by `clutter_gst_video_texture_get_subtitle_tracks()`.

If `index_` is -1, the subtitles are turned off.

#### Parameters

texture | a ClutterGstVideoTexture |
index_ | the index of the subtitles track |

Since 1.4

## Types and Values

### struct ClutterGstVideoTexture

    struct ClutterGstVideoTexture;

Subclass of ClutterTexture that displays videos using GStreamer.

The ClutterGstVideoTexture structure contains only private data and should not be accessed directly.

### struct ClutterGstVideoTextureClass

    struct ClutterGstVideoTextureClass {
    };

Base class for ClutterGstVideoTexture.

## Property Details

### The `“idle-material”` property

      “idle-material”            CoglHandle *

Material to use for drawing when not playing.

Flags: Read / Write

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

      “pixel-aspect-ratio”       GstFraction

Pixel aspect ratio of incoming frames.

Flags: Read / Write