RDK Documentation (Open Sourced RDK Components)
|
This file provides the data types and API(s) used by the mediaplayer.
Data Structures | |
class | RDKMediaPlayer |
class RDKMediaPlayer |
Definition at line 52 of file rdkmediaplayer.h.
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... | |
EventEmitter & | getEventEmitter () |
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 |
RDKMediaPlayerImpl * | m_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 |
rtError RDKMediaPlayer::currentURL | ( | rtString & | s | ) | const |
This API returns current playback URL.
[out] | s | current video URL |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 164 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::setCurrentURL | ( | rtString const & | s | ) |
This API performs following functionalities.
[in] | s | current video URL |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 227 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::audioLanguage | ( | rtString & | s | ) | const |
This API returns the audio language selected.
[out] | s | Audio Language selected. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 256 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::setAudioLanguage | ( | rtString const & | s | ) |
This API is to set the audio language to the player.
[in] | s | Language to set. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 262 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::secondaryAudioLanguage | ( | rtString & | s | ) | const |
Function returns the secondary audio language.
[out] | s | Secondary language selected. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 273 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::setSecondaryAudioLanguage | ( | rtString const & | s | ) |
This API is to set the secondary audio language.
[in] | s | Secondary language to set. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 278 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::position | ( | float & | t | ) | const |
This API returns the current position details from the progress data.
[out] | t | current position |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 285 of file rdkmediaplayer.cpp.
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.
[in] | t | position to set. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 298 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::speed | ( | float & | t | ) | const |
This API is to return current playback rate.
[out] | t | current playback rate. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 308 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::setSpeed | ( | float const & | t | ) |
This API is to set the playback rate.
[in] | t | playback rate. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 321 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::volume | ( | float & | t | ) | const |
This API returns the current volume.
[out] | t | current volume |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 332 of file rdkmediaplayer.cpp.
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.
[in] | t | volume to set. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 337 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::blocked | ( | rtString & | t | ) | const |
This API is to check video is blocked or not.
[out] | t | True/False indicates video is blocked or not. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 347 of file rdkmediaplayer.cpp.
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
[in] | t | Value to enable/disable the blocking. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 353 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::autoPlay | ( | rtString & | t | ) | const |
This API indicates autoplay is enabled or not.
[out] | t | Value indicates autoplay status. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 527 of file rdkmediaplayer.cpp.
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.
[in] | t | Value to enable/disable autoplay. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 533 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::isInProgressRecording | ( | rtString & | t | ) | const |
This API is intended to check recording status.
[out] | t | Recording status |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 363 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::setIsInProgressRecording | ( | rtString const & | t | ) |
This API is intended to set the recording state.
[in] | t | Recording state to set. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 368 of file rdkmediaplayer.cpp.
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.
[out] | t | Indicates the value FULL or NONE |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 378 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::setZoom | ( | rtString const & | t | ) |
This API sets the value 0 or 1 depending on the argument "FULL" or "NONE".
[in] | t | Value to set |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 384 of file rdkmediaplayer.cpp.
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.
[out] | t | Buffer size |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 397 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::setNetworkBufferSize | ( | int32_t const & | t | ) |
The API sets the network buffer size.
[in] | t | Buffer size in milliseconds. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 403 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::videoBufferLength | ( | float & | t | ) | const |
This API returns the size of the video buffer.
[out] | t | size of the video buffer |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 413 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::setVideoBufferLength | ( | float const & | t | ) |
This API is to set the range of buffered video.
[in] | t | Length to set. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 418 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::eissFilterStatus | ( | rtString & | t | ) | const |
This API checks EISS(ETV Integrated Signaling System) filter is enabled or not.
[out] | t | Indicates the EISS status. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 428 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::setEissFilterStatus | ( | rtString const & | t | ) |
This API is to enable/disable the EISS filter.
[in] | t | Enable/disable value. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 434 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::loadStartTime | ( | int64_t & | t | ) | const |
This API returns the start time of the video.
[out] | t | Start time of the video |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 444 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::setLoadStartTime | ( | int64_t const & | t | ) |
This API is to set the start time of the video.
[in] | t | start time to set. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 450 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::closedCaptionsEnabled | ( | rtString & | t | ) | const |
This API returns the closed caption status.
[out] | t | Indicates the closed caption status |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 457 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::setClosedCaptionsEnabled | ( | rtString const & | t | ) |
This method allows close captioning to be enabled.
Close captioning is disabled by default in the player.
[in] | t | Parameter to enable/disable closed caption. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 463 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::closedCaptionsOptions | ( | rtObjectRef & | t | ) | const |
Returns the list of supported closed caption options supported by this player.
[out] | t | closed caption options. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 471 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::setClosedCaptionsOptions | ( | rtObjectRef const & | t | ) |
Sets the close caption options to use when close captioning is enabled.
List of option keys are:
[in] | t | Options to set. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 482 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::closedCaptionsTrack | ( | rtString & | t | ) | const |
Returns the available closed caption tracks for this stream.
[out] | t | Closed caption tracks supported. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 502 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::setClosedCaptionsTrack | ( | rtString const & | t | ) |
Sets the caption track to be played when closedCaptionEnabled is true.
[in] | t | Caption track to set. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 508 of file rdkmediaplayer.cpp.
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"}}
[out] | t | Indicates the content options. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 515 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::setContentOptions | ( | rtObjectRef const & | t | ) |
This API is to update the content option.
[in] | t | Option to update. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 521 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::duration | ( | float & | t | ) | const |
This API returns the duration of video in milliseconds.
[out] | t | Total video duration |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 540 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::availableAudioLanguages | ( | rtString & | t | ) | const |
This method returns the languages available on the stream.
[out] | t | Audio languages supported. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 546 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::availableClosedCaptionsLanguages | ( | rtString & | t | ) | const |
This API was supposed to return array of the available captions languages for this video.
[out] | t | Closed caption languages |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 552 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::availableSpeeds | ( | rtString & | t | ) | const |
This API returns available playback rates for this video.
[out] | t | playback rates. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 558 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::tsbEnabled | ( | rtString & | t | ) | const |
This API returns true, if TSB is enabled for this resource.
Defaults to false.
[out] | t | TSB enabled/disabled status. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 564 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::setTsbEnabled | ( | rtString const & | t | ) |
This API is to enable/disable TSB.
[in] | t | Value to set. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 570 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::setVideoRectangle | ( | int32_t | x, |
int32_t | y, | ||
int32_t | w, | ||
int32_t | h | ||
) |
API to draw a rectangle.
[in] | x | X co-ordinate |
[in] | y | Y co-ordinate |
[in] | w | Width of the video |
[in] | h | Height of the video |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 579 of file rdkmediaplayer.cpp.
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.
RT_OK | on success, appropriate error code otherwise. |
Definition at line 589 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::pause | ( | ) |
This API pause the stream and retain the playhead position.
RT_OK | on success, appropriate error code otherwise. |
Definition at line 602 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::seekToLive | ( | ) |
Moves the playhead to the live position in the player.
RT_OK | on success, appropriate error code otherwise. |
Definition at line 613 of file rdkmediaplayer.cpp.
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.
RT_OK | on success, appropriate error code otherwise. |
Definition at line 624 of file rdkmediaplayer.cpp.
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.
[in] | speed | Speed in milliseconds |
[in] | overshootTime | Time in milliseconds |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 650 of file rdkmediaplayer.cpp.
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.
[in] | seconds | Seek time in seconds. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 661 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::requestStatus | ( | ) |
This API requests the onStatus event to be fired.
RT_OK | on success, appropriate error code otherwise. |
Definition at line 679 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::setAdditionalAuth | ( | rtObjectRef const & | t | ) |
Sets additional auth data on the player that the player may need to continue playback.
[in] | t | Key/value pairs required for additional authentication and authorization. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 687 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::setListener | ( | rtString | eventName, |
const rtFunctionRef & | f | ||
) |
Register an event listener for the specified event name.
[in] | eventName | Events associated with the mediaplayer onMediaOpened, onBuffering, onPlaying etc. |
[in] | f | Listener function associated with the event. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 693 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::delListener | ( | rtString | eventName, |
const rtFunctionRef & | f | ||
) |
This API deregisters the listeners associated with the event.
[in] | eventName | Events associated with the mediaplayer onMediaOpened, onBuffering, onPlaying etc. |
[in] | f | Listener function associated with the event. |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 698 of file rdkmediaplayer.cpp.
rtError RDKMediaPlayer::destroy | ( | ) |
Request to destroy the video resource.
RT_OK | on success, appropriate error code otherwise. |
Definition at line 703 of file rdkmediaplayer.cpp.
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.
[in] | param | Json string OpenData to CAS |
[out] | resp | Response returns back to CAS Management client |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 709 of file rdkmediaplayer.cpp.
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
[in] | data | Json string XferInfo to CAS |
[out] | resp | Response returns back to CAS Management client |
RT_OK | on success, appropriate error code otherwise. |
Definition at line 801 of file rdkmediaplayer.cpp.
bool RDKMediaPlayer::getIsBlocked | ( | ) | const |
Returns the blocked status.
TRUE/FALSE | depending upon the status. |
Definition at line 814 of file rdkmediaplayer.cpp.
const gint64 & RDKMediaPlayer::getSetURLTime | ( | ) | const |
Returns the system monotonic time.
It is the value returned by g_get_monotonic_time()
Definition at line 819 of file rdkmediaplayer.cpp.
const gint64 & RDKMediaPlayer::getLoadStartTime | ( | ) | const |
Returns the value set using the function setLoadStartTime().
Definition at line 824 of file rdkmediaplayer.cpp.
const gint64 & RDKMediaPlayer::getPlayStartTime | ( | ) | const |
Returns the player start time.
Definition at line 829 of file rdkmediaplayer.cpp.
EventEmitter & RDKMediaPlayer::getEventEmitter | ( | ) |
This function is used to trigger the events.
Definition at line 834 of file rdkmediaplayer.cpp.
void RDKMediaPlayer::onVidHandleReceived | ( | uint32_t | handle | ) |
This API receives the decoder handle and updates the closedcaption state.
[in] | handle | Handle to check closedcaption is enabled or not. |
Definition at line 839 of file rdkmediaplayer.cpp.
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.
[in] | languages | Available AudioLanguages |
[in] | speeds | Available playback rates |
[in] | duration | Duration of the video |
[in] | width | Width of the video |
[in] | height | Heigt of the video |
Definition at line 846 of file rdkmediaplayer.cpp.