Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: webkit/renderer/media/android/webmediaplayer_android.cc

Issue 16098014: Handle config changes for MSE on android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/renderer/media/android/webmediaplayer_android.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/renderer/media/android/webmediaplayer_android.h" 5 #include "webkit/renderer/media/android/webmediaplayer_android.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 void WebMediaPlayerAndroid::OnMediaPlayerPlay() { 582 void WebMediaPlayerAndroid::OnMediaPlayerPlay() {
583 UpdatePlayingState(true); 583 UpdatePlayingState(true);
584 client_->playbackStateChanged(); 584 client_->playbackStateChanged();
585 } 585 }
586 586
587 void WebMediaPlayerAndroid::OnMediaPlayerPause() { 587 void WebMediaPlayerAndroid::OnMediaPlayerPause() {
588 UpdatePlayingState(false); 588 UpdatePlayingState(false);
589 client_->playbackStateChanged(); 589 client_->playbackStateChanged();
590 } 590 }
591 591
592 void WebMediaPlayerAndroid::OnMediaSeekRequest(base::TimeDelta time_to_seek, 592 void WebMediaPlayerAndroid::OnMediaSeekRequest(base::TimeDelta time_to_seek) {
593 bool request_texture_peer) {
594 if (!media_source_delegate_) 593 if (!media_source_delegate_)
595 return; 594 return;
596 595
597 if (!seeking_) 596 if (!seeking_)
598 media_source_delegate_->CancelPendingSeek(); 597 media_source_delegate_->CancelPendingSeek();
599 media_source_delegate_->Seek(time_to_seek); 598 media_source_delegate_->Seek(time_to_seek);
600 OnTimeUpdate(time_to_seek); 599 OnTimeUpdate(time_to_seek);
601 if (request_texture_peer) 600 }
602 EstablishSurfaceTexturePeer(); 601
602 void WebMediaPlayerAndroid::OnMediaConfigRequest() {
603 if (!media_source_delegate_)
604 return;
605
606 media_source_delegate_->OnMediaConfigRequest();
603 } 607 }
604 608
605 void WebMediaPlayerAndroid::UpdateNetworkState( 609 void WebMediaPlayerAndroid::UpdateNetworkState(
606 WebMediaPlayer::NetworkState state) { 610 WebMediaPlayer::NetworkState state) {
607 if (ready_state_ == WebMediaPlayer::ReadyStateHaveNothing && 611 if (ready_state_ == WebMediaPlayer::ReadyStateHaveNothing &&
608 (state == WebMediaPlayer::NetworkStateNetworkError || 612 (state == WebMediaPlayer::NetworkStateNetworkError ||
609 state == WebMediaPlayer::NetworkStateDecodeError)) { 613 state == WebMediaPlayer::NetworkStateDecodeError)) {
610 // Any error that occurs before reaching ReadyStateHaveMetadata should 614 // Any error that occurs before reaching ReadyStateHaveMetadata should
611 // be considered a format error. 615 // be considered a format error.
612 network_state_ = WebMediaPlayer::NetworkStateFormatError; 616 network_state_ = WebMediaPlayer::NetworkStateFormatError;
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 void WebMediaPlayerAndroid::exitFullscreen() { 1072 void WebMediaPlayerAndroid::exitFullscreen() {
1069 if (proxy_) 1073 if (proxy_)
1070 proxy_->ExitFullscreen(player_id_); 1074 proxy_->ExitFullscreen(player_id_);
1071 } 1075 }
1072 1076
1073 bool WebMediaPlayerAndroid::canEnterFullscreen() const { 1077 bool WebMediaPlayerAndroid::canEnterFullscreen() const {
1074 return manager_->CanEnterFullscreen(frame_); 1078 return manager_->CanEnterFullscreen(frame_);
1075 } 1079 }
1076 1080
1077 } // namespace webkit_media 1081 } // namespace webkit_media
OLDNEW
« no previous file with comments | « webkit/renderer/media/android/webmediaplayer_android.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698