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

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

Issue 2161083004: [DO NOT COMMIT] MediaPlayerRenderer using StreamTextures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 renderer_->OnWaitingForDecryptionKey(); 51 renderer_->OnWaitingForDecryptionKey();
52 } 52 }
53 void OnVideoNaturalSizeChange(const gfx::Size& size) override { 53 void OnVideoNaturalSizeChange(const gfx::Size& size) override {
54 DCHECK(type_ == DemuxerStream::VIDEO); 54 DCHECK(type_ == DemuxerStream::VIDEO);
55 renderer_->OnVideoNaturalSizeChange(size); 55 renderer_->OnVideoNaturalSizeChange(size);
56 } 56 }
57 void OnVideoOpacityChange(bool opaque) override { 57 void OnVideoOpacityChange(bool opaque) override {
58 DCHECK(type_ == DemuxerStream::VIDEO); 58 DCHECK(type_ == DemuxerStream::VIDEO);
59 renderer_->OnVideoOpacityChange(opaque); 59 renderer_->OnVideoOpacityChange(opaque);
60 } 60 }
61 void OnDurationChange(base::TimeDelta duration) override {
62 // RendererClients should only be notified of duration changes in certain
63 // scenarios, none of which should arrise for RendererClientInternal.
64 // Duration changes should be sent to the pipeline by the DemuxerStream, via
65 // the DemuxerHost interface.
66 NOTREACHED();
67 }
61 68
62 private: 69 private:
63 DemuxerStream::Type type_; 70 DemuxerStream::Type type_;
64 RendererImpl* renderer_; 71 RendererImpl* renderer_;
65 }; 72 };
66 73
67 RendererImpl::RendererImpl( 74 RendererImpl::RendererImpl(
68 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 75 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
69 std::unique_ptr<AudioRenderer> audio_renderer, 76 std::unique_ptr<AudioRenderer> audio_renderer,
70 std::unique_ptr<VideoRenderer> video_renderer) 77 std::unique_ptr<VideoRenderer> video_renderer)
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 DCHECK(task_runner_->BelongsToCurrentThread()); 850 DCHECK(task_runner_->BelongsToCurrentThread());
844 client_->OnVideoNaturalSizeChange(size); 851 client_->OnVideoNaturalSizeChange(size);
845 } 852 }
846 853
847 void RendererImpl::OnVideoOpacityChange(bool opaque) { 854 void RendererImpl::OnVideoOpacityChange(bool opaque) {
848 DCHECK(task_runner_->BelongsToCurrentThread()); 855 DCHECK(task_runner_->BelongsToCurrentThread());
849 client_->OnVideoOpacityChange(opaque); 856 client_->OnVideoOpacityChange(opaque);
850 } 857 }
851 858
852 } // namespace media 859 } // namespace media
OLDNEW
« media/blink/webmediaplayer_impl.cc ('K') | « media/renderers/media_player_renderer_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698