RDK Documentation (Open Sourced RDK Components)
Mediaplayer Data Types and API(s)

Description

This file provides the data types and API(s) used by the mediaplayer.

Data Structures

class  RDKMediaPlayer
 

Data Structure Documentation

◆ RDKMediaPlayer

class RDKMediaPlayer

Definition at line 52 of file rdkmediaplayer.h.

Inheritance diagram for RDKMediaPlayer:
Inheritance graph
Collaboration diagram for RDKMediaPlayer:
Collaboration graph

Public Member Functions

 rtDeclareObject (RDKMediaPlayer, rtObject)
 
 rtProperty (url, currentURL, setCurrentURL, rtString)
 
 rtProperty (audioLanguage, audioLanguage, setAudioLanguage, rtString)
 
 rtProperty (secondaryAudioLanguage, secondaryAudioLanguage, setSecondaryAudioLanguage, rtString)
 
 rtProperty (position, position, setPosition, float)
 
 rtProperty (speed, speed, setSpeed, float)
 
 rtProperty (volume, volume, setVolume, float)
 
 rtProperty (blocked, blocked, setBlocked, rtString)
 
 rtProperty (zoom, zoom, setZoom, rtString)
 
 rtProperty (autoPlay, autoPlay, setAutoPlay, rtString)
 
 rtProperty (closedCaptionsEnabled, closedCaptionsEnabled, setClosedCaptionsEnabled, rtString)
 
 rtProperty (closedCaptionsOptions, closedCaptionsOptions, setClosedCaptionsOptions, rtObjectRef)
 
 rtProperty (closedCaptionsTrack, closedCaptionsTrack, setClosedCaptionsTrack, rtString)
 
 rtProperty (contentOptions, contentOptions, setContentOptions, rtObjectRef)
 
 rtProperty (tsbEnabled, tsbEnabled, setTsbEnabled, rtString)
 
 rtReadOnlyProperty (duration, duration, float)
 
 rtReadOnlyProperty (availableAudioLanguages, availableAudioLanguages, rtString)
 
 rtReadOnlyProperty (availableClosedCaptionsLanguages, availableClosedCaptionsLanguages, rtString)
 
 rtReadOnlyProperty (availableSpeeds, availableSpeeds, rtString)
 
 rtProperty (isInProgressRecording, isInProgressRecording, setIsInProgressRecording, rtString)
 
 rtProperty (networkBufferSize, networkBufferSize, setNetworkBufferSize, int32_t)
 
 rtProperty (videoBufferLength, videoBufferLength, setVideoBufferLength, float)
 
 rtProperty (eissFilterStatus, eissFilterStatus, setEissFilterStatus, rtString)
 
 rtProperty (loadStartTime, loadStartTime, setLoadStartTime, int64_t)
 
 rtMethod4ArgAndNoReturn ("setVideoRectangle", setVideoRectangle, int32_t, int32_t, int32_t, int32_t)
 
 rtMethodNoArgAndNoReturn ("play", play)
 
 rtMethodNoArgAndNoReturn ("pause", pause)
 
 rtMethodNoArgAndNoReturn ("seekToLive", seekToLive)
 
 rtMethodNoArgAndNoReturn ("stop", stop)
 
 rtMethod2ArgAndNoReturn ("setSpeed", changeSpeed, float, int32_t)
 
 rtMethod1ArgAndNoReturn ("setPositionRelative", setPositionRelative, float)
 
 rtMethod1ArgAndNoReturn ("setAdditionalAuth", setAdditionalAuth, rtObjectRef)
 
 rtMethodNoArgAndNoReturn ("requestStatus", requestStatus)
 
 rtMethod2ArgAndNoReturn ("on", setListener, rtString, rtFunctionRef)
 
 rtMethod2ArgAndNoReturn ("delListener", delListener, rtString, rtFunctionRef)
 
 rtMethodNoArgAndNoReturn ("destroy", destroy)
 
 rtMethod1ArgAndReturn ("open", open, rtString, rtString)
 
 rtMethod1ArgAndReturn ("sendCASData", sendCASData, rtString, rtString)
 
virtual void onInit ()
 
rtError currentURL (rtString &s) const
 This API returns current playback URL. More...
 
rtError setCurrentURL (rtString const &s)
 This API performs following functionalities. More...
 
rtError audioLanguage (rtString &s) const
 This API returns the audio language selected. More...
 
