RDK Documentation (Open Sourced RDK Components)
aampplayer.h
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 #ifndef AAMPMEDIAPLAYER_H
20 #define AAMPMEDIAPLAYER_H
21 
22 #include "rdkmediaplayerimpl.h"
23 
24 class RDKMediaPlayer;
25 class AAMPListener;
26 class AAMPEvent;
27 class PlayerInstanceAAMP;
28 
30 {
31 public:
32  AAMPPlayer(RDKMediaPlayer* parent);
33  ~AAMPPlayer();
34  static bool canPlayURL(const std::string& url);
35 
36  //RDKMediaPlayerImpl interface
37  bool doCanPlayURL(const std::string& url);
38  void doInit();
39  void doLoad(const std::string& url);
40  void doSetVideoRectangle(const IntRect& rect);
41  void doSetAudioLanguage(std::string& lang);
42  void doPlay();
43  void doPause();
44  void doSetPosition(float position);
45  void doSeekToLive();
46  void doStop();
47  void doChangeSpeed(float speed, int32_t overshootTime);
48  void doSetSpeed(float speed);
49  void doSetBlocked(bool blocked);
50  void doSetEISSFilterStatus(bool status);
51  void doSetVolume(float volume);
52  void doSetIsInProgressRecording(bool isInProgressRecording);
53  void doSetZoom(int zoom);
54  void doSetNetworkBufferSize(int32_t networkBufferSize);
55  void doSetVideoBufferLength(float videoBufferLength);
56  void getProgressData(ProgressData* progressData);
57  bool isManagementSession() const { return false; };
58 private:
59  static bool setContentType(const std::string &uri, std::string& contentType);
60  void onProgress(const AAMPEvent& progressEvent);
61  PlayerInstanceAAMP* m_aampInstance;
62  AAMPListener* m_aampListener;
63  ProgressData m_progressData;
64  friend class AAMPListener;
65 };
66 
67 #endif
RDKMediaPlayer
Definition: rdkmediaplayer.h:52
AAMPPlayer
Definition: aampplayer.h:29
PlayerInstanceAAMP
Player interface class for the JS pluggin.
Definition: main_aamp.h:692
AAMPEvent
Structure of the AAMP events. Recommend new AAMP integration layers to use AAMPEventObject based list...
Definition: AampEvent.h:204
ProgressData
Definition: rdkmediaplayerimpl.h:28
RDKMediaPlayerImpl
Definition: rdkmediaplayerimpl.h:40
AAMPListener
Definition: aampplayer.cpp:96
IntRect
Definition: intrect.h:22
AAMPPlayer::setContentType
static bool setContentType(const std::string &uri, std::string &contentType)
Definition: aampplayer.cpp:490