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

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

Issue 11269017: Plumb through cropped output size for VideoFrame (Closed) Base URL: https://git.chromium.org/git/chromium/src@git-svn
Patch Set: Found the windows failure, and fixed it. Thanks akalin@ Created 8 years, 1 month 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
« no previous file with comments | « media/tools/shader_bench/shader_bench.cc ('k') | webkit/media/simple_video_frame_provider.cc » ('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 "webkit/media/android/webmediaplayer_android.h" 5 #include "webkit/media/android/webmediaplayer_android.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "media/base/android/media_player_bridge.h" 9 #include "media/base/android/media_player_bridge.h"
10 #include "net/base/mime_util.h" 10 #include "net/base/mime_util.h"
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 if (manager_) 369 if (manager_)
370 manager_->UnregisterMediaPlayer(player_id_); 370 manager_->UnregisterMediaPlayer(player_id_);
371 371
372 manager_ = NULL; 372 manager_ = NULL;
373 main_loop_ = NULL; 373 main_loop_ = NULL;
374 } 374 }
375 375
376 void WebMediaPlayerAndroid::ReallocateVideoFrame() { 376 void WebMediaPlayerAndroid::ReallocateVideoFrame() {
377 if (texture_id_) { 377 if (texture_id_) {
378 video_frame_.reset(new WebVideoFrameImpl(VideoFrame::WrapNativeTexture( 378 video_frame_.reset(new WebVideoFrameImpl(VideoFrame::WrapNativeTexture(
379 texture_id_, kGLTextureExternalOES, natural_size_, natural_size_, 379 texture_id_, kGLTextureExternalOES, natural_size_,
380 base::TimeDelta(), 380 gfx::Rect(natural_size_), natural_size_, base::TimeDelta(),
381 VideoFrame::ReadPixelsCB(), 381 VideoFrame::ReadPixelsCB(),
382 base::Closure()))); 382 base::Closure())));
383 } 383 }
384 } 384 }
385 385
386 WebVideoFrame* WebMediaPlayerAndroid::getCurrentFrame() { 386 WebVideoFrame* WebMediaPlayerAndroid::getCurrentFrame() {
387 if (stream_texture_proxy_.get() && !stream_texture_proxy_->IsInitialized() 387 if (stream_texture_proxy_.get() && !stream_texture_proxy_->IsInitialized()
388 && stream_id_) { 388 && stream_id_) {
389 stream_texture_proxy_->Initialize( 389 stream_texture_proxy_->Initialize(
390 stream_id_, video_frame_->width(), video_frame_->height()); 390 stream_id_, video_frame_->width(), video_frame_->height());
(...skipping 20 matching lines...) Expand all
411 411
412 void WebMediaPlayerAndroid::SetNeedsEstablishPeer(bool needs_establish_peer) { 412 void WebMediaPlayerAndroid::SetNeedsEstablishPeer(bool needs_establish_peer) {
413 needs_establish_peer_ = needs_establish_peer; 413 needs_establish_peer_ = needs_establish_peer;
414 } 414 }
415 415
416 void WebMediaPlayerAndroid::UpdatePlayingState(bool is_playing) { 416 void WebMediaPlayerAndroid::UpdatePlayingState(bool is_playing) {
417 is_playing_ = is_playing; 417 is_playing_ = is_playing;
418 } 418 }
419 419
420 } // namespace webkit_media 420 } // namespace webkit_media
OLDNEW
« no previous file with comments | « media/tools/shader_bench/shader_bench.cc ('k') | webkit/media/simple_video_frame_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698