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

Unified Diff: webrtc/modules/desktop_capture/desktop_capture_types.h

Issue 2759493002: Add DesktopCapturerId and attach it to DesktopFrame (Closed)
Patch Set: Remove dependency of webrtc/media:rtc_media_base Created 3 years, 9 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 | « no previous file | webrtc/modules/desktop_capture/desktop_frame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/desktop_capture/desktop_capture_types.h
diff --git a/webrtc/modules/desktop_capture/desktop_capture_types.h b/webrtc/modules/desktop_capture/desktop_capture_types.h
index 9a6162a766d5e7da2ce7db918dab0923a0a425f1..8b8c116af29b732b9cd4358f1a2b6398f85d0c9d 100644
--- a/webrtc/modules/desktop_capture/desktop_capture_types.h
+++ b/webrtc/modules/desktop_capture/desktop_capture_types.h
@@ -36,6 +36,34 @@ const ScreenId kFullDesktopScreenId = -1;
const ScreenId kInvalidScreenId = -2;
+// Depends on webrtc/media:rtc_media_base will trigger a build break in
+// Chromium (Refer to https://codereview.chromium.org/2759493002/). The root
+// cause is still unclear. Before the root cause has been found, copy-paste the
+// definition of the FOURCC() macro here is a simple choice.
+
+/**** Copy from webrtc/media/base/videocommon.h ****/
+// Convert four characters to a FourCC code.
+// Needs to be a macro otherwise the OS X compiler complains when the kFormat*
+// constants are used in a switch.
+#define FOURCC(a, b, c, d) \
+ ((static_cast<uint32_t>(a)) | (static_cast<uint32_t>(b) << 8) | \
+ (static_cast<uint32_t>(c) << 16) | (static_cast<uint32_t>(d) << 24))
+// Some pages discussing FourCC codes:
+// http://www.fourcc.org/yuv.php
+// http://v4l2spec.bytesex.org/spec/book1.htm
+// http://developer.apple.com/quicktime/icefloe/dispatch020.html
+// http://msdn.microsoft.com/library/windows/desktop/dd206750.aspx#nv12
+// http://people.xiph.org/~xiphmont/containers/nut/nut4cc.txt
+/**** End copy from webrtc/media/base/videocommon.h ****/
+
+// An integer to attach to each DesktopFrame to differentiate the generator of
+// the frame.
+namespace DesktopCapturerId {
+ constexpr uint32_t kUnknown = 0;
+ constexpr uint32_t kScreenCapturerWinGdi = FOURCC('G', 'D', 'I', ' ');
+ constexpr uint32_t kScreenCapturerWinDirectx = FOURCC('D', 'X', 'G', 'I');
+} // namespace DesktopCapturerId
+
} // namespace webrtc
#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURE_TYPES_H_
« no previous file with comments | « no previous file | webrtc/modules/desktop_capture/desktop_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698