X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Fquicksync_encoder_impl.h;h=53f88ecd4be8c9fe98d51cfeaf72eebb34fe4afe;hb=1a7e004368f4f5221e91bf53e17a8c0f7e1ceeb8;hp=6e6e759c9c351d4bcf95bc533472d9e2633274c7;hpb=af8007aa958271ba16b15e7d11a891570488f6c9;p=nageru diff --git a/nageru/quicksync_encoder_impl.h b/nageru/quicksync_encoder_impl.h index 6e6e759..53f88ec 100644 --- a/nageru/quicksync_encoder_impl.h +++ b/nageru/quicksync_encoder_impl.h @@ -19,7 +19,9 @@ #include "defs.h" #include "shared/timebase.h" #include "print_latency.h" -#include "ref_counted_gl_sync.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 @@ -39,16 +41,6 @@ class DiskSpaceEstimator; 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 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); @@ -180,6 +172,7 @@ private: std::unique_ptr file_audio_encoder; X264Encoder *x264_encoder; // nullptr if not using x264. + std::unique_ptr v4l_output; // nullptr if not using V4L2 output. Mux* stream_mux = nullptr; // To HTTP. std::unique_ptr file_mux; // To local disk.