gaupol.VideoPlayer

Source: gaupol/player.py

Anchestors: aeidon.observable.Observable, builtins.object

class gaupol.VideoPlayer

GStreamer video player.

VideoPlayer.audio_track

Current audio track as integer

VideoPlayer.calc

The instance of aeidon.Calculator used

VideoPlayer.subtitle_text

Current text shown in the subtitle overlay

VideoPlayer.subtitle_text_raw

subtitle_text before removal of tags

VideoPlayer.volume

Current audio stream volume

VideoPlayer.widget

Gtk.DrawingArea used to render video

Signals and their arguments for callback functions:
  • state-changed: player new state

Methods

VideoPlayer.__init__()

Initialize a VideoPlayer instance.

VideoPlayer.get_audio_languages()

Return a sequence of audio languages or None.

VideoPlayer.get_duration(mode=None)

Return duration of video stream or None.

mode can be None to return duration in internal GStreamer units, which can be faster if data is fed back to GStreamer.

VideoPlayer.get_position(mode=None)

Return current position in video stream or None.

mode can be None to return position in internal GStreamer units, which can be faster if data is fed back to GStreamer.

VideoPlayer.is_playing()

Return True if playing video.

VideoPlayer.pause()

Pause.

VideoPlayer.play()

Play.

VideoPlayer.play_segment(start, end)

Play from start to end.

start and end can be either time, frame or seconds.

VideoPlayer.seek(pos)

Seek to pos.

pos can be either time, frame or seconds.

VideoPlayer.seek_relative(offset)

Seek to offset relative to current position.

offset can be either time, frame or seconds.

VideoPlayer.set_path(path)

Set the path of the file to play.

You should have a window visible before calling set_path.

VideoPlayer.set_uri(uri)

Set the URI of the file to play.

You should have a window visible before calling set_uri.

VideoPlayer.stop()

Stop.