Move video encoding to separate thread, remove pixel_format that doesn't do anything and was bugged

This commit is contained in:
dec05eba
2023-03-21 12:10:16 +01:00
parent 716cb5b448
commit 5d80bd886c
2 changed files with 85 additions and 49 deletions

View File

@@ -372,12 +372,6 @@ static void gsr_capture_xcomposite_cuda_tick(gsr_capture *cap, AVCodecContext *v
cap_xcomp->texture_size.x = min_int(video_codec_context->width, max_int(2, cap_xcomp->texture_size.x & ~1));
cap_xcomp->texture_size.y = min_int(video_codec_context->height, max_int(2, cap_xcomp->texture_size.y & ~1));
if(!cap_xcomp->params.follow_focused) {
cap_xcomp->egl.glBindTexture(GL_TEXTURE_2D, cap_xcomp->target_texture_id);
cap_xcomp->egl.glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, cap_xcomp->texture_size.x, cap_xcomp->texture_size.y, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL);
cap_xcomp->egl.glBindTexture(GL_TEXTURE_2D, 0);
}
av_frame_free(frame);
*frame = av_frame_alloc();
if(!frame) {