projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add AudioMapping::take_from().
[dcpomatic.git]
/
src
/
lib
/
ffmpeg_decoder.h
diff --git
a/src/lib/ffmpeg_decoder.h
b/src/lib/ffmpeg_decoder.h
index ce2476fb03b5bf6e1903ffe0de43c6cc33394b8e..bd4b74f88395ddfbb9461ffbcfbd515632fac017 100644
(file)
--- a/
src/lib/ffmpeg_decoder.h
+++ b/
src/lib/ffmpeg_decoder.h
@@
-27,7
+27,7
@@
#include "bitmap_text.h"
#include "decoder.h"
#include "ffmpeg.h"
#include "bitmap_text.h"
#include "decoder.h"
#include "ffmpeg.h"
-#include "
util
.h"
+#include "
video_filter_graph_set
.h"
extern "C" {
#include <libavcodec/avcodec.h>
}
extern "C" {
#include <libavcodec/avcodec.h>
}
@@
-57,9
+57,12
@@
public:
private:
friend struct ::ffmpeg_pts_offset_test;
private:
friend struct ::ffmpeg_pts_offset_test;
- bool flush ();
+ enum class FlushResult {
+ DONE,
+ AGAIN
+ };
-
static std::shared_ptr<AudioBuffers> deinterleave_audio (AVFrame* frame
);
+
FlushResult flush(
);
AVSampleFormat audio_sample_format (std::shared_ptr<FFmpegAudioStream> stream) const;
int bytes_per_audio_sample (std::shared_ptr<FFmpegAudioStream> stream) const;
AVSampleFormat audio_sample_format (std::shared_ptr<FFmpegAudioStream> stream) const;
int bytes_per_audio_sample (std::shared_ptr<FFmpegAudioStream> stream) const;
@@
-78,8
+81,10
@@
private:
void maybe_add_subtitle ();
void maybe_add_subtitle ();
- std::list<std::shared_ptr<VideoFilterGraph>> _filter_graphs;
- boost::mutex _filter_graphs_mutex;
+ FlushResult flush_codecs();
+ FlushResult flush_fill();
+
+ VideoFilterGraphSet _filter_graphs;
dcpomatic::ContentTime _pts_offset;
boost::optional<dcpomatic::ContentTime> _current_subtitle_to;
dcpomatic::ContentTime _pts_offset;
boost::optional<dcpomatic::ContentTime> _current_subtitle_to;
@@
-89,4
+94,12
@@
private:
std::shared_ptr<Image> _black_image;
std::map<std::shared_ptr<FFmpegAudioStream>, boost::optional<dcpomatic::ContentTime>> _next_time;
std::shared_ptr<Image> _black_image;
std::map<std::shared_ptr<FFmpegAudioStream>, boost::optional<dcpomatic::ContentTime>> _next_time;
+
+ enum class FlushState {
+ CODECS,
+ AUDIO_DECODER,
+ FILL,
+ };
+
+ FlushState _flush_state = FlushState::CODECS;
};
};