diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2002-03-23 14:24:27 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2002-03-23 14:24:27 +0100 |
commit | a9e4cc7d635e590983ab81749fb806df63deb8f3 (patch) | |
tree | ff2ec494ec312c9ecb4fce40b9f048491ef71df0 | |
parent | 460e907cb911035c455a22fe203b39b63dc19b82 (diff) | |
download | vdr-a9e4cc7d635e590983ab81749fb806df63deb8f3.tar.gz vdr-a9e4cc7d635e590983ab81749fb806df63deb8f3.tar.bz2 |
Workaround for displaying still frames with the unpatched LinuxDVB driver
-rw-r--r-- | HISTORY | 3 | ||||
-rw-r--r-- | dvbapi.c | 20 |
2 files changed, 21 insertions, 2 deletions
@@ -1128,3 +1128,6 @@ Video Disk Recorder Revision History - Improved file I/O in case of EINTR, which may occur e.g. with heavy system load (thanks to Werner Fink). - Now writing the title of a recording into the 'summary.vdr' file. +- Workaround for displaying still frames with the unpatched LinuxDVB driver + (if anybody ever finds out why the unpatched driver doesn't display VDR's + still frames, please let me know). @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbapi.c 1.163 2002/03/16 14:20:47 kls Exp $ + * $Id: dvbapi.c 1.164 2002/03/23 14:14:03 kls Exp $ */ #include "dvbapi.h" @@ -1182,10 +1182,26 @@ void cReplayBuffer::StripAudioPackets(uchar *b, int Length, uchar Except) void cReplayBuffer::DisplayFrame(uchar *b, int Length) { StripAudioPackets(b, Length); - videoDisplayStillPicture sp = { (char *)b, Length }; CHECK(ioctl(audioDev, AUDIO_SET_AV_SYNC, false)); CHECK(ioctl(audioDev, AUDIO_SET_MUTE, true)); +/* Using the VIDEO_STILLPICTURE ioctl call would be the + correct way to display a still frame, but unfortunately this + doesn't work with frames from VDR. So let's do pretty much the + same here as in DVB/driver/dvb.c's play_iframe() - I have absolutely + no idea why it works this way, but doesn't work with VIDEO_STILLPICTURE. + If anybody ever finds out what could be changed so that VIDEO_STILLPICTURE + could be used, please let me know! + kls 2002-03-23 +*/ +//#define VIDEO_STILLPICTURE_WORKS_WITH_VDR_FRAMES +#ifdef VIDEO_STILLPICTURE_WORKS_WITH_VDR_FRAMES + videoDisplayStillPicture sp = { (char *)b, Length }; CHECK(ioctl(videoDev, VIDEO_STILLPICTURE, &sp)); +#else +#define MIN_IFRAME 400000 + for (int i = MIN_IFRAME / Length + 1; i > 0; i--) + safe_write(videoDev, b, Length); +#endif } void cReplayBuffer::Close(void) |