mirror of
https://github.com/clangen/musikcube.git
synced 2025-03-14 13:21:13 +00:00
Renames for clarity.
This commit is contained in:
parent
21977bc601
commit
017b410f66
@ -314,7 +314,7 @@ bool FfmpegDecoder::Open(musik::core::sdk::IDataStream *stream) {
|
||||
|
||||
if (this->formatContext->iformat) {
|
||||
if (avformat_open_input(&this->formatContext, "", nullptr, nullptr) == 0) {
|
||||
resolved_avcodec_type* codec = nullptr;
|
||||
AVCodecCompat* codec = nullptr;
|
||||
if (avformat_find_stream_info(this->formatContext, nullptr) >= 0) {
|
||||
this->streamId = av_find_best_stream(
|
||||
this->formatContext,
|
||||
|
@ -53,9 +53,9 @@ extern "C" {
|
||||
#include <stddef.h>
|
||||
|
||||
#if LIBAVCODEC_VERSION_MAJOR >= 59
|
||||
using resolved_avcodec_type = const AVCodec;
|
||||
using AVCodecCompat = const AVCodec;
|
||||
#else
|
||||
using resolved_avcodec_type = AVCodec;
|
||||
using AVCodecCompat = AVCodec;
|
||||
#endif
|
||||
|
||||
using namespace musik::core::sdk;
|
||||
|
@ -89,7 +89,7 @@ static void logError(const std::string& message) {
|
||||
}
|
||||
}
|
||||
|
||||
static AVSampleFormat resolveSampleFormat(resolved_avcodec_type *codec) {
|
||||
static AVSampleFormat resolveSampleFormat(AVCodecCompat *codec) {
|
||||
if (!codec->sample_fmts) {
|
||||
return AV_SAMPLE_FMT_NONE;
|
||||
}
|
||||
@ -105,7 +105,7 @@ static AVSampleFormat resolveSampleFormat(resolved_avcodec_type *codec) {
|
||||
return codec->sample_fmts[0];
|
||||
}
|
||||
|
||||
static int resolveSampleRate(resolved_avcodec_type* codec, int preferredSampleRate) {
|
||||
static int resolveSampleRate(AVCodecCompat* codec, int preferredSampleRate) {
|
||||
const int *p;
|
||||
int highestRate = 0;
|
||||
if (!codec->supported_samplerates) {
|
||||
|
@ -56,9 +56,9 @@ extern "C" {
|
||||
}
|
||||
|
||||
#if LIBAVCODEC_VERSION_MAJOR >= 59
|
||||
using resolved_avcodec_type = const AVCodec;
|
||||
using AVCodecCompat = const AVCodec;
|
||||
#else
|
||||
using resolved_avcodec_type = AVCodec;
|
||||
using AVCodecCompat = AVCodec;
|
||||
#endif
|
||||
|
||||
class FfmpegEncoder : public musik::core::sdk::IBlockingEncoder {
|
||||
@ -91,7 +91,7 @@ class FfmpegEncoder : public musik::core::sdk::IBlockingEncoder {
|
||||
IDataStream* out;
|
||||
int readBufferSize;
|
||||
AVAudioFifo* outputFifo;
|
||||
resolved_avcodec_type* outputCodec;
|
||||
AVCodecCompat* outputCodec;
|
||||
AVCodecContext* outputContext;
|
||||
AVFormatContext* outputFormatContext;
|
||||
AVIOContext* ioContext;
|
||||
|
Loading…
x
Reference in New Issue
Block a user