Native Player  1.0
player_controller.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 //
3 // Copyright (c) 2016, Samsung Electronics Co., Ltd
4 //
5 // Permission is hereby granted, free of charge, to any person obtaining a copy
6 // of this software and associated documentation files (the "Software"), to
7 // deal in the Software without restriction, including without limitation the
8 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9 // sell copies of the Software, and to permit persons to whom the Software is
10 // furnished to do so, subject to the following conditions:
11 //
12 // The above copyright notice and this permission notice shall be included in
13 // all copies or substantial portions of the Software.
14 //
15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM
20 // , OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 // THE SOFTWARE.
22 //
23 // @author Tomasz Borkowski
24 // Michal Murgrabia
25 //
26 // ----------------------------------------------------------------------------
27 
28 #ifndef NATIVE_PLAYER_INC_PLAYER_PLAYER_CONROLLER_H_
29 #define NATIVE_PLAYER_INC_PLAYER_PLAYER_CONROLLER_H_
30 
31 #include <vector>
32 
33 #include "common.h"
34 #include "nacl_player/media_common.h"
35 
38 
41 
43  public:
46  enum class PlayerState {
50 
52  kReady,
53 
56  kPaused,
57 
59  kPlaying,
60 
63  kError
64  };
65 
68 
70  virtual ~PlayerController() {}
71 
73  virtual void Play() = 0;
74 
76  virtual void Pause() = 0;
77 
82  virtual void Seek(Samsung::NaClPlayer::TimeTicks to_time) = 0;
83 
90  virtual void ChangeRepresentation(StreamType stream_type, int32_t id) = 0;
91 
95  virtual void SetViewRect(const Samsung::NaClPlayer::Rect& view_rect) = 0;
96 
99  virtual void PostTextTrackInfo() = 0;
100 
105  virtual void ChangeSubtitles(int32_t id) = 0;
106 
108  virtual void ChangeSubtitleVisibility() = 0;
109 
112  virtual PlayerState GetState() = 0;
113 };
114 
115 #endif // NATIVE_PLAYER_INC_PLAYER_PLAYER_CONROLLER_H_
StreamType
Definition: common.h:55
virtual void PostTextTrackInfo()=0
PlayerController()
Creates a PlayerController object.
In this state PlayerController is ready to use.
virtual PlayerState GetState()=0
It is a definition of the player controlling interface.
virtual void Pause()=0
Orders the player to pause playback of the content.
virtual void ChangeSubtitleVisibility()=0
Orders the player to start or stop generating events related to subtitles.
virtual void ChangeSubtitles(int32_t id)=0
virtual void Play()=0
Orders the player to start/resume playback of the loaded content.
virtual void Seek(Samsung::NaClPlayer::TimeTicks to_time)=0
virtual void ChangeRepresentation(StreamType stream_type, int32_t id)=0
In this state PlayerController plays the content.
virtual void SetViewRect(const Samsung::NaClPlayer::Rect &view_rect)=0
virtual ~PlayerController()
Destroys the PlayerController object.