使用的环境是ubuntu14
1.安装开发工具
apt-get install --no-install-recommends \ build-essential gdb pkg-config \ clang debhelper valgrind \ git wget maven 'openjdk-7-jdk'
2.配置kms的源
# Now run: tee /etc/apt/sources.list.d/kurento.list > /dev/null <<EOF # Kurento Packages repository deb http://ubuntu.kurento.org "trusty" kms6 EOF wget http://ubuntu.kurento.org/kurento.gpg.key -O - | apt-key add - apt-get update
3.安装kms开发需要的库
apt-get install --no-install-recommends \ libboost-dev \ libboost-filesystem-dev \ libboost-log-dev \ libboost-program-options-dev \ libboost-regex-dev \ libboost-system-dev \ libboost-test-dev \ libboost-thread-dev \ libevent-dev \ libglib2.0-dev \ libglibmm-2.4-dev \ libopencv-dev \ libsigc++-2.0-dev \ libsoup2.4-dev \ libssl-dev \ libvpx-dev \ libxml2-utils \ uuid-dev
apt-get install --no-install-recommends \ gstreamer1.5-libav \ gstreamer1.5-nice \ gstreamer1.5-plugins-bad \ gstreamer1.5-plugins-base \ gstreamer1.5-plugins-good \ gstreamer1.5-plugins-ugly \ gstreamer1.5-x \ libgstreamer1.5-dev \ libgstreamer-plugins-base1.5-dev \ libnice-dev \ openh264-gst-plugins-bad-1.5 \ openwebrtc-gst-plugins-dev \ kmsjsoncpp-dev \ ffmpeg
4. 安装 GStreamer 需要的插件调试库
apt-get install --no-install-recommends \ gstreamer1.5-libav-dbg \ gstreamer1.5-plugins-bad-dbg \ gstreamer1.5-plugins-base-dbg \ gstreamer1.5-plugins-good-dbg \ gstreamer1.5-plugins-ugly-dbg \ libgstreamer1.5-0-dbg \ libnice-dbg \ openwebrtc-gst-plugins-dbg \ kmsjsoncpp-dbg
5. 源码下载与安装:
可以使用交接文档中提供的源码进行编译,也可以使用下面命令从github上下载最新代码就行编译测试
git clone https://github.com/Kurento/kms-omni-build.git \ && cd kms-omni-build \ && git submodule init \ && git submodule update --recursive --remote
6.编译:
cd kms-omni-build
mkdir build-Debug \ && cd build-Debug \ && cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_VERBOSE_MAKEFILE=ON .. \ && make
7. 运行:
export GST_DEBUG="3,Kurento*:4,kms*:4,rtpendpoint:4,webrtcendpoint:4" kurento-media-server/server/kurento-media-server \ --modules-path=. \ --modules-config-path=./config \ --conf-file=./config/kurento.conf.json \ --gst-plugin-path=.