The recently added gstreamer plugin for OSS4 has problems handling the
value returned by SNDCTL_MIX_READ for control type MIXT_MONOSLIDER16 (and I suspect MIXT_MONOSLIDER). See attached extract of oss4_mixer.log This appears to be caused by stereo values being returned by SNDCTL_MIX_READ for these control types. The OSS v4 Programmer's guide is not explicit in this situation stating only that: "The current value of the mixer control will be returned in the value field". This is elaborated on in the next section on scaling but does not discuss differences between values returned by mono and stereo controls (or is this because they are treated identically). Perhaps this should be filed as a bug report but I am mindful of getting into the not uncommon situation where two projects claim that it is the other projects responsibility. A quick fix in the form of a patch for gstreamer-plugins-bad is attached. Whether this is the correct solution for this problem depends on if the values being returned by SNDCTL_MIX_READ are correct. OSS project please clarify. Kind regards, Clive 0:00:26.238536358 29311 0x8055488 LOG oss4mixer oss4-mixer.c:637:gst_oss4_mixer_get_control_val:<oss4mixer0> got value 0x00be00be from vmix0-vol) 0:00:26.238654023 29311 0x8055488 LOG oss4mixer oss4-mixer-slider.c:141:gst_oss4_mixer_slider_get_volume:<GstOss4MixerSlider@0x814a320> volume: mono=12452030 diff -uar gst-plugins-bad/sys/oss4.bak/oss4-mixer-slider.c gst-plugins-bad/sys/oss4/oss4-mixer-slider.c --- gst-plugins-bad/sys/oss4.bak/oss4-mixer-slider.c 2008-05-08 13:41:58.000000000 +0100 +++ gst-plugins-bad/sys/oss4/oss4-mixer-slider.c 2008-05-08 13:47:27.000000000 +0100 @@ -96,15 +96,15 @@ val = (guint32) v; switch (s->mc->mixext.type) { - case MIXT_MONOSLIDER: - case MIXT_MONOSLIDER16: case MIXT_SLIDER: volumes[0] = val; break; + case MIXT_MONOSLIDER: case MIXT_STEREOSLIDER: volumes[0] = (val & 0x00ff); volumes[1] = (val & 0xff00) >> 8; break; + case MIXT_MONOSLIDER16: case MIXT_STEREOSLIDER16: volumes[0] = (val & 0x0000ffff); volumes[1] = (val & 0xffff0000) >> 16; ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
On Thu, 2008-05-08 at 14:14 +0100, Clive Wright wrote:
Hi Clive, > The recently added gstreamer plugin for OSS4 has problems handling the > value returned by SNDCTL_MIX_READ for control type MIXT_MONOSLIDER16 > (and I suspect MIXT_MONOSLIDER). > > See attached extract of oss4_mixer.log > > This appears to be caused by stereo values being returned by > SNDCTL_MIX_READ for these control types. Yes, you're right. I've seen this too. > The OSS v4 Programmer's guide is not explicit in this situation (...) > > Perhaps this should be filed as a bug report but I am mindful of getting > into the not uncommon situation where two projects claim that it is the > other projects responsibility. Well, in general we prefer patches to be submitted via bugzilla [0]. I like to think most of us are reasonable people most of the time and can't really remember too many occasions where inter-project blame-gaming led to a bug left unfixed. In any case, I don't know if this is intentional on OSS's part or not (it seems not though, since at least ossmix writes values as single values instead of mirroring the single mono value in the upper bits), but I don't see why we shouldn't work around it. > A quick fix in the form of a patch for gstreamer-plugins-bad is attached. This is ok in principle, only that the volume[1] might cause bad memory access for mono sliders, since the caller will only pass in an array with space for one channel. I've committed a slightly modified version. I hope it works. If not, please open a bug in bugzilla, thanks! Cheers -Tim [0] http://gstreamer.freedesktop.org/wiki/SubmittingPatches ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |