28 #ifndef NATIVE_PLAYER_INC_PLAYER_ES_DASH_PLAYER_ES_DASH_PLAYER_CONTROLLER_H_ 29 #define NATIVE_PLAYER_INC_PLAYER_ES_DASH_PLAYER_ES_DASH_PLAYER_CONTROLLER_H_ 36 #include "nacl_player/es_data_source.h" 37 #include "nacl_player/media_data_source.h" 38 #include "nacl_player/media_player.h" 39 #include "ppapi/cpp/instance.h" 40 #include "ppapi/utility/completion_callback_factory.h" 41 #include "ppapi/utility/threading/simple_thread.h" 84 public std::enable_shared_from_this<PlayerController> {
100 std::shared_ptr<Communication::MessageSender> message_sender)
104 subtitles_visible_(true),
105 message_sender_(message_sender),
132 void InitPlayer(
const std::string& url,
const std::string& subtitle = {},
133 const std::string& encoding = {});
136 void Play()
override;
137 void Pause()
override;
138 void Seek(Samsung::NaClPlayer::TimeTicks to_time)
override;
140 void SetViewRect(
const Samsung::NaClPlayer::Rect& view_rect)
override;
170 void OnChangeRepresentation(int32_t ,
StreamType type, int32_t
id);
181 const std::string& encoding);
197 void InitializeVideoStream(Samsung::NaClPlayer::DRMType );
199 void InitializeAudioStream(Samsung::NaClPlayer::DRMType );
201 void OnSetDisplayRect(int32_t );
203 void OnSeek(int32_t );
205 void OnChangeSubtitles(int32_t , int32_t
id);
207 void OnChangeSubVisibility(int32_t ,
bool show);
211 pp::InstanceHandle instance_;
212 std::unique_ptr<pp::SimpleThread> player_thread_;
213 pp::CompletionCallbackFactory<EsDashPlayerController> cc_factory_;
217 std::shared_ptr<Samsung::NaClPlayer::ESDataSource> data_source_;
218 std::shared_ptr<Samsung::NaClPlayer::MediaPlayer> player_;
219 std::unique_ptr<Samsung::NaClPlayer::TextTrackInfo> text_track_;
220 std::vector<Samsung::NaClPlayer::TextTrackInfo> text_track_list_;
221 bool subtitles_visible_;
223 std::shared_ptr<Communication::MessageSender> message_sender_;
226 Samsung::NaClPlayer::Rect view_rect_;
228 std::unique_ptr<DashManifest> dash_parser_;
229 std::array<std::shared_ptr<StreamManager>,
231 std::vector<VideoStream> video_representations_;
232 std::vector<AudioStream> audio_representations_;
235 #endif // NATIVE_PLAYER_INC_PLAYER_ES_DASH_PLAYER_ES_DASH_PLAYER_CONTROLLER_H_
void ChangeRepresentation(StreamType stream_type, int32_t id) override
It is a definition of the player controlling interface.
This file defines the PlayerController class.
void OnStreamConfigured(StreamType type)
This file defines the StreamManager class.
It aggregates implementation of all basic listeners required by NaClPlayer.
This class controls NaCl Player in the elementary stream playback scenario with DASH support...
void InitializeDash(const std::string &mpd_file_path)
void Play() override
Orders the player to start/resume playback of the loaded content.
void ChangeSubtitles(int32_t id) override
void InitializeStreams(int32_t)
void Pause() override
Orders the player to pause playback of the content.
void UpdateStreamsBuffer(int32_t)
EsDashPlayerController(const pp::InstanceHandle &instance, std::shared_ptr< Communication::MessageSender > message_sender)
PlayerState GetState() override
This file defines DashManifest class.
void PostTextTrackInfo() override
~EsDashPlayerController() override
void FinishStreamConfiguration()
void InitializeSubtitles(const std::string &subtitle, const std::string &encoding)
This file defines a MessageSender class.
void ChangeSubtitleVisibility() override
Orders the player to start or stop generating events related to subtitles.
void SetViewRect(const Samsung::NaClPlayer::Rect &view_rect) override
void InitPlayer(const std::string &url, const std::string &subtitle={}, const std::string &encoding={})
void Seek(Samsung::NaClPlayer::TimeTicks to_time) override