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

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: fix clang warning 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
« no previous file with comments | « media/base/android/media_player_bridge.h ('k') | media/base/android/media_source_player.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 } 269 }
270 270
271 int MediaPlayerBridge::GetVideoHeight() { 271 int MediaPlayerBridge::GetVideoHeight() {
272 if (!prepared_) 272 if (!prepared_)
273 return height_; 273 return height_;
274 JNIEnv* env = base::android::AttachCurrentThread(); 274 JNIEnv* env = base::android::AttachCurrentThread();
275 return Java_MediaPlayerBridge_getVideoHeight( 275 return Java_MediaPlayerBridge_getVideoHeight(
276 env, j_media_player_bridge_.obj()); 276 env, j_media_player_bridge_.obj());
277 } 277 }
278 278
279 void MediaPlayerBridge::SeekTo(const base::TimeDelta& timestamp) { 279 void MediaPlayerBridge::SeekTo(base::TimeDelta timestamp) {
280 // Record the time to seek when OnMediaPrepared() is called. 280 // Record the time to seek when OnMediaPrepared() is called.
281 pending_seek_ = timestamp; 281 pending_seek_ = timestamp;
282 282
283 if (j_media_player_bridge_.is_null()) 283 if (j_media_player_bridge_.is_null())
284 Prepare(); 284 Prepare();
285 else if (prepared_) 285 else if (prepared_)
286 SeekInternal(timestamp); 286 SeekInternal(timestamp);
287 } 287 }
288 288
289 base::TimeDelta MediaPlayerBridge::GetCurrentTime() { 289 base::TimeDelta MediaPlayerBridge::GetCurrentTime() {
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 473
474 GURL MediaPlayerBridge::GetFirstPartyForCookies() { 474 GURL MediaPlayerBridge::GetFirstPartyForCookies() {
475 return first_party_for_cookies_; 475 return first_party_for_cookies_;
476 } 476 }
477 477
478 bool MediaPlayerBridge::IsSurfaceInUse() const { 478 bool MediaPlayerBridge::IsSurfaceInUse() const {
479 return is_surface_in_use_; 479 return is_surface_in_use_;
480 } 480 }
481 481
482 } // namespace media 482 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/media_player_bridge.h ('k') | media/base/android/media_source_player.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698