GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
GST_AUDIO_CHANNEL_POSITION_LFE},
};
+
+const char *gst_opus_channel_names[] = {
+ "mono",
+ "front left",
+ "front right",
+ "rear center",
+ "rear left",
+ "rear right",
+ "lfe",
+ "front center",
+ "front left of center",
+ "front right of center",
+ "side left",
+ "side right",
+ "none"
+};
GstAudioChannelPosition pos = GST_AUDIO_INFO_POSITION (info, n);
int c;
- GST_DEBUG_OBJECT (enc, "Channel %d has position %d", n, pos);
+ GST_DEBUG_OBJECT (enc, "Channel %d has position %d (%s)", n, pos,
+ gst_opus_channel_names[pos]);
for (c = 0; c < enc->n_channels; ++c) {
if (gst_opus_channel_positions[enc->n_channels - 1][c] == pos) {
GST_DEBUG_OBJECT (enc, "Found in Vorbis mapping as channel %d", c);
if (c == enc->n_channels) {
/* We did not find that position, so use undefined */
GST_WARNING_OBJECT (enc,
- "Position %d not found in Vorbis mapping, using unknown mapping",
- pos);
+ "Position %d (%s) not found in Vorbis mapping, using unknown mapping",
+ pos, gst_opus_channel_positions[pos]);
enc->channel_mapping_family = 255;
return;
}
- GST_DEBUG_OBJECT (enc, "Mapping output channel %d to %d", c, n);
+ GST_DEBUG_OBJECT (enc, "Mapping output channel %d to %d (%s)", c, n,
+ gst_opus_channel_names[pos]);
enc->channel_mapping[c] = n;
}
GST_INFO_OBJECT (enc, "Permutation found, using Vorbis mapping");