diff options
Diffstat (limited to 'src/lib/j2k_wav_encoder.h')
| -rw-r--r-- | src/lib/j2k_wav_encoder.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/lib/j2k_wav_encoder.h b/src/lib/j2k_wav_encoder.h index 1c2f50065..e11358c2c 100644 --- a/src/lib/j2k_wav_encoder.h +++ b/src/lib/j2k_wav_encoder.h @@ -26,6 +26,11 @@ #include <boost/thread/condition.hpp> #include <boost/thread/mutex.hpp> #include <boost/thread.hpp> +#ifdef HAVE_SWRESAMPLE +extern "C" { +#include <libswresample/swresample.h> +} +#endif #include <sndfile.h> #include "encoder.h" @@ -43,17 +48,22 @@ public: J2KWAVEncoder (boost::shared_ptr<const FilmState>, boost::shared_ptr<const Options>, Log *); ~J2KWAVEncoder (); - void process_begin (); + void process_begin (int64_t audio_channel_layout, AVSampleFormat audio_sample_format); void process_video (boost::shared_ptr<Image>, int); void process_audio (uint8_t *, int); void process_end (); -private: +private: + void write_audio (uint8_t* data, int size); void encoder_thread (ServerDescription *); void close_sound_files (); void terminate_worker_threads (); +#if HAVE_SWRESAMPLE + SwrContext* _swr_context; +#endif + std::vector<SNDFILE*> _sound_files; int _deinterleave_buffer_size; uint8_t* _deinterleave_buffer; |