rtError setAudioLanguage (rtString const &s)
 This API is to set the audio language to the player. More...
 
rtError secondaryAudioLanguage (rtString &s) const
 Function returns the secondary audio language. More...
 
rtError setSecondaryAudioLanguage (rtString const &s)
 This API is to set the secondary audio language. More...
 
rtError position (float &t) const
 This API returns the current position details from the progress data. More...
 
rtError setPosition (float const &t)
 Moves the playhead to the absolute mediatime specified. More...
 
rtError speed (float &t) const
 This API is to return current playback rate. More...
 
rtError setSpeed (float const &t)
 This API is to set the playback rate. More...
 
rtError volume (float &t) const
 This API returns the current volume. More...
 
rtError setVolume (float const &t)
 This method sets the volume level for the player instance and is persisted across different URLs. More...
 
rtError blocked (rtString &t) const
 This API is to check video is blocked or not. More...
 
rtError setBlocked (rtString const &t)
 This method will block the video and mute the audio if flag is true. More...
 
rtError autoPlay (rtString &t) const
 This API indicates autoplay is enabled or not. More...
 
rtError setAutoPlay (rtString const &t)
 This API sets the auto play flag of the player. More...
 
rtError isInProgressRecording (rtString &t) const
 This API is intended to check recording status. More...
 
rtError setIsInProgressRecording (rtString const &t)
 This API is intended to set the recording state. More...
 
rtError zoom (rtString &t) const
 This API returns either FULL" or "NONE". More...
 
rtError setZoom (rtString const &t)
 This API sets the value 0 or 1 depending on the argument "FULL" or "NONE". More...
 
rtError networkBufferSize (int32_t &t) const
 This API returns the size of the buffer in milliseconds. More...
 
rtError setNetworkBufferSize (int32_t const &t)
 The API sets the network buffer size. More...
 
rtError videoBufferLength (float &t) const
 This API returns the size of the video buffer. More...
 
rtError setVideoBufferLength (float const &t)
 This API is to set the range of buffered video. More...
 
rtError eissFilterStatus (rtString &t) const
 This API checks EISS(ETV Integrated Signaling System) filter is enabled or not. More...
 
rtError setEissFilterStatus (rtString const &t)
 This API is to enable/disable the EISS filter. More...
 
rtError loadStartTime (int64_t &t) const
 This API returns the start time of the video. More...
 
rtError setLoadStartTime (int64_t const &t)
 This API is to set the start time of the video. More...
 
rtError closedCaptionsEnabled (rtString &t) const
 This API returns the closed caption status. More...
 
rtError setClosedCaptionsEnabled (rtString const &t)
 This method allows close captioning to be enabled. More...
 
rtError closedCaptionsOptions (rtObjectRef &t) const
 Returns the list of supported closed caption options supported by this player. More...
 
rtError setClosedCaptionsOptions (rtObjectRef const &t)
 Sets the close caption options to use when close captioning is enabled. More...
 
rtError closedCaptionsTrack (rtString &t) const
 Returns the available closed caption tracks for this stream. More...
 
rtError setClosedCaptionsTrack (rtString const &t)
 Sets the caption track to be played when closedCaptionEnabled is true. More...
 
rtError contentOptions (rtObjectRef &t) const
 Returns the content options. More...
 
rtError setContentOptions (rtObjectRef const &t)
 This API is to update the content option. More...
 
rtError duration (float &t) const
 This API returns the duration of video in milliseconds. More...
 
rtError availableAudioLanguages (rtString &t) const
 This method returns the languages available on the stream. More...
 
rtError availableClosedCaptionsLanguages (rtString &t) const
 This API was supposed to return array of the available captions languages for this video. More...
 
rtError availableSpeeds (rtString &t) const
 This API returns available playback rates for this video. More...
 
rtError tsbEnabled (rtString &t) const
 This API returns true, if TSB is enabled for this resource. More...
 
rtError setTsbEnabled (rtString const &t)
 This API is to enable/disable TSB. More...
 
rtError setVideoRectangle (int32_t x, int32_t y, int32_t w, int32_t h)
 API to draw a rectangle. More...
 
rtError play ()
 This API starts video playback. More...
 
rtError pause ()
 This API pause the stream and retain the playhead position. More...
 
rtError seekToLive ()
 Moves the playhead to the live position in the player. More...
 
