Implemented TT PID

This commit is contained in:
Klaus Schmidinger 2001-02-03 16:28:03 +01:00
parent 4041359317
commit d303632efe
9 changed files with 42 additions and 18 deletions

View File

@ -40,13 +40,16 @@ Bastian Guse <bastian@nocopy.de>
for writing the FORMATS entry for timers.conf for writing the FORMATS entry for timers.conf
Matthias Schniedermeyer <ms@citd.de> Matthias Schniedermeyer <ms@citd.de>
for implementing the 'MarkInstantRecord' setup option. for implementing the 'MarkInstantRecord' setup option
Miha Setina <mihasetina@softhome.net> Miha Setina <mihasetina@softhome.net>
for translating the OSD texts to the Slovenian language. for translating the OSD texts to the Slovenian language
Alberto Carraro <bertocar@tin.it> Alberto Carraro <bertocar@tin.it>
for translating the OSD texts to the Italian language. for translating the OSD texts to the Italian language
Deti Fliegl <deti@fliegl.de> Deti Fliegl <deti@fliegl.de>
for implementing the 'CurrentChannel' setup parameter. for implementing the 'CurrentChannel' setup parameter
Dave Chapman <dave@dchapman.com>
for implementing support for the teletext PID

View File

@ -13,7 +13,7 @@ Video Disk Recorder File Formats
A "channel definition" is a line with channel data, where the fields A "channel definition" is a line with channel data, where the fields
are separated by ':' characters: are separated by ':' characters:
Example: "RTL:12188:h:1:27500:163:104:0:12003" Example: "RTL:12188:h:1:27500:163:104:0:0:12003"
The fields in a channel definition have the following meaning (from left The fields in a channel definition have the following meaning (from left
to right): to right):
@ -26,6 +26,7 @@ Video Disk Recorder File Formats
- Symbol rate - Symbol rate
- Video PID - Video PID
- Audio PID - Audio PID
- Teletext PID
- Conditional Access (0 = Free To Air, 1 = can be decrypted by the first - Conditional Access (0 = Free To Air, 1 = can be decrypted by the first
DVB card, 2 = can be decrypted by the second DVB card) DVB card, 2 = can be decrypted by the second DVB card)
- Program Number - Program Number

View File

@ -371,3 +371,7 @@ Video Disk Recorder Revision History
first non-blank character of a menu item is a digit in the range 1..9, that first non-blank character of a menu item is a digit in the range 1..9, that
item can be selected by pressing the respective numeric key on the remote item can be selected by pressing the respective numeric key on the remote
control. control.
- The channel data in 'channels.conf' now contains the teletext PID (thanks to
Dave Chapman). Existing files will be read normally (and the teletext PID set
to 0), but once they are written back (due to some channel editing) the file
will have the new format.

View File

