mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Workaround for dead-lock in VdpauExit.
This commit is contained in:
parent
217545542d
commit
2ac2eb39c6
@ -1,6 +1,7 @@
|
|||||||
User johns
|
User johns
|
||||||
Date:
|
Date:
|
||||||
|
|
||||||
|
Workaround for dead-lock in VdpauExit.
|
||||||
VDPAU: Add very primitive software scaler for grab image.
|
VDPAU: Add very primitive software scaler for grab image.
|
||||||
VA-API: Add auto-crop support.
|
VA-API: Add auto-crop support.
|
||||||
Suspend can close/open X11 window, connection and audio device.
|
Suspend can close/open X11 window, connection and audio device.
|
||||||
|
1
Todo
1
Todo
@ -34,6 +34,7 @@ video:
|
|||||||
grab image with scaling support
|
grab image with scaling support
|
||||||
suspendoutput didn't show logo or black pictures
|
suspendoutput didn't show logo or black pictures
|
||||||
(must detect video format to show image)
|
(must detect video format to show image)
|
||||||
|
first OSD can show random chaos
|
||||||
|
|
||||||
vdpau:
|
vdpau:
|
||||||
VdpPreemptionCallback handling (under construction)
|
VdpPreemptionCallback handling (under construction)
|
||||||
|
13
video.c
13
video.c
@ -4564,6 +4564,7 @@ static void VdpauCleanup(VdpauDecoder * decoder)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (decoder->VideoDecoder != VDP_INVALID_HANDLE) {
|
if (decoder->VideoDecoder != VDP_INVALID_HANDLE) {
|
||||||
|
// hangs in lock
|
||||||
status = VdpauDecoderDestroy(decoder->VideoDecoder);
|
status = VdpauDecoderDestroy(decoder->VideoDecoder);
|
||||||
if (status != VDP_STATUS_OK) {
|
if (status != VDP_STATUS_OK) {
|
||||||
Error(_("video/vdpau: can't destroy video decoder: %s\n"),
|
Error(_("video/vdpau: can't destroy video decoder: %s\n"),
|
||||||
@ -5137,7 +5138,6 @@ static void VideoVdpauExit(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (VdpauDevice) {
|
if (VdpauDevice) {
|
||||||
xcb_flush(Connection);
|
|
||||||
VdpauExitOutputQueue();
|
VdpauExitOutputQueue();
|
||||||
|
|
||||||
// FIXME: more VDPAU cleanups...
|
// FIXME: more VDPAU cleanups...
|
||||||
@ -7360,6 +7360,12 @@ static void *VideoDisplayHandlerThread(void *dummy)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
/* other way to try to fix dead-lock with VdpauExit
|
||||||
|
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
|
||||||
|
pthread_testcancel();
|
||||||
|
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
|
||||||
|
*/
|
||||||
|
|
||||||
VideoPollEvent();
|
VideoPollEvent();
|
||||||
|
|
||||||
#ifdef USE_VAAPI
|
#ifdef USE_VAAPI
|
||||||
@ -8231,7 +8237,7 @@ void VideoInit(const char *display_name)
|
|||||||
Fatal(_("video: Can't connect to X11 server on '%s'"), display_name);
|
Fatal(_("video: Can't connect to X11 server on '%s'"), display_name);
|
||||||
// FIXME: we need to retry connection
|
// FIXME: we need to retry connection
|
||||||
}
|
}
|
||||||
XInitThreads();
|
// XInitThreads();
|
||||||
// Convert XLIB display to XCB connection
|
// Convert XLIB display to XCB connection
|
||||||
if (!(Connection = XGetXCBConnection(XlibDisplay))) {
|
if (!(Connection = XGetXCBConnection(XlibDisplay))) {
|
||||||
Fatal(_("video: Can't convert XLIB display to XCB connection"));
|
Fatal(_("video: Can't convert XLIB display to XCB connection"));
|
||||||
@ -8338,6 +8344,9 @@ void VideoExit(void)
|
|||||||
}
|
}
|
||||||
#ifdef USE_VIDEO_THREAD
|
#ifdef USE_VIDEO_THREAD
|
||||||
VideoThreadExit();
|
VideoThreadExit();
|
||||||
|
// VDPAU cleanup hangs in XLockDisplay every 100 exits
|
||||||
|
// XUnlockDisplay(XlibDisplay);
|
||||||
|
// xcb_flush(Connection);
|
||||||
#endif
|
#endif
|
||||||
if (VideoUsedModule) {
|
if (VideoUsedModule) {
|
||||||
VideoUsedModule->Exit();
|
VideoUsedModule->Exit();
|
||||||
|
Loading…
Reference in New Issue
Block a user