rtError stop ()
 This API stops the stream and releases unnecessary resources. More...
 
rtError changeSpeed (float speed, int32_t overshootTime)
 This is an alternative to setting the speed property directly. More...
 
rtError setPositionRelative (float seconds)
 Sets the position of the video by adding the given number of seconds. More...
 
rtError requestStatus ()
 This API requests the onStatus event to be fired. More...
 
rtError setAdditionalAuth (rtObjectRef const &t)
 Sets additional auth data on the player that the player may need to continue playback. More...
 
rtError setListener (rtString eventName, const rtFunctionRef &f)
 Register an event listener for the specified event name. More...
 
rtError delListener (rtString eventName, const rtFunctionRef &f)
 This API deregisters the listeners associated with the event. More...
 
rtError destroy ()
 Request to destroy the video resource. More...
 
rtError open (rtString param, rtString resp)
 Open the CAS Management Service Session for CMI. More...
 
rtError sendCASData (rtString data, rtString resp)
 Send the data to CAS System. More...
 
bool getIsBlocked () const
 Returns the blocked status. More...
 
const gint64 & getSetURLTime () const
 Returns the system monotonic time. More...
 
const gint64 & getLoadStartTime () const
 Returns the value set using the function setLoadStartTime(). More...
 
const gint64 & getPlayStartTime () const
 Returns the player start time. More...
 
EventEmittergetEventEmitter ()
 This function is used to trigger the events. More...
 
void onVidHandleReceived (uint32_t handle)
 This API receives the decoder handle and updates the closedcaption state. More...
 
void updateVideoMetadata (const std::string &languages, const std::string &speeds, int duration, int width, int height)
 This API requests for OnMediaOpenedEvent() to be fired and updates the media data like speed, duration,available speeds, available languages etc. More...
 

Private Member Functions

rtError startQueuedTune ()
 
void updateClosedCaptionsState ()
 

Private Attributes

std::vector< RDKMediaPlayerImpl * > m_playerCache
 
RDKMediaPlayerImplm_pImpl
 
ClosedCaptions m_closedCaptions
 
EventEmitter m_eventEmitter
 
std::string m_currentURL
 
std::string m_audioLanguage
 
std::string m_secondaryAudioLanguage
 
IntRect m_videoRect
 
float m_seekTime
 
float m_speed
 
float m_volume
 
float m_videoBufferLength
 
bool m_urlQueued
 
bool m_isBlocked
 
bool m_eissFilterStatus
 
bool m_isInProgressRecording
 
bool m_tsbEnabled
 
int32_t m_zoom
 
int32_t m_networkBufferSize
 
int32_t m_overshootTime
 
gint64 m_loadStartTime { 0 }
 
gint64 m_setURLTime { 0 }
 
gint64 m_playStartTime { 0 }
 
bool m_closedCaptionsEnabled
 
std::map< std::string, std::string > m_closedCaptionsOptions
 
std::string m_closedCaptionsTrack
 
uint32_t m_vidDecoderHandle
 
rtObjectRef m_contentOptions
 
bool m_autoPlay
 
float m_duration
 
std::string m_availableAudioLanguages
 
std::string m_availableClosedCaptionsLanguages
 
std::string m_availableSpeeds
 

Member Function Documentation

◆ currentURL()

rtError RDKMediaPlayer::currentURL ( rtString &  s) const

This API returns current playback URL.

Parameters
[out]scurrent video URL
Returns
Returns status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 164 of file rdkmediaplayer.cpp.

◆ setCurrentURL()

rtError RDKMediaPlayer::setCurrentURL ( rtString const &  s)

This API performs following functionalities.

  • Checks the URL is empty, if not load the URL
  • Updates closedcaption state.
  • Decides which player to choose AAMP,RMF player or there is need to use cache player.
  • Initiates the playback
Parameters
[in]scurrent video URL
Returns
Returns status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 227 of file rdkmediaplayer.cpp.

◆ audioLanguage()

rtError RDKMediaPlayer::audioLanguage ( rtString &  s) const

This API returns the audio language selected.

Parameters
[out]sAudio Language selected.
Returns
Returns status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 256 of file rdkmediaplayer.cpp.

◆ setAudioLanguage()

rtError RDKMediaPlayer::setAudioLanguage ( rtString const &  s)

This API is to set the audio language to the player.

Parameters
[in]sLanguage to set.
Returns
Returns status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 262 of file rdkmediaplayer.cpp.

◆ secondaryAudioLanguage()

rtError RDKMediaPlayer::secondaryAudioLanguage ( rtString &  s) const

Function returns the secondary audio language.

Parameters
[out]sSecondary language selected.
Returns
Returns status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 273 of file rdkmediaplayer.cpp.

◆ setSecondaryAudioLanguage()

rtError RDKMediaPlayer::setSecondaryAudioLanguage ( rtString const &  s)

This API is to set the secondary audio language.

Parameters
[in]sSecondary language to set.
Returns
Returns status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 278 of file rdkmediaplayer.cpp.

◆ position()

rtError RDKMediaPlayer::position ( float &  t) const

This API returns the current position details from the progress data.

Parameters
[out]tcurrent position
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 285 of file rdkmediaplayer.cpp.

◆ setPosition()

rtError RDKMediaPlayer::setPosition ( float const &  t)

Moves the playhead to the absolute mediatime specified.

If the value passed is outside of the current valid range, value will be clamped to the valid range.

Parameters
[in]tposition to set.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 298 of file rdkmediaplayer.cpp.

◆ speed()

rtError RDKMediaPlayer::speed ( float &  t) const

This API is to return current playback rate.

Parameters
[out]tcurrent playback rate.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 308 of file rdkmediaplayer.cpp.

◆ setSpeed()

rtError RDKMediaPlayer::setSpeed ( float const &  t)

This API is to set the playback rate.

Parameters
[in]tplayback rate.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 321 of file rdkmediaplayer.cpp.

◆ volume()

rtError RDKMediaPlayer::volume ( float &  t) const

This API returns the current volume.

Parameters
[out]tcurrent volume
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 332 of file rdkmediaplayer.cpp.

◆ setVolume()

rtError RDKMediaPlayer::setVolume ( float const &  t)

This method sets the volume level for the player instance and is persisted across different URLs.

Value from 0 to 100.

Parameters
[in]tvolume to set.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 337 of file rdkmediaplayer.cpp.

◆ blocked()

rtError RDKMediaPlayer::blocked ( rtString &  t) const

This API is to check video is blocked or not.

Parameters
[out]tTrue/False indicates video is blocked or not.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 347 of file rdkmediaplayer.cpp.

◆ setBlocked()

rtError RDKMediaPlayer::setBlocked ( rtString const &  t)

This method will block the video and mute the audio if flag is true.

Otherwise it will unblock the video and restore the audio to the current volume setting. Any TSB buffering will be unaffected

Parameters
[in]tValue to enable/disable the blocking.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 353 of file rdkmediaplayer.cpp.

◆ autoPlay()

rtError RDKMediaPlayer::autoPlay ( rtString &  t) const

This API indicates autoplay is enabled or not.

Parameters
[out]tValue indicates autoplay status.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 527 of file rdkmediaplayer.cpp.

◆ setAutoPlay()

rtError RDKMediaPlayer::setAutoPlay ( rtString const &  t)

This API sets the auto play flag of the player.

If set to true the player will start playback as soon as possible. If the value is false user has to start playback.

Parameters
[in]tValue to enable/disable autoplay.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 533 of file rdkmediaplayer.cpp.

◆ isInProgressRecording()

rtError RDKMediaPlayer::isInProgressRecording ( rtString &  t) const

This API is intended to check recording status.

Parameters
[out]tRecording status
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 363 of file rdkmediaplayer.cpp.

◆ setIsInProgressRecording()

rtError RDKMediaPlayer::setIsInProgressRecording ( rtString const &  t)

This API is intended to set the recording state.

Parameters
[in]tRecording state to set.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 368 of file rdkmediaplayer.cpp.

◆ zoom()

rtError RDKMediaPlayer::zoom ( rtString &  t) const

This API returns either FULL" or "NONE".

When FULL, content is stretched to width and height of player. When NONE, content is best fit to width or height of player without distorting the video's aspect ratio.

Parameters
[out]tIndicates the value FULL or NONE
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 378 of file rdkmediaplayer.cpp.

◆ setZoom()

rtError RDKMediaPlayer::setZoom ( rtString const &  t)

This API sets the value 0 or 1 depending on the argument "FULL" or "NONE".

Parameters
[in]tValue to set
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 384 of file rdkmediaplayer.cpp.

