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:
parent
8aa807eec6
commit
fb67617d63
8
audio.c
8
audio.c
@ -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
|
// for AC3 pass-through try to set the non-audio bit, use AES0=6
|
||||||
//
|
//
|
||||||
if (passthrough) { //) && AudioAppendAES) {
|
if (passthrough && AudioAppendAES) {
|
||||||
|
|
||||||
#if 1
|
|
||||||
if (!(strchr(device, ':'))) {
|
if (!(strchr(device, ':'))) {
|
||||||
sprintf(tmp,
|
sprintf(tmp,
|
||||||
//"AES0=%d,AES1=%d,AES2=0,AES3=%d",
|
//"AES0=%d,AES1=%d,AES2=0,AES3=%d",
|
||||||
@ -964,13 +962,11 @@ static snd_pcm_t *AlsaOpenPCM(int passthrough) {
|
|||||||
//map_iec958_srate(ao->samplerate));
|
//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 ) {
|
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));
|
Error(_("audio/alsa: playback open '%s' error: %s\n"), device, snd_strerror(err));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
;
|
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
// open none blocking; if device is already used, we don't want wait
|
// 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) {
|
if ((err = snd_pcm_open(&handle, device, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK)) < 0) {
|
||||||
|
17
video.c
17
video.c
@ -2375,11 +2375,9 @@ void generateVAAPIImage(CuvidDecoder *decoder, int index, const AVFrame *frame,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// vaSyncSurface(decoder->VaDisplay, (unsigned int)frame->data[3]);
|
// vaSyncSurface(decoder->VaDisplay, (unsigned int)frame->data[3]);
|
||||||
#if defined USE_DRM && defined PLACEBO_GL
|
|
||||||
SharedContext;
|
|
||||||
#else
|
|
||||||
Lock_and_SharedContext;
|
Lock_and_SharedContext;
|
||||||
#endif
|
|
||||||
for (n = 0; n < 2; n++) { // Set DMA_BUF from VAAPI decoder to Textures
|
for (n = 0; n < 2; n++) { // Set DMA_BUF from VAAPI decoder to Textures
|
||||||
int id = desc.layers[n].object_index[0];
|
int id = desc.layers[n].object_index[0];
|
||||||
int fd = desc.objects[id].fd;
|
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);
|
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;
|
Unlock_and_NoContext;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -4519,10 +4515,11 @@ static void CuvidDisplayFrame(void) {
|
|||||||
#if defined PLACEBO // && !defined PLACEBO_GL
|
#if defined PLACEBO // && !defined PLACEBO_GL
|
||||||
// first_time = GetusTicks();
|
// first_time = GetusTicks();
|
||||||
if (!pl_swapchain_submit_frame(p->swapchain))
|
if (!pl_swapchain_submit_frame(p->swapchain))
|
||||||
Fatal(_("Failed to submit swapchain buffer\n"));
|
Fatal(_("Failed to submit swapchain buffer\n"));
|
||||||
|
VideoThreadUnlock();
|
||||||
pl_swapchain_swap_buffers(p->swapchain); // swap buffers
|
pl_swapchain_swap_buffers(p->swapchain); // swap buffers
|
||||||
NoContext;
|
NoContext;
|
||||||
VideoThreadUnlock();
|
|
||||||
#else // not PLACEBO
|
#else // not PLACEBO
|
||||||
#ifdef CUVID
|
#ifdef CUVID
|
||||||
glXGetVideoSyncSGI(&Count); // get current frame
|
glXGetVideoSyncSGI(&Count); // get current frame
|
||||||
|
Loading…
Reference in New Issue
Block a user