Commit 29fe32be authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

RTP: set audio channels directly rather than channels count

parent 5f9d5c69
......@@ -33,6 +33,7 @@
#include <vlc_network.h>
#include <vlc_plugin.h>
#include <vlc_dialog.h>
#include <vlc_aout.h>
#include "rtp.h"
#ifdef HAVE_SRTP
......@@ -478,7 +479,8 @@ static void *pcmu_init (demux_t *demux)
es_format_Init (&fmt, AUDIO_ES, VLC_CODEC_MULAW);
fmt.audio.i_rate = 8000;
fmt.audio.i_channels = 1;
fmt.audio.i_original_channels =
fmt.audio.i_physical_channels = AOUT_CHAN_CENTER;
return codec_init (demux, &fmt);
}
......@@ -491,7 +493,8 @@ static void *gsm_init (demux_t *demux)
es_format_Init (&fmt, AUDIO_ES, VLC_CODEC_GSM);
fmt.audio.i_rate = 8000;
fmt.audio.i_channels = 1;
fmt.audio.i_original_channels =
fmt.audio.i_physical_channels = AOUT_CHAN_CENTER;
return codec_init (demux, &fmt);
}
......@@ -504,7 +507,8 @@ static void *pcma_init (demux_t *demux)
es_format_Init (&fmt, AUDIO_ES, VLC_CODEC_ALAW);
fmt.audio.i_rate = 8000;
fmt.audio.i_channels = 1;
fmt.audio.i_original_channels =
fmt.audio.i_physical_channels = AOUT_CHAN_CENTER;
return codec_init (demux, &fmt);
}
......@@ -517,7 +521,8 @@ static void *l16s_init (demux_t *demux)
es_format_Init (&fmt, AUDIO_ES, VLC_CODEC_S16B);
fmt.audio.i_rate = 44100;
fmt.audio.i_channels = 2;
fmt.audio.i_original_channels =
fmt.audio.i_physical_channels = AOUT_CHANS_STEREO;
return codec_init (demux, &fmt);
}
......@@ -527,7 +532,8 @@ static void *l16m_init (demux_t *demux)
es_format_Init (&fmt, AUDIO_ES, VLC_CODEC_S16B);
fmt.audio.i_rate = 44100;
fmt.audio.i_channels = 1;
fmt.audio.i_original_channels =
fmt.audio.i_physical_channels = AOUT_CHAN_CENTER;
return codec_init (demux, &fmt);
}
......@@ -540,7 +546,8 @@ static void *qcelp_init (demux_t *demux)
es_format_Init (&fmt, AUDIO_ES, VLC_CODEC_QCELP);
fmt.audio.i_rate = 8000;
fmt.audio.i_channels = 1;
fmt.audio.i_original_channels =
fmt.audio.i_physical_channels = AOUT_CHAN_CENTER;
return codec_init (demux, &fmt);
}
......@@ -552,7 +559,8 @@ static void *mpa_init (demux_t *demux)
es_format_t fmt;
es_format_Init (&fmt, AUDIO_ES, VLC_CODEC_MPGA);
fmt.audio.i_channels = 2;
fmt.audio.i_original_channels =
fmt.audio.i_physical_channels = AOUT_CHANS_STEREO;
fmt.b_packetized = false;
return codec_init (demux, &fmt);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment