| 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 22 matching lines...) Expand all Loading... |
| 33 // used from a thread running a message loop and this class will use that | 33 // used from a thread running a message loop and this class will use that |
| 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, |
| 44 protocol::PerformanceTracker* perf_tracker) override; |
| 43 void OnSessionConfig(const protocol::SessionConfig& config) override; | 45 void OnSessionConfig(const protocol::SessionConfig& config) override; |
| 44 protocol::VideoStub* GetVideoStub() override; | 46 protocol::VideoStub* GetVideoStub() override; |
| 45 protocol::FrameConsumer* GetFrameConsumer() override; | 47 protocol::FrameConsumer* GetFrameConsumer() override; |
| 46 | 48 |
| 47 // protocol::VideoStub interface. | 49 // protocol::VideoStub interface. |
| 48 void ProcessVideoPacket(std::unique_ptr<VideoPacket> video_packet, | 50 void ProcessVideoPacket(std::unique_ptr<VideoPacket> video_packet, |
| 49 const base::Closure& done) override; | 51 const base::Closure& done) override; |
| 50 | 52 |
| 51 // Initialize a decoder to decode video packets. | 53 // Initialize a decoder to decode video packets. |
| 52 void SetCodecForDecoding(const protocol::ChannelConfig::Codec codec); | 54 void SetCodecForDecoding(const protocol::ChannelConfig::Codec codec); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 // NOTE: Weak pointers must be invalidated before all other member variables. | 89 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 88 base::WeakPtrFactory<TestVideoRenderer> weak_factory_; | 90 base::WeakPtrFactory<TestVideoRenderer> weak_factory_; |
| 89 | 91 |
| 90 DISALLOW_COPY_AND_ASSIGN(TestVideoRenderer); | 92 DISALLOW_COPY_AND_ASSIGN(TestVideoRenderer); |
| 91 }; | 93 }; |
| 92 | 94 |
| 93 } // namespace test | 95 } // namespace test |
| 94 } // namespace remoting | 96 } // namespace remoting |
| 95 | 97 |
| 96 #endif // REMOTING_TEST_TEST_VIDEO_RENDERER_H_ | 98 #endif // REMOTING_TEST_TEST_VIDEO_RENDERER_H_ |
| OLD | NEW |