summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_encoder.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2017-05-11 00:46:18 +0100
committerCarl Hetherington <cth@carlh.net>2017-05-11 00:46:18 +0100
commitd628ed776e3ca94b154980e962b1c4a0a8f7540c (patch)
tree14e2b9cb827b6dff81866437c43ef0271987083b /src/lib/ffmpeg_encoder.h
parent6b9c53001a63342a86899c60779a96edf96f369a (diff)
Basic audio support.
Diffstat (limited to 'src/lib/ffmpeg_encoder.h')
-rw-r--r--src/lib/ffmpeg_encoder.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/lib/ffmpeg_encoder.h b/src/lib/ffmpeg_encoder.h
index b5715e514..c7929c54f 100644
--- a/src/lib/ffmpeg_encoder.h
+++ b/src/lib/ffmpeg_encoder.h
@@ -52,12 +52,23 @@ private:
void audio (boost::shared_ptr<AudioBuffers>, DCPTime);
void subtitle (PlayerSubtitles, DCPTimePeriod);
- AVCodecContext* _codec_context;
+ void setup_video ();
+ void setup_audio ();
+
+ void audio_frame (int size);
+
+ AVCodec* _video_codec;
+ AVCodecContext* _video_codec_context;
+ AVCodec* _audio_codec;
+ AVCodecContext* _audio_codec_context;
AVFormatContext* _format_context;
AVStream* _video_stream;
+ AVStream* _audio_stream;
AVPixelFormat _pixel_format;
- AVDictionary* _options;
- std::string _codec_name;
+ AVSampleFormat _sample_format;
+ AVDictionary* _video_options;
+ std::string _video_codec_name;
+ std::string _audio_codec_name;
mutable boost::mutex _mutex;
DCPTime _last_time;
@@ -65,6 +76,11 @@ private:
EventHistory _history;
boost::filesystem::path _output;
+
+ boost::shared_ptr<AudioBuffers> _pending_audio;
+
+ static int _video_stream_index;
+ static int _audio_stream_index;
};
#endif