28 #ifndef NATIVE_PLAYER_INC_PLAYER_URL_PLAYER_URL_PLAYER_CONTROLLER_H_ 29 #define NATIVE_PLAYER_INC_PLAYER_URL_PLAYER_URL_PLAYER_CONTROLLER_H_ 36 #include "nacl_player/media_player.h" 37 #include "nacl_player/media_data_source.h" 38 #include "ppapi/cpp/instance.h" 39 #include "ppapi/utility/threading/simple_thread.h" 40 #include "ppapi/utility/completion_callback_factory.h" 93 std::shared_ptr<Communication::MessageSender> message_sender)
97 subtitles_visible_(true),
98 message_sender_(std::move(message_sender)),
118 void InitPlayer(
const std::string& url,
const std::string& subtitle = {},
119 const std::string& encoding = {});
121 void Play()
override;
122 void Pause()
override;
123 void Seek(Samsung::NaClPlayer::TimeTicks to_time)
override;
125 void SetViewRect(
const Samsung::NaClPlayer::Rect& view_rect)
override;
140 void OnSetDisplayRect(int32_t );
142 void OnSeek(int32_t );
144 void OnChangeSubtitles(int32_t , int32_t
id);
146 void OnChangeSubVisibility(int32_t ,
bool show);
150 pp::InstanceHandle instance_;
151 std::unique_ptr<pp::SimpleThread> player_thread_;
152 pp::CompletionCallbackFactory<UrlPlayerController> cc_factory_;
156 std::shared_ptr<Samsung::NaClPlayer::MediaDataSource> data_source_;
157 std::shared_ptr<Samsung::NaClPlayer::MediaPlayer> player_;
158 std::unique_ptr<Samsung::NaClPlayer::TextTrackInfo> text_track_;
159 std::vector<Samsung::NaClPlayer::TextTrackInfo> text_track_list_;
160 bool subtitles_visible_;
162 std::shared_ptr<Communication::MessageSender> message_sender_;
165 Samsung::NaClPlayer::Rect view_rect_;
168 #endif // NATIVE_PLAYER_INC_PLAYER_URL_PLAYER_URL_PLAYER_CONTROLLER_H_
void PostTextTrackInfo() override
UrlPlayerController(const pp::InstanceHandle &instance, std::shared_ptr< Communication::MessageSender > message_sender)
It is a definition of the player controlling interface.
This file defines the PlayerController class.
void ChangeRepresentation(StreamType stream_type, int32_t id) override
This class controls NaCl Player in the playback from the URL scenario.
It aggregates implementation of all basic listeners required by NaClPlayer.
void InitPlayer(const std::string &url, const std::string &subtitle={}, const std::string &encoding={})
void Seek(Samsung::NaClPlayer::TimeTicks to_time) override
void Play() override
Orders the player to start/resume playback of the loaded content.
void SetViewRect(const Samsung::NaClPlayer::Rect &view_rect) override
void ChangeSubtitles(int32_t id) override
void ChangeSubtitleVisibility() override
Orders the player to start or stop generating events related to subtitles.
void InitializeUrlPlayer(const std::string &content_container_url)
This file defines a MessageSender class.
PlayerState GetState() override
void Pause() override
Orders the player to pause playback of the content.