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

Unified Diff: remoting/host/video_frame_recorder.h

Issue 468613002: Readability review. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/host_extension_session_manager_unittest.cc ('k') | remoting/host/video_frame_recorder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/video_frame_recorder.h
diff --git a/remoting/host/video_frame_recorder.h b/remoting/host/video_frame_recorder.h
index 9d317229459f0075e233f6b0c666fcc73063cabe..a162373647a18481fdfecc92f3546feeea7b1422 100644
--- a/remoting/host/video_frame_recorder.h
+++ b/remoting/host/video_frame_recorder.h
@@ -28,11 +28,11 @@ class VideoEncoder;
// or "control" thread.
//
// On the control thread:
-// 1. Create the VideoFrameRecorder on the controlling thread.
+// 1. Create the VideoFrameRecorder.
// 2. Specify the amount of memory that may be used for recording.
// 3. Call WrapVideoEncoder(), passing the actual VideoEncoder that will be
// used to encode frames.
-// 4. Hand the returned wrapper VideoEncoder of to the video encoding thread,
+// 4. Hand off the returned wrapper VideoEncoder to the video encoding thread,
// to call in place of the actual VideoEncoder.
// 5. Start/stop frame recording as necessary.
// 6. Use NextFrame() to read each recorded frame in sequence.
@@ -50,19 +50,21 @@ class VideoFrameRecorder {
// Wraps the supplied VideoEncoder, returning a replacement VideoEncoder that
// will route frames to the recorder, as well as passing them for encoding.
- // The caller must delete the previous recording VideoEncoder, or call
- // DetachVideoEncoderWrapper() before calling WrapVideoEncoder() to create
- // a new wrapper.
+ // Each VideoFrameRecorder supports at most one wrapper at a time; if a new
+ // wrapper is required then any existing one must be deleted, or detached via
+ // DetachVideoEncoderWrapper(), before WrapVideoEncoder() is called again.
scoped_ptr<VideoEncoder> WrapVideoEncoder(scoped_ptr<VideoEncoder> encoder);
// Detaches the existing VideoEncoder wrapper, stopping it from recording.
+ // The detached wrapper remains owned by the caller and will continue to
+ // pass-through frames to the wrapped encoder, without recording them.
void DetachVideoEncoderWrapper();
// Enables/disables frame recording. Frame recording is initially disabled.
void SetEnableRecording(bool enable_recording);
// Sets the maximum number of bytes of pixel data that may be recorded.
- // When this maximum is reached older frames will be discard to make space
+ // When this maximum is reached older frames will be discarded to make space
// for new ones.
void SetMaxContentBytes(int64_t max_content_bytes);
« no previous file with comments | « remoting/host/host_extension_session_manager_unittest.cc ('k') | remoting/host/video_frame_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698