◆ networkBufferSize()

rtError RDKMediaPlayer::networkBufferSize ( int32_t &  t) const

This API returns the size of the buffer in milliseconds.

The networkBuffer determines the number of milliseconds of the live stream that will be cached in the buffer before being consumed by the player.

Parameters
[out]tBuffer size
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 397 of file rdkmediaplayer.cpp.

◆ setNetworkBufferSize()

rtError RDKMediaPlayer::setNetworkBufferSize ( int32_t const &  t)

The API sets the network buffer size.

Parameters
[in]tBuffer size in milliseconds.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 403 of file rdkmediaplayer.cpp.

◆ videoBufferLength()

rtError RDKMediaPlayer::videoBufferLength ( float &  t) const

This API returns the size of the video buffer.

Parameters
[out]tsize of the video buffer
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 413 of file rdkmediaplayer.cpp.

◆ setVideoBufferLength()

rtError RDKMediaPlayer::setVideoBufferLength ( float const &  t)

This API is to set the range of buffered video.

Parameters
[in]tLength to set.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 418 of file rdkmediaplayer.cpp.

◆ eissFilterStatus()

rtError RDKMediaPlayer::eissFilterStatus ( rtString &  t) const

This API checks EISS(ETV Integrated Signaling System) filter is enabled or not.

Parameters
[out]tIndicates the EISS status.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 428 of file rdkmediaplayer.cpp.

◆ setEissFilterStatus()

rtError RDKMediaPlayer::setEissFilterStatus ( rtString const &  t)

This API is to enable/disable the EISS filter.

Parameters
[in]tEnable/disable value.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 434 of file rdkmediaplayer.cpp.

◆ loadStartTime()

rtError RDKMediaPlayer::loadStartTime ( int64_t &  t) const

This API returns the start time of the video.

Parameters
[out]tStart time of the video
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 444 of file rdkmediaplayer.cpp.

◆ setLoadStartTime()

rtError RDKMediaPlayer::setLoadStartTime ( int64_t const &  t)

This API is to set the start time of the video.

Parameters
[in]tstart time to set.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 450 of file rdkmediaplayer.cpp.

◆ closedCaptionsEnabled()

rtError RDKMediaPlayer::closedCaptionsEnabled ( rtString &  t) const

This API returns the closed caption status.

  • False indicates captioning is not enabled (default)
  • True indicates captioning is enabled
Parameters
[out]tIndicates the closed caption status
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 457 of file rdkmediaplayer.cpp.

◆ setClosedCaptionsEnabled()

rtError RDKMediaPlayer::setClosedCaptionsEnabled ( rtString const &  t)

This method allows close captioning to be enabled.

Close captioning is disabled by default in the player.

Parameters
[in]tParameter to enable/disable closed caption.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 463 of file rdkmediaplayer.cpp.

◆ closedCaptionsOptions()

rtError RDKMediaPlayer::closedCaptionsOptions ( rtObjectRef &  t) const

Returns the list of supported closed caption options supported by this player.

Parameters
[out]tclosed caption options.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 471 of file rdkmediaplayer.cpp.

◆ setClosedCaptionsOptions()

rtError RDKMediaPlayer::setClosedCaptionsOptions ( rtObjectRef const &  t)

Sets the close caption options to use when close captioning is enabled.

List of option keys are:

  • textSize
  • fontStyle
  • textEdgeStyle
  • textEdgeColor
  • textForegroundColor
  • textForegroundOpacity
  • textItalicized
  • textUnderline
  • windowFillColor
  • windowFillOpacity
  • windowBorderEdgeColor
  • windowBorderEdgeStyle
Parameters
[in]tOptions to set.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 482 of file rdkmediaplayer.cpp.

◆ closedCaptionsTrack()

rtError RDKMediaPlayer::closedCaptionsTrack ( rtString &  t) const

Returns the available closed caption tracks for this stream.

Parameters
[out]tClosed caption tracks supported.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 502 of file rdkmediaplayer.cpp.

◆ setClosedCaptionsTrack()

rtError RDKMediaPlayer::setClosedCaptionsTrack ( rtString const &  t)

Sets the caption track to be played when closedCaptionEnabled is true.

Parameters
[in]tCaption track to set.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 508 of file rdkmediaplayer.cpp.

◆ contentOptions()

rtError RDKMediaPlayer::contentOptions ( rtObjectRef &  t) const

