1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Improved channel switching

This commit is contained in:
Klaus Schmidinger 2001-06-12 21:50:40 +02:00
parent f8d8ea7233
commit afb2f1bdec
2 changed files with 27 additions and 16 deletions

View File

@ -491,7 +491,7 @@ Video Disk Recorder Revision History
- Updated version of Matthias Schniedermeyer's 'schnitt' tools.
- New 'master-timer' tool (thanks to Matthias Schniedermeyer).
2001-06-03: Version 0.81
2001-06-12: Version 0.81
- Fixed handling the case where the driver reports EAGAIN during recording,
but no data comes within 5 seconds.
@ -504,3 +504,4 @@ Video Disk Recorder Revision History
- Now 'runvdr' checks if the driver is already loaded (thanks to Henning
Holtschneider).
- Fixed removing recordings with Lifetime = 99.
- Improved channel switching.

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: dvbapi.c 1.70 2001/06/09 10:32:09 kls Exp $
* $Id: dvbapi.c 1.71 2001/06/12 21:48:48 kls Exp $
*/
#include "dvbapi.h"
@ -2046,6 +2046,12 @@ bool cDvbApi::SetChannel(int ChannelNumber, int FrequencyMHz, char Polarization,
CHECK(ioctl(fd_audio, AUDIO_CLEAR_BUFFER));
}
// Turn off current PIDs:
CHECK(ioctl(fd_demuxv, DMX_STOP));
CHECK(ioctl(fd_demuxa, DMX_STOP));
CHECK(ioctl(fd_demuxt, DMX_STOP));
bool ChannelSynced = false;
if (fd_qpskfe >= 0 && fd_sec >= 0) { // DVB-S
@ -2095,14 +2101,16 @@ bool cDvbApi::SetChannel(int ChannelNumber, int FrequencyMHz, char Polarization,
// Wait for channel sync:
if (cFile::FileReady(fd_qpskfe, 5000)) {
qpskEvent event;
int res = ioctl(fd_qpskfe, QPSK_GET_EVENT, &event);
if (res == -EBUFFEROVERFLOW)
res = ioctl(fd_qpskfe, QPSK_GET_EVENT, &event);
if (res >= 0)
ChannelSynced = event.type == FE_COMPLETION_EV;
else
esyslog(LOG_ERR, "ERROR in qpsk get event");
esyslog(LOG_ERR, "ERROR %d in qpsk get event", res);
}
else
fprintf(stderr, "ERROR: timeout while tuning\n");
}
else if (fd_qamfe >= 0) { // DVB-C
@ -2120,14 +2128,16 @@ bool cDvbApi::SetChannel(int ChannelNumber, int FrequencyMHz, char Polarization,
// Wait for channel sync:
if (cFile::FileReady(fd_qamfe, 5000)) {
qamEvent event;
int res = ioctl(fd_qamfe, QAM_GET_EVENT, &event);
if (res == -EBUFFEROVERFLOW)
res = ioctl(fd_qamfe, QAM_GET_EVENT, &event);
if (res >= 0)
ChannelSynced = event.type == FE_COMPLETION_EV;
else
esyslog(LOG_ERR, "ERROR in qam get event");
esyslog(LOG_ERR, "ERROR %d in qam get event", res);
}
else
fprintf(stderr, "ERROR: timeout while tuning\n");
}
else {
esyslog(LOG_ERR, "ERROR: attempt to set channel without DVB-S or DVB-C device");