X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fffmpeg_file_encoder.h;h=78840d6a82ef9091de6f5b2baca8c1754dd7feea;hb=daf0a05178ac6370440594e124bc25162f053176;hp=8a727106a7fe44194ceb72b957ea0cff4b0ce7c7;hpb=33e13c4053138930f4b2f59349e441c76111059d;p=dcpomatic.git diff --git a/src/lib/ffmpeg_file_encoder.h b/src/lib/ffmpeg_file_encoder.h index 8a727106a..78840d6a8 100644 --- a/src/lib/ffmpeg_file_encoder.h +++ b/src/lib/ffmpeg_file_encoder.h @@ -23,20 +23,34 @@ #define DCPOMATIC_FFMPEG_FILE_ENCODER_H +#include "audio_mapping.h" +#include "dcpomatic_time.h" #include "encoder.h" #include "event_history.h" -#include "audio_mapping.h" +#include "image_store.h" #include "log.h" #include +#include +LIBDCP_DISABLE_WARNINGS extern "C" { #include #include } +LIBDCP_ENABLE_WARNINGS class ExportAudioStream; +enum class ExportFormat +{ + PRORES_4444, + PRORES_HQ, + H264_AAC, + SUBTITLES_DCP +}; + + class FFmpegFileEncoder { public: @@ -67,10 +81,7 @@ private: void audio_frame (int size); - static void buffer_free(void* opaque, uint8_t* data); - void buffer_free2(uint8_t* data); - - AVCodec* _video_codec = nullptr; + AVCodec const * _video_codec = nullptr; AVCodecContext* _video_codec_context = nullptr; std::vector> _audio_streams; bool _audio_stream_per_channel; @@ -92,11 +103,7 @@ private: std::shared_ptr _pending_audio; - /** Store of shared_ptr to keep them alive whilst raw pointers into - their data have been passed to FFmpeg. - */ - std::map> _pending_images; - boost::mutex _pending_images_mutex; + ImageStore _pending_images; static int _video_stream_index; static int _audio_stream_index_base;