Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
b19e1ee
OwrTransportAgent: Add bundle policy support to the transport agent.
alexgcastro Aug 10, 2016
a5c3d98
Add receive ssrcs attributes to the media session.
alexgcastro Oct 7, 2016
b707793
media_source: fix remote source rendering
philn Oct 19, 2016
71fa5ac
transport_agent: new API to explicitely start the pipeline
philn Oct 19, 2016
7a10100
transport_agent: RTP bundling support
philn Nov 14, 2016
78e5574
VP9 support
philn Nov 9, 2016
d3bf3c0
OwrLocalMediaSource: add volume and mute properties
philn Nov 14, 2016
75b5308
local: Use echo cancellation on Linux if available
ford-prefect Jan 27, 2015
7f3d23e
transport_agent: TURN TLS helper server support
philn Nov 16, 2016
2422815
Don't require gtk-doc if autogen.sh is invoked with --disable-gtk-doc.
Jun 30, 2016
0acc6c5
build: relax dependency on json-glib
philn Apr 28, 2015
779ffc5
rpi: rpicamsrc support
philn Apr 28, 2015
a85f745
owr: compressed sources support
calvaris Jul 15, 2016
05aad04
owr_transport_agent: force PLI request on incoming stream
philn Aug 9, 2016
f8bdd7b
owr_transport_agent: fix build warnings
philn Nov 23, 2016
c58e6c9
media_renderer: remove reconfigure_element vfunc
philn Nov 24, 2016
46c9b0a
owr_audio_renderer: fix build warnings
philn Dec 5, 2016
edc27cf
owr_device_list: skip v4l2 devices on RPi
philn Dec 5, 2016
b24b5ea
video: fix raw video rendering
philn Dec 5, 2016
a3f3dda
transport_agent: fix audio support
philn Dec 5, 2016
164b79e
owr_payload: new owr_payload_supported API
philn Dec 5, 2016
4fe30f4
local/transport: fix build
philn Dec 7, 2016
cf174d2
transport_agent: request key-frame on all platforms
philn Dec 7, 2016
173776e
transport: port to OpenSSL 1.1.0
philn Dec 7, 2016
09eda72
Workaround issue with the RPiCam and resolutions higher than 720p.
clopez Jan 23, 2017
c8d6dae
Allow to use a test video source that outputs H264 video
clopez May 17, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 28 additions & 13 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,42 @@
srcdir=`dirname $0`
(test -d $srcdir/m4) || mkdir $srcdir/m4

pushd $srcdir > /dev/null
gtkdocize && \
autoreconf --verbose --force --install --make || {
echo 'autogen.sh failed';
exit 1;
}

popd > /dev/null

while test "x$@" != "x" ; do
optarg=`expr "x$@" : 'x[^=]*=\(.*\)'`
case "$@" in
for ag_option in $@
do
case $ag_option in
--noconfigure)
NOCONFIGURE=defined
AUTOGEN_EXT_OPT="$AUTOGEN_EXT_OPT --noconfigure"
echo "+ configure run disabled"
shift
;;
--disable-gtk-doc)
enable_gtk_doc=no
echo "+ gtk-doc disabled"
;;
esac
done

pushd $srcdir > /dev/null

if test x$enable_gtk_doc = xno; then
if test -f gtk-doc.make; then :; else
echo "EXTRA_DIST = missing-gtk-doc" > gtk-doc.make
fi
echo "WARNING: You have disabled gtk-doc."
echo " As a result, you will not be able to generate the API"
echo " documentation and 'make dist' will not work."
echo
else
gtkdocize || exit $?
fi

autoreconf --verbose --force --install --make || {
echo 'autogen.sh failed';
exit 1;
}

popd > /dev/null

for arg do CONFIGURE_EXT_OPT="$CONFIGURE_EXT_OPT $arg"; done
if test ! -z "$CONFIGURE_EXT_OPT"
then
Expand Down
1 change: 1 addition & 0 deletions bridge/worker/peerhandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ function PeerHandler(configuration, keyCert, client, jsonRpc) {
transportAgent.add_session(sessions[i]);
}

transportAgent.start();
numberOfReceivePreparedSessions = sessions.length;

function prepareSession(session, mdesc) {
Expand Down
13 changes: 10 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ AC_SUBST(LIBOPENWEBRTC_CFLAGS)

GST_REQUIRED=1.4
PKG_CHECK_MODULES(GLIB, [glib-2.0, gobject-2.0, gmodule-2.0, gthread-2.0])
PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0 >= $GST_REQUIRED gstreamer-rtp-1.0 >= $GST_REQUIRED gstreamer-video-1.0 >= $GST_REQUIRED gstreamer-app-1.0 >= $GST_REQUIRED gstreamer-gl-1.0 >= $GST_REQUIRED])
PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0 >= $GST_REQUIRED gstreamer-rtp-1.0 >= $GST_REQUIRED gstreamer-video-1.0 >= $GST_REQUIRED gstreamer-audio-1.0 >= $GST_REQUIRED gstreamer-app-1.0 >= $GST_REQUIRED gstreamer-gl-1.0 >= $GST_REQUIRED])
PKG_CHECK_MODULES(NICE, [nice >= 0.1.7.1])
PKG_CHECK_MODULES(GSTREAMER_SCTP, [gstreamer-sctp-1.0])
PKG_CHECK_MODULES(ORC, [orc-0.4])
Expand Down Expand Up @@ -82,7 +82,8 @@ if test "x$enable_debug" = xyes; then
fi
AM_CONDITIONAL(OWR_DEBUG, test x$enable_debug = xyes)

