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

More fixes for OSD

This commit is contained in:
jojo61 2019-11-13 17:09:49 +01:00
parent 8838d4c754
commit 780c594ba2
2 changed files with 6 additions and 14 deletions

View File

@ -895,23 +895,15 @@ bool cOglCmdCopyBufferToOutputFb::Execute(void) {
pthread_mutex_lock(&OSDMutex); pthread_mutex_lock(&OSDMutex);
fb->BindRead(); fb->BindRead();
oFb->BindWrite(); oFb->BindWrite();
// glClear(GL_COLOR_BUFFER_BIT);
//#ifdef PLACEBO
glPixelStorei(GL_UNPACK_ALIGNMENT, 1); glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glPixelStorei(GL_PACK_ALIGNMENT, 1); glPixelStorei(GL_PACK_ALIGNMENT, 1);
if (posd) if (posd)
glReadPixels(0, 0 ,fb->Width(), fb->Height(),GL_RGBA,GL_UNSIGNED_BYTE,posd); glReadPixels(0, 0 ,fb->Width(), fb->Height(),GL_RGBA,GL_UNSIGNED_BYTE,posd);
//#else glFlush();
#if 0 oFb->Unbind();
fb->Blit(x, y + fb->Height(), x + fb->Width(), y);
glFlush();
#endif
ActivateOsd(oFb->texture,x, y, fb->Width() ,fb->Height());
oFb->Unbind();
glFlush();
pthread_mutex_unlock(&OSDMutex); pthread_mutex_unlock(&OSDMutex);
ActivateOsd(oFb->texture,x, y, fb->Width() ,fb->Height());
return true; return true;
} }
@ -2062,11 +2054,11 @@ cOglOsd::cOglOsd(int Left, int Top, uint Level, std::shared_ptr<cOglThread> oglT
cOglOsd::~cOglOsd() { cOglOsd::~cOglOsd() {
OsdClose(); OsdClose();
SetActive(false); SetActive(false);
#if 0
if (posd) if (posd)
free(posd); free(posd);
posd = 0; posd = 0;
#endif
oglThread->DoCmd(new cOglCmdDeleteFb(bFb)); oglThread->DoCmd(new cOglCmdDeleteFb(bFb));
} }

View File

@ -2868,7 +2868,7 @@ int get_RGB(CuvidDecoder * decoder)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
pthread_mutex_unlock(&OSDMutex); pthread_mutex_unlock(&OSDMutex);
OsdShown = 2; OsdShown = 2;
} }