diff options
author | Johns <johns98@gmx.net> | 2011-12-21 12:50:14 +0100 |
---|---|---|
committer | Johns <johns98@gmx.net> | 2011-12-22 18:01:17 +0100 |
commit | afd7dfe40218fba6172625c51798787a48fce9af (patch) | |
tree | a543bc7592e91e5b717407fef5e5424f3e9acd55 /softhddev.c | |
parent | 37192d5b5394a9208a720058f704e433baa70aea (diff) | |
download | vdr-plugin-softhddevice-afd7dfe40218fba6172625c51798787a48fce9af.tar.gz vdr-plugin-softhddevice-afd7dfe40218fba6172625c51798787a48fce9af.tar.bz2 |
Initial vdpau support.
Diffstat (limited to 'softhddev.c')
-rw-r--r-- | softhddev.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/softhddev.c b/softhddev.c index a6c731b..a96c4d3 100644 --- a/softhddev.c +++ b/softhddev.c @@ -42,8 +42,6 @@ #include "video.h" #include "codec.h" -#define DEBUG - static char BrokenThreadsAndPlugins; ///< broken vdr threads and plugins ////////////////////////////////////////////////////////////////////////////// @@ -246,7 +244,6 @@ static void VideoEnqueue(int64_t pts, const void *data, int size) avpkt = &VideoPacketRb[VideoPacketWrite]; if (!avpkt->stream_index) { // add pts only for first added avpkt->pts = pts; - avpkt->dts = pts; } if (avpkt->stream_index + size + FF_INPUT_BUFFER_PADDING_SIZE >= avpkt->size) { @@ -257,10 +254,12 @@ static void VideoEnqueue(int64_t pts, const void *data, int size) av_grow_packet(avpkt, ((size + FF_INPUT_BUFFER_PADDING_SIZE + VIDEO_BUFFER_SIZE / 2) / (VIDEO_BUFFER_SIZE / 2)) * (VIDEO_BUFFER_SIZE / 2)); +#ifdef DEBUG if (avpkt->size < avpkt->stream_index + size + FF_INPUT_BUFFER_PADDING_SIZE) { abort(); } +#endif } #ifdef xxDEBUG if (!avpkt->stream_index) { // debug save time of first packet @@ -542,7 +541,21 @@ int PlayVideo(const uint8_t * data, int size) pts = (int64_t) (data[9] & 0x0E) << 29 | data[10] << 22 | (data[11] & 0xFE) << 14 | data[12] << 7 | (data[13] & 0xFE) >> 1; +#ifdef DEBUG //Debug(3, "video: pts %#012" PRIx64 "\n", pts); + if (data[13] != (((pts & 0x7F) << 1) | 1)) { + abort(); + } + if (data[12] != ((pts >> 7) & 0xFF)) { + abort(); + } + if (data[11] != ((((pts >> 15) & 0x7F) << 1) | 1)) { + abort(); + } + if (data[10] != ((pts >> 22) & 0xFF)) { + abort(); + } +#endif } // FIXME: no valid mpeg2/h264 detection yet @@ -627,6 +640,7 @@ void SetPlayMode(void) void Clear(void) { VideoClearBuffers = 1; + // FIXME: avcodec_flush_buffers // FIXME: flush audio buffers } |