refactoring, renaming and commenting

pull/3471/head
kallaballa 2 years ago
parent be05b51a35
commit cd6905e77e
  1. 2
      src/beauty/beauty-demo.cpp
  2. 4
      src/font/font-demo.cpp
  3. 4
      src/nanovg/nanovg-demo.cpp
  4. 4
      src/optflow/optflow-demo.cpp
  5. 4
      src/tetra/tetra-demo.cpp
  6. 4
      src/video/video-demo.cpp

@ -188,7 +188,7 @@ int main(int argc, char **argv) {
facemark->loadModel("assets/lbfmodel.yaml");
cv::VideoCapture capture(argv[1], cv::CAP_FFMPEG, { cv::CAP_PROP_HW_DEVICE, VA_HW_DEVICE_INDEX, cv::CAP_PROP_HW_ACCELERATION, cv::VIDEO_ACCELERATION_VAAPI, cv::CAP_PROP_HW_ACCELERATION_USE_OPENCL, 1 });
//Copy OpenCL Context for VAAPI. Must be called right after VideoWriter/VideoCapture initialization.
//Copy OpenCL Context for VAAPI. Must be called right after first VideoWriter/VideoCapture initialization.
va::copy();
if (!capture.isOpened()) {

@ -34,7 +34,7 @@ int main(int argc, char **argv) {
cv::VIDEOWRITER_PROP_HW_ACCELERATION_USE_OPENCL, 1
});
//Copy OpenCL Context for VAAPI. Must be called right after VideoWriter/VideoCapture initialization.
//Copy OpenCL Context for VAAPI. Must be called right after first VideoWriter/VideoCapture initialization.
va::copy();
//If we render offscreen we don't need x11.
@ -139,7 +139,7 @@ int main(int argc, char **argv) {
//Transfer buffer ownership back to OpenGL.
gl::release_to_gl(frameBuffer);
//If x11 is enabled it displays the framebuffer in the native window. returns false if the window was closed.
//If x11 is enabled it displays the framebuffer in the native window. Returns false if the window was closed.
if(!gl::display())
break;

@ -131,7 +131,7 @@ int main(int argc, char **argv) {
cv::CAP_PROP_HW_ACCELERATION_USE_OPENCL, 1
});
//Copy OpenCL Context for VAAPI. Must be called right after VideoWriter/VideoCapture initialization.
//Copy OpenCL Context for VAAPI. Must be called right after first VideoWriter/VideoCapture initialization.
va::copy();
// Check if we succeeded
@ -216,7 +216,7 @@ int main(int argc, char **argv) {
//Transfer buffer ownership back to OpenGL
gl::release_to_gl(frameBuffer);
//if x11 is enabled it displays the framebuffer in the native window. returns false if the window was closed.
//if x11 is enabled it displays the framebuffer in the native window. Returns false if the window was closed.
if(!gl::display())
break;

@ -189,7 +189,7 @@ int main(int argc, char **argv) {
cv::CAP_PROP_HW_ACCELERATION_USE_OPENCL, 1
});
//Copy OpenCL Context for VAAPI. Must be called right after VideoWriter/VideoCapture initialization.
//Copy OpenCL Context for VAAPI. Must be called right after first VideoWriter/VideoCapture initialization.
va::copy();
if (!capture.isOpened()) {
@ -250,7 +250,7 @@ int main(int argc, char **argv) {
cv::cvtColor(frameBuffer, videoFrame, cv::COLOR_BGRA2RGB);
gl::release_to_gl(frameBuffer);
//if x11 is enabled it displays the framebuffer in the native window. returns false if the window was closed.
//if x11 is enabled it displays the framebuffer in the native window. Returns false if the window was closed.
if(!gl::display())
break;

@ -90,7 +90,7 @@ int main(int argc, char **argv) {
cv::VIDEOWRITER_PROP_HW_ACCELERATION_USE_OPENCL, 1
});
//Copy OpenCL Context for VAAPI. Must be called right after VideoWriter/VideoCapture initialization.
//Copy OpenCL Context for VAAPI. Must be called right after first VideoWriter/VideoCapture initialization.
va::copy();
//If we are rendering offscreen we don't need x11
@ -128,7 +128,7 @@ int main(int argc, char **argv) {
//Release the frame buffer for use by OpenGL
gl::release_to_gl(frameBuffer);
//if x11 is enabled it displays the framebuffer in the native window. returns false if the window was closed.
//if x11 is enabled it displays the framebuffer in the native window. Returns false if the window was closed.
if(!gl::display())
break;

@ -95,7 +95,7 @@ int main(int argc, char **argv) {
cv::CAP_PROP_HW_ACCELERATION_USE_OPENCL, 1
});
//Copy OpenCL Context for VAAPI. Must be called right after VideoWriter/VideoCapture initialization.
//Copy OpenCL Context for VAAPI. Must be called right after first VideoWriter/VideoCapture initialization.
va::copy();
if (!capture.isOpened()) {
@ -167,7 +167,7 @@ int main(int argc, char **argv) {
//Release the frame buffer for use by OpenGL
gl::release_to_gl(frameBuffer);
//if x11 is enabled it displays the framebuffer in the native window. returns false if the window was closed.
//if x11 is enabled it displays the framebuffer in the native window. Returns false if the window was closed.
if(!gl::display())
break;

Loading…
Cancel
Save