RDK Documentation (Open Sourced RDK Components)
PlayerInstanceAAMP Class Reference

Player interface class for the JS pluggin. More...

#include <main_aamp.h>

Inheritance diagram for PlayerInstanceAAMP:
Inheritance graph
Collaboration diagram for PlayerInstanceAAMP:
Collaboration graph

Public Member Functions

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

Data Fields

class PrivateInstanceAAMPaamp
 
std::shared_ptr< PrivateInstanceAAMPsp_aamp
 
AampConfig mConfig
 

Private Member Functions

bool IsValidRate (int rate)
 Check given rate is valid. More...
 
void TuneInternal (const char *mainManifestUrl, bool autoPlay, const char *contentType, bool bFirstAttempt, bool bFinalAttempt, const char *traceUUID, bool audioDecoderStreamSync)
 Tune to a URL. More...
 
void SetRateInternal (float rate, int overshootcorrection)
 Set playback rate - Internal function. More...
 
void PauseAtInternal (double secondsRelativeToTuneTime)
 Set PauseAt position - Internal function. More...
 
void SeekInternal (double secondsRelativeToTuneTime, bool keepPaused)
 Seek to a time - Internal function. More...
 
void SetAudioTrackInternal (std::string language, std::string rendition, std::string codec, std::string type, unsigned int channel, std::string label)
 Set audio track by audio parameters like language , rendition, codec etc.. More...
 
void SetAuxiliaryLanguageInternal (const std::string &language)
 Set auxiluerry track language. More...
 
void SetTextTrackInternal (int trackId, char *data)
 Set text track by Id. More...
 
void StopInternal (bool sendStateChangeEvent)
 Stop playback and release resources. More...
 

Private Attributes

StreamSinkmInternalStreamSink
 
void * mJSBinding_DL
 
bool mAsyncRunning
 
bool mAsyncTuneEnabled
 
AampScheduler mScheduler
 

Static Private Attributes

static std::mutex mPrvAampMtx
 

yes

Player interface class for the JS pluggin.

Definition at line 692 of file main_aamp.h.

Constructor & Destructor Documentation

◆ PlayerInstanceAAMP()

PlayerInstanceAAMP::PlayerInstanceAAMP ( const PlayerInstanceAAMP other)
delete

copy constructor

Parameters
otherobject to copy

Member Function Documentation

◆ operator=()

PlayerInstanceAAMP& PlayerInstanceAAMP::operator= ( const PlayerInstanceAAMP other)
delete

To overload = operator for copying.

Parameters
otherobject to copy

◆ Stop()

void PlayerInstanceAAMP::Stop ( bool  sendStateChangeEvent = true)

Stop playback and release resources.

Parameters
[in]sendStateChangeEvent- true if state change events need to be sent for Stop operation
Returns
void

Definition at line 282 of file main_aamp.cpp.

◆ ResetConfiguration()

void PlayerInstanceAAMP::ResetConfiguration ( )

API to reset configuration across tunes for single player instance.

Returns
void

Definition at line 264 of file main_aamp.cpp.

◆ SetRate()

void PlayerInstanceAAMP::SetRate ( float  rate,
int  overshootcorrection = 0 
)

Set playback rate.

Parameters
[in]rate- Rate of playback.
[in]overshootcorrection- overshoot correction in milliseconds.
Returns
void

Definition at line 561 of file main_aamp.cpp.

◆ PauseAt()

void PlayerInstanceAAMP::PauseAt ( double  position)

Set PauseAt position.

Any subsequent call to this method will override the previous call.
Parameters
[in]position- Absolute position within the asset for VOD or relative position from first tune command for linear content; a negative value would cancel any previous PauseAt call.
Returns
void

Definition at line 837 of file main_aamp.cpp.

◆ Seek()

void PlayerInstanceAAMP::Seek ( double  secondsRelativeToTuneTime,
bool  keepPaused = false 
)

Seek to a time.

Parameters
[in]secondsRelativeToTuneTime- Seek position for VOD, relative position from first tune command.
[in]keepPaused- set true if want to keep paused state after seek

Definition at line 971 of file main_aamp.cpp.

◆ SeekToLive()

void PlayerInstanceAAMP::SeekToLive ( bool  keepPaused = false)

Seek to live point.

Parameters
[in]keepPaused- set true if want to keep paused state after seek
Returns
void

Definition at line 1144 of file main_aamp.cpp.

◆ SetRateAndSeek()

void PlayerInstanceAAMP::SetRateAndSeek ( int  rate,
double  secondsRelativeToTuneTime 
)

Seek to a time and playback with a new rate.

Parameters
[in]rate- Rate of playback.
[in]secondsRelativeToTuneTime- Seek position for VOD, relative position from first tune command.
Returns
void

Definition at line 1202 of file main_aamp.cpp.

◆ SetSlowMotionPlayRate()

void PlayerInstanceAAMP::SetSlowMotionPlayRate ( float  rate)

Set slow motion player speed.

Parameters
[in]rate- Rate of playback.

Definition at line 1167 of file main_aamp.cpp.

◆ detach()

void PlayerInstanceAAMP::detach ( )

Soft stop the player instance.

Returns
void

Definition at line 385 of file main_aamp.cpp.

◆ RegisterEvents()

void PlayerInstanceAAMP::RegisterEvents ( EventListener eventListener)

Register event handler.

Parameters
[in]eventListener- pointer to implementation of EventListener to receive events.
Returns
void

Definition at line 403 of file main_aamp.cpp.

◆ UnRegisterEvents()

void PlayerInstanceAAMP::UnRegisterEvents ( EventListener eventListener)

UnRegister event handler.

Parameters
[in]eventListener- pointer to implementation of EventListener to receive events.
Returns
void

Definition at line 411 of file main_aamp.cpp.

◆ SetVideoRectangle()

void PlayerInstanceAAMP::SetVideoRectangle ( int  x,
int  y,
int  w,
int  h 
)

Set video rectangle.

Parameters
[in]x- horizontal start position.
[in]y- vertical start position.
[in]w- width.
[in]h- height.
Returns
void

Definition at line 1270 of file main_aamp.cpp.

◆ SetVideoZoom()

void PlayerInstanceAAMP::SetVideoZoom ( VideoZoomMode  zoom)

