28 #ifndef NATIVE_PLAYER_INC_PLAYER_PLAYER_LISTENERS_H_ 29 #define NATIVE_PLAYER_INC_PLAYER_PLAYER_LISTENERS_H_ 33 #include "nacl_player/buffering_listener.h" 34 #include "nacl_player/media_events_listener.h" 35 #include "nacl_player/subtitle_listener.h" 36 #include "ppapi/cpp/var.h" 58 std::weak_ptr<Communication::MessageSender> message_sender)
59 : message_sender_(std::move(message_sender)) {}
70 void OnShowSubtitle(Samsung::NaClPlayer::TimeTicks time,
const char* text)
74 std::weak_ptr<Communication::MessageSender> message_sender_;
89 std::weak_ptr<Communication::MessageSender> message_sender)
90 : message_sender_(std::move(message_sender)) {}
98 void OnTimeUpdate(Samsung::NaClPlayer::TimeTicks time)
override;
103 void OnEnded()
override;
110 void OnError(Samsung::NaClPlayer::MediaPlayerError error)
override;
113 std::weak_ptr<Communication::MessageSender> message_sender_;
131 std::weak_ptr<Communication::MessageSender> message_sender,
132 std::weak_ptr<PlayerController> player_controller = {})
133 : message_sender_(std::move(message_sender)),
134 player_controller_(std::move(player_controller)) {}
139 void OnBufferingStart()
override;
148 void OnBufferingProgress(uint32_t percent)
override;
159 void OnBufferingComplete()
override;
162 std::weak_ptr<Communication::MessageSender> message_sender_;
163 std::weak_ptr<PlayerController> player_controller_;
175 #endif // NATIVE_PLAYER_INC_PLAYER_PLAYER_LISTENERS_H_ This file defines SubtitleListener, MediaPlayerListener, MediaBufferingListener classes and PlayerLis...
This file defines the PlayerController class.
SubtitleListener(std::weak_ptr< Communication::MessageSender > message_sender)
It aggregates implementation of all basic listeners required by NaClPlayer.
std::shared_ptr< MediaBufferingListener > buffering_listener
std::shared_ptr< SubtitleListener > subtitle_listener
This file defines a MessageSender class.
std::shared_ptr< MediaPlayerListener > player_listener
void OnShowSubtitle(Samsung::NaClPlayer::TimeTicks time, const char *text) override