| Index: media/video/capture/screen/screen_capture_frame_queue.h
|
| diff --git a/remoting/capturer/video_frame_queue.h b/media/video/capture/screen/screen_capture_frame_queue.h
|
| similarity index 70%
|
| rename from remoting/capturer/video_frame_queue.h
|
| rename to media/video/capture/screen/screen_capture_frame_queue.h
|
| index 44aee7ccd89768da7e8636e58c3cb57f64f0a23e..d36f15a462501a2b7b403015e8ee3ac2ed5b6c50 100644
|
| --- a/remoting/capturer/video_frame_queue.h
|
| +++ b/media/video/capture/screen/screen_capture_frame_queue.h
|
| @@ -2,15 +2,15 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef REMOTING_CAPTURER_VIDEO_FRAME_QUEUE_H_
|
| -#define REMOTING_CAPTURER_VIDEO_FRAME_QUEUE_H_
|
| +#ifndef MEDIA_VIDEO_CAPTURE_SCREEN_SCREEN_CAPTURE_FRAME_QUEUE_H_
|
| +#define MEDIA_VIDEO_CAPTURE_SCREEN_SCREEN_CAPTURE_FRAME_QUEUE_H_
|
|
|
| #include "base/compiler_specific.h"
|
| #include "base/memory/scoped_ptr.h"
|
|
|
| -namespace remoting {
|
| +namespace media {
|
|
|
| -class VideoFrame;
|
| +class ScreenCaptureFrame;
|
|
|
| // Represents a queue of reusable video frames. Provides access to the 'current'
|
| // frame - the frame that the caller is working with at the moment, and to
|
| @@ -21,10 +21,10 @@ class VideoFrame;
|
| // is set. The caller can mark all frames in the queue for reallocation (when,
|
| // say, frame dimensions change). The queue records which frames need updating
|
| // which the caller can query.
|
| -class VideoFrameQueue {
|
| +class ScreenCaptureFrameQueue {
|
| public:
|
| - VideoFrameQueue();
|
| - ~VideoFrameQueue();
|
| + ScreenCaptureFrameQueue();
|
| + ~ScreenCaptureFrameQueue();
|
|
|
| // Moves to the next frame in the queue, moving the 'current' frame to become
|
| // the 'previous' one.
|
| @@ -32,13 +32,13 @@ class VideoFrameQueue {
|
|
|
| // Replaces the current frame with a new one allocated by the caller.
|
| // The existing frame (if any) is destroyed.
|
| - void ReplaceCurrentFrame(scoped_ptr<VideoFrame> frame);
|
| + void ReplaceCurrentFrame(scoped_ptr<ScreenCaptureFrame> frame);
|
|
|
| // Marks all frames obsolete and resets the previous frame pointer. No
|
| // frames are freed though as the caller can still access them.
|
| void SetAllFramesNeedUpdate();
|
|
|
| - VideoFrame* current_frame() const {
|
| + ScreenCaptureFrame* current_frame() const {
|
| return frames_[current_].get();
|
| }
|
|
|
| @@ -46,24 +46,24 @@ class VideoFrameQueue {
|
| return !current_frame() || needs_update_[current_];
|
| }
|
|
|
| - VideoFrame* previous_frame() const { return previous_; }
|
| + ScreenCaptureFrame* previous_frame() const { return previous_; }
|
|
|
| private:
|
| // Index of the current frame.
|
| int current_;
|
|
|
| static const int kQueueLength = 2;
|
| - scoped_ptr<VideoFrame> frames_[kQueueLength];
|
| + scoped_ptr<ScreenCaptureFrame> frames_[kQueueLength];
|
|
|
| // True if the corresponding frame needs to be re-allocated.
|
| bool needs_update_[kQueueLength];
|
|
|
| // Points to the previous frame if any.
|
| - VideoFrame* previous_;
|
| + ScreenCaptureFrame* previous_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(VideoFrameQueue);
|
| + DISALLOW_COPY_AND_ASSIGN(ScreenCaptureFrameQueue);
|
| };
|
|
|
| -} // namespace remoting
|
| +} // namespace media
|
|
|
| -#endif // REMOTING_CAPTURER_VIDEO_FRAME_QUEUE_H_
|
| +#endif // MEDIA_VIDEO_CAPTURE_SCREEN_SCREEN_CAPTURE_FRAME_QUEUE_H_
|
|
|