[gstreamer-bugs] [Bug 590361] New: vorbisenc caps are ordered improperly

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Fri Jul 31 04:26:12 PDT 2009


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=590361

  GStreamer | gst-plugins-base | Ver: git
           Summary: vorbisenc caps are ordered improperly
           Product: GStreamer
           Version: git
          Platform: Other
        OS/Version: All
            Status: UNCONFIRMED
          Severity: minor
          Priority: Normal
         Component: gst-plugins-base
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: lrn1986 at gmail.com
         QAContact: gstreamer-bugs at lists.sourceforge.net
     GNOME version: Unspecified
   GNOME milestone: Unspecified


First structure of the caps should be the preferable one. Vorbisenc however
specifies its first structure as
  gst_caps_append_structure (caps, gst_structure_new ("audio/x-raw-float",
          "rate", GST_TYPE_INT_RANGE, 1, 200000,
          "channels", G_TYPE_INT, 1,
          "endianness", G_TYPE_INT, G_BYTE_ORDER, "width", G_TYPE_INT, 32,
          NULL));
Because of that some elements (namely a52dec) pick first structure to work
with, thinking that vorbisenc prefers mono (and because they are able to
convert anything to mono, making it compatible).
If vorbisenc have had its 8-channel structure first, 7-channel structure second
etc, any element would have picked the highest channel count compatible with
its natural channel count. For this to happen elements (namely a52dec) should
iterate over structures in the caps until they find a structure that is
compatible (can be used without upmixing). Elements should not use 
gst_structure_fixate_field_nearest_int() with structure's channel count and
natural channel count, because this way they would pick 8-channel structure as
compatible, if natural channel count is less than 8 (fixating to natural
channel count), which is OK in terms of channel count, but may lead them into
picking wrong channel layout designed for 8-channel audio (the exact result
depends on how gst_audio_fixate_channel_positions() would work in situations
when channel count does not match channel-positions).
There's also a channels=[9,256] structure, and it should be the last one.


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=590361.




More information about the Gstreamer-bugs mailing list