summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Crête <olivier.crete@collabora.co.uk>2008-12-29 08:26:41 (GMT)
committerOlivier Crête <olivier.crete@collabora.co.uk>2008-12-29 08:26:41 (GMT)
commit02c53babefa9f586370f8f1abda43ee73a436914 (patch)
tree64e13e9544770f1c152a0ace1ca2e031753d679b
parentfddb816dd0b9d9e9411d9d3e0cf0451785140532 (diff)
downloadgst-plugins-farsight-tester-ssrc-mod.tar.gz
gst-plugins-farsight-tester-ssrc-mod.tar.xz
Add property to get the current ssrc of the rtp muxerssrc-mod
-rw-r--r--gst/rtpmux/gstrtpmux.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/gst/rtpmux/gstrtpmux.c b/gst/rtpmux/gstrtpmux.c
index 09aafb4..9d74484 100644
--- a/gst/rtpmux/gstrtpmux.c
+++ b/gst/rtpmux/gstrtpmux.c
@@ -58,12 +58,14 @@ enum
PROP_TIMESTAMP_OFFSET,
PROP_SEQNUM_OFFSET,
PROP_SEQNUM,
- PROP_SSRC
+ PROP_SSRC,
+ PROP_CURRENT_SSRC
};
#define DEFAULT_TIMESTAMP_OFFSET -1
#define DEFAULT_SEQNUM_OFFSET -1
#define DEFAULT_SSRC -1
+#define DEFAULT_CURRENT_SSRC 0
#define DEFAULT_CLOCK_RATE 0
typedef struct {
@@ -180,8 +182,12 @@ gst_rtp_mux_class_init (GstRTPMuxClass * klass)
0, G_MAXUINT, 0, G_PARAM_READABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SSRC,
g_param_spec_int64 ("ssrc", "SSRC",
- "The SSRC of the packets (-1 == random)",
+ "The desired SSRC of the packets (-1 == random)",
DEFAULT_SSRC, G_MAXUINT32, DEFAULT_SSRC, G_PARAM_READWRITE));
+ g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SSRC,
+ g_param_spec_uint ("current-ssrc", "The current SSRC",
+ "The SSRC of the packets (only set when state >= PAUSED)",
+ 0, G_MAXUINT32, DEFAULT_CURRENT_SSRC, G_PARAM_READABLE));
gstelement_class->request_new_pad = gst_rtp_mux_request_new_pad;
gstelement_class->release_pad = gst_rtp_mux_release_pad;
@@ -474,6 +480,9 @@ gst_rtp_mux_get_property (GObject * object,
case PROP_SSRC:
g_value_set_int64 (value, rtp_mux->ssrc);
break;
+ case PROP_CURRENT_SSRC:
+ g_value_set_uint (value, rtp_mux->current_ssrc);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;