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

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: Build Fix again 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 class ClientContext;
Sergey Ulanov 2016/06/29 23:02:12 nit: add empty line here
Yuwei 2016/06/29 23:38:03 Done. Also added one below namespace protocol. Not
10
9 namespace protocol { 11 namespace protocol {
10
11 class FrameConsumer; 12 class FrameConsumer;
13 class PerformanceTracker;
12 class SessionConfig; 14 class SessionConfig;
13 class VideoStub; 15 class VideoStub;
14 16
15 // VideoRenderer is responsible for decoding and displaying incoming video 17 // VideoRenderer is responsible for decoding and displaying incoming video
16 // stream. This interface is used by ConnectionToHost implementations to 18 // stream. This interface is used by ConnectionToHost implementations to
17 // render received video frames. ConnectionToHost may feed encoded frames to the 19 // render received video frames. ConnectionToHost may feed encoded frames to the
18 // VideoStub or decode them and pass decoded frames to the FrameConsumer. 20 // VideoStub or decode them and pass decoded frames to the FrameConsumer.
19 // 21 //
20 // TODO(sergeyu): Reconsider this design. 22 // TODO(sergeyu): Reconsider this design.
21 class VideoRenderer { 23 class VideoRenderer {
22 public: 24 public:
23 virtual ~VideoRenderer() {} 25 virtual ~VideoRenderer() {}
24 26
27 // Initializes the video renderer. This allows the renderer to be initialized
28 // after it is constructed. Returns true if initialization succeeds and false
29 // otherwise. An implementation that doesn't use this function to initialize
30 // should always return true.
31 // |perf_tracker| must outlive the renderer.
32 virtual bool Initialize(const ClientContext& client_context,
33 protocol::PerformanceTracker* perf_tracker) = 0;
34
25 // Configures the renderer with the supplied |config|. This must be called 35 // Configures the renderer with the supplied |config|. This must be called
26 // exactly once before video data is supplied to the renderer. 36 // exactly once before video data is supplied to the renderer.
27 virtual void OnSessionConfig(const SessionConfig& config) = 0; 37 virtual void OnSessionConfig(const SessionConfig& config) = 0;
28 38
29 // Returns the VideoStub interface of this renderer. 39 // Returns the VideoStub interface of this renderer.
30 virtual VideoStub* GetVideoStub() = 0; 40 virtual VideoStub* GetVideoStub() = 0;
31 41
32 // Returns the FrameConsumer interface for this renderer. 42 // Returns the FrameConsumer interface for this renderer.
33 virtual FrameConsumer* GetFrameConsumer() = 0; 43 virtual FrameConsumer* GetFrameConsumer() = 0;
34 }; 44 };
35 45
36 } // namespace protocol 46 } // namespace protocol
37 } // namespace remoting 47 } // namespace remoting
38 48
39 #endif // REMOTING_CLIENT_VIDEO_RENDERER_H_ 49 #endif // REMOTING_CLIENT_VIDEO_RENDERER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698