mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 10:25:33 +00:00
rtp: fix compiler warnings with gcc-6
In file included from gstrtpL16depay.h:27:0, from gstrtp.c:73: gstrtpchannels.h:154:33: error: 'channel_orders' defined but not used [-Werror=unused-const-variable] static const GstRTPChannelOrder channel_orders[] =
This commit is contained in:
parent
7927f49ca0
commit
aeed2e550c
2 changed files with 148 additions and 146 deletions
|
@ -29,6 +29,152 @@
|
||||||
* implement a (very rough) approximation here.
|
* implement a (very rough) approximation here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
static const GstAudioChannelPosition pos_4_1[] = {
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT
|
||||||
|
};
|
||||||
|
|
||||||
|
static const GstAudioChannelPosition pos_4_2[] = {
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_LFE1
|
||||||
|
};
|
||||||
|
|
||||||
|
static const GstAudioChannelPosition pos_4_3[] = {
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_LFE1
|
||||||
|
};
|
||||||
|
|
||||||
|
static const GstAudioChannelPosition pos_5_1[] = {
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER
|
||||||
|
};
|
||||||
|
|
||||||
|
static const GstAudioChannelPosition pos_6_1[] = {
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_LFE1
|
||||||
|
};
|
||||||
|
|
||||||
|
static const GstAudioChannelPosition pos_6_2[] = {
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_LFE1,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT
|
||||||
|
};
|
||||||
|
|
||||||
|
static const GstAudioChannelPosition pos_8_1[] = {
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_LFE1,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT
|
||||||
|
};
|
||||||
|
|
||||||
|
static const GstAudioChannelPosition pos_8_2[] = {
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_LFE1,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT
|
||||||
|
};
|
||||||
|
|
||||||
|
static const GstAudioChannelPosition pos_8_3[] = {
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_LFE1,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT
|
||||||
|
};
|
||||||
|
|
||||||
|
static const GstAudioChannelPosition pos_def_1[] = {
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_MONO
|
||||||
|
};
|
||||||
|
|
||||||
|
static const GstAudioChannelPosition pos_def_2[] = {
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT
|
||||||
|
};
|
||||||
|
|
||||||
|
static const GstAudioChannelPosition pos_def_3[] = {
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER
|
||||||
|
};
|
||||||
|
|
||||||
|
static const GstAudioChannelPosition pos_def_4[] = {
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_LFE1
|
||||||
|
};
|
||||||
|
|
||||||
|
static const GstAudioChannelPosition pos_def_5[] = {
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT
|
||||||
|
};
|
||||||
|
|
||||||
|
static const GstAudioChannelPosition pos_def_6[] = {
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
||||||
|
GST_AUDIO_CHANNEL_POSITION_LFE1
|
||||||
|
};
|
||||||
|
|
||||||
|
const GstRTPChannelOrder gst_rtp_channel_orders[] = {
|
||||||
|
/* 4 channels */
|
||||||
|
{"DV.LRLsRs", 4, pos_4_1},
|
||||||
|
{"DV.LRCS", 4, pos_4_2},
|
||||||
|
{"DV.LRCWo", 4, pos_4_3},
|
||||||
|
/* 5 channels */
|
||||||
|
{"DV.LRLsRsC", 5, pos_5_1},
|
||||||
|
/* 6 channels */
|
||||||
|
{"DV.LRLsRsCS", 6, pos_6_1},
|
||||||
|
{"DV.LmixRmixTWoQ1Q2", 6, pos_6_2},
|
||||||
|
/* 8 channels */
|
||||||
|
{"DV.LRCWoLsRsLmixRmix", 8, pos_8_1},
|
||||||
|
{"DV.LRCWoLs1Rs1Ls2Rs2", 8, pos_8_2},
|
||||||
|
{"DV.LRCWoLsRsLcRc", 8, pos_8_3},
|
||||||
|
|
||||||
|
/* default layouts */
|
||||||
|
{NULL, 1, pos_def_1},
|
||||||
|
{NULL, 2, pos_def_2},
|
||||||
|
{NULL, 3, pos_def_3},
|
||||||
|
{NULL, 4, pos_def_4},
|
||||||
|
{NULL, 5, pos_def_5},
|
||||||
|
{NULL, 6, pos_def_6},
|
||||||
|
|
||||||
|
/* terminator, invalid entry */
|
||||||
|
{NULL, 0, NULL},
|
||||||
|
};
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
check_channels (const GstRTPChannelOrder * order,
|
check_channels (const GstRTPChannelOrder * order,
|
||||||
const GstAudioChannelPosition * pos)
|
const GstAudioChannelPosition * pos)
|
||||||
|
|
|
@ -32,152 +32,8 @@ typedef struct
|
||||||
const GstAudioChannelPosition *pos;
|
const GstAudioChannelPosition *pos;
|
||||||
} GstRTPChannelOrder;
|
} GstRTPChannelOrder;
|
||||||
|
|
||||||
static const GstAudioChannelPosition pos_4_1[] = {
|
#define channel_orders gst_rtp_channel_orders
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
G_GNUC_INTERNAL extern const GstRTPChannelOrder gst_rtp_channel_orders[];
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT
|
|
||||||
};
|
|
||||||
|
|
||||||
static const GstAudioChannelPosition pos_4_2[] = {
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_LFE1
|
|
||||||
};
|
|
||||||
|
|
||||||
static const GstAudioChannelPosition pos_4_3[] = {
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_LFE1
|
|
||||||
};
|
|
||||||
|
|
||||||
static const GstAudioChannelPosition pos_5_1[] = {
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER
|
|
||||||
};
|
|
||||||
|
|
||||||
static const GstAudioChannelPosition pos_6_1[] = {
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_LFE1
|
|
||||||
};
|
|
||||||
|
|
||||||
static const GstAudioChannelPosition pos_6_2[] = {
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_LFE1,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT
|
|
||||||
};
|
|
||||||
|
|
||||||
static const GstAudioChannelPosition pos_8_1[] = {
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_LFE1,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT
|
|
||||||
};
|
|
||||||
|
|
||||||
static const GstAudioChannelPosition pos_8_2[] = {
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_LFE1,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT
|
|
||||||
};
|
|
||||||
|
|
||||||
static const GstAudioChannelPosition pos_8_3[] = {
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_LFE1,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT
|
|
||||||
};
|
|
||||||
|
|
||||||
static const GstAudioChannelPosition pos_def_1[] = {
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_MONO
|
|
||||||
};
|
|
||||||
|
|
||||||
static const GstAudioChannelPosition pos_def_2[] = {
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT
|
|
||||||
};
|
|
||||||
|
|
||||||
static const GstAudioChannelPosition pos_def_3[] = {
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER
|
|
||||||
};
|
|
||||||
|
|
||||||
static const GstAudioChannelPosition pos_def_4[] = {
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_LFE1
|
|
||||||
};
|
|
||||||
|
|
||||||
static const GstAudioChannelPosition pos_def_5[] = {
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT
|
|
||||||
};
|
|
||||||
|
|
||||||
static const GstAudioChannelPosition pos_def_6[] = {
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
|
||||||
GST_AUDIO_CHANNEL_POSITION_LFE1
|
|
||||||
};
|
|
||||||
|
|
||||||
static const GstRTPChannelOrder channel_orders[] =
|
|
||||||
{
|
|
||||||
/* 4 channels */
|
|
||||||
{ "DV.LRLsRs", 4, pos_4_1 },
|
|
||||||
{ "DV.LRCS", 4, pos_4_2 },
|
|
||||||
{ "DV.LRCWo", 4, pos_4_3 },
|
|
||||||
/* 5 channels */
|
|
||||||
{ "DV.LRLsRsC", 5, pos_5_1 },
|
|
||||||
/* 6 channels */
|
|
||||||
{ "DV.LRLsRsCS", 6, pos_6_1 },
|
|
||||||
{ "DV.LmixRmixTWoQ1Q2", 6, pos_6_2 },
|
|
||||||
/* 8 channels */
|
|
||||||
{ "DV.LRCWoLsRsLmixRmix", 8, pos_8_1 },
|
|
||||||
{ "DV.LRCWoLs1Rs1Ls2Rs2", 8, pos_8_2 },
|
|
||||||
{ "DV.LRCWoLsRsLcRc", 8, pos_8_3 },
|
|
||||||
|
|
||||||
/* default layouts */
|
|
||||||
{ NULL, 1, pos_def_1 },
|
|
||||||
{ NULL, 2, pos_def_2 },
|
|
||||||
{ NULL, 3, pos_def_3 },
|
|
||||||
{ NULL, 4, pos_def_4 },
|
|
||||||
{ NULL, 5, pos_def_5 },
|
|
||||||
{ NULL, 6, pos_def_6 },
|
|
||||||
|
|
||||||
/* terminator, invalid entry */
|
|
||||||
{ NULL, 0, NULL },
|
|
||||||
};
|
|
||||||
|
|
||||||
const GstRTPChannelOrder * gst_rtp_channels_get_by_pos (gint channels,
|
const GstRTPChannelOrder * gst_rtp_channels_get_by_pos (gint channels,
|
||||||
const GstAudioChannelPosition *pos);
|
const GstAudioChannelPosition *pos);
|
||||||
|
|
Loading…
Reference in a new issue