diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-11-20 23:37:55 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-11-20 23:37:55 +0100 |
commit | a033d7c98a2ff45da7b664702699287aeb05b009 (patch) | |
tree | 334a2791b8b6f33bf7820f3433cfaf82946f3e79 /src | |
parent | 5cf1e7953b80354abfae67036f224529a482453e (diff) |
va sync buffer/surface
Diffstat (limited to 'src')
-rw-r--r-- | src/utils.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/utils.c b/src/utils.c index e871126..f93b04a 100644 --- a/src/utils.c +++ b/src/utils.c @@ -816,6 +816,8 @@ bool vaapi_copy_drm_planes_to_video_surface(AVCodecContext *video_codec_context, // if (first surface to render) // pipeline_param->output_background_color = 0xff000000; // black + vaSyncSurface(va_dpy, input_surface_id); + va_status = vaCreateBuffer(va_dpy, context_id, VAProcPipelineParameterBufferType, sizeof(params), 1, ¶ms, &buffer_id); if(va_status != VA_STATUS_SUCCESS) { fprintf(stderr, "gsr error: vaapi_copy_drm_planes_to_video_surface: vaCreateBuffer failed, error: %d\n", va_status); @@ -845,9 +847,9 @@ bool vaapi_copy_drm_planes_to_video_surface(AVCodecContext *video_codec_context, goto done; } - // vaSyncBuffer(va_dpy, buffer_id, 1000 * 1000 * 1000); - // vaSyncSurface(va_dpy, input_surface_id); - // vaSyncSurface(va_dpy, output_surface_id); + vaSyncBuffer(va_dpy, buffer_id, 1000ULL * 1000ULL * 1000ULL); // 1 Second + //vaSyncSurface(va_dpy, input_surface_id); + vaSyncSurface(va_dpy, output_surface_id); done: if(buffer_id) |