Returns the content options.

Content options are an array of hashes containing key/value pairs that define additional properties for the video resource. Eg : contentOptions: {"assetType":"T6_LINEAR","streamId":"6295598249589545163","resumePosition":-1000, "isContentPosition":false,"mediaGuid":null,"assetEngine":"aamp", "adConfig":{"type":"clinear","terminalAddress":"20:F1:9E:2D:32:6B"}}

Parameters
[out]tIndicates the content options.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 515 of file rdkmediaplayer.cpp.

◆ setContentOptions()

rtError RDKMediaPlayer::setContentOptions ( rtObjectRef const &  t)

This API is to update the content option.

Parameters
[in]tOption to update.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 521 of file rdkmediaplayer.cpp.

◆ duration()

rtError RDKMediaPlayer::duration ( float &  t) const

This API returns the duration of video in milliseconds.

Parameters
[out]tTotal video duration
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 540 of file rdkmediaplayer.cpp.

◆ availableAudioLanguages()

rtError RDKMediaPlayer::availableAudioLanguages ( rtString &  t) const

This method returns the languages available on the stream.

Parameters
[out]tAudio languages supported.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 546 of file rdkmediaplayer.cpp.

◆ availableClosedCaptionsLanguages()

rtError RDKMediaPlayer::availableClosedCaptionsLanguages ( rtString &  t) const

This API was supposed to return array of the available captions languages for this video.

Parameters
[out]tClosed caption languages
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 552 of file rdkmediaplayer.cpp.

◆ availableSpeeds()

rtError RDKMediaPlayer::availableSpeeds ( rtString &  t) const

This API returns available playback rates for this video.

Parameters
[out]tplayback rates.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 558 of file rdkmediaplayer.cpp.

◆ tsbEnabled()

rtError RDKMediaPlayer::tsbEnabled ( rtString &  t) const

This API returns true, if TSB is enabled for this resource.

Defaults to false.

Parameters
[out]tTSB enabled/disabled status.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 564 of file rdkmediaplayer.cpp.

◆ setTsbEnabled()

rtError RDKMediaPlayer::setTsbEnabled ( rtString const &  t)

This API is to enable/disable TSB.

Parameters
[in]tValue to set.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 570 of file rdkmediaplayer.cpp.

◆ setVideoRectangle()

rtError RDKMediaPlayer::setVideoRectangle ( int32_t  x,
int32_t  y,
int32_t  w,
int32_t  h 
)

API to draw a rectangle.

Parameters
[in]xX co-ordinate
[in]yY co-ordinate
[in]wWidth of the video
[in]hHeight of the video
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 579 of file rdkmediaplayer.cpp.

◆ play()

rtError RDKMediaPlayer::play ( )

This API starts video playback.

If the stream is paused the stream will resume playback from the playhead position. If the stream is not paused the stream will start playback from the beginning of the stream.

Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 589 of file rdkmediaplayer.cpp.

◆ pause()

rtError RDKMediaPlayer::pause ( )

This API pause the stream and retain the playhead position.

Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 602 of file rdkmediaplayer.cpp.

◆ seekToLive()

rtError RDKMediaPlayer::seekToLive ( )

Moves the playhead to the live position in the player.

Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 613 of file rdkmediaplayer.cpp.

◆ stop()

rtError RDKMediaPlayer::stop ( )

This API stops the stream and releases unnecessary resources.

The playhead position will be lost and the last video frame should be cleared.

Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 624 of file rdkmediaplayer.cpp.

◆ changeSpeed()

rtError RDKMediaPlayer::changeSpeed ( float  speed,
int32_t  overshootTime 
)

This is an alternative to setting the speed property directly.

The overshoot value is a positive or negative value which expresses the number of milliseconds which can be used to compensate for overshooting the mark when changing speeds.

Parameters
[in]speedSpeed in milliseconds
[in]overshootTimeTime in milliseconds
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 650 of file rdkmediaplayer.cpp.

◆ setPositionRelative()

rtError RDKMediaPlayer::setPositionRelative ( float  seconds)

Sets the position of the video by adding the given number of seconds.

Seconds may be positive or negative. But should not cause the position to be less than zero or greater than the duration.

Parameters
[in]secondsSeek time in seconds.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 661 of file rdkmediaplayer.cpp.

◆ requestStatus()

rtError RDKMediaPlayer::requestStatus ( )

