rpms/gstreamer-plugins-good/F-9 gst-plugins-good-0.10.8-speex-nego.patch, NONE, 1.1 gst-plugins-good-v4l2-new-kernel.patch, NONE, 1.1 gstreamer-plugins-good.spec, 1.60, 1.61

Adam Jackson (ajax) fedora-extras-commits at redhat.com
Thu Jun 19 18:21:22 UTC 2008


Author: ajax

Update of /cvs/pkgs/rpms/gstreamer-plugins-good/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1700

Modified Files:
	gstreamer-plugins-good.spec 
Added Files:
	gst-plugins-good-0.10.8-speex-nego.patch 
	gst-plugins-good-v4l2-new-kernel.patch 
Log Message:
* Thu Jun 19 2008 Adam Jackson <ajax at redhat.com> 0.10.8-7
- gst-plugins-good-0.10.8-speex-nego.patch: Backport speex channel and
  rate negotiation from 0.10.9. (#451391)


gst-plugins-good-0.10.8-speex-nego.patch:

--- NEW FILE gst-plugins-good-0.10.8-speex-nego.patch ---
diff -urp gst-plugins-good-0.10.8.OLD/ext/speex/gstspeexenc.c gst-plugins-good-0.10.8/ext/speex/gstspeexenc.c
--- gst-plugins-good-0.10.8.OLD/ext/speex/gstspeexenc.c	2008-06-13 15:45:41.000000000 -0400
+++ gst-plugins-good-0.10.8/ext/speex/gstspeexenc.c	2008-06-13 15:53:03.000000000 -0400
@@ -48,7 +48,9 @@ static GstStaticPadTemplate sink_factory
 static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
     GST_PAD_SRC,
     GST_PAD_ALWAYS,
-    GST_STATIC_CAPS ("audio/x-speex")
+    GST_STATIC_CAPS ("audio/x-speex, "
+	"rate = (int) [ 6000, 48000 ], "
+	"channels = (int) [ 1, 2]")
     );
 
 static const GstElementDetails speexenc_details =
@@ -220,6 +222,37 @@ gst_speex_enc_sink_setcaps (GstPad * pad
   return enc->setup;
 }
 
+static GstCaps *
+gst_speex_enc_sink_getcaps (GstPad *pad)
+{
+  GstCaps * caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
+  GstCaps * peercaps = NULL;
+  GstSpeexEnc *enc = GST_SPEEX_ENC (gst_pad_get_parent_element (pad));
+
+  peercaps = gst_pad_peer_get_caps (enc->srcpad);
+
+  if (peercaps) {
+    if (!gst_caps_is_empty (peercaps) && !gst_caps_is_any (peercaps)) {
+      GstStructure * ps = gst_caps_get_structure (peercaps, 0);
+      GstStructure * s = gst_caps_get_structure (caps, 0);;
+      gint rate, channels;
+
+      if (gst_structure_get_int (ps, "rate", &rate)) {
+        gst_structure_fixate_field_nearest_int (s, "rate", rate);
+      }
+
+      if (gst_structure_get_int (ps, "channels", &channels)) {
+        gst_structure_fixate_field_nearest_int (s, "channels", channels);
+      }
+    }
+    gst_caps_unref (peercaps);
+  }
+
+  gst_object_unref (enc);
+
+  return caps;
+}
+
 static gboolean
 gst_speex_enc_convert_src (GstPad * pad, GstFormat src_format, gint64 src_value,
     GstFormat * dest_format, gint64 * dest_value)
@@ -458,6 +491,8 @@ gst_speex_enc_init (GstSpeexEnc * enc, G
       GST_DEBUG_FUNCPTR (gst_speex_enc_chain));
   gst_pad_set_setcaps_function (enc->sinkpad,
       GST_DEBUG_FUNCPTR (gst_speex_enc_sink_setcaps));
+  gst_pad_set_getcaps_function (enc->sinkpad,
+      GST_DEBUG_FUNCPTR (gst_speex_enc_sink_getcaps));
   gst_pad_set_query_function (enc->sinkpad,
       GST_DEBUG_FUNCPTR (gst_speex_enc_sink_query));
 
