Bug 145 - Use GStreamer instead of sipXtapi for the media stack
Summary: Use GStreamer instead of sipXtapi for the media stack
Status: NEW
Alias: None
Product: reSIProcate
Classification: Unclassified
Component: recon (librecon) (show other bugs)
Version: unspecified
Hardware: All All
: P1 enhancement
Assignee: Owner of all unassigned bugs
URL:
Keywords:
Depends on: 151
Blocks:
  Show dependency treegraph
 
Reported: 2021-03-30 13:28 CDT by Daniel Pocock
Modified: 2021-07-01 05:27 CDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Pocock 2021-03-30 13:28:14 CDT
There was a previous issue about using libjingle as the media stack:
https://www.resiprocate.org/bugzilla/show_bug.cgi?id=93

Some work has been done on a branch that might provide insights to use any arbitrary media stack:
https://github.com/resiprocate/resiprocate/tree/b-counterpath-recon-20130424

The GStreamer media framework supports a range of audio and video formats.  Developers have recently added WebRTC support, here is a walkthrough of the C API:
http://blog.nirbheek.in/2018/02/gstreamer-webrtc.html

and here are complete examples in the repository:
https://gitlab.freedesktop.org/gstreamer/gst-examples/-/blob/master/webrtc/sendrecv/gst/webrtc-sendrecv.c

with the corresponding HTML and JavaScript:
https://gitlab.freedesktop.org/gstreamer/gst-examples/-/tree/master/webrtc/sendrecv/js

GStreamer is licensed under the LGPL:
https://gstreamer.freedesktop.org/documentation/plugin-development/appendix/licensing-advisory.html?gi-language=c

From a licensing perspective, this means that applications that are using the GStreamer shared libraries can use any license.  Applications that need to be statically linked to reSIProcate and GStreamer may need to release their source code under the terms of the LGPL or simply not enable the GStreamer component at compile time.  This is the same license that sipXtapi uses so there is no loss of flexibility.

To ensure maximum flexibility,
- the API could be generalized further to support multiple interchangeable media libraries, and/or
- the media library could be operated in a separate process
Comment 1 Daniel Pocock 2021-03-30 13:45:01 CDT
I created a separate issue for running the media stack in a separate process
https://www.resiprocate.org/bugzilla/show_bug.cgi?id=146
Comment 2 Daniel Pocock 2021-04-13 17:08:34 CDT
Some discussions on the gstreamer-devel mailing list:


setting up rtpbin from an SDP offer
https://lists.freedesktop.org/archives/gstreamer-devel/2021-April/078010.html

using webrtcbin for regular RTP and SRTP flows
https://lists.freedesktop.org/archives/gstreamer-devel/2021-April/078011.html

gstreamer / Farstream / reSIProcate interoperability
https://lists.freedesktop.org/archives/gstreamer-devel/2021-April/078025.html
Comment 3 Daniel Pocock 2021-07-01 05:27:06 CDT
GStreamer is written in C

There is a project providing C++ bindings, gstreamermm, based on gtkmm

https://gstreamer.freedesktop.org/bindings/cplusplus.html
https://github.com/GNOME/gstreamermm

gstreamermm v1.10 available in Debian buster:
https://packages.qa.debian.org/g/gstreamermm-1.0.html

Here is a sample application for the C++ bindings:

https://gitlab.gnome.org/GNOME/gstreamermm/-/blob/master/examples/hello_world/main.cc