Bug 922460 - Kill media/webrtc/shared_libs.mk. r=ted
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 11 Oct 2013 08:15:24 +0900
changeset 150414 e153730cc1000ef86d6850887d5f86130aeb06c6
parent 150413 62c53295e47702f658e265e8cfdd17d44848d729
child 150415 adcb20866454965ff0968171f500883e22dd65f3
push id2993
push usercbook@mozilla.com
push dateFri, 11 Oct 2013 09:22:00 +0000
treeherderfx-team@fe160ec1e0ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs922460
milestone27.0a1
Bug 922460 - Kill media/webrtc/shared_libs.mk. r=ted
configure.in
content/media/directshow/moz.build
layout/media/Makefile.in
layout/media/moz.build
layout/media/symbols.def.in
layout/media/webrtc/Makefile.in
layout/media/webrtc/moz.build
media/webrtc/shared_libs.mk
media/webrtc/signaling/test/Makefile.in
media/webrtc/webrtc_config.gypi
toolkit/library/Makefile.in
--- a/configure.in
+++ b/configure.in
@@ -4009,17 +4009,16 @@ MOZ_OPUS=1
 MOZ_WEBM=1
 MOZ_DASH=
 MOZ_DIRECTSHOW=
 MOZ_WMF=
 MOZ_WEBRTC=1
 MOZ_PEERCONNECTION=
 MOZ_SRTP=
 MOZ_WEBRTC_SIGNALING=
-MOZ_WEBRTC_IN_LIBXUL=
 MOZ_WEBRTC_ASSERT_ALWAYS=1
 MOZ_SCTP=
 MOZ_MEDIA_PLUGINS=
 MOZ_MEDIA_NAVIGATOR=
 MOZ_OMX_PLUGIN=
 MOZ_VP8=
 MOZ_VP8_ERROR_CONCEALMENT=
 MOZ_VP8_ENCODER=
@@ -5186,33 +5185,29 @@ if test -n "$MOZ_WEBRTC"; then
     MOZ_RAW=1
     MOZ_VP8=1
     MOZ_VP8_ENCODER=1
     MOZ_VP8_ERROR_CONCEALMENT=1
 
 dnl enable once Signaling lands
     MOZ_WEBRTC_SIGNALING=1
     AC_DEFINE(MOZ_WEBRTC_SIGNALING)
-    if test "${OS_TARGET}" = "WINNT"; then
-        MOZ_WEBRTC_IN_LIBXUL=1
-    fi
 dnl enable once PeerConnection lands
     MOZ_PEERCONNECTION=1
     AC_DEFINE(MOZ_PEERCONNECTION)
     MOZ_SCTP=1
     MOZ_SRTP=1
     AC_DEFINE(MOZ_SCTP)
     AC_DEFINE(MOZ_SRTP)
 fi
 
 AC_SUBST(MOZ_WEBRTC)
 AC_SUBST(MOZ_WEBRTC_LEAKING_TESTS)
 AC_SUBST(MOZ_WEBRTC_SIGNALING)
 AC_SUBST(MOZ_PEERCONNECTION)
-AC_SUBST(MOZ_WEBRTC_IN_LIBXUL)
 AC_SUBST(MOZ_WEBRTC_ASSERT_ALWAYS)
 AC_SUBST(MOZ_SCTP)
 AC_SUBST(MOZ_SRTP)
 
 dnl Use integers over floats for audio on B2G and Android, because audio
 dnl backends for those platforms don't support floats.
 if test "$OS_TARGET" = "Android"; then
     MOZ_SAMPLE_TYPE_S16=1
--- a/content/media/directshow/moz.build
+++ b/content/media/directshow/moz.build
@@ -21,17 +21,17 @@ CPP_SOURCES += [
     'DirectShowReader.cpp',
     'DirectShowUtils.cpp',
     'SampleSink.cpp',
     'SourceFilter.cpp',
 ]
 
 # If WebRTC isn't being built, we need to compile the DirectShow base classes so that
 # they're available at link time.
-if not CONFIG['MOZ_WEBRTC_IN_LIBXUL']:
+if not CONFIG['MOZ_WEBRTC']:
     CPP_SOURCES += [
         TOPSRCDIR + '/media/webrtc/trunk/webrtc/modules/video_capture/windows/BaseFilter.cpp',
         TOPSRCDIR + '/media/webrtc/trunk/webrtc/modules/video_capture/windows/BaseInputPin.cpp',
         TOPSRCDIR + '/media/webrtc/trunk/webrtc/modules/video_capture/windows/BasePin.cpp',
         TOPSRCDIR + '/media/webrtc/trunk/webrtc/modules/video_capture/windows/MediaType.cpp',
     ]
 
 FAIL_ON_WARNINGS = True
