engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
IMediaControls类 参考abstract

Interface for controlling media playback. 更多...

#include <IMediaControls.h>

Public 成员函数

virtual bool CanControl (EMediaControl Control) const =0
 Whether the specified control is currently available. 更多...
 
virtual FTimespan GetDuration () const =0
 Get the media's duration. 更多...
 
virtual float GetRate () const =0
 Get the nominal playback rate, i.e. 更多...
 
virtual EMediaState GetState () const =0
 Get the state of the media. 更多...
 
virtual EMediaStatus GetStatus () const =0
 Get media player status flags. 更多...
 
virtual TRangeSet< float > GetSupportedRates (EMediaRateThinning Thinning) const =0
 Get the supported playback rates. 更多...
 
virtual FTimespan GetTime () const =0
 Get the player's current playback time. 更多...
 
virtual bool IsLooping () const =0
 Check whether playback is currently looping. 更多...
 
FORCEINLINE bool Pause ()
 Pause media playback. 更多...
 
FORCEINLINE bool Play ()
 Start media playback at the default rate of 1.0. 更多...
 
virtual bool Seek (const FTimespan &Time)=0
 Change the media's playback time. 更多...
 
bool Seek (const FTimespan &TimeOffset, EMediaSeekDirection Direction)
 Change the playback time of the media by a relative offset in the given direction. 更多...
 
virtual bool SetLooping (bool Looping)=0
 Set whether playback should be looping. 更多...
 
virtual bool SetRate (float Rate)=0
 Set the current playback rate. 更多...
 
virtual ~IMediaControls ()
 Virtual destructor.
 

详细描述

Interface for controlling media playback.

参见
IMediaCache, IMediaPlayer, IMediaSamples, IMediaTracks, IMediaView

成员函数说明

◆ CanControl()

virtual bool IMediaControls::CanControl ( EMediaControl  Control) const
pure virtual

Whether the specified control is currently available.

返回
true if the control is available, false otherwise.

◆ GetDuration()

virtual FTimespan IMediaControls::GetDuration ( ) const
pure virtual

Get the media's duration.

返回
A time span representing the duration.
参见
GetTime

◆ GetRate()

virtual float IMediaControls::GetRate ( ) const
pure virtual

Get the nominal playback rate, i.e.

1.0 for real time.

返回
Playback rate.
参见
Pause, Play, SetRate

◆ GetState()

virtual EMediaState IMediaControls::GetState ( ) const
pure virtual

Get the state of the media.

返回
Media state.
参见
IsLooping

◆ GetStatus()

virtual EMediaStatus IMediaControls::GetStatus ( ) const
pure virtual

Get media player status flags.

返回
Status flags.

◆ GetSupportedRates()

virtual TRangeSet< float > IMediaControls::GetSupportedRates ( EMediaRateThinning  Thinning) const
pure virtual

Get the supported playback rates.

参数
ThinningThe desired rate thinning mode.
返回
The ranges of supported rates.
参见
SetRate, SupportsRate

◆ GetTime()

virtual FTimespan IMediaControls::GetTime ( ) const
pure virtual

Get the player's current playback time.

返回
Playback time.
参见
Seek

◆ IsLooping()

virtual bool IMediaControls::IsLooping ( ) const
pure virtual

Check whether playback is currently looping.

返回
true if playback is looping, false otherwise.
参见
GetState, SetLooping

◆ Pause()

FORCEINLINE bool IMediaControls::Pause ( )
inline

Pause media playback.

This is the same as setting the playback rate to 0.0.

返回
true if the media is being paused, false otherwise.
参见
Play, Stop

◆ Play()

FORCEINLINE bool IMediaControls::Play ( )
inline

Start media playback at the default rate of 1.0.

This is the same as setting the playback rate to 1.0.

返回
true if playback is starting, false otherwise.
参见
Pause, Stop

◆ Seek() [1/2]

virtual bool IMediaControls::Seek ( const FTimespan &  Time)
pure virtual

Change the media's playback time.

参数
TimeThe playback time to set.
返回
true on success, false otherwise.
参见
GetTime

◆ Seek() [2/2]

bool IMediaControls::Seek ( const FTimespan &  TimeOffset,
EMediaSeekDirection  Direction 
)
inline

Change the playback time of the media by a relative offset in the given direction.

参数
TimeOffsetThe offset to apply to the time.
DirectionThe direction to seek in.
返回
true on success, false otherwise.
参见
GetDuration, GetTime

◆ SetLooping()

virtual bool IMediaControls::SetLooping ( bool  Looping)
pure virtual

Set whether playback should be looping.

参数
LoopingEnables or disables looping.
参见
IsLooping

◆ SetRate()

virtual bool IMediaControls::SetRate ( float  Rate)
pure virtual

Set the current playback rate.

A playback rate of 1.0 will play the media normally at real-time. A rate of 0.0 corresponds to pausing playback. A negative rate, if supported, plays the media in reverse, and a rate larger than 1.0 fast forwards playback.

参数
RateThe playback rate to set.
返回
true on success, false otherwise.
参见
GetRate, Pause, Play

该类的文档由以下文件生成: