mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
vorbis: Add official 6.1 and 7.1 channel mappings
These are in the Vorbis spec since 2010-01-13. Fixes bug #606926.
This commit is contained in:
parent
0994a5bff3
commit
68c6ddc2fc
2 changed files with 21 additions and 26 deletions
|
@ -606,19 +606,16 @@ vorbis_handle_identification_packet (GstVorbisDec * vd)
|
||||||
pos = pos6;
|
pos = pos6;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* FIXME: for >6 channels the layout is not defined by the Vorbis
|
/* 6.1 and 7.1 are in the Vorbis spec since 2010-01-13 */
|
||||||
* spec. These are the gstreamer "defaults" for 7/8 channels and
|
|
||||||
* NONE layouts for more channels
|
|
||||||
*/
|
|
||||||
case 7:{
|
case 7:{
|
||||||
static const GstAudioChannelPosition pos7[] = {
|
static const GstAudioChannelPosition pos7[] = {
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
||||||
GST_AUDIO_CHANNEL_POSITION_LFE,
|
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT,
|
||||||
GST_AUDIO_CHANNEL_POSITION_REAR_CENTER,
|
GST_AUDIO_CHANNEL_POSITION_REAR_CENTER,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_LFE
|
||||||
};
|
};
|
||||||
pos = pos7;
|
pos = pos7;
|
||||||
/* fallthrough */
|
/* fallthrough */
|
||||||
|
@ -626,13 +623,13 @@ vorbis_handle_identification_packet (GstVorbisDec * vd)
|
||||||
case 8:{
|
case 8:{
|
||||||
static const GstAudioChannelPosition pos8[] = {
|
static const GstAudioChannelPosition pos8[] = {
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
||||||
GST_AUDIO_CHANNEL_POSITION_LFE,
|
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
||||||
GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
|
GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
|
||||||
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT,
|
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_LFE
|
||||||
};
|
};
|
||||||
|
|
||||||
pos = pos8;
|
pos = pos8;
|
||||||
|
|
|
@ -259,25 +259,23 @@ static const GstAudioChannelPosition vorbischannelpositions[][8] = {
|
||||||
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
|
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
|
||||||
GST_AUDIO_CHANNEL_POSITION_LFE,
|
GST_AUDIO_CHANNEL_POSITION_LFE,
|
||||||
},
|
},
|
||||||
{ /* Not defined by spec, GStreamer default */
|
{ /* 6.1 Surround, in Vorbis spec since 2010-01-13 */
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
||||||
GST_AUDIO_CHANNEL_POSITION_LFE,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_REAR_CENTER,
|
|
||||||
},
|
|
||||||
{ /* Not defined by spec, GStreamer default */
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
||||||
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_LFE,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
|
GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
|
||||||
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT,
|
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT,
|
||||||
},
|
GST_AUDIO_CHANNEL_POSITION_REAR_CENTER,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_LFE},
|
||||||
|
{ /* 7.1 Surround, in Vorbis spec since 2010-01-13 */
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_LFE},
|
||||||
};
|
};
|
||||||
|
|
||||||
static GstCaps *
|
static GstCaps *
|
||||||
|
|
Loading…
Reference in a new issue