X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Fpbo_frame_allocator.h;h=cff50aa6310036fe320f2f2021c9b445ec7e7a75;hb=HEAD;hp=eee25ce906d443f6656935c33e3f9cfda476af9b;hpb=f4dc4d6d393026a5507be1f04a9149f6b8c2322c;p=nageru diff --git a/nageru/pbo_frame_allocator.h b/nageru/pbo_frame_allocator.h index eee25ce..772d05e 100644 --- a/nageru/pbo_frame_allocator.h +++ b/nageru/pbo_frame_allocator.h @@ -4,14 +4,19 @@ #include #include #include +#include +#include #include #include +#include #include +#include #include #include "bmusb/bmusb.h" #include "mjpeg_encoder.h" +#include "shared/va_resource_pool.h" class MJPEGEncoder; @@ -89,14 +94,14 @@ public: // from there into VA-API buffers (by MJPEGEncoder) if needed. enum { FROM_MALLOC, FROM_VA_API } data_copy_current_src; uint8_t *data_copy_malloc; - MJPEGEncoder::VAResources va_resources; - MJPEGEncoder::ReleaseVAResources va_resources_release; + VAResourcePool::VAResources va_resources; + ReleaseVAResources va_resources_release; int generation; }; private: - void init_frame(size_t frame_idx, size_t frame_size, GLuint width, GLuint height, GLenum permissions, GLenum map_bits, int generation); + static void init_frame(Frame &frame, Userdata *ud, PBOFrameAllocator *owner, bmusb::PixelFormat pixel_format, size_t frame_size, GLuint width, GLuint height, GLenum permissions, GLenum map_bits, GLenum buffer, int generation); void destroy_frame(Frame *frame); unsigned card_index;