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

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

Issue 1083683003: Speculative revert by sheriff (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed an unrelated commit that had accidentally slipped in. 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
467 scoped_refptr<media::VideoFrame> WebMediaPlayerMS::GetCurrentFrame() { 459 scoped_refptr<media::VideoFrame> WebMediaPlayerMS::GetCurrentFrame() {
468 DVLOG(3) << "WebMediaPlayerMS::GetCurrentFrame"; 460 DVLOG(3) << "WebMediaPlayerMS::GetCurrentFrame";
469 base::AutoLock auto_lock(current_frame_lock_); 461 base::AutoLock auto_lock(current_frame_lock_);
470 DCHECK(!pending_repaint_); 462 DCHECK(!pending_repaint_);
471 if (!current_frame_.get()) 463 if (!current_frame_.get())
472 return NULL; 464 return NULL;
473 pending_repaint_ = true; 465 pending_repaint_ = true;
474 current_frame_used_ = true; 466 current_frame_used_ = true;
475 return current_frame_; 467 return current_frame_;
476 } 468 }
477 469
478 void WebMediaPlayerMS::PutCurrentFrame() { 470 void WebMediaPlayerMS::PutCurrentFrame(
471 const scoped_refptr<media::VideoFrame>& frame) {
479 DVLOG(3) << "WebMediaPlayerMS::PutCurrentFrame"; 472 DVLOG(3) << "WebMediaPlayerMS::PutCurrentFrame";
480 DCHECK(pending_repaint_); 473 DCHECK(pending_repaint_);
481 pending_repaint_ = false; 474 pending_repaint_ = false;
482 } 475 }
483 476
484 void WebMediaPlayerMS::OnFrameAvailable( 477 void WebMediaPlayerMS::OnFrameAvailable(
485 const scoped_refptr<media::VideoFrame>& frame) { 478 const scoped_refptr<media::VideoFrame>& frame) {
486 DVLOG(3) << "WebMediaPlayerMS::OnFrameAvailable"; 479 DVLOG(3) << "WebMediaPlayerMS::OnFrameAvailable";
487 DCHECK(thread_checker_.CalledOnValidThread()); 480 DCHECK(thread_checker_.CalledOnValidThread());
488 ++total_frame_count_; 481 ++total_frame_count_;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 GetClient()->readyStateChanged(); 547 GetClient()->readyStateChanged();
555 } 548 }
556 549
557 blink::WebMediaPlayerClient* WebMediaPlayerMS::GetClient() { 550 blink::WebMediaPlayerClient* WebMediaPlayerMS::GetClient() {
558 DCHECK(thread_checker_.CalledOnValidThread()); 551 DCHECK(thread_checker_.CalledOnValidThread());
559 DCHECK(client_); 552 DCHECK(client_);
560 return client_; 553 return client_;
561 } 554 }
562 555
563 } // namespace content 556 } // 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