summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorJan Schmidt <thaytan@noraisin.net>2009-02-27 12:03:23 +0000
committerJan Schmidt <thaytan@noraisin.net>2009-02-27 12:03:23 +0000
commit93da31ef92779b84775e64a1467e0fc89ec40da5 (patch)
treebf1b916f595406a962ca3a4224de73aeb53822c8 /ext
parentfab9dfa5d093a27dd6a0bfb16d020f3753523964 (diff)
parentde2c4abd7c76fe0dfec4d3092d06eeb2d412ae96 (diff)
downloadgst-plugins-bad-93da31ef92779b84775e64a1467e0fc89ec40da5.tar.gz
gst-plugins-bad-93da31ef92779b84775e64a1467e0fc89ec40da5.tar.bz2
gst-plugins-bad-93da31ef92779b84775e64a1467e0fc89ec40da5.zip
Merge branch 'work'
Diffstat (limited to 'ext')
-rw-r--r--ext/apexsink/gstapexraop.c24
-rw-r--r--ext/celt/gstceltdec.c2
-rw-r--r--ext/celt/gstceltdec.h2
-rw-r--r--ext/dts/gstdtsdec.c25
4 files changed, 41 insertions, 12 deletions
diff --git a/ext/apexsink/gstapexraop.c b/ext/apexsink/gstapexraop.c
index 42b707ca..98b7d863 100644
--- a/ext/apexsink/gstapexraop.c
+++ b/ext/apexsink/gstapexraop.c
@@ -231,7 +231,17 @@ gst_apexraop_connect (GstApExRAOP * con)
creq[GST_APEX_RAOP_SDP_DEFAULT_LENGTH],
hreq[GST_APEX_RAOP_HDR_DEFAULT_LENGTH], *req;
RSA *rsa;
- guchar *mod, *exp, buf[4 + 8 + 16], rsakey[512];
+ guchar *mod, *exp, rsakey[512];
+ union gst_randbytes
+ {
+ struct asvals
+ {
+ gulong url_key;
+ guint64 conn_id;
+ guchar challenge[16];
+ } v;
+ guchar buf[4 + 8 + 16];
+ } randbuf;
gsize size;
struct sockaddr_in ioaddr;
socklen_t iolen;
@@ -257,12 +267,9 @@ gst_apexraop_connect (GstApExRAOP * con)
sizeof (conn->ctrl_sd_in)) < 0)
return GST_RTSP_STS_DESTINATION_UNREACHABLE;
- RAND_bytes (buf, sizeof (buf));
- sprintf ((gchar *) conn->url_abspath, "%lu", *((gulong *) buf));
- ac = g_base64_encode (buf + 12, 16);
- g_strdel (ac, '=');
- sprintf ((char *) conn->cid, "%08lx%08lx", *((gulong *) (buf + 4)),
- *((gulong *) (buf + 8)));
+ RAND_bytes (randbuf.buf, sizeof (randbuf));
+ sprintf ((gchar *) conn->url_abspath, "%lu", randbuf.v.url_key);
+ sprintf ((char *) conn->cid, "%16" G_GINT64_MODIFIER "x", randbuf.v.conn_id);
RAND_bytes (conn->aes_ky, AES_BLOCK_SIZE);
RAND_bytes (conn->aes_iv, AES_BLOCK_SIZE);
@@ -285,6 +292,9 @@ gst_apexraop_connect (GstApExRAOP * con)
getsockname (conn->ctrl_sd, (struct sockaddr *) &ioaddr, &iolen);
inet_ntop (AF_INET, &(ioaddr.sin_addr), inaddr, INET_ADDRSTRLEN);
+ ac = g_base64_encode (randbuf.v.challenge, 16);
+ g_strdel (ac, '=');
+
sprintf (creq,
"v=0\r\n"
"o=iTunes %s 0 IN IP4 %s\r\n"
diff --git a/ext/celt/gstceltdec.c b/ext/celt/gstceltdec.c
index fe1914b8..2f3d7807 100644
--- a/ext/celt/gstceltdec.c
+++ b/ext/celt/gstceltdec.c
@@ -48,6 +48,8 @@
GST_DEBUG_CATEGORY_STATIC (celtdec_debug);
#define GST_CAT_DEFAULT celtdec_debug
+#define DEC_MAX_FRAME_SIZE 2000
+
static GstStaticPadTemplate celt_dec_src_factory =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
diff --git a/ext/celt/gstceltdec.h b/ext/celt/gstceltdec.h
index 19f14447..77851338 100644
--- a/ext/celt/gstceltdec.h
+++ b/ext/celt/gstceltdec.h
@@ -41,8 +41,6 @@ G_BEGIN_DECLS
typedef struct _GstCeltDec GstCeltDec;
typedef struct _GstCeltDecClass GstCeltDecClass;
-#define DEC_MAX_FRAME_SIZE 2000
-
struct _GstCeltDec {
GstElement element;
diff --git a/ext/dts/gstdtsdec.c b/ext/dts/gstdtsdec.c
index 58748e6c..5b85a803 100644
--- a/ext/dts/gstdtsdec.c
+++ b/ext/dts/gstdtsdec.c
@@ -17,9 +17,20 @@
* Boston, MA 02111-1307, USA.
*/
-/* TODO: - Port to libdca API instead of relying on the compat header.
- * libdca is the successor of libdts:
- * http://www.videolan.org/developers/libdca.html
+/**
+ * SECTION:element-dtsdec
+ *
+ * Digital Theatre System (DTS) audio decoder
+ *
+ * <refsect2>
+ * <title>Example launch line</title>
+ * |[
+ * gst-launch dvdreadsrc title=1 ! mpegpsdemux ! dtsdec ! audioresample ! audioconvert ! alsasink
+ * ]| Play a DTS audio track from a dvd.
+ * |[
+ * gst-launch filesrc location=abc.dts ! dtsdec ! audioresample ! audioconvert ! alsasink
+ * ]| Decode a standalone file and play it.
+ * </refsect2>
*/
#ifdef HAVE_CONFIG_H
@@ -162,6 +173,14 @@ gst_dtsdec_class_init (GstDtsDecClass * klass)
gstelement_class->change_state = gst_dtsdec_change_state;
+ /**
+ * GstDtsDec::drc
+ *
+ * Set to true to apply the recommended DTS dynamic range compression
+ * to the audio stream. Dynamic range compression makes loud sounds
+ * softer and soft sounds louder, so you can more easily listen
+ * to the stream without disturbing other people.
+ */
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DRC,
g_param_spec_boolean ("drc", "Dynamic Range Compression",
"Use Dynamic Range Compression", FALSE, G_PARAM_READWRITE));