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

Unified Diff: media/video/capture/screen/shared_desktop_frame.h

Issue 13983010: Use webrtc::DesktopCapturer for screen capturer implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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
Index: media/video/capture/screen/shared_desktop_frame.h
diff --git a/media/video/capture/screen/shared_desktop_frame.h b/media/video/capture/screen/shared_desktop_frame.h
new file mode 100644
index 0000000000000000000000000000000000000000..861b5f0411853a82f15e9269f3f7c4da94cb54c8
--- /dev/null
+++ b/media/video/capture/screen/shared_desktop_frame.h
@@ -0,0 +1,43 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_VIDEO_CAPTURE_SCREEN_SHARED_DESKTOP_FRAME_H_
+#define MEDIA_VIDEO_CAPTURE_SCREEN_SHARED_DESKTOP_FRAME_H_
+
+#include "base/memory/ref_counted.h"
+#include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
+
+namespace media {
+
+// SharedDesktopFrame is a DesktopFrame that may have multiple instances all
+// sharing the same buffer.
+class SharedDesktopFrame : public webrtc::DesktopFrame {
+ public:
+ virtual ~SharedDesktopFrame();
+
+ static SharedDesktopFrame* Wrap(webrtc::DesktopFrame* desktop_frame);
+
+ // Returns the underlying instance of DesktopFrame.
+ webrtc::DesktopFrame* GetUnderlyingFrame();
+
+ // Creates a clone of this object.
+ SharedDesktopFrame* Share();
+
+ // Checks if the frame is currently shared. If it returns false it's
+ // guaranteed that there are no clones of the object.
+ bool IsShared();
+
+ private:
+ class Core;
+
+ SharedDesktopFrame(scoped_refptr<Core> core);
+
+ scoped_refptr<Core> core_;
+
+ DISALLOW_COPY_AND_ASSIGN(SharedDesktopFrame);
+};
+
+} // namespace media
+
+#endif // MEDIA_VIDEO_CAPTURE_SCREEN_SHARED_DESKTOP_FRAME_H_
« no previous file with comments | « media/video/capture/screen/shared_buffer_unittest.cc ('k') | media/video/capture/screen/shared_desktop_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698