Bug 983504 - Buildsystem changes for screen sharing. r=ted
authorGian-Carlo Pascutto <gpascutto@mozilla.com>
Mon, 07 Jul 2014 08:50:00 +0200
changeset 215212 bef05df2ed8a61fe5d50f79b6e7d9fa915400ba4
parent 215211 49e5c7d46ea0cd9515d292131259ac539652ce2b
child 215213 35b31cf451bc07030159c469b4ba441303e1ecb0
push id3857
push userraliiev@mozilla.com
push dateTue, 02 Sep 2014 16:39:23 +0000
treeherdermozilla-beta@5638b907b505 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs983504
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 983504 - Buildsystem changes for screen sharing. r=ted
configure.in
media/webrtc/trunk/peerconnection.gyp
media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture.gypi
media/webrtc/trunk/webrtc/video_engine/video_engine_core.gypi
--- a/configure.in
+++ b/configure.in
@@ -8171,17 +8171,17 @@ if test "$MOZ_TREE_CAIRO"; then
     AC_SUBST(QUARTZ_FONT_FEATURE)
     AC_SUBST(PNG_FUNCTIONS_FEATURE)
     AC_SUBST(QT_SURFACE_FEATURE)
     AC_SUBST(TEE_SURFACE_FEATURE)
 
     MOZ_CAIRO_OSLIBS='${CAIRO_FT_OSLIBS}'
 
     if test "$MOZ_X11"; then
-        MOZ_CAIRO_OSLIBS="$MOZ_CAIRO_OSLIBS $XLDFLAGS -lXrender"
+        MOZ_CAIRO_OSLIBS="$MOZ_CAIRO_OSLIBS $XLDFLAGS -lXext -lXdamage -lXfixes -lXcomposite -lXrender"
     fi
 
     CAIRO_FEATURES_H=gfx/cairo/cairo/src/cairo-features.h
 else
     PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION)
     MOZ_CAIRO_CFLAGS="$CAIRO_CFLAGS"
     MOZ_CAIRO_LIBS="$CAIRO_LIBS"
     PKG_CHECK_MODULES(CAIRO_TEE, cairo-tee >= $CAIRO_VERSION)
--- a/media/webrtc/trunk/peerconnection.gyp
+++ b/media/webrtc/trunk/peerconnection.gyp
@@ -35,16 +35,23 @@
         'dependencies': [
           'webrtc/modules/modules.gyp:audio_device',
           'webrtc/modules/modules.gyp:video_capture_module',
 #          'webrtc/modules/modules.gyp:video_render_module',
 #          'webrtc/system_wrappers/source/system_wrappers.gyp:system_wrappers',
           'webrtc/video_engine/video_engine.gyp:video_engine_core',
           'webrtc/voice_engine/voice_engine.gyp:voice_engine',
         ],
