Skip to content
Snippets Groups Projects
Commit f4561667 authored by Adrien Béraud's avatar Adrien Béraud Committed by Adrien Béraud
Browse files

media codec: add codec preferred format

This allows to support floating point encoding with opus.
Unused for now.

Change-Id: I5af298c8febdc24da6d30c7047301aae0038cdc0
parent 1fabc1b6
Branches
Tags
No related merge requests found
......@@ -80,7 +80,8 @@ SystemAudioCodecInfo::SystemAudioCodecInfo(unsigned codecId,
unsigned m_bitrate,
unsigned m_sampleRate,
unsigned m_nbChannels,
unsigned m_payloadType)
unsigned m_payloadType,
AVSampleFormat sampleFormat)
: SystemCodecInfo(codecId,
m_avcodecId,
longName,
......@@ -90,7 +91,7 @@ SystemAudioCodecInfo::SystemAudioCodecInfo(unsigned codecId,
m_type,
m_bitrate,
m_payloadType)
, audioformat {m_sampleRate, m_nbChannels}
, audioformat {m_sampleRate, m_nbChannels, sampleFormat}
{}
SystemAudioCodecInfo::~SystemAudioCodecInfo() {}
......
......@@ -132,7 +132,8 @@ struct SystemAudioCodecInfo : SystemCodecInfo
unsigned bitrate = 0,
unsigned sampleRate = 0,
unsigned nbChannels = 0,
unsigned payloadType = 0);
unsigned payloadType = 0,
AVSampleFormat sampleFormat = AV_SAMPLE_FMT_S16);
~SystemAudioCodecInfo();
......
......@@ -121,7 +121,8 @@ SystemCodecContainer::initCodecConfig()
0,
48000,
2,
104),
104,
AV_SAMPLE_FMT_FLT),
std::make_shared<SystemAudioCodecInfo>(AV_CODEC_ID_ADPCM_G722,
AV_CODEC_ID_ADPCM_G722,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment