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

Side by Side Diff: content/renderer/media/webmediaplayer_ms.cc

Issue 1053113002: Prime the landing pad for the new video rendering pipeline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix cast. Created 5 years, 8 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
« no previous file with comments | « content/renderer/media/webmediaplayer_ms.h ('k') | media/BUILD.gn » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/renderer/media/webmediaplayer_ms.h" 5 #include "content/renderer/media/webmediaplayer_ms.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 449
450 void WebMediaPlayerMS::SetVideoFrameProviderClient( 450 void WebMediaPlayerMS::SetVideoFrameProviderClient(
451 cc::VideoFrameProvider::Client* client) { 451 cc::VideoFrameProvider::Client* client) {
452 // This is called from both the main renderer thread and the compositor 452 // This is called from both the main renderer thread and the compositor
453 // thread (when the main thread is blocked). 453 // thread (when the main thread is blocked).
454 if (video_frame_provider_client_) 454 if (video_frame_provider_client_)
455 video_frame_provider_client_->StopUsingProvider(); 455 video_frame_provider_client_->StopUsingProvider();
456 video_frame_provider_client_ = client; 456 video_frame_provider_client_ = client;
457 } 457 }
458 458
459 bool WebMediaPlayerMS::UpdateCurrentFrame(base::TimeTicks deadline_min,
460 base::TimeTicks deadline_max) {
461 // TODO(dalecurtis): This should make use of the deadline interval to ensure
462 // the painted frame is correct for the given interval.
463 NOTREACHED();
464 return false;
465 }
466
459 scoped_refptr<media::VideoFrame> WebMediaPlayerMS::GetCurrentFrame() { 467 scoped_refptr<media::VideoFrame> WebMediaPlayerMS::GetCurrentFrame() {
460 DVLOG(3) << "WebMediaPlayerMS::GetCurrentFrame"; 468 DVLOG(3) << "WebMediaPlayerMS::GetCurrentFrame";
461 base::AutoLock auto_lock(current_frame_lock_); 469 base::AutoLock auto_lock(current_frame_lock_);
462 DCHECK(!pending_repaint_); 470 DCHECK(!pending_repaint_);
463 if (!current_frame_.get()) 471 if (!current_frame_.get())
464 return NULL; 472 return NULL;
465 pending_repaint_ = true; 473 pending_repaint_ = true;
466 current_frame_used_ = true; 474 current_frame_used_ = true;
467 return current_frame_; 475 return current_frame_;
468 } 476 }
469 477
470 void WebMediaPlayerMS::PutCurrentFrame( 478 void WebMediaPlayerMS::PutCurrentFrame() {
471 const scoped_refptr<media::VideoFrame>& frame) {
472 DVLOG(3) << "WebMediaPlayerMS::PutCurrentFrame"; 479 DVLOG(3) << "WebMediaPlayerMS::PutCurrentFrame";
473 DCHECK(pending_repaint_); 480 DCHECK(pending_repaint_);
474 pending_repaint_ = false; 481 pending_repaint_ = false;
475 } 482 }
476 483
477 void WebMediaPlayerMS::OnFrameAvailable( 484 void WebMediaPlayerMS::OnFrameAvailable(
478 const scoped_refptr<media::VideoFrame>& frame) { 485 const scoped_refptr<media::VideoFrame>& frame) {
479 DVLOG(3) << "WebMediaPlayerMS::OnFrameAvailable"; 486 DVLOG(3) << "WebMediaPlayerMS::OnFrameAvailable";
480 DCHECK(thread_checker_.CalledOnValidThread()); 487 DCHECK(thread_checker_.CalledOnValidThread());
481 ++total_frame_count_; 488 ++total_frame_count_;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 GetClient()->readyStateChanged(); 554 GetClient()->readyStateChanged();
548 } 555 }
549 556
550 blink::WebMediaPlayerClient* WebMediaPlayerMS::GetClient() { 557 blink::WebMediaPlayerClient* WebMediaPlayerMS::GetClient() {
551 DCHECK(thread_checker_.CalledOnValidThread()); 558 DCHECK(thread_checker_.CalledOnValidThread());
552 DCHECK(client_); 559 DCHECK(client_);
553 return client_; 560 return client_;
554 } 561 }
555 562
556 } // namespace content 563 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/webmediaplayer_ms.h ('k') | media/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698