@ -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: config.c 1.39 2001/01/14 15:29:15 kls Exp $ * $Id: config.c 1.40 2001/02/03 16:19:42 kls Exp $
*/ */
#include "config.h" #include "config.h"
@ -199,6 +199,7 @@ cChannel::cChannel(const cChannel *Channel)
srate = Channel ? Channel->srate : 27500; srate = Channel ? Channel->srate : 27500;
vpid = Channel ? Channel->vpid : 255; vpid = Channel ? Channel->vpid : 255;
apid = Channel ? Channel->apid : 256; apid = Channel ? Channel->apid : 256;
tpid = Channel ? Channel->tpid : 32;
ca = Channel ? Channel->ca : 0; ca = Channel ? Channel->ca : 0;
pnr = Channel ? Channel->pnr : 0; pnr = Channel ? Channel->pnr : 0;
groupSep = Channel ? Channel->groupSep : false; groupSep = Channel ? Channel->groupSep : false;
@ -216,7 +217,7 @@ const char *cChannel::ToText(cChannel *Channel)
if (Channel->groupSep) if (Channel->groupSep)
asprintf(&buffer, ":%s\n", s); asprintf(&buffer, ":%s\n", s);
else else
asprintf(&buffer, "%s:%d:%c:%d:%d:%d:%d:%d:%d\n", s, Channel->frequency, Channel->polarization, Channel->diseqc, Channel->srate, Channel->vpid, Channel->apid, Channel->ca, Channel->pnr); asprintf(&buffer, "%s:%d:%c:%d:%d:%d:%d:%d:%d:%d\n", s, Channel->frequency, Channel->polarization, Channel->diseqc, Channel->srate, Channel->vpid, Channel->apid, Channel->tpid, Channel->ca, Channel->pnr);
return buffer; return buffer;
} }
@ -239,8 +240,15 @@ bool cChannel::Parse(const char *s)
} }
else { else {
groupSep = false; groupSep = false;
int fields = sscanf(s, "%a[^:]:%d:%c:%d:%d:%d:%d:%d:%d", &buffer, &frequency, &polarization, &diseqc, &srate, &vpid, &apid, &ca, &pnr); //XXX
if (fields == 9) { int fields = sscanf(s, "%a[^:]:%d:%c:%d:%d:%d:%d:%d:%d:%d", &buffer, &frequency, &polarization, &diseqc, &srate, &vpid, &apid, &tpid, &ca, &pnr);
if (fields >= 9) {
if (fields == 9) {
// allow reading of old format
pnr = ca;
ca = tpid;
tpid = 0;
}
strn0cpy(name, buffer, MaxChannelName); strn0cpy(name, buffer, MaxChannelName);
delete buffer; delete buffer;
} }
@ -265,7 +273,7 @@ bool cChannel::Switch(cDvbApi *DvbApi, bool Log)
isyslog(LOG_INFO, "switching to channel %d", number); isyslog(LOG_INFO, "switching to channel %d", number);
} }
for (int i = 3; i--;) { for (int i = 3; i--;) {
if (DvbApi->SetChannel(number, frequency, polarization, diseqc, srate, vpid, apid, ca, pnr)) if (DvbApi->SetChannel(number, frequency, polarization, diseqc, srate, vpid, apid, tpid, ca, pnr))
return true; return true;
esyslog(LOG_ERR, "retrying"); esyslog(LOG_ERR, "retrying");
} }

View File

@ -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: config.h 1.39 2001/02/02 15:22:47 kls Exp $ * $Id: config.h 1.40 2001/02/03 15:55:45 kls Exp $
*/ */
#ifndef __CONFIG_H #ifndef __CONFIG_H
@ -93,6 +93,7 @@ public:
int srate; int srate;
int vpid; int vpid;
int apid; int apid;
int tpid;
int ca; int ca;
int pnr; int pnr;
int number; // Sequence number assigned on load int number; // Sequence number assigned on load

View File