dnl build debug or not
dnl build tests or not
have_json_glib=no
AC_MSG_CHECKING([whether to build tests or not])
AC_ARG_ENABLE(tests,
AC_HELP_STRING(
Expand All @@ -95,12 +96,13 @@ AC_HELP_STRING(
esac],[enable_tests=yes])
AC_MSG_RESULT([$enable_tests])
if test "x$enable_tests" = xyes; then
PKG_CHECK_MODULES(JSON_GLIB, [json-glib-1.0])
PKG_CHECK_MODULES(JSON_GLIB, [json-glib-1.0], [$have_json_glib=yes], [$have_json_glib=no])
PKG_CHECK_MODULES(LIBSOUP, [libsoup-2.4])
AC_DEFINE(OWR_TESTS, 1,
[Define if building tests])
fi
AM_CONDITIONAL(OWR_TESTS, test x$enable_tests = xyes)
AM_CONDITIONAL(HAVE_JSON_GLIB, test x$have_json_glib = xyes)

dnl build static or not
AC_MSG_CHECKING([whether to build static owr or not])
Expand Down Expand Up @@ -184,6 +186,11 @@ esac
AM_CONDITIONAL(TARGET_APPLE, test x$is_apple = xyes)
dnl We substitute OWR_DEVICE_LIST_EXT_LIBS in the end

AC_CHECK_LIB([bcm_host], [bcm_host_init],
[AC_DEFINE(TARGET_RPI, 1, [Define if building for the Raspberry Pi])],
[AC_DEFINE(TARGET_RPI, 0, [Define if building for the Raspberry Pi])]
)

dnl generate java bindings or not
AC_MSG_CHECKING([whether to generate java bindings or not])
AC_ARG_ENABLE(owr-java,
Expand Down
1 change: 1 addition & 0 deletions libopenwebrtc.exp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ owr_transport_agent_get_dot_data
owr_transport_agent_get_type
owr_transport_agent_new
owr_transport_agent_set_local_port_range
owr_transport_agent_start
owr_transport_type_get_type
owr_uri_source_agent_get_dot_data
owr_uri_source_agent_get_type
Expand Down
28 changes: 28 additions & 0 deletions local/owr_audio_renderer.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ GST_DEBUG_CATEGORY_EXTERN(_owraudiorenderer_debug);
#define AUDIO_SINK "openslessink"

#elif __linux__
#include <pulse/pulseaudio.h>

#define AUDIO_SINK "pulsesink"

Expand Down Expand Up @@ -119,6 +120,28 @@ OwrAudioRenderer *owr_audio_renderer_new(void)
NULL);
}

static void
setup_sink_for_aec(GstElement *sink)
{
#if defined(__linux__) && !defined(__ANDROID__) && !TARGET_RPI
/* pulsesink */
GstStructure *s;

s = gst_structure_new("props", PA_PROP_FILTER_WANT, G_TYPE_STRING, "echo-cancel", NULL);
g_object_set(G_OBJECT(sink), "stream-properties", s, NULL);
gst_structure_free(s);

#elif defined(__ANDROID__)
/* openslessink */

#elif defined(__APPLE__) && !TARGET_IPHONE_SIMULATOR
/* osxaudiosink */
#else
OWR_UNUSED(sink);
#endif
}


#define LINK_ELEMENTS(a, b) \
if (!gst_element_link(a, b)) \
GST_ERROR("Failed to link " #a " -> " #b);
Expand Down Expand Up @@ -151,6 +174,11 @@ static GstElement *owr_audio_renderer_get_element(OwrMediaRenderer *renderer)
sink = OWR_MEDIA_RENDERER_GET_CLASS(renderer)->get_sink(renderer);
g_assert(sink);

g_object_set(sink, "buffer-time", SINK_BUFFER_TIME,
"latency-time", G_GINT64_CONSTANT(10000), NULL);

setup_sink_for_aec(sink);

gst_bin_add_many(GST_BIN(renderer_bin), audioresample, audioconvert, capsfilter,
volume, sink, NULL);

Expand Down
29 changes: 24 additions & 5 deletions local/owr_device_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,8 @@ static void source_info_iterator(pa_context *pa_context, const pa_source_info *i
}

source = _owr_local_media_source_new_cached(info->index, info->description,
OWR_MEDIA_TYPE_AUDIO, OWR_SOURCE_TYPE_CAPTURE);
OWR_MEDIA_TYPE_AUDIO, OWR_SOURCE_TYPE_CAPTURE,
OWR_MEDIA_SOURCE_SUPPORTS_NONE);