--- a/layout/media/Makefile.in
+++ b/layout/media/Makefile.in
@@ -101,40 +101,19 @@ SHARED_LIBRARY_LIBS 	+= \
 SHARED_LIBRARY_LIBS 	+= \
 	$(DEPTH)/gfx/2d/$(LIB_PREFIX)gfx2d.$(LIB_SUFFIX) \
 	$(NULL)
 
 ifdef MOZ_ENABLE_SKIA
 SHARED_LIBRARY_LIBS += $(MOZ_SKIA_LIBS)
 endif
 
-ifdef MOZ_WEBRTC
-ifndef MOZ_WEBRTC_IN_LIBXUL
-DEFINES += -DMOZ_WEBRTC_GKMEDIA=1
-include $(topsrcdir)/media/webrtc/shared_libs.mk
-SHARED_LIBRARY_LIBS += $(WEBRTC_LIBS)
-endif
-endif
-
 ifeq (WINNT,$(OS_TARGET))
 EXTRA_DSO_LDOPTS = $(MOZALLOC_LIB) $(NSPR_LIBS)
 OS_LIBS += $(call EXPAND_LIBNAME,usp10 ole32)
-
-ifdef MOZ_WEBRTC
-EXTRA_DSO_LDOPTS += \
-  -LIBPATH:"$(MOZ_DIRECTX_SDK_PATH)/lib/$(MOZ_DIRECTX_SDK_CPU_SUFFIX)" \
-  $(NULL)
-OS_LIBS += $(call EXPAND_LIBNAME,secur32 crypt32 iphlpapi strmiids dmoguids wmcodecdspuuid amstrmid msdmo wininet)
-ifdef _MSC_VER
-OS_LIBS += $(call EXPAND_LIBNAME,delayimp)
-EXTRA_DSO_LDOPTS += \
-  -DELAYLOAD:msdmo.dll \
-  $(NULL)
-endif
-endif
 DEFFILE = symbols.def
 endif
 
 include $(topsrcdir)/config/rules.mk
 
 ifeq (WINNT,$(OS_TARGET))
 symbols.def: symbols.def.in $(GLOBAL_DEPS)
 	$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(ACDEFINES) $< > $@
--- a/layout/media/moz.build
+++ b/layout/media/moz.build
@@ -3,8 +3,9 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'layout'
 
 LIBRARY_NAME = 'gkmedias'
 
+DIRS += ['webrtc']
--- a/layout/media/symbols.def.in
+++ b/layout/media/symbols.def.in
@@ -160,31 +160,16 @@ opus_encode_float
 ShInitialize
 ShFinalize
 ShGetObjectCode
 ShDestruct
 ShGetInfoLog
 ShCompile
 ShGetInfo
 ShConstructCompiler
-#ifdef MOZ_WEBRTC_GKMEDIA
-#ifdef HAVE_64BIT_OS
-?GetInterface@ViERender@webrtc@@SAPEAV12@PEAVVideoEngine@2@@Z
-?GetInterface@ViECapture@webrtc@@SAPEAV12@PEAVVideoEngine@2@@Z
-?GetInterface@ViEBase@webrtc@@SAPEAV12@PEAVVideoEngine@2@@Z
-?Create@VideoEngine@webrtc@@SAPEAV12@XZ
-?Delete@VideoEngine@webrtc@@SA_NAEAPEAV12@@Z
-#else
-?GetInterface@ViERender@webrtc@@SAPAV12@PAVVideoEngine@2@@Z
-?GetInterface@ViECapture@webrtc@@SAPAV12@PAVVideoEngine@2@@Z
-?GetInterface@ViEBase@webrtc@@SAPAV12@PAVVideoEngine@2@@Z
-?Create@VideoEngine@webrtc@@SAPAV12@XZ
-?Delete@VideoEngine@webrtc@@SA_NAAPAV12@@Z
-#endif
-#endif
 ShGetActiveAttrib
 ShGetActiveUniform
 #ifndef MOZ_NATIVE_PNG
 MOZ_APNG_get_first_frame_is_hidden
 MOZ_APNG_get_next_frame_blend_op
 MOZ_APNG_get_next_frame_delay_den
 MOZ_APNG_get_next_frame_delay_num
 MOZ_APNG_get_next_frame_dispose_op
