Repository navigation
prepare for siprtp_module - #32
Conversation
j1elo
left a comment
There was a problem hiding this comment.
The filesystem listings shown in the screenshots were generated with a find command and then compared with meld. For portability between development machines, I've written the complete self-contained set of commands that build and install KMS so it's possible to repeat this analysis as desired:
docker run --rm -ti --network host -v /tmp:/host ubuntu:xenial
apt-get update && apt-get install --no-install-recommends --yes \
build-essential \
ca-certificates \
cmake \
git \
gnupg \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5AFA7A83 \
&& source /etc/lsb-release \
&& echo "deb [arch=amd64] http://ubuntu.openvidu.io/dev $DISTRIB_CODENAME kms6" >/etc/apt/sources.list.d/kurento.list \
&& apt-get update && apt-get install --no-install-recommends --yes \
kurento-media-server-dev
git clone https://github.com/Kurento/kms-omni-build.git \
&& cd kms-omni-build/ \
&& git submodule update --init --recursive \
&& git submodule update --remote \
&& git checkout master \
&& git submodule foreach "git checkout master"
pushd kms-elements/ \
&& git checkout -b naevatec-siprtp_module master \
&& git config --global user.email "dummy" \
&& git config --global user.name "dummy" \
&& git pull --no-edit https://github.com/naevatec/kms-elements.git siprtp_module \
&& popd
bin/kms-build-run.sh --build-only \
&& cd build-Debug-docker/ \
&& make install
find / -xdev ! -path '/kms-omni-build/*' | sort >/host/fs-after-install.txt
Running this with/without the git pull siprtp_module, provides two "fs-after-install.txt" files that can be compared. These contain a preview of where all files would be installed in user's machines when using apt-get.
| add_glib_enumtypes(KMS_RTPENDPOINT_SOURCES KMS_RTPENDPOINT_HEADERS kms-rtp-enumtypes KMS ${ENUM_HEADERS}) | ||
|
|
||
| add_library(rtpendpoint MODULE ${KMS_RTPENDPOINT_SOURCES} ${KMS_RTPENDPOINT_HEADERS}) | ||
| add_library(rtpendpoint SHARED ${KMS_RTPENDPOINT_SOURCES} ${KMS_RTPENDPOINT_HEADERS}) |
There was a problem hiding this comment.
I don't think this change is good; the library is a GStreamer plugin, intended to be loaded with dlopen(), and it is not a general purpose shared library.
If there are functions that should be exported, probably the correct way would be to implement a separate, general-purpose shared library, similar to the kmswebrtcendpointlib that is done in the webrtc module.
| TARGETS rtpendpoint | ||
| RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
| LIBRARY DESTINATION ${CMAKE_INSTALL_GST_PLUGINS_DIR} | ||
| LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
There was a problem hiding this comment.
Same: the target rtpendpoint is meant to produce a GStreamer plugin, which should be installed in the GStreamer plugin destination path. See the difference in installation, before & after this change:

This can cause "plugin not found" errors, depending on the platform.
In summary, all Kureno-specific plugins should end up in {installPrefix}/lib/gstreamer-1.5/. The fact that it happens to work when the plugin is in {installPrefix}/lib/ (together with all other system libraries) is coincidental and depends on the environment configuration and/or the specific system. It will probably break if using the GST_PLUGIN_PATH variable, or when we update to newer GStreamer versions.
Note for an extra example, how WebRtcEndpoint still contains a shared-library which is appropriately installed in /usr/(local)/lib/, named kmswebrtcendpointlib; the same should be done for RtpEndpoint, if possible:

|
Changes look good to me. Using same file listing procedure than in #32 (review), this is the definitive list of new files that get installed: + /usr/local/include/kurento/rtpendpoint
+ /usr/local/include/kurento/rtpendpoint/kms-rtp-enumtypes.h
+ /usr/local/include/kurento/rtpendpoint/kms-rtp-marshal.h
+ /usr/local/include/kurento/rtpendpoint/kmsrtpbaseconnection.h
+ /usr/local/include/kurento/rtpendpoint/kmsrtpconnection.h
+ /usr/local/include/kurento/rtpendpoint/kmsrtpendpoint.h
+ /usr/local/include/kurento/rtpendpoint/kmsrtpsdescryptosuite.h
+ /usr/local/include/kurento/rtpendpoint/kmsrtpsession.h
+ /usr/local/include/kurento/rtpendpoint/kmssocketutils.h
+ /usr/local/include/kurento/rtpendpoint/kmssrtpconnection.h
+ /usr/local/include/kurento/rtpendpoint/kmssrtpsession.h
+ /usr/local/lib/libkmsrtpendpointlib.so
+ /usr/local/lib/libkmsrtpendpointlib.so.6
+ /usr/local/lib/libkmsrtpendpointlib.so.6.16.1~22.g56f7139
+ /usr/local/share/cmake-3.5/Modules/FindKmsRtpEndpointLib.cmake |
What is the current behavior you want to change?
Current rtpendpoint (GStreamer plugin) is not well suited for SIP RTP media integration, as it lacks several features. This Lacking features are implemented in an external module SipRtpEndpoint that regarding its interface it derives from RtpEndpoint (available in https://github.com/naevatec/kms-siprtpendpoint). However, current rtpendpoint plugin declares several data private that is needed on derived siprtpendpoint in that module. In fact current rtpendpoint plugin can be considered "final" in the sense that it is not intended for deriving any class. The alternative would have been to reimplement many features of rtpendpoint in siprtpendpoint, which is for sure a bad idea in terms of maintenance.
So, this PR is about reingenieering a little part of rtpendpoint plugin so that private data gets public and so can be reused by derived classes/plugins
What is the new behavior provided by this change?
No new behaviour nor modified any behaviiour. All will continue to work exactly as they do on current version. The only change is matter of interface of the rtpendpoint GStreamer plugin
How has this been tested?
Tests have been done integrated with kms-siprtpendpoint project and include:
Types of changes
Checklist