|
RDK Documentation (Open Sourced RDK Components)
|
38 #ifndef RDKMEDIAPLAYER_H
39 #define RDKMEDIAPLAYER_H
47 #include "rdkmediaplayerimpl.h"
48 #ifndef DISABLE_CLOSEDCAPTIONS
49 #include "closedcaptions.h"
79 rtMethod4ArgAndNoReturn(
"setVideoRectangle",
setVideoRectangle, int32_t, int32_t, int32_t, int32_t);
80 rtMethodNoArgAndNoReturn(
"play",
play);
81 rtMethodNoArgAndNoReturn(
"pause",
pause);
82 rtMethodNoArgAndNoReturn(
"seekToLive",
seekToLive);
83 rtMethodNoArgAndNoReturn(
"stop",
stop);
84 rtMethod2ArgAndNoReturn(
"setSpeed",
changeSpeed,
float, int32_t);
88 rtMethod2ArgAndNoReturn(
"on",
setListener, rtString, rtFunctionRef);
89 rtMethod2ArgAndNoReturn(
"delListener",
delListener, rtString, rtFunctionRef);
90 rtMethodNoArgAndNoReturn(
"destroy",
destroy);
91 rtMethod1ArgAndReturn(
"open",
open, rtString, rtString);
92 rtMethod1ArgAndReturn(
"sendCASData",
sendCASData, rtString, rtString);
97 virtual void onInit();
196 rtError
speed(
float& t)
const;
216 rtError
volume(
float& t)
const;
238 rtError
blocked(rtString& t)
const;
261 rtError
autoPlay(rtString& t)
const;
307 rtError
zoom(rtString& t)
const;
317 rtError
setZoom(rtString
const& t);
673 rtError
setListener(rtString eventName,
const rtFunctionRef& f);
684 rtError
delListener(rtString eventName,
const rtFunctionRef& f);
706 rtError
open(rtString param, rtString resp);
780 rtError startQueuedTune();
781 void updateClosedCaptionsState();
783 std::vector<RDKMediaPlayerImpl*> m_playerCache;
785 #ifndef DISABLE_CLOSEDCAPTIONS
790 std::string m_currentURL;
791 std::string m_audioLanguage;
792 std::string m_secondaryAudioLanguage;
797 float m_videoBufferLength;
800 bool m_eissFilterStatus;
801 bool m_isInProgressRecording;
804 int32_t m_networkBufferSize;
805 int32_t m_overshootTime;
806 gint64 m_loadStartTime { 0 };
807 gint64 m_setURLTime { 0 };
808 gint64 m_playStartTime { 0 };
809 bool m_closedCaptionsEnabled;
810 std::map<std::string, std::string> m_closedCaptionsOptions;
811 std::string m_closedCaptionsTrack;
812 uint32_t m_vidDecoderHandle;
813 rtObjectRef m_contentOptions;
818 std::string m_availableAudioLanguages;
819 std::string m_availableClosedCaptionsLanguages;
820 std::string m_availableSpeeds;
822 #endif // _RT_AAMP_PLAYER_H_
rtError availableAudioLanguages(rtString &t) const
This method returns the languages available on the stream.
rtError delListener(rtString eventName, const rtFunctionRef &f)
This API deregisters the listeners associated with the event.
rtError duration(float &t) const
This API returns the duration of video in milliseconds.
rtError setIsInProgressRecording(rtString const &t)
This API is intended to set the recording state.
rtError closedCaptionsTrack(rtString &t) const
Returns the available closed caption tracks for this stream.
rtError tsbEnabled(rtString &t) const
This API returns true, if TSB is enabled for this resource.
rtError position(float &t) const
This API returns the current position details from the progress data.
bool getIsBlocked() const
Returns the blocked status.
rtError pause()
This API pause the stream and retain the playhead position.
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,...
rtError networkBufferSize(int32_t &t) const
This API returns the size of the buffer in milliseconds.
rtError setSecondaryAudioLanguage(rtString const &s)
This API is to set the secondary audio language.
rtError contentOptions(rtObjectRef &t) const
Returns the content options.
rtError setPosition(float const &t)
Moves the playhead to the absolute mediatime specified.
rtError requestStatus()
This API requests the onStatus event to be fired.
rtError setEissFilterStatus(rtString const &t)
This API is to enable/disable the EISS filter.
rtError zoom(rtString &t) const
This API returns either FULL" or "NONE".
rtError setNetworkBufferSize(int32_t const &t)
The API sets the network buffer size.
rtError secondaryAudioLanguage(rtString &s) const
Function returns the secondary audio language.
rtError setVideoRectangle(int32_t x, int32_t y, int32_t w, int32_t h)
API to draw a rectangle.
rtError setClosedCaptionsEnabled(rtString const &t)
This method allows close captioning to be enabled.
rtError setBlocked(rtString const &t)
This method will block the video and mute the audio if flag is true.
rtError setSpeed(float const &t)
This API is to set the playback rate.
rtError closedCaptionsEnabled(rtString &t) const
This API returns the closed caption status.
rtError setAudioLanguage(rtString const &s)
This API is to set the audio language to the player.
rtError availableClosedCaptionsLanguages(rtString &t) const
This API was supposed to return array of the available captions languages for this video.
rtError setPositionRelative(float seconds)
Sets the position of the video by adding the given number of seconds.
rtError setVideoBufferLength(float const &t)
This API is to set the range of buffered video.
rtError setLoadStartTime(int64_t const &t)
This API is to set the start time of the video.
const gint64 & getPlayStartTime() const
Returns the player start time.
rtError setVolume(float const &t)
This method sets the volume level for the player instance and is persisted across different URLs.
const gint64 & getLoadStartTime() const
Returns the value set using the function setLoadStartTime().
rtError volume(float &t) const
This API returns the current volume.
rtError blocked(rtString &t) const
This API is to check video is blocked or not.
rtError setCurrentURL(rtString const &s)
This API performs following functionalities.
void onVidHandleReceived(uint32_t handle)
This API receives the decoder handle and updates the closedcaption state.
rtError setClosedCaptionsOptions(rtObjectRef const &t)
Sets the close caption options to use when close captioning is enabled.
rtError currentURL(rtString &s) const
This API returns current playback URL.
rtError audioLanguage(rtString &s) const
This API returns the audio language selected.
rtError loadStartTime(int64_t &t) const
This API returns the start time of the video.
rtError setTsbEnabled(rtString const &t)
This API is to enable/disable TSB.
const gint64 & getSetURLTime() const
Returns the system monotonic time.
rtError setZoom(rtString const &t)
This API sets the value 0 or 1 depending on the argument "FULL" or "NONE".
rtError stop()
This API stops the stream and releases unnecessary resources.
rtError setClosedCaptionsTrack(rtString const &t)
Sets the caption track to be played when closedCaptionEnabled is true.
rtError play()
This API starts video playback.
rtError isInProgressRecording(rtString &t) const
This API is intended to check recording status.
rtError setAutoPlay(rtString const &t)
This API sets the auto play flag of the player.
EventEmitter & getEventEmitter()
This function is used to trigger the events.
rtError setAdditionalAuth(rtObjectRef const &t)
Sets additional auth data on the player that the player may need to continue playback.
rtError availableSpeeds(rtString &t) const
This API returns available playback rates for this video.
rtError changeSpeed(float speed, int32_t overshootTime)
This is an alternative to setting the speed property directly.
rtError speed(float &t) const
This API is to return current playback rate.
rtError open(rtString param, rtString resp)
Open the CAS Management Service Session for CMI.
rtError seekToLive()
Moves the playhead to the live position in the player.
rtError closedCaptionsOptions(rtObjectRef &t) const
Returns the list of supported closed caption options supported by this player.
rtError eissFilterStatus(rtString &t) const
This API checks EISS(ETV Integrated Signaling System) filter is enabled or not.
rtError sendCASData(rtString data, rtString resp)
Send the data to CAS System.
rtError destroy()
Request to destroy the video resource.
rtError autoPlay(rtString &t) const
This API indicates autoplay is enabled or not.
rtError setContentOptions(rtObjectRef const &t)
This API is to update the content option.
rtError setListener(rtString eventName, const rtFunctionRef &f)
Register an event listener for the specified event name.
rtError videoBufferLength(float &t) const
This API returns the size of the video buffer.