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

Side by Side Diff: remoting/host/video_frame_recorder.h

Issue 372943002: Add video frame recording capability to Chromoting hosts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Working implementation. Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_HOST_VIDEO_FRAME_RECORDER_H_ 5 #ifndef REMOTING_HOST_VIDEO_FRAME_RECORDER_H_
6 #define REMOTING_HOST_VIDEO_FRAME_RECORDER_H_ 6 #define REMOTING_HOST_VIDEO_FRAME_RECORDER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <list> 9 #include <list>
10 10
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/single_thread_task_runner.h" 14 #include "base/single_thread_task_runner.h"
15 15
16 namespace webrtc { 16 namespace webrtc {
17 class DesktopFrame; 17 class DesktopFrame;
18 } 18 }
19 19
20 namespace remoting { 20 namespace remoting {
21 21
22 class VideoEncoder; 22 class VideoEncoder;
23 23
24 // Allows sequences of DesktopFrames passed to a VideoEncoder to be recorded. 24 // Allows sequences of DesktopFrames passed to a VideoEncoder to be recorded.
25 // 25 //
26 // VideoFrameRecorder is design to support applications which use a dedicated 26 // VideoFrameRecorder is designed to support applications which use a dedicated
27 // thread for video encoding, but need to manage that process from a "main" 27 // thread for video encoding, but need to manage that process from a "main"
28 // or "control" thread. 28 // or "control" thread.
29 // 29 //
30 // On the control thread: 30 // On the control thread:
31 // 1. Create the VideoFrameRecorder on the controlling thread. 31 // 1. Create the VideoFrameRecorder on the controlling thread.
32 // 2. Specify the amount of memory that may be used for recording. 32 // 2. Specify the amount of memory that may be used for recording.
33 // 3. Call WrapVideoEncoder(), passing the actual VideoEncoder that will be 33 // 3. Call WrapVideoEncoder(), passing the actual VideoEncoder that will be
34 // used to encode frames. 34 // used to encode frames.
35 // 4. Hand the returned wrapper VideoEncoder of to the video encoding thread, 35 // 4. Hand the returned wrapper VideoEncoder of to the video encoding thread,
36 // to call in place of the actual VideoEncoder. 36 // to call in place of the actual VideoEncoder.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_; 92 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_;
93 base::WeakPtrFactory<VideoFrameRecorder> weak_factory_; 93 base::WeakPtrFactory<VideoFrameRecorder> weak_factory_;
94 94
95 DISALLOW_COPY_AND_ASSIGN(VideoFrameRecorder); 95 DISALLOW_COPY_AND_ASSIGN(VideoFrameRecorder);
96 }; 96 };
97 97
98 } // namespace remoting 98 } // namespace remoting
99 99
100 #endif // REMOTING_HOST_VIDEO_FRAME_RECORDER_H_ 100 #endif // REMOTING_HOST_VIDEO_FRAME_RECORDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698