Subsonic API: added bitDepth, samplingRate and channelCount, see https://github.com/opensubsonic/open-subsonic-api/pull/83

This commit is contained in:
emeric
2024-04-14 16:17:45 +02:00
parent b23f38facf
commit 0cda12a8bf
19 changed files with 161 additions and 65 deletions
+3
View File
@@ -281,9 +281,12 @@ namespace lms::av
res.emplace();
res->index = streamIndex;
res->bitrate = static_cast<std::size_t>(avstream->codecpar->bit_rate);
res->bitsPerSample = static_cast<std::size_t>(avstream->codecpar->bits_per_coded_sample);
res->channelCount = static_cast<std::size_t>(avstream->codecpar->ch_layout.nb_channels);
res->codec = avcodecToDecodingCodec(avstream->codecpar->codec_id);
res->codecName = ::avcodec_get_name(avstream->codecpar->codec_id);
assert(!res->codecName.empty()); // doc says it is never NULL
res->sampleRate = static_cast<std::size_t>(avstream->codecpar->sample_rate);
return res;
}