You.i Engine
CYICastLabsVideoPlayer Class Reference

#include <player/YiCastLabsVideoPlayer.h>

Inheritance diagram for CYICastLabsVideoPlayer:

Classes

struct  Metadata
 

Public Member Functions

 CYICastLabsVideoPlayer ()
 
virtual ~CYICastLabsVideoPlayer ()
 
void SetMaxResolution (const glm::ivec2 &rMaxResolution)
 
void SetMinimumBufferTime (uint64_t uMinimumBufferTimeMs)
 
void SetMaximumBufferTime (uint64_t uMaximumBufferTimeMs)
 
void SetLiveDelayTime (uint64_t uLiveDelayTimeMs)
 
void SetLoggingEnabled (bool bEnabled)
 
bool IsLoggingEnabled () const
 
virtual CYIString GetName_ () const override
 
virtual Statistics GetStatistics_ () const override
 
- Public Member Functions inherited from CYIAbstractVideoPlayer
virtual ~CYIAbstractVideoPlayer ()
 
CYIString GetName () const
 
CYIString GetVersion () const
 
Statistics GetStatistics () const
 
void Init ()
 
void Prepare (const CYIUrl &videoURI, STREAMING_FORMAT eFormatHint, CYIAbstractVideoPlayer::PLAYBACK_STATE eInitialState=CYIAbstractVideoPlayer::PLAYBACK_PAUSED, std::unique_ptr< DRMConfiguration > pDRMConfiguration=nullptr)
 
void Prepare (const std::shared_ptr< CYIAssetVideo > &videoAsset, STREAMING_FORMAT eFormatHint, CYIAbstractVideoPlayer::PLAYBACK_STATE eInitialState=CYIAbstractVideoPlayer::PLAYBACK_PAUSED, std::unique_ptr< DRMConfiguration > pDRMConfiguration=nullptr)
 
void Play ()
 
void Pause ()
 
void Stop ()
 
void Seek (uint64_t uSeekPositionMs)
 
bool SupportsFormat (STREAMING_FORMAT eStreamingFormat, DRM_SCHEME eDRMScheme=DRM_NONE)
 
uint64_t GetDurationMs () const
 
uint64_t GetCurrentTimeMs () const
 
CYIAbstractVideoPlayer::PlayerState GetPlayerState () const
 
bool AreClosedCaptionsTracksAvailable () const
 
bool SelectClosedCaptionsTrack (uint32_t uID)
 
std::vector< ClosedCaptionsTrackInfoGetClosedCaptionsTracks () const
 
ClosedCaptionsTrackInfo GetActiveClosedCaptionsTrack () const
 
CYIClosedCaptionsDispatcherGetClosedCaptionsDispatcher () const
 
CYIVideoSurfaceGetSurface () const
 
bool AreAudioTracksAvailable () const
 
bool SelectAudioTrack (uint32_t uID)
 
std::vector< AudioTrackInfoGetAudioTracks () const
 
AudioTrackInfo GetActiveAudioTrack () const
 
bool IsMuted () const
 
void Mute (bool bMute)
 
void SetMaxBitrate (uint64_t uMaxBitrate)
 
void SetUserAgent (const CYIString &userAgent)
 
void SetVideoMetadata (const CYIAbstractVideoPlayer::VideoMetadata &metadata)
 
const DRMConfigurationGetDRMConfiguration () const
 
DRMConfigurationGetDRMConfiguration ()
 
- Public Member Functions inherited from CYISignalHandler
 CYISignalHandler ()
 
 CYISignalHandler (const CYISignalHandler &rSignalHandler)
 
virtual ~CYISignalHandler ()
 
CYISignalHandleroperator= (const CYISignalHandler &rSignalHandler)
 
void MoveToThread (CYIThread *pThread)
 This function allows the user to override the default thread affinity to any CYIThread that may or may not be running. More...
 
CYIThreadHandle GetThreadAffinity () const
 
void SetThreadAffinity (const CYIThreadHandle &rThreadAffinity)
 
virtual bool IsConnected () const
 
virtual bool IsConnected (const CYISignalBase &rSignal) const
 
void Disconnect (CYISignalBase &rSignal)
 
void DisconnectFromAllSignals ()
 
- Public Member Functions inherited from CYIThread::Listener
 Listener ()
 
virtual ~Listener ()
 
virtual void OnThreadStarted (CYIThread *)
 
virtual void OnThreadTerminated (CYIThread *)
 
virtual void OnThreadFinished (CYIThread *)
 
- Public Member Functions inherited from CYIScriptableObject
 CYIScriptableObject ()
 
 CYIScriptableObject (const CYIScriptableObject &other)
 
CYIScriptableObjectoperator= (const CYIScriptableObject &other)
 
virtual ~CYIScriptableObject ()
 
CYIBindingImplementationGetBindingImplementation () const
 
void SetBindingImplementation (CYIBindingImplementation *pBindingImplementation)
 
virtual const CYIRuntimeTypeInfoGetRuntimeTypeInfoForScriptObject () const
 

Public Attributes

CYISignal< MetadataMetadataReceived
 
- Public Attributes inherited from CYIAbstractVideoPlayer
CYISignal BufferingStarted
 
CYISignal BufferingEnded
 
