| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_TEST_TEST_VIDEO_RENDERER_H_ | 5 #ifndef REMOTING_TEST_TEST_VIDEO_RENDERER_H_ |
| 6 #define REMOTING_TEST_TEST_VIDEO_RENDERER_H_ | 6 #define REMOTING_TEST_TEST_VIDEO_RENDERER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // message loop to execute the done callbacks passed by the caller of | 34 // message loop to execute the done callbacks passed by the caller of |
| 35 // ProcessVideoPacket. | 35 // ProcessVideoPacket. |
| 36 class TestVideoRenderer : public protocol::VideoRenderer, | 36 class TestVideoRenderer : public protocol::VideoRenderer, |
| 37 public protocol::VideoStub { | 37 public protocol::VideoStub { |
| 38 public: | 38 public: |
| 39 TestVideoRenderer(); | 39 TestVideoRenderer(); |
| 40 ~TestVideoRenderer() override; | 40 ~TestVideoRenderer() override; |
| 41 | 41 |
| 42 // VideoRenderer interface. | 42 // VideoRenderer interface. |
| 43 bool Initialize(const ClientContext& client_context, | 43 bool Initialize(const ClientContext& client_context, |
| 44 protocol::PerformanceTracker* perf_tracker) override; | 44 protocol::FrameStatsConsumer* stats_consumer) override; |
| 45 void OnSessionConfig(const protocol::SessionConfig& config) override; | 45 void OnSessionConfig(const protocol::SessionConfig& config) override; |
| 46 protocol::VideoStub* GetVideoStub() override; | 46 protocol::VideoStub* GetVideoStub() override; |
| 47 protocol::FrameConsumer* GetFrameConsumer() override; | 47 protocol::FrameConsumer* GetFrameConsumer() override; |
| 48 protocol::FrameStatsConsumer* GetFrameStatsConsumer() override; |
| 48 | 49 |
| 49 // protocol::VideoStub interface. | 50 // protocol::VideoStub interface. |
| 50 void ProcessVideoPacket(std::unique_ptr<VideoPacket> video_packet, | 51 void ProcessVideoPacket(std::unique_ptr<VideoPacket> video_packet, |
| 51 const base::Closure& done) override; | 52 const base::Closure& done) override; |
| 52 | 53 |
| 53 // Initialize a decoder to decode video packets. | 54 // Initialize a decoder to decode video packets. |
| 54 void SetCodecForDecoding(const protocol::ChannelConfig::Codec codec); | 55 void SetCodecForDecoding(const protocol::ChannelConfig::Codec codec); |
| 55 | 56 |
| 56 // Returns a copy of the current frame. | 57 // Returns a copy of the current frame. |
| 57 std::unique_ptr<webrtc::DesktopFrame> GetCurrentFrameForTest() const; | 58 std::unique_ptr<webrtc::DesktopFrame> GetCurrentFrameForTest() const; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 // NOTE: Weak pointers must be invalidated before all other member variables. | 90 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 90 base::WeakPtrFactory<TestVideoRenderer> weak_factory_; | 91 base::WeakPtrFactory<TestVideoRenderer> weak_factory_; |
| 91 | 92 |
| 92 DISALLOW_COPY_AND_ASSIGN(TestVideoRenderer); | 93 DISALLOW_COPY_AND_ASSIGN(TestVideoRenderer); |
| 93 }; | 94 }; |
| 94 | 95 |
| 95 } // namespace test | 96 } // namespace test |
| 96 } // namespace remoting | 97 } // namespace remoting |
| 97 | 98 |
| 98 #endif // REMOTING_TEST_TEST_VIDEO_RENDERER_H_ | 99 #endif // REMOTING_TEST_TEST_VIDEO_RENDERER_H_ |
| OLD | NEW |