From 4a046a08a336e1cde0105f40461f67491f5b22a1 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 27 Feb 2009 10:16:57 +0000 Subject: apexsink: Use a union to avoid type-punning strict aliasing compiler warning. --- ext/apexsink/gstapexraop.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 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" -- cgit v1.2.1 From f4da218edd55e54e75e6c9485685eefc94432fce Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 27 Feb 2009 11:39:56 +0000 Subject: dtsdec: Add some basic docs to the plugin --- docs/plugins/Makefile.am | 1 + docs/plugins/gst-plugins-bad-plugins-docs.sgml | 1 + docs/plugins/gst-plugins-bad-plugins-sections.txt | 14 +++++++++++++ ext/dts/gstdtsdec.c | 25 ++++++++++++++++++++--- 4 files changed, 38 insertions(+), 3 deletions(-) diff --git a/docs/plugins/Makefile.am b/docs/plugins/Makefile.am index c5504b19..5f78f46f 100644 --- a/docs/plugins/Makefile.am +++ b/docs/plugins/Makefile.am @@ -96,6 +96,7 @@ EXTRA_HFILES = \ $(top_srcdir)/ext/celt/gstceltenc.h \ $(top_srcdir)/ext/dc1394/gstdc1394.h \ $(top_srcdir)/ext/directfb/dfbvideosink.h \ + $(top_srcdir)/ext/dts/gstdtsdec.h \ $(top_srcdir)/ext/ivorbis/vorbisdec.h \ $(top_srcdir)/ext/jack/gstjackaudiosrc.h \ $(top_srcdir)/ext/jack/gstjackaudiosink.h \ diff --git a/docs/plugins/gst-plugins-bad-plugins-docs.sgml b/docs/plugins/gst-plugins-bad-plugins-docs.sgml index 1b399ba5..fe2ddf24 100644 --- a/docs/plugins/gst-plugins-bad-plugins-docs.sgml +++ b/docs/plugins/gst-plugins-bad-plugins-docs.sgml @@ -34,6 +34,7 @@ + diff --git a/docs/plugins/gst-plugins-bad-plugins-sections.txt b/docs/plugins/gst-plugins-bad-plugins-sections.txt index a2829ef9..bf07b16f 100644 --- a/docs/plugins/gst-plugins-bad-plugins-sections.txt +++ b/docs/plugins/gst-plugins-bad-plugins-sections.txt @@ -248,6 +248,20 @@ gst_dtmf_src_get_type gst_dtmf_src_plugin_init +
+element-dtsdec +dtsdec +GstDtsDec + +GstDtsDecClass +gst_dtsdec_get_type +GST_TYPE_DTSDEC +GST_DTSDEC +GST_DTSDEC_CLASS +GST_IS_DTSDEC +GST_IS_DTSDEC_CLASS +
+
element-dvbsrc dvbsrc 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 + * + * + * Example launch line + * |[ + * 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. + * */ #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)); -- cgit v1.2.1 From efc9b324dbe16cbfb7eb829a10cd9c185b681117 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 27 Feb 2009 11:54:42 +0000 Subject: docs: Enroll dirac plugin into the docs --- docs/plugins/gst-plugins-bad-plugins-docs.sgml | 1 + docs/plugins/inspect/plugin-dirac.xml | 34 ++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 docs/plugins/inspect/plugin-dirac.xml diff --git a/docs/plugins/gst-plugins-bad-plugins-docs.sgml b/docs/plugins/gst-plugins-bad-plugins-docs.sgml index fe2ddf24..57ea1674 100644 --- a/docs/plugins/gst-plugins-bad-plugins-docs.sgml +++ b/docs/plugins/gst-plugins-bad-plugins-docs.sgml @@ -98,6 +98,7 @@ + diff --git a/docs/plugins/inspect/plugin-dirac.xml b/docs/plugins/inspect/plugin-dirac.xml new file mode 100644 index 00000000..e16d0a32 --- /dev/null +++ b/docs/plugins/inspect/plugin-dirac.xml @@ -0,0 +1,34 @@ + + dirac + Dirac plugin + ../../ext/dirac/.libs/libgstdirac.so + libgstdirac.so + 0.10.10.1 + LGPL + gst-plugins-bad + GStreamer Bad Plug-ins CVS/prerelease + Unknown package origin + + + diracenc + Dirac Encoder + Codec/Encoder/Video + Encode raw YUV video into Dirac stream + David Schleef <ds@schleef.org> + + + sink + sink + always +
video/x-raw-yuv, format=(fourcc){ I420, YUY2, UYVY, AYUV }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
+
+ + src + source + always +
video/x-dirac
+
+
+
+
+
\ No newline at end of file -- cgit v1.2.1 From b59e9837519a75d4eeb4c1049ec7711da9f57e01 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 27 Feb 2009 11:55:34 +0000 Subject: celtdec: Move define into the C file so it doesn't show up in the docs --- ext/celt/gstceltdec.c | 2 ++ ext/celt/gstceltdec.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) 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; -- cgit v1.2.1 From de2c4abd7c76fe0dfec4d3092d06eeb2d412ae96 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 27 Feb 2009 11:56:45 +0000 Subject: docs: Ignore some more generated files --- docs/plugins/.gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/plugins/.gitignore b/docs/plugins/.gitignore index 73d2bbd3..13ac8df7 100644 --- a/docs/plugins/.gitignore +++ b/docs/plugins/.gitignore @@ -6,6 +6,7 @@ Makefile.in *-undocumented.txt *-undeclared.txt *-unused.txt +*.bak tmpl xml @@ -13,7 +14,7 @@ html gst-plugins-bad-plugins-scan gst-plugins-bad-plugins-scan.c -inspect-registry. +inspect-registry.* html-build.stamp html.stamp -- cgit v1.2.1