playback_rate_ = playback_rate;
- // TODO: Random error is observed on TM1.
- // EsppPlayer::GetEsppPlayer()->SetRate(playback_rate_);
-
- if (playback_rate > 0)
+ if (playback_rate > 0) {
+ GetPlayer()->SetRate(playback_rate_);
GetPlayer()->Play();
- else
+ } else {
GetPlayer()->Pause();
+ }
}
void TizenRendererImpl::SetVolume(float volume) {
is_seeking_(false),
is_play_pending_(false),
is_initialized_(false),
+ is_set_playback_rate_delayed_(false),
duration_(0),
playback_time_(0),
seek_duration_(0),
return;
}
+ if (GetPlayerState() < PLAYER_STATE_READY) {
+ delayed_player_state_ = PLAYER_STATE_DELAYED_PLAY;
+ return;
+ }
+
if (playback_rate_ == 0.0) {
is_paused_ = false;
return;
}
+ if (is_set_playback_rate_delayed_) {
+ is_set_playback_rate_delayed_ = false;
+ SetRate(playback_rate_);
+ }
+
if (player_start(player_) != PLAYER_ERROR_NONE) {
LOG(ERROR) << "|player_start| failed";
return;
return;
}
+ if (GetPlayerState() < PLAYER_STATE_READY) {
+ playback_rate_ = rate;
+ is_set_playback_rate_delayed_ = true;
+ return;
+ }
+
if (!is_file_url_ &&
player_set_streaming_playback_rate(player_, static_cast<float>(rate)) !=
PLAYER_ERROR_NONE) {
bool is_play_pending_;
bool is_player_released_;
bool is_initialized_;
+ bool is_set_playback_rate_delayed_;
double duration_;
double playback_time_;
int error =
esplusplayer_set_playback_rate(esplayer_, playback_rate_, should_mute);
if (error != ESPLUSPLAYER_ERROR_TYPE_NONE) {
- LOG(ERROR) << "player pause failed! error #"
+ LOG(ERROR) << "player set playback rate failed! error #"
<< esplusplayer_get_error_string(
static_cast<esplusplayer_error_type>(error));
return;
last_frames_;
double volume_ = 1.0;
- bool playback_rate_ = 0.0;
+ double playback_rate_ = 0.0;
bool is_prepared_ = false;
bool is_preparing_ = false;
bool is_paused_ = true;