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

Side by Side Diff: media/base/android/media_player_bridge.cc

Issue 196133020: Reducing the IPC latency for MSE video decoding (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressing comments Created 6 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "media/base/android/media_player_bridge.h" 5 #include "media/base/android/media_player_bridge.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 } 260 }
261 261
262 int MediaPlayerBridge::GetVideoHeight() { 262 int MediaPlayerBridge::GetVideoHeight() {
263 if (!prepared_) 263 if (!prepared_)
264 return height_; 264 return height_;
265 JNIEnv* env = base::android::AttachCurrentThread(); 265 JNIEnv* env = base::android::AttachCurrentThread();
266 return Java_MediaPlayerBridge_getVideoHeight( 266 return Java_MediaPlayerBridge_getVideoHeight(
267 env, j_media_player_bridge_.obj()); 267 env, j_media_player_bridge_.obj());
268 } 268 }
269 269
270 void MediaPlayerBridge::SeekTo(const base::TimeDelta& timestamp) { 270 void MediaPlayerBridge::SeekTo(base::TimeDelta timestamp) {
271 // Record the time to seek when OnMediaPrepared() is called. 271 // Record the time to seek when OnMediaPrepared() is called.
272 pending_seek_ = timestamp; 272 pending_seek_ = timestamp;
273 273
274 if (j_media_player_bridge_.is_null()) 274 if (j_media_player_bridge_.is_null())
275 Prepare(); 275 Prepare();
276 else if (prepared_) 276 else if (prepared_)
277 SeekInternal(timestamp); 277 SeekInternal(timestamp);
278 } 278 }
279 279
280 base::TimeDelta MediaPlayerBridge::GetCurrentTime() { 280 base::TimeDelta MediaPlayerBridge::GetCurrentTime() {
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 464
465 GURL MediaPlayerBridge::GetFirstPartyForCookies() { 465 GURL MediaPlayerBridge::GetFirstPartyForCookies() {
466 return first_party_for_cookies_; 466 return first_party_for_cookies_;
467 } 467 }
468 468
469 bool MediaPlayerBridge::IsSurfaceInUse() const { 469 bool MediaPlayerBridge::IsSurfaceInUse() const {
470 return is_surface_in_use_; 470 return is_surface_in_use_;
471 } 471 }
472 472
473 } // namespace media 473 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698