summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2008-04-25 11:32:09 +0000
committerWim Taymans <wim.taymans@gmail.com>2008-04-25 11:32:09 +0000
commit1e9fd08525958c6831498c37c51fd453459e186f (patch)
treed553bdd0bcab27b8d68cbf4e8c6cdeb2e92ca066
parentcc6371727cdfd2241428adf61a58059db772b046 (diff)
downloadgst-plugins-bad-1e9fd08525958c6831498c37c51fd453459e186f.tar.gz
gst-plugins-bad-1e9fd08525958c6831498c37c51fd453459e186f.tar.bz2
gst-plugins-bad-1e9fd08525958c6831498c37c51fd453459e186f.zip
gst/rtpmanager/gstrtpbin.*: Expose new jitterbuffer property in rtpbin too.
Original commit message from CVS: * gst/rtpmanager/gstrtpbin.c: (create_stream), (gst_rtp_bin_init), (gst_rtp_bin_set_property), (gst_rtp_bin_get_property): * gst/rtpmanager/gstrtpbin.h: Expose new jitterbuffer property in rtpbin too.
-rw-r--r--ChangeLog7
-rw-r--r--gst/rtpmanager/gstrtpbin.c19
-rw-r--r--gst/rtpmanager/gstrtpbin.h1
3 files changed, 25 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 439e3f42..200da44c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2008-04-25 Wim Taymans <wim.taymans@collabora.co.uk>
+ * gst/rtpmanager/gstrtpbin.c: (create_stream), (gst_rtp_bin_init),
+ (gst_rtp_bin_set_property), (gst_rtp_bin_get_property):
+ * gst/rtpmanager/gstrtpbin.h:
+ Expose new jitterbuffer property in rtpbin too.
+
+2008-04-25 Wim Taymans <wim.taymans@collabora.co.uk>
+
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_class_init), (gst_rtp_jitter_buffer_init),
(gst_rtp_jitter_buffer_loop), (gst_rtp_jitter_buffer_set_property),
diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c
index 8cfd63c4..6e1b7bb9 100644
--- a/gst/rtpmanager/gstrtpbin.c
+++ b/gst/rtpmanager/gstrtpbin.c
@@ -228,7 +228,7 @@ enum
LAST_SIGNAL
};
-#define DEFAULT_LATENCY_MS 200
+#define DEFAULT_LATENCY_MS 200
#define DEFAULT_SDES_CNAME NULL
#define DEFAULT_SDES_NAME NULL
#define DEFAULT_SDES_EMAIL NULL
@@ -236,6 +236,7 @@ enum
#define DEFAULT_SDES_LOCATION NULL
#define DEFAULT_SDES_TOOL NULL
#define DEFAULT_SDES_NOTE NULL
+#define DEFAULT_DO_LOST FALSE
enum
{
@@ -248,6 +249,7 @@ enum
PROP_SDES_LOCATION,
PROP_SDES_TOOL,
PROP_SDES_NOTE,
+ PROP_DO_LOST,
PROP_LAST
};
@@ -1018,8 +1020,9 @@ create_stream (GstRtpBinSession * session, guint32 ssrc)
g_signal_connect (buffer, "request-pt-map",
(GCallback) pt_map_requested, session);
- /* configure latency */
+ /* configure latency and packet lost */
g_object_set (buffer, "latency", session->bin->latency, NULL);
+ g_object_set (buffer, "do-lost", session->bin->do_lost, NULL);
gst_bin_add (GST_BIN_CAST (session->bin), buffer);
gst_element_set_state (buffer, GST_STATE_PLAYING);
@@ -1321,7 +1324,9 @@ gst_rtp_bin_init (GstRtpBin * rtpbin, GstRtpBinClass * klass)
rtpbin->priv = GST_RTP_BIN_GET_PRIVATE (rtpbin);
rtpbin->priv->bin_lock = g_mutex_new ();
rtpbin->provided_clock = gst_system_clock_obtain ();
+
rtpbin->latency = DEFAULT_LATENCY_MS;
+ rtpbin->do_lost = DEFAULT_DO_LOST;
/* some default SDES entries */
str = g_strdup_printf ("%s@%s", g_get_user_name (), g_get_host_name ());
@@ -1480,6 +1485,11 @@ gst_rtp_bin_set_property (GObject * object, guint prop_id,
gst_rtp_bin_set_sdes_string (rtpbin, GST_RTCP_SDES_NOTE,
g_value_get_string (value));
break;
+ case PROP_DO_LOST:
+ GST_RTP_BIN_LOCK (rtpbin);
+ rtpbin->do_lost = g_value_get_boolean (value);
+ GST_RTP_BIN_UNLOCK (rtpbin);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -1528,6 +1538,11 @@ gst_rtp_bin_get_property (GObject * object, guint prop_id,
g_value_take_string (value, gst_rtp_bin_get_sdes_string (rtpbin,
GST_RTCP_SDES_NOTE));
break;
+ case PROP_DO_LOST:
+ GST_RTP_BIN_LOCK (rtpbin);
+ g_value_set_boolean (value, rtpbin->do_lost);
+ GST_RTP_BIN_UNLOCK (rtpbin);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
diff --git a/gst/rtpmanager/gstrtpbin.h b/gst/rtpmanager/gstrtpbin.h
index 71834e68..898b6dbb 100644
--- a/gst/rtpmanager/gstrtpbin.h
+++ b/gst/rtpmanager/gstrtpbin.h
@@ -43,6 +43,7 @@ struct _GstRtpBin {
/*< private >*/
/* default latency for sessions */
guint latency;
+ gboolean do_lost;
/* a list of session */
GSList *sessions;
/* clock we provide */