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

Side by Side Diff: remoting/protocol/video_renderer.h

Issue 2101833002: [Remoting Android] DisplayUpdaterFactory cleanups (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer's Feedback Created 4 years, 5 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
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 #ifndef REMOTING_CLIENT_VIDEO_RENDERER_H_ 5 #ifndef REMOTING_CLIENT_VIDEO_RENDERER_H_
6 #define REMOTING_CLIENT_VIDEO_RENDERER_H_ 6 #define REMOTING_CLIENT_VIDEO_RENDERER_H_
7 7
8 namespace remoting { 8 namespace remoting {
9
10 class ClientContext;
11
9 namespace protocol { 12 namespace protocol {
10 13
11 class FrameConsumer; 14 class FrameConsumer;
15 class PerformanceTracker;
12 class SessionConfig; 16 class SessionConfig;
13 class VideoStub; 17 class VideoStub;
14 18
15 // VideoRenderer is responsible for decoding and displaying incoming video 19 // VideoRenderer is responsible for decoding and displaying incoming video
16 // stream. This interface is used by ConnectionToHost implementations to 20 // stream. This interface is used by ConnectionToHost implementations to
17 // render received video frames. ConnectionToHost may feed encoded frames to the 21 // render received video frames. ConnectionToHost may feed encoded frames to the
18 // VideoStub or decode them and pass decoded frames to the FrameConsumer. 22 // VideoStub or decode them and pass decoded frames to the FrameConsumer.
19 // 23 //
20 // TODO(sergeyu): Reconsider this design. 24 // TODO(sergeyu): Reconsider this design.
21 class VideoRenderer { 25 class VideoRenderer {
22 public: 26 public:
23 virtual ~VideoRenderer() {} 27 virtual ~VideoRenderer() {}
24 28
29 // Initializes the video renderer. This allows the renderer to be initialized
30 // after it is constructed. Returns true if initialization succeeds and false
31 // otherwise. An implementation that doesn't use this function to initialize
32 // should always return true.
33 // |perf_tracker| must outlive the renderer.
34 virtual bool Initialize(const ClientContext& client_context,
35 protocol::PerformanceTracker* perf_tracker) = 0;
36
25 // Configures the renderer with the supplied |config|. This must be called 37 // Configures the renderer with the supplied |config|. This must be called
26 // exactly once before video data is supplied to the renderer. 38 // exactly once before video data is supplied to the renderer.
27 virtual void OnSessionConfig(const SessionConfig& config) = 0; 39 virtual void OnSessionConfig(const SessionConfig& config) = 0;
28 40
29 // Returns the VideoStub interface of this renderer. 41 // Returns the VideoStub interface of this renderer.
30 virtual VideoStub* GetVideoStub() = 0; 42 virtual VideoStub* GetVideoStub() = 0;
31 43
32 // Returns the FrameConsumer interface for this renderer. 44 // Returns the FrameConsumer interface for this renderer.
33 virtual FrameConsumer* GetFrameConsumer() = 0; 45 virtual FrameConsumer* GetFrameConsumer() = 0;
34 }; 46 };
35 47
36 } // namespace protocol 48 } // namespace protocol
37 } // namespace remoting 49 } // namespace remoting
38 50
39 #endif // REMOTING_CLIENT_VIDEO_RENDERER_H_ 51 #endif // REMOTING_CLIENT_VIDEO_RENDERER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698