@@ -781,6 +816,10 @@ gst_speex_enc_chain (GstPad * pad, GstBu
     caps = gst_pad_get_caps (enc->srcpad);
     caps = gst_speex_enc_set_header_on_caps (caps, buf1, buf2);
 
+    gst_caps_set_simple (caps,
+        "rate", G_TYPE_INT, enc->rate,
+        "channels", G_TYPE_INT, enc->channels, NULL);
+
     /* negotiate with these caps */
     GST_DEBUG ("here are the caps: %" GST_PTR_FORMAT, caps);
     gst_pad_set_caps (enc->srcpad, caps);
diff -urp gst-plugins-good-0.10.8.OLD/gst/rtp/gstrtpspeexpay.c gst-plugins-good-0.10.8/gst/rtp/gstrtpspeexpay.c
--- gst-plugins-good-0.10.8.OLD/gst/rtp/gstrtpspeexpay.c	2008-06-13 15:45:41.000000000 -0400
+++ gst-plugins-good-0.10.8/gst/rtp/gstrtpspeexpay.c	2008-06-13 15:57:25.000000000 -0400
@@ -41,7 +41,9 @@ static GstStaticPadTemplate gst_rtp_spee
 GST_STATIC_PAD_TEMPLATE ("sink",
     GST_PAD_SINK,
     GST_PAD_ALWAYS,
-    GST_STATIC_CAPS ("audio/x-speex")
+    GST_STATIC_CAPS ("audio/x-speex, "
+        "rate = (int) [ 6000, 48000 ], "
+        "channels = (int) 1")
     );
 
 static GstStaticPadTemplate gst_rtp_speex_pay_src_template =
@@ -61,6 +63,8 @@ static GstStateChangeReturn gst_rtp_spee
 
 static gboolean gst_rtp_speex_pay_setcaps (GstBaseRTPPayload * payload,
     GstCaps * caps);
+static GstCaps * gst_rtp_speex_pay_getcaps (GstBaseRTPPayload * payload,
+    GstPad * pad);
 static GstFlowReturn gst_rtp_speex_pay_handle_buffer (GstBaseRTPPayload *
     payload, GstBuffer * buffer);
 
@@ -96,6 +100,7 @@ gst_rtp_speex_pay_class_init (GstRtpSPEE
   gstelement_class->change_state = gst_rtp_speex_pay_change_state;
 
   gstbasertppayload_class->set_caps = gst_rtp_speex_pay_setcaps;
+  gstbasertppayload_class->get_caps = gst_rtp_speex_pay_getcaps;
   gstbasertppayload_class->handle_buffer = gst_rtp_speex_pay_handle_buffer;
 }
 
@@ -114,6 +119,32 @@ gst_rtp_speex_pay_setcaps (GstBaseRTPPay
   return TRUE;
 }
 
+static GstCaps *
+gst_rtp_speex_pay_getcaps (GstBaseRTPPayload * payload, GstPad * pad)
+{
+  GstCaps * otherpadcaps;
+  GstCaps * caps;
+
+  otherpadcaps = gst_pad_get_allowed_caps(payload->srcpad);
+  caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
+
+  if (otherpadcaps) {
+    if (!gst_caps_is_empty (otherpadcaps)) {
+      GstStructure * ps = gst_caps_get_structure (otherpadcaps, 0);
+      GstStructure * s = gst_caps_get_structure (caps, 0);
+      gint clock_rate;
+
+      if (gst_structure_get_int (ps, "clock-rate", &clock_rate)) {
+        gst_structure_fixate_field_nearest_int (s, "rate", clock_rate);
+      }
+    }
+
+    gst_caps_unref (otherpadcaps);
+  }
+
+  return caps;
+}
+
 static gboolean
 gst_rtp_speex_pay_parse_ident (GstRtpSPEEXPay * rtpspeexpay,
     const guint8 * data, guint size)

gst-plugins-good-v4l2-new-kernel.patch:

--- NEW FILE gst-plugins-good-v4l2-new-kernel.patch ---
Index: gstv4l2vidorient.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-good/sys/v4l2/gstv4l2vidorient.c,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 gstv4l2vidorient.c
--- gstv4l2vidorient.c	26 Sep 2006 14:17:54 -0000	1.2
+++ gstv4l2vidorient.c	2 Jun 2008 20:29:15 -0000
@@ -34,6 +34,14 @@
 GST_DEBUG_CATEGORY_STATIC (v4l2vo_debug);
 #define GST_CAT_DEFAULT v4l2vo_debug
 
+/* Those are deprecated calls that have been replaced */
+#ifndef V4L2_CID_HCENTER
+#define V4L2_CID_HCENTER V4L2_CID_PAN_RESET
+#endif
+#ifndef V4L2_CID_VCENTER
+#define V4L2_CID_VCENTER V4L2_CID_TILT_RESET
+#endif
+
 void
 gst_v4l2_video_orientation_interface_init (GstVideoOrientationInterface * klass)
 {
Index: v4l2_calls.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-good/sys/v4l2/v4l2_calls.c,v
retrieving revision 1.44
diff -u -p -u -p -r1.44 v4l2_calls.c
--- v4l2_calls.c	31 Jan 2008 16:12:28 -0000	1.44
+++ v4l2_calls.c	2 Jun 2008 20:29:15 -0000
@@ -45,6 +45,14 @@
 
 #include "gstv4l2src.h"
 
+/* Those are ioctl calls */
+#ifndef V4L2_CID_HCENTER
+#define V4L2_CID_HCENTER V4L2_CID_HCENTER_DEPRECATED
+#endif
+#ifndef V4L2_CID_VCENTER
+#define V4L2_CID_VCENTER V4L2_CID_VCENTER_DEPRECATED
+#endif
+
 GST_DEBUG_CATEGORY_EXTERN (v4l2_debug);
 #define GST_CAT_DEFAULT v4l2_debug
 
@@ -267,6 +275,8 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l
       case V4L2_CID_VFLIP:
       case V4L2_CID_HCENTER:
       case V4L2_CID_VCENTER:
+      case V4L2_CID_PAN_RESET:
+      case V4L2_CID_TILT_RESET:
         /* not handled here, handled by VideoOrientation interface */
         control.id++;
         break;


Index: gstreamer-plugins-good.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gstreamer-plugins-good/F-9/gstreamer-plugins-good.spec,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- gstreamer-plugins-good.spec	3 Jun 2008 18:35:00 -0000	1.60
+++ gstreamer-plugins-good.spec	19 Jun 2008 18:20:31 -0000	1.61
@@ -6,14 +6,18 @@
 
 Name: 		%{gstreamer}-plugins-good
 Version: 	0.10.8
-Release:  	5%{?dist}
+Release:  	7%{?dist}
 Summary: 	GStreamer plug-ins with good code and licensing
 
 Group: 		Applications/Multimedia
-License: 	LGPL
+License: 	LGPLv2+
 URL:		http://gstreamer.freedesktop.org/
 Source:         http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-%{version}.tar.bz2
 Patch0:		gst-plugins-good-0.10.8-docs.patch
+# http://bugzilla.gnome.org/show_bug.cgi?id=536317
+Patch1:		gst-plugins-good-v4l2-new-kernel.patch
+# bug #451391
+Patch2:		gst-plugins-good-0.10.8-speex-nego.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 Requires: 	%{gstreamer} >= %{_gst}
@@ -94,6 +98,10 @@
 %prep
 %setup -q -n gst-plugins-good-%{version}
 %patch0 -p1 -b .docs
+pushd sys/v4l2
+%patch1 -p0 -b .new-kernel
+popd
+%patch2 -p1 -b .speex-nego
 
 %build
 
@@ -103,7 +111,7 @@
   --disable-gtkdoc \
   --enable-experimental \
   --enable-ladspa \
-  --with-default-visualizer=goom
+  --with-default-visualizer=autoaudiosink
 
 make %{?_smp_mflags}
 pushd ext/ladspa
@@ -235,13 +243,23 @@
 gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/gstreamer-%{majorminor}.schemas > /dev/null || :
 
 %changelog
-* Tue Jun 03 2008 - Bastien Nocera <bnocera at redhat.com> - 0.10.8-4
-- Try to really fix that stupid sound output bug (#449268)
+* Thu Jun 19 2008 Adam Jackson <ajax at redhat.com> 0.10.8-7
+- gst-plugins-good-0.10.8-speex-nego.patch: Backport speex channel and
+  rate negotiation from 0.10.9. (#451391)
+
+* Tue Jun 17 2008 - Bastien Nocera <bnocera at redhat.com> - 0.10.8-6
+- Really fix the default audio output not being correct
 
-* Mon Jun 02 2008 - Bastien Nocera <bnocera at redhat.com> - 0.10.8-3
+* Tue Jun 03 2008 - Bastien Nocera <bnocera at redhat.com> - 0.10.8-5
+- Fix compilation of the v4l2 plugin with newer kernels
+
+* Mon Jun 02 2008 - Bastien Nocera <bnocera at redhat.com> - 0.10.8-4
 - Work-around bug that would set the default audio output to "GOOM!"
   See http://bugzilla.gnome.org/show_bug.cgi?id=532295
 
+* Wed May 21 2008 Tom "spot" Callaway <tcallawa at redhat.com> 0.10.8-3
+- fix license tag
+
 * Wed May 21 2008 Adam Jackson <ajax at redhat.com> 0.10.8-2
 - BR: libsoup-devel and package the soup http src plugin. (#447604)
 - s/Fedora Core/Fedora/




More information about the fedora-extras-commits mailing list