mirror of
https://github.com/jojo61/vdr-plugin-softhdcuvid.git
synced 2025-12-27 15:24:26 +01:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9682e5f9a3 | ||
|
|
22faf96cf2 | ||
|
|
f902347cc3 | ||
|
|
4c48e91156 | ||
|
|
eb94d75584 |
7
codec.c
7
codec.c
@@ -488,8 +488,9 @@ void CodecVideoDecode(VideoDecoder *decoder, const AVPacket *avpkt) {
|
||||
return;
|
||||
}
|
||||
if (ret >= 0) {
|
||||
//printf("Videosize %d:%d ttf %d\n",frame->width,frame->height,frame->interlaced_frame);
|
||||
if ((frame->flags & AV_FRAME_FLAG_INTERLACED) && decoder->filter) {
|
||||
//printf("Videosize %d:%d interlaced %d Flag %x\n",frame->width,frame->height,frame->interlaced_frame,frame->flags & AV_FRAME_FLAG_INTERLACED);
|
||||
if (((frame->flags & AV_FRAME_FLAG_INTERLACED) || (frame->height == 576)) && decoder->filter) {
|
||||
//if ( decoder->filter) {
|
||||
if (decoder->filter == 1) {
|
||||
if (init_filters(video_ctx, decoder->HwDecoder, frame) < 0) {
|
||||
Debug(3, "video: Init of VAAPI deint Filter failed\n");
|
||||
@@ -560,7 +561,7 @@ next_part:
|
||||
// printf("video frame pts %#012" PRIx64 "
|
||||
//%dms\n",frame->pts,(int)(apts - frame->pts) / 90);
|
||||
#ifdef YADIF
|
||||
if ((frame->flags & AV_FRAME_FLAG_INTERLACED) && decoder->filter) {
|
||||
if (((frame->flags & AV_FRAME_FLAG_INTERLACED) || (frame->height == 576)) && decoder->filter) {
|
||||
if (decoder->filter == 1) {
|
||||
if (init_filters(video_ctx, decoder->HwDecoder, frame) < 0) {
|
||||
Debug(3,"video: Init of YADIF Filter failed\n");
|
||||
|
||||
@@ -61,7 +61,7 @@ extern void ToggleLUT();
|
||||
/// vdr-plugin version number.
|
||||
/// Makefile extracts the version number for generating the file name
|
||||
/// for the distribution archive.
|
||||
static const char *const VERSION = "3.29"
|
||||
static const char *const VERSION = "3.33"
|
||||
#ifdef GIT_REV
|
||||
"-GIT" GIT_REV
|
||||
#endif
|
||||
@@ -2960,7 +2960,6 @@ class cPluginSoftHdDevice : public cPlugin {
|
||||
virtual bool Start(void);
|
||||
virtual void Stop(void);
|
||||
virtual void Housekeeping(void);
|
||||
virtual void MainThreadHook(void);
|
||||
virtual const char *MainMenuEntry(void);
|
||||
virtual cOsdObject *MainMenuAction(void);
|
||||
virtual cMenuSetupPage *SetupMenu(void);
|
||||
@@ -3129,21 +3128,6 @@ cOsdObject *cPluginSoftHdDevice::MainMenuAction(void) {
|
||||
return new cSoftHdMenu("SoftHdDevice");
|
||||
}
|
||||
|
||||
/**
|
||||
** Called for every plugin once during every cycle of VDR's main program
|
||||
** loop.
|
||||
*/
|
||||
void cPluginSoftHdDevice::MainThreadHook(void) {
|
||||
// dsyslog("[softhddev]%s:\n", __FUNCTION__);
|
||||
|
||||
if (DoMakePrimary) {
|
||||
dsyslog("[softhddev]%s: switching primary device to %d\n", __FUNCTION__, DoMakePrimary);
|
||||
cDevice::SetPrimaryDevice(DoMakePrimary);
|
||||
DoMakePrimary = 0;
|
||||
}
|
||||
|
||||
::MainThreadHook();
|
||||
}
|
||||
|
||||
/**
|
||||
** Return our setup menu.
|
||||
|
||||
12
softhddev.c
12
softhddev.c
@@ -3211,18 +3211,6 @@ void Housekeeping(void) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
** Main thread hook, periodic called from main thread.
|
||||
*/
|
||||
void MainThreadHook(void) {
|
||||
if (Usr1Signal) { // x11 server ready
|
||||
// FIYME: x11 server keeps sending sigusr1 signals
|
||||
signal(SIGUSR1, SIG_IGN); // ignore further signals
|
||||
Usr1Signal = 0;
|
||||
StartVideo();
|
||||
VideoDisplayWakeup();
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Suspend/Resume
|
||||
|
||||
@@ -86,8 +86,6 @@ extern int Start(void);
|
||||
extern void Stop(void);
|
||||
/// C plugin house keeping
|
||||
extern void Housekeeping(void);
|
||||
/// C plugin main thread hook
|
||||
extern void MainThreadHook(void);
|
||||
|
||||
/// Suspend plugin
|
||||
extern void Suspend(int, int, int);
|
||||
|
||||
12
video.c
12
video.c
@@ -2893,7 +2893,11 @@ static enum AVPixelFormat Cuvid_get_format(CuvidDecoder *decoder, AVCodecContext
|
||||
bitformat16 = 1;
|
||||
}
|
||||
#ifdef VAAPI
|
||||
#if (LIBAVCODEC_VERSION_INT > AV_VERSION_INT(62, 11, 100))
|
||||
if (video_ctx->profile == AV_PROFILE_HEVC_MAIN_10)
|
||||
#else
|
||||
if (video_ctx->profile == FF_PROFILE_HEVC_MAIN_10)
|
||||
#endif
|
||||
bitformat16 = 1;
|
||||
#endif
|
||||
|
||||
@@ -6099,15 +6103,7 @@ void VideoReleaseSurface(VideoHwDecoder *hw_decoder, unsigned surface) {
|
||||
///
|
||||
enum AVPixelFormat Video_get_format(VideoHwDecoder *hw_decoder, AVCodecContext *video_ctx,
|
||||
const enum AVPixelFormat *fmt) {
|
||||
#ifdef DEBUG
|
||||
int ms_delay;
|
||||
|
||||
// FIXME: use frame time
|
||||
ms_delay = (1000 * video_ctx->time_base.num * video_ctx->ticks_per_frame) / video_ctx->time_base.den;
|
||||
|
||||
Debug(3, "video: ready %s %2dms/frame %dms\n", Timestamp2String(VideoGetClock(hw_decoder)), ms_delay,
|
||||
GetMsTicks() - VideoSwitch);
|
||||
#endif
|
||||
|
||||
return VideoUsedModule->get_format(hw_decoder, video_ctx, fmt);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user