Set video zoom.

Parameters
[in]zoom- zoom mode.
Returns
void

Definition at line 1282 of file main_aamp.cpp.

◆ SetVideoMute()

void PlayerInstanceAAMP::SetVideoMute ( bool  muted)

Enable/ Disable Video.

Parameters
[in]muted- true to disable video, false to enable video.
Returns
void

Definition at line 1303 of file main_aamp.cpp.

◆ SetSubtitleMute()

void PlayerInstanceAAMP::SetSubtitleMute ( bool  muted)

Enable/ Disable Subtitle.

Enable/ Disable Subtitles.

Parameters
[in]muted- true to disable subtitle, false to enable subtitle.
Returns
void
Parameters
muted- true to disable subtitles, false to enable subtitles.

Definition at line 1338 of file main_aamp.cpp.

◆ SetAudioVolume()

void PlayerInstanceAAMP::SetAudioVolume ( int  volume)

Set Audio Volume.

Parameters
[in]volume- Minimum 0, maximum 100.
Returns
void
Parameters
volume- Minimum 0, maximum 100.

Definition at line 1361 of file main_aamp.cpp.

◆ SetLanguage()

void PlayerInstanceAAMP::SetLanguage ( const char *  language)

Set Audio language.

Parameters
[in]language- Language of audio track.
Returns
void

Definition at line 1389 of file main_aamp.cpp.

◆ SetSubscribedTags()

void PlayerInstanceAAMP::SetSubscribedTags ( std::vector< std::string >  subscribedTags)

Set array of subscribed tags.

Parameters
[in]subscribedTags- Array of subscribed tags.
Returns
void

Definition at line 1415 of file main_aamp.cpp.

◆ SubscribeResponseHeaders()

void PlayerInstanceAAMP::SubscribeResponseHeaders ( std::vector< std::string >  responseHeaders)

Subscribe array of http response headers.

Parameters
responseHeaders- Array of response headers.
Returns
void

Definition at line 1430 of file main_aamp.cpp.

◆ LoadJS()

void PlayerInstanceAAMP::LoadJS ( void *  context)
Parameters
[in]context- JS context.
Returns
void

Definition at line 49 of file FakePlayerInstanceAamp.cpp.

◆ UnloadJS()

void PlayerInstanceAAMP::UnloadJS ( void *  context)
Parameters
[in]context- JS context.
Returns
void

Definition at line 50 of file FakePlayerInstanceAamp.cpp.

◆ AddEventListener()

void PlayerInstanceAAMP::AddEventListener ( AAMPEventType  eventType,
EventListener eventListener 
)

Support multiple listeners for multiple event type.

Parameters
[in]eventType- type of event.
[in]eventListener- listener for the eventType.
Returns
void

Definition at line 1483 of file main_aamp.cpp.

◆ RemoveEventListener()

void PlayerInstanceAAMP::RemoveEventListener ( AAMPEventType  eventType,
EventListener eventListener 
)

Remove event listener for eventType.

Parameters
[in]eventType- type of event.
[in]eventListener- listener to be removed for the eventType.
Returns
void

Definition at line 1493 of file main_aamp.cpp.

◆ IsLive()

bool PlayerInstanceAAMP::IsLive ( )

To check whether the asset is live or not.

Returns
bool - True if live content, false otherwise

Definition at line 1503 of file main_aamp.cpp.

◆ IsJsInfoLoggingEnabled()

PlayerInstanceAAMP::IsJsInfoLoggingEnabled ( )

Get jsinfo config value (default false)

Returns
bool - True if jsinfo is enabled, false otherwise

Definition at line 1514 of file main_aamp.cpp.

◆ InsertAd()

void PlayerInstanceAAMP::InsertAd ( const char *  url,
double  positionSeconds 
)

Schedule insertion of ad at given position.

Parameters
[in]url- HTTP/HTTPS url of the ad
[in]positionSeconds- position at which ad shall be inserted
Returns
void

Definition at line 53 of file FakePlayerInstanceAamp.cpp.

◆ GetCurrentAudioLanguage()

const char * PlayerInstanceAAMP::GetCurrentAudioLanguage ( )

Get current audio language.

Returns
const char* - current audio language

Definition at line 1523 of file main_aamp.cpp.

◆ GetCurrentDRM()

const char * PlayerInstanceAAMP::GetCurrentDRM ( )

Get current drm.

Returns
char* - current drm

Definition at line 1547 of file main_aamp.cpp.

◆ AddPageHeaders()

void PlayerInstanceAAMP::AddPageHeaders ( std::map< std::string, std::string >  customHttpHeaders)

Applies the custom http headers for page (Injector bundle) received from the js layer.

Parameters
customHttpHeaders- customHttpHeaders map of custom http headers
Returns
void

Definition at line 1563 of file main_aamp.cpp.

◆ AddCustomHTTPHeader()

void PlayerInstanceAAMP::AddCustomHTTPHeader ( std::string  headerName,
std::vector< std::string >  headerValue,
bool  isLicenseHeader = false 
)

Add/Remove a custom HTTP header and value.

Parameters
[in]headerName- Name of custom HTTP header
[in]headerValue- Value to be pased along with HTTP header.
[in]isLicenseHeader- true if header is to be used for license HTTP requests
Returns
void

Definition at line 1579 of file main_aamp.cpp.

◆ SetLicenseServerURL()

void PlayerInstanceAAMP::SetLicenseServerURL ( const char *  url,
DRMSystems  type = eDRM_MAX_DRMSystems 
)

Set License Server URL.

Parameters
[in]url- URL of the server to be used for license requests
[in]type- DRM Type(PR/WV) for which the server URL should be used, global by default
Returns
void

Definition at line 1590 of file main_aamp.cpp.

◆ SetPreferredDRM()

void PlayerInstanceAAMP::SetPreferredDRM ( DRMSystems  drmType)

Set Preferred DRM.

Parameters
[in]drmType- Preferred DRM type
Returns
void

Definition at line 2027 of file main_aamp.cpp.

◆ GetPreferredDRM()

DRMSystems PlayerInstanceAAMP::GetPreferredDRM ( )

Get Preferred DRM.

Returns
Preferred DRM type

Definition at line 2379 of file main_aamp.cpp.

◆ SetStereoOnlyPlayback()

