Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #ifndef REMOTING_CLIENT_SOFTWARE_VIDEO_RENDERER_H_ | 5 #ifndef REMOTING_CLIENT_SOFTWARE_VIDEO_RENDERER_H_ |
| 6 #define REMOTING_CLIENT_SOFTWARE_VIDEO_RENDERER_H_ | 6 #define REMOTING_CLIENT_SOFTWARE_VIDEO_RENDERER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 40 class SoftwareVideoRenderer : public protocol::VideoRenderer, | 40 class SoftwareVideoRenderer : public protocol::VideoRenderer, |
| 41 public protocol::VideoStub { | 41 public protocol::VideoStub { |
| 42 public: | 42 public: |
| 43 // All methods must be called on the same thread the renderer is created. The | 43 // All methods must be called on the same thread the renderer is created. The |
| 44 // |decode_task_runner_| is used to decode the video packets. |perf_tracker| | 44 // |decode_task_runner_| is used to decode the video packets. |perf_tracker| |
| 45 // must outlive the renderer. |perf_tracker| may be nullptr, performance | 45 // must outlive the renderer. |perf_tracker| may be nullptr, performance |
| 46 // tracking is disabled in that case. | 46 // tracking is disabled in that case. |
| 47 SoftwareVideoRenderer( | 47 SoftwareVideoRenderer( |
| 48 scoped_refptr<base::SingleThreadTaskRunner> decode_task_runner, | 48 scoped_refptr<base::SingleThreadTaskRunner> decode_task_runner, |
| 49 protocol::FrameConsumer* consumer, | 49 protocol::FrameConsumer* consumer, |
| 50 protocol::PerformanceTracker* perf_tracker); | 50 protocol::PerformanceTracker* perf_tracker); |
|
Sergey Ulanov
2016/06/28 19:08:01
remove decode_task_runner and perf_tracker, since
Yuwei
2016/06/28 21:43:03
Done. Looks like SoftwareVideoRenderer is used in
| |
| 51 ~SoftwareVideoRenderer() override; | 51 ~SoftwareVideoRenderer() override; |
| 52 | 52 |
| 53 // VideoRenderer interface. | 53 // VideoRenderer interface. |
| 54 bool Initialize(const ClientContext& client_context, | |
| 55 protocol::PerformanceTracker* perf_tracker) override; | |
| 54 void OnSessionConfig(const protocol::SessionConfig& config) override; | 56 void OnSessionConfig(const protocol::SessionConfig& config) override; |
| 55 protocol::VideoStub* GetVideoStub() override; | 57 protocol::VideoStub* GetVideoStub() override; |
| 56 protocol::FrameConsumer* GetFrameConsumer() override; | 58 protocol::FrameConsumer* GetFrameConsumer() override; |
| 57 | 59 |
| 58 // protocol::VideoStub interface. | 60 // protocol::VideoStub interface. |
| 59 void ProcessVideoPacket(std::unique_ptr<VideoPacket> packet, | 61 void ProcessVideoPacket(std::unique_ptr<VideoPacket> packet, |
| 60 const base::Closure& done) override; | 62 const base::Closure& done) override; |
| 61 | 63 |
| 62 private: | 64 private: |
| 63 void RenderFrame(std::unique_ptr<protocol::FrameStats> stats, | 65 void RenderFrame(std::unique_ptr<protocol::FrameStats> stats, |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 78 base::ThreadChecker thread_checker_; | 80 base::ThreadChecker thread_checker_; |
| 79 | 81 |
| 80 base::WeakPtrFactory<SoftwareVideoRenderer> weak_factory_; | 82 base::WeakPtrFactory<SoftwareVideoRenderer> weak_factory_; |
| 81 | 83 |
| 82 DISALLOW_COPY_AND_ASSIGN(SoftwareVideoRenderer); | 84 DISALLOW_COPY_AND_ASSIGN(SoftwareVideoRenderer); |
| 83 }; | 85 }; |
| 84 | 86 |
| 85 } // namespace remoting | 87 } // namespace remoting |
| 86 | 88 |
| 87 #endif // REMOTING_CLIENT_SOFTWARE_VIDEO_RENDERER_H_ | 89 #endif // REMOTING_CLIENT_SOFTWARE_VIDEO_RENDERER_H_ |
| OLD | NEW |