Commit 8f3f8223 authored by Alexandre Lision's avatar Alexandre Lision
Browse files

OSX: Adapt build system for video

This commit fixes coupling between udev and video, since
udev is only available on Linux

Refs #65446

Change-Id: I8ad782bbedb031b5973e202eff3487535aac3fb4
parent 07f7e37a
......@@ -151,7 +151,7 @@ static int osxTests()
.config_ev_handlers = {},
.pres_ev_handlers = {}
#ifdef RING_VIDEO
.video_ev_handlers = {}
,.video_ev_handlers = {}
#endif
};
......
......@@ -364,7 +364,10 @@ AS_IF([test "x$enable_video" != "xno"],
[
AC_DEFINE(RING_VIDEO, [], [Video support enabled])
AM_CONDITIONAL(RING_VIDEO, true)
PKG_CHECK_MODULES(UDEV, libudev,, AC_MSG_ERROR([Missing libudev development files]))
AS_IF([test "$SYS" = linux],[
PKG_CHECK_MODULES(UDEV, libudev,, AC_MSG_ERROR([Missing libudev development files]))
],[
])
],
[
AM_CONDITIONAL(RING_VIDEO, false)
......
include ../globals.mak
RING_VIDEO_LIBS=
if RING_VIDEO
RING_VIDEO_LIBS=./media/video/libvideo.la \
./media/video/v4l2/libv4l2.la
RING_VIDEO_LIBS+=./media/video/libvideo.la
if HAVE_LINUX
RING_VIDEO_LIBS+= \
./media/video/v4l2/libv4l2.la
endif
endif
if BUILD_INSTANT_MESSAGING
......
......@@ -36,7 +36,3 @@ libmedia_la_LDFLAGS = @LIBAVCODEC_LIBS@ @LIBAVFORMAT_LIBS@ @LIBAVDEVICE_LIBS@ @L
AM_CFLAGS=@LIBAVCODEC_CFLAGS@ @LIBAVFORMAT_CFLAGS@ @LIBAVDEVICE_CFLAGS@ @LIBSWSCALE_CFLAGS@
AM_CXXFLAGS=@LIBAVCODEC_CFLAGS@ @LIBAVFORMAT_CFLAGS@ @LIBAVDEVICE_CFLAGS@ @LIBSWSCALE_CFLAGS@
if RING_VIDEO
AM_CXXFLAGS += @UDEV_CFLAGS@
endif
include $(top_srcdir)/globals.mak
SUBDIRS=v4l2 test
SUBDIRS= test
if HAVE_LINUX
SUBDIRS+=v4l2
endif
noinst_LTLIBRARIES = libvideo.la
libvideo_la_SOURCES = \
......@@ -18,5 +22,5 @@ libvideo_la_SOURCES = \
libvideo_la_LIBADD = @LIBAVCODEC_LIBS@ @LIBAVFORMAT_LIBS@ @LIBAVDEVICE_LIBS@ @LIBSWSCALE_LIBS@ @LIBAVUTIL_LIBS@
AM_CXXFLAGS=@LIBAVCODEC_CFLAGS@ @LIBAVFORMAT_CFLAGS@ @LIBAVDEVICE_CFLAGS@ @LIBSWSCALE_CFLAGS@ @UDEV_CFLAGS@
AM_CXXFLAGS=@LIBAVCODEC_CFLAGS@ @LIBAVFORMAT_CFLAGS@ @LIBAVDEVICE_CFLAGS@ @LIBSWSCALE_CFLAGS@
AM_CFLAGS=@LIBAVCODEC_CFLAGS@ @LIBAVFORMAT_CFLAGS@ @LIBAVDEVICE_CFLAGS@ @LIBSWSCALE_CFLAGS@
......@@ -6,4 +6,5 @@ libv4l2_la_SOURCES = \
video_device_impl.cpp \
video_device_monitor_impl.cpp
AM_CXXFLAGS = @UDEV_CFLAGS@
libv4l2_la_LIBADD = @UDEV_LIBS@
......@@ -78,19 +78,19 @@ private:
void startReceiver();
// all public methods must be locked internally before use
std::recursive_mutex mutex_ = {};
std::recursive_mutex mutex_;
std::unique_ptr<SocketPair> socketPair_ = nullptr;
std::unique_ptr<VideoSender> sender_ = nullptr;
std::unique_ptr<VideoReceiveThread> receiveThread_ = nullptr;
std::unique_ptr<SocketPair> socketPair_;
std::unique_ptr<VideoSender> sender_;
std::unique_ptr<VideoReceiveThread> receiveThread_;
std::map<std::string, std::string> txArgs_;
std::map<std::string, std::string> rxArgs_ = {};
std::map<std::string, std::string> rxArgs_;
bool sending_ = false;
bool receiving_ = false;
const std::string callID_;
Conference* conference_ = nullptr;
std::shared_ptr<VideoMixer> videoMixer_ = nullptr;
std::shared_ptr<VideoFrameActiveWriter> videoLocal_ = nullptr;
Conference* conference_;
std::shared_ptr<VideoMixer> videoMixer_;
std::shared_ptr<VideoFrameActiveWriter> videoLocal_;
};
}} // namespace ring::video
......
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