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
No related tags found
No related merge requests found
...@@ -80,7 +80,8 @@ SystemAudioCodecInfo::SystemAudioCodecInfo(unsigned codecId, ...@@ -80,7 +80,8 @@ SystemAudioCodecInfo::SystemAudioCodecInfo(unsigned codecId,
unsigned m_bitrate, unsigned m_bitrate,
unsigned m_sampleRate, unsigned m_sampleRate,
unsigned m_nbChannels, unsigned m_nbChannels,
unsigned m_payloadType) unsigned m_payloadType,
AVSampleFormat sampleFormat)
: SystemCodecInfo(codecId, : SystemCodecInfo(codecId,
m_avcodecId, m_avcodecId,
longName, longName,
...@@ -90,7 +91,7 @@ SystemAudioCodecInfo::SystemAudioCodecInfo(unsigned codecId, ...@@ -90,7 +91,7 @@ SystemAudioCodecInfo::SystemAudioCodecInfo(unsigned codecId,
m_type, m_type,
m_bitrate, m_bitrate,
m_payloadType) m_payloadType)
, audioformat {m_sampleRate, m_nbChannels} , audioformat {m_sampleRate, m_nbChannels, sampleFormat}
{} {}
SystemAudioCodecInfo::~SystemAudioCodecInfo() {} SystemAudioCodecInfo::~SystemAudioCodecInfo() {}
......
...@@ -132,7 +132,8 @@ struct SystemAudioCodecInfo : SystemCodecInfo ...@@ -132,7 +132,8 @@ struct SystemAudioCodecInfo : SystemCodecInfo
unsigned bitrate = 0, unsigned bitrate = 0,
unsigned sampleRate = 0, unsigned sampleRate = 0,
unsigned nbChannels = 0, unsigned nbChannels = 0,
unsigned payloadType = 0); unsigned payloadType = 0,
AVSampleFormat sampleFormat = AV_SAMPLE_FMT_S16);
~SystemAudioCodecInfo(); ~SystemAudioCodecInfo();
......
...@@ -121,7 +121,8 @@ SystemCodecContainer::initCodecConfig() ...@@ -121,7 +121,8 @@ SystemCodecContainer::initCodecConfig()
0, 0,
48000, 48000,
2, 2,
104), 104,
AV_SAMPLE_FMT_FLT),
std::make_shared<SystemAudioCodecInfo>(AV_CODEC_ID_ADPCM_G722, std::make_shared<SystemAudioCodecInfo>(AV_CODEC_ID_ADPCM_G722,
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 to comment