X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fffmpeg_file_encoder.h;h=78840d6a82ef9091de6f5b2baca8c1754dd7feea;hb=1b8deeaaaeb80b64bed4e61f05086a3326c104e1;hp=fc2b5c654217f8b9963bae8d2b6d7695da29c198;hpb=3c29aa6531a4046a8db72dcac81189eb8893233c;p=dcpomatic.git diff --git a/src/lib/ffmpeg_file_encoder.h b/src/lib/ffmpeg_file_encoder.h index fc2b5c654..78840d6a8 100644 --- a/src/lib/ffmpeg_file_encoder.h +++ b/src/lib/ffmpeg_file_encoder.h @@ -24,8 +24,10 @@ #include "audio_mapping.h" +#include "dcpomatic_time.h" #include "encoder.h" #include "event_history.h" +#include "image_store.h" #include "log.h" #include #include @@ -40,6 +42,15 @@ LIBDCP_ENABLE_WARNINGS class ExportAudioStream; +enum class ExportFormat +{ + PRORES_4444, + PRORES_HQ, + H264_AAC, + SUBTITLES_DCP +}; + + class FFmpegFileEncoder { public: @@ -70,9 +81,6 @@ private: void audio_frame (int size); - static void buffer_free(void* opaque, uint8_t* data); - void buffer_free2(uint8_t* data); - AVCodec const * _video_codec = nullptr; AVCodecContext* _video_codec_context = nullptr; std::vector> _audio_streams; @@ -95,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;