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

Side by Side Diff: media/renderers/renderer_impl.cc

Issue 2075303002: [DO NOT COMMIT] Initial MediaPlayerRenderer plumbing and basic features (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "media/renderers/renderer_impl.h" 5 #include "media/renderers/renderer_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 renderer_->OnWaitingForDecryptionKey(); 49 renderer_->OnWaitingForDecryptionKey();
50 } 50 }
51 void OnVideoNaturalSizeChange(const gfx::Size& size) override { 51 void OnVideoNaturalSizeChange(const gfx::Size& size) override {
52 DCHECK(type_ == DemuxerStream::VIDEO); 52 DCHECK(type_ == DemuxerStream::VIDEO);
53 renderer_->OnVideoNaturalSizeChange(size); 53 renderer_->OnVideoNaturalSizeChange(size);
54 } 54 }
55 void OnVideoOpacityChange(bool opaque) override { 55 void OnVideoOpacityChange(bool opaque) override {
56 DCHECK(type_ == DemuxerStream::VIDEO); 56 DCHECK(type_ == DemuxerStream::VIDEO);
57 renderer_->OnVideoOpacityChange(opaque); 57 renderer_->OnVideoOpacityChange(opaque);
58 } 58 }
59 void OnDurationChange(base::TimeDelta duration) override {
60 // RendererClients should only be notified of duration changes in certain
61 // scenarios, none of which should arrise for RendererClientInternal.
62 // Duration changes should be sent to the pipeline by the DemuxerStream, via
63 // the DemuxerHost interface.
64 NOTREACHED();
65 }
59 66
60 private: 67 private:
61 DemuxerStream::Type type_; 68 DemuxerStream::Type type_;
62 RendererImpl* renderer_; 69 RendererImpl* renderer_;
63 }; 70 };
64 71
65 RendererImpl::RendererImpl( 72 RendererImpl::RendererImpl(
66 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 73 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
67 std::unique_ptr<AudioRenderer> audio_renderer, 74 std::unique_ptr<AudioRenderer> audio_renderer,
68 std::unique_ptr<VideoRenderer> video_renderer) 75 std::unique_ptr<VideoRenderer> video_renderer)
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 DCHECK(task_runner_->BelongsToCurrentThread()); 698 DCHECK(task_runner_->BelongsToCurrentThread());
692 client_->OnVideoNaturalSizeChange(size); 699 client_->OnVideoNaturalSizeChange(size);
693 } 700 }
694 701
695 void RendererImpl::OnVideoOpacityChange(bool opaque) { 702 void RendererImpl::OnVideoOpacityChange(bool opaque) {
696 DCHECK(task_runner_->BelongsToCurrentThread()); 703 DCHECK(task_runner_->BelongsToCurrentThread());
697 client_->OnVideoOpacityChange(opaque); 704 client_->OnVideoOpacityChange(opaque);
698 } 705 }
699 706
700 } // namespace media 707 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698