| 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 "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // ProcessVideoPacket. | 34 // ProcessVideoPacket. |
| 35 class TestVideoRenderer : public protocol::VideoRenderer, | 35 class TestVideoRenderer : public protocol::VideoRenderer, |
| 36 public protocol::VideoStub { | 36 public protocol::VideoStub { |
| 37 public: | 37 public: |
| 38 TestVideoRenderer(); | 38 TestVideoRenderer(); |
| 39 ~TestVideoRenderer() override; | 39 ~TestVideoRenderer() override; |
| 40 | 40 |
| 41 // VideoRenderer interface. | 41 // VideoRenderer interface. |
| 42 void OnSessionConfig(const protocol::SessionConfig& config) override; | 42 void OnSessionConfig(const protocol::SessionConfig& config) override; |
| 43 protocol::VideoStub* GetVideoStub() override; | 43 protocol::VideoStub* GetVideoStub() override; |
| 44 protocol::FrameConsumer* GetFrameConsumer() override; |
| 44 | 45 |
| 45 // protocol::VideoStub interface. | 46 // protocol::VideoStub interface. |
| 46 void ProcessVideoPacket(scoped_ptr<VideoPacket> video_packet, | 47 void ProcessVideoPacket(scoped_ptr<VideoPacket> video_packet, |
| 47 const base::Closure& done) override; | 48 const base::Closure& done) override; |
| 48 | 49 |
| 49 // Initialize a decoder to decode video packets. | 50 // Initialize a decoder to decode video packets. |
| 50 void SetCodecForDecoding(const protocol::ChannelConfig::Codec codec); | 51 void SetCodecForDecoding(const protocol::ChannelConfig::Codec codec); |
| 51 | 52 |
| 52 // Returns a copy of the current frame. | 53 // Returns a copy of the current frame. |
| 53 scoped_ptr<webrtc::DesktopFrame> GetCurrentFrameForTest() const; | 54 scoped_ptr<webrtc::DesktopFrame> GetCurrentFrameForTest() const; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // NOTE: Weak pointers must be invalidated before all other member variables. | 86 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 86 base::WeakPtrFactory<TestVideoRenderer> weak_factory_; | 87 base::WeakPtrFactory<TestVideoRenderer> weak_factory_; |
| 87 | 88 |
| 88 DISALLOW_COPY_AND_ASSIGN(TestVideoRenderer); | 89 DISALLOW_COPY_AND_ASSIGN(TestVideoRenderer); |
| 89 }; | 90 }; |
| 90 | 91 |
| 91 } // namespace test | 92 } // namespace test |
| 92 } // namespace remoting | 93 } // namespace remoting |
| 93 | 94 |
| 94 #endif // REMOTING_TEST_TEST_VIDEO_RENDERER_H_ | 95 #endif // REMOTING_TEST_TEST_VIDEO_RENDERER_H_ |
| OLD | NEW |