[−][src]Struct gstreamer_player::Player
Implementations
impl Player
[src][−]
pub fn get_audio_video_offset(&self) -> i64
[src][−]
Retrieve the current value of audio-video-offset property
Returns
The current value of audio-video-offset in nanoseconds
pub fn get_color_balance(&self, type_: PlayerColorBalanceType) -> f64
[src][−]
Retrieve the current value of the indicated type_
.
type_
PlayerColorBalanceType
Returns
The current value of type_
, between [0,1]. In case of
error -1 is returned.
pub fn get_current_audio_track(&self) -> Option<PlayerAudioInfo>
[src][−]
A Function to get current audio PlayerAudioInfo
instance.
Returns
current audio track.
The caller should free it with gobject::ObjectExt::unref
pub fn get_current_subtitle_track(&self) -> Option<PlayerSubtitleInfo>
[src][−]
A Function to get current subtitle PlayerSubtitleInfo
instance.
Returns
current subtitle track.
The caller should free it with gobject::ObjectExt::unref
pub fn get_current_video_track(&self) -> Option<PlayerVideoInfo>
[src][−]
A Function to get current video PlayerVideoInfo
instance.
Returns
current video track.
The caller should free it with gobject::ObjectExt::unref
pub fn get_current_visualization(&self) -> Option<GString>
[src][−]
Returns
Name of the currently enabled visualization.
g_free
after usage.
pub fn get_duration(&self) -> ClockTime
[src][−]
Retrieves the duration of the media stream that self represents.
Returns
the duration of the currently-playing media stream, in nanoseconds.
pub fn get_media_info(&self) -> Option<PlayerMediaInfo>
[src][−]
A Function to get the current media info PlayerMediaInfo
instance.
Returns
media info instance.
The caller should free it with gobject::ObjectExt::unref
pub fn get_multiview_flags(&self) -> VideoMultiviewFlags
[src][−]
Retrieve the current value of the indicated type_
.
Returns
The current value of type_
, Default: 0x00000000 "none
pub fn get_multiview_mode(&self) -> VideoMultiviewFramePacking
[src][−]
Retrieve the current value of the indicated type_
.
Returns
The current value of type_
, Default: -1 "none"
pub fn get_mute(&self) -> bool
[src][−]
Returns
true
if the currently-playing stream is muted.
pub fn get_pipeline(&self) -> Element
[src][−]
Returns
The internal playbin instance
pub fn get_position(&self) -> ClockTime
[src][−]
Returns
the absolute position time, in nanoseconds, of the currently-playing stream.
pub fn get_rate(&self) -> f64
[src][−]
Returns
current playback rate
pub fn get_subtitle_uri(&self) -> Option<GString>
[src][−]
pub fn get_subtitle_video_offset(&self) -> i64
[src][−]
Retrieve the current value of subtitle-video-offset property
Feature: v1_16
Returns
The current value of subtitle-video-offset in nanoseconds
pub fn get_uri(&self) -> Option<GString>
[src][−]
Gets the URI of the currently-playing stream.
Returns
a string containing the URI of the
currently-playing stream. g_free
after usage.
pub fn get_video_snapshot(
&self,
format: PlayerSnapshotFormat,
config: Option<&Structure>
) -> Option<Sample>
[src][−]
&self,
format: PlayerSnapshotFormat,
config: Option<&Structure>
) -> Option<Sample>
Get a snapshot of the currently selected video stream, if any. The format can be
selected with format
and optional configuration is possible with config
Currently supported settings are:
- width, height of type G_TYPE_INT
- pixel-aspect-ratio of type GST_TYPE_FRACTION Except for GST_PLAYER_THUMBNAIL_RAW_NATIVE format, if no config is set, pixel-aspect-ratio would be 1/1
format
output format of the video snapshot
config
Additional configuration
Returns
Current video snapshot sample or None
on failure
pub fn get_volume(&self) -> f64
[src][−]
Returns the current volume level, as a percentage between 0 and 1.
Returns
the volume as percentage between 0 and 1.
pub fn has_color_balance(&self) -> bool
[src][−]
Checks whether the self
has color balance support available.
Returns
true
if self
has color balance support. Otherwise,
false
.
pub fn pause(&self)
[src][−]
Pauses the current stream.
pub fn play(&self)
[src][−]
Request to play the loaded stream.
pub fn seek(&self, position: ClockTime)
[src][−]
Seeks the currently-playing stream to the absolute position
time
in nanoseconds.
position
position to seek in nanoseconds
pub fn set_audio_track(&self, stream_index: i32) -> Result<(), BoolError>
[src][−]
pub fn set_audio_track_enabled(&self, enabled: bool)
[src][−]
pub fn set_audio_video_offset(&self, offset: i64)
[src][−]
pub fn set_color_balance(&self, type_: PlayerColorBalanceType, value: f64)
[src][−]
Sets the current value of the indicated channel type_
to the passed
value.
type_
PlayerColorBalanceType
value
The new value for the type_
, ranged [0,1]
pub fn set_multiview_flags(&self, flags: VideoMultiviewFlags)
[src][−]
Sets the current value of the indicated mode type_
to the passed
value.
flags
The new value for the type_
pub fn set_multiview_mode(&self, mode: VideoMultiviewFramePacking)
[src][−]
Sets the current value of the indicated mode type_
to the passed
value.
mode
The new value for the type_
pub fn set_mute(&self, val: bool)
[src][−]
pub fn set_rate(&self, rate: f64)
[src][−]
pub fn set_subtitle_track(&self, stream_index: i32) -> Result<(), BoolError>
[src][−]
pub fn set_subtitle_track_enabled(&self, enabled: bool)
[src][−]
pub fn set_subtitle_uri(&self, uri: &str)
[src][−]
Sets the external subtitle URI. This should be combined with a call to
gst_player_set_subtitle_track_enabled(self
, TRUE) so the subtitles are actually
rendered.
uri
subtitle URI
pub fn set_subtitle_video_offset(&self, offset: i64)
[src][−]
pub fn set_uri(&self, uri: &str)
[src][−]
pub fn set_video_track(&self, stream_index: i32) -> Result<(), BoolError>
[src][−]
pub fn set_video_track_enabled(&self, enabled: bool)
[src][−]
pub fn set_visualization(&self, name: Option<&str>) -> Result<(), BoolError>
[src][−]
name
visualization element obtained from
Player::visualizations_get
()
Returns
true
if the visualizations was set correctly. Otherwise,
false
.
pub fn set_visualization_enabled(&self, enabled: bool)
[src][−]
pub fn set_volume(&self, val: f64)
[src][−]
Sets the volume level of the stream as a percentage between 0 and 1.
val
the new volume level, as a percentage between 0 and 1
pub fn stop(&self)
[src][−]
Stops playing the current stream and resets to the first position in the stream.
pub fn get_property_suburi(&self) -> Option<GString>
[src]
pub fn set_property_suburi(&self, suburi: Option<&str>)
[src]
pub fn get_property_video_multiview_flags(&self) -> VideoMultiviewFlags
[src]
pub fn set_property_video_multiview_flags(
&self,
video_multiview_flags: VideoMultiviewFlags
)
[src]
&self,
video_multiview_flags: VideoMultiviewFlags
)
pub fn get_property_video_multiview_mode(&self) -> VideoMultiviewFramePacking
[src]
pub fn set_property_video_multiview_mode(
&self,
video_multiview_mode: VideoMultiviewFramePacking
)
[src]
&self,
video_multiview_mode: VideoMultiviewFramePacking
)
pub fn get_audio_streams(info: &PlayerMediaInfo) -> Vec<PlayerAudioInfo>
[src][−]
pub fn get_subtitle_streams(info: &PlayerMediaInfo) -> Vec<PlayerSubtitleInfo>
[src][−]
pub fn get_video_streams(info: &PlayerMediaInfo) -> Vec<PlayerVideoInfo>
[src][−]
pub fn visualizations_get() -> Vec<PlayerVisualization>
[src][−]
Returns
a None
terminated array containing all available
visualizations. Use Player::visualizations_free
after
usage.
pub fn connect_buffering<F: Fn(&Player, i32) + Send + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_end_of_stream<F: Fn(&Player) + Send + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_error<F: Fn(&Player, &Error) + Send + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_media_info_updated<F: Fn(&Player, &PlayerMediaInfo) + Send + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_mute_changed<F: Fn(&Player) + Send + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_state_changed<F: Fn(&Player, PlayerState) + Send + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_uri_loaded<F: Fn(&Player, &str) + Send + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_video_dimensions_changed<F: Fn(&Player, i32, i32) + Send + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_volume_changed<F: Fn(&Player) + Send + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_warning<F: Fn(&Player, &Error) + Send + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_audio_video_offset_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_current_audio_track_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_current_subtitle_track_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_current_video_track_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_duration_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_media_info_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_mute_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_pipeline_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_position_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_rate_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_subtitle_video_offset_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_suburi_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_uri_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_video_multiview_flags_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_video_multiview_mode_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_property_volume_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
impl Player
[src][−]
pub fn new(
video_renderer: Option<&PlayerVideoRenderer>,
signal_dispatcher: Option<&PlayerSignalDispatcher>
) -> Player
[src][−]
video_renderer: Option<&PlayerVideoRenderer>,
signal_dispatcher: Option<&PlayerSignalDispatcher>
) -> Player
Creates a new Player
instance that uses signal_dispatcher
to dispatch
signals to some event loop system, or emits signals directly if NULL is
passed. See PlayerGMainContextSignalDispatcher::new
.
Video is going to be rendered by video_renderer
, or if None
is provided
no special video set up will be done and some default handling will be
performed.
video_renderer
GstPlayerVideoRenderer to use
signal_dispatcher
GstPlayerSignalDispatcher to use
Returns
a new Player
instance
pub fn get_config(&self) -> PlayerConfig
[src][−]
Get a copy of the current configuration of the player. This configuration
can either be modified and used for the Player::set_config
call
or it must be freed after usage.
Returns
a copy of the current configuration of self
. Use
gst::Structure::free
after usage or Player::set_config
.
pub fn set_config(&self, config: PlayerConfig) -> Result<(), BoolError>
[src][−]
Set the configuration of the player. If the player is already configured, and
the configuration haven't change, this function will return true
. If the
player is not in the GST_PLAYER_STATE_STOPPED, this method will return false
and active configuration will remain.
config
is a gst::Structure
that contains the configuration parameters for
the player.
This function takes ownership of config
.
config
a gst::Structure
Returns
true
when the configuration could be set.
pub fn connect_duration_changed<F: Fn(&Player, ClockTime) + Send + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_position_updated<F: Fn(&Player, ClockTime) + Send + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
pub fn connect_seek_done<F: Fn(&Player, ClockTime) + Send + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
Trait Implementations
impl Clone for Player
[src][+]
impl Debug for Player
[src][+]
impl Eq for Player
[src]
impl Hash for Player
[src][+]
impl IsA<Object> for Player
[src]
impl Ord for Player
[src][+]
impl<T: ObjectType> PartialEq<T> for Player
[src][+]
impl<T: ObjectType> PartialOrd<T> for Player
[src][+]
impl Send for Player
[src]
impl StaticType for Player
[src][+]
impl Sync for Player
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<Super, Sub> CanDowncast<Sub> for Super where
Sub: IsA<Super>,
Super: IsA<Super>,
[src]
Sub: IsA<Super>,
Super: IsA<Super>,
impl<T> Cast for T where
T: ObjectType,
[src][+]
T: ObjectType,
impl<T> From<T> for T
[src][+]
impl<O> GObjectExtManualGst for O where
O: IsA<Object>,
[src][+]
O: IsA<Object>,
impl<O> GstObjectExt for O where
O: IsA<Object>,
[src][+]
O: IsA<Object>,
impl<O> GstObjectExtManual for O where
O: IsA<Object>,
[src][+]
O: IsA<Object>,
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> ObjectExt for T where
T: ObjectType,
[src][+]
T: ObjectType,
impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
[src][+]
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
[src][+]
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
[src][+]
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
[src][+]
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
[src][+]
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T> ToSendValue for T where
T: ToValue + SetValue + Send + ?Sized,
[src][+]
T: ToValue + SetValue + Send + ?Sized,
impl<T> ToValue for T where
T: SetValue + ?Sized,
[src][+]
T: SetValue + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,