Hello community,
here is the log from the commit of package farsight
checked in at Tue Jul 8 16:51:20 CEST 2008.
--------
--- GNOME/farsight/farsight.changes 2008-03-31 22:33:14.000000000 +0200
+++ farsight/farsight.changes 2008-07-07 17:48:36.985020000 +0200
@@ -1,0 +2,13 @@
+Mon Jul 7 17:55:25 CEST 2008 - maw@suse.de
+
+- Update to version 0.1.28:
+ + Misc fixes and improvements.
+
+-------------------------------------------------------------------
+Mon Jul 7 17:42:43 CEST 2008 - maw@suse.de
+
+- Remove autoreconf call
+- Make the farsight-devel require gstreamer-0_10-devel, not
+ the deprecated gstreamer010-devel.
+
+-------------------------------------------------------------------
Old:
----
farsight-0.1.26.tar.bz2
New:
----
farsight-0.1.28.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ farsight.spec ++++++
--- /var/tmp/diff_new_pack.F30171/_old 2008-07-08 16:50:20.000000000 +0200
+++ /var/tmp/diff_new_pack.F30171/_new 2008-07-08 16:50:20.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package farsight (Version 0.1.26)
+# spec file for package farsight (Version 0.1.28)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -15,14 +15,14 @@
BuildRequires: gcc-c++ glib2-devel gstreamer-0_10-devel gstreamer-0_10-plugins-base-devel libjingle-devel
# For autoreconf:
BuildRequires: gtk-doc
-Version: 0.1.26
+Version: 0.1.28
Release: 1
License: LGPL v2.1 only
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: gstreamer-0_10 gstreamer-0_10-plugins-base libfarsight-0_1-3 = %{version}
Url: http://farsight.freedesktop.org/
Group: Productivity/Multimedia/Other
-Summary: Framework To Deal With All Known Audio/Video Conferencing Protocols
+Summary: Framework for Audio/Video Conferencing Protocols
Source: farsight-%{version}.tar.bz2
%description
@@ -71,7 +71,7 @@
%package devel
License: GPL v2 or later
-Requires: %{name} = %{version} pkgconfig glibc-devel glib2-devel gstreamer010-devel
+Requires: %{name} = %{version} pkgconfig glibc-devel glib2-devel gstreamer-0_10-devel
Summary: Framework To Deal With All Known Audio/Video Conferencing Protocols
Group: Development/Libraries/C and C++
@@ -123,8 +123,7 @@
%setup -q -n %{name}-%{version}
%build
-autoreconf -f -i
-# FIXME: evaluate support for clinkc: http://sourceforge.net/projects/clinkc
+# FIXME: evaluate support for clinkc: http://sourceforge.net/projects/clinkc
# CyberLink for C is a UPnP library using C for small and embedded platforms
#
# FIXME:
@@ -175,6 +174,13 @@
%{_datadir}/gtk-doc/html/farsight
%changelog
+* Mon Jul 07 2008 maw@suse.de
+- Update to version 0.1.28:
+ + Misc fixes and improvements.
+* Mon Jul 07 2008 maw@suse.de
+- Remove autoreconf call
+- Make the farsight-devel require gstreamer-0_10-devel, not
+ the deprecated gstreamer010-devel.
* Mon Mar 31 2008 vuntz@suse.de
- Update to version 0.1.26
- Remove farsight-gcc42.patch (fixed upstream)
++++++ farsight-0.1.26.tar.bz2 -> farsight-0.1.28.tar.bz2 ++++++
++++ 1944 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/farsight-0.1.26/ChangeLog new/farsight-0.1.28/ChangeLog
--- old/farsight-0.1.26/ChangeLog 2008-03-24 22:47:59.000000000 +0100
+++ new/farsight-0.1.28/ChangeLog 2008-05-09 21:59:34.000000000 +0200
@@ -1,3 +1,69 @@
+Fri May 9 15:31:32 EDT 2008 Youness Alaoui
+ tagged farsight 0.1.28
+
+Fri May 9 15:30:44 EDT 2008 Youness Alaoui
+ * Version 0.1.28
+
+Tue May 6 15:30:53 EDT 2008 Youness Alaoui
+ * Should fix calling send_build_pipeline (through set_remote_codecs) after a hold
+
+Mon Nov 19 17:07:48 EST 2007 Youness Alaoui
+ * Fix little stupid code...
+
+Sun Apr 20 18:38:45 EDT 2008 Sjoerd Simons
+ * Add a capsfilter of the end of a sending codec bin to enforse the output has the right parameters
+
+Wed Apr 23 13:19:15 EDT 2008 Olivier Crete
+ * Add async-handling bin around gst-sink to prevent async-loop bug
+
+Fri Apr 11 20:06:46 EDT 2008 Olivier Crete
+ * Reset release flag
+
+Fri Apr 11 19:51:17 EDT 2008 Olivier Crete
+ tagged farsight 0.1.27
+
+Fri Apr 11 19:51:06 EDT 2008 Olivier Crete
+ * Version 0.1.27
+
+Fri Apr 4 15:32:05 EDT 2008 Youness Alaoui
+ * Revert hold change if it fails... avoid inconsistent state..
+
+Fri Apr 4 14:51:50 EDT 2008 Olivier Crete
+ * Type for dtmf events is always 1 (or is for tones specified in hz, etc)
+
+Wed Feb 13 13:52:54 EST 2008 Youness Alaoui
+ * Fix CN reception
+
+Tue Jan 15 16:23:11 EST 2008 Youness Alaoui
+ * Fix CN sink changes
+
+Thu Jan 10 17:18:00 EST 2008 Youness Alaoui
+ * Add CN support by linking the rtpdemux pad to the codec bin's cnsink pad if the codec bin exists
+
+Thu Jan 10 17:17:41 EST 2008 Youness Alaoui
+ * Remove hack that removed CN packets
+
+Thu Jan 10 17:16:48 EST 2008 Youness Alaoui
+ * Add ghost pad on codec bin for cnsink if exists
+
+Wed Apr 2 19:23:17 EDT 2008 Youness Alaoui
+ * one little extra debug...
+
+Wed Apr 2 19:22:54 EDT 2008 Youness Alaoui
+ * Special code for having the video hold/unhold with stream-engine...
+
+Wed Apr 2 19:21:30 EDT 2008 Youness Alaoui
+ * Fix problem with source not restarting correctly after a unhold.. it doesn't get the base time at the right moment and ends up sending one bor two buffers then waits forever
+
+Wed Apr 2 15:11:45 EDT 2008 Youness Alaoui
+ * Don't remove the weak ref if it's not there (for non dsp systems)
+
+Mon Mar 31 13:14:43 EDT 2008 Youness Alaoui
+ * tmpl/dummy.sgml moved to the right directory.
+
+Mon Mar 31 12:36:35 EDT 2008 Olivier Crete
+ * Reset release flag
+
Mon Mar 24 17:47:29 EDT 2008 Olivier Crete
tagged farsight 0.1.26
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/farsight-0.1.26/configure.ac new/farsight-0.1.28/configure.ac
--- old/farsight-0.1.26/configure.ac 2008-03-24 22:47:18.000000000 +0100
+++ new/farsight-0.1.28/configure.ac 2008-05-09 21:59:14.000000000 +0200
@@ -15,7 +15,7 @@
# If any interfaces have been removed since the last public release, then set age to 0.
m4_define([farsight_major_version], [0])
m4_define([farsight_minor_version], [1])
-m4_define([farsight_micro_version], [26])
+m4_define([farsight_micro_version], [28])
m4_define([farsight_current], [3])
m4_define([farsight_revision], [0])
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/farsight-0.1.26/farsight/helpers/farsight-interfaces.c new/farsight-0.1.28/farsight/helpers/farsight-interfaces.c
--- old/farsight-0.1.26/farsight/helpers/farsight-interfaces.c 2008-03-03 20:35:16.000000000 +0100
+++ new/farsight-0.1.28/farsight/helpers/farsight-interfaces.c 2008-05-09 21:59:14.000000000 +0200
@@ -33,7 +33,6 @@
#include
#include
#include
-#include
#include
#include
#ifdef HAVE_GETIFADDRS
@@ -57,10 +56,7 @@
struct ifaddrs *ifa, *results;
if (getifaddrs(&results) < 0) {
- if (errno == ENOMEM)
- return NULL;
- else
- return NULL;
+ return NULL;
}
/* Loop and get each interface the system has, one by one... */
@@ -164,10 +160,7 @@
if (getifaddrs(&results) < 0) {
- if (errno == ENOMEM)
- return NULL;
- else
- return NULL;
+ return NULL;
}
/* Loop through the interface list and get the IP address of each IF */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/farsight-0.1.26/plugins/rtp/rtpgstcodecs.c new/farsight-0.1.28/plugins/rtp/rtpgstcodecs.c
--- old/farsight-0.1.26/plugins/rtp/rtpgstcodecs.c 2008-02-18 20:29:52.000000000 +0100
+++ new/farsight-0.1.28/plugins/rtp/rtpgstcodecs.c 2008-05-09 21:59:14.000000000 +0200
@@ -837,7 +837,8 @@
*/
static const gchar *
-element_factory_get_cn_pad_name_template (GstElementFactory *factory)
+element_factory_get_cn_pad_name_template (GstElementFactory *factory,
+ GstPadDirection pad_direction)
{
const GList *static_pad_templates;
const GList *le;
@@ -863,7 +864,7 @@
le = g_list_next (le)) {
staticpadt = le->data;
- if (staticpadt->direction == GST_PAD_SRC &&
+ if (staticpadt->direction == pad_direction &&
( staticpadt->presence == GST_PAD_ALWAYS ||
staticpadt->presence == GST_PAD_REQUEST)) {
@@ -900,7 +901,8 @@
return FALSE;
if (element_factory_get_cn_pad_name_template (
- GST_ELEMENT_FACTORY (ca->codec_blueprint->send_pipeline_factory->data)))
+ GST_ELEMENT_FACTORY (ca->codec_blueprint->send_pipeline_factory->data),
+ GST_PAD_SRC))
return TRUE;
else
return FALSE;
@@ -1590,7 +1592,7 @@
/* only match clock_rate if it is different than 0 */
if ((g_ascii_strcasecmp (codec->encoding_name,
cur_codec_pref->encoding_name) == 0) &&
- (codec->clock_rate == 0 ||
+ (codec->clock_rate == 0 ||
codec->clock_rate == cur_codec_pref->clock_rate))
{
/* HACK ALERT this hack is to compensate for the fact that GTalk jingle
@@ -1624,11 +1626,9 @@
return;
}
/*
- * HACK ALERT: Massive hack because we can't receive CN or DTMF yet
+ * HACK ALERT: Massive hack because we can't receive DTMF yet
*/
- if (ca->codec->id == 13 ||
- !g_ascii_strcasecmp (ca->codec->encoding_name, "CN") ||
- !g_ascii_strcasecmp (ca->codec->encoding_name, "telephone-event"))
+ if (!g_ascii_strcasecmp (ca->codec->encoding_name, "telephone-event"))
return;
caps = farsight_codec_to_gst_caps (ca->codec);
@@ -2517,6 +2517,8 @@
}
else if (is_decoder (walk->data))
{
+ const gchar *cnpadname;
+
/* let's create our bin src ghostpad and link it to the decoder */
if (!create_ghost_pad (current_element, "src", codec_bin)) {
g_warning ("Could not create decoder src ghost pad on the codec_bin"
@@ -2524,12 +2526,75 @@
gst_object_unref (codec_bin);
return NULL;
}
+
+
+ cnpadname = element_factory_get_cn_pad_name_template (walk->data, GST_PAD_SINK);
+
+ if (cnpadname) {
+ FarsightCodec *cncodec;
+ cncodec = find_codec_for_type (remote_codecs,
+ codec_association->codec->media_type, "CN",
+ codec_association->codec_blueprint->codec->clock_rate);
+
+ if (cncodec) {
+ GstPad *cnsink;
+ gchar *realname;
+
+ DEBUG ("Found audio/CN with pt %d", cncodec->id);
+
+ realname = g_strdup_printf (cnpadname, 0);
+ cnsink = gst_element_get_request_pad (current_element, realname);
+
+ if (cnsink) {
+ GstElement *cndepayloader;
+
+ cndepayloader = gst_element_factory_make ("rtpcndepay", NULL);
+
+ if (cndepayloader) {
+
+ if (!gst_bin_add (GST_BIN (codec_bin), cndepayloader)) {
+ g_warning ("Could not add the CN depayloader to the codec bin"
+ " for payload type %d", codec_id);
+ gst_object_unref (cndepayloader);
+ g_free (realname);
+ continue;
+ }
+
+ if (gst_element_link_pads (cndepayloader, "src",
+ current_element, realname)) {
+ GstPad *ghostpad;
+ GstPad *pad = gst_element_get_static_pad (cndepayloader, "sink");
+ if (pad) {
+ DEBUG ("Added CN sink %d to pipeline", cncodec->id);
+ ghostpad = gst_ghost_pad_new ("cnsink", pad);
+ if (!gst_pad_set_active (ghostpad, TRUE)) {
+ g_warning ("Could not activate the cnsink ghostpad");
+ }
+ if (!gst_element_add_pad (codec_bin, ghostpad)) {
+ g_warning ("Could not add the cnsink ghostpad"
+ " to the codec bin");
+ gst_object_unref (GST_OBJECT (pad));
+ goto cnsink_error;
+ }
+ gst_object_unref (GST_OBJECT (pad));
+ }
+ } else {
+ cnsink_error:
+ g_warning ("Could not link the CN depayloader to the decoder");
+ gst_bin_remove (GST_BIN (codec_bin), cndepayloader);
+ }
+ }
+ }
+ g_free (realname);
+ }
+ }
}
}
else if (dir == DIR_SEND)
{
if (is_payloader (walk->data))
{
+ GstElement *filter;
g_object_set (current_element, "pt", codec_association->codec->id,
NULL);
/* TODO find a better way to set the MTU, RTCP perhaps? */
@@ -2537,8 +2602,14 @@
/* FIXME please don't hardcode me */
g_object_set (current_element, "max_ptime", 20 * GST_MSECOND, NULL);
- /* let's create our bin src ghostpad and link it to the payloader */
- if (!create_ghost_pad (current_element, "src", codec_bin)) {
+ filter = gst_element_factory_make("capsfilter", NULL);
+ g_object_set (filter, "caps",
+ farsight_codec_to_gst_caps (codec_association->codec), NULL);
+ gst_bin_add (GST_BIN(codec_bin), filter);
+ gst_element_link (current_element, filter);
+
+ /* let's create our bin src ghostpad and link it to the filter */
+ if (!create_ghost_pad (filter, "src", codec_bin)) {
g_warning ("Could not create payloader src ghost pad on the codec_bin"
" for payload type %d", codec_id);
gst_object_unref (codec_bin);
@@ -2557,7 +2628,7 @@
return NULL;
}
- cnpadname = element_factory_get_cn_pad_name_template (walk->data);
+ cnpadname = element_factory_get_cn_pad_name_template (walk->data, GST_PAD_SRC);
if (cnpadname) {
FarsightCodec *cncodec;
@@ -2573,7 +2644,6 @@
realname = g_strdup_printf (cnpadname, 0);
cnsrc = gst_element_get_request_pad (current_element, realname);
- g_free (realname);
if (cnsrc) {
GstElement *cnpayloader;
@@ -2588,6 +2658,7 @@
g_warning ("Could not add the CN payloader to the codec bin"
" for payload type %d", codec_id);
gst_object_unref (cnpayloader);
+ g_free (realname);
continue;
}
@@ -2605,19 +2676,20 @@
g_warning ("Could not add the cnsrc ghostpad"
" to the codec bin");
gst_object_unref (GST_OBJECT (pad));
- goto cn_error;
+ goto cnsrc_error;
}
gst_object_unref (GST_OBJECT (pad));
}
} else {
- cn_error:
+ cnsrc_error:
g_warning ("Could not link the CN payloader to the encoder");
gst_bin_remove (GST_BIN (codec_bin), cnpayloader);
}
}
}
+ g_free (realname);
}
- }
+ }
}
}
@@ -3106,7 +3178,7 @@
/*
* BIG hack, we have to manually add CN
- * because we can send it, but not receive it yet
+ * because we can send it
* Do the same for DTMF for the same reason
* This is because there is no blueprint for them
*/
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/farsight-0.1.26/plugins/rtp/rtpstream.c new/farsight-0.1.28/plugins/rtp/rtpstream.c
--- old/farsight-0.1.26/plugins/rtp/rtpstream.c 2008-03-24 22:47:06.000000000 +0100
+++ new/farsight-0.1.28/plugins/rtp/rtpstream.c 2008-05-09 21:59:14.000000000 +0200
@@ -1179,7 +1179,7 @@
codec_bin = create_codec_bin (self->priv->negotiated_codec_associations,
- id, DIR_RECV, NULL);
+ id, DIR_RECV, self->priv->remote_codecs);
if (!codec_bin)
{
STREAM_WARNING (self, "Couldn't create elements to receive codec %d,"
@@ -1217,6 +1217,7 @@
GstElement *codec_bin = NULL;
CodecAssociation *codec_association = NULL;
GstPad *codec_bin_src_pad = NULL;
+ GstPad *codec_bin_cnsink_pad = NULL;
GstStateChangeReturn state_ret;
codec_association = lookup_codec_by_pt (
@@ -1234,6 +1235,31 @@
return FALSE;
}
+
+ if (g_strcasecmp (codec_association->codec->encoding_name, "CN") == 0) {
+ STREAM_DEBUG (self, "Received CN packet on new-pt");
+ if (self->priv->recv_codec_bin != NULL) {
+ codec_bin_cnsink_pad = gst_element_get_static_pad (self->priv->recv_codec_bin, "cnsink");
+
+ if (codec_bin_cnsink_pad && !gst_pad_is_linked (codec_bin_cnsink_pad)) {
+ GstPadLinkReturn padlink_ret;
+
+ STREAM_DEBUG (self, "Linking CN sink pad of codec bin to rtpdemux");
+ padlink_ret = gst_pad_link (pad, codec_bin_cnsink_pad);
+
+ if (GST_PAD_LINK_FAILED(padlink_ret)) {
+ STREAM_WARNING (self, "could not link the rtpdemuxer to the "
+ " codec bin CN pad");
+ }
+ } else {
+ STREAM_DEBUG (self, "The codec_bin_cnsink_pad is already linked?");
+ }
+ } else {
+ STREAM_DEBUG(self, "Can't link CN pad because no non-CN packet was received yet.");
+ }
+ return TRUE;
+ }
+
codec_bin = farsight_rtp_stream_get_or_create_recv_codec_bin (stream, id);
if (codec_bin == NULL) {
@@ -1368,6 +1394,8 @@
gst_object_unref (codec_bin_src_pad);
}
+
+
/* If there was a previously linked codec bin, unlink it from the sink */
if (self->priv->recv_codec_bin) {
farsight_rtp_stream_right_unlink_recv_codec_bin (self, self->priv->recv_codec_bin);
@@ -1491,6 +1519,7 @@
STREAM_DEBUG (self, "Setting the sink state to NULL");
state_ret = gst_element_set_state (self->priv->sink, GST_STATE_NULL);
if (state_ret == GST_STATE_CHANGE_FAILURE) {
+ self->priv->on_hold = FALSE;
return FALSE;
} else if (state_ret == GST_STATE_CHANGE_ASYNC) {
STREAM_DEBUG (self, "Waiting");
@@ -1499,6 +1528,7 @@
}
if (state_ret == GST_STATE_CHANGE_FAILURE) {
+ self->priv->on_hold = FALSE;
return FALSE;
}
}
@@ -1507,7 +1537,7 @@
/* set state GST_STATE_NULL on the source to free resources
and avoid a not-linked error */
STREAM_DEBUG (self, "Setting the src state to NULL");
- if (self->priv->src) {
+ if (self->priv->src && self->priv->main_pipeline == NULL) {
/* We need to lock state of the source in case an rtcp is received
at the same time, which will make the whole pipeline go into PLAYING
and will revert our state change, causing a not-linked error */
@@ -1516,6 +1546,7 @@
state_ret = gst_element_set_state (self->priv->src, GST_STATE_NULL);
if (state_ret == GST_STATE_CHANGE_FAILURE) {
+ self->priv->on_hold = FALSE;
return FALSE;
} else if (state_ret == GST_STATE_CHANGE_ASYNC) {
STREAM_DEBUG (self, "Waiting");
@@ -1524,8 +1555,11 @@
}
if (state_ret == GST_STATE_CHANGE_FAILURE) {
+ self->priv->on_hold = FALSE;
return FALSE;
}
+ } else if (self->priv->src && self->priv->main_pipeline) {
+ gst_element_unlink (self->priv->src, self->priv->pipeline);
}
/* Destroy the send codec bin if it exists */
@@ -1534,6 +1568,7 @@
/* No need to pad block since we know that the source is
now in state NULL*/
if (farsight_rtp_stream_clean_send_codec_bin (self, &old_state) == FALSE) {
+ self->priv->on_hold = FALSE;
return FALSE;
}
}
@@ -1545,6 +1580,7 @@
if (transmitter_sink) {
state_ret = gst_element_set_state (transmitter_sink, GST_STATE_READY);
if (state_ret == GST_STATE_CHANGE_FAILURE) {
+ self->priv->on_hold = FALSE;
return FALSE;
} else if (state_ret == GST_STATE_CHANGE_ASYNC) {
STREAM_DEBUG (self, "Waiting");
@@ -1554,6 +1590,7 @@
if (state_ret == GST_STATE_CHANGE_FAILURE) {
+ self->priv->on_hold = FALSE;
return FALSE;
}
}
@@ -1597,6 +1634,7 @@
/* reset state on the sink transmitter */
+ STREAM_DEBUG (self, "Setting state PLAYING on the transmitter sink");
transmitter_sink = farsight_transmitter_get_gst_sink (self->priv->transmitter);
if (transmitter_sink) {
state_ret = gst_element_set_state (transmitter_sink, GST_STATE_PLAYING);
@@ -1616,7 +1654,13 @@
return FALSE;
}
- if (self->priv->src) {
+ if (self->priv->src && self->priv->main_pipeline == NULL) {
+ GstClockTime base_time;
+
+ STREAM_DEBUG (self, "Setting the pipeline base_time on the source");
+ base_time = gst_element_get_base_time (self->priv->pipeline);
+ gst_element_set_base_time (self->priv->src, base_time);
+
/* set source state to GST_STATE_PLAYING */
STREAM_DEBUG (self, "Setting the source state to PLAYING");
state_ret = gst_element_set_state (self->priv->src, GST_STATE_PLAYING);
@@ -1624,8 +1668,11 @@
STREAM_WARNING (self, "Error changing the source state to PLAYING");
return FALSE;
}
+
/* Unlock state of the src */
gst_element_set_locked_state (self->priv->src, FALSE);
+ } else if (self->priv->src && self->priv->main_pipeline) {
+ gst_element_link (self->priv->src, self->priv->pipeline);
}
/* unblock the reception pipeline and unhold the call*/
@@ -3426,6 +3473,8 @@
GstElement *src_parent = NULL;
gboolean src_in_pipeline = FALSE;
GstStateChangeReturn state_ret;
+ GstElement *transmitter_async_handling_bin;
+ GstPad *pad;
g_return_val_if_fail (self != NULL, FALSE);
/* let's create the base pipeline if not already done so (prepare_transports
@@ -3438,7 +3487,7 @@
g_return_val_if_fail (self->priv->rtpbin != NULL, FALSE);
g_return_val_if_fail (self->priv->pipeline != NULL, FALSE);
- if (self->priv->send_codec_bin)
+ if (self->priv->send_codec_bin || self->priv->on_hold)
{
STREAM_WARNING (self, "Send pipeline already created, will not recreate");
return TRUE;
@@ -3573,13 +3622,47 @@
/* create transmitter specific sink element */
transmitter_sink = farsight_transmitter_get_gst_sink
- (self->priv->transmitter);
+ (self->priv->transmitter);
+
+ transmitter_async_handling_bin = gst_bin_new ("transmitter-sink-bin");
+
+ g_object_set (transmitter_async_handling_bin, "async-handling", TRUE, NULL);
+
+ pad = gst_element_get_static_pad (transmitter_sink, "sink");
+
+ if (!pad)
+ {
+ g_warning ("Could not find sink pad in sink");
+ goto error;
+ }
- if (!gst_bin_add (GST_BIN (self->priv->pipeline), transmitter_sink)) {
+
+ if (!gst_bin_add (GST_BIN (transmitter_async_handling_bin),
+ transmitter_sink)) {
+ STREAM_WARNING (self, "Could not add transmitter sink to its"
+ " async-handling bin");
+ goto error;
+ }
+
+
+ if (!gst_element_add_pad (transmitter_async_handling_bin,
+ gst_ghost_pad_new ("sink", pad)))
+ {
+ STREAM_WARNING (self, "Could not add pad to bin");
+ goto error;
+ }
+
+ gst_object_unref (pad);
+
+
+ if (!gst_bin_add (GST_BIN (self->priv->pipeline),
+ transmitter_async_handling_bin))
+ {
STREAM_WARNING (self, "Could not add transmitter sink to pipeline");
goto error;
}
+ transmitter_sink = transmitter_async_handling_bin;
if (!gst_element_link_pads (self->priv->rtpbin, "rtpsrc",
transmitter_sink, "sink"))
@@ -4545,6 +4628,7 @@
structure = gst_structure_new ("dtmf-event",
"number", G_TYPE_INT, ev,
"volume", G_TYPE_INT, volume,
+ "type", G_TYPE_INT, 1,
"start", G_TYPE_BOOLEAN, TRUE, NULL);
if (method == FARSIGHT_DTMF_METHOD_AUTO) {
@@ -4561,18 +4645,16 @@
}
gst_structure_set (structure, "method", G_TYPE_INT, chosen_method, NULL);
-
+
switch (chosen_method) {
case FARSIGHT_DTMF_METHOD_AUTO:
method_str = "default";
break;
case FARSIGHT_DTMF_METHOD_SOUND:
method_str="sound";
- gst_structure_set (structure, "type", G_TYPE_INT, 0, NULL);
break;
case FARSIGHT_DTMF_METHOD_RTP_RFC4733:
method_str="RFC4733";
- gst_structure_set (structure, "type", G_TYPE_INT, 1, NULL);
break;
default:
method_str="other";
@@ -4596,43 +4678,24 @@
g_return_val_if_fail (rtpself->priv->pipeline != NULL, FALSE);
structure = gst_structure_new ("dtmf-event",
- "start", G_TYPE_BOOLEAN, FALSE, NULL);
+ "start", G_TYPE_BOOLEAN, FALSE,
+ "type", G_TYPE_INT, 1, NULL);
if (method == FARSIGHT_DTMF_METHOD_AUTO) {
GstElement *dtmfsrc = gst_bin_get_by_name (GST_BIN (rtpself->priv->pipeline),
"rtpdtmfsrc");
if (dtmfsrc) {
gst_structure_set (structure,
- "method", G_TYPE_INT, FARSIGHT_DTMF_METHOD_RTP_RFC4733,
- "type", G_TYPE_INT, 1, NULL);
+ "method", G_TYPE_INT, FARSIGHT_DTMF_METHOD_RTP_RFC4733, NULL);
gst_object_unref (dtmfsrc);
} else {
gst_structure_set (structure,
- "method", G_TYPE_INT, FARSIGHT_DTMF_METHOD_SOUND,
- "type", G_TYPE_INT, 0, NULL);
+ "method", G_TYPE_INT, FARSIGHT_DTMF_METHOD_SOUND, NULL);
}
} else {
gst_structure_set (structure, "method", G_TYPE_INT, method, NULL);
}
-
- switch (method) {
- case FARSIGHT_DTMF_METHOD_AUTO:
- break;
- case FARSIGHT_DTMF_METHOD_SOUND:
- gst_structure_set (structure,
- "method", G_TYPE_INT, FARSIGHT_DTMF_METHOD_SOUND,
- "type", G_TYPE_INT, 0, NULL);
- break;
- case FARSIGHT_DTMF_METHOD_RTP_RFC4733:
- gst_structure_set (structure,
- "method", G_TYPE_INT, FARSIGHT_DTMF_METHOD_RTP_RFC4733,
- "type", G_TYPE_INT, 1, NULL);
- break;
- default:
- break;
- }
-
event = gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM, structure);
return gst_element_send_event (rtpself->priv->pipeline, event);
@@ -5036,9 +5099,11 @@
/* The codec bin is unusable now so it shouldn't hold any 'unique' slot */
codec_association = lookup_codec_by_pt (self->priv->negotiated_codec_associations,
self->priv->recv_codec_id);
- g_object_remove_weak_pointer (G_OBJECT (codec_bin),
- (gpointer) &codec_association->codec_blueprint->receive_unique_bin);
- codec_association->codec_blueprint->receive_unique_bin = NULL;
+ if (codec_association->codec_blueprint->receive_unique_bin == codec_bin) {
+ g_object_remove_weak_pointer (G_OBJECT (codec_bin),
+ (gpointer) &codec_association->codec_blueprint->receive_unique_bin);
+ codec_association->codec_blueprint->receive_unique_bin = NULL;
+ }
if (ret == TRUE) {
@@ -5195,9 +5260,11 @@
/* The codec bin is unusable now so it shouldn't hold any 'unique' slot */
codec_association = lookup_codec_by_pt (self->priv->negotiated_codec_associations,
self->priv->send_codec_id);
- g_object_remove_weak_pointer (G_OBJECT (codec_bin),
- (gpointer) &codec_association->codec_blueprint->send_unique_bin);
- codec_association->codec_blueprint->send_unique_bin = NULL;
+ if (codec_association->codec_blueprint->send_unique_bin == codec_bin) {
+ g_object_remove_weak_pointer (G_OBJECT (codec_bin),
+ (gpointer) &codec_association->codec_blueprint->send_unique_bin);
+ codec_association->codec_blueprint->send_unique_bin = NULL;
+ }
gst_object_unref (GST_OBJECT (codec_bin));
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org