X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Faudio_encoder.h;h=ca2634fe62df2cd2f0bc311a4112b52e44415cd6;hb=e2b654d6a8cc8c64142a9a8ef8bcd82e9d9a9289;hp=d28d7eee3c04ff1d0ee89ac38e62cdae22260402;hpb=eeda8995329601f9f4e35047358400833eeae68e;p=nageru diff --git a/nageru/audio_encoder.h b/nageru/audio_encoder.h index d28d7ee..ca2634f 100644 --- a/nageru/audio_encoder.h +++ b/nageru/audio_encoder.h @@ -11,7 +11,7 @@ extern "C" { #include #include -#include +#include #include } @@ -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; };