void PlayerInstanceAAMP::SetStereoOnlyPlayback ( bool  bValue)

Set Stereo Only Playback.

Parameters
[in]bValue- disable EC3/ATMOS if the value is true
Returns
void

Definition at line 2044 of file main_aamp.cpp.

◆ SetBulkTimedMetaReport()

void PlayerInstanceAAMP::SetBulkTimedMetaReport ( bool  bValue)

Set Bulk TimedMetadata Reporting flag.

Parameters
[in]bValue- if true Bulk event reporting enabled
Returns
void

Definition at line 2079 of file main_aamp.cpp.

◆ SetRetuneForUnpairedDiscontinuity()

void PlayerInstanceAAMP::SetRetuneForUnpairedDiscontinuity ( bool  bValue)

Set unpaired discontinuity retune flag.

Parameters
[in]bValue- true if unpaired discontinuity retune set
Returns
void

Definition at line 2088 of file main_aamp.cpp.

◆ SetRetuneForGSTInternalError()

void PlayerInstanceAAMP::SetRetuneForGSTInternalError ( bool  bValue)

Set retune configuration for gstpipeline internal data stream error.

Parameters
[in]bValue- true if gst internal error retune set
Returns
void

Definition at line 2097 of file main_aamp.cpp.

◆ SetAnonymousRequest()

void PlayerInstanceAAMP::SetAnonymousRequest ( bool  isAnonymous)

Indicates if session token has to be used with license request or not.

Parameters
[in]isAnonymous- True if session token should be blank and false otherwise.
Returns
void

Definition at line 1620 of file main_aamp.cpp.

◆ SetAvgBWForABR()

void PlayerInstanceAAMP::SetAvgBWForABR ( bool  useAvgBW)

Indicates average BW to be used for ABR Profiling.

Parameters
useAvgBW- Flag for true / false

Definition at line 1629 of file main_aamp.cpp.

◆ SetPreCacheTimeWindow()

void PlayerInstanceAAMP::SetPreCacheTimeWindow ( int  nTimeWindow)

SetPreCacheTimeWindow Function to Set PreCache Time.

Parameters
nTimeWindowTime in minutes - Max PreCache Time
Returns
void

Definition at line 1637 of file main_aamp.cpp.

◆ SetVODTrickplayFPS()

void PlayerInstanceAAMP::SetVODTrickplayFPS ( int  vodTrickplayFPS)

Set VOD Trickplay FPS.

Parameters
[in]vodTrickplayFPS- FPS to be used for VOD Trickplay
Returns
void

Definition at line 1646 of file main_aamp.cpp.

◆ SetLinearTrickplayFPS()

void PlayerInstanceAAMP::SetLinearTrickplayFPS ( int  linearTrickplayFPS)

Set Linear Trickplay FPS.

Parameters
[in]linearTrickplayFPS- FPS to be used for Linear Trickplay
Returns
void

Definition at line 1655 of file main_aamp.cpp.

◆ SetLiveOffset()

void PlayerInstanceAAMP::SetLiveOffset ( double  liveoffset)

Set Live Offset.

Parameters
[in]liveoffset-Live Offset
Returns
void

Definition at line 1664 of file main_aamp.cpp.

◆ SetLiveOffset4K()

void PlayerInstanceAAMP::SetLiveOffset4K ( double  liveoffset)

Set Live Offset.

Parameters
[in]liveoffset-Live Offset
Returns
void

Definition at line 1674 of file main_aamp.cpp.

◆ SetStallErrorCode()

void PlayerInstanceAAMP::SetStallErrorCode ( int  errorCode)

To set the error code to be used for playback stalled error.

Parameters
[in]errorCode- error code for playback stall errors.
Returns
void

Definition at line 1684 of file main_aamp.cpp.

◆ SetStallTimeout()

void PlayerInstanceAAMP::SetStallTimeout ( int  timeoutMS)

To set the timeout value to be used for playback stall detection.

Parameters
[in]timeoutMS- timeout in milliseconds for playback stall detection.
Returns
void

Definition at line 1693 of file main_aamp.cpp.

◆ SetReportInterval()

void PlayerInstanceAAMP::SetReportInterval ( int  reportInterval)

To set the Playback Position reporting interval.

Parameters
reportInterval- playback reporting interval in milliSeconds.
Returns
void

Definition at line 1702 of file main_aamp.cpp.

◆ SetInitFragTimeoutRetryCount()

void PlayerInstanceAAMP::SetInitFragTimeoutRetryCount ( int  count)

To set the max retry attempts for init frag curl timeout failures.

Parameters
count- max attempt for timeout retry count
Returns
void

Definition at line 1718 of file main_aamp.cpp.

◆ GetPlaybackPosition()

double PlayerInstanceAAMP::GetPlaybackPosition ( void  )

To get the current playback position.

Returns
current playback position in seconds

Definition at line 1729 of file main_aamp.cpp.

◆ GetPlaybackDuration()

double PlayerInstanceAAMP::GetPlaybackDuration ( void  )

To get the current asset's duration.

Returns
duration in seconds

Definition at line 1738 of file main_aamp.cpp.

◆ GetId()

PlayerInstanceAAMP::GetId ( void  )
Returns
returns unique id of player,

Definition at line 1750 of file main_aamp.cpp.

◆ GetState()

PlayerInstanceAAMP::GetState ( void  )

To get the current AAMP state.

Returns
current AAMP state

Definition at line 1765 of file main_aamp.cpp.

◆ GetVideoBitrate()

long PlayerInstanceAAMP::GetVideoBitrate ( void  )

To get the bitrate of current video profile.

Returns
bitrate of video profile

Definition at line 1787 of file main_aamp.cpp.

◆ SetVideoBitrate()

void PlayerInstanceAAMP::SetVideoBitrate ( long  bitrate)

To set a preferred bitrate for video profile.

Parameters
[in]bitratepreferred bitrate for video profile

Definition at line 1805 of file main_aamp.cpp.

◆ GetAudioBitrate()

long PlayerInstanceAAMP::GetAudioBitrate ( void  )

To get the bitrate of current audio profile.

Returns
bitrate of audio profile

Definition at line 1826 of file main_aamp.cpp.

◆ SetAudioBitrate()

void PlayerInstanceAAMP::SetAudioBitrate ( long  bitrate)

