|
RDK Documentation (Open Sourced RDK Components)
|
21 #include "MockPrivateInstanceAAMP.h"
25 #define TEST_LOG_LEVEL eLOGLEVEL_TRACE
58 if (g_mockPrivateInstanceAAMP !=
nullptr)
60 g_mockPrivateInstanceAAMP->GetState(state);
66 if (g_mockPrivateInstanceAAMP !=
nullptr)
68 g_mockPrivateInstanceAAMP->SetState(state);
83 if (g_mockPrivateInstanceAAMP !=
nullptr)
85 g_mockPrivateInstanceAAMP->StartPausePositionMonitoring(pausePositionMilliseconds);
91 if (g_mockPrivateInstanceAAMP !=
nullptr)
93 g_mockPrivateInstanceAAMP->StopPausePositionMonitoring(reason);
102 void PrivateInstanceAAMP::Tune(
const char *mainManifestUrl,
bool autoPlay,
const char *contentType,
bool bFirstAttempt,
bool bFinalAttempt,
const char *pTraceID,
bool audioDecoderStreamSync)
239 void SetPreferredLanguages(
const char *languageList,
const char *preferredRendition,
const char *preferredType,
const char *codecList,
const char *labelList )
296 std::string PrivateInstanceAAMP::GetVideoRectangle()
void SetLiveOffsetAppRequest(bool LiveOffsetAppRequest)
set LiveOffset Request flag Status
int GetAudioTrack()
Get current audio track index.
void NotifyFirstBufferProcessed()
Notify if first buffer processed by gstreamer.
void TuneHelper(TuneType tuneType, bool seekWhilePaused=false)
The helper function which perform tuning Common tune operations used on Tune, Seek,...
void SetPreferredLanguages(const char *languageList, const char *preferredRendition, const char *preferredType, const char *codecList, const char *labelList)
set preferred Audio Language properties like language, rendition, type and codec
std::string GetPlaybackStats()
Get playback stats for the session so far.
Class for sed event to Listener.
std::string GetThumbnails(double start, double end)
Get the Thumbnail Tile data.
bool IsTuneCompleted()
Check if tune completed or not.
size_t HandleSSLWriteCallback(char *ptr, size_t size, size_t nmemb, void *userdata)
HandleSSLWriteCallback - Handle write callback from CURL.
void SetAudioVolume(int volume)
Set audio volume.
void SetVideoMute(bool muted)
Enable/ Disable Video.
void Tune(const char *url, bool autoPlay, const char *contentType=NULL, bool bFirstAttempt=true, bool bFinalAttempt=false, const char *sessionUUID=NULL, bool audioDecoderStreamSync=true)
Tune API.
void SetState(PrivAAMPState state)
Set player state.
void LogPlayerPreBuffered(void)
Profile Player changed from background to foreground i.e prebuffred.
AampCacheHandler * getAampCacheHandler()
Get AampCacheHandler instance.
void SetTextStyle(const std::string &options)
Set style options for text track rendering.
void AcquireStreamLock()
acquire streamsink lock
void RemoveEventListener(AAMPEventType eventType, EventListener *eventListener)
Deregister event lister, Remove listener to aamp events.
void SetPreferredTextLanguages(const char *param)
Set Preferred Text Language.
long long GetDurationMs(void)
Get asset duration in milliseconds.
bool IsFragmentCachingRequired()
Check if fragment caching is required.
void SetTextTrack(int trackId, char *data=NULL)
Set text track.
size_t HandleSSLHeaderCallback(const char *ptr, size_t size, size_t nmemb, void *userdata)
HandleSSLHeaderCallback - Hanlde header callback from SSL.
std::string GetAvailableVideoTracks()
Get available video tracks.
PrivateInstanceAAMP(AampConfig *config=NULL)
PrivateInstanceAAMP Constructor.
void StopDownloads()
Stop downloads of all tracks. Used by aamp internally to manage states.
void SetSubtitleMute(bool muted)
Set subtitle mute state.
VideoZoomMode
Video zoom mode.
bool LockGetPositionMilliseconds()
Lock GetPositionMilliseconds() returns true if successfull.
void GetState(PrivAAMPState &state)
Get player state.
void individualization(const std::string &payload)
DRM individualization callback.
std::string GetThumbnailTracks()
Get available thumbnail tracks.
void TuneFail(bool fail)
Profiler for failure tune.
long long GetPositionMilliseconds(void)
Get current stream playback position in milliseconds.
void ReleaseStreamLock()
release streamsink lock
std::string GetAvailableAudioTracks(bool allTrack=false)
Get available audio tracks.
void DisableContentRestrictions(long grace=0, long time=-1, bool eventChange=false)
Disable Content Restrictions - unlock.
DRMSystems GetPreferredDRM()
Get Preferred DRM.
std::string GetTextStyle()
Get style options for text track rendering.
void SetStreamSink(StreamSink *streamSink)
Setting the stream sink.
void StopPausePositionMonitoring(std::string reason)
stop the PausePositionMonitoring thread used for PauseAt functionality
void Stop(void)
Stop playback and release resources.
std::string GetTextTrackInfo()
Get current audio track index.
void TeardownStream(bool newTune)
Terminate the stream.
ContentType GetContentType() const
Get Content Type.
bool IsLive(void)
Checking if the stream is live or not.
std::string GetPreferredAudioProperties()
get the current audio preference set by user
bool TryStreamLock()
try to acquire streamsink lock
Private functions and types used internally by AAMP.
void NotifySpeedChanged(float rate, bool changeState=true)
Notify speed change event to listeners.
void SetVideoTracks(std::vector< long > bitrateList)
set birate for video tracks selection
GStreamer Abstraction class for the implementation of AAMPGstPlayer and gstaamp plugin.
static bool IsActiveInstancePresent()
Check if any active PrivateInstanceAAMP available.
PrivAAMPState
Mapping all required status codes based on JS player requirement. These requirements may be forced by...
Handles Aamp Cahe operations.
void UnlockGetPositionMilliseconds()
Unlock GetPositionMilliseconds()
void AddCustomHTTPHeader(std::string headerName, std::vector< std::string > headerValue, bool isLicenseHeader)
Add/Remove a custom HTTP header and value.
bool GetCCStatus(void)
Get CC visibility on/off.
MediaFormat GetMediaFormatType(const char *url)
Assign the correct mediaFormat by parsing the url.
void SetVideoZoom(VideoZoomMode zoom)
Set video zoom.
void StartPausePositionMonitoring(long long pausePositionMilliseconds)
start the PausePositionMonitoring thread used for PauseAt functionality
AAMPEventType
Type of the events sending to the JSPP player.
void SetVideoRectangle(int x, int y, int w, int h)
Set video rectangle.
ContentType
Asset's content types.
void SetEventPriorityAsyncTune(bool bValue)
Set async tune configuration for EventPriority.
int HandleSSLProgressCallback(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow)
HandleSSLProgressCallback - Process progress callback from CURL.
~PrivateInstanceAAMP()
PrivateInstanceAAMP Destructor.
std::shared_ptr< AampDrmHelper > GetCurrentDRM()
Get current drm.
DRMSystems
DRM system types.
bool GetPauseOnFirstVideoFrameDisp(void)
GetPauseOnFirstVideoFrameDisplay.
void SetCCStatus(bool enabled)
Set CC visibility on/off.
void EnableContentRestrictions()
Enable Content Restrictions - lock.
void SetAlternateContents(const std::string &adBreakId, const std::string &adId, const std::string &url)
Setting the alternate contents' (Ads/blackouts) URL.
std::string GetAvailableTextTracks(bool alltrack=false)
Get available text tracks.
int GetTextTrack()
Get current text track index.
void EnableDownloads(void)
Enable downloads after aamp_DisableDownloads. Called after stopping fragment collector thread.
std::string GetPreferredTextProperties()
get the current text preference set by user
void NotifyOnEnteringLive()
Notify when entering live point to listeners.
std::string GetAudioTrackInfo()
Get current audio track index.
void SetAppName(std::string name)
Set the application name which has created PlayerInstanceAAMP, for logging purposes.
bool SetStateBufferingIfRequired()
Set eSTATE_BUFFERING if required.
void ResumeDownloads()
Resume downloads of all tracks. Used by aamp internally to manage states.
void detach()
Soft stop the player instance.
void AddEventListener(AAMPEventType eventType, EventListener *eventListener)
Add listener to aamp events.