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

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

Issue 10824141: Remove VideoDecoder::natural_size() & added VideoFrame::natural_size(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor cleanup Created 8 years, 4 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 "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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 } 442 }
443 443
444 void WebMediaPlayerAndroid::OnMediaInfo(int info_type) { 444 void WebMediaPlayerAndroid::OnMediaInfo(int info_type) {
445 NOTIMPLEMENTED(); 445 NOTIMPLEMENTED();
446 } 446 }
447 447
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_.SetSize(width, height);
453 natural_size_.height = height;
454 if (texture_id_) { 453 if (texture_id_) {
455 video_frame_.reset(new WebVideoFrameImpl(VideoFrame::WrapNativeTexture( 454 video_frame_.reset(new WebVideoFrameImpl(VideoFrame::WrapNativeTexture(
456 texture_id_, kGLTextureExternalOES, width, height, base::TimeDelta(), 455 texture_id_, kGLTextureExternalOES, natural_size_, natural_size_,
456 base::TimeDelta(),
457 base::Closure()))); 457 base::Closure())));
458 } 458 }
459 } 459 }
460 460
461 void WebMediaPlayerAndroid::UpdateNetworkState( 461 void WebMediaPlayerAndroid::UpdateNetworkState(
462 WebMediaPlayer::NetworkState state) { 462 WebMediaPlayer::NetworkState state) {
463 network_state_ = state; 463 network_state_ = state;
464 client_->networkStateChanged(); 464 client_->networkStateChanged();
465 } 465 }
466 466
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 } 560 }
561 561
562 // This gets called both on compositor and main thread. 562 // This gets called both on compositor and main thread.
563 void WebMediaPlayerAndroid::setStreamTextureClient( 563 void WebMediaPlayerAndroid::setStreamTextureClient(
564 WebKit::WebStreamTextureClient* client) { 564 WebKit::WebStreamTextureClient* client) {
565 if (stream_texture_proxy_.get()) 565 if (stream_texture_proxy_.get())
566 stream_texture_proxy_->SetClient(client); 566 stream_texture_proxy_->SetClient(client);
567 } 567 }
568 568
569 } // namespace webkit_media 569 } // namespace webkit_media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698