This API requests the onStatus event to be fired.

Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 679 of file rdkmediaplayer.cpp.

◆ setAdditionalAuth()

rtError RDKMediaPlayer::setAdditionalAuth ( rtObjectRef const &  t)

Sets additional auth data on the player that the player may need to continue playback.

Parameters
[in]tKey/value pairs required for additional authentication and authorization.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 687 of file rdkmediaplayer.cpp.

◆ setListener()

rtError RDKMediaPlayer::setListener ( rtString  eventName,
const rtFunctionRef &  f 
)

Register an event listener for the specified event name.

Parameters
[in]eventNameEvents associated with the mediaplayer onMediaOpened, onBuffering, onPlaying etc.
[in]fListener function associated with the event.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 693 of file rdkmediaplayer.cpp.

◆ delListener()

rtError RDKMediaPlayer::delListener ( rtString  eventName,
const rtFunctionRef &  f 
)

This API deregisters the listeners associated with the event.

Parameters
[in]eventNameEvents associated with the mediaplayer onMediaOpened, onBuffering, onPlaying etc.
[in]fListener function associated with the event.
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 698 of file rdkmediaplayer.cpp.

◆ destroy()

rtError RDKMediaPlayer::destroy ( )

Request to destroy the video resource.

Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 703 of file rdkmediaplayer.cpp.

◆ open()

rtError RDKMediaPlayer::open ( rtString  param,
rtString  resp 
)

Open the CAS Management Service Session for CMI.

This is to create a CAS management service session to start receiving data to/from the CAS System.

Parameters
[in]paramJson string OpenData to CAS
[out]respResponse returns back to CAS Management client
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 709 of file rdkmediaplayer.cpp.

◆ sendCASData()

rtError RDKMediaPlayer::sendCASData ( rtString  data,
rtString  resp 
)

Send the data to CAS System.

This is to pass the data to CAS system to process the result of this back through EventData asynchronously

Parameters
[in]dataJson string XferInfo to CAS
[out]respResponse returns back to CAS Management client
Returns
Returns the status of the operation.
Return values
RT_OKon success, appropriate error code otherwise.

Definition at line 801 of file rdkmediaplayer.cpp.

◆ getIsBlocked()

bool RDKMediaPlayer::getIsBlocked ( ) const

Returns the blocked status.

Returns
Returns the status of the operation.
Return values
TRUE/FALSEdepending upon the status.

Definition at line 814 of file rdkmediaplayer.cpp.

◆ getSetURLTime()

const gint64 & RDKMediaPlayer::getSetURLTime ( ) const

Returns the system monotonic time.

It is the value returned by g_get_monotonic_time()

Returns
Returns time in microseconds.

Definition at line 819 of file rdkmediaplayer.cpp.

◆ getLoadStartTime()

const gint64 & RDKMediaPlayer::getLoadStartTime ( ) const

Returns the value set using the function setLoadStartTime().

Returns
Returns the time in microseconds.

Definition at line 824 of file rdkmediaplayer.cpp.

◆ getPlayStartTime()

const gint64 & RDKMediaPlayer::getPlayStartTime ( ) const

Returns the player start time.

Returns
Returns the start time in microseconds.

Definition at line 829 of file rdkmediaplayer.cpp.

◆ getEventEmitter()

EventEmitter & RDKMediaPlayer::getEventEmitter ( )

This function is used to trigger the events.

Returns
Returns the reference of event emitter class .

Definition at line 834 of file rdkmediaplayer.cpp.

◆ onVidHandleReceived()

void RDKMediaPlayer::onVidHandleReceived ( uint32_t  handle)

This API receives the decoder handle and updates the closedcaption state.

Parameters
[in]handleHandle to check closedcaption is enabled or not.

Definition at line 839 of file rdkmediaplayer.cpp.

◆ updateVideoMetadata()

void RDKMediaPlayer::updateVideoMetadata ( const std::string &  languages,
const std::string &  speeds,
int  duration,
int  width,
int  height 
)

This API requests for OnMediaOpenedEvent() to be fired and updates the media data like speed, duration,available speeds, available languages etc.

Parameters
[in]languagesAvailable AudioLanguages
[in]speedsAvailable playback rates
[in]durationDuration of the video
[in]widthWidth of the video
[in]heightHeigt of the video

Definition at line 846 of file rdkmediaplayer.cpp.