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

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

Issue 11087063: Merge 159571 - Support reading pixels from HW-decoded video textures into canvas/webgl. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1271/src/
Patch Set: Created 8 years, 2 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/filters/gpu_video_decoder.cc ('k') | webkit/media/skcanvas_video_renderer.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 <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 void WebMediaPlayerAndroid::OnVideoSizeChanged(int width, int height) { 448 void WebMediaPlayerAndroid::OnVideoSizeChanged(int width, int height) {
449 if (natural_size_.width == width && natural_size_.height == height) 449 if (natural_size_.width == width && natural_size_.height == height)
450 return; 450 return;
451 451
452 natural_size_.width = width; 452 natural_size_.width = width;
453 natural_size_.height = height; 453 natural_size_.height = height;
454 if (texture_id_) { 454 if (texture_id_) {
455 video_frame_.reset(new WebVideoFrameImpl(VideoFrame::WrapNativeTexture( 455 video_frame_.reset(new WebVideoFrameImpl(VideoFrame::WrapNativeTexture(
456 texture_id_, kGLTextureExternalOES, natural_size_, natural_size_, 456 texture_id_, kGLTextureExternalOES, natural_size_, natural_size_,
457 base::TimeDelta(), 457 base::TimeDelta(),
458 VideoFrame::ReadPixelsCB(),
458 base::Closure()))); 459 base::Closure())));
459 } 460 }
460 } 461 }
461 462
462 void WebMediaPlayerAndroid::UpdateNetworkState( 463 void WebMediaPlayerAndroid::UpdateNetworkState(
463 WebMediaPlayer::NetworkState state) { 464 WebMediaPlayer::NetworkState state) {
464 network_state_ = state; 465 network_state_ = state;
465 client_->networkStateChanged(); 466 client_->networkStateChanged();
466 } 467 }
467 468
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 } 562 }
562 563
563 // This gets called both on compositor and main thread. 564 // This gets called both on compositor and main thread.
564 void WebMediaPlayerAndroid::setStreamTextureClient( 565 void WebMediaPlayerAndroid::setStreamTextureClient(
565 WebKit::WebStreamTextureClient* client) { 566 WebKit::WebStreamTextureClient* client) {
566 if (stream_texture_proxy_.get()) 567 if (stream_texture_proxy_.get())
567 stream_texture_proxy_->SetClient(client); 568 stream_texture_proxy_->SetClient(client);
568 } 569 }
569 570
570 } // namespace webkit_media 571 } // namespace webkit_media
OLDNEW
« no previous file with comments | « media/filters/gpu_video_decoder.cc ('k') | webkit/media/skcanvas_video_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698