mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 11:32:38 +00:00
rtpbin: add SDES property
Remove all individual SDES properties and use one sdes property that takes a GstStructure instead. This will allow us to add more custom stuff to the SDES messages later.
This commit is contained in:
parent
ed6002ada8
commit
f9cc6b7b1c
3 changed files with 39 additions and 271 deletions
|
@ -238,26 +238,14 @@ enum
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DEFAULT_LATENCY_MS 200
|
#define DEFAULT_LATENCY_MS 200
|
||||||
#define DEFAULT_SDES_CNAME NULL
|
#define DEFAULT_SDES NULL
|
||||||
#define DEFAULT_SDES_NAME NULL
|
|
||||||
#define DEFAULT_SDES_EMAIL NULL
|
|
||||||
#define DEFAULT_SDES_PHONE NULL
|
|
||||||
#define DEFAULT_SDES_LOCATION NULL
|
|
||||||
#define DEFAULT_SDES_TOOL NULL
|
|
||||||
#define DEFAULT_SDES_NOTE NULL
|
|
||||||
#define DEFAULT_DO_LOST FALSE
|
#define DEFAULT_DO_LOST FALSE
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
PROP_0,
|
PROP_0,
|
||||||
PROP_LATENCY,
|
PROP_LATENCY,
|
||||||
PROP_SDES_CNAME,
|
PROP_SDES,
|
||||||
PROP_SDES_NAME,
|
|
||||||
PROP_SDES_EMAIL,
|
|
||||||
PROP_SDES_PHONE,
|
|
||||||
PROP_SDES_LOCATION,
|
|
||||||
PROP_SDES_TOOL,
|
|
||||||
PROP_SDES_NOTE,
|
|
||||||
PROP_DO_LOST,
|
PROP_DO_LOST,
|
||||||
PROP_LAST
|
PROP_LAST
|
||||||
};
|
};
|
||||||
|
@ -271,10 +259,6 @@ static guint gst_rtp_bin_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
static GstCaps *pt_map_requested (GstElement * element, guint pt,
|
static GstCaps *pt_map_requested (GstElement * element, guint pt,
|
||||||
GstRtpBinSession * session);
|
GstRtpBinSession * session);
|
||||||
static const gchar *sdes_type_to_name (GstRTCPSDESType type);
|
|
||||||
static void gst_rtp_bin_set_sdes_string (GstRtpBin * bin,
|
|
||||||
GstRTCPSDESType type, const gchar * data);
|
|
||||||
|
|
||||||
static void free_stream (GstRtpBinStream * stream);
|
static void free_stream (GstRtpBinStream * stream);
|
||||||
|
|
||||||
/* Manages the RTP stream for one SSRC.
|
/* Manages the RTP stream for one SSRC.
|
||||||
|
@ -515,7 +499,6 @@ create_session (GstRtpBin * rtpbin, gint id)
|
||||||
{
|
{
|
||||||
GstRtpBinSession *sess;
|
GstRtpBinSession *sess;
|
||||||
GstElement *session, *demux;
|
GstElement *session, *demux;
|
||||||
gint i;
|
|
||||||
GstState target;
|
GstState target;
|
||||||
|
|
||||||
if (!(session = gst_element_factory_make ("gstrtpsession", NULL)))
|
if (!(session = gst_element_factory_make ("gstrtpsession", NULL)))
|
||||||
|
@ -538,9 +521,7 @@ create_session (GstRtpBin * rtpbin, gint id)
|
||||||
g_object_set (session, "ntp-ns-base", rtpbin->priv->ntp_ns_base, NULL);
|
g_object_set (session, "ntp-ns-base", rtpbin->priv->ntp_ns_base, NULL);
|
||||||
/* configure SDES items */
|
/* configure SDES items */
|
||||||
GST_OBJECT_LOCK (rtpbin);
|
GST_OBJECT_LOCK (rtpbin);
|
||||||
for (i = GST_RTCP_SDES_CNAME; i < GST_RTCP_SDES_PRIV; i++) {
|
g_object_set (session, "sdes", rtpbin->sdes, NULL);
|
||||||
g_object_set (session, sdes_type_to_name (i), rtpbin->sdes[i], NULL);
|
|
||||||
}
|
|
||||||
GST_OBJECT_UNLOCK (rtpbin);
|
GST_OBJECT_UNLOCK (rtpbin);
|
||||||
|
|
||||||
/* provide clock_rate to the session manager when needed */
|
/* provide clock_rate to the session manager when needed */
|
||||||
|
@ -1448,40 +1429,10 @@ gst_rtp_bin_class_init (GstRtpBinClass * klass)
|
||||||
NULL, NULL, gst_rtp_bin_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2,
|
NULL, NULL, gst_rtp_bin_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2,
|
||||||
G_TYPE_UINT, G_TYPE_UINT);
|
G_TYPE_UINT, G_TYPE_UINT);
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_SDES_CNAME,
|
g_object_class_install_property (gobject_class, PROP_SDES,
|
||||||
g_param_spec_string ("sdes-cname", "SDES CNAME",
|
g_param_spec_boxed ("sdes", "SDES",
|
||||||
"The CNAME to put in SDES messages of this session",
|
"The SDES items of this session",
|
||||||
DEFAULT_SDES_CNAME, G_PARAM_READWRITE));
|
GST_TYPE_STRUCTURE, G_PARAM_READWRITE));
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_SDES_NAME,
|
|
||||||
g_param_spec_string ("sdes-name", "SDES NAME",
|
|
||||||
"The NAME to put in SDES messages of this session",
|
|
||||||
DEFAULT_SDES_NAME, G_PARAM_READWRITE));
|
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_SDES_EMAIL,
|
|
||||||
g_param_spec_string ("sdes-email", "SDES EMAIL",
|
|
||||||
"The EMAIL to put in SDES messages of this session",
|
|
||||||
DEFAULT_SDES_EMAIL, G_PARAM_READWRITE));
|
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_SDES_PHONE,
|
|
||||||
g_param_spec_string ("sdes-phone", "SDES PHONE",
|
|
||||||
"The PHONE to put in SDES messages of this session",
|
|
||||||
DEFAULT_SDES_PHONE, G_PARAM_READWRITE));
|
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_SDES_LOCATION,
|
|
||||||
g_param_spec_string ("sdes-location", "SDES LOCATION",
|
|
||||||
"The LOCATION to put in SDES messages of this session",
|
|
||||||
DEFAULT_SDES_LOCATION, G_PARAM_READWRITE));
|
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_SDES_TOOL,
|
|
||||||
g_param_spec_string ("sdes-tool", "SDES TOOL",
|
|
||||||
"The TOOL to put in SDES messages of this session",
|
|
||||||
DEFAULT_SDES_TOOL, G_PARAM_READWRITE));
|
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_SDES_NOTE,
|
|
||||||
g_param_spec_string ("sdes-note", "SDES NOTE",
|
|
||||||
"The NOTE to put in SDES messages of this session",
|
|
||||||
DEFAULT_SDES_NOTE, G_PARAM_READWRITE));
|
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_DO_LOST,
|
g_object_class_install_property (gobject_class, PROP_DO_LOST,
|
||||||
g_param_spec_boolean ("do-lost", "Do Lost",
|
g_param_spec_boolean ("do-lost", "Do Lost",
|
||||||
|
@ -1517,11 +1468,11 @@ gst_rtp_bin_init (GstRtpBin * rtpbin, GstRtpBinClass * klass)
|
||||||
|
|
||||||
/* some default SDES entries */
|
/* some default SDES entries */
|
||||||
str = g_strdup_printf ("%s@%s", g_get_user_name (), g_get_host_name ());
|
str = g_strdup_printf ("%s@%s", g_get_user_name (), g_get_host_name ());
|
||||||
gst_rtp_bin_set_sdes_string (rtpbin, GST_RTCP_SDES_CNAME, str);
|
rtpbin->sdes = gst_structure_new ("application/x-rtp-source-sdes",
|
||||||
|
"cname", G_TYPE_STRING, str,
|
||||||
|
"name", G_TYPE_STRING, g_get_real_name (),
|
||||||
|
"tool", G_TYPE_STRING, "GStreamer", NULL);
|
||||||
g_free (str);
|
g_free (str);
|
||||||
|
|
||||||
gst_rtp_bin_set_sdes_string (rtpbin, GST_RTCP_SDES_NAME, g_get_real_name ());
|
|
||||||
gst_rtp_bin_set_sdes_string (rtpbin, GST_RTCP_SDES_TOOL, "GStreamer");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1547,12 +1498,11 @@ static void
|
||||||
gst_rtp_bin_finalize (GObject * object)
|
gst_rtp_bin_finalize (GObject * object)
|
||||||
{
|
{
|
||||||
GstRtpBin *rtpbin;
|
GstRtpBin *rtpbin;
|
||||||
gint i;
|
|
||||||
|
|
||||||
rtpbin = GST_RTP_BIN (object);
|
rtpbin = GST_RTP_BIN (object);
|
||||||
|
|
||||||
for (i = 0; i < 9; i++)
|
if (rtpbin->sdes)
|
||||||
g_free (rtpbin->sdes[i]);
|
gst_structure_free (rtpbin->sdes);
|
||||||
|
|
||||||
g_mutex_free (rtpbin->priv->bin_lock);
|
g_mutex_free (rtpbin->priv->bin_lock);
|
||||||
g_mutex_free (rtpbin->priv->dyn_lock);
|
g_mutex_free (rtpbin->priv->dyn_lock);
|
||||||
|
@ -1560,77 +1510,37 @@ gst_rtp_bin_finalize (GObject * object)
|
||||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const gchar *
|
|
||||||
sdes_type_to_name (GstRTCPSDESType type)
|
|
||||||
{
|
|
||||||
const gchar *result;
|
|
||||||
|
|
||||||
switch (type) {
|
|
||||||
case GST_RTCP_SDES_CNAME:
|
|
||||||
result = "sdes-cname";
|
|
||||||
break;
|
|
||||||
case GST_RTCP_SDES_NAME:
|
|
||||||
result = "sdes-name";
|
|
||||||
break;
|
|
||||||
case GST_RTCP_SDES_EMAIL:
|
|
||||||
result = "sdes-email";
|
|
||||||
break;
|
|
||||||
case GST_RTCP_SDES_PHONE:
|
|
||||||
result = "sdes-phone";
|
|
||||||
break;
|
|
||||||
case GST_RTCP_SDES_LOC:
|
|
||||||
result = "sdes-location";
|
|
||||||
break;
|
|
||||||
case GST_RTCP_SDES_TOOL:
|
|
||||||
result = "sdes-tool";
|
|
||||||
break;
|
|
||||||
case GST_RTCP_SDES_NOTE:
|
|
||||||
result = "sdes-note";
|
|
||||||
break;
|
|
||||||
case GST_RTCP_SDES_PRIV:
|
|
||||||
result = "sdes-priv";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
result = NULL;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_rtp_bin_set_sdes_string (GstRtpBin * bin, GstRTCPSDESType type,
|
gst_rtp_bin_set_sdes_struct (GstRtpBin * bin, const GstStructure * sdes)
|
||||||
const gchar * data)
|
|
||||||
{
|
{
|
||||||
GSList *item;
|
GSList *item;
|
||||||
const gchar *name;
|
|
||||||
|
|
||||||
if (type < 0 || type > 8)
|
if (sdes == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
GST_RTP_BIN_LOCK (bin);
|
GST_RTP_BIN_LOCK (bin);
|
||||||
|
|
||||||
GST_OBJECT_LOCK (bin);
|
GST_OBJECT_LOCK (bin);
|
||||||
g_free (bin->sdes[type]);
|
if (bin->sdes)
|
||||||
bin->sdes[type] = g_strdup (data);
|
gst_structure_free (bin->sdes);
|
||||||
name = sdes_type_to_name (type);
|
bin->sdes = gst_structure_copy (sdes);
|
||||||
|
|
||||||
/* store in all sessions */
|
/* store in all sessions */
|
||||||
for (item = bin->sessions; item; item = g_slist_next (item))
|
for (item = bin->sessions; item; item = g_slist_next (item))
|
||||||
g_object_set (item->data, name, bin->sdes[type], NULL);
|
g_object_set (item->data, "sdes", sdes, NULL);
|
||||||
GST_OBJECT_UNLOCK (bin);
|
GST_OBJECT_UNLOCK (bin);
|
||||||
|
|
||||||
GST_RTP_BIN_UNLOCK (bin);
|
GST_RTP_BIN_UNLOCK (bin);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gchar *
|
static GstStructure *
|
||||||
gst_rtp_bin_get_sdes_string (GstRtpBin * bin, GstRTCPSDESType type)
|
gst_rtp_bin_get_sdes_struct (GstRtpBin * bin)
|
||||||
{
|
{
|
||||||
gchar *result;
|
GstStructure *result;
|
||||||
|
|
||||||
if (type < 0 || type > 8)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
GST_OBJECT_LOCK (bin);
|
GST_OBJECT_LOCK (bin);
|
||||||
result = g_strdup (bin->sdes[type]);
|
result = gst_structure_copy (bin->sdes);
|
||||||
GST_OBJECT_UNLOCK (bin);
|
GST_OBJECT_UNLOCK (bin);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -1652,33 +1562,8 @@ gst_rtp_bin_set_property (GObject * object, guint prop_id,
|
||||||
/* propegate the property down to the jitterbuffer */
|
/* propegate the property down to the jitterbuffer */
|
||||||
gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin, "latency", value);
|
gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin, "latency", value);
|
||||||
break;
|
break;
|
||||||
case PROP_SDES_CNAME:
|
case PROP_SDES:
|
||||||
gst_rtp_bin_set_sdes_string (rtpbin, GST_RTCP_SDES_CNAME,
|
gst_rtp_bin_set_sdes_struct (rtpbin, g_value_get_boxed (value));
|
||||||
g_value_get_string (value));
|
|
||||||
break;
|
|
||||||
case PROP_SDES_NAME:
|
|
||||||
gst_rtp_bin_set_sdes_string (rtpbin, GST_RTCP_SDES_NAME,
|
|
||||||
g_value_get_string (value));
|
|
||||||
break;
|
|
||||||
case PROP_SDES_EMAIL:
|
|
||||||
gst_rtp_bin_set_sdes_string (rtpbin, GST_RTCP_SDES_EMAIL,
|
|
||||||
g_value_get_string (value));
|
|
||||||
break;
|
|
||||||
case PROP_SDES_PHONE:
|
|
||||||
gst_rtp_bin_set_sdes_string (rtpbin, GST_RTCP_SDES_PHONE,
|
|
||||||
g_value_get_string (value));
|
|
||||||
break;
|
|
||||||
case PROP_SDES_LOCATION:
|
|
||||||
gst_rtp_bin_set_sdes_string (rtpbin, GST_RTCP_SDES_LOC,
|
|
||||||
g_value_get_string (value));
|
|
||||||
break;
|
|
||||||
case PROP_SDES_TOOL:
|
|
||||||
gst_rtp_bin_set_sdes_string (rtpbin, GST_RTCP_SDES_TOOL,
|
|
||||||
g_value_get_string (value));
|
|
||||||
break;
|
|
||||||
case PROP_SDES_NOTE:
|
|
||||||
gst_rtp_bin_set_sdes_string (rtpbin, GST_RTCP_SDES_NOTE,
|
|
||||||
g_value_get_string (value));
|
|
||||||
break;
|
break;
|
||||||
case PROP_DO_LOST:
|
case PROP_DO_LOST:
|
||||||
GST_RTP_BIN_LOCK (rtpbin);
|
GST_RTP_BIN_LOCK (rtpbin);
|
||||||
|
@ -1706,33 +1591,8 @@ gst_rtp_bin_get_property (GObject * object, guint prop_id,
|
||||||
g_value_set_uint (value, rtpbin->latency);
|
g_value_set_uint (value, rtpbin->latency);
|
||||||
GST_RTP_BIN_UNLOCK (rtpbin);
|
GST_RTP_BIN_UNLOCK (rtpbin);
|
||||||
break;
|
break;
|
||||||
case PROP_SDES_CNAME:
|
case PROP_SDES:
|
||||||
g_value_take_string (value, gst_rtp_bin_get_sdes_string (rtpbin,
|
g_value_take_boxed (value, gst_rtp_bin_get_sdes_struct (rtpbin));
|
||||||
GST_RTCP_SDES_CNAME));
|
|
||||||
break;
|
|
||||||
case PROP_SDES_NAME:
|
|
||||||
g_value_take_string (value, gst_rtp_bin_get_sdes_string (rtpbin,
|
|
||||||
GST_RTCP_SDES_NAME));
|
|
||||||
break;
|
|
||||||
case PROP_SDES_EMAIL:
|
|
||||||
g_value_take_string (value, gst_rtp_bin_get_sdes_string (rtpbin,
|
|
||||||
GST_RTCP_SDES_EMAIL));
|
|
||||||
break;
|
|
||||||
case PROP_SDES_PHONE:
|
|
||||||
g_value_take_string (value, gst_rtp_bin_get_sdes_string (rtpbin,
|
|
||||||
GST_RTCP_SDES_PHONE));
|
|
||||||
break;
|
|
||||||
case PROP_SDES_LOCATION:
|
|
||||||
g_value_take_string (value, gst_rtp_bin_get_sdes_string (rtpbin,
|
|
||||||
GST_RTCP_SDES_LOC));
|
|
||||||
break;
|
|
||||||
case PROP_SDES_TOOL:
|
|
||||||
g_value_take_string (value, gst_rtp_bin_get_sdes_string (rtpbin,
|
|
||||||
GST_RTCP_SDES_TOOL));
|
|
||||||
break;
|
|
||||||
case PROP_SDES_NOTE:
|
|
||||||
g_value_take_string (value, gst_rtp_bin_get_sdes_string (rtpbin,
|
|
||||||
GST_RTCP_SDES_NOTE));
|
|
||||||
break;
|
break;
|
||||||
case PROP_DO_LOST:
|
case PROP_DO_LOST:
|
||||||
GST_RTP_BIN_LOCK (rtpbin);
|
GST_RTP_BIN_LOCK (rtpbin);
|
||||||
|
|
|
@ -53,7 +53,7 @@ struct _GstRtpBin {
|
||||||
GSList *clients;
|
GSList *clients;
|
||||||
|
|
||||||
/* the default SDES items for sessions */
|
/* the default SDES items for sessions */
|
||||||
gchar *sdes[9];
|
GstStructure *sdes;
|
||||||
|
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
GstRtpBinPrivate *priv;
|
GstRtpBinPrivate *priv;
|
||||||
|
|
|
@ -200,13 +200,7 @@ enum
|
||||||
#define DEFAULT_NTP_NS_BASE 0
|
#define DEFAULT_NTP_NS_BASE 0
|
||||||
#define DEFAULT_BANDWIDTH RTP_STATS_BANDWIDTH
|
#define DEFAULT_BANDWIDTH RTP_STATS_BANDWIDTH
|
||||||
#define DEFAULT_RTCP_FRACTION RTP_STATS_RTCP_BANDWIDTH
|
#define DEFAULT_RTCP_FRACTION RTP_STATS_RTCP_BANDWIDTH
|
||||||
#define DEFAULT_SDES_CNAME NULL
|
#define DEFAULT_SDES NULL
|
||||||
#define DEFAULT_SDES_NAME NULL
|
|
||||||
#define DEFAULT_SDES_EMAIL NULL
|
|
||||||
#define DEFAULT_SDES_PHONE NULL
|
|
||||||
#define DEFAULT_SDES_LOCATION NULL
|
|
||||||
#define DEFAULT_SDES_TOOL NULL
|
|
||||||
#define DEFAULT_SDES_NOTE NULL
|
|
||||||
#define DEFAULT_NUM_SOURCES 0
|
#define DEFAULT_NUM_SOURCES 0
|
||||||
#define DEFAULT_NUM_ACTIVE_SOURCES 0
|
#define DEFAULT_NUM_ACTIVE_SOURCES 0
|
||||||
|
|
||||||
|
@ -216,13 +210,7 @@ enum
|
||||||
PROP_NTP_NS_BASE,
|
PROP_NTP_NS_BASE,
|
||||||
PROP_BANDWIDTH,
|
PROP_BANDWIDTH,
|
||||||
PROP_RTCP_FRACTION,
|
PROP_RTCP_FRACTION,
|
||||||
PROP_SDES_CNAME,
|
PROP_SDES,
|
||||||
PROP_SDES_NAME,
|
|
||||||
PROP_SDES_EMAIL,
|
|
||||||
PROP_SDES_PHONE,
|
|
||||||
PROP_SDES_LOCATION,
|
|
||||||
PROP_SDES_TOOL,
|
|
||||||
PROP_SDES_NOTE,
|
|
||||||
PROP_NUM_SOURCES,
|
PROP_NUM_SOURCES,
|
||||||
PROP_NUM_ACTIVE_SOURCES,
|
PROP_NUM_ACTIVE_SOURCES,
|
||||||
PROP_INTERNAL_SESSION,
|
PROP_INTERNAL_SESSION,
|
||||||
|
@ -555,40 +543,10 @@ gst_rtp_session_class_init (GstRtpSessionClass * klass)
|
||||||
"The fraction of the bandwidth used for RTCP",
|
"The fraction of the bandwidth used for RTCP",
|
||||||
0.0, G_MAXDOUBLE, DEFAULT_RTCP_FRACTION, G_PARAM_READWRITE));
|
0.0, G_MAXDOUBLE, DEFAULT_RTCP_FRACTION, G_PARAM_READWRITE));
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_SDES_CNAME,
|
g_object_class_install_property (gobject_class, PROP_SDES,
|
||||||
g_param_spec_string ("sdes-cname", "SDES CNAME",
|
g_param_spec_boxed ("sdes", "SDES",
|
||||||
"The CNAME to put in SDES messages of this session",
|
"The SDES items of this session",
|
||||||
DEFAULT_SDES_CNAME, G_PARAM_READWRITE));
|
GST_TYPE_STRUCTURE, G_PARAM_READWRITE));
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_SDES_NAME,
|
|
||||||
g_param_spec_string ("sdes-name", "SDES NAME",
|
|
||||||
"The NAME to put in SDES messages of this session",
|
|
||||||
DEFAULT_SDES_NAME, G_PARAM_READWRITE));
|
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_SDES_EMAIL,
|
|
||||||
g_param_spec_string ("sdes-email", "SDES EMAIL",
|
|
||||||
"The EMAIL to put in SDES messages of this session",
|
|
||||||
DEFAULT_SDES_EMAIL, G_PARAM_READWRITE));
|
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_SDES_PHONE,
|
|
||||||
g_param_spec_string ("sdes-phone", "SDES PHONE",
|
|
||||||
"The PHONE to put in SDES messages of this session",
|
|
||||||
DEFAULT_SDES_PHONE, G_PARAM_READWRITE));
|
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_SDES_LOCATION,
|
|
||||||
g_param_spec_string ("sdes-location", "SDES LOCATION",
|
|
||||||
"The LOCATION to put in SDES messages of this session",
|
|
||||||
DEFAULT_SDES_LOCATION, G_PARAM_READWRITE));
|
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_SDES_TOOL,
|
|
||||||
g_param_spec_string ("sdes-tool", "SDES TOOL",
|
|
||||||
"The TOOL to put in SDES messages of this session",
|
|
||||||
DEFAULT_SDES_TOOL, G_PARAM_READWRITE));
|
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_SDES_NOTE,
|
|
||||||
g_param_spec_string ("sdes-note", "SDES NOTE",
|
|
||||||
"The NOTE to put in SDES messages of this session",
|
|
||||||
DEFAULT_SDES_NOTE, G_PARAM_READWRITE));
|
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_NUM_SOURCES,
|
g_object_class_install_property (gobject_class, PROP_NUM_SOURCES,
|
||||||
g_param_spec_uint ("num-sources", "Num Sources",
|
g_param_spec_uint ("num-sources", "Num Sources",
|
||||||
|
@ -704,33 +662,8 @@ gst_rtp_session_set_property (GObject * object, guint prop_id,
|
||||||
case PROP_RTCP_FRACTION:
|
case PROP_RTCP_FRACTION:
|
||||||
rtp_session_set_rtcp_fraction (priv->session, g_value_get_double (value));
|
rtp_session_set_rtcp_fraction (priv->session, g_value_get_double (value));
|
||||||
break;
|
break;
|
||||||
case PROP_SDES_CNAME:
|
case PROP_SDES:
|
||||||
rtp_session_set_sdes_string (priv->session, GST_RTCP_SDES_CNAME,
|
rtp_session_set_sdes_struct (priv->session, g_value_get_boxed (value));
|
||||||
g_value_get_string (value));
|
|
||||||
break;
|
|
||||||
case PROP_SDES_NAME:
|
|
||||||
rtp_session_set_sdes_string (priv->session, GST_RTCP_SDES_NAME,
|
|
||||||
g_value_get_string (value));
|
|
||||||
break;
|
|
||||||
case PROP_SDES_EMAIL:
|
|
||||||
rtp_session_set_sdes_string (priv->session, GST_RTCP_SDES_EMAIL,
|
|
||||||
g_value_get_string (value));
|
|
||||||
break;
|
|
||||||
case PROP_SDES_PHONE:
|
|
||||||
rtp_session_set_sdes_string (priv->session, GST_RTCP_SDES_PHONE,
|
|
||||||
g_value_get_string (value));
|
|
||||||
break;
|
|
||||||
case PROP_SDES_LOCATION:
|
|
||||||
rtp_session_set_sdes_string (priv->session, GST_RTCP_SDES_LOC,
|
|
||||||
g_value_get_string (value));
|
|
||||||
break;
|
|
||||||
case PROP_SDES_TOOL:
|
|
||||||
rtp_session_set_sdes_string (priv->session, GST_RTCP_SDES_TOOL,
|
|
||||||
g_value_get_string (value));
|
|
||||||
break;
|
|
||||||
case PROP_SDES_NOTE:
|
|
||||||
rtp_session_set_sdes_string (priv->session, GST_RTCP_SDES_NOTE,
|
|
||||||
g_value_get_string (value));
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
@ -760,33 +693,8 @@ gst_rtp_session_get_property (GObject * object, guint prop_id,
|
||||||
case PROP_RTCP_FRACTION:
|
case PROP_RTCP_FRACTION:
|
||||||
g_value_set_double (value, rtp_session_get_rtcp_fraction (priv->session));
|
g_value_set_double (value, rtp_session_get_rtcp_fraction (priv->session));
|
||||||
break;
|
break;
|
||||||
case PROP_SDES_CNAME:
|
case PROP_SDES:
|
||||||
g_value_take_string (value, rtp_session_get_sdes_string (priv->session,
|
g_value_take_boxed (value, rtp_session_get_sdes_struct (priv->session));
|
||||||
GST_RTCP_SDES_CNAME));
|
|
||||||
break;
|
|
||||||
case PROP_SDES_NAME:
|
|
||||||
g_value_take_string (value, rtp_session_get_sdes_string (priv->session,
|
|
||||||
GST_RTCP_SDES_NAME));
|
|
||||||
break;
|
|
||||||
case PROP_SDES_EMAIL:
|
|
||||||
g_value_take_string (value, rtp_session_get_sdes_string (priv->session,
|
|
||||||
GST_RTCP_SDES_EMAIL));
|
|
||||||
break;
|
|
||||||
case PROP_SDES_PHONE:
|
|
||||||
g_value_take_string (value, rtp_session_get_sdes_string (priv->session,
|
|
||||||
GST_RTCP_SDES_PHONE));
|
|
||||||
break;
|
|
||||||
case PROP_SDES_LOCATION:
|
|
||||||
g_value_take_string (value, rtp_session_get_sdes_string (priv->session,
|
|
||||||
GST_RTCP_SDES_LOC));
|
|
||||||
break;
|
|
||||||
case PROP_SDES_TOOL:
|
|
||||||
g_value_take_string (value, rtp_session_get_sdes_string (priv->session,
|
|
||||||
GST_RTCP_SDES_TOOL));
|
|
||||||
break;
|
|
||||||
case PROP_SDES_NOTE:
|
|
||||||
g_value_take_string (value, rtp_session_get_sdes_string (priv->session,
|
|
||||||
GST_RTCP_SDES_NOTE));
|
|
||||||
break;
|
break;
|
||||||
case PROP_NUM_SOURCES:
|
case PROP_NUM_SOURCES:
|
||||||
g_value_set_uint (value, rtp_session_get_num_sources (priv->session));
|
g_value_set_uint (value, rtp_session_get_num_sources (priv->session));
|
||||||
|
|
Loading…
Reference in a new issue