#include "shared/timebase.h"
#include "print_latency.h"
#include "shared/ref_counted_gl_sync.h"
+#include "shared/va_display.h"
+#include "v4l_output.h"
#define SURFACE_NUM 16 /* 16 surfaces for source YUV */
#define MAX_NUM_REF1 16 // Seemingly a hardware-fixed value, not related to SURFACE_NUM
class QSurface;
class X264Encoder;
-struct VADisplayWithCleanup {
- ~VADisplayWithCleanup();
-
- VADisplay va_dpy;
- Display *x11_display = nullptr;
- bool can_use_zerocopy = true;
- int drm_fd = -1;
-};
-std::unique_ptr<VADisplayWithCleanup> va_open_display(const std::string &va_display); // Can return nullptr on failure.
-
class QuickSyncEncoderImpl {
public:
QuickSyncEncoderImpl(const std::string &filename, movit::ResourcePool *resource_pool, QSurface *surface, const std::string &va_display, int width, int height, AVOutputFormat *oformat, X264Encoder *x264_encoder, DiskSpaceEstimator *disk_space_estimator);
std::unique_ptr<AudioEncoder> file_audio_encoder;
X264Encoder *x264_encoder; // nullptr if not using x264.
+ std::unique_ptr<V4LOutput> v4l_output; // nullptr if not using V4L2 output.
Mux* stream_mux = nullptr; // To HTTP.
std::unique_ptr<Mux> file_mux; // To local disk.