RDK Documentation (Open Sourced RDK Components)
aampplayer.cpp
1 /*
2  * If not stated otherwise in this file or this component's Licenses.txt file the
3  * following copyright and licenses apply:
4  *
5  * Copyright 2018 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 #include "aampplayer.h"
20 #include "rdkmediaplayer.h"
21 #include <glib.h>
22 #include <limits>
23 #include <cmath>
24 #include <unistd.h>
25 #include <stdlib.h>
26 #include <stdio.h>
27 #include "libIBus.h"
28 #include "intrect.h"
29 #include "logger.h"
30 #include "main_aamp.h"
31 #ifndef DISABLE_CLOSEDCAPTIONS
32 #include "host.hpp"
33 #include "videoOutputPort.hpp"
34 #include "manager.hpp"
35 #endif
36 extern "C"
37 {
38  void setComcastSessionToken(const char* token);
39  void loadAVEJavaScriptBindings(void* context);
40 }
41 
42 void* GetPlatformCallbackManager()
43 {
44  return 0;
45 }
46 
47 void ClearClosedCaptionSurface()
48 {
49 }
50 
51 
52 void HideClosedCaptionSurface()
53 {
54 }
55 
56 void ShowClosedCaptionSurface()
57 {
58 }
59 
60 void* CreateSurface()
61 {
62  return 0;
63 }
64 
65 void DestroySurface(void* surface)
66 {
67 }
68 
69 void GetSurfaceScale(double *pScaleX, double *pScaleY)
70 {
71 }
72 
73 void SetSurfaceSize(void* surface, int width, int height)
74 {
75 }
76 
77 void SetSurfacePos(void* surface, int x, int y)
78 {
79 }
80 
81 #define CALL_ON_MAIN_THREAD(body) \
82  do { \
83  g_timeout_add_full( \
84  G_PRIORITY_HIGH, \
85  0, \
86  [](gpointer data) -> gboolean \
87  { \
88  AAMPListener &self = *static_cast<AAMPListener*>(data); \
89  body \
90  return G_SOURCE_REMOVE; \
91  }, \
92  this, \
93  0); \
94  } while(0)
95 
97 {
98 public:
99  AAMPListener(AAMPPlayer* player, PlayerInstanceAAMP* aamp) : m_player(player), m_aamp(aamp)
100  {
101  reset();
102  }
103  void reset()
104  {
105  m_eventTuned = m_eventPlaying = m_didProgress = m_tuned = false;
106  m_lastPosition = std::numeric_limits<double>::max();
107  m_duration = 0;
108  m_tuneStartTime = g_get_monotonic_time();
109  }
110  //first progress event indicates that we tuned, so don't fire any progress events before that
111  void checkIsTuned()
112  {
113  if(!m_tuned && (m_eventTuned && m_eventPlaying && m_didProgress))
114  {
115  LOG_WARNING("AAMP TUNETIME %.2fs\n", (float)(g_get_monotonic_time() - m_tuneStartTime)/1000000.0f);
116  m_tuned = true;
117  AAMPEvent progress;
118  progress.data.progress.positionMiliseconds = 0;
119  progress.data.progress.durationMiliseconds = m_duration;
120  progress.data.progress.playbackSpeed = 1;
121  progress.data.progress.startMiliseconds = 0;
122  progress.data.progress.endMiliseconds = m_duration;
123  m_player->onProgress(progress);
124  }
125  }
126  void Event(const AAMPEvent & e)
127  {
128  switch (e.type)
129  {
130  case AAMP_EVENT_TUNED:
131  LOG_INFO("event tuned");
132  m_eventTuned = true;
133  checkIsTuned();
134  break;
136  LOG_INFO("tune failed. code:%d desc:%s failure:%d", e.data.mediaError.code, e.data.mediaError.description, e.data.mediaError.failure);
137  m_player->getParent()->getEventEmitter().send(OnErrorEvent(e.data.mediaError.code, e.data.mediaError.description));
138  break;
140  m_player->getParent()->getEventEmitter().send(OnSpeedChangeEvent(e.data.speedChanged.rate));
141  break;
142  case AAMP_EVENT_EOS:
143  m_player->getParent()->getEventEmitter().send(OnCompleteEvent());
144  m_player->getParent()->stop();//automatically call stop on player
145  break;
147  break;
148  case AAMP_EVENT_PROGRESS:
149  //LOG_WARNING("progress %g", e.data.progress.positionMiliseconds);
150  if(m_tuned)//don't send any progress event until tuned (first progress from checkIsTuned signals tune complete)
151  {
152  m_player->onProgress(e);
153  }
154  else if(m_eventTuned)//monitor for change in progress position (ignoring any progress events coming before the tuned event)
155  {
156  //if(m_lastPosition != std::numeric_limits<double>::max())
157  {
158  //if(e.data.progress.positionMiliseconds > m_lastPosition)
159  {
160  LOG_INFO("event progress");
161  m_didProgress = true;
162  checkIsTuned();
163  }
164  }
165  //m_lastPosition = e.data.progress.positionMiliseconds;
166  }
167  break;
169  m_player->getParent()->onVidHandleReceived(e.data.ccHandle.handle);
170  break;
171  case AAMP_EVENT_JS_EVENT:
172  break;
174  {
175  std::string lang;
176  for(int i = 0; i < e.data.metadata.languageCount; ++i)
177  {
178  if(i > 0)
179  lang.append(",");
180  lang.append(e.data.metadata.languages[i]);
181  }
182  m_player->getParent()->updateVideoMetadata(lang, "-64,-32,-16,-4,-1,0,1,4,16,32,64", e.data.metadata.durationMiliseconds, e.data.metadata.width, e.data.metadata.height);
183  m_duration = e.data.metadata.durationMiliseconds;
184  break;
185  }
187  break;
189  m_player->getParent()->getEventEmitter().send(OnBitrateChanged(e.data.bitrateChanged.bitrate, e.data.bitrateChanged.description));
190  break;
192  break;
194  switch(e.data.stateChanged.state)
195  {
196  case eSTATE_IDLE: break;
197  case eSTATE_INITIALIZING: break;
198  case eSTATE_INITIALIZED: break;
199  case eSTATE_PREPARING: break;
200  case eSTATE_PREPARED: break;
201  case eSTATE_BUFFERING: break;
202  case eSTATE_PAUSED:
203  m_player->getParent()->getEventEmitter().send(OnPausedEvent());
204  break;
205  case eSTATE_SEEKING: break;
206  case eSTATE_PLAYING:
207  if(!m_tuned)
208  {
209  LOG_INFO("event playing");
210  m_eventPlaying = true;
211  checkIsTuned();
212  }
213  m_player->getParent()->getEventEmitter().send(OnPlayingEvent());
214  break;
215  case eSTATE_STOPPING: break;
216  case eSTATE_STOPPED: break;
217  case eSTATE_COMPLETE: break;
218  case eSTATE_ERROR: break;
219  case eSTATE_RELEASED: break;
220  }
221  break;
222  default:
223  break;
224  }
225  }
226 private:
227  AAMPPlayer* m_player;
228  PlayerInstanceAAMP* m_aamp;
229  bool m_eventTuned, m_eventPlaying, m_didProgress, m_tuned;
230  int m_duration;
231  double m_lastPosition;
232  gint64 m_tuneStartTime;
233 };
234 
235 bool AAMPPlayer::canPlayURL(const std::string& url)
236 {
237  std::string contentType;
238  return AAMPPlayer::setContentType(url, contentType);
239 }
240 
241 AAMPPlayer::AAMPPlayer(RDKMediaPlayer* parent) :
242  RDKMediaPlayerImpl(parent),
243  m_aampInstance(0),
244  m_aampListener(0)
245 {
246  LOG_INFO("AAMPPlayer ctor");
247 }
248 
249 AAMPPlayer::~AAMPPlayer()
250 {
251  if(m_aampListener)
252  delete m_aampListener;
253  if(m_aampInstance)
254  delete m_aampInstance;
255 }
256 
257 // RDKMediaPlayerImpl impl start
258 bool AAMPPlayer::doCanPlayURL(const std::string& url)
259 {
260  return AAMPPlayer::canPlayURL(url);
261 }
262 
263 void AAMPPlayer::doInit()
264 {
265  try
266  {
267  LOG_INFO("AAMPPlayer started");
268  m_aampInstance = new PlayerInstanceAAMP();
269  m_aampListener = new AAMPListener(this, m_aampInstance);
270  m_aampInstance->RegisterEvents(m_aampListener);
271  IARM_Bus_Init("AAMPPlayer");
273  #ifndef DISABLE_CLOSEDCAPTIONS
275  #endif
276  }
277  catch(...)
278  {
279  LOG_INFO("DeviceSettings exception caught in %s\n", __FUNCTION__); //CID:113319 - Uncaught exception
280  }
281 }
282 
283 void AAMPPlayer::doLoad(const std::string& url)
284 {
285  try
286  {
287  //setSessionToken();
288  if(m_aampListener)
289  {
290  m_aampListener->reset();
291  }
292  if(m_aampInstance)
293  {
294  m_aampInstance->Tune(url.c_str());
295  }
296  }
297  catch(...)
298  {
299  LOG_INFO("Device Illegal argument exception caught in %s\n", __FUNCTION__); //CID:121723 - Uncaught exception
300  }
301 }
302 
303 void AAMPPlayer::doSetVideoRectangle(const IntRect& rect)
304 {
305  if (rect.width() > 0 && rect.height() > 0)
306  {
307  LOG_INFO("set video rectangle: %dx%d %dx%d", rect.x(), rect.y(), rect.width(), rect.height());
308  m_aampInstance->SetVideoRectangle(rect.x(), rect.y(), rect.width(), rect.height());
309  }
310 }
311 
312 void AAMPPlayer::doSetAudioLanguage(std::string& lang)
313 {
314  try
315  {
316  LOG_INFO("set lang: %s", lang.c_str());
317  m_aampInstance->SetLanguage(lang.c_str());
318  }
319  catch(...)
320  {
321  LOG_INFO("Device Illegal Argument Exception caught in %s\n", __FUNCTION__); //CID:121706 - Uncaught exception
322  }
323 }
324 
325 void AAMPPlayer::doPlay()
326 {
327  try
328  {
329  LOG_INFO("AAMPPlayer::doPlay()");
330  if(m_aampInstance)
331  m_aampInstance->SetRate(1);
332  }
333  catch(...)
334  {
335  LOG_INFO("device IllegalArgumentException exception caught in %s\n", __FUNCTION__); //CID:121709 - Uncaught exception
336  }
337 }
338 
339 void AAMPPlayer::doPause()
340 {
341  try
342  {
343  LOG_INFO("AAMPPlayer::doPause()");
344  if(m_aampInstance)
345  m_aampInstance->SetRate(0);
346  }
347  catch(...)
348  {
349  LOG_INFO("device IllegalArgumentException exception caught in %s\n", __FUNCTION__); //CID:121724 - Uncaught exception
350  }
351 }
352 
353 void AAMPPlayer::doSetPosition(float position)
354 {
355  try
356  {
357  if (!std::isnan(position))
358  {
359  LOG_INFO("set currentTime: %f", position);
360  if(m_aampInstance)
361  m_aampInstance->Seek(position/1000);
362  }
363  }
364  catch(...)
365  {
366  LOG_INFO("device IllegalArgumentException exception caught in %s\n", __FUNCTION__); //CID:121705 - Uncaught exception
367  }
368 
369 }
370 
371 void AAMPPlayer::doSeekToLive()
372 {
373  try
374  {
375  LOG_INFO("seekToLive()");
376  if(m_aampInstance)
377  {
378  m_aampInstance->SeekToLive();
379  }
380  }
381  catch(...)
382  {
383  LOG_INFO("device IllegalArgumentException exception caught in %s\n", __FUNCTION__); //CID:121721 - Uncaught exceptio
384  }
385 }
386 
387 
388 void AAMPPlayer::doStop()
389 {
390  LOG_INFO("stop()");
391  if(m_aampInstance)
392  {
393  m_aampInstance->Stop();
394  getParent()->getEventEmitter().send(OnClosedEvent());//TODO OnClosedEvent needs to be tied into aamps AAMP_EVENT_STATUS_CHANGED state correctly (e.g. eSTATE_RELEASED once aamp sends it)
395  }
396 }
397 
398 void AAMPPlayer::doChangeSpeed(float speed, int32_t overshootTime)
399 {
400  try
401  {
402  LOG_INFO("doChangeSpeed(%f, %d)", speed, overshootTime);
403  if(m_aampInstance)
404  m_aampInstance->SetRate(speed, overshootTime);
405  }
406  catch(...)
407  {
408  LOG_INFO("device IllegalArgumentException exception caught in %s\n", __FUNCTION__); //CID:121707 - Uncaught exception
409  }
410 }
411 
412 void AAMPPlayer::doSetSpeed(float speed)
413 {
414  try
415  {
416  LOG_INFO("doSetSpeed(%f)", speed);
417  if(m_aampInstance)
418  m_aampInstance->SetRate(speed);
419  }
420  catch(...)
421  {
422  LOG_INFO("device IllegalArgumentException exception caught in %s\n", __FUNCTION__); //CID:121701 - Uncaught exception
423  }
424 }
425 
426 void AAMPPlayer::doSetBlocked(bool blocked)
427 {
428  LOG_INFO("doSetBlocked()");
429  if(m_aampInstance)
430  m_aampInstance->SetAudioVolume(blocked ? 0 : 100);
431 }
432 
433 void AAMPPlayer::doSetVolume(float volume)
434 {
435  LOG_INFO("set volume: %f", volume);
436  if(m_aampInstance)
437  m_aampInstance->SetAudioVolume(volume);
438 }
439 
440 void AAMPPlayer::doSetZoom(int zoom)
441 {
442  LOG_INFO("doSetVideoZoom()");
443  if(m_aampInstance)
444  m_aampInstance->SetVideoZoom((VideoZoomMode)zoom);
445 }
446 
447 void AAMPPlayer::doSetNetworkBufferSize(int32_t networkBufferSize)
448 {
449  LOG_INFO("doSetNetworkBufferSize()");
450 }
451 
452 void AAMPPlayer::doSetVideoBufferLength(float videoBufferLength)
453 {
454  LOG_INFO("doSetVideoBufferLength()");
455 }
456 
457 void AAMPPlayer::doSetEISSFilterStatus(bool status)
458 {
459  LOG_INFO("doSetEISSFilterStatus()");
460 }
461 
462 void AAMPPlayer::doSetIsInProgressRecording(bool isInProgressRecording)
463 {
464  LOG_INFO("doSetIsInProgressRecording()");
465 }
466 
467 void AAMPPlayer::getProgressData(ProgressData* progressData)
468 {
469  *progressData = m_progressData;
470 }
471 
472 // RDKMediaPlayerImpl impl end
473 
474 void AAMPPlayer::onProgress(const AAMPEvent & e)
475 {
476  m_progressData.position = e.data.progress.positionMiliseconds;
477  m_progressData.duration = e.data.progress.durationMiliseconds;
478  m_progressData.speed = e.data.progress.playbackSpeed;
479  m_progressData.start = e.data.progress.startMiliseconds;
480  m_progressData.end = e.data.progress.endMiliseconds;
481  getParent()->getEventEmitter().send(OnProgressEvent(this));
482 }
483 
484 /**
485  * @param url locator to be tuned
486  * @param contentStr output parameter, receives inferred contentType, or "unknown"
487  * @retval true if URL appears to be a DASH (.mpd), HLS (.m3u8) locator or .mp4/.mp3 format
488  * @retval false with contentStr assigned "unsupported" if URL has unexpected extension
489  */
490 bool AAMPPlayer::setContentType(const std::string &url, std::string& contentStr)
491 {
492  LOG_INFO("setContentType(%s)", url.c_str());
493  int contentId = 0;
494  bool retVal = false;
495 
496 
497  if (strstr(url.c_str(), ".mp4"))
498  {
499  contentStr = "mp4";
500  retVal = true;
501  }
502  else if (strstr(url.c_str(), ".mp3"))
503  {
504  contentStr = "mp3";
505  retVal = true;
506  }
507  else if(url.find(".m3u8") != std::string::npos || url.find(".mpd") != std::string::npos)
508  { // hls (.m3u8) and dash (.mpd) locators supported
509  // scan URL to infer content type
510 
511  if(url.find("cdvr") != std::string::npos)
512  {
513  contentId = 1;
514  contentStr = "cdvr";
515  }
516  else if(url.find("col") != std::string::npos)
517  {
518  contentId = 2;
519  contentStr = "vod";//and help
520  }
521  else if(url.find("linear") != std::string::npos)
522  {
523  contentId = 3;
524  contentStr = "ip-linear";
525  }
526  else if(url.find("ivod") != std::string::npos)
527  {
528  contentId = 4;
529  contentStr = "ivod";
530  }
531  else if(url.find("ip-eas") != std::string::npos)
532  {
533  contentId = 5;
534  contentStr = "ip-eas";
535  }
536  else if(url.find("xfinityhome") != std::string::npos)
537  {
538  contentId = 6;
539  contentStr = "camera";
540  }
541  else
542  {
543  contentStr = "unknown";
544  }
545 
546  retVal = true;
547  }
548  else
549  {
550  contentStr = "unsupported";
551  }
552 
553  LOG_INFO("contentID=%d", contentId);
554  return retVal;
555 }
556 
557 /*
558 void setSessionToken()
559 {
560  char *contents = NULL;
561  FILE *fp = fopen("/opt/AAMPPlayer_session_token.txt", "r");
562  if (fp != NULL)
563  {
564  if (fseek(fp, 0L, SEEK_END) == 0)
565  {
566  long bufsize = ftell(fp);
567  if (bufsize == -1){}
568  contents = new char[bufsize + 1];
569  if (fseek(fp, 0L, SEEK_SET) != 0)
570  {}
571  size_t newLen = fread(contents, sizeof(char), bufsize, fp);
572  if ( ferror( fp ) != 0 )
573  {
574  }
575  else
576  {
577  contents[newLen-2] = '\0';
578  }
579  }
580  fclose(fp);
581 
582  if(contents)
583  {
584  char* token = strstr(contents, "token");
585  if(token)
586  {
587  token += 8;
588  char* tokenString = new char[100000];
589  int t = time(NULL);
590  srand(t);
591  short r = rand() & 0xffff;
592 
593  char temp[100];
594  char msgid[20];
595  sprintf(temp, "%08X%04X", t, r);
596  int i2 = 0;
597  for(int i = 0 ; i < 12; ++i)
598  {
599  if(i==3 || i == 7 || i == 11)
600  {
601  msgid[i2++] = '-';
602  }
603  msgid[i2++] = temp[i];
604  }
605  msgid[15] = 0;
606 
607  char bytes[20];
608  for (int i=0; i<20; i++)
609  bytes[i] = rand() & 0xff;
610  // QString nonce = b.toBase64();
611  sprintf(tokenString,
612  "{\"message:id\":\"15E-6D8-269-5D7\",\"message:type\":\"clientAccess\",\"message:nonce\":\"dmYcSpnudef2U00wYvUxblWsMIk=\",\"client:accessToken\":\"%s\",\"client:mediaUsage\":\"stream\"}", token);
613  LOG_INFO("sending session token");
614  setComcastSessionToken(tokenString);
615  delete tokenString;
616  }
617  else
618  {
619  LOG_INFO("no token /opt/AAMPPlayer_session_token.txt");
620  }
621  delete contents;
622  }
623  else
624  {
625  LOG_INFO("empty /opt/AAMPPlayer_session_token.txt");
626  }
627  }
628  else
629  {
630  LOG_INFO("can't open /opt/AAMPPlayer_session_token.txt");
631  }
632 }
633 */
OnPausedEvent
Definition: rdkmediaplayerimpl.h:205
eSTATE_STOPPED
@ eSTATE_STOPPED
Definition: AampEvent.h:168
OnClosedEvent
Definition: rdkmediaplayerimpl.h:201
RDKMediaPlayer::updateVideoMetadata
void updateVideoMetadata(const std::string &languages, const std::string &speeds, int duration, int width, int height)
This API requests for OnMediaOpenedEvent() to be fired and updates the media data like speed,...
Definition: rdkmediaplayer.cpp:846
eSTATE_INITIALIZED
@ eSTATE_INITIALIZED
Definition: AampEvent.h:160
PlayerInstanceAAMP::SetVideoZoom
void SetVideoZoom(VideoZoomMode zoom)
Set video zoom.
Definition: main_aamp.cpp:1282
OnProgressEvent
Definition: rdkmediaplayerimpl.h:148
AAMP_EVENT_TUNE_FAILED
@ AAMP_EVENT_TUNE_FAILED
Definition: AampEvent.h:48
RDKMediaPlayer
Definition: rdkmediaplayer.h:52
main_aamp.h
Types and APIs exposed by the AAMP player.
eSTATE_PAUSED
@ eSTATE_PAUSED
Definition: AampEvent.h:164
manager.hpp
It contains class referenced by manager.cpp file.
PlayerInstanceAAMP::SetVideoRectangle
void SetVideoRectangle(int x, int y, int w, int h)
Set video rectangle.
Definition: main_aamp.cpp:1270
eSTATE_STOPPING
@ eSTATE_STOPPING
Definition: AampEvent.h:167
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
AAMPPlayer
Definition: aampplayer.h:29
AAMP_EVENT_ENTERING_LIVE
@ AAMP_EVENT_ENTERING_LIVE
Definition: AampEvent.h:56
eSTATE_PREPARED
@ eSTATE_PREPARED
Definition: AampEvent.h:162
eSTATE_PREPARING
@ eSTATE_PREPARING
Definition: AampEvent.h:161
OnPlayingEvent
Definition: rdkmediaplayerimpl.h:204
eSTATE_ERROR
@ eSTATE_ERROR
Definition: AampEvent.h:170
PlayerInstanceAAMP::Seek
void Seek(double secondsRelativeToTuneTime, bool keepPaused=false)
Seek to a time.
Definition: main_aamp.cpp:971
AAMP_EVENT_PLAYLIST_INDEXED
@ AAMP_EVENT_PLAYLIST_INDEXED
Definition: AampEvent.h:51
AAMP_EVENT_STATE_CHANGED
@ AAMP_EVENT_STATE_CHANGED
Definition: AampEvent.h:60
PlayerInstanceAAMP
Player interface class for the JS pluggin.
Definition: main_aamp.h:692
AAMP_EVENT_SPEED_CHANGED
@ AAMP_EVENT_SPEED_CHANGED
Definition: AampEvent.h:49
device::Manager::Initialize
static void Initialize()
This API is used to initialize the Device Setting module. Each API should be called by any client of ...
Definition: manager.cpp:97
OnSpeedChangeEvent
Definition: rdkmediaplayerimpl.h:228
eSTATE_INITIALIZING
@ eSTATE_INITIALIZING
Definition: AampEvent.h:159
OnCompleteEvent
Definition: rdkmediaplayerimpl.h:206
AAMP_EVENT_JS_EVENT
@ AAMP_EVENT_JS_EVENT
Definition: AampEvent.h:54
libIBus.h
RDK IARM-Bus API Declarations.
AAMPEvent
Structure of the AAMP events. Recommend new AAMP integration layers to use AAMPEventObject based list...
Definition: AampEvent.h:204
OnBitrateChanged
Definition: rdkmediaplayerimpl.h:324
PlayerInstanceAAMP::SetAudioVolume
void SetAudioVolume(int volume)
Set Audio Volume.
Definition: main_aamp.cpp:1361
AAMPEvent::type
AAMPEventType type
Definition: AampEvent.h:206
RDKMediaPlayer::onVidHandleReceived
void onVidHandleReceived(uint32_t handle)
This API receives the decoder handle and updates the closedcaption state.
Definition: rdkmediaplayer.cpp:839
AAMPListener::Event
void Event(const AAMPEvent &e)
API in which event payload is received. Will be overridden by application and its event processing is...
Definition: aampplayer.cpp:126
eSTATE_RELEASED
@ eSTATE_RELEASED
Definition: AampEvent.h:171
AAMP_EVENT_EOS
@ AAMP_EVENT_EOS
Definition: AampEvent.h:50
AAMP_EVENT_TUNED
@ AAMP_EVENT_TUNED
Definition: AampEvent.h:47
PlayerInstanceAAMP::SetRate
void SetRate(float rate, int overshootcorrection=0)
Set playback rate.
Definition: main_aamp.cpp:561
videoOutputPort.hpp
It contains class and structure refrenced by the videooutputport.cpp file.
ProgressData
Definition: rdkmediaplayerimpl.h:28
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
RDKMediaPlayerImpl
Definition: rdkmediaplayerimpl.h:40
AAMPEventListener
Class for AAMP event listening [LEGACY] TODO: Deprecate later, AAMPEventObjectListener will be used i...
Definition: AampEventListener.h:57
AAMP_EVENT_CC_HANDLE_RECEIVED
@ AAMP_EVENT_CC_HANDLE_RECEIVED
Definition: AampEvent.h:53
AAMPListener
Definition: aampplayer.cpp:96
RDKMediaPlayer::stop
rtError stop()
This API stops the stream and releases unnecessary resources.
Definition: rdkmediaplayer.cpp:624
OnErrorEvent
Definition: rdkmediaplayerimpl.h:219
AAMP_EVENT_MEDIA_METADATA
@ AAMP_EVENT_MEDIA_METADATA
Definition: AampEvent.h:55
eSTATE_BUFFERING
@ eSTATE_BUFFERING
Definition: AampEvent.h:163
LOG_INFO
#define LOG_INFO(AAMP_JS_OBJECT, FORMAT,...)
Definition: jsutils.h:39
IntRect
Definition: intrect.h:22
eSTATE_IDLE
@ eSTATE_IDLE
Definition: AampEvent.h:158
RDKMediaPlayer::getEventEmitter
EventEmitter & getEventEmitter()
This function is used to trigger the events.
Definition: rdkmediaplayer.cpp:834
PlayerInstanceAAMP::Stop
void Stop(bool sendStateChangeEvent=true)
Stop playback and release resources.
Definition: main_aamp.cpp:282
IARM_Bus_Connect
IARM_Result_t IARM_Bus_Connect(void)
This API is used to connect application to the IARM bus daemon. After connected, the application can ...
Definition: iarmMgrMocks.cpp:33
AAMPPlayer::setContentType
static bool setContentType(const std::string &uri, std::string &contentType)
Definition: aampplayer.cpp:490
AAMP_EVENT_TIMED_METADATA
@ AAMP_EVENT_TIMED_METADATA
Definition: AampEvent.h:58
AAMP_EVENT_PROGRESS
@ AAMP_EVENT_PROGRESS
Definition: AampEvent.h:52
PlayerInstanceAAMP::SeekToLive
void SeekToLive(bool keepPaused=false)
Seek to live point.
Definition: main_aamp.cpp:1144
PlayerInstanceAAMP::RegisterEvents
void RegisterEvents(EventListener *eventListener)
Register event handler.
Definition: main_aamp.cpp:403
eSTATE_PLAYING
@ eSTATE_PLAYING
Definition: AampEvent.h:166
AAMP_EVENT_BITRATE_CHANGED
@ AAMP_EVENT_BITRATE_CHANGED
Definition: AampEvent.h:57
IARM_Bus_Init
IARM_Result_t IARM_Bus_Init(const char *name)
This API is used to initialize the IARM-Bus library.
Definition: iarmMgrMocks.cpp:38
eSTATE_COMPLETE
@ eSTATE_COMPLETE
Definition: AampEvent.h:169
eSTATE_SEEKING
@ eSTATE_SEEKING
Definition: AampEvent.h:165