mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Workaround for displaying still frames with the unpatched LinuxDVB driver
This commit is contained in:
parent
460e907cb9
commit
a9e4cc7d63
3
HISTORY
3
HISTORY
@ -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
|
- Improved file I/O in case of EINTR, which may occur e.g. with heavy system
|
||||||
load (thanks to Werner Fink).
|
load (thanks to Werner Fink).
|
||||||
- Now writing the title of a recording into the 'summary.vdr' file.
|
- 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).
|
||||||
|
20
dvbapi.c
20
dvbapi.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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"
|
#include "dvbapi.h"
|
||||||
@ -1182,10 +1182,26 @@ void cReplayBuffer::StripAudioPackets(uchar *b, int Length, uchar Except)
|
|||||||
void cReplayBuffer::DisplayFrame(uchar *b, int Length)
|
void cReplayBuffer::DisplayFrame(uchar *b, int Length)
|
||||||
{
|
{
|
||||||
StripAudioPackets(b, Length);
|
StripAudioPackets(b, Length);
|
||||||
videoDisplayStillPicture sp = { (char *)b, Length };
|
|
||||||
CHECK(ioctl(audioDev, AUDIO_SET_AV_SYNC, false));
|
CHECK(ioctl(audioDev, AUDIO_SET_AV_SYNC, false));
|
||||||
CHECK(ioctl(audioDev, AUDIO_SET_MUTE, true));
|
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));
|
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)
|
void cReplayBuffer::Close(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user