rename from media/webrtc/shared_libs.mk
rename to layout/media/webrtc/Makefile.in
--- a/media/webrtc/shared_libs.mk
+++ b/layout/media/webrtc/Makefile.in
@@ -1,14 +1,14 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # shared libs for webrtc
-WEBRTC_LIBS = \
+SHARED_LIBRARY_LIBS = \
   $(call EXPAND_LIBNAME_PATH,common_video,$(DEPTH)/media/webrtc/trunk/webrtc/common_video/common_video_common_video) \
   $(call EXPAND_LIBNAME_PATH,common_audio,$(DEPTH)/media/webrtc/trunk/webrtc/common_audio/common_audio_common_audio) \
   $(call EXPAND_LIBNAME_PATH,video_capture_module,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_video_capture_module) \
   $(call EXPAND_LIBNAME_PATH,webrtc_utility,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_webrtc_utility) \
   $(call EXPAND_LIBNAME_PATH,audio_coding_module,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_audio_coding_module) \
   $(call EXPAND_LIBNAME_PATH,CNG,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_CNG) \
   $(call EXPAND_LIBNAME_PATH,G711,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_G711) \
   $(call EXPAND_LIBNAME_PATH,PCM16B,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_PCM16B) \
@@ -33,34 +33,34 @@ WEBRTC_LIBS = \
   $(call EXPAND_LIBNAME_PATH,audio_processing,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_audio_processing) \
   $(call EXPAND_LIBNAME_PATH,yuv,$(DEPTH)/media/webrtc/trunk/third_party/libyuv/libyuv_libyuv) \
   $(call EXPAND_LIBNAME_PATH,nicer,$(DEPTH)/media/mtransport/third_party/nICEr/nicer_nicer) \
   $(call EXPAND_LIBNAME_PATH,nrappkit,$(DEPTH)/media/mtransport/third_party/nrappkit/nrappkit_nrappkit) \
   $(NULL)
 
 # if we're on an intel arch, we want SSE2 optimizations
 ifneq (,$(INTEL_ARCHITECTURE))
-WEBRTC_LIBS += \
+SHARED_LIBRARY_LIBS += \
   $(call EXPAND_LIBNAME_PATH,video_processing_sse2,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_video_processing_sse2) \
   $(call EXPAND_LIBNAME_PATH,audio_processing_sse2,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_audio_processing_sse2) \
   $(call EXPAND_LIBNAME_PATH,common_audio_sse2,$(DEPTH)/media/webrtc/trunk/webrtc/common_audio/common_audio_common_audio_sse2) \
   $(NULL)
 endif
 
 ifeq ($(CPU_ARCH), arm)
 ifeq (Android,$(OS_TARGET))
 # NEON detection on WebRTC is Android only. If WebRTC supports Linux/arm etc,
 # we should remove OS check
 # extra ARM libs
-WEBRTC_LIBS += \
+SHARED_LIBRARY_LIBS += \
   $(call EXPAND_LIBNAME_PATH,cpu_features_android,$(DEPTH)/media/webrtc/trunk/webrtc/system_wrappers/source/system_wrappers_cpu_features_android) \
   $(NULL)
 # neon for ARM
 ifeq ($(BUILD_ARM_NEON),1)
-WEBRTC_LIBS += \
+SHARED_LIBRARY_LIBS += \
   $(call EXPAND_LIBNAME_PATH,common_audio_neon,$(DEPTH)/media/webrtc/trunk/webrtc/common_audio/common_audio_common_audio_neon) \
   $(call EXPAND_LIBNAME_PATH,audio_processing_neon,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_audio_processing_neon) \
   $(NULL)
 endif
 endif
 endif
 
 
new file mode 100644
--- /dev/null
+++ b/layout/media/webrtc/moz.build
@@ -0,0 +1,7 @@
+# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+LIBRARY_NAME = 'webrtc'
--- a/media/webrtc/signaling/test/Makefile.in
+++ b/media/webrtc/signaling/test/Makefile.in
@@ -6,16 +6,17 @@ LIBS = \
   $(XPCOM_LIBS) \
   $(NSPR_LIBS) \
   $(NSS_LIBS) \
   $(REALTIME_LIBS) \
   $(DEPTH)/xpcom/glue/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
   $(DEPTH)/media/mtransport/standalone/$(LIB_PREFIX)mtransport_s.$(LIB_SUFFIX) \
   $(DEPTH)/media/webrtc/signalingtest/signaling_ecc/$(LIB_PREFIX)ecc.$(LIB_SUFFIX) \
   $(DEPTH)/media/webrtc/signalingtest/signaling_sipcc/$(LIB_PREFIX)sipcc.$(LIB_SUFFIX) \
+  $(DEPTH)/layout/media/webrtc/$(LIB_PREFIX)webrtc.$(LIB_SUFFIX) \
   $(DEPTH)/layout/media/$(LIB_PREFIX)gkmedias.$(LIB_SUFFIX) \
   $(DEPTH)/media/webrtc/trunk/testing/gtest_gtest/$(LIB_PREFIX)gtest.$(LIB_SUFFIX) \
   $(DEPTH)/netwerk/srtp/src/$(LIB_PREFIX)nksrtp_s.$(LIB_SUFFIX) \
   $(NULL)
 
 ifdef MOZ_CUBEB
 ifdef MOZ_ALSA
 LIBS += \
--- a/media/webrtc/webrtc_config.gypi
+++ b/media/webrtc/webrtc_config.gypi
@@ -36,17 +36,17 @@
       }],
     ],
 # (for vp8) chromium sets to 0 also
     'use_temporal_layers': 0,
 # Creates AEC internal sample dump files in current directory
 #    'aec_debug_dump': 1,
 
     # codec enable/disables:
-    # Note: if you change one here, you must modify shared_libs.mk!
+    # Note: if you change one here, you must modify layout/media/webrtc/Makefile.in!
     'include_g711': 1,
     'include_opus': 1,
     'include_g722': 0,
     'include_ilbc': 0,
     'include_isac': 0,
     'include_pcm16b': 1,
   }
 }
--- a/toolkit/library/Makefile.in
+++ b/toolkit/library/Makefile.in
@@ -406,33 +406,32 @@ endif
 
 EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,gkmedias,$(DIST)/lib)
 
 ifdef MOZ_WEBRTC
 ifdef MOZ_PEERCONNECTION
 COMPONENT_LIBS += peerconnection
 endif
 ifdef MOZ_WEBRTC_SIGNALING
-EXTRA_DSO_LDOPTS += \
+SHARED_LIBRARY_LIBS += \
   $(DEPTH)/media/mtransport/build/$(LIB_PREFIX)mtransport.$(LIB_SUFFIX) \
   $(DEPTH)/media/webrtc/signaling/signaling_ecc/$(LIB_PREFIX)ecc.$(LIB_SUFFIX) \
   $(DEPTH)/media/webrtc/signaling/signaling_sipcc/$(LIB_PREFIX)sipcc.$(LIB_SUFFIX) \
   $(NULL)
 endif
-ifdef MOZ_WEBRTC_IN_LIBXUL
-include $(topsrcdir)/media/webrtc/shared_libs.mk
-EXTRA_DSO_LDOPTS += $(WEBRTC_LIBS)
+
+SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,webrtc,$(DEPTH)/layout/media/webrtc)
+
 ifeq (WINNT,$(OS_TARGET))
 EXTRA_DSO_LDOPTS += \
   -LIBPATH:"$(MOZ_DIRECTX_SDK_PATH)/lib/$(MOZ_DIRECTX_SDK_CPU_SUFFIX)" \
   $(NULL)
 OS_LIBS += $(call EXPAND_LIBNAME,secur32 crypt32 iphlpapi strmiids dmoguids wmcodecdspuuid amstrmid msdmo wininet)
 endif
 endif
-endif
 
 
 ifdef MOZ_CUBEB
 ifdef MOZ_ALSA
 EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS)
 endif
 ifdef MOZ_PULSEAUDIO
 EXTRA_DSO_LDOPTS += $(MOZ_PULSEAUDIO_LIBS)
@@ -580,17 +579,17 @@ endif
 EXTRA_DSO_LDOPTS += -DELAYLOAD:API-MS-WIN-CORE-WINRT-L$(CRTEXPDLLVERSION).DLL
 EXTRA_DSO_LDOPTS += -DELAYLOAD:API-MS-WIN-CORE-WINRT-STRING-L$(CRTEXPDLLVERSION).DLL
 EXTRA_DSO_LDOPTS += -DELAYLOAD:uiautomationcore.dll
 endif
 
 ifdef ACCESSIBILITY
 EXTRA_DSO_LDOPTS += -DELAYLOAD:oleacc.dll
 endif
-ifdef MOZ_WEBRTC_IN_LIBXUL
+ifdef MOZ_WEBRTC
 EXTRA_DSO_LDOPTS += -DELAYLOAD:msdmo.dll
 endif
 endif
 ifdef MOZ_GAMEPAD
 ifndef GNU_CC
 DXSDK := $(subst \,/,$(MOZ_DIRECTX_SDK_PATH))/Lib/$(MOZ_DIRECTX_SDK_CPU_SUFFIX)
 OS_LIBS += \
   "$(DXSDK)/dxguid.lib" \