// see the subtitle until the next frame.
#include <assert.h>
+#include <stddef.h>
#include <stdint.h>
+#include <time.h>
+
+#include <atomic>
+#include <chrono>
#include <functional>
#include <map>
#include <memory>
#include <set>
#include <string>
#include <thread>
+#include <vector>
#include <movit/effect.h>
#include <movit/ycbcr.h>
extern "C" {
+#include <libavutil/frame.h>
#include <libswresample/swresample.h>
+#include <libavutil/channel_layout.h>
#include <libavutil/pixfmt.h>
#include <libavutil/rational.h>
#include <libavutil/samplefmt.h>
struct AVFrame;
struct AVRational;
struct AVPacket;
+class QSurface;
class FFmpegCapture : public bmusb::CaptureInterface
{
public:
- FFmpegCapture(const std::string &filename, unsigned width, unsigned height);
+ FFmpegCapture(const std::string &filename, unsigned width, unsigned height, QSurface *surface);
#ifdef HAVE_SRT
// Takes ownership of the SRT client socket.
- FFmpegCapture(int srt_sock, const std::string &stream_id);
+ FFmpegCapture(int srt_sock, const std::string &stream_id, QSurface *surface);
#endif
~FFmpegCapture();
// Audio resampler.
SwrContext *resampler = nullptr;
AVSampleFormat last_src_format, last_dst_format;
- int64_t last_channel_layout;
+ AVChannelLayout last_channel_layout;
int last_sample_rate;
// Subtitles (no decoding done, really).
// -1 is strictly speaking outside the range of the enum, but hopefully, it will be alright.
AVColorSpace last_colorspace = static_cast<AVColorSpace>(-1);
AVChromaLocation last_chroma_location = static_cast<AVChromaLocation>(-1);
+ QSurface *const surface;
};
#endif // !defined(_FFMPEG_CAPTURE_H)