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

Side by Side Diff: chromecast/browser/media/cast_renderer.h

Issue 1978973002: Moves video frame callbacks from VideoFrameCompositor to Renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addresses comments Created 4 years, 7 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 | « no previous file | chromecast/browser/media/cast_renderer.cc » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "base/memory/weak_ptr.h" 5 #include "base/memory/weak_ptr.h"
6 #include "chromecast/browser/media/media_pipeline_backend_factory.h" 6 #include "chromecast/browser/media/media_pipeline_backend_factory.h"
7 #include "media/base/renderer.h" 7 #include "media/base/renderer.h"
8 #include "ui/gfx/geometry/size.h"
8 9
9 namespace base { 10 namespace base {
10 class SingleThreadTaskRunner; 11 class SingleThreadTaskRunner;
11 } // namespace base 12 } // namespace base
12 13
13 namespace media { 14 namespace media {
14 class MediaLog; 15 class MediaLog;
15 } // namespace media 16 } // namespace media
16 17
17 namespace chromecast { 18 namespace chromecast {
(...skipping 23 matching lines...) Expand all
41 bool HasAudio() final; 42 bool HasAudio() final;
42 bool HasVideo() final; 43 bool HasVideo() final;
43 44
44 private: 45 private:
45 enum Stream { STREAM_AUDIO, STREAM_VIDEO }; 46 enum Stream { STREAM_AUDIO, STREAM_VIDEO };
46 void OnError(::media::PipelineStatus status); 47 void OnError(::media::PipelineStatus status);
47 void OnEnded(Stream stream); 48 void OnEnded(Stream stream);
48 void OnStatisticsUpdate(const ::media::PipelineStatistics& stats); 49 void OnStatisticsUpdate(const ::media::PipelineStatistics& stats);
49 void OnBufferingStateChange(::media::BufferingState state); 50 void OnBufferingStateChange(::media::BufferingState state);
50 void OnWaitingForDecryptionKey(); 51 void OnWaitingForDecryptionKey();
52 void OnVideoNaturalSizeChange(const gfx::Size& size);
53 void OnVideoOpacityChange(bool opaque);
51 54
52 const CreateMediaPipelineBackendCB create_backend_cb_; 55 const CreateMediaPipelineBackendCB create_backend_cb_;
53 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 56 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
54 ::media::RendererClient* client_; 57 ::media::RendererClient* client_;
55 scoped_refptr<BalancedMediaTaskRunnerFactory> media_task_runner_factory_; 58 scoped_refptr<BalancedMediaTaskRunnerFactory> media_task_runner_factory_;
56 std::unique_ptr<TaskRunnerImpl> backend_task_runner_; 59 std::unique_ptr<TaskRunnerImpl> backend_task_runner_;
57 std::unique_ptr<MediaPipelineImpl> pipeline_; 60 std::unique_ptr<MediaPipelineImpl> pipeline_;
58 bool eos_[2]; 61 bool eos_[2];
59 base::WeakPtrFactory<CastRenderer> weak_factory_; 62 base::WeakPtrFactory<CastRenderer> weak_factory_;
60 63
61 DISALLOW_COPY_AND_ASSIGN(CastRenderer); 64 DISALLOW_COPY_AND_ASSIGN(CastRenderer);
62 }; 65 };
63 66
64 } // namespace media 67 } // namespace media
65 } // namespace chromecast 68 } // namespace chromecast
OLDNEW
« no previous file with comments | « no previous file | chromecast/browser/media/cast_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698