mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Cleanups + Version 0.1.2 released.
This commit is contained in:
parent
f18b0bda1c
commit
8b57af53b6
@ -1,5 +1,12 @@
|
||||
User johns
|
||||
Date:
|
||||
Date: Sat Dec 24 15:26:27 CET 2011
|
||||
|
||||
Release Version 0.1.2
|
||||
Fix wrong decoder->SurfaceField again.
|
||||
Remove interlaced_frame debug, it can't be used.
|
||||
Fix new video stream never resets, if buffers full.
|
||||
|
||||
Date: Fri Dec 23 21:31:27 CET 2011
|
||||
|
||||
Release Version 0.1.1
|
||||
Initial VDPAU decoder support.
|
||||
|
2
Makefile
2
Makefile
@ -17,7 +17,7 @@ VERSION = $(shell grep 'static const char \*const VERSION *=' $(PLUGIN).cpp | aw
|
||||
|
||||
### Configuration (edit this for your needs)
|
||||
|
||||
CONFIG := -DDEBUG
|
||||
CONFIG := #-DDEBUG
|
||||
CONFIG += $(shell pkg-config --exists libva && echo "-DUSE_VAAPI")
|
||||
CONFIG += $(shell pkg-config --exists vdpau && echo "-DUSE_VDPAU")
|
||||
|
||||
|
1
Todo
1
Todo
@ -10,6 +10,7 @@ missing:
|
||||
|
||||
vdpau:
|
||||
1080i with temporal spatial too slow GT 520
|
||||
Dr. Dish H264 black picture
|
||||
|
||||
libva-intel-driver:
|
||||
intel still has hangups most with 1080i
|
||||
|
1
codec.c
1
codec.c
@ -417,7 +417,6 @@ void CodecVideoOpen(VideoDecoder * decoder, const char *name, int codec_id)
|
||||
if (!(decoder->Frame = avcodec_alloc_frame())) {
|
||||
Fatal(_("codec: can't allocate decoder frame\n"));
|
||||
}
|
||||
|
||||
// reset buggy ffmpeg/libav flag
|
||||
decoder->GetFormatDone = 0;
|
||||
}
|
||||
|
83
softhddev.c
83
softhddev.c
@ -205,7 +205,6 @@ static char VideoClearBuffers; ///< clear video buffers
|
||||
|
||||
#ifdef DEBUG
|
||||
static int VideoMaxPacketSize; ///< biggest used packet buffer
|
||||
static uint32_t VideoStartTick; ///< video start tick
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -221,13 +220,9 @@ static void VideoPacketInit(void)
|
||||
for (i = 0; i < VIDEO_PACKET_MAX; ++i) {
|
||||
avpkt = &VideoPacketRb[i];
|
||||
// build a clean ffmpeg av packet
|
||||
av_init_packet(avpkt);
|
||||
avpkt->destruct = av_destruct_packet;
|
||||
avpkt->data = av_malloc(VIDEO_BUFFER_SIZE);
|
||||
if (!avpkt->data) {
|
||||
if (av_new_packet(avpkt, VIDEO_BUFFER_SIZE)) {
|
||||
Fatal(_("[softhddev]: out of memory\n"));
|
||||
}
|
||||
avpkt->size = VIDEO_BUFFER_SIZE;
|
||||
avpkt->priv = NULL;
|
||||
}
|
||||
|
||||
@ -263,21 +258,15 @@ static void VideoEnqueue(int64_t pts, const void *data, int size)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#ifdef xxDEBUG
|
||||
if (!avpkt->stream_index) { // debug save time of first packet
|
||||
avpkt->pos = GetMsTicks();
|
||||
}
|
||||
#endif
|
||||
if (!VideoStartTick) { // tick of first valid packet
|
||||
VideoStartTick = GetMsTicks();
|
||||
}
|
||||
|
||||
memcpy(avpkt->data + avpkt->stream_index, data, size);
|
||||
avpkt->stream_index += size;
|
||||
#ifdef DEBUG
|
||||
if (avpkt->stream_index > VideoMaxPacketSize) {
|
||||
VideoMaxPacketSize = avpkt->stream_index;
|
||||
Debug(3, "video: max used PES packet size: %d\n", VideoMaxPacketSize);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@ -402,70 +391,6 @@ int VideoDecode(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
/**
|
||||
** Flush video buffer.
|
||||
*/
|
||||
void VideoFlushInput(void)
|
||||
{
|
||||
// flush all buffered packets
|
||||
while (atomic_read(&VideoPacketsFilled)) {
|
||||
VideoPacketRead = (VideoPacketRead + 1) % VIDEO_PACKET_MAX;
|
||||
atomic_dec(&VideoPacketsFilled);
|
||||
}
|
||||
VideoStartTick = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
** Wakeup video handler.
|
||||
*/
|
||||
void VideoWakeup(void)
|
||||
{
|
||||
int filled;
|
||||
uint32_t now;
|
||||
uint64_t delay;
|
||||
|
||||
filled = atomic_read(&VideoPacketsFilled);
|
||||
if (!filled) {
|
||||
Debug(3, "video: wakeup no packets buffered\n");
|
||||
return;
|
||||
}
|
||||
|
||||
now = GetMsTicks();
|
||||
if (filled < VIDEO_PACKET_MAX && VideoStartTick + 1000 > now) {
|
||||
delay = AudioGetDelay() / 90;
|
||||
if (delay < 100) { // no audio delay known
|
||||
delay = 750;
|
||||
}
|
||||
delay -= 40;
|
||||
if (VideoStartTick + delay > now) {
|
||||
Debug(3, "video: %d packets %u/%lu delayed\n", filled,
|
||||
(unsigned)(now - VideoStartTick), delay);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
VideoDecode();
|
||||
|
||||
#if 0
|
||||
AVPacket *avpkt;
|
||||
|
||||
while (filled) {
|
||||
avpkt = &VideoPacketRb[VideoPacketRead];
|
||||
now = GetMsTicks();
|
||||
if (avpkt->pos + 500 > now) {
|
||||
Debug(3, "video: %d packets %u delayed\n", filled,
|
||||
(unsigned)(now - avpkt->pos));
|
||||
return;
|
||||
}
|
||||
filled = atomic_read(&VideoPacketsFilled);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
** Try video start.
|
||||
**
|
||||
@ -918,7 +843,9 @@ void Start(void)
|
||||
*/
|
||||
void Stop(void)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
Debug(3, "video: max used PES packet size: %d\n", VideoMaxPacketSize);
|
||||
#endif
|
||||
|
||||
// FIXME:
|
||||
// don't let any thread enter our plugin, but can still crash, when
|
||||
|
@ -39,7 +39,7 @@ extern "C" {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static const char *const VERSION = "0.1.1";
|
||||
static const char *const VERSION = "0.1.2";
|
||||
static const char *const DESCRIPTION =
|
||||
trNOOP("A software and GPU emulated HD device");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user