+        'conditions': [
+          ['OS!="android"', {
+            'dependencies': [
+              'webrtc/modules/modules.gyp:desktop_capture',
+            ],
+          },
+         ]],
       }, ],
     ],
   }, ],
   'conditions': [
     ['build_with_mozilla==0', {
     'targets': [
     {
       'target_name': 'peerconnection_server',
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture.gypi
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture.gypi
@@ -16,83 +16,72 @@
       ],
       'sources': [
         "desktop_and_cursor_composer.cc",
         "desktop_and_cursor_composer.h",
         "desktop_capture_types.h",
         "desktop_capturer.h",
         "desktop_frame.cc",
         "desktop_frame.h",
-        "desktop_frame_win.cc",
-        "desktop_frame_win.h",
         "desktop_geometry.cc",
         "desktop_geometry.h",
         "desktop_capture_options.h",
         "desktop_capture_options.cc",
         "desktop_capturer.h",
         "desktop_region.cc",
         "desktop_region.h",
         "differ.cc",
         "differ.h",
         "differ_block.cc",
         "differ_block.h",
-        "mac/desktop_configuration.h",
-        "mac/desktop_configuration.mm",
-        "mac/desktop_configuration_monitor.h",
-        "mac/desktop_configuration_monitor.cc",
-        "mac/osx_version.h",
-        "mac/osx_version.cc",
-        "mac/scoped_pixel_buffer_object.cc",
-        "mac/scoped_pixel_buffer_object.h",
         "mouse_cursor.cc",
         "mouse_cursor.h",
         "mouse_cursor_monitor.h",
-        "mouse_cursor_monitor_mac.mm",
-        "mouse_cursor_monitor_win.cc",
-        "mouse_cursor_monitor_x11.cc",
         "mouse_cursor_shape.h",
         "screen_capture_frame_queue.cc",
         "screen_capture_frame_queue.h",
         "screen_capturer.cc",
         "screen_capturer.h",
         "screen_capturer_helper.cc",
         "screen_capturer_helper.h",
-        "screen_capturer_mac.mm",
-        "screen_capturer_win.cc",
-        "screen_capturer_x11.cc",
         "shared_desktop_frame.cc",
         "shared_desktop_frame.h",
         "shared_memory.cc",
         "shared_memory.h",
-        "win/cursor.cc",
-        "win/cursor.h",
-        "win/desktop.cc",
-        "win/desktop.h",
-        "win/scoped_gdi_object.h",
-        "win/scoped_thread_desktop.cc",
-        "win/scoped_thread_desktop.h",
         "window_capturer.cc",
         "window_capturer.h",
-        "window_capturer_mac.cc",
-        "window_capturer_win.cc",
-        "window_capturer_x11.cc",
-        "x11/shared_x_display.h",
-        "x11/shared_x_display.cc",
-        "x11/x_error_trap.cc",
-        "x11/x_error_trap.h",
-        "x11/x_server_pixel_buffer.cc",
-        "x11/x_server_pixel_buffer.h",
+        "desktop_device_info.h",
+        "desktop_device_info.cc",
+        "app_capturer.h",
+        "app_capturer.cc",
       ],
       'conditions': [
         ['OS!="ios" and (target_arch=="ia32" or target_arch=="x64")', {
           'dependencies': [
             'desktop_capture_differ_sse2',
           ],
         }],
         ['use_x11 == 1', {
+          'defines':[
+            'USE_X11',
+          ],
+          'sources': [
+            "mouse_cursor_monitor_x11.cc",
+            "screen_capturer_x11.cc",
+            "window_capturer_x11.cc",
+            "x11/shared_x_display.h",
+            "x11/shared_x_display.cc",
+            "x11/x_error_trap.cc",
+            "x11/x_error_trap.h",
+            "x11/x_server_pixel_buffer.cc",
+            "x11/x_server_pixel_buffer.h",
+            "x11/desktop_device_info_x11.h",
+            "x11/desktop_device_info_x11.cc",
+            "app_capturer_x11.cc",
+          ],
           'link_settings': {
             'libraries': [
               '-lX11',
               '-lXcomposite',
               '-lXdamage',
               '-lXext',
               '-lXfixes',
               '-lXrender',
@@ -102,24 +91,59 @@
         ['OS!="win" and OS!="mac" and use_x11==0', {
           'sources': [
             "mouse_cursor_monitor_null.cc",
             "screen_capturer_null.cc",
             "window_capturer_null.cc",
           ],
         }],
         ['OS=="mac"', {
+          'sources': [
+            "mac/desktop_configuration.h",
+            "mac/desktop_configuration.mm",
+            "mac/desktop_configuration_monitor.h",
+            "mac/desktop_configuration_monitor.cc",
+            "mac/osx_version.h",
+            "mac/osx_version.cc",
+            "mac/scoped_pixel_buffer_object.cc",
+            "mac/scoped_pixel_buffer_object.h",
+            "mac/desktop_device_info_mac.h",
+            "mac/desktop_device_info_mac.mm",
+            "mouse_cursor_monitor_mac.mm",
+            "screen_capturer_mac.mm",
+            "window_capturer_mac.mm",
+            "app_capturer_mac.mm",
+          ],
           'link_settings': {
             'libraries': [
               '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
               '$(SDKROOT)/System/Library/Frameworks/IOKit.framework',
               '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
             ],
           },
         }],
+        ['OS=="win"', {
+           'sources': [
+             "desktop_frame_win.cc",
+             "desktop_frame_win.h",
+             "mouse_cursor_monitor_win.cc",
+             "screen_capturer_win.cc",
+             "win/cursor.cc",
+             "win/cursor.h",
+             "win/desktop.cc",
+             "win/desktop.h",
+             "win/scoped_gdi_object.h",
+             "win/scoped_thread_desktop.cc",
+             "win/scoped_thread_desktop.h",
+             "win/desktop_device_info_win.h",
+             "win/desktop_device_info_win.cc",
+             "window_capturer_win.cc",
+             "app_capturer_win.cc",
+           ],
+          }],
       ],
     },
   ],  # targets
   'conditions': [
     ['OS!="ios" and (target_arch=="ia32" or target_arch=="x64")', {
       'targets': [
         {
           # Have to be compiled as a separate target because it needs to be
--- a/media/webrtc/trunk/webrtc/video_engine/video_engine_core.gypi
+++ b/media/webrtc/trunk/webrtc/video_engine/video_engine_core.gypi
@@ -105,16 +105,24 @@
         'vie_manager_base.cc',
         'vie_receiver.cc',
         'vie_remb.cc',
         'vie_renderer.cc',
         'vie_render_manager.cc',
         'vie_sender.cc',
         'vie_sync_module.cc',
       ], # source
+      'conditions' : [
+        ['OS!="android"', {
+          'sources': [
+            'desktop_capture_impl.cc',
+            'desktop_capture_impl.h',
+          ],
+        }],
+      ],
       # TODO(jschuh): Bug 1348: fix size_t to int truncations.
       'msvs_disabled_warnings': [ 4267, ],
     },
   ], # targets
   'conditions': [
     ['include_tests==1', {
       'targets': [
         {