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:
parent
ac3845c79d
commit
d6d2674d23
16
Makefile
16
Makefile
@ -124,11 +124,11 @@ CONFIG += -DUSE_GLX
|
|||||||
_CFLAGS += $(shell pkg-config --cflags gl glu)
|
_CFLAGS += $(shell pkg-config --cflags gl glu)
|
||||||
LIBS += $(shell pkg-config --libs gl glu)
|
LIBS += $(shell pkg-config --libs gl glu)
|
||||||
endif
|
endif
|
||||||
ifeq ($(SCREENSAVER),1)
|
#ifeq ($(SCREENSAVER),1)
|
||||||
CONFIG += -DUSE_SCREENSAVER
|
#CONFIG += -DUSE_SCREENSAVER
|
||||||
_CFLAGS += $(shell pkg-config --cflags xcb-screensaver xcb-dpms)
|
#_CFLAGS += $(shell pkg-config --cflags xcb-screensaver xcb-dpms)
|
||||||
LIBS += $(shell pkg-config --libs xcb-screensaver xcb-dpms)
|
#LIBS += $(shell pkg-config --libs xcb-screensaver xcb-dpms)
|
||||||
endif
|
#endif
|
||||||
ifeq ($(SWRESAMPLE),1)
|
ifeq ($(SWRESAMPLE),1)
|
||||||
CONFIG += -DUSE_SWRESAMPLE
|
CONFIG += -DUSE_SWRESAMPLE
|
||||||
#_CFLAGS += $(shell pkg-config --cflags libswresample)
|
#_CFLAGS += $(shell pkg-config --cflags libswresample)
|
||||||
@ -151,7 +151,11 @@ _CFLAGS += -I/usr/include/libavresample
|
|||||||
#LIBS += -lavresample
|
#LIBS += -lavresample
|
||||||
_CFLAGS += -I/usr/include/libswresample
|
_CFLAGS += -I/usr/include/libswresample
|
||||||
_CFLAGS += -I./opengl -I./ -std=c99 -Wdeclaration-after-statement
|
_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):
|
### Includes and Defines (add further entries here):
|
||||||
|
|
||||||
|
7
codec.c
7
codec.c
@ -269,7 +269,7 @@ void CodecVideoOpen(VideoDecoder * decoder, int codec_id)
|
|||||||
int ret;
|
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));
|
avcodec_get_name(codec_id));
|
||||||
|
|
||||||
if (decoder->VideoCtx) {
|
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) {
|
if (av_opt_set_int(decoder->VideoCtx->priv_data, "deint", 2 ,0) < 0) {
|
||||||
pthread_mutex_unlock(&CodecLockMutex);
|
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) {
|
if (av_opt_set(decoder->VideoCtx->priv_data, "drop_second_field", "false" ,0) < 0) {
|
||||||
pthread_mutex_unlock(&CodecLockMutex);
|
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) {
|
if (ret1 >= 0) {
|
||||||
consumed = 1;
|
consumed = 1;
|
||||||
// return;
|
|
||||||
}
|
}
|
||||||
if (ret1 == AVERROR(EAGAIN) || ret1 == AVERROR_EOF || ret1 >= 0) { // decoder is full
|
if (ret1 == AVERROR(EAGAIN) || ret1 == AVERROR_EOF || ret1 >= 0) { // decoder is full
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
15
softhddev.c
15
softhddev.c
@ -2690,12 +2690,9 @@ void StillPicture(const uint8_t * data, int size)
|
|||||||
#endif
|
#endif
|
||||||
VideoSetTrickSpeed(MyVideoStream->HwDecoder, 1);
|
VideoSetTrickSpeed(MyVideoStream->HwDecoder, 1);
|
||||||
VideoResetPacket(MyVideoStream);
|
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
|
VideoNextPacket(MyVideoStream, AV_CODEC_ID_NONE); // close last stream
|
||||||
}
|
|
||||||
|
|
||||||
if (MyVideoStream->CodecID == AV_CODEC_ID_NONE) {
|
if (MyVideoStream->CodecID == AV_CODEC_ID_NONE) {
|
||||||
// FIXME: should detect codec, see PlayVideo
|
// FIXME: should detect codec, see PlayVideo
|
||||||
@ -2706,8 +2703,7 @@ void StillPicture(const uint8_t * data, int size)
|
|||||||
#ifdef STILL_DEBUG
|
#ifdef STILL_DEBUG
|
||||||
fprintf(stderr, "still-picture\n");
|
fprintf(stderr, "still-picture\n");
|
||||||
#endif
|
#endif
|
||||||
for (i = 0; i < (MyVideoStream->CodecID == AV_CODEC_ID_HEVC ? 3 : 4);
|
for (i = 0; i < (MyVideoStream->CodecID == AV_CODEC_ID_HEVC ? 8 : 10); ++i) {
|
||||||
++i) {
|
|
||||||
const uint8_t *split;
|
const uint8_t *split;
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
@ -2771,10 +2767,9 @@ void StillPicture(const uint8_t * data, int size)
|
|||||||
#ifdef STILL_DEBUG
|
#ifdef STILL_DEBUG
|
||||||
InStillPicture = 0;
|
InStillPicture = 0;
|
||||||
#endif
|
#endif
|
||||||
if (VideoHardwareDecoder != old_video_hardware_decoder) {
|
|
||||||
VideoHardwareDecoder = old_video_hardware_decoder;
|
|
||||||
VideoNextPacket(MyVideoStream, AV_CODEC_ID_NONE); // close last stream
|
VideoNextPacket(MyVideoStream, AV_CODEC_ID_NONE); // close last stream
|
||||||
}
|
|
||||||
VideoSetTrickSpeed(MyVideoStream->HwDecoder, 0);
|
VideoSetTrickSpeed(MyVideoStream->HwDecoder, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
video.c
4
video.c
@ -1185,7 +1185,7 @@ int redSize, greenSize, blueSize;
|
|||||||
glXGetFBConfigAttrib(XlibDisplay, fbc[0], GLX_RED_SIZE, &redSize);
|
glXGetFBConfigAttrib(XlibDisplay, fbc[0], GLX_RED_SIZE, &redSize);
|
||||||
glXGetFBConfigAttrib(XlibDisplay, fbc[0], GLX_GREEN_SIZE, &greenSize);
|
glXGetFBConfigAttrib(XlibDisplay, fbc[0], GLX_GREEN_SIZE, &greenSize);
|
||||||
glXGetFBConfigAttrib(XlibDisplay, fbc[0], GLX_BLUE_SIZE, &blueSize);
|
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;
|
GlxEnabled = 0;
|
||||||
return;
|
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) {
|
if (vi->bits_per_rgb < 8) {
|
||||||
Error(_("video/glx: need atleast 8-bits per RGB\n"));
|
Error(_("video/glx: need atleast 8-bits per RGB\n"));
|
||||||
GlxEnabled = 0;
|
GlxEnabled = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user