summaryrefslogtreecommitdiffstats
path: root/gst/rtp
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2005-09-21 12:19:24 +0000
committerWim Taymans <wim.taymans@gmail.com>2005-09-21 12:19:24 +0000
commit9dd3929730bc3e2656eabfd8a8edfc7a61bb0176 (patch)
treeb67f40938625cb38ade8500e3a1650ed3db04c9d /gst/rtp
parenteb20f045f8fcbf9e6459cb7d7c608acb72c5f8b6 (diff)
gst/rtp/README: Update README
Original commit message from CVS: * gst/rtp/README: Update README * gst/rtp/gstrtpamrdec.c: (gst_rtpamrdec_sink_setcaps): Make extra params as strings. * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_set_state), (gst_rtspsrc_parse_rtpmap), (gst_rtspsrc_media_to_caps), (gst_rtspsrc_stream_setup_rtp), (gst_rtspsrc_send): Make state change return NO_PREROLL as this is a live source. * gst/udp/gstudpsrc.c: (gst_udpsrc_set_property): Don't unref old caps when NULL.
Diffstat (limited to 'gst/rtp')
-rw-r--r--gst/rtp/README11
-rw-r--r--gst/rtp/gstrtpamrdec.c28
-rw-r--r--gst/rtp/gstrtpamrdepay.c28
3 files changed, 40 insertions, 27 deletions
diff --git a/gst/rtp/README b/gst/rtp/README
index 13f0fd93..ed1a27b6 100644
--- a/gst/rtp/README
+++ b/gst/rtp/README
@@ -35,7 +35,8 @@ The following fields can or must (*) be specified in the structure:
extra encoding parameters (as in the SDP a=rtpmap: field). only required
if different from the default of the encoding-name.
- Optional parameters as key/value pairs, media type specific.
+ Optional parameters as key/value pairs, media type specific. The value type
+ should be of type G_TYPE_STRING.
Example:
@@ -45,10 +46,10 @@ The following fields can or must (*) be specified in the structure:
"clock-rate", G_TYPE_INT, 8000, -]
"encoding-name", G_TYPE_STRING, "AMR", -] - required since payload >= 96
"encoding-params", G_TYPE_STRING, "1", -] - optional param for AMR
- "octet-align", G_TYPE_BOOLEAN, TRUE, -]
- "crc", G_TYPE_BOOLEAN, FALSE, ]
- "robust-sorting", G_TYPE_BOOLEAN, FALSE, ] AMR specific params.
- "interleaving", G_TYPE_BOOLEAN, FALSE, -]
+ "octet-align", G_TYPE_STRING, "1", -]
+ "crc", G_TYPE_STRING, "0", ]
+ "robust-sorting", G_TYPE_STRING, "0", ] AMR specific params.
+ "interleaving", G_TYPE_STRING, "0", -]
Mapping of caps to and from SDP fields:
diff --git a/gst/rtp/gstrtpamrdec.c b/gst/rtp/gstrtpamrdec.c
index 7fc6c9de..f2136625 100644
--- a/gst/rtp/gstrtpamrdec.c
+++ b/gst/rtp/gstrtpamrdec.c
@@ -63,10 +63,10 @@ GST_STATIC_PAD_TEMPLATE ("sink",
"clock-rate = (int) 8000, "
"encoding-name = (string) \"AMR\", "
"encoding-params = (string) \"1\", "
- "octet-align = (boolean) TRUE, "
- "crc = (boolean) FALSE, "
- "robust-sorting = (boolean) FALSE, " "interleaving = (boolean) FALSE"
- /* following options are not needed for a decoder
+ "octet-align = (string) 1, "
+ "crc = (string) 0, "
+ "robust-sorting = (string) 0, " "interleaving = (string) 0"
+ /* following options are not needed for a decoder
*
"mode-set = (int) [ 0, 7 ], "
"mode-change-period = (int) [ 1, MAX ], "
@@ -180,35 +180,41 @@ gst_rtpamrdec_sink_setcaps (GstPad * pad, GstCaps * caps)
GstCaps *srccaps;
GstRtpAMRDec *rtpamrdec;
const gchar *params;
+ const gchar *str;
rtpamrdec = GST_RTP_AMR_DEC (GST_OBJECT_PARENT (pad));
structure = gst_caps_get_structure (caps, 0);
- if (!gst_structure_get_boolean (structure, "octet-align",
- &rtpamrdec->octet_align))
+ if (!(str = gst_structure_get_string (structure, "octet-align")))
rtpamrdec->octet_align = FALSE;
+ else
+ rtpamrdec->octet_align = (atoi (str) == 1);
- if (!gst_structure_get_boolean (structure, "crc", &rtpamrdec->crc))
+ if (!(str = gst_structure_get_string (structure, "crc")))
rtpamrdec->crc = FALSE;
+ else
+ rtpamrdec->crc = (atoi (str) == 1);
if (rtpamrdec->crc) {
/* crc mode implies octet aligned mode */
rtpamrdec->octet_align = TRUE;
}
- if (!gst_structure_get_boolean (structure, "robust-sorting",
- &rtpamrdec->robust_sorting))
+ if (!(str = gst_structure_get_string (structure, "robust-sorting")))
rtpamrdec->robust_sorting = FALSE;
+ else
+ rtpamrdec->robust_sorting = (atoi (str) == 1);
if (rtpamrdec->robust_sorting) {
/* robust_sorting mode implies octet aligned mode */
rtpamrdec->octet_align = TRUE;
}
- if (!gst_structure_get_boolean (structure, "interleaving",
- &rtpamrdec->interleaving))
+ if (!(str = gst_structure_get_string (structure, "interleaving")))
rtpamrdec->interleaving = FALSE;
+ else
+ rtpamrdec->interleaving = (atoi (str) == 1);
if (rtpamrdec->interleaving) {
/* interleaving mode implies octet aligned mode */
diff --git a/gst/rtp/gstrtpamrdepay.c b/gst/rtp/gstrtpamrdepay.c
index 7fc6c9de..f2136625 100644
--- a/gst/rtp/gstrtpamrdepay.c
+++ b/gst/rtp/gstrtpamrdepay.c
@@ -63,10 +63,10 @@ GST_STATIC_PAD_TEMPLATE ("sink",
"clock-rate = (int) 8000, "
"encoding-name = (string) \"AMR\", "
"encoding-params = (string) \"1\", "
- "octet-align = (boolean) TRUE, "
- "crc = (boolean) FALSE, "
- "robust-sorting = (boolean) FALSE, " "interleaving = (boolean) FALSE"
- /* following options are not needed for a decoder
+ "octet-align = (string) 1, "
+ "crc = (string) 0, "
+ "robust-sorting = (string) 0, " "interleaving = (string) 0"
+ /* following options are not needed for a decoder
*
"mode-set = (int) [ 0, 7 ], "
"mode-change-period = (int) [ 1, MAX ], "
@@ -180,35 +180,41 @@ gst_rtpamrdec_sink_setcaps (GstPad * pad, GstCaps * caps)
GstCaps *srccaps;
GstRtpAMRDec *rtpamrdec;
const gchar *params;
+ const gchar *str;
rtpamrdec = GST_RTP_AMR_DEC (GST_OBJECT_PARENT (pad));
structure = gst_caps_get_structure (caps, 0);
- if (!gst_structure_get_boolean (structure, "octet-align",
- &rtpamrdec->octet_align))
+ if (!(str = gst_structure_get_string (structure, "octet-align")))
rtpamrdec->octet_align = FALSE;
+ else
+ rtpamrdec->octet_align = (atoi (str) == 1);
- if (!gst_structure_get_boolean (structure, "crc", &rtpamrdec->crc))
+ if (!(str = gst_structure_get_string (structure, "crc")))
rtpamrdec->crc = FALSE;
+ else
+ rtpamrdec->crc = (atoi (str) == 1);
if (rtpamrdec->crc) {
/* crc mode implies octet aligned mode */
rtpamrdec->octet_align = TRUE;
}
- if (!gst_structure_get_boolean (structure, "robust-sorting",
- &rtpamrdec->robust_sorting))
+ if (!(str = gst_structure_get_string (structure, "robust-sorting")))
rtpamrdec->robust_sorting = FALSE;
+ else
+ rtpamrdec->robust_sorting = (atoi (str) == 1);
if (rtpamrdec->robust_sorting) {
/* robust_sorting mode implies octet aligned mode */
rtpamrdec->octet_align = TRUE;
}
- if (!gst_structure_get_boolean (structure, "interleaving",
- &rtpamrdec->interleaving))
+ if (!(str = gst_structure_get_string (structure, "interleaving")))
rtpamrdec->interleaving = FALSE;
+ else
+ rtpamrdec->interleaving = (atoi (str) == 1);
if (rtpamrdec->interleaving) {
/* interleaving mode implies octet aligned mode */