Add uid/euid to macOS debug message.
[dcpomatic.git] / src / lib / ffmpeg.h
index b0769971e3e9c9f00f4812c51b3333badd6654f8..59b2dedd5bd5d05998b67e1485f33ec33d2c2a3c 100644 (file)
@@ -75,11 +75,14 @@ protected:
 
        AVFormatContext* _format_context = nullptr;
        std::vector<AVCodecContext*> _codec_context;
-       AVFrame* _frame = nullptr;
 
+       /** AVFrame used for decoding video */
+       AVFrame* _video_frame = nullptr;
        /** Index of video stream within AVFormatContext */
        boost::optional<int> _video_stream;
 
+       AVFrame* audio_frame (std::shared_ptr<const FFmpegAudioStream> stream);
+
        /* It would appear (though not completely verified) that one must have
           a mutex around calls to avcodec_open* and avcodec_close... and here
           it is.
@@ -92,6 +95,9 @@ private:
 
        static void ffmpeg_log_callback (void* ptr, int level, const char* fmt, va_list vl);
        static std::weak_ptr<Log> _ffmpeg_log;
+
+       /** AVFrames used for decoding audio streams; accessed with audio_frame() */
+       std::map<std::shared_ptr<const FFmpegAudioStream>, AVFrame*> _audio_frame;
 };