- Player(JPEGFrameView *destination, bool also_output_to_stream);
-
- void play_clip(const Clip &clip, size_t clip_idx, unsigned stream_idx);
- void override_angle(unsigned stream_idx); // For the current clip only.
+ enum StreamOutput {
+ NO_STREAM_OUTPUT,
+ HTTPD_STREAM_OUTPUT, // Output to global_httpd.
+ FILE_STREAM_OUTPUT // Output to file_avctx.
+ };
+ Player(JPEGFrameView *destination, StreamOutput stream_output, AVFormatContext *file_avctx = nullptr);
+ ~Player();
+
+ struct ClipWithRow {
+ Clip clip;
+ size_t row; // Used for progress callback only.
+ };
+ void play(const Clip &clip)
+ {
+ play({ ClipWithRow{ clip, 0 } });
+ }
+ void play(const std::vector<ClipWithRow> &clips);
+ void override_angle(unsigned stream_idx); // Assumes one-clip playlist only.