@ -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.55 2001/02/02 15:35:44 kls Exp $ * $Id: dvbapi.c 1.56 2001/02/03 16:00:23 kls Exp $
*/ */
#include "dvbapi.h" #include "dvbapi.h"
@ -2170,7 +2170,7 @@ void cDvbApi::Flush(void)
#endif #endif
} }
bool cDvbApi::SetChannel(int ChannelNumber, int FrequencyMHz, char Polarization, int Diseqc, int Srate, int Vpid, int Apid, int Ca, int Pnr) bool cDvbApi::SetChannel(int ChannelNumber, int FrequencyMHz, char Polarization, int Diseqc, int Srate, int Vpid, int Apid, int Tpid, int Ca, int Pnr)
{ {
if (videoDev >= 0) { if (videoDev >= 0) {
cThreadLock ThreadLock(siProcessor); // makes sure the siProcessor won't access the vbi-device while switching cThreadLock ThreadLock(siProcessor); // makes sure the siProcessor won't access the vbi-device while switching
@ -2192,6 +2192,7 @@ bool cDvbApi::SetChannel(int ChannelNumber, int FrequencyMHz, char Polarization,
front.volt = (Polarization == 'v' || Polarization == 'V') ? 0 : 1; front.volt = (Polarization == 'v' || Polarization == 'V') ? 0 : 1;
front.video_pid = Vpid; front.video_pid = Vpid;
front.audio_pid = Apid; front.audio_pid = Apid;
front.tt_pid = Tpid;
front.fec = 8; front.fec = 8;
front.AFC = 1; front.AFC = 1;
ioctl(videoDev, VIDIOCSFRONTEND, &front); ioctl(videoDev, VIDIOCSFRONTEND, &front);
@ -2205,7 +2206,7 @@ bool cDvbApi::SetChannel(int ChannelNumber, int FrequencyMHz, char Polarization,
cDvbApi *CaDvbApi = GetDvbApi(Ca, 0); cDvbApi *CaDvbApi = GetDvbApi(Ca, 0);
if (CaDvbApi) { if (CaDvbApi) {
if (!CaDvbApi->Recording()) { if (!CaDvbApi->Recording()) {
if (CaDvbApi->SetChannel(ChannelNumber, FrequencyMHz, Polarization, Diseqc, Srate, Vpid, Apid, Ca, Pnr)) if (CaDvbApi->SetChannel(ChannelNumber, FrequencyMHz, Polarization, Diseqc, Srate, Vpid, Apid, Tpid, Ca, Pnr))
transferringFromDvbApi = CaDvbApi->StartTransfer(videoDev); transferringFromDvbApi = CaDvbApi->StartTransfer(videoDev);
} }
} }

View File

@ -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.h 1.31 2001/02/02 15:21:30 kls Exp $ * $Id: dvbapi.h 1.32 2001/02/03 15:59:35 kls Exp $
*/ */
#ifndef __DVBAPI_H #ifndef __DVBAPI_H
@ -167,7 +167,7 @@ public:
private: private:
int currentChannel; int currentChannel;
public: public:
bool SetChannel(int ChannelNumber, int FrequencyMHz, char Polarization, int Diseqc, int Srate, int Vpid, int Apid, int Ca, int Pnr); bool SetChannel(int ChannelNumber, int FrequencyMHz, char Polarization, int Diseqc, int Srate, int Vpid, int Apid, int Tpid, int Ca, int Pnr);
static int CurrentChannel(void) { return PrimaryDvbApi ? PrimaryDvbApi->currentChannel : 0; } static int CurrentChannel(void) { return PrimaryDvbApi ? PrimaryDvbApi->currentChannel : 0; }
int Channel(void) { return currentChannel; } int Channel(void) { return currentChannel; }

7
i18n.c
View File

@ -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: i18n.c 1.8 2001/01/06 16:17:39 kls Exp $ * $Id: i18n.c 1.9 2001/02/03 16:06:04 kls Exp $
* *
* Slovenian translations provided by Miha Setina <mihasetina@softhome.net> * Slovenian translations provided by Miha Setina <mihasetina@softhome.net>
* Italian translations provided by Alberto Carraro <bertocar@tin.it> * Italian translations provided by Alberto Carraro <bertocar@tin.it>
@ -253,6 +253,11 @@ const tPhrase Phrases[] = {
"Apid", "Apid",
"Apid", "Apid",
}, },
{ "Tpid",
"Tpid",
"Tpid",
"Tpid",
},
{ "CA", { "CA",
"CA", "CA",
"CA", "CA",

3
menu.c
View File

@ -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: menu.c 1.61 2001/02/03 15:32:47 kls Exp $ * $Id: menu.c 1.62 2001/02/03 16:05:31 kls Exp $
*/ */
#include "menu.h" #include "menu.h"
@ -541,6 +541,7 @@ cMenuEditChannel::cMenuEditChannel(int Index)
Add(new cMenuEditIntItem( tr("Srate"), &data.srate, 22000, 27500)); //TODO exact limits - toggle??? Add(new cMenuEditIntItem( tr("Srate"), &data.srate, 22000, 27500)); //TODO exact limits - toggle???
Add(new cMenuEditIntItem( tr("Vpid"), &data.vpid, 0, 10000)); //TODO exact limits??? Add(new cMenuEditIntItem( tr("Vpid"), &data.vpid, 0, 10000)); //TODO exact limits???
Add(new cMenuEditIntItem( tr("Apid"), &data.apid, 0, 10000)); //TODO exact limits??? Add(new cMenuEditIntItem( tr("Apid"), &data.apid, 0, 10000)); //TODO exact limits???
Add(new cMenuEditIntItem( tr("Tpid"), &data.tpid, 0, 10000)); //TODO exact limits???
Add(new cMenuEditIntItem( tr("CA"), &data.ca, 0, cDvbApi::NumDvbApis)); Add(new cMenuEditIntItem( tr("CA"), &data.ca, 0, cDvbApi::NumDvbApis));
Add(new cMenuEditIntItem( tr("Pnr"), &data.pnr, 0)); Add(new cMenuEditIntItem( tr("Pnr"), &data.pnr, 0));
} }