To set a preferred bitrate for audio profile.

Parameters
[in]bitratepreferred bitrate for audio profile

Definition at line 1844 of file main_aamp.cpp.

◆ GetVideoZoom()

int PlayerInstanceAAMP::GetVideoZoom ( void  )

To get video zoom mode.

Returns
video zoom mode

Definition at line 1852 of file main_aamp.cpp.

◆ GetVideoMute()

bool PlayerInstanceAAMP::GetVideoMute ( void  )

To get video mute status.

Returns
video mute status

Definition at line 1861 of file main_aamp.cpp.

◆ GetAudioVolume()

int PlayerInstanceAAMP::GetAudioVolume ( void  )

To get the current audio volume.

Returns
audio volume

Definition at line 1870 of file main_aamp.cpp.

◆ GetPlaybackRate()

int PlayerInstanceAAMP::GetPlaybackRate ( void  )

To get the current playback rate.

Returns
current playback rate

Definition at line 1884 of file main_aamp.cpp.

◆ GetVideoBitrates()

std::vector< long > PlayerInstanceAAMP::GetVideoBitrates ( void  )

To get the available video bitrates.

Returns
available video bitrates

Definition at line 1893 of file main_aamp.cpp.

◆ GetManifest()

std::string PlayerInstanceAAMP::GetManifest ( void  )

To get the available manifest.

Returns
available manifest

Definition at line 1911 of file main_aamp.cpp.

◆ GetAudioBitrates()

std::vector< long > PlayerInstanceAAMP::GetAudioBitrates ( void  )

To get the available audio bitrates.

Returns
available audio bitrates

Definition at line 1935 of file main_aamp.cpp.

◆ SetInitialBitrate()

void PlayerInstanceAAMP::SetInitialBitrate ( long  bitrate)

To set the initial bitrate value.

Parameters
[in]bitrateinitial bitrate to be selected
Returns
void

Definition at line 1953 of file main_aamp.cpp.

◆ GetInitialBitrate()

long PlayerInstanceAAMP::GetInitialBitrate ( void  )

To get the initial bitrate value.

Returns
initial bitrate value.

Definition at line 1962 of file main_aamp.cpp.

◆ SetInitialBitrate4K()

void PlayerInstanceAAMP::SetInitialBitrate4K ( long  bitrate4K)

To set the initial bitrate value for 4K assets.

Parameters
[in]bitrate4Kinitial bitrate to be selected for 4K assets.
Returns
void

Definition at line 1972 of file main_aamp.cpp.

◆ GetInitialBitrate4k()

long PlayerInstanceAAMP::GetInitialBitrate4k ( void  )

To get the initial bitrate value for 4K assets.

Returns
initial bitrate value for 4k assets

Definition at line 1981 of file main_aamp.cpp.

◆ SetNetworkTimeout()

void PlayerInstanceAAMP::SetNetworkTimeout ( double  timeout)

To override default curl timeout for playlist/fragment downloads.

Parameters
[in]timeoutpreferred timeout value
Returns
void

Definition at line 1991 of file main_aamp.cpp.

◆ SetManifestTimeout()

void PlayerInstanceAAMP::SetManifestTimeout ( double  timeout)

Optionally override default HLS main manifest download timeout with app-specific value.

Parameters
[in]timeoutpreferred timeout value
Returns
void

Definition at line 2000 of file main_aamp.cpp.

◆ SetPlaylistTimeout()

void PlayerInstanceAAMP::SetPlaylistTimeout ( double  timeout)

Optionally override default HLS main manifest download timeout with app-specific value.

Parameters
[in]timeoutpreferred timeout value
Returns
void

Definition at line 2009 of file main_aamp.cpp.

◆ SetDownloadBufferSize()

void PlayerInstanceAAMP::SetDownloadBufferSize ( int  bufferSize)

To set the download buffer size value.

Parameters
[in]bufferSizepreferred download buffer size
Returns
void

Definition at line 2018 of file main_aamp.cpp.

◆ SetNetworkProxy()

void PlayerInstanceAAMP::SetNetworkProxy ( const char *  proxy)

To set the network proxy.

Parameters
[in]proxynetwork proxy to use
Returns
void

Definition at line 2115 of file main_aamp.cpp.

◆ SetLicenseReqProxy()

void PlayerInstanceAAMP::SetLicenseReqProxy ( const char *  licenseProxy)

To set the proxy for license request.

Parameters
[in]licenseProxyproxy to use for license request
Returns
void

Definition at line 2124 of file main_aamp.cpp.

◆ SetDownloadStallTimeout()

void PlayerInstanceAAMP::SetDownloadStallTimeout ( long  stallTimeout)

To set the curl stall timeout value.

Parameters
[in]stallTimeoutcurl stall timeout value
Returns
void

Definition at line 2133 of file main_aamp.cpp.

◆ SetDownloadStartTimeout()

void PlayerInstanceAAMP::SetDownloadStartTimeout ( long  startTimeout)

To set the curl download start timeout.

Parameters
[in]startTimeoutcurl download start timeout
Returns
void

Definition at line 2145 of file main_aamp.cpp.

◆ SetDownloadLowBWTimeout()

void PlayerInstanceAAMP::SetDownloadLowBWTimeout ( long  lowBWTimeout)

To set the curl download low bandwidth timeout value.

Parameters
[in]lowBWTimeoutcurl download low bandwidth timeout
Returns
void

Definition at line 2157 of file main_aamp.cpp.

◆ SetPreferredSubtitleLanguage()

void PlayerInstanceAAMP::SetPreferredSubtitleLanguage ( const char *  language)

Set preferred subtitle language.

Parameters
[in]language- Language of text track.
Returns
void

Definition at line 2169 of file main_aamp.cpp.

◆ SetAlternateContents()

void PlayerInstanceAAMP::SetAlternateContents ( const std::string &  adBreakId,
const std::string &  adId,
const std::string &  url 
)

Setting the alternate contents' (Ads/blackouts) URL.

Parameters
[in]adBreakIdAdbreak's unique identifier.
[in]adIdIndividual Ad's id
[in]urlAd URL
Returns
void

Definition at line 2106 of file main_aamp.cpp.

◆ SetParallelPlaylistDL()

void PlayerInstanceAAMP::SetParallelPlaylistDL ( bool  bValue)

Set parallel playlist download config value.

Parameters
[in]bValue- true if a/v playlist to be downloaded in parallel
Returns
void

Definition at line 2192 of file main_aamp.cpp.

◆ ManageAsyncTuneConfig()

void PlayerInstanceAAMP::ManageAsyncTuneConfig ( const char *  url)

Manage async tune configuration for specific contents.

Parameters
[in]url- main manifest url
Returns
void

Definition at line 2760 of file main_aamp.cpp.

◆ SetAsyncTuneConfig()

void PlayerInstanceAAMP::SetAsyncTuneConfig ( bool  bValue)

Set async tune configuration.

Parameters
[in]bValue- true if async tune enabled
Returns
void

Definition at line 2773 of file main_aamp.cpp.

◆ SetParallelPlaylistRefresh()

void PlayerInstanceAAMP::SetParallelPlaylistRefresh ( bool  bValue)

Set parallel playlist download config value for linear.

Parameters
[in]bValue- true if a/v playlist to be downloaded in parallel
Returns
void

Definition at line 2201 of file main_aamp.cpp.

◆ SetWesterosSinkConfig()

void PlayerInstanceAAMP::SetWesterosSinkConfig ( bool  bValue)

Set Westeros sink configuration.

Parameters
[in]bValue- true if westeros sink enabled
Returns
void

Definition at line 2210 of file main_aamp.cpp.

◆ SetLicenseCaching()

void PlayerInstanceAAMP::SetLicenseCaching ( bool  bValue)

Set license caching.

Parameters
[in]bValue- true/false to enable/disable license caching
Returns
void

Definition at line 2218 of file main_aamp.cpp.

◆ SetOutputResolutionCheck()

void PlayerInstanceAAMP::SetOutputResolutionCheck ( bool  bValue)

Set Display resolution check for video profile filtering.

Parameters
[in]bValue- true/false to enable/disable profile filtering by display resoluton
Returns
void

Definition at line 2227 of file main_aamp.cpp.

◆ SetMatchingBaseUrlConfig()

void PlayerInstanceAAMP::SetMatchingBaseUrlConfig ( bool  bValue)

Set Matching BaseUrl Config Configuration.

Parameters
[in]bValue- true if Matching BaseUrl enabled
Returns
void

Definition at line 2235 of file main_aamp.cpp.

◆ SetPropagateUriParameters()

void PlayerInstanceAAMP::SetPropagateUriParameters ( bool  bValue)

to configure URI parameters for fragment downloads

Parameters
[in]bValue- default value: true
Returns
void

Definition at line 2254 of file main_aamp.cpp.

◆ ApplyArtificialDownloadDelay()

void PlayerInstanceAAMP::ApplyArtificialDownloadDelay ( unsigned int  DownloadDelayInMs)

to optionally configure simulated per-download network latency for negative testing

Parameters
[in]DownloadDelayInMs- default value: zero
Returns
void

Definition at line 2262 of file main_aamp.cpp.

◆ SetSslVerifyPeerConfig()

void PlayerInstanceAAMP::SetSslVerifyPeerConfig ( bool  bValue)

Configure URI parameters.

Parameters
[in]bValue- default value: false
Returns
void

Definition at line 2273 of file main_aamp.cpp.

◆ SetNewABRConfig()

void PlayerInstanceAAMP::SetNewABRConfig ( bool  bValue)

Configure New ABR Enable/Disable.

Parameters
[in]bValue- true if new ABR enabled
Returns
void

Definition at line 2243 of file main_aamp.cpp.

◆ SetNewAdBreakerConfig()

void PlayerInstanceAAMP::SetNewAdBreakerConfig ( bool  bValue)

Configure New AdBreaker Enable/Disable.

Parameters
[in]bValue- true if new AdBreaker enabled
Returns
void

Definition at line 2400 of file main_aamp.cpp.

◆ GetAvailableVideoTracks()

std::string PlayerInstanceAAMP::GetAvailableVideoTracks ( )

Get available video tracks.

Returns
std::string JSON formatted list of video tracks

Definition at line 2410 of file main_aamp.cpp.

◆ SetVideoTracks()

void PlayerInstanceAAMP::SetVideoTracks ( std::vector< long >  bitrates)

Set video tracks.

Parameters
[in]bitrate- video bitrate list
Returns
void

Definition at line 2420 of file main_aamp.cpp.

◆ GetAvailableAudioTracks()

std::string PlayerInstanceAAMP::GetAvailableAudioTracks ( bool  allTrack = false)

Get available audio tracks.

Returns
std::string JSON formatted list of audio tracks

Definition at line 2428 of file main_aamp.cpp.

◆ GetAvailableTextTracks()

std::string PlayerInstanceAAMP::GetAvailableTextTracks ( bool  allTrack = false)

Get available text tracks.

Returns
std::string JSON formatted list of text tracks

Definition at line 2460 of file main_aamp.cpp.

◆ GetVideoRectangle()

std::string PlayerInstanceAAMP::GetVideoRectangle ( )

Get the video window co-ordinates.

Returns
current video co-ordinates in x,y,w,h format

Definition at line 2470 of file main_aamp.cpp.

◆ SetAppName()

void PlayerInstanceAAMP::SetAppName ( std::string  name)

Set the application name which has created PlayerInstanceAAMP, for logging purposes.

Returns
void

Definition at line 2480 of file main_aamp.cpp.

◆ SetPreferredLanguages()

void PlayerInstanceAAMP::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.

Parameters
[in]languageList- string with comma-delimited language list in ISO-639 from most to least preferred: "lang1,lang2". Set NULL to clear current list.
[in]preferredRendition- preferred rendition from role
[in]preferredType- preferred accessibility type
[in]codecList- string with comma-delimited codec list from most to least preferred: "codec1,codec2". Set NULL to clear current list.
[in]labelList- string with comma-delimited label list from most to least preferred: "label1,label2". Set NULL to clear current list.
Returns
void

Definition at line 2363 of file main_aamp.cpp.

◆ SetPreferredTextLanguages()

void PlayerInstanceAAMP::SetPreferredTextLanguages ( const char *  param)

Set optional preferred language list.

Parameters
[in]languageList- string with comma-delimited language list in ISO-639
Returns
void

Definition at line 2371 of file main_aamp.cpp.

◆ SetPreferredCodec()

void PlayerInstanceAAMP::SetPreferredCodec ( const char *  codecList)

Set optional preferred codec list.

Parameters
[in]codecList- string with array with codec list
Returns
void

Definition at line 2321 of file main_aamp.cpp.

◆ SetPreferredLabels()

void PlayerInstanceAAMP::SetPreferredLabels ( const char *  lableList)

Set optional preferred label list.

Parameters
[in]lableList- string with array with label list
Returns
void

Definition at line 2329 of file main_aamp.cpp.

◆ SetPreferredRenditions()

void PlayerInstanceAAMP::SetPreferredRenditions ( const char *  renditionList)

Set optional preferred rendition list.

Parameters
[in]renditionList- string with comma-delimited rendition list in ISO-639 from most to least preferred. Set NULL to clear current list.
Returns
void

Definition at line 2337 of file main_aamp.cpp.

◆ GetPreferredLanguages()

const char * PlayerInstanceAAMP::GetPreferredLanguages ( )

Get current preferred language list.

Returns
const char* - current comma-delimited language list or NULL if not set

Definition at line 2387 of file main_aamp.cpp.

◆ SetTuneEventConfig()

void PlayerInstanceAAMP::SetTuneEventConfig ( int  tuneEventType)

To set the vod-tune-event according to the player.

Parameters
[in]tuneEventTypepreferred tune event type

Definition at line 2498 of file main_aamp.cpp.

◆ EnableVideoRectangle()

void PlayerInstanceAAMP::EnableVideoRectangle ( bool  rectProperty)

Set video rectangle property.

Parameters
[in]rectPropertyvideo rectangle property

Definition at line 2506 of file main_aamp.cpp.

◆ SetRampDownLimit()

void PlayerInstanceAAMP::SetRampDownLimit ( int  limit)

Set profile ramp down limit.

Returns
void

Definition at line 462 of file main_aamp.cpp.

◆ GetRampDownLimit()

int PlayerInstanceAAMP::GetRampDownLimit ( void  )

Get profile ramp down limit.

Returns
rampdownlimit config value

Definition at line 470 of file main_aamp.cpp.

◆ SetInitRampdownLimit()

void PlayerInstanceAAMP::SetInitRampdownLimit ( int  limit)

Set Initial profile ramp down limit.

Returns
void

Definition at line 2658 of file main_aamp.cpp.

◆ SetMinimumBitrate()

void PlayerInstanceAAMP::SetMinimumBitrate ( long  bitrate)

Set minimum bitrate value.

Returns
void

Definition at line 494 of file main_aamp.cpp.

◆ GetMinimumBitrate()

long PlayerInstanceAAMP::GetMinimumBitrate ( void  )

Get minimum bitrate value.

Returns
Minimum bitrate value

Definition at line 511 of file main_aamp.cpp.

◆ SetMaximumBitrate()

void PlayerInstanceAAMP::SetMaximumBitrate ( long  bitrate)

Set maximum bitrate value.

Returns
void

Definition at line 521 of file main_aamp.cpp.

◆ GetMaximumBitrate()

long PlayerInstanceAAMP::GetMaximumBitrate ( void  )

Get maximum bitrate value.

Returns
Max bit rate value

Definition at line 537 of file main_aamp.cpp.

◆ SetSegmentInjectFailCount()

void PlayerInstanceAAMP::SetSegmentInjectFailCount ( int  value)

Set retry limit on Segment injection failure.

Returns
void

Definition at line 419 of file main_aamp.cpp.

◆ SetSegmentDecryptFailCount()

void PlayerInstanceAAMP::SetSegmentDecryptFailCount ( int  value)

Set retry limit on Segment drm decryption failure.

Returns
void

Definition at line 427 of file main_aamp.cpp.

◆ SetInitialBufferDuration()

void PlayerInstanceAAMP::SetInitialBufferDuration ( int  durationSec)

Set initial buffer duration in seconds.

Returns
void

Definition at line 435 of file main_aamp.cpp.

◆ GetInitialBufferDuration()

int PlayerInstanceAAMP::GetInitialBufferDuration ( void  )

Get initial buffer duration in seconds.

Returns
int - Initial Buffer Duration

Definition at line 444 of file main_aamp.cpp.

◆ SetNativeCCRendering()

void PlayerInstanceAAMP::SetNativeCCRendering ( bool  enable)

Enable/disable the native CC rendering feature.

Parameters
[in]enable- true for native CC rendering on
Returns
void

Definition at line 2488 of file main_aamp.cpp.

◆ GetAudioTrack()

int PlayerInstanceAAMP::GetAudioTrack ( )

Get current audio track index.

Returns
int - index of current audio track in available track list

Definition at line 2556 of file main_aamp.cpp.

◆ GetAudioTrackInfo()

std::string PlayerInstanceAAMP::GetAudioTrackInfo ( )

Get current audio track index.

Returns
int - index of current audio track in available track list

Definition at line 2438 of file main_aamp.cpp.

◆ GetTextTrackInfo()

std::string PlayerInstanceAAMP::GetTextTrackInfo ( )

Get current audio track index.

Returns
int - index of current audio track in available track list

Definition at line 2448 of file main_aamp.cpp.

◆ GetPreferredAudioProperties()

std::string PlayerInstanceAAMP::GetPreferredAudioProperties ( )

Get preferred audio prioperties.

Returns
json string

Definition at line 2345 of file main_aamp.cpp.

◆ GetPreferredTextProperties()

std::string PlayerInstanceAAMP::GetPreferredTextProperties ( )

Get preferred text prioperties.

Returns
text preferred proprties in json format

Definition at line 2355 of file main_aamp.cpp.

◆ SetTextTrack()

void PlayerInstanceAAMP::SetTextTrack ( int  trackId,
char *  ccData = NULL 
)

Set text track.

Parameters
[in]trackId- index of text track in available track list
[in]ccData- subtitle data from application.
Returns
void

Definition at line 2566 of file main_aamp.cpp.

◆ GetTextTrack()

int PlayerInstanceAAMP::GetTextTrack ( )

Get current text track index.

Returns
int - index of current text track in available track list

Definition at line 2610 of file main_aamp.cpp.

◆ SetCCStatus()

void PlayerInstanceAAMP::SetCCStatus ( bool  enabled)

Set CC visibility on/off.

Parameters
[in]enabled- true for CC on, false otherwise
Returns
void

Definition at line 2620 of file main_aamp.cpp.

◆ GetCCStatus()

bool PlayerInstanceAAMP::GetCCStatus ( void  )

Get CC visibility on/off.

Returns
bool true (enabled) else false(disabled)

Definition at line 2630 of file main_aamp.cpp.

◆ SetTextStyle()

void PlayerInstanceAAMP::SetTextStyle ( const std::string &  options)

Set style options for text track rendering.

Parameters
[in]options- JSON formatted style options
Returns
void

Definition at line 2638 of file main_aamp.cpp.

◆ GetTextStyle()

std::string PlayerInstanceAAMP::GetTextStyle ( )

Get style options for text track rendering.

Returns
std::string - JSON formatted style options

Definition at line 2648 of file main_aamp.cpp.

◆ SetLanguageFormat()

void PlayerInstanceAAMP::SetLanguageFormat ( LangCodePreference  preferredFormat,
bool  useRole = false 
)

Set Language preferred Format.

Parameters
[in]preferredFormat- one of LangCodePreference
[in]useRole- if enabled, the language in format <lang>-<role> if <role> attribute available in stream
Returns
void

Definition at line 480 of file main_aamp.cpp.

◆ SetCEAFormat()

void PlayerInstanceAAMP::SetCEAFormat ( int  format)

Set the CEA format for force setting.

Parameters
[in]format- 0 for 608, 1 for 708
Returns
void

Definition at line 2667 of file main_aamp.cpp.

◆ SetSessionToken()

void PlayerInstanceAAMP::SetSessionToken ( std::string  sessionToken)

Set the session token for player.

Parameters
[in]

Definition at line 2712 of file main_aamp.cpp.

◆ SetMaxPlaylistCacheSize()

void PlayerInstanceAAMP::SetMaxPlaylistCacheSize ( int  cacheSize)

Set Maximum Cache Size for storing playlist.

Parameters
cacheSizesize of cache to store
Returns
void

Definition at line 454 of file main_aamp.cpp.

◆ EnableSeekableRange()

void PlayerInstanceAAMP::EnableSeekableRange ( bool  enabled)

Enable seekable range values in progress event.

Parameters
[in]enabled- true if enabled

Definition at line 2724 of file main_aamp.cpp.

◆ SetReportVideoPTS()

void PlayerInstanceAAMP::SetReportVideoPTS ( bool  enabled)

Enable video PTS reporting in progress event.

Parameters
[in]enabled- true if enabled

Definition at line 2733 of file main_aamp.cpp.

◆ SetDisable4K()

void PlayerInstanceAAMP::SetDisable4K ( bool  value)

Disable 4K Support in player.

Parameters
[in]value- disabled if true
Returns
void

Definition at line 2069 of file main_aamp.cpp.

◆ DisableContentRestrictions()

void PlayerInstanceAAMP::DisableContentRestrictions ( long  grace,
long  time,
bool  eventChange 
)

Disable Content Restrictions - unlock.

Parameters
[in]grace- seconds from current time, grace period, grace = -1 will allow an unlimited grace period
[in]time- seconds from current time,time till which the channel need to be kept unlocked
[in]eventChange- disable restriction handling till next program event boundary
Returns
void

Definition at line 2742 of file main_aamp.cpp.

◆ EnableContentRestrictions()

void PlayerInstanceAAMP::EnableContentRestrictions ( )

Enable Content Restrictions - lock.

Returns
void

Definition at line 2751 of file main_aamp.cpp.

◆ AsyncStartStop()

void PlayerInstanceAAMP::AsyncStartStop ( )

Enable/Disable async operation.

Returns
void

Definition at line 2784 of file main_aamp.cpp.

◆ PersistBitRateOverSeek()

void PlayerInstanceAAMP::PersistBitRateOverSeek ( bool  value)

Enable/disable configuration to persist ABR profile over seek/SAP.

Parameters
[in]value- To enable/disable configuration
Returns
void

Definition at line 2808 of file main_aamp.cpp.

◆ GetAvailableThumbnailTracks()

std::string PlayerInstanceAAMP::GetAvailableThumbnailTracks ( void  )

To get the available bitrates for thumbnails.

Returns
bitrate of thumbnail track.

Definition at line 2678 of file main_aamp.cpp.

◆ SetThumbnailTrack()

bool PlayerInstanceAAMP::SetThumbnailTrack ( int  thumbIndex)

To set a preferred bitrate for thumbnail profile.

Parameters
[in]thumbIndexpreferred bitrate for thumbnail profile

Definition at line 2687 of file main_aamp.cpp.

◆ GetThumbnails()

std::string PlayerInstanceAAMP::GetThumbnails ( double  sduration,
double  eduration 
)

To get preferred thumbnails for the duration.

Parameters
[in]edurationduration for thumbnails

Definition at line 2703 of file main_aamp.cpp.

◆ SetPausedBehavior()

void PlayerInstanceAAMP::SetPausedBehavior ( int  behavior)

To set preferred paused state behavior.

Parameters
[in]behaviorpaused behavior

Definition at line 2850 of file main_aamp.cpp.

◆ SetUseAbsoluteTimeline()

void PlayerInstanceAAMP::SetUseAbsoluteTimeline ( bool  configState)

To set UseAbsoluteTimeline for DASH.

Parameters
[in]configStatebool enable/disable configuration

Definition at line 2865 of file main_aamp.cpp.

◆ XRESupportedTune()

void PlayerInstanceAAMP::XRESupportedTune ( bool  xreSupported)

To set whether the JS playback session is from XRE or not.

Parameters
[in]xreSupportedbool On/Off

Definition at line 2935 of file main_aamp.cpp.

◆ EnableAsyncOperation()

void PlayerInstanceAAMP::EnableAsyncOperation ( )

Enable async operation and initialize resources.

Returns
void

Definition at line 143 of file FakePlayerInstanceAamp.cpp.

◆ SetRepairIframes()

void PlayerInstanceAAMP::SetRepairIframes ( bool  configState)

To set the repairIframes flag.

Parameters
[in]configStatebool enable/disable configuration

Definition at line 2875 of file main_aamp.cpp.

◆ SetAuxiliaryLanguage()

void PlayerInstanceAAMP::SetAuxiliaryLanguage ( const std::string &  language)

Set auxiliary language.

Parameters
[in]language- auxiliary language
Returns
void

Definition at line 2944 of file main_aamp.cpp.

◆ SetLicenseCustomData()

void PlayerInstanceAAMP::SetLicenseCustomData ( const char *  customData)

Set License Custom Data.

Parameters
[in]customData- custom data string to be passed to the license server.
Returns
void

Definition at line 3007 of file main_aamp.cpp.

◆ SetContentProtectionDataUpdateTimeout()

void PlayerInstanceAAMP::SetContentProtectionDataUpdateTimeout ( int  timeout)

To set default timeout for Dynamic ContentProtectionDataUpdate on Key Rotation.

To set the dynamic drm update on key rotation timeout value.

Parameters
[in]preferredtimeout value

Definition at line 3163 of file main_aamp.cpp.

◆ ProcessContentProtectionDataConfig()

void PlayerInstanceAAMP::ProcessContentProtectionDataConfig ( const char *  jsonbuffer)
Parameters
jsonbufferReceived DRM config for content protection data update event

Definition at line 3026 of file main_aamp.cpp.

◆ IsOOBCCRenderingSupported()

PlayerInstanceAAMP::IsOOBCCRenderingSupported ( )
Returns
bool, True if Out of Band Closed caption/subtitle rendering supported

Definition at line 3183 of file main_aamp.cpp.

◆ GetPlaybackStats()

std::string PlayerInstanceAAMP::GetPlaybackStats ( )

Get playback statistics formated for partner apps.

Returns
json string reperesenting the stats

Definition at line 3016 of file main_aamp.cpp.

◆ IsValidRate()

PlayerInstanceAAMP::IsValidRate ( int  rate)
private

Check given rate is valid.

Parameters
[in]rate- Rate of playback.
Return values
returntrue if the given rate is valid.

Definition at line 547 of file main_aamp.cpp.

◆ TuneInternal()

PlayerInstanceAAMP::TuneInternal ( const char *  mainManifestUrl,
bool  autoPlay,
const char *  contentType,
bool  bFirstAttempt,
bool  bFinalAttempt,
const char *  traceUUID,
bool  audioDecoderStreamSync 
)
private

Tune to a URL.

Parameters
mainManifestUrl- HTTP/HTTPS url to be played.
[in]autoPlay- Start playback immediately or not
contentType- content Type.

Definition at line 351 of file main_aamp.cpp.

◆ SetRateInternal()

PlayerInstanceAAMP::SetRateInternal ( float  rate,
int  overshootcorrection 
)
private

Set playback rate - Internal function.

Parameters
rate- Rate of playback.
overshootcorrection- overshoot correction in milliseconds.

Definition at line 591 of file main_aamp.cpp.

◆ PauseAtInternal()

PlayerInstanceAAMP::PauseAtInternal ( double  secondsRelativeToTuneTime)
private

Set PauseAt position - Internal function.

Parameters
[in]secondsRelativeToTuneTime- Relative position from first tune command.

Definition at line 859 of file main_aamp.cpp.

◆ SeekInternal()

PlayerInstanceAAMP::SeekInternal ( double  secondsRelativeToTuneTime,
bool  keepPaused 
)
private

Seek to a time - Internal function.

Parameters
secondsRelativeToTuneTime- Seek position for VOD, relative position from first tune command.
keepPaused- set true if want to keep paused state after seek

Definition at line 996 of file main_aamp.cpp.

◆ SetAudioTrackInternal()

PlayerInstanceAAMP::SetAudioTrackInternal ( std::string  language,
std::string  rendition,
std::string  codec,
std::string  type,
unsigned int  channel,
std::string  label 
)
private

Set audio track by audio parameters like language , rendition, codec etc..

Parameters
[in]language,rendition,codec,channel
Returns
void

Definition at line 2306 of file main_aamp.cpp.

◆ SetAuxiliaryLanguageInternal()

PlayerInstanceAAMP::SetAuxiliaryLanguageInternal ( const std::string &  language)
private

Set auxiluerry track language.

Parameters
[in]

Definition at line 2965 of file main_aamp.cpp.

◆ SetTextTrackInternal()

PlayerInstanceAAMP::SetTextTrackInternal ( int  trackId,
char *  data 
)
private

Set text track by Id.

Parameters
[in]trackId
[in]data
Returns
void

Definition at line 2598 of file main_aamp.cpp.

◆ StopInternal()

PlayerInstanceAAMP::StopInternal ( bool  sendStateChangeEvent)
private

Stop playback and release resources.

Parameters
[in]sendStateChangeEvent- true if state change events need to be sent for Stop operation
Returns
void

Definition at line 2818 of file main_aamp.cpp.

Field Documentation

◆ aamp

class PrivateInstanceAAMP* PlayerInstanceAAMP::aamp

AAMP player's private instance

Definition at line 1943 of file main_aamp.h.

◆ sp_aamp

std::shared_ptr<PrivateInstanceAAMP> PlayerInstanceAAMP::sp_aamp

shared pointer for aamp resource

Definition at line 1944 of file main_aamp.h.

◆ mInternalStreamSink

StreamSink* PlayerInstanceAAMP::mInternalStreamSink
private

Pointer to stream sink

Definition at line 2021 of file main_aamp.h.

◆ mJSBinding_DL

void* PlayerInstanceAAMP::mJSBinding_DL
private

Handle to AAMP plugin dynamic lib.

Definition at line 2022 of file main_aamp.h.

◆ mPrvAampMtx

std::mutex PlayerInstanceAAMP::mPrvAampMtx
staticprivate

Mutex to protect aamp instance in GetState()

Definition at line 2023 of file main_aamp.h.

◆ mAsyncRunning

bool PlayerInstanceAAMP::mAsyncRunning
private

Flag denotes if async mode is on or not

Definition at line 2024 of file main_aamp.h.

◆ mAsyncTuneEnabled

bool PlayerInstanceAAMP::mAsyncTuneEnabled
private

Flag indicating async tune status

Definition at line 2025 of file main_aamp.h.


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