context->list = g_list_prepend(context->list, source);
} else {
Expand All @@ -283,7 +284,8 @@ static gboolean enumerate_audio_source_devices(GClosure *callback)
GList *sources = NULL;

source = _owr_local_media_source_new_cached(-1,
"Default audio input", OWR_MEDIA_TYPE_AUDIO, OWR_SOURCE_TYPE_CAPTURE);
"Default audio input", OWR_MEDIA_TYPE_AUDIO, OWR_SOURCE_TYPE_CAPTURE,
OWR_MEDIA_SOURCE_SUPPORTS_NONE);
sources = g_list_prepend(sources, source);
_owr_utils_call_closure_with_list(callback, sources);
g_list_free_full(sources, g_object_unref);
Expand Down Expand Up @@ -358,7 +360,8 @@ static OwrLocalMediaSource *maybe_create_source_from_filename(const gchar *name)
return NULL;

source = _owr_local_media_source_new_cached(index, device_name,
OWR_MEDIA_TYPE_VIDEO, OWR_SOURCE_TYPE_CAPTURE);
OWR_MEDIA_TYPE_VIDEO, OWR_SOURCE_TYPE_CAPTURE,
OWR_MEDIA_SOURCE_SUPPORTS_NONE);

g_debug("v4l: filename match: %s", device_name);

Expand All @@ -378,6 +381,20 @@ static gboolean enumerate_video_source_devices(GClosure *callback)
GDir *dev_dir;
const gchar *filename;

#if TARGET_RPI
source = _owr_local_media_source_new_cached(-1, "RPiCam",
OWR_MEDIA_TYPE_VIDEO, OWR_SOURCE_TYPE_CAPTURE,
OWR_MEDIA_SOURCE_SUPPORTS_VIDEO_ORIENTATION | OWR_MEDIA_SOURCE_SUPPORTS_COLOR_BALANCE);
_owr_media_source_set_codec(OWR_MEDIA_SOURCE(source), OWR_CODEC_TYPE_H264);
sources = g_list_prepend(sources, source);

// Skip v4l2 devices.
_owr_utils_call_closure_with_list(callback, sources);
g_list_free_full(sources, g_object_unref);

return FALSE;
#endif

dev_dir = g_dir_open("/dev", 0, &error);

while ((filename = g_dir_read_name(dev_dir))) {
Expand Down Expand Up @@ -681,11 +698,13 @@ static gboolean enumerate_video_source_devices(GClosure *callback)

if (facing == CameraInfo.CAMERA_FACING_FRONT) {
source = _owr_local_media_source_new_cached(i, "Front facing Camera",
OWR_MEDIA_TYPE_VIDEO, OWR_SOURCE_TYPE_CAPTURE);
OWR_MEDIA_TYPE_VIDEO, OWR_SOURCE_TYPE_CAPTURE,
OWR_MEDIA_SOURCE_SUPPORTS_NONE);
sources = g_list_prepend(sources, source);
} else if (facing == CameraInfo.CAMERA_FACING_BACK) {
source = _owr_local_media_source_new_cached(i, "Back facing Camera",
OWR_MEDIA_TYPE_VIDEO, OWR_SOURCE_TYPE_CAPTURE);
OWR_MEDIA_TYPE_VIDEO, OWR_SOURCE_TYPE_CAPTURE,
OWR_MEDIA_SOURCE_SUPPORTS_NONE);
sources = g_list_append(sources, source);
}

Expand Down
7 changes: 5 additions & 2 deletions local/owr_local.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,17 @@ static GList *get_test_sources(OwrMediaType types)
OwrMediaType media_type;
GList *result_list = NULL;
GList *elem;
gboolean useh264 = g_ascii_strcasecmp (g_getenv("OWR_USE_TEST_SOURCES"),"H264") == 0;

if (g_once_init_enter(&cached_sources)) {
GList *sources = NULL;

source = _owr_local_media_source_new_cached(-1, "Audio test source", OWR_MEDIA_TYPE_AUDIO, OWR_SOURCE_TYPE_TEST);
source = _owr_local_media_source_new_cached(-1, "Audio test source", OWR_MEDIA_TYPE_AUDIO, OWR_SOURCE_TYPE_TEST, OWR_MEDIA_SOURCE_SUPPORTS_NONE);
sources = g_list_append(sources, OWR_MEDIA_SOURCE(source));

source = _owr_local_media_source_new_cached(-1, "Video test source", OWR_MEDIA_TYPE_VIDEO, OWR_SOURCE_TYPE_TEST);
source = _owr_local_media_source_new_cached(-1, "Video test source", OWR_MEDIA_TYPE_VIDEO, OWR_SOURCE_TYPE_TEST, OWR_MEDIA_SOURCE_SUPPORTS_NONE);
if (useh264)
_owr_media_source_set_codec(OWR_MEDIA_SOURCE(source), OWR_CODEC_TYPE_H264);
sources = g_list_append(sources, OWR_MEDIA_SOURCE(source));

g_once_init_leave(&cached_sources, sources);
Expand Down
Loading