summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2011-12-24 15:27:46 +0100
committerJohns <johns98@gmx.net>2011-12-24 15:27:46 +0100
commit8b57af53b6d356cffc91542a0ce9712d1eb032fc (patch)
treebc7ee40c648530372cbebf41f22d733ff4fc8bd1
parentf18b0bda1c3840f79fcaab72b153d742e31caa90 (diff)
downloadvdr-plugin-softhddevice-0.1.2.tar.gz
vdr-plugin-softhddevice-0.1.2.tar.bz2
Cleanups + Version 0.1.2 released.0.1.2
-rw-r--r--ChangeLog9
-rw-r--r--Makefile2
-rw-r--r--Todo1
-rw-r--r--codec.c1
-rw-r--r--softhddev.c83
-rw-r--r--softhddevice.cpp2
6 files changed, 16 insertions, 82 deletions
diff --git a/ChangeLog b/ChangeLog
index 7573efb..e24c421 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/Makefile b/Makefile
index c14bf51..222100e 100644
--- a/Makefile
+++ b/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")
diff --git a/Todo b/Todo
index e92f99f..1b03a25 100644
--- a/Todo
+++ b/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
diff --git a/codec.c b/codec.c
index a5e3bbd..8bbc937 100644
--- a/codec.c
+++ b/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;
}
diff --git a/softhddev.c b/softhddev.c
index 60e4853..8e2b13c 100644
--- a/softhddev.c
+++ b/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
diff --git a/softhddevice.cpp b/softhddevice.cpp
index 962cf20..9ebe0ca 100644
--- a/softhddevice.cpp
+++ b/softhddevice.cpp
@@ -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");