Struct gstreamer_player::Player [−]
pub struct Player(_, _);
Methods
impl Player[src]
impl Playerpub fn get_audio_video_offset(&self) -> i64[src]
pub fn get_audio_video_offset(&self) -> i64Retrieve the current value of audio-video-offset property
Returns
The current value of audio-video-offset in nanoseconds
Since 1.10
pub fn get_color_balance(&self, type_: PlayerColorBalanceType) -> f64[src]
pub fn get_color_balance(&self, type_: PlayerColorBalanceType) -> f64Retrieve 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]
pub fn get_current_audio_track(&self) -> Option<PlayerAudioInfo>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]
pub fn get_current_subtitle_track(&self) -> Option<PlayerSubtitleInfo>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]
pub fn get_current_video_track(&self) -> Option<PlayerVideoInfo>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<String>[src]
pub fn get_current_visualization(&self) -> Option<String>Returns
Name of the currently enabled visualization.
g_free after usage.
pub fn get_duration(&self) -> ClockTime[src]
pub fn get_duration(&self) -> ClockTimeRetrieves 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]
pub fn get_media_info(&self) -> Option<PlayerMediaInfo>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]
pub fn get_multiview_flags(&self) -> VideoMultiviewFlagsRetrieve the current value of the indicated type_.
Returns
The current value of type_, Default: 0x00000000 "none
pub fn get_multiview_mode(&self) -> VideoMultiviewFramePacking[src]
pub fn get_multiview_mode(&self) -> VideoMultiviewFramePackingRetrieve the current value of the indicated type_.
Returns
The current value of type_, Default: -1 "none"
pub fn get_mute(&self) -> bool[src]
pub fn get_mute(&self) -> boolReturns
true if the currently-playing stream is muted.
pub fn get_pipeline(&self) -> Element[src]
pub fn get_pipeline(&self) -> ElementReturns
The internal playbin instance
pub fn get_position(&self) -> ClockTime[src]
pub fn get_position(&self) -> ClockTimeReturns
the absolute position time, in nanoseconds, of the currently-playing stream.
pub fn get_rate(&self) -> f64[src]
pub fn get_rate(&self) -> f64Returns
current playback rate
pub fn get_subtitle_uri(&self) -> Option<String>[src]
pub fn get_subtitle_uri(&self) -> Option<String>pub fn get_uri(&self) -> Option<String>[src]
pub fn get_uri(&self) -> Option<String>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<'a, P: Into<Option<&'a Structure>>>(
&self,
format: PlayerSnapshotFormat,
config: P
) -> Option<Sample>[src]
pub fn get_video_snapshot<'a, P: Into<Option<&'a Structure>>>(
&self,
format: PlayerSnapshotFormat,
config: P
) -> 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
Since 1.12
pub fn get_volume(&self) -> f64[src]
pub fn get_volume(&self) -> f64Returns 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]
pub fn has_color_balance(&self) -> boolChecks whether the self has color balance support available.
Returns
true if self has color balance support. Otherwise,
false.
pub fn pause(&self)[src]
pub fn pause(&self)Pauses the current stream.
pub fn play(&self)[src]
pub fn play(&self)Request to play the loaded stream.
pub fn seek(&self, position: ClockTime)[src]
pub fn seek(&self, position: ClockTime)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(&self, stream_index: i32) -> Result<(), BoolError>pub fn set_audio_track_enabled(&self, enabled: bool)[src]
pub fn set_audio_track_enabled(&self, enabled: bool)pub fn set_audio_video_offset(&self, offset: i64)[src]
pub fn set_audio_video_offset(&self, offset: i64)pub fn set_color_balance(&self, type_: PlayerColorBalanceType, value: f64)[src]
pub fn set_color_balance(&self, type_: PlayerColorBalanceType, value: f64)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]
pub fn set_multiview_flags(&self, flags: VideoMultiviewFlags)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]
pub fn set_multiview_mode(&self, mode: VideoMultiviewFramePacking)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_mute(&self, val: bool)pub fn set_rate(&self, rate: f64)[src]
pub fn set_rate(&self, rate: f64)pub fn set_subtitle_track(&self, stream_index: i32) -> Result<(), BoolError>[src]
pub fn set_subtitle_track(&self, stream_index: i32) -> Result<(), BoolError>pub fn set_subtitle_track_enabled(&self, enabled: bool)[src]
pub fn set_subtitle_track_enabled(&self, enabled: bool)pub fn set_subtitle_uri(&self, uri: &str)[src]
pub fn set_subtitle_uri(&self, uri: &str)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_uri(&self, uri: &str)[src]
pub fn set_uri(&self, uri: &str)pub fn set_video_track(&self, stream_index: i32) -> Result<(), BoolError>[src]
pub fn set_video_track(&self, stream_index: i32) -> Result<(), BoolError>pub fn set_video_track_enabled(&self, enabled: bool)[src]
pub fn set_video_track_enabled(&self, enabled: bool)pub fn set_visualization<'a, P: Into<Option<&'a str>>>(
&self,
name: P
) -> Result<(), BoolError>[src]
pub fn set_visualization<'a, P: Into<Option<&'a str>>>(
&self,
name: P
) -> Result<(), BoolError>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_visualization_enabled(&self, enabled: bool)pub fn set_volume(&self, val: f64)[src]
pub fn set_volume(&self, val: f64)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]
pub fn stop(&self)Stops playing the current stream and resets to the first position in the stream.
pub fn get_property_suburi(&self) -> Option<String>[src]
pub fn get_property_suburi(&self) -> Option<String>pub fn set_property_suburi(&self, suburi: Option<&str>)[src]
pub fn set_property_suburi(&self, suburi: Option<&str>)pub fn get_property_video_multiview_flags(&self) -> VideoMultiviewFlags[src]
pub fn get_property_video_multiview_flags(&self) -> VideoMultiviewFlagspub fn set_property_video_multiview_flags(
&self,
video_multiview_flags: VideoMultiviewFlags
)[src]
pub fn set_property_video_multiview_flags(
&self,
video_multiview_flags: VideoMultiviewFlags
)pub fn get_property_video_multiview_mode(&self) -> VideoMultiviewFramePacking[src]
pub fn get_property_video_multiview_mode(&self) -> VideoMultiviewFramePackingpub fn set_property_video_multiview_mode(
&self,
video_multiview_mode: VideoMultiviewFramePacking
)[src]
pub fn set_property_video_multiview_mode(
&self,
video_multiview_mode: VideoMultiviewFramePacking
)pub fn get_audio_streams(info: &PlayerMediaInfo) -> Vec<PlayerAudioInfo>[src]
pub fn get_audio_streams(info: &PlayerMediaInfo) -> Vec<PlayerAudioInfo>pub fn get_subtitle_streams(info: &PlayerMediaInfo) -> Vec<PlayerSubtitleInfo>[src]
pub fn get_subtitle_streams(info: &PlayerMediaInfo) -> Vec<PlayerSubtitleInfo>pub fn get_video_streams(info: &PlayerMediaInfo) -> Vec<PlayerVideoInfo>[src]
pub fn get_video_streams(info: &PlayerMediaInfo) -> Vec<PlayerVideoInfo>pub fn visualizations_get() -> Vec<PlayerVisualization>[src]
pub fn visualizations_get() -> Vec<PlayerVisualization>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]
pub fn connect_buffering<F: Fn(&Player, i32) + Send + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_end_of_stream<F: Fn(&Player) + Send + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_end_of_stream<F: Fn(&Player) + Send + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_error<F: Fn(&Player, &Error) + Send + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_error<F: Fn(&Player, &Error) + Send + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_media_info_updated<F: Fn(&Player, &PlayerMediaInfo) + Send + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_media_info_updated<F: Fn(&Player, &PlayerMediaInfo) + Send + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_mute_changed<F: Fn(&Player) + Send + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_mute_changed<F: Fn(&Player) + Send + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_state_changed<F: Fn(&Player, PlayerState) + Send + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_state_changed<F: Fn(&Player, PlayerState) + Send + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_uri_loaded<F: Fn(&Player, &str) + Send + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_uri_loaded<F: Fn(&Player, &str) + Send + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_video_dimensions_changed<F: Fn(&Player, i32, i32) + Send + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_video_dimensions_changed<F: Fn(&Player, i32, i32) + Send + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_volume_changed<F: Fn(&Player) + Send + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_volume_changed<F: Fn(&Player) + Send + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_warning<F: Fn(&Player, &Error) + Send + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_warning<F: Fn(&Player, &Error) + Send + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_property_audio_video_offset_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_property_audio_video_offset_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_property_current_audio_track_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_property_current_audio_track_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_property_current_subtitle_track_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_property_current_subtitle_track_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_property_current_video_track_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_property_current_video_track_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_property_duration_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_property_duration_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_property_media_info_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_property_media_info_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_property_mute_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_property_mute_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_property_pipeline_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_property_pipeline_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_property_position_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_property_position_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_property_rate_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_property_rate_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_property_signal_dispatcher_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_property_signal_dispatcher_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_property_suburi_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_property_suburi_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_property_uri_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_property_uri_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_property_video_multiview_flags_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_property_video_multiview_flags_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_property_video_multiview_mode_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_property_video_multiview_mode_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_property_video_renderer_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_property_video_renderer_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_property_volume_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_property_volume_notify<F: Fn(&Player) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerIdimpl Player[src]
impl Playerpub fn new(
video_renderer: Option<&PlayerVideoRenderer>,
signal_dispatcher: Option<&PlayerSignalDispatcher>
) -> Player[src]
pub fn new(
video_renderer: Option<&PlayerVideoRenderer>,
signal_dispatcher: Option<&PlayerSignalDispatcher>
) -> PlayerCreates 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]
pub fn get_config(&self) -> PlayerConfigpub fn set_config(&self, config: PlayerConfig) -> Result<(), BoolError>[src]
pub fn set_config(&self, config: PlayerConfig) -> Result<(), BoolError>pub fn connect_duration_changed<F: Fn(&Player, ClockTime) + Send + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_duration_changed<F: Fn(&Player, ClockTime) + Send + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_position_updated<F: Fn(&Player, ClockTime) + Send + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_position_updated<F: Fn(&Player, ClockTime) + Send + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_seek_done<F: Fn(&Player, ClockTime) + Send + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_seek_done<F: Fn(&Player, ClockTime) + Send + 'static>(
&self,
f: F
) -> SignalHandlerIdTrait Implementations
impl Clone for Player
impl Clone for Playerfn clone(&self) -> Player
fn clone(&self) -> PlayerReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Hash for Player
impl Hash for Playerfn hash<__H: Hasher>(&self, state: &mut __H)
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl Ord for Player
impl Ord for Playerfn cmp(&self, other: &Player) -> Ordering
fn cmp(&self, other: &Player) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl StaticType for Player
impl StaticType for Playerfn static_type() -> Type
fn static_type() -> TypeReturns the type identifier of Self.
impl<T: IsA<Object>> PartialEq<T> for Player
impl<T: IsA<Object>> PartialEq<T> for Playerfn eq(&self, other: &T) -> bool
fn eq(&self, other: &T) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl Eq for Player
impl Eq for Playerimpl<T: IsA<Object>> PartialOrd<T> for Player
impl<T: IsA<Object>> PartialOrd<T> for Playerfn partial_cmp(&self, other: &T) -> Option<Ordering>
fn partial_cmp(&self, other: &T) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
#[must_use]
fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn lt(&self, other: &Rhs) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Debug for Player
impl Debug for Playerimpl IsA<Object> for Player
impl IsA<Object> for Playerimpl IsA<Object> for Player
impl IsA<Object> for Playerimpl Send for Player[src]
impl Send for Playerimpl Sync for Player[src]
impl Sync for Player