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

fix for jumpmarks and Screensaver

This commit is contained in:
jojo61 2018-08-20 17:25:39 +02:00
parent ac3845c79d
commit d6d2674d23
4 changed files with 66 additions and 68 deletions

View File

@ -124,11 +124,11 @@ CONFIG += -DUSE_GLX
_CFLAGS += $(shell pkg-config --cflags gl glu)
LIBS += $(shell pkg-config --libs gl glu)
endif
ifeq ($(SCREENSAVER),1)
CONFIG += -DUSE_SCREENSAVER
_CFLAGS += $(shell pkg-config --cflags xcb-screensaver xcb-dpms)
LIBS += $(shell pkg-config --libs xcb-screensaver xcb-dpms)
endif
#ifeq ($(SCREENSAVER),1)
#CONFIG += -DUSE_SCREENSAVER
#_CFLAGS += $(shell pkg-config --cflags xcb-screensaver xcb-dpms)
#LIBS += $(shell pkg-config --libs xcb-screensaver xcb-dpms)
#endif
ifeq ($(SWRESAMPLE),1)
CONFIG += -DUSE_SWRESAMPLE
#_CFLAGS += $(shell pkg-config --cflags libswresample)
@ -151,7 +151,11 @@ _CFLAGS += -I/usr/include/libavresample
#LIBS += -lavresample
_CFLAGS += -I/usr/include/libswresample
_CFLAGS += -I./opengl -I./ -std=c99 -Wdeclaration-after-statement
LIBS += -lavutil -lswresample -lswscale -lGLEW -lGLX -ldl -lcuda -L/usr/local/cuda-8.0/targets/x86_64-linux/lib -lcudart -lnvcuvid
LIBS += -L/usr/lib64/opengl/nvidia/lib
LIBS += -L/usr/local/cuda/lib64
LIBS += -lavutil -lswresample -lswscale -lGLEW -lGLX -ldl -lcuda -L/usr/local/cuda/targets/x86_64-linux/lib -lcudart -lnvcuvid
### Includes and Defines (add further entries here):

View File

@ -269,7 +269,7 @@ void CodecVideoOpen(VideoDecoder * decoder, int codec_id)
int ret;
Debug(3, "codec: using video codec ID %#06x (%s)\n", codec_id,
Debug(3, "***************codec: Video Open using video codec ID %#06x (%s)\n", codec_id,
avcodec_get_name(codec_id));
if (decoder->VideoCtx) {
@ -316,12 +316,12 @@ void CodecVideoOpen(VideoDecoder * decoder, int codec_id)
if (av_opt_set_int(decoder->VideoCtx->priv_data, "deint", 2 ,0) < 0) {
pthread_mutex_unlock(&CodecLockMutex);
Fatal(_("codec: can't set options to video codec!\n"));
Fatal(_("codec: can't set option deint to video codec!\n"));
}
if (av_opt_set(decoder->VideoCtx->priv_data, "drop_second_field", "false" ,0) < 0) {
pthread_mutex_unlock(&CodecLockMutex);
Fatal(_("codec: can't set options to video codec!\n"));
Fatal(_("codec: can't set option drop 2.field to video codec!\n"));
}
@ -457,7 +457,6 @@ next_part:
if (ret1 >= 0) {
consumed = 1;
// return;
}
if (ret1 == AVERROR(EAGAIN) || ret1 == AVERROR_EOF || ret1 >= 0) { // decoder is full
ret = 0;

View File

@ -2690,12 +2690,9 @@ void StillPicture(const uint8_t * data, int size)
#endif
VideoSetTrickSpeed(MyVideoStream->HwDecoder, 1);
VideoResetPacket(MyVideoStream);
old_video_hardware_decoder = VideoHardwareDecoder;
// enable/disable hardware decoder for still picture
if (VideoHardwareDecoder != ConfigStillDecoder) {
VideoHardwareDecoder = ConfigStillDecoder;
VideoNextPacket(MyVideoStream, AV_CODEC_ID_NONE); // close last stream
}
if (MyVideoStream->CodecID == AV_CODEC_ID_NONE) {
// FIXME: should detect codec, see PlayVideo
@ -2706,8 +2703,7 @@ void StillPicture(const uint8_t * data, int size)
#ifdef STILL_DEBUG
fprintf(stderr, "still-picture\n");
#endif
for (i = 0; i < (MyVideoStream->CodecID == AV_CODEC_ID_HEVC ? 3 : 4);
++i) {
for (i = 0; i < (MyVideoStream->CodecID == AV_CODEC_ID_HEVC ? 8 : 10); ++i) {
const uint8_t *split;
int n;
@ -2771,10 +2767,9 @@ void StillPicture(const uint8_t * data, int size)
#ifdef STILL_DEBUG
InStillPicture = 0;
#endif
if (VideoHardwareDecoder != old_video_hardware_decoder) {
VideoHardwareDecoder = old_video_hardware_decoder;
VideoNextPacket(MyVideoStream, AV_CODEC_ID_NONE); // close last stream
}
VideoSetTrickSpeed(MyVideoStream->HwDecoder, 0);
}

View File

@ -1185,7 +1185,7 @@ int redSize, greenSize, blueSize;
glXGetFBConfigAttrib(XlibDisplay, fbc[0], GLX_RED_SIZE, &redSize);
glXGetFBConfigAttrib(XlibDisplay, fbc[0], GLX_GREEN_SIZE, &greenSize);
glXGetFBConfigAttrib(XlibDisplay, fbc[0], GLX_BLUE_SIZE, &blueSize);
printf("RGB size %d:%d:%d\n",redSize, greenSize, blueSize);
//printf("RGB size %d:%d:%d\n",redSize, greenSize, blueSize);
@ -1200,7 +1200,7 @@ printf("RGB size %d:%d:%d\n",redSize, greenSize, blueSize);
GlxEnabled = 0;
return;
}
printf("bits per RGB %d\n",vi->bits_per_rgb);
//printf("bits per RGB %d\n",vi->bits_per_rgb);
if (vi->bits_per_rgb < 8) {
Error(_("video/glx: need atleast 8-bits per RGB\n"));
GlxEnabled = 0;