Bug 861693 - Makefile and moz.build changes required for DirectShow audio backend. r=gps
authorChris Pearce <cpearce@mozilla.com>
Tue, 13 Aug 2013 16:49:25 +1200
changeset 142393 e7fef018f421c87f1454a4d4f4ca62c1716753f6
parent 142392 b2b920cb3e84770aa2ca88fc657813ccb59199d3
child 142394 7e2f89d988603b9da95de16c8210038f8ec56da8
push id25095
push userryanvm@gmail.com
push dateTue, 13 Aug 2013 19:37:08 +0000
treeherdermozilla-central@31f4b8658e3e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs861693
milestone26.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 861693 - Makefile and moz.build changes required for DirectShow audio backend. r=gps
content/media/Makefile.in
content/media/directshow/Makefile.in
content/media/directshow/moz.build
content/media/moz.build
layout/build/Makefile.in
toolkit/library/Makefile.in
--- a/content/media/Makefile.in
+++ b/content/media/Makefile.in
@@ -13,16 +13,20 @@ LIBRARY_NAME = gkconmedia_s
 MSVC_ENABLE_PGO := 1
 LIBXUL_LIBRARY = 1
 FAIL_ON_WARNINGS := 1
 
 include $(topsrcdir)/config/config.mk
 include $(topsrcdir)/config/rules.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
 
-INCLUDES  += \
+LOCAL_INCLUDES  += \
   -I$(topsrcdir)/content/base/src \
   -I$(topsrcdir)/layout/generic \
   -I$(topsrcdir)/layout/xul/base/src \
   $(NULL)
 
+ifdef MOZ_DIRECTSHOW
+LOCAL_INCLUDES += -I$(topsrcdir)/media/webrtc/trunk/webrtc/modules/video_capture/windows/
+endif
+
 CFLAGS   += $(GSTREAMER_CFLAGS)
 CXXFLAGS += $(GSTREAMER_CFLAGS)
new file mode 100644
--- /dev/null
+++ b/content/media/directshow/Makefile.in
@@ -0,0 +1,23 @@
+# 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/.
+
+DEPTH		= @DEPTH@
+topsrcdir	= @top_srcdir@
+srcdir		= @srcdir@
+VPATH		= @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+FAIL_ON_WARNINGS := 1
+
+LIBRARY_NAME	= gkcondirectshow_s
+LIBXUL_LIBRARY 	= 1
+
+LOCAL_INCLUDES += -I$(topsrcdir)/media/webrtc/trunk/webrtc/modules/video_capture/windows/
+
+ifeq ($(OS_ARCH),WINNT)
+OS_CXXFLAGS += -DNOMINMAX
+endif
+
+include $(topsrcdir)/config/rules.mk
new file mode 100644
--- /dev/null
+++ b/content/media/directshow/moz.build
@@ -0,0 +1,35 @@
+# -*- 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/.
+
+MODULE = 'content'
+
+EXPORTS += [
+    'AudioSinkFilter.h',
+    'AudioSinkInputPin.h',
+    'DirectShowDecoder.h',
+    'DirectShowReader.h',
+    'DirectShowUtils.h',
+]
+
+CPP_SOURCES += [
+    'AudioSinkFilter.cpp',
+    'AudioSinkInputPin.cpp',
+    'DirectShowDecoder.cpp',
+    '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']:
+    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',
+    ]
--- a/content/media/moz.build
+++ b/content/media/moz.build
@@ -23,16 +23,19 @@ if CONFIG['MOZ_WEBM']:
     PARALLEL_DIRS += ['webm']
 
 if CONFIG['MOZ_GSTREAMER']:
     PARALLEL_DIRS += ['gstreamer']
 
 if CONFIG['MOZ_DASH']:
     PARALLEL_DIRS += ['dash']
 
+if CONFIG['MOZ_DIRECTSHOW']:
+    PARALLEL_DIRS += ['directshow']
+
 if CONFIG['MOZ_MEDIA_PLUGINS']:
     PARALLEL_DIRS += ['plugins']
 
 if CONFIG['MOZ_WMF']:
     PARALLEL_DIRS += ['wmf']
 
 PARALLEL_DIRS += ['webrtc']
 
--- a/layout/build/Makefile.in
+++ b/layout/build/Makefile.in
@@ -167,16 +167,22 @@ SHARED_LIBRARY_LIBS 	+= \
 endif
 
 ifdef MOZ_WMF
 SHARED_LIBRARY_LIBS 	+= \
 	$(DEPTH)/content/media/wmf/$(LIB_PREFIX)gkconwmf_s.$(LIB_SUFFIX) \
 	$(NULL)
 endif
 
+ifdef MOZ_DIRECTSHOW
+SHARED_LIBRARY_LIBS 	+= \
+	$(DEPTH)/content/media/directshow/$(LIB_PREFIX)gkcondirectshow_s.$(LIB_SUFFIX) \
+	$(NULL)
+endif
+
 ifdef MOZ_WAVE
 SHARED_LIBRARY_LIBS 	+= \
 	$(DEPTH)/content/media/wave/$(LIB_PREFIX)gkconwave_s.$(LIB_SUFFIX) \
 	$(NULL)
 endif
 
 ifdef MOZ_GSTREAMER
 SHARED_LIBRARY_LIBS 	+= \
--- a/toolkit/library/Makefile.in
+++ b/toolkit/library/Makefile.in
@@ -463,16 +463,20 @@ OS_LIBS += \
   -lgui \
   $(NULL)
 endif
 
 ifdef MOZ_WMF
 OS_LIBS += $(call EXPAND_LIBNAME,mfuuid wmcodecdspuuid strmiids)
 endif
 
+ifdef MOZ_DIRECTSHOW
+OS_LIBS += $(call EXPAND_LIBNAME,dmoguids wmcodecdspuuid strmiids msdmo)
+endif
+
 EXTRA_DEPS += \
   $(topsrcdir)/intl/unicharutil/util/objs.mk \
   $(topsrcdir)/rdf/util/src/objs.mk \
   $(NULL)
 
 GARBAGE += \
   $(INTL_UNICHARUTIL_UTIL_LCPPSRCS) \
   $(RDF_UTIL_SRC_LCPPSRCS) \