summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2004-05-17 17:31:48 +0000
committerBenjamin Otte <otte@gnome.org>2004-05-17 17:31:48 +0000
commiteb3614aa7292391c9edba22cd775d69d81a401a8 (patch)
tree16cfc00117bac0fb400d31c718ccccfdaaedf890
parentf0b81fa053f978bf45ca63135c98e32f1be72679 (diff)
ext/shout2/gstshout2.c: Guimond, fixes #142432)
Original commit message from CVS: * ext/shout2/gstshout2.c: use application/ogg instead of application/x-ogg (patch by Patrick Guimond, fixes #142432) * sys/oss/gstosselement.c: (gst_osselement_reset), (gst_osselement_sync_parms): don't set fragment size unless specified
-rw-r--r--ChangeLog9
-rw-r--r--ext/shout2/gstshout2.c2
-rw-r--r--sys/oss/gstosselement.c22
3 files changed, 27 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 54fff9e0..5e4fac2e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2004-05-17 Benjamin Otte <in7y118@public.uni-hamburg.de>
+
+ * ext/shout2/gstshout2.c:
+ use application/ogg instead of application/x-ogg (patch by Patrick
+ Guimond, fixes #142432)
+ * sys/oss/gstosselement.c: (gst_osselement_reset),
+ (gst_osselement_sync_parms):
+ don't set fragment size unless specified
+
2004-05-17 Stephane Loeuillet <stephane.loeuillet@tiscali.fr>
* configure.ac : fix compilation of v4l2src with "-Wall -Werror"
diff --git a/ext/shout2/gstshout2.c b/ext/shout2/gstshout2.c
index 1383df14..423131b5 100644
--- a/ext/shout2/gstshout2.c
+++ b/ext/shout2/gstshout2.c
@@ -61,7 +61,7 @@ enum
static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS ("application/x-ogg; "
+ GST_STATIC_CAPS ("application/ogg; "
"audio/mpeg, mpegversion = (int) 1, layer = (int) [ 1, 3 ]")
);
diff --git a/sys/oss/gstosselement.c b/sys/oss/gstosselement.c
index a990c22c..2ce321b5 100644
--- a/sys/oss/gstosselement.c
+++ b/sys/oss/gstosselement.c
@@ -440,7 +440,7 @@ gst_osselement_reset (GstOssElement * oss)
oss->depth = 16;
oss->channels = 2;
oss->rate = 44100;
- oss->fragment = 6;
+ oss->fragment = 0;
oss->bps = 0;
/* AFMT_*_BE not available on all OSS includes (e.g. FBSD) */
@@ -585,21 +585,29 @@ gst_osselement_sync_parms (GstOssElement * oss)
gint target_format;
gint target_channels;
gint target_rate;
- gint fragscale, frag_ln;
+
+ /* gint fragscale, frag_ln; */
if (oss->fd == -1)
return FALSE;
- if (oss->fragment >> 16)
+ if ((oss->fragment & 0xFFFF) == 0) {
+ frag = 0;
+ } else if (oss->fragment >> 16) {
frag = oss->fragment;
- else
+ } else {
frag = 0x7FFF0000 | oss->fragment;
+ }
GST_INFO
("osselement: setting sound card to %dHz %d format %s (%08x fragment)",
oss->rate, oss->format, (oss->channels == 2) ? "stereo" : "mono", frag);
+ g_print
+ ("osselement: setting sound card to %dHz %d format %s (%08x fragment)\n",
+ oss->rate, oss->format, (oss->channels == 2) ? "stereo" : "mono", frag);
- ioctl (oss->fd, SNDCTL_DSP_SETFRAGMENT, &frag);
+ if (frag)
+ ioctl (oss->fd, SNDCTL_DSP_SETFRAGMENT, &frag);
ioctl (oss->fd, SNDCTL_DSP_RESET, 0);
target_format = oss->format;
@@ -618,6 +626,9 @@ gst_osselement_sync_parms (GstOssElement * oss)
ioctl (oss->fd, SNDCTL_DSP_GETISPACE, &space);
}
+#if 0
+ /* FIXME: make the current fragment info available somehow
+ * the current way overrides preset values and that sucks */
/* calculate new fragment using a poor man's logarithm function */
fragscale = 1;
frag_ln = 0;
@@ -626,6 +637,7 @@ gst_osselement_sync_parms (GstOssElement * oss)
frag_ln++;
}
oss->fragment = space.fragstotal << 16 | frag_ln;
+#endif
GST_INFO ("osselement: set sound card to %dHz, %d format, %s "
"(%d bytes buffer, %08x fragment)",