1
0
mirror of https://github.com/jojo61/vdr-plugin-softhdcuvid.git synced 2023-10-10 13:37:41 +02:00

Make Switch for AES Paramters

Change VAAPI Lock
This commit is contained in:
jojo61 2023-04-23 11:07:09 +02:00
parent 8aa807eec6
commit fb67617d63
2 changed files with 9 additions and 16 deletions

View File

@ -942,9 +942,7 @@ static snd_pcm_t *AlsaOpenPCM(int passthrough) {
//
// for AC3 pass-through try to set the non-audio bit, use AES0=6
//
if (passthrough) { //) && AudioAppendAES) {
#if 1
if (passthrough && AudioAppendAES) {
if (!(strchr(device, ':'))) {
sprintf(tmp,
//"AES0=%d,AES1=%d,AES2=0,AES3=%d",
@ -964,13 +962,11 @@ static snd_pcm_t *AlsaOpenPCM(int passthrough) {
//map_iec958_srate(ao->samplerate));
}
//printf( "opening device '%s' => '%s'\n", device, tmp);
printf( "opening device '%s' => '%s'\n", device, tmp);
if ((err = snd_pcm_open(&handle, tmp, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK)) < 0 ) {
Error(_("audio/alsa: playback open '%s' error: %s\n"), device, snd_strerror(err));
return NULL;
}
;
#endif
} else {
// open none blocking; if device is already used, we don't want wait
if ((err = snd_pcm_open(&handle, device, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK)) < 0) {

15
video.c
View File

@ -2375,11 +2375,9 @@ void generateVAAPIImage(CuvidDecoder *decoder, int index, const AVFrame *frame,
return;
}
// vaSyncSurface(decoder->VaDisplay, (unsigned int)frame->data[3]);
#if defined USE_DRM && defined PLACEBO_GL
SharedContext;
#else
Lock_and_SharedContext;
#endif
for (n = 0; n < 2; n++) { // Set DMA_BUF from VAAPI decoder to Textures
int id = desc.layers[n].object_index[0];
int fd = desc.objects[id].fd;
@ -2452,11 +2450,9 @@ void generateVAAPIImage(CuvidDecoder *decoder, int index, const AVFrame *frame,
decoder->pl_frames[index].planes[n].texture = pl_tex_create(p->gpu, &tex_params);
}
#if defined USE_DRM && defined PLACEBO_GL
NoContext;
#else
Unlock_and_NoContext;
#endif
}
#endif
@ -4520,9 +4516,10 @@ static void CuvidDisplayFrame(void) {
// first_time = GetusTicks();
if (!pl_swapchain_submit_frame(p->swapchain))
Fatal(_("Failed to submit swapchain buffer\n"));
VideoThreadUnlock();
pl_swapchain_swap_buffers(p->swapchain); // swap buffers
NoContext;
VideoThreadUnlock();
#else // not PLACEBO
#ifdef CUVID
glXGetVideoSyncSGI(&Count); // get current frame