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

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

Issue 10832087: Remove VideoDecoderConfig.frame_rate_xxx() & VideoFrame:Get/SetDuration() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address more CR comments. 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
« no previous file with comments | « media/tools/shader_bench/shader_bench.cc ('k') | no next file » | 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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 DCHECK(!stream_id_); 535 DCHECK(!stream_id_);
536 DCHECK(!texture_id_); 536 DCHECK(!texture_id_);
537 stream_id_ = stream_texture_factory_->CreateStreamTexture(&texture_id_); 537 stream_id_ = stream_texture_factory_->CreateStreamTexture(&texture_id_);
538 if (texture_id_) 538 if (texture_id_)
539 video_frame_.reset(new WebVideoFrameImpl(VideoFrame::WrapNativeTexture( 539 video_frame_.reset(new WebVideoFrameImpl(VideoFrame::WrapNativeTexture(
540 texture_id_, 540 texture_id_,
541 kGLTextureExternalOES, 541 kGLTextureExternalOES,
542 texture_size_.width, 542 texture_size_.width,
543 texture_size_.height, 543 texture_size_.height,
544 base::TimeDelta(), 544 base::TimeDelta(),
545 base::TimeDelta(),
546 base::Bind(&WebMediaPlayerAndroid::DestroyStreamTexture, 545 base::Bind(&WebMediaPlayerAndroid::DestroyStreamTexture,
547 base::Unretained(this))))); 546 base::Unretained(this)))));
548 } 547 }
549 548
550 void WebMediaPlayerAndroid::DestroyStreamTexture() { 549 void WebMediaPlayerAndroid::DestroyStreamTexture() {
551 DCHECK(stream_id_); 550 DCHECK(stream_id_);
552 DCHECK(texture_id_); 551 DCHECK(texture_id_);
553 stream_texture_factory_->DestroyStreamTexture(texture_id_); 552 stream_texture_factory_->DestroyStreamTexture(texture_id_);
554 texture_id_ = 0; 553 texture_id_ = 0;
555 stream_id_ = 0; 554 stream_id_ = 0;
(...skipping 18 matching lines...) Expand all
574 } 573 }
575 574
576 // This gets called both on compositor and main thread. 575 // This gets called both on compositor and main thread.
577 void WebMediaPlayerAndroid::setStreamTextureClient( 576 void WebMediaPlayerAndroid::setStreamTextureClient(
578 WebKit::WebStreamTextureClient* client) { 577 WebKit::WebStreamTextureClient* client) {
579 if (stream_texture_proxy_.get()) 578 if (stream_texture_proxy_.get())
580 stream_texture_proxy_->SetClient(client); 579 stream_texture_proxy_->SetClient(client);
581 } 580 }
582 581
583 } // namespace webkit_media 582 } // namespace webkit_media
OLDNEW
« no previous file with comments | « media/tools/shader_bench/shader_bench.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698