+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"
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 ]")
);
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) */
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;
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;
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)",