X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Faudio_encoder.h;h=ca2634fe62df2cd2f0bc311a4112b52e44415cd6;hb=8781ee96803331bbfc6d5e4d8d006a215261baea;hp=93adbafce954d6188f3d5ca86770ff7dace53f6c;hpb=392f9d1ccb835c05a3874c4bea163788b2c37024;p=nageru diff --git a/nageru/audio_encoder.h b/nageru/audio_encoder.h index 93adbaf..ca2634f 100644 --- a/nageru/audio_encoder.h +++ b/nageru/audio_encoder.h @@ -11,11 +11,11 @@ extern "C" { #include #include -#include +#include #include } -#include "ffmpeg_raii.h" +#include "shared/ffmpeg_raii.h" class Mux; @@ -30,6 +30,7 @@ public: void encode_audio(const std::vector &audio, int64_t audio_pts); void encode_last_audio(); + const AVCodec *get_codec() const { return ctx->codec; } AVCodecParametersWithDeleter get_codec_parameters(); private: @@ -39,7 +40,7 @@ private: int64_t last_pts = 0; // The first pts after all audio we've encoded. AVCodecContext *ctx; - AVAudioResampleContext *resampler; + SwrContext *resampler; AVFrame *audio_frame = nullptr; std::vector muxes; };