Commit 59757d1b authored by Ghislain MARY's avatar Ghislain MARY

Split mediastreamer2 into two libraries: base and voip.

parent 8ee489d1
......@@ -564,7 +564,7 @@ AC_ARG_ENABLE(ortp,
*) AC_MSG_ERROR(bad value ${enableval} for --disable-ortp) ;;
esac],
[ortp_enabled=true])
AM_CONDITIONAL(ORTP_ENABLED, test x$ortp_enabled = xtrue )
AM_CONDITIONAL(ORTP_ENABLED, test x$ortp_enabled = xtrue)
dnl *********************************************
......@@ -617,12 +617,22 @@ AC_ARG_ENABLE(filters,
*) AC_MSG_ERROR(bad value ${enableval} for --disable-filters) ;;
esac],
[filters=true])
AM_CONDITIONAL(MS2_FILTERS, test x$filters = xtrue )
AM_CONDITIONAL(MS2_FILTERS, test x$filters = xtrue)
if test "$filters" = 'true'; then
CFLAGS="$CFLAGS -DMS2_FILTERS"
fi
if test "$ortp_enabled" = 'true'; then
build_voip_library=true
elif test "$filters" = 'true'; then
build_voip_library=true
else
build_voip_library=false;
fi
AM_CONDITIONAL(BUILD_VOIP_LIBRARY, test x$build_voip_library = xtrue)
dnl check dlopen support in headers and libraries, so that we can use mediastreamer plugins
AC_CHECK_HEADERS(dlfcn.h)
have_dlopen=false
......
......@@ -21,188 +21,193 @@ CLEANFILES=alldescs.h filterdescs.txt $(GITVERSION_FILE) yuv2rgb.fs.h yuv2rgb.vs
INCLUDES=-I$(top_srcdir)/include/
lib_LTLIBRARIES=libmediastreamer.la
libmediastreamer_la_SOURCES= mscommon.c \
$(GITVERSION_FILE) \
msfilter.c \
msqueue.c \
msticker.c \
eventqueue.c \
mssndcard.c \
tee.c \
msjoin.c \
mswebcam.c \
mtu.c \
void.c \
itc.c
lib_LTLIBRARIES=libmediastreamer_base.la
if BUILD_VOIP_LIBRARY
lib_LTLIBRARIES+=libmediastreamer_voip.la
endif
libmediastreamer_base_la_SOURCES= mscommon.c \
$(GITVERSION_FILE) \
msfilter.c \
msqueue.c \
msticker.c \
eventqueue.c \
mssndcard.c \
tee.c \
msjoin.c \
mswebcam.c \
mtu.c \
void.c \
itc.c
libmediastreamer_voip_la_SOURCES=
#dummy c++ file to force libtool to use c++ linking (because of msdscap-mingw.cc)
nodist_EXTRA_libmediastreamer_la_SOURCES = dummy.cxx
nodist_EXTRA_libmediastreamer_base_la_SOURCES = dummy.cxx
if ORTP_ENABLED
libmediastreamer_la_SOURCES+= audiostream.c \
ice.c \
msrtp.c \
qualityindicator.c \
audioconference.c \
bitratedriver.c \
qosanalyzer.c \
bitratecontrol.c
libmediastreamer_voip_la_SOURCES+= audiostream.c \
ice.c \
msrtp.c \
qualityindicator.c \
audioconference.c \
bitratedriver.c \
qosanalyzer.c \
bitratecontrol.c
else
libmediastreamer_la_SOURCES+= ortp-deps/b64.c \
ortp-deps/logging.c \
ortp-deps/payloadtype.c \
ortp-deps/port.c \
ortp-deps/str_utils.c
libmediastreamer_base_la_SOURCES+= ortp-deps/b64.c \
ortp-deps/logging.c \
ortp-deps/payloadtype.c \
ortp-deps/port.c \
ortp-deps/str_utils.c
endif
if MS2_FILTERS
libmediastreamer_la_SOURCES+= alaw.c \
ulaw.c \
dtmfgen.c \
msconf.c \
g711common.h \
msvolume.c \
dsptools.c \
kiss_fft.c \
_kiss_fft_guts.h \
kiss_fft.h \
kiss_fftr.c \
kiss_fftr.h \
equalizer.c \
chanadapt.c \
audiomixer.c \
tonedetector.c \
g722_decode.c g722.h \
g722_encode.c \
msg722.c \
l16.c \
genericplc.c
libmediastreamer_voip_la_SOURCES+= alaw.c \
ulaw.c \
dtmfgen.c \
msconf.c \
g711common.h \
msvolume.c \
dsptools.c \
kiss_fft.c \
_kiss_fft_guts.h \
kiss_fft.h \
kiss_fftr.c \
kiss_fftr.h \
equalizer.c \
chanadapt.c \
audiomixer.c \
tonedetector.c \
g722_decode.c g722.h \
g722_encode.c \
msg722.c \
l16.c \
genericplc.c
if BUILD_SPEEX
libmediastreamer_la_SOURCES+= msspeex.c speexec.c
libmediastreamer_voip_la_SOURCES+= msspeex.c speexec.c
endif
if BUILD_GSM
libmediastreamer_la_SOURCES+= gsm.c
libmediastreamer_voip_la_SOURCES+= gsm.c
endif
if BUILD_G726
libmediastreamer_la_SOURCES+= g726.c
libmediastreamer_voip_la_SOURCES+= g726.c
endif
if BUILD_WIN32
libmediastreamer_la_SOURCES+= winsnd3.c \
msfileplayer_win.c msfilerec_win.c
libmediastreamer_voip_la_SOURCES+= winsnd3.c \
msfileplayer_win.c \
msfilerec_win.c
else
libmediastreamer_la_SOURCES+= msfileplayer.c \
msfilerec.c
libmediastreamer_voip_la_SOURCES+= msfileplayer.c \
msfilerec.c
endif
if BUILD_RESAMPLE
libmediastreamer_la_SOURCES+= msresample.c
libmediastreamer_voip_la_SOURCES+= msresample.c
endif
if BUILD_ALSA
libmediastreamer_la_SOURCES+= alsa.c
libmediastreamer_voip_la_SOURCES+= alsa.c
endif
if BUILD_OSS
libmediastreamer_la_SOURCES+= oss.c
libmediastreamer_voip_la_SOURCES+= oss.c
endif
if BUILD_ARTS
libmediastreamer_la_SOURCES+= arts.c
libmediastreamer_voip_la_SOURCES+= arts.c
endif
if BUILD_PORTAUDIO
libmediastreamer_la_SOURCES+= pasnd.c
libmediastreamer_voip_la_SOURCES+= pasnd.c
endif
if BUILD_MACSND
libmediastreamer_la_SOURCES+= macsnd.c
libmediastreamer_voip_la_SOURCES+= macsnd.c
endif
if BUILD_IOSIOUNIT
libmediastreamer_la_SOURCES+= msiounit.m
libmediastreamer_voip_la_SOURCES+= msiounit.m
endif
if BUILD_MACAQSND
libmediastreamer_la_SOURCES+= aqsnd.c
libmediastreamer_voip_la_SOURCES+= aqsnd.c
endif
if BUILD_PULSEAUDIO
libmediastreamer_la_SOURCES+= pulseaudio.c
libmediastreamer_voip_la_SOURCES+= pulseaudio.c
endif
if BUILD_VIDEO
if BUILD_MACOSX
libmediastreamer_la_SOURCES+= qtcapture.m msosxdisplay.m shaders.c shaders.h opengles_display.c opengles_display.h
nodist_libmediastreamer_la_SOURCES = yuv2rgb.fs.h yuv2rgb.fs.h
libmediastreamer_voip_la_SOURCES+= qtcapture.m msosxdisplay.m shaders.c shaders.h opengles_display.c opengles_display.h
nodist_libmediastreamer_voip_la_SOURCES = yuv2rgb.fs.h yuv2rgb.fs.h
endif
if BUILD_IOS
libmediastreamer_la_SOURCES+= scaler.c iosdisplay.m ioscapture.m shaders.c shaders.h opengles_display.c opengles_display.h
nodist_libmediastreamer_la_SOURCES = yuv2rgb.fs.h yuv2rgb.fs.h
libmediastreamer_voip_la_SOURCES+= scaler.c iosdisplay.m ioscapture.m shaders.c shaders.h opengles_display.c opengles_display.h
nodist_libmediastreamer_voip_la_SOURCES = yuv2rgb.fs.h yuv2rgb.fs.h
endif
if BUILD_V4L1
libmediastreamer_la_SOURCES+= msv4l.c
libmediastreamer_voip_la_SOURCES+= msv4l.c
endif
if BUILD_V4L2
libmediastreamer_la_SOURCES+= msv4l2.c
libmediastreamer_voip_la_SOURCES+= msv4l2.c
endif
if BUILD_WIN32
libmediastreamer_la_SOURCES+= msdscap-mingw.cc drawdib-display.c
libmediastreamer_voip_la_SOURCES+= msdscap-mingw.cc drawdib-display.c
endif
if BUILD_THEORA
libmediastreamer_la_SOURCES+= theora.c
libmediastreamer_voip_la_SOURCES+= theora.c
endif
if BUILD_VP8
libmediastreamer_la_SOURCES+= vp8.c
libmediastreamer_voip_la_SOURCES+= vp8.c
endif
if BUILD_FFMPEG
libmediastreamer_la_SOURCES+= videoenc.c \
videodec.c \
swscale.h ffmpeg-priv.h \
h264dec.c \
jpegwriter.c
libmediastreamer_voip_la_SOURCES+= videoenc.c \
videodec.c \
swscale.h ffmpeg-priv.h \
h264dec.c \
jpegwriter.c
endif
if BUILD_SDL
libmediastreamer_la_SOURCES+= videoout.c
libmediastreamer_voip_la_SOURCES+= videoout.c
endif
if BUILD_X11_XV
libmediastreamer_la_SOURCES+= x11video.c
libmediastreamer_voip_la_SOURCES+= x11video.c
endif
if BUILD_X11_GL
libmediastreamer_la_SOURCES+= glxvideo.c opengles_display.c shaders.c
libmediastreamer_voip_la_SOURCES+= glxvideo.c opengles_display.c shaders.c
endif
libmediastreamer_la_SOURCES+= rfc2429.h \
pixconv.c \
sizeconv.c \
msvideo.c \
msvideo_neon.c \
msvideo_neon.h \
rfc3984.c \
mire.c \
extdisplay.c \
layouts.c layouts.h \
nowebcam.c nowebcam.h
libmediastreamer_voip_la_SOURCES+= rfc2429.h \
pixconv.c \
sizeconv.c \
msvideo.c \
msvideo_neon.c \
msvideo_neon.h \
rfc3984.c \
mire.c \
extdisplay.c \
layouts.c layouts.h \
nowebcam.c nowebcam.h
if ORTP_ENABLED
libmediastreamer_la_SOURCES+= videostream.c
libmediastreamer_voip_la_SOURCES+= videostream.c
endif
endif BUILD_VIDEO
......@@ -212,52 +217,52 @@ endif MS2_FILTERS
# Put 2 NULL values at the end of ms_filter-descs[] to prevent a GCC compilation error ('array subscript is above array bounds') when building with the --disable-filters option
alldescs.h: Makefile $(libmediastreamer_la_SOURCES)
alldescs.h: Makefile $(libmediastreamer_base_la_SOURCES) $(libmediastreamer_voip_la_SOURCES)
builddir=`pwd` && cd $(srcdir) && \
awk 'BEGIN { FS="[()]" ; }; /^\t*MS_FILTER_DESC_EXPORT/{ printf("%s\n", $$2) } ' > $$builddir/filterdescs.txt $(libmediastreamer_la_SOURCES) && \
awk 'BEGIN { FS="[()]" ; }; /^\t*MS_FILTER_DESC_EXPORT/{ printf("%s\n", $$2) } ' > $$builddir/filterdescs.txt $(libmediastreamer_base_la_SOURCES) $(libmediastreamer_voip_la_SOURCES) && \
awk 'BEGIN { print("#include \"mediastreamer2/msfilter.h\"\n") } { printf("extern MSFilterDesc %s;\n",$$1) } ' $$builddir/filterdescs.txt > $$builddir/$@ && \
awk 'BEGIN { print("MSFilterDesc * ms_filter_descs[]={") } { printf("&%s,\n",$$1) } END{ print("NULL,\nNULL\n};\n") } ' $$builddir/filterdescs.txt >> $$builddir/$@
libmediastreamer_la_LIBADD= $(ORTP_LIBS) \
$(PORTAUDIO_LIBS) \
$(ALSA_LIBS) \
$(ARTS_LIBS) \
$(LIBPULSE_LIBS) \
$(SPEEX_LIBS) \
$(GSM_LIBS) \
$(LIBV4L1_LIBS) \
$(LIBV4L2_LIBS) \
$(SPANDSP_LIBS)
libmediastreamer_la_LDFLAGS= -no-undefined -version-info $(LIBMEDIASTREAMER_SO_VERSION)
libmediastreamer_base_la_LIBADD= $(ORTP_LIBS) \
$(PORTAUDIO_LIBS) \
$(ALSA_LIBS) \
$(ARTS_LIBS) \
$(LIBPULSE_LIBS) \
$(SPEEX_LIBS) \
$(GSM_LIBS) \
$(LIBV4L1_LIBS) \
$(LIBV4L2_LIBS) \
$(SPANDSP_LIBS)
libmediastreamer_base_la_LDFLAGS= -no-undefined -version-info $(LIBMEDIASTREAMER_SO_VERSION)
if !BUILD_WIN32
libmediastreamer_la_LDFLAGS+=-rdynamic
libmediastreamer_base_la_LDFLAGS+=-rdynamic
endif
if BUILD_VIDEO
libmediastreamer_la_LIBADD+= $(VIDEO_LIBS) \
$(THEORA_LIBS) \
$(GLEW_LIBS)
libmediastreamer_base_la_LIBADD+= $(VIDEO_LIBS) \
$(THEORA_LIBS) \
$(GLEW_LIBS)
if BUILD_IOS
libmediastreamer_la_LDFLAGS+= -framework CoreGraphics
libmediastreamer_base_la_LDFLAGS+= -framework CoreGraphics
endif
if BUILD_MACOSX
libmediastreamer_la_LDFLAGS+= -framework Cocoa -framework OpenGL -framework QuartzCore
libmediastreamer_base_la_LDFLAGS+= -framework Cocoa -framework OpenGL -framework QuartzCore
endif
if BUILD_WIN32
libmediastreamer_la_LIBADD+= -lole32 \
-loleaut32\
-lwinmm \
-luuid
libmediastreamer_base_la_LIBADD+= -lole32 \
-loleaut32\
-lwinmm \
-luuid
endif
endif
if BUILD_WIN32_WCE
libmediastreamer_la_LIBADD+= -lmmtimer
libmediastreamer_base_la_LIBADD+= -lmmtimer
endif
AM_CFLAGS= $(ORTP_CFLAGS) \
......@@ -281,11 +286,14 @@ endif
if BUILD_VP8
AM_CFLAGS+=$(VP8_CFLAGS)
libmediastreamer_la_LIBADD+=$(VP8_LIBS)
libmediastreamer_base_la_LIBADD+=$(VP8_LIBS)
endif
AM_OBJCFLAGS=$(AM_CFLAGS)
libmediastreamer_voip_la_LIBADD= $(libmediastreamer_base_la_LIBADD)
libmediastreamer_voip_la_LDFLAGS= $(libmediastreamer_base_la_LDFLAGS)
imgdir=$(datadir)/images/
img_DATA=nowebcamCIF.jpg
......
......@@ -25,7 +25,7 @@ tones_SOURCES=tones.c
TEST_DEPLIBS=\
$(top_builddir)/src/libmediastreamer.la \
$(top_builddir)/src/libmediastreamer_base.la \
$(ORTP_LIBS) \
$(ALSA_LIBS) \
$(ARTS_LIBS) \
......@@ -35,6 +35,10 @@ TEST_DEPLIBS=\
$(VP8_LIBS) \
$(VIDEO_LIBS)
if BUILD_VOIP_LIBRARY
TEST_DEPLIBS+=$(top_builddir)/src/libmediastreamer_voip.la
endif
if ORTP_ENABLED
if MS2_FILTERS
bin_PROGRAMS=mediastream
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment