|
RDK Documentation (Open Sourced RDK Components)
|
21 #include "MockPlayerInstanceAAMP.h"
28 void PlayerInstanceAAMP::Tune(
const char *mainManifestUrl,
const char *contentType,
bool bFirstAttempt,
bool bFinalAttempt,
const char *traceUUID,
bool audioDecoderStreamSync) { }
29 void PlayerInstanceAAMP::Tune(
const char *mainManifestUrl,
bool autoPlay,
const char *contentType,
bool bFirstAttempt,
bool bFinalAttempt,
const char *traceUUID,
bool audioDecoderStreamSync) { }
105 void PlayerInstanceAAMP::SetAudioTrack(std::string language, std::string rendition, std::string type, std::string codec,
unsigned int channel, std::string label) { }
124 if (g_mockPlayerInstanceAAMP !=
nullptr)
void SetAsyncTuneConfig(bool bValue)
Set async tune configuration.
long GetInitialBitrate(void)
To get the initial bitrate value.
int GetInitialBufferDuration(void)
Get initial buffer duration in seconds.
void ApplyArtificialDownloadDelay(unsigned int DownloadDelayInMs)
to optionally configure simulated per-download network latency for negative testing
long GetMinimumBitrate(void)
Get minimum bitrate value.
long GetVideoBitrate(void)
To get the bitrate of current video profile.
void SetManifestTimeout(double timeout)
Optionally override default HLS main manifest download timeout with app-specific value.
std::string GetVideoRectangle()
Get the video window co-ordinates.
void SetRampDownLimit(int limit)
Set profile ramp down limit.
double GetPlaybackPosition(void)
To get the current playback position.
void SetPropagateUriParameters(bool bValue)
to configure URI parameters for fragment downloads
void EnableContentRestrictions()
Enable Content Restrictions - lock.
std::string GetTextTrackInfo()
Get current audio track index.
bool SetThumbnailTrack(int thumbIndex)
To set a preferred bitrate for thumbnail profile.
void SetBulkTimedMetaReport(bool bValue)
Set Bulk TimedMetadata Reporting flag.
void UnRegisterEvents(EventListener *eventListener)
UnRegister event handler.
void SetVideoZoom(VideoZoomMode zoom)
Set video zoom.
void SetSlowMotionPlayRate(float rate)
Set slow motion player speed.
void ManageAsyncTuneConfig(const char *url)
Manage async tune configuration for specific contents.
Class for sed event to Listener.
void SetNetworkProxy(const char *proxy)
To set the network proxy.
void SetLicenseCaching(bool bValue)
Set license caching.
bool InitAAMPConfig(char *jsonStr)
InitAAMPConfig - Initialize the media player session with json config.
void SetContentProtectionDataUpdateTimeout(int timeout)
To set default timeout for Dynamic ContentProtectionDataUpdate on Key Rotation.
DRMSystems GetPreferredDRM()
Get Preferred DRM.
bool IsLive()
To check whether the asset is live or not.
Types and APIs exposed by the AAMP player.
void SetStallTimeout(int timeoutMS)
To set the timeout value to be used for playback stall detection.
void SetSegmentDecryptFailCount(int value)
Set retry limit on Segment drm decryption failure.
void SetDownloadStartTimeout(long startTimeout)
To set the curl download start timeout.
int GetPlaybackRate(void)
To get the current playback rate.
void EnableSeekableRange(bool enabled)
Enable seekable range values in progress event.
int GetAudioTrack()
Get current audio track index.
void EnableAsyncOperation()
Enable async operation and initialize resources.
void SetPreferredSubtitleLanguage(const char *language)
Set preferred subtitle language.
void RemoveEventListener(AAMPEventType eventType, EventListener *eventListener)
Remove event listener for eventType.
void SetLicenseCustomData(const char *customData)
Set License Custom Data.
void SetVideoRectangle(int x, int y, int w, int h)
Set video rectangle.
void SubscribeResponseHeaders(std::vector< std::string > responseHeaders)
Subscribe array of http response headers.
void SetInitialBufferDuration(int durationSec)
Set initial buffer duration in seconds.
void AsyncStartStop()
Enable/Disable async operation.
void SetRepairIframes(bool configState)
To set the repairIframes flag.
const char * GetPreferredLanguages()
Get current preferred language list.
std::string GetPlaybackStats()
Get playback statistics formated for partner apps.
void XRESupportedTune(bool xreSupported)
To set whether the JS playback session is from XRE or not.
void SetUseAbsoluteTimeline(bool configState)
To set UseAbsoluteTimeline for DASH.
void PersistBitRateOverSeek(bool value)
Enable/disable configuration to persist ABR profile over seek/SAP.
void SetAnonymousRequest(bool isAnonymous)
Indicates if session token has to be used with license request or not.
int GetVideoZoom(void)
To get video zoom mode.
std::string GetAvailableVideoTracks()
Get available video tracks.
void SetAlternateContents(const std::string &adBreakId, const std::string &adId, const std::string &url)
Setting the alternate contents' (Ads/blackouts) URL.
void SetLicenseReqProxy(const char *licenseProxy)
To set the proxy for license request.
void SetVideoTracks(std::vector< long > bitrates)
Set video tracks.
void SetPreferredCodec(const char *codecList)
Set optional preferred codec list.
void AddEventListener(AAMPEventType eventType, EventListener *eventListener)
Support multiple listeners for multiple event type.
void SetLanguageFormat(LangCodePreference preferredFormat, bool useRole=false)
Set Language preferred Format.
void SetLinearTrickplayFPS(int linearTrickplayFPS)
Set Linear Trickplay FPS.
void SetTextTrack(int trackId, char *ccData=NULL)
Set text track.
void SetInitRampdownLimit(int limit)
Set Initial profile ramp down limit.
std::string GetAvailableAudioTracks(bool allTrack=false)
Get available audio tracks.
std::vector< long > GetVideoBitrates(void)
To get the available video bitrates.
void SetLanguage(const char *language)
Set Audio language.
VideoZoomMode
Video zoom mode.
void SetInitFragTimeoutRetryCount(int count)
To set the max retry attempts for init frag curl timeout failures.
void SetRuntimeDRMConfigSupport(bool DynamicDRMSupported)
To set Dynamic DRM feature by Application.
void SetLiveOffset4K(double liveoffset)
Set Live Offset.
const char * GetCurrentDRM()
Get current drm.
void SetNewAdBreakerConfig(bool bValue)
Configure New AdBreaker Enable/Disable.
void SetLiveOffset(double liveoffset)
Set Live Offset.
void SetReportVideoPTS(bool enabled)
Enable video PTS reporting in progress event.
void SetMaximumBitrate(long bitrate)
Set maximum bitrate value.
void SetVODTrickplayFPS(int vodTrickplayFPS)
Set VOD Trickplay FPS.
void Seek(double secondsRelativeToTuneTime, bool keepPaused=false)
Seek to a time.
long GetMaximumBitrate(void)
Get maximum bitrate value.
void UnloadJS(void *context)
void SetPausedBehavior(int behavior)
To set preferred paused state behavior.
void SetCCStatus(bool enabled)
Set CC visibility on/off.
void SetCEAFormat(int format)
Set the CEA format for force setting.
void SetParallelPlaylistDL(bool bValue)
Set parallel playlist download config value.
void SetPlaylistTimeout(double timeout)
Optionally override default HLS main manifest download timeout with app-specific value.
void SetAuxiliaryLanguage(const std::string &language)
Set auxiliary language.
void SetParallelPlaylistRefresh(bool bValue)
Set parallel playlist download config value for linear.
void SetDisable4K(bool value)
Disable 4K Support in player.
void PauseAt(double position)
Set PauseAt position.
std::string GetPreferredTextProperties()
Get preferred text prioperties.
void SetOutputResolutionCheck(bool bValue)
Set Display resolution check for video profile filtering.
std::string GetAudioTrackInfo()
Get current audio track index.
void SetStallErrorCode(int errorCode)
To set the error code to be used for playback stalled error.
bool GetCCStatus(void)
Get CC visibility on/off.
void SetDownloadBufferSize(int bufferSize)
To set the download buffer size value.
long GetInitialBitrate4k(void)
To get the initial bitrate value for 4K assets.
void ResetConfiguration()
API to reset configuration across tunes for single player instance.
void InsertAd(const char *url, double positionSeconds)
Schedule insertion of ad at given position.
void SetAudioVolume(int volume)
Set Audio Volume.
void detach()
Soft stop the player instance.
std::string GetPreferredAudioProperties()
Get preferred audio prioperties.
void SetSubtitleMute(bool muted)
Enable/ Disable Subtitle.
void ProcessContentProtectionDataConfig(const char *jsonbuffer)
void SetAvgBWForABR(bool useAvgBW)
Indicates average BW to be used for ABR Profiling.
void SetRate(float rate, int overshootcorrection=0)
Set playback rate.
void SetInitialBitrate(long bitrate)
To set the initial bitrate value.
const char * GetCurrentAudioLanguage()
Get current audio language.
void SetPreferredTextLanguages(const char *param)
Set optional preferred language list.
void SetSessionToken(std::string sessionToken)
Set the session token for player.
GStreamer Abstraction class for the implementation of AAMPGstPlayer and gstaamp plugin.
void Tune(const char *mainManifestUrl, const char *contentType, bool bFirstAttempt, bool bFinalAttempt, const char *traceUUID, bool audioDecoderStreamSync)
Tune to a URL. DEPRECATED! This is included for backwards compatibility with current Sky AS integrati...
void SetPreferredLanguages(const char *languageList, const char *preferredRendition=NULL, const char *preferredType=NULL, const char *codecList=NULL, const char *labelList=NULL)
Set optional preferred language list.
std::string GetThumbnails(double sduration, double eduration)
To get preferred thumbnails for the duration.
void SetAudioBitrate(long bitrate)
To set a preferred bitrate for audio profile.
double GetPlaybackDuration(void)
To get the current asset's duration.
void SetNetworkTimeout(double timeout)
To override default curl timeout for playlist/fragment downloads.
int GetTextTrack()
Get current text track index.
void SetPreferredDRM(DRMSystems drmType)
Set Preferred DRM.
long GetAudioBitrate(void)
To get the bitrate of current audio profile.
void SetMaxPlaylistCacheSize(int cacheSize)
Set Maximum Cache Size for storing playlist.
void LoadJS(void *context)
void SetRateAndSeek(int rate, double secondsRelativeToTuneTime)
Seek to a time and playback with a new rate.
void SetNativeCCRendering(bool enable)
Enable/disable the native CC rendering feature.
std::string GetAvailableTextTracks(bool allTrack=false)
Get available text tracks.
bool GetVideoMute(void)
To get video mute status.
void SetMatchingBaseUrlConfig(bool bValue)
Set Matching BaseUrl Config Configuration.
void EnableVideoRectangle(bool rectProperty)
Set video rectangle property.
std::vector< long > GetAudioBitrates(void)
To get the available audio bitrates.
void SetSegmentInjectFailCount(int value)
Set retry limit on Segment injection failure.
void SetRetuneForUnpairedDiscontinuity(bool bValue)
Set unpaired discontinuity retune flag.
void SetWesterosSinkConfig(bool bValue)
Set Westeros sink configuration.
void SetDownloadStallTimeout(long stallTimeout)
To set the curl stall timeout value.
int GetRampDownLimit(void)
Get profile ramp down limit.
AAMPEventType
Type of the events sending to the JSPP player.
std::string GetManifest(void)
To get the available manifest.
void SetAudioTrack(std::string language="", std::string rendition="", std::string type="", std::string codec="", unsigned int channel=0, std::string label="")
Set audio track.
std::string GetAvailableThumbnailTracks(void)
To get the available bitrates for thumbnails.
void SetStereoOnlyPlayback(bool bValue)
Set Stereo Only Playback.
void SetAppName(std::string name)
Set the application name which has created PlayerInstanceAAMP, for logging purposes.
void SetLicenseServerURL(const char *url, DRMSystems type=eDRM_MAX_DRMSystems)
Set License Server URL.
void DisableContentRestrictions(long grace, long time, bool eventChange)
Disable Content Restrictions - unlock.
void Stop(bool sendStateChangeEvent=true)
Stop playback and release resources.
void SetPreCacheTimeWindow(int nTimeWindow)
SetPreCacheTimeWindow Function to Set PreCache Time.
void SetVideoBitrate(long bitrate)
To set a preferred bitrate for video profile.
~PlayerInstanceAAMP()
PlayerInstanceAAMP Destructor.
void SetTextStyle(const std::string &options)
Set style options for text track rendering.
DRMSystems
DRM system types.
PlayerInstanceAAMP(StreamSink *streamSink=NULL, std::function< void(uint8_t *, int, int, int) > exportFrames=nullptr)
PlayerInstanceAAMP Constructor.
std::string GetAAMPConfig()
GetAAMPConfig - GetAamp Config as JSON string.
void SetDownloadLowBWTimeout(long lowBWTimeout)
To set the curl download low bandwidth timeout value.
std::string GetTextStyle()
Get style options for text track rendering.
void SeekToLive(bool keepPaused=false)
Seek to live point.
int GetAudioVolume(void)
To get the current audio volume.
void AddPageHeaders(std::map< std::string, std::string > customHttpHeaders)
Applies the custom http headers for page (Injector bundle) received from the js layer.
void SetPreferredRenditions(const char *renditionList)
Set optional preferred rendition list.
void SetSubscribedTags(std::vector< std::string > subscribedTags)
Set array of subscribed tags.
void SetMinimumBitrate(long bitrate)
Set minimum bitrate value.
void RegisterEvents(EventListener *eventListener)
Register event handler.
void AddCustomHTTPHeader(std::string headerName, std::vector< std::string > headerValue, bool isLicenseHeader=false)
Add/Remove a custom HTTP header and value.
void SetVideoMute(bool muted)
Enable/ Disable Video.
LangCodePreference
Language Code Preference types.
void SetTuneEventConfig(int tuneEventType)
To set the vod-tune-event according to the player.
void SetRetuneForGSTInternalError(bool bValue)
Set retune configuration for gstpipeline internal data stream error.
void SetReportInterval(int reportInterval)
To set the Playback Position reporting interval.
void SetNewABRConfig(bool bValue)
Configure New ABR Enable/Disable.
void SetPreferredLabels(const char *lableList)
Set optional preferred label list.
void SetInitialBitrate4K(long bitrate4K)
To set the initial bitrate value for 4K assets.
void SetSslVerifyPeerConfig(bool bValue)
Configure URI parameters.