CYISignal< ErrorErrorOccurred
 
CYISignal Preparing
 
CYISignal Ready
 
CYISignal Playing
 
CYISignal Paused
 
CYISignal PlaybackComplete
 
CYISignal Finalized
 
CYISignal< uint64_t > CurrentTimeUpdated
 
CYISignal< uint64_t > DurationChanged
 
CYISignal< const CYIAbstractVideoPlayer::PlayerState & > PlayerStateChanged
 
CYISignal< std::vector< AudioTrackInfo > > AvailableAudioTracksChanged
 
CYISignal< std::vector< ClosedCaptionsTrackInfo > > AvailableClosedCaptionsTracksChanged
 

Friends

class CYICastLabsVideoPlayerPriv
 

Additional Inherited Members

- Public Types inherited from CYIAbstractVideoPlayer
enum  MEDIA_STATE {
  MEDIA_UNLOADED,
  MEDIA_PREPARING,
  MEDIA_READY
}
 
enum  PLAYBACK_STATE {
  PLAYBACK_PLAYING,
  PLAYBACK_PAUSED,
  PLAYBACK_BUFFERING
}
 
enum  STREAMING_FORMAT {
  HLS = 0,
  SMOOTH,
  DASH,
  MP4
}
 
enum  DRM_SCHEME {
  DRM_NONE = 0,
  DRM_FAIRPLAY,
  DRM_PLAYREADY,
  DRM_WIDEVINE_MODULAR
}
 
enum  ERROR_CODE {
  PLAYBACK_ERROR,
  UNSUPPORTED_FORMAT,
  STATE_TRANSITION_ERROR,
  DRM_ERROR,
  UNKNOWN
}
 
using VideoMetadata = std::map< CYIString, CYIString >
 
- Protected Member Functions inherited from CYIAbstractVideoPlayer
 CYIAbstractVideoPlayer ()
 
const std::shared_ptr< CYIMaterial > & GetVideoMaterial () const
 
void SetVideoSurfaceSize (const glm::ivec2 &size)
 
void ChangeInitialPlaybackState (CYIAbstractVideoPlayer::PLAYBACK_STATE eInitialState)
 
CYIAbstractVideoPlayer::PLAYBACK_STATE GetRequestedInitialPlaybackState () const
 
void CheckAndNotifyMediaTracksChanged ()
 
void UpdateCurrentTime ()
 
- Protected Attributes inherited from CYIAbstractVideoPlayer
CYISignal< ErrorNotifyErrorOccurred
 
CYISignal NotifyPlaybackComplete
 
CYISignal< uint64_t > NotifyDurationChanged
 
std::unique_ptr< CYIVideoPlayerStateManagerm_pStateManager
 
std::unique_ptr< CYIClosedCaptionsDispatcherm_pClosedCaptionsDispatcher
 
std::shared_ptr< DRMConfigurationm_pDRMConfiguration
 
uint64_t m_uMaxBitrate
 

Constructor & Destructor Documentation

CYICastLabsVideoPlayer::CYICastLabsVideoPlayer ( )
virtual CYICastLabsVideoPlayer::~CYICastLabsVideoPlayer ( )
virtual

Member Function Documentation

virtual CYIString CYICastLabsVideoPlayer::GetName_ ( ) const
overridevirtual

Returns the name of the player.

Reimplemented from CYIAbstractVideoPlayer.

virtual Statistics CYICastLabsVideoPlayer::GetStatistics_ ( ) const
overridevirtual

Returns the latest statistics from the player.

Reimplemented from CYIAbstractVideoPlayer.

bool CYICastLabsVideoPlayer::IsLoggingEnabled ( ) const

Returns true if the Castlabs player internal logging is enabled.

void CYICastLabsVideoPlayer::SetLiveDelayTime ( uint64_t  uLiveDelayTimeMs)

Set Live delay. When playing live streams, point the player before the live edge by the specified amount.

void CYICastLabsVideoPlayer::SetLoggingEnabled ( bool  bEnabled)

Enable or Disable the Castlabs player internal logging.

void CYICastLabsVideoPlayer::SetMaximumBufferTime ( uint64_t  uMaximumBufferTimeMs)

Set the maximum time that should be buffered. The higher the value, the smoother the streaming with less frequent buffering, but will increase memory usage. Call this before Prepare().

The default maximum buffer time is 60 seconds on PS4.

void CYICastLabsVideoPlayer::SetMaxResolution ( const glm::ivec2 &  rMaxResolution)

Set the max resolution supported by this player instance. This will create a decoder specific to that resolution, and higher resolution won't be allowed to be played. Call this before Prepare().

By default it will be set to the max the platform can support.

void CYICastLabsVideoPlayer::SetMinimumBufferTime ( uint64_t  uMinimumBufferTimeMs)

Set the minimum time that should be buffered before the video starts playing or resumes from buffering. Call this before Prepare().

The default minimum buffer time is 1 second.

Friends And Related Function Documentation

friend class CYICastLabsVideoPlayerPriv
friend

Member Data Documentation

CYISignal<Metadata> CYICastLabsVideoPlayer::MetadataReceived

Emitted when a metadata cue has been received at a specific time.


The documentation for this class was generated from the following file: