RDK Documentation (Open Sourced RDK Components)
FakePlayerInstanceAamp.cpp
1 /*
2 * If not stated otherwise in this file or this component's license file the
3 * following copyright and licenses apply:
4 *
5 * Copyright 2022 RDK Management
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License") { }
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19 
20 #include "main_aamp.h"
21 #include "MockPlayerInstanceAAMP.h"
22 
23 MockPlayerInstanceAAMP *g_mockPlayerInstanceAAMP = nullptr;
24 
25  PlayerInstanceAAMP::PlayerInstanceAAMP(StreamSink* streamSink, std::function< void(uint8_t *, int, int, int) > exportFrames) { }
27 
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) { }
30  void PlayerInstanceAAMP::Stop(bool sendStateChangeEvent) { }
32  void PlayerInstanceAAMP::SetRate(float rate, int overshootcorrection) { }
33  void PlayerInstanceAAMP::PauseAt(double position) { }
34  void PlayerInstanceAAMP::Seek(double secondsRelativeToTuneTime, bool keepPaused) { }
35  void PlayerInstanceAAMP::SeekToLive(bool keepPaused) { }
36  void PlayerInstanceAAMP::SetRateAndSeek(int rate, double secondsRelativeToTuneTime) { }
37  void PlayerInstanceAAMP::SetSlowMotionPlayRate (float rate ) { }
39  void PlayerInstanceAAMP::RegisterEvents(EventListener* eventListener) { }
41  void PlayerInstanceAAMP::SetVideoRectangle(int x, int y, int w, int h) { }
43  void PlayerInstanceAAMP::SetVideoMute(bool muted) { }
44  void PlayerInstanceAAMP::SetSubtitleMute(bool muted) { }
45  void PlayerInstanceAAMP::SetAudioVolume(int volume) { }
46  void PlayerInstanceAAMP::SetLanguage(const char* language) { }
47  void PlayerInstanceAAMP::SetSubscribedTags(std::vector<std::string> subscribedTags) { }
48  void PlayerInstanceAAMP::SubscribeResponseHeaders(std::vector<std::string> responseHeaders) { }
49  void PlayerInstanceAAMP::LoadJS(void* context) { }
50  void PlayerInstanceAAMP::UnloadJS(void* context) { }
51  void PlayerInstanceAAMP::AddEventListener(AAMPEventType eventType, EventListener* eventListener) { }
52  void PlayerInstanceAAMP::RemoveEventListener(AAMPEventType eventType, EventListener* eventListener) { }
53  void PlayerInstanceAAMP::InsertAd(const char *url, double positionSeconds) { }
54  void PlayerInstanceAAMP::AddPageHeaders(std::map<std::string, std::string> customHttpHeaders) { }
55  void PlayerInstanceAAMP::AddCustomHTTPHeader(std::string headerName, std::vector<std::string> headerValue, bool isLicenseHeader) { }
56  void PlayerInstanceAAMP::SetLicenseServerURL(const char *url, DRMSystems type) { }
58  void PlayerInstanceAAMP::SetStereoOnlyPlayback(bool bValue) { }
59  void PlayerInstanceAAMP::SetBulkTimedMetaReport(bool bValue) { }
62  void PlayerInstanceAAMP::SetAnonymousRequest(bool isAnonymous) { }
63  void PlayerInstanceAAMP::SetAvgBWForABR(bool useAvgBW) { }
64  void PlayerInstanceAAMP::SetPreCacheTimeWindow(int nTimeWindow) { }
65  void PlayerInstanceAAMP::SetVODTrickplayFPS(int vodTrickplayFPS) { }
66  void PlayerInstanceAAMP::SetLinearTrickplayFPS(int linearTrickplayFPS) { }
67  void PlayerInstanceAAMP::SetLiveOffset(double liveoffset) { }
68  void PlayerInstanceAAMP::SetLiveOffset4K(double liveoffset) { }
69  void PlayerInstanceAAMP::SetStallErrorCode(int errorCode) { }
70  void PlayerInstanceAAMP::SetStallTimeout(int timeoutMS) { }
71  void PlayerInstanceAAMP::SetReportInterval(int reportInterval) { }
73  void PlayerInstanceAAMP::SetVideoBitrate(long bitrate) { }
74  void PlayerInstanceAAMP::SetAudioBitrate(long bitrate) { }
75  void PlayerInstanceAAMP::SetInitialBitrate(long bitrate) { }
76  void PlayerInstanceAAMP::SetInitialBitrate4K(long bitrate4K) { }
77  void PlayerInstanceAAMP::SetNetworkTimeout(double timeout) { }
78  void PlayerInstanceAAMP::SetManifestTimeout(double timeout) { }
79  void PlayerInstanceAAMP::SetPlaylistTimeout(double timeout) { }
80  void PlayerInstanceAAMP::SetDownloadBufferSize(int bufferSize) { }
81  void PlayerInstanceAAMP::SetNetworkProxy(const char * proxy) { }
82  void PlayerInstanceAAMP::SetLicenseReqProxy(const char * licenseProxy) { }
83  void PlayerInstanceAAMP::SetDownloadStallTimeout(long stallTimeout) { }
84  void PlayerInstanceAAMP::SetDownloadStartTimeout(long startTimeout) { }
85  void PlayerInstanceAAMP::SetDownloadLowBWTimeout(long lowBWTimeout) { }
86  void PlayerInstanceAAMP::SetPreferredSubtitleLanguage(const char* language) { }
87  void PlayerInstanceAAMP::SetAlternateContents(const std::string &adBreakId, const std::string &adId, const std::string &url) { }
88  void PlayerInstanceAAMP::SetParallelPlaylistDL(bool bValue) { }
89  void PlayerInstanceAAMP::ManageAsyncTuneConfig(const char* url) { }
90  void PlayerInstanceAAMP::SetAsyncTuneConfig(bool bValue) { }
92  void PlayerInstanceAAMP::SetWesterosSinkConfig(bool bValue) { }
93  void PlayerInstanceAAMP::SetLicenseCaching(bool bValue) { }
97  void PlayerInstanceAAMP::ApplyArtificialDownloadDelay(unsigned int DownloadDelayInMs) { }
98  void PlayerInstanceAAMP::SetSslVerifyPeerConfig(bool bValue) { }
99  void PlayerInstanceAAMP::SetNewABRConfig(bool bValue) { }
100  void PlayerInstanceAAMP::SetNewAdBreakerConfig(bool bValue) { }
101  void PlayerInstanceAAMP::SetVideoTracks(std::vector<long> bitrates) { }
102  void PlayerInstanceAAMP::SetAppName(std::string name) { }
103  void PlayerInstanceAAMP::SetPreferredLanguages(const char* languageList, const char *preferredRendition, const char *preferredType, const char* codecList, const char* labelList) { }
104  void PlayerInstanceAAMP::SetPreferredTextLanguages(const char* param) { }
105  void PlayerInstanceAAMP::SetAudioTrack(std::string language, std::string rendition, std::string type, std::string codec, unsigned int channel, std::string label) { }
106  void PlayerInstanceAAMP::SetPreferredCodec(const char *codecList) { }
107  void PlayerInstanceAAMP::SetPreferredLabels(const char *lableList) { }
108  void PlayerInstanceAAMP::SetPreferredRenditions(const char *renditionList) { }
109  void PlayerInstanceAAMP::SetTuneEventConfig(int tuneEventType) { }
110  void PlayerInstanceAAMP::EnableVideoRectangle(bool rectProperty) { }
111  void PlayerInstanceAAMP::SetRampDownLimit(int limit) { }
112  void PlayerInstanceAAMP::SetInitRampdownLimit(int limit) { }
113  void PlayerInstanceAAMP::SetMinimumBitrate(long bitrate) { }
114  void PlayerInstanceAAMP::SetMaximumBitrate(long bitrate) { }
117  void PlayerInstanceAAMP::SetInitialBufferDuration(int durationSec) { }
118  void PlayerInstanceAAMP::SetNativeCCRendering(bool enable) { }
119  void PlayerInstanceAAMP::SetAudioTrack(int trackId) { }
120  void PlayerInstanceAAMP::SetTextTrack(int trackId, char *ccData) { }
121  void PlayerInstanceAAMP::SetCCStatus(bool enabled) { }
122  void PlayerInstanceAAMP::SetTextStyle(const std::string &options)
123  {
124  if (g_mockPlayerInstanceAAMP != nullptr)
125  {
126  g_mockPlayerInstanceAAMP->SetTextStyle(options);
127  }
128  }
129  void PlayerInstanceAAMP::SetLanguageFormat(LangCodePreference preferredFormat, bool useRole) { }
130  void PlayerInstanceAAMP::SetCEAFormat(int format) { }
131  void PlayerInstanceAAMP::SetSessionToken(std::string sessionToken) { }
132  void PlayerInstanceAAMP::SetMaxPlaylistCacheSize(int cacheSize) { }
133  void PlayerInstanceAAMP::EnableSeekableRange(bool enabled) { }
134  void PlayerInstanceAAMP::SetReportVideoPTS(bool enabled) { }
135  void PlayerInstanceAAMP::SetDisable4K(bool value) { }
136  void PlayerInstanceAAMP::DisableContentRestrictions(long grace, long time, bool eventChange) { }
139  void PlayerInstanceAAMP::PersistBitRateOverSeek(bool value) { }
140  void PlayerInstanceAAMP::SetPausedBehavior(int behavior) { }
141  void PlayerInstanceAAMP::SetUseAbsoluteTimeline(bool configState) { }
142  void PlayerInstanceAAMP::XRESupportedTune(bool xreSupported) { }
144  void PlayerInstanceAAMP::SetRepairIframes(bool configState) { }
145  void PlayerInstanceAAMP::SetAuxiliaryLanguage(const std::string &language) { }
146  void PlayerInstanceAAMP::SetLicenseCustomData(const char *customData) { }
148  void PlayerInstanceAAMP::ProcessContentProtectionDataConfig(const char *jsonbuffer) { }
149  void PlayerInstanceAAMP::SetRuntimeDRMConfigSupport(bool DynamicDRMSupported) { }
150  bool PlayerInstanceAAMP::IsLive() { return false; }
151  bool PlayerInstanceAAMP::GetVideoMute(void) { return false; }
152  bool PlayerInstanceAAMP::GetCCStatus(void) { return false; }
153  bool PlayerInstanceAAMP::SetThumbnailTrack(int thumbIndex) { return false; }
154  bool PlayerInstanceAAMP::InitAAMPConfig(char *jsonStr) { return false; }
155  int PlayerInstanceAAMP::GetVideoZoom(void) { return 0; }
156  int PlayerInstanceAAMP::GetAudioVolume(void) { return 0; }
157  int PlayerInstanceAAMP::GetPlaybackRate(void) { return 0; }
158  int PlayerInstanceAAMP::GetRampDownLimit(void) { return 0; }
159  int PlayerInstanceAAMP::GetInitialBufferDuration(void) { return 0; }
160  int PlayerInstanceAAMP::GetAudioTrack() { return 0; }
161  int PlayerInstanceAAMP::GetTextTrack() { return 0; }
162  long PlayerInstanceAAMP::GetVideoBitrate(void) { return 0; }
163  long PlayerInstanceAAMP::GetAudioBitrate(void) { return 0; }
164  long PlayerInstanceAAMP::GetInitialBitrate(void) { return 0; }
165  long PlayerInstanceAAMP::GetInitialBitrate4k(void) { return 0; }
166  long PlayerInstanceAAMP::GetMinimumBitrate(void) { return 0; }
167  long PlayerInstanceAAMP::GetMaximumBitrate(void) { return 0; }
168  double PlayerInstanceAAMP::GetPlaybackPosition(void) { return 0; }
169  double PlayerInstanceAAMP::GetPlaybackDuration(void) { return 0; }
170  const char* PlayerInstanceAAMP::GetCurrentAudioLanguage() { return ""; }
171  const char* PlayerInstanceAAMP::GetCurrentDRM() { return ""; }
172  const char* PlayerInstanceAAMP::GetPreferredLanguages() { return ""; }
174  std::vector<long> PlayerInstanceAAMP::GetVideoBitrates(void) { static std::vector<long> temp; return temp; }
175  std::vector<long> PlayerInstanceAAMP::GetAudioBitrates(void) { static std::vector<long> temp; return temp; }
176  std::string PlayerInstanceAAMP::GetManifest(void) { return nullptr; }
177  std::string PlayerInstanceAAMP::GetAvailableVideoTracks() { return nullptr; }
178  std::string PlayerInstanceAAMP::GetAvailableAudioTracks(bool allTrack) { return nullptr; }
179  std::string PlayerInstanceAAMP::GetAvailableTextTracks(bool allTrack) { return nullptr; }
180  std::string PlayerInstanceAAMP::GetVideoRectangle() { return nullptr; }
181  std::string PlayerInstanceAAMP::GetAudioTrackInfo() { return nullptr; }
182  std::string PlayerInstanceAAMP::GetTextTrackInfo() { return nullptr; }
183  std::string PlayerInstanceAAMP::GetPreferredAudioProperties() { return nullptr; }
184  std::string PlayerInstanceAAMP::GetPreferredTextProperties() { return nullptr; }
185  std::string PlayerInstanceAAMP::GetTextStyle() { return nullptr; }
186  std::string PlayerInstanceAAMP::GetAvailableThumbnailTracks(void) { return nullptr; }
187  std::string PlayerInstanceAAMP::GetThumbnails(double sduration, double eduration) { return nullptr; }
188  std::string PlayerInstanceAAMP::GetAAMPConfig() { return nullptr; }
189  std::string PlayerInstanceAAMP::GetPlaybackStats() { return nullptr; }
PlayerInstanceAAMP::SetAsyncTuneConfig
void SetAsyncTuneConfig(bool bValue)
Set async tune configuration.
Definition: main_aamp.cpp:2773
PlayerInstanceAAMP::GetInitialBitrate
long GetInitialBitrate(void)
To get the initial bitrate value.
Definition: main_aamp.cpp:1962
PlayerInstanceAAMP::GetInitialBufferDuration
int GetInitialBufferDuration(void)
Get initial buffer duration in seconds.
Definition: main_aamp.cpp:444
PlayerInstanceAAMP::ApplyArtificialDownloadDelay
void ApplyArtificialDownloadDelay(unsigned int DownloadDelayInMs)
to optionally configure simulated per-download network latency for negative testing
Definition: main_aamp.cpp:2262
PlayerInstanceAAMP::GetMinimumBitrate
long GetMinimumBitrate(void)
Get minimum bitrate value.
Definition: main_aamp.cpp:511
PlayerInstanceAAMP::GetVideoBitrate
long GetVideoBitrate(void)
To get the bitrate of current video profile.
Definition: main_aamp.cpp:1787
PlayerInstanceAAMP::SetManifestTimeout
void SetManifestTimeout(double timeout)
Optionally override default HLS main manifest download timeout with app-specific value.
Definition: main_aamp.cpp:2000
PlayerInstanceAAMP::GetVideoRectangle
std::string GetVideoRectangle()
Get the video window co-ordinates.
Definition: main_aamp.cpp:2470
PlayerInstanceAAMP::SetRampDownLimit
void SetRampDownLimit(int limit)
Set profile ramp down limit.
Definition: main_aamp.cpp:462
PlayerInstanceAAMP::GetPlaybackPosition
double GetPlaybackPosition(void)
To get the current playback position.
Definition: main_aamp.cpp:1729
PlayerInstanceAAMP::SetPropagateUriParameters
void SetPropagateUriParameters(bool bValue)
to configure URI parameters for fragment downloads
Definition: main_aamp.cpp:2254
PlayerInstanceAAMP::EnableContentRestrictions
void EnableContentRestrictions()
Enable Content Restrictions - lock.
Definition: main_aamp.cpp:2751
PlayerInstanceAAMP::GetTextTrackInfo
std::string GetTextTrackInfo()
Get current audio track index.
Definition: main_aamp.cpp:2448
PlayerInstanceAAMP::SetThumbnailTrack
bool SetThumbnailTrack(int thumbIndex)
To set a preferred bitrate for thumbnail profile.
Definition: main_aamp.cpp:2687
PlayerInstanceAAMP::SetBulkTimedMetaReport
void SetBulkTimedMetaReport(bool bValue)
Set Bulk TimedMetadata Reporting flag.
Definition: main_aamp.cpp:2079
PlayerInstanceAAMP::UnRegisterEvents
void UnRegisterEvents(EventListener *eventListener)
UnRegister event handler.
Definition: main_aamp.cpp:411
PlayerInstanceAAMP::SetVideoZoom
void SetVideoZoom(VideoZoomMode zoom)
Set video zoom.
Definition: main_aamp.cpp:1282
PlayerInstanceAAMP::SetSlowMotionPlayRate
void SetSlowMotionPlayRate(float rate)
Set slow motion player speed.
Definition: main_aamp.cpp:1167
PlayerInstanceAAMP::ManageAsyncTuneConfig
void ManageAsyncTuneConfig(const char *url)
Manage async tune configuration for specific contents.
Definition: main_aamp.cpp:2760
EventListener
Class for sed event to Listener.
Definition: AampEventListener.h:35
PlayerInstanceAAMP::SetNetworkProxy
void SetNetworkProxy(const char *proxy)
To set the network proxy.
Definition: main_aamp.cpp:2115
PlayerInstanceAAMP::SetLicenseCaching
void SetLicenseCaching(bool bValue)
Set license caching.
Definition: main_aamp.cpp:2218
PlayerInstanceAAMP::InitAAMPConfig
bool InitAAMPConfig(char *jsonStr)
InitAAMPConfig - Initialize the media player session with json config.
Definition: main_aamp.cpp:2885
PlayerInstanceAAMP::SetContentProtectionDataUpdateTimeout
void SetContentProtectionDataUpdateTimeout(int timeout)
To set default timeout for Dynamic ContentProtectionDataUpdate on Key Rotation.
Definition: main_aamp.cpp:3163
PlayerInstanceAAMP::GetPreferredDRM
DRMSystems GetPreferredDRM()
Get Preferred DRM.
Definition: main_aamp.cpp:2379
PlayerInstanceAAMP::IsLive
bool IsLive()
To check whether the asset is live or not.
Definition: main_aamp.cpp:1503
main_aamp.h
Types and APIs exposed by the AAMP player.
PlayerInstanceAAMP::SetStallTimeout
void SetStallTimeout(int timeoutMS)
To set the timeout value to be used for playback stall detection.
Definition: main_aamp.cpp:1693
PlayerInstanceAAMP::SetSegmentDecryptFailCount
void SetSegmentDecryptFailCount(int value)
Set retry limit on Segment drm decryption failure.
Definition: main_aamp.cpp:427
PlayerInstanceAAMP::SetDownloadStartTimeout
void SetDownloadStartTimeout(long startTimeout)
To set the curl download start timeout.
Definition: main_aamp.cpp:2145
PlayerInstanceAAMP::GetPlaybackRate
int GetPlaybackRate(void)
To get the current playback rate.
Definition: main_aamp.cpp:1884
PlayerInstanceAAMP::EnableSeekableRange
void EnableSeekableRange(bool enabled)
Enable seekable range values in progress event.
Definition: main_aamp.cpp:2724
PlayerInstanceAAMP::GetAudioTrack
int GetAudioTrack()
Get current audio track index.
Definition: main_aamp.cpp:2556
PlayerInstanceAAMP::EnableAsyncOperation
void EnableAsyncOperation()
Enable async operation and initialize resources.
Definition: FakePlayerInstanceAamp.cpp:143
PlayerInstanceAAMP::SetPreferredSubtitleLanguage
void SetPreferredSubtitleLanguage(const char *language)
Set preferred subtitle language.
Definition: main_aamp.cpp:2169
PlayerInstanceAAMP::RemoveEventListener
void RemoveEventListener(AAMPEventType eventType, EventListener *eventListener)
Remove event listener for eventType.
Definition: main_aamp.cpp:1493
PlayerInstanceAAMP::SetLicenseCustomData
void SetLicenseCustomData(const char *customData)
Set License Custom Data.
Definition: main_aamp.cpp:3007
PlayerInstanceAAMP::SetVideoRectangle
void SetVideoRectangle(int x, int y, int w, int h)
Set video rectangle.
Definition: main_aamp.cpp:1270
PlayerInstanceAAMP::SubscribeResponseHeaders
void SubscribeResponseHeaders(std::vector< std::string > responseHeaders)
Subscribe array of http response headers.
Definition: main_aamp.cpp:1430
PlayerInstanceAAMP::SetInitialBufferDuration
void SetInitialBufferDuration(int durationSec)
Set initial buffer duration in seconds.
Definition: main_aamp.cpp:435
PlayerInstanceAAMP::AsyncStartStop
void AsyncStartStop()
Enable/Disable async operation.
Definition: main_aamp.cpp:2784
PlayerInstanceAAMP::SetRepairIframes
void SetRepairIframes(bool configState)
To set the repairIframes flag.
Definition: main_aamp.cpp:2875
PlayerInstanceAAMP::GetPreferredLanguages
const char * GetPreferredLanguages()
Get current preferred language list.
Definition: main_aamp.cpp:2387
PlayerInstanceAAMP::GetPlaybackStats
std::string GetPlaybackStats()
Get playback statistics formated for partner apps.
Definition: main_aamp.cpp:3016
PlayerInstanceAAMP::XRESupportedTune
void XRESupportedTune(bool xreSupported)
To set whether the JS playback session is from XRE or not.
Definition: main_aamp.cpp:2935
PlayerInstanceAAMP::SetUseAbsoluteTimeline
void SetUseAbsoluteTimeline(bool configState)
To set UseAbsoluteTimeline for DASH.
Definition: main_aamp.cpp:2865
PlayerInstanceAAMP::PersistBitRateOverSeek
void PersistBitRateOverSeek(bool value)
Enable/disable configuration to persist ABR profile over seek/SAP.
Definition: main_aamp.cpp:2808
PlayerInstanceAAMP::SetAnonymousRequest
void SetAnonymousRequest(bool isAnonymous)
Indicates if session token has to be used with license request or not.
Definition: main_aamp.cpp:1620
PlayerInstanceAAMP::GetVideoZoom
int GetVideoZoom(void)
To get video zoom mode.
Definition: main_aamp.cpp:1852
PlayerInstanceAAMP::GetAvailableVideoTracks
std::string GetAvailableVideoTracks()
Get available video tracks.
Definition: main_aamp.cpp:2410
PlayerInstanceAAMP::SetAlternateContents
void SetAlternateContents(const std::string &adBreakId, const std::string &adId, const std::string &url)
Setting the alternate contents' (Ads/blackouts) URL.
Definition: main_aamp.cpp:2106
PlayerInstanceAAMP::SetLicenseReqProxy
void SetLicenseReqProxy(const char *licenseProxy)
To set the proxy for license request.
Definition: main_aamp.cpp:2124
PlayerInstanceAAMP::SetVideoTracks
void SetVideoTracks(std::vector< long > bitrates)
Set video tracks.
Definition: main_aamp.cpp:2420
PlayerInstanceAAMP::SetPreferredCodec
void SetPreferredCodec(const char *codecList)
Set optional preferred codec list.
Definition: main_aamp.cpp:2321
PlayerInstanceAAMP::AddEventListener
void AddEventListener(AAMPEventType eventType, EventListener *eventListener)
Support multiple listeners for multiple event type.
Definition: main_aamp.cpp:1483
PlayerInstanceAAMP::SetLanguageFormat
void SetLanguageFormat(LangCodePreference preferredFormat, bool useRole=false)
Set Language preferred Format.
Definition: main_aamp.cpp:480
PlayerInstanceAAMP::SetLinearTrickplayFPS
void SetLinearTrickplayFPS(int linearTrickplayFPS)
Set Linear Trickplay FPS.
Definition: main_aamp.cpp:1655
PlayerInstanceAAMP::SetTextTrack
void SetTextTrack(int trackId, char *ccData=NULL)
Set text track.
Definition: main_aamp.cpp:2566
PlayerInstanceAAMP::SetInitRampdownLimit
void SetInitRampdownLimit(int limit)
Set Initial profile ramp down limit.
Definition: main_aamp.cpp:2658
PlayerInstanceAAMP::GetAvailableAudioTracks
std::string GetAvailableAudioTracks(bool allTrack=false)
Get available audio tracks.
Definition: main_aamp.cpp:2428
PlayerInstanceAAMP::GetVideoBitrates
std::vector< long > GetVideoBitrates(void)
To get the available video bitrates.
Definition: main_aamp.cpp:1893
PlayerInstanceAAMP::SetLanguage
void SetLanguage(const char *language)
Set Audio language.
Definition: main_aamp.cpp:1389
VideoZoomMode
VideoZoomMode
Video zoom mode.
Definition: main_aamp.h:129
PlayerInstanceAAMP::SetInitFragTimeoutRetryCount
void SetInitFragTimeoutRetryCount(int count)
To set the max retry attempts for init frag curl timeout failures.
Definition: main_aamp.cpp:1718
PlayerInstanceAAMP::SetRuntimeDRMConfigSupport
void SetRuntimeDRMConfigSupport(bool DynamicDRMSupported)
To set Dynamic DRM feature by Application.
Definition: main_aamp.cpp:3173
PlayerInstanceAAMP::SetLiveOffset4K
void SetLiveOffset4K(double liveoffset)
Set Live Offset.
Definition: main_aamp.cpp:1674
PlayerInstanceAAMP::GetCurrentDRM
const char * GetCurrentDRM()
Get current drm.
Definition: main_aamp.cpp:1547
PlayerInstanceAAMP::SetNewAdBreakerConfig
void SetNewAdBreakerConfig(bool bValue)
Configure New AdBreaker Enable/Disable.
Definition: main_aamp.cpp:2400
PlayerInstanceAAMP::SetLiveOffset
void SetLiveOffset(double liveoffset)
Set Live Offset.
Definition: main_aamp.cpp:1664
PlayerInstanceAAMP::SetReportVideoPTS
void SetReportVideoPTS(bool enabled)
Enable video PTS reporting in progress event.
Definition: main_aamp.cpp:2733
PlayerInstanceAAMP::SetMaximumBitrate
void SetMaximumBitrate(long bitrate)
Set maximum bitrate value.
Definition: main_aamp.cpp:521
PlayerInstanceAAMP::SetVODTrickplayFPS
void SetVODTrickplayFPS(int vodTrickplayFPS)
Set VOD Trickplay FPS.
Definition: main_aamp.cpp:1646
PlayerInstanceAAMP::Seek
void Seek(double secondsRelativeToTuneTime, bool keepPaused=false)
Seek to a time.
Definition: main_aamp.cpp:971
PlayerInstanceAAMP::GetMaximumBitrate
long GetMaximumBitrate(void)
Get maximum bitrate value.
Definition: main_aamp.cpp:537
PlayerInstanceAAMP::UnloadJS
void UnloadJS(void *context)
Definition: FakePlayerInstanceAamp.cpp:50
PlayerInstanceAAMP::SetPausedBehavior
void SetPausedBehavior(int behavior)
To set preferred paused state behavior.
Definition: main_aamp.cpp:2850
PlayerInstanceAAMP::SetCCStatus
void SetCCStatus(bool enabled)
Set CC visibility on/off.
Definition: main_aamp.cpp:2620
PlayerInstanceAAMP::SetCEAFormat
void SetCEAFormat(int format)
Set the CEA format for force setting.
Definition: main_aamp.cpp:2667
PlayerInstanceAAMP::SetParallelPlaylistDL
void SetParallelPlaylistDL(bool bValue)
Set parallel playlist download config value.
Definition: main_aamp.cpp:2192
PlayerInstanceAAMP::SetPlaylistTimeout
void SetPlaylistTimeout(double timeout)
Optionally override default HLS main manifest download timeout with app-specific value.
Definition: main_aamp.cpp:2009
PlayerInstanceAAMP::SetAuxiliaryLanguage
void SetAuxiliaryLanguage(const std::string &language)
Set auxiliary language.
Definition: main_aamp.cpp:2944
PlayerInstanceAAMP::SetParallelPlaylistRefresh
void SetParallelPlaylistRefresh(bool bValue)
Set parallel playlist download config value for linear.
Definition: main_aamp.cpp:2201
PlayerInstanceAAMP::SetDisable4K
void SetDisable4K(bool value)
Disable 4K Support in player.
Definition: main_aamp.cpp:2069
PlayerInstanceAAMP::PauseAt
void PauseAt(double position)
Set PauseAt position.
Definition: main_aamp.cpp:837
PlayerInstanceAAMP::GetPreferredTextProperties
std::string GetPreferredTextProperties()
Get preferred text prioperties.
Definition: main_aamp.cpp:2355
PlayerInstanceAAMP::SetOutputResolutionCheck
void SetOutputResolutionCheck(bool bValue)
Set Display resolution check for video profile filtering.
Definition: main_aamp.cpp:2227
PlayerInstanceAAMP::GetAudioTrackInfo
std::string GetAudioTrackInfo()
Get current audio track index.
Definition: main_aamp.cpp:2438
PlayerInstanceAAMP::SetStallErrorCode
void SetStallErrorCode(int errorCode)
To set the error code to be used for playback stalled error.
Definition: main_aamp.cpp:1684
PlayerInstanceAAMP::GetCCStatus
bool GetCCStatus(void)
Get CC visibility on/off.
Definition: main_aamp.cpp:2630
PlayerInstanceAAMP::SetDownloadBufferSize
void SetDownloadBufferSize(int bufferSize)
To set the download buffer size value.
Definition: main_aamp.cpp:2018
PlayerInstanceAAMP::GetInitialBitrate4k
long GetInitialBitrate4k(void)
To get the initial bitrate value for 4K assets.
Definition: main_aamp.cpp:1981
PlayerInstanceAAMP::ResetConfiguration
void ResetConfiguration()
API to reset configuration across tunes for single player instance.
Definition: main_aamp.cpp:264
PlayerInstanceAAMP::InsertAd
void InsertAd(const char *url, double positionSeconds)
Schedule insertion of ad at given position.
Definition: FakePlayerInstanceAamp.cpp:53
PlayerInstanceAAMP::SetAudioVolume
void SetAudioVolume(int volume)
Set Audio Volume.
Definition: main_aamp.cpp:1361
PlayerInstanceAAMP::detach
void detach()
Soft stop the player instance.
Definition: main_aamp.cpp:385
PlayerInstanceAAMP::GetPreferredAudioProperties
std::string GetPreferredAudioProperties()
Get preferred audio prioperties.
Definition: main_aamp.cpp:2345
PlayerInstanceAAMP::SetSubtitleMute
void SetSubtitleMute(bool muted)
Enable/ Disable Subtitle.
Definition: main_aamp.cpp:1338
PlayerInstanceAAMP::ProcessContentProtectionDataConfig
void ProcessContentProtectionDataConfig(const char *jsonbuffer)
Definition: main_aamp.cpp:3026
PlayerInstanceAAMP::SetAvgBWForABR
void SetAvgBWForABR(bool useAvgBW)
Indicates average BW to be used for ABR Profiling.
Definition: main_aamp.cpp:1629
PlayerInstanceAAMP::SetRate
void SetRate(float rate, int overshootcorrection=0)
Set playback rate.
Definition: main_aamp.cpp:561
PlayerInstanceAAMP::SetInitialBitrate
void SetInitialBitrate(long bitrate)
To set the initial bitrate value.
Definition: main_aamp.cpp:1953
PlayerInstanceAAMP::GetCurrentAudioLanguage
const char * GetCurrentAudioLanguage()
Get current audio language.
Definition: main_aamp.cpp:1523
PlayerInstanceAAMP::SetPreferredTextLanguages
void SetPreferredTextLanguages(const char *param)
Set optional preferred language list.
Definition: main_aamp.cpp:2371
PlayerInstanceAAMP::SetSessionToken
void SetSessionToken(std::string sessionToken)
Set the session token for player.
Definition: main_aamp.cpp:2712
StreamSink
GStreamer Abstraction class for the implementation of AAMPGstPlayer and gstaamp plugin.
Definition: main_aamp.h:385
PlayerInstanceAAMP::Tune
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...
Definition: main_aamp.cpp:312
PlayerInstanceAAMP::SetPreferredLanguages
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.
Definition: main_aamp.cpp:2363
PlayerInstanceAAMP::GetThumbnails
std::string GetThumbnails(double sduration, double eduration)
To get preferred thumbnails for the duration.
Definition: main_aamp.cpp:2703
PlayerInstanceAAMP::SetAudioBitrate
void SetAudioBitrate(long bitrate)
To set a preferred bitrate for audio profile.
Definition: main_aamp.cpp:1844
PlayerInstanceAAMP::GetPlaybackDuration
double GetPlaybackDuration(void)
To get the current asset's duration.
Definition: main_aamp.cpp:1738
PlayerInstanceAAMP::SetNetworkTimeout
void SetNetworkTimeout(double timeout)
To override default curl timeout for playlist/fragment downloads.
Definition: main_aamp.cpp:1991
PlayerInstanceAAMP::GetTextTrack
int GetTextTrack()
Get current text track index.
Definition: main_aamp.cpp:2610
PlayerInstanceAAMP::SetPreferredDRM
void SetPreferredDRM(DRMSystems drmType)
Set Preferred DRM.
Definition: main_aamp.cpp:2027
PlayerInstanceAAMP::GetAudioBitrate
long GetAudioBitrate(void)
To get the bitrate of current audio profile.
Definition: main_aamp.cpp:1826
MockPlayerInstanceAAMP
Definition: MockPlayerInstanceAAMP.h:26
PlayerInstanceAAMP::SetMaxPlaylistCacheSize
void SetMaxPlaylistCacheSize(int cacheSize)
Set Maximum Cache Size for storing playlist.
Definition: main_aamp.cpp:454
PlayerInstanceAAMP::LoadJS
void LoadJS(void *context)
Definition: FakePlayerInstanceAamp.cpp:49
PlayerInstanceAAMP::SetRateAndSeek
void SetRateAndSeek(int rate, double secondsRelativeToTuneTime)
Seek to a time and playback with a new rate.
Definition: main_aamp.cpp:1202
PlayerInstanceAAMP::SetNativeCCRendering
void SetNativeCCRendering(bool enable)
Enable/disable the native CC rendering feature.
Definition: main_aamp.cpp:2488
PlayerInstanceAAMP::GetAvailableTextTracks
std::string GetAvailableTextTracks(bool allTrack=false)
Get available text tracks.
Definition: main_aamp.cpp:2460
PlayerInstanceAAMP::GetVideoMute
bool GetVideoMute(void)
To get video mute status.
Definition: main_aamp.cpp:1861
PlayerInstanceAAMP::SetMatchingBaseUrlConfig
void SetMatchingBaseUrlConfig(bool bValue)
Set Matching BaseUrl Config Configuration.
Definition: main_aamp.cpp:2235
PlayerInstanceAAMP::EnableVideoRectangle
void EnableVideoRectangle(bool rectProperty)
Set video rectangle property.
Definition: main_aamp.cpp:2506
PlayerInstanceAAMP::GetAudioBitrates
std::vector< long > GetAudioBitrates(void)
To get the available audio bitrates.
Definition: main_aamp.cpp:1935
PlayerInstanceAAMP::SetSegmentInjectFailCount
void SetSegmentInjectFailCount(int value)
Set retry limit on Segment injection failure.
Definition: main_aamp.cpp:419
PlayerInstanceAAMP::SetRetuneForUnpairedDiscontinuity
void SetRetuneForUnpairedDiscontinuity(bool bValue)
Set unpaired discontinuity retune flag.
Definition: main_aamp.cpp:2088
PlayerInstanceAAMP::SetWesterosSinkConfig
void SetWesterosSinkConfig(bool bValue)
Set Westeros sink configuration.
Definition: main_aamp.cpp:2210
PlayerInstanceAAMP::SetDownloadStallTimeout
void SetDownloadStallTimeout(long stallTimeout)
To set the curl stall timeout value.
Definition: main_aamp.cpp:2133
PlayerInstanceAAMP::GetRampDownLimit
int GetRampDownLimit(void)
Get profile ramp down limit.
Definition: main_aamp.cpp:470
AAMPEventType
AAMPEventType
Type of the events sending to the JSPP player.
Definition: AampEvent.h:44
PlayerInstanceAAMP::GetManifest
std::string GetManifest(void)
To get the available manifest.
Definition: main_aamp.cpp:1911
PlayerInstanceAAMP::SetAudioTrack
void SetAudioTrack(std::string language="", std::string rendition="", std::string type="", std::string codec="", unsigned int channel=0, std::string label="")
Set audio track.
Definition: main_aamp.cpp:2282
PlayerInstanceAAMP::GetAvailableThumbnailTracks
std::string GetAvailableThumbnailTracks(void)
To get the available bitrates for thumbnails.
Definition: main_aamp.cpp:2678
PlayerInstanceAAMP::SetStereoOnlyPlayback
void SetStereoOnlyPlayback(bool bValue)
Set Stereo Only Playback.
Definition: main_aamp.cpp:2044
PlayerInstanceAAMP::SetAppName
void SetAppName(std::string name)
Set the application name which has created PlayerInstanceAAMP, for logging purposes.
Definition: main_aamp.cpp:2480
PlayerInstanceAAMP::SetLicenseServerURL
void SetLicenseServerURL(const char *url, DRMSystems type=eDRM_MAX_DRMSystems)
Set License Server URL.
Definition: main_aamp.cpp:1590
PlayerInstanceAAMP::DisableContentRestrictions
void DisableContentRestrictions(long grace, long time, bool eventChange)
Disable Content Restrictions - unlock.
Definition: main_aamp.cpp:2742
PlayerInstanceAAMP::Stop
void Stop(bool sendStateChangeEvent=true)
Stop playback and release resources.
Definition: main_aamp.cpp:282
eDRM_NONE
@ eDRM_NONE
Definition: AampDrmSystems.h:35
PlayerInstanceAAMP::SetPreCacheTimeWindow
void SetPreCacheTimeWindow(int nTimeWindow)
SetPreCacheTimeWindow Function to Set PreCache Time.
Definition: main_aamp.cpp:1637
PlayerInstanceAAMP::SetVideoBitrate
void SetVideoBitrate(long bitrate)
To set a preferred bitrate for video profile.
Definition: main_aamp.cpp:1805
PlayerInstanceAAMP::~PlayerInstanceAAMP
~PlayerInstanceAAMP()
PlayerInstanceAAMP Destructor.
Definition: main_aamp.cpp:203
PlayerInstanceAAMP::SetTextStyle
void SetTextStyle(const std::string &options)
Set style options for text track rendering.
Definition: main_aamp.cpp:2638
DRMSystems
DRMSystems
DRM system types.
Definition: AampDrmSystems.h:33
PlayerInstanceAAMP::PlayerInstanceAAMP
PlayerInstanceAAMP(StreamSink *streamSink=NULL, std::function< void(uint8_t *, int, int, int) > exportFrames=nullptr)
PlayerInstanceAAMP Constructor.
Definition: main_aamp.cpp:105
PlayerInstanceAAMP::GetAAMPConfig
std::string GetAAMPConfig()
GetAAMPConfig - GetAamp Config as JSON string.
Definition: main_aamp.cpp:2925
PlayerInstanceAAMP::SetDownloadLowBWTimeout
void SetDownloadLowBWTimeout(long lowBWTimeout)
To set the curl download low bandwidth timeout value.
Definition: main_aamp.cpp:2157
PlayerInstanceAAMP::GetTextStyle
std::string GetTextStyle()
Get style options for text track rendering.
Definition: main_aamp.cpp:2648
PlayerInstanceAAMP::SeekToLive
void SeekToLive(bool keepPaused=false)
Seek to live point.
Definition: main_aamp.cpp:1144
PlayerInstanceAAMP::GetAudioVolume
int GetAudioVolume(void)
To get the current audio volume.
Definition: main_aamp.cpp:1870
PlayerInstanceAAMP::AddPageHeaders
void AddPageHeaders(std::map< std::string, std::string > customHttpHeaders)
Applies the custom http headers for page (Injector bundle) received from the js layer.
Definition: main_aamp.cpp:1563
PlayerInstanceAAMP::SetPreferredRenditions
void SetPreferredRenditions(const char *renditionList)
Set optional preferred rendition list.
Definition: main_aamp.cpp:2337
PlayerInstanceAAMP::SetSubscribedTags
void SetSubscribedTags(std::vector< std::string > subscribedTags)
Set array of subscribed tags.
Definition: main_aamp.cpp:1415
PlayerInstanceAAMP::SetMinimumBitrate
void SetMinimumBitrate(long bitrate)
Set minimum bitrate value.
Definition: main_aamp.cpp:494
PlayerInstanceAAMP::RegisterEvents
void RegisterEvents(EventListener *eventListener)
Register event handler.
Definition: main_aamp.cpp:403
PlayerInstanceAAMP::AddCustomHTTPHeader
void AddCustomHTTPHeader(std::string headerName, std::vector< std::string > headerValue, bool isLicenseHeader=false)
Add/Remove a custom HTTP header and value.
Definition: main_aamp.cpp:1579
PlayerInstanceAAMP::SetVideoMute
void SetVideoMute(bool muted)
Enable/ Disable Video.
Definition: main_aamp.cpp:1303
LangCodePreference
LangCodePreference
Language Code Preference types.
Definition: main_aamp.h:165
PlayerInstanceAAMP::SetTuneEventConfig
void SetTuneEventConfig(int tuneEventType)
To set the vod-tune-event according to the player.
Definition: main_aamp.cpp:2498
PlayerInstanceAAMP::SetRetuneForGSTInternalError
void SetRetuneForGSTInternalError(bool bValue)
Set retune configuration for gstpipeline internal data stream error.
Definition: main_aamp.cpp:2097
PlayerInstanceAAMP::SetReportInterval
void SetReportInterval(int reportInterval)
To set the Playback Position reporting interval.
Definition: main_aamp.cpp:1702
PlayerInstanceAAMP::SetNewABRConfig
void SetNewABRConfig(bool bValue)
Configure New ABR Enable/Disable.
Definition: main_aamp.cpp:2243
PlayerInstanceAAMP::SetPreferredLabels
void SetPreferredLabels(const char *lableList)
Set optional preferred label list.
Definition: main_aamp.cpp:2329
PlayerInstanceAAMP::SetInitialBitrate4K
void SetInitialBitrate4K(long bitrate4K)
To set the initial bitrate value for 4K assets.
Definition: main_aamp.cpp:1972
PlayerInstanceAAMP::SetSslVerifyPeerConfig
void SetSslVerifyPeerConfig(bool bValue)
Configure URI parameters.
Definition: main_aamp.cpp:2273