summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-06-10 20:05:23 +0200
committerCarl Hetherington <cth@carlh.net>2025-06-14 22:57:00 +0200
commit692afb53d5a844fde41d0d6633feaf347d28fd24 (patch)
tree4a8ce4721df0aaef136a62763e05bb162e149c70 /src/lib
parentff0a329bf4e4527dcdda1b7fab9a592a2c8dbce5 (diff)
Move Behaviour enum out to types.h
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/butler.h5
-rw-r--r--src/lib/ffmpeg_film_encoder.cc4
-rw-r--r--src/lib/types.h5
3 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/butler.h b/src/lib/butler.h
index d85ec90f4..a4c946491 100644
--- a/src/lib/butler.h
+++ b/src/lib/butler.h
@@ -85,11 +85,6 @@ public:
std::string summary() const;
};
- enum class Behaviour {
- BLOCKING,
- NON_BLOCKING
- };
-
std::pair<std::shared_ptr<PlayerVideo>, dcpomatic::DCPTime> get_video(Behaviour behaviour, Error* e = nullptr);
boost::optional<dcpomatic::DCPTime> get_audio(Behaviour behaviour, float* out, Frame frames);
boost::optional<TextRingBuffers::Data> get_closed_caption();
diff --git a/src/lib/ffmpeg_film_encoder.cc b/src/lib/ffmpeg_film_encoder.cc
index f07d6be66..2e3bb1bec 100644
--- a/src/lib/ffmpeg_film_encoder.cc
+++ b/src/lib/ffmpeg_film_encoder.cc
@@ -189,7 +189,7 @@ FFmpegFilmEncoder::go()
for (int j = 0; j < gets_per_frame; ++j) {
Butler::Error e;
- auto video = _butler.get_video(Butler::Behaviour::BLOCKING, &e);
+ auto video = _butler.get_video(Behaviour::BLOCKING, &e);
_butler.rethrow();
if (video.first) {
auto fe = encoder->get(video.first->eyes());
@@ -217,7 +217,7 @@ FFmpegFilmEncoder::go()
waker.nudge ();
- _butler.get_audio(Butler::Behaviour::BLOCKING, interleaved.data(), audio_frames);
+ _butler.get_audio(Behaviour::BLOCKING, interleaved.data(), audio_frames);
/* XXX: inefficient; butler interleaves and we deinterleave again */
float* p = interleaved.data();
for (int j = 0; j < audio_frames; ++j) {
diff --git a/src/lib/types.h b/src/lib/types.h
index f6b0fb3be..35260cce5 100644
--- a/src/lib/types.h
+++ b/src/lib/types.h
@@ -152,4 +152,9 @@ enum class EmailProtocol {
};
+enum class Behaviour {
+ BLOCKING,
+ NON_BLOCKING
+};
+
#endif