summaryrefslogtreecommitdiff
path: root/test/v4l2_videodevice
ModeNameSize
-rw-r--r--buffer_sharing.cpp4626logplain
-rw-r--r--capture_async.cpp1807logplain
-rw-r--r--controls.cpp2697logplain
-rw-r--r--double_open.cpp686logplain
-rw-r--r--formats.cpp1095logplain
-rw-r--r--meson.build856logplain
-rw-r--r--request_buffers.cpp530logplain
-rw-r--r--stream_on_off.cpp652logplain
-rw-r--r--v4l2_m2mdevice.cpp4565logplain
-rw-r--r--v4l2_videodevice_test.cpp1986logplain
-rw-r--r--v4l2_videodevice_test.h1041logplain
pt">; void render(libcamera::FrameBuffer *buffer, libcamera::Span<uint8_t> mem) override; void stop() override; QImage getCurrentImage() override; Q_SIGNALS: void renderComplete(libcamera::FrameBuffer *buffer); protected: void initializeGL() override; void paintGL() override; void resizeGL(int w, int h) override; QSize sizeHint() const override; private: bool selectFormat(const libcamera::PixelFormat &format); void configureTexture(QOpenGLTexture &texture); bool createFragmentShader(); bool createVertexShader(); void removeShader(); void doRender(); /* Captured image size, format and buffer */ libcamera::FrameBuffer *buffer_; libcamera::PixelFormat format_; QSize size_; unsigned int stride_; unsigned char *data_; /* Shaders */ QOpenGLShaderProgram shaderProgram_; std::unique_ptr<QOpenGLShader> vertexShader_; std::unique_ptr<QOpenGLShader> fragmentShader_; QString vertexShaderFile_; QString fragmentShaderFile_; QStringList fragmentShaderDefines_; /* Vertex buffer */ QOpenGLBuffer vertexBuffer_; /* Textures */ std::array<std::unique_ptr<QOpenGLTexture>, 3> textures_; /* Common texture parameters */ GLuint textureMinMagFilters_; /* YUV texture parameters */ GLuint textureUniformU_; GLuint textureUniformV_; GLuint textureUniformY_; GLuint textureUniformStep_; unsigned int horzSubSample_; unsigned int vertSubSample_; /* Raw Bayer texture parameters */ GLuint textureUniformSize_; GLuint textureUniformBayerFirstRed_; QPointF firstRed_; QMutex mutex_; /* Prevent concurrent access to image_ */ }; #endif /* __VIEWFINDER_GL_H__ */