gst_channel_to_ebur_channel(): handle new top-surround channels
These seem to have appeared in gstreamer 1.26, which is the version we need to use to guard the handling. These are effectively geometrically located on the same azimuth, but on the layer above than the non-top (i.e. middle layer) surround channels. But they are still surround channels, which ebur128 does not bias loudness-wise. At least this is my understanding.
This commit is contained in:
committed by
Jonas Kvinge
parent
2687dc31cc
commit
70b7c4560d
@@ -32,6 +32,7 @@
|
||||
#include <gst/gst.h>
|
||||
#include <gst/audio/audio-channels.h>
|
||||
#include <gst/app/gstappsink.h>
|
||||
#include <gst/pbutils/pbutils.h>
|
||||
#include <ebur128.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
@@ -89,6 +90,13 @@ channel gst_channel_to_ebur_channel(GstAudioChannelPosition pos) {
|
||||
case GST_AUDIO_CHANNEL_POSITION_SURROUND_RIGHT:
|
||||
return EBUR128_RIGHT_SURROUND;
|
||||
|
||||
#if (GST_PLUGINS_BASE_VERSION_MAJOR > 1 || (GST_PLUGINS_BASE_VERSION_MAJOR == 1 && GST_PLUGINS_BASE_VERSION_MINOR >= 26))
|
||||
case GST_AUDIO_CHANNEL_POSITION_TOP_SURROUND_LEFT:
|
||||
return EBUR128_LEFT_SURROUND;
|
||||
case GST_AUDIO_CHANNEL_POSITION_TOP_SURROUND_RIGHT:
|
||||
return EBUR128_RIGHT_SURROUND;
|
||||
#endif
|
||||
|
||||
case GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_CENTER:
|
||||
return EBUR128_Bp000;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user