mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Implemented TT PID
This commit is contained in:
parent
4041359317
commit
d303632efe
11
CONTRIBUTORS
11
CONTRIBUTORS
@ -40,13 +40,16 @@ Bastian Guse <bastian@nocopy.de>
|
||||
for writing the FORMATS entry for timers.conf
|
||||
|
||||
Matthias Schniedermeyer <ms@citd.de>
|
||||
for implementing the 'MarkInstantRecord' setup option.
|
||||
for implementing the 'MarkInstantRecord' setup option
|
||||
|
||||
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>
|
||||
for translating the OSD texts to the Italian language.
|
||||
for translating the OSD texts to the Italian language
|
||||
|
||||
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
|
||||
|
3
FORMATS
3
FORMATS
@ -13,7 +13,7 @@ Video Disk Recorder File Formats
|
||||
|
||||
A "channel definition" is a line with channel data, where the fields
|
||||
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
|
||||
to right):
|
||||
@ -26,6 +26,7 @@ Video Disk Recorder File Formats
|
||||
- Symbol rate
|
||||
- Video PID
|
||||
- Audio PID
|
||||
- Teletext PID
|
||||
- Conditional Access (0 = Free To Air, 1 = can be decrypted by the first
|
||||
DVB card, 2 = can be decrypted by the second DVB card)
|
||||
- Program Number
|
||||
|
4
HISTORY
4
HISTORY
@ -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
|
||||
item can be selected by pressing the respective numeric key on the remote
|
||||
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.
|
||||
|
18
config.c
18
config.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* 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"
|
||||
@ -199,6 +199,7 @@ cChannel::cChannel(const cChannel *Channel)
|
||||
srate = Channel ? Channel->srate : 27500;
|
||||
vpid = Channel ? Channel->vpid : 255;
|
||||
apid = Channel ? Channel->apid : 256;
|
||||
tpid = Channel ? Channel->tpid : 32;
|
||||
ca = Channel ? Channel->ca : 0;
|
||||
pnr = Channel ? Channel->pnr : 0;
|
||||
groupSep = Channel ? Channel->groupSep : false;
|
||||
@ -216,7 +217,7 @@ const char *cChannel::ToText(cChannel *Channel)
|
||||
if (Channel->groupSep)
|
||||
asprintf(&buffer, ":%s\n", s);
|
||||
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;
|
||||
}
|
||||
|
||||
@ -239,8 +240,15 @@ bool cChannel::Parse(const char *s)
|
||||
}
|
||||
else {
|
||||
groupSep = false;
|
||||
int fields = sscanf(s, "%a[^:]:%d:%c:%d:%d:%d:%d:%d:%d", &buffer, &frequency, &polarization, &diseqc, &srate, &vpid, &apid, &ca, &pnr);
|
||||
if (fields == 9) {
|
||||
//XXX
|
||||
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);
|
||||
delete buffer;
|
||||
}
|
||||
@ -265,7 +273,7 @@ bool cChannel::Switch(cDvbApi *DvbApi, bool Log)
|
||||
isyslog(LOG_INFO, "switching to channel %d", number);
|
||||
}
|
||||
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;
|
||||
esyslog(LOG_ERR, "retrying");
|
||||
}
|
||||
|
3
config.h
3
config.h
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* 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
|
||||
@ -93,6 +93,7 @@ public:
|
||||
int srate;
|
||||
int vpid;
|
||||
int apid;
|
||||
int tpid;
|
||||
int ca;
|
||||
int pnr;
|
||||
int number; // Sequence number assigned on load
|
||||
|
7
dvbapi.c
7
dvbapi.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* 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"
|
||||
@ -2170,7 +2170,7 @@ void cDvbApi::Flush(void)
|
||||
#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) {
|
||||
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.video_pid = Vpid;
|
||||
front.audio_pid = Apid;
|
||||
front.tt_pid = Tpid;
|
||||
front.fec = 8;
|
||||
front.AFC = 1;
|
||||
ioctl(videoDev, VIDIOCSFRONTEND, &front);
|
||||
@ -2205,7 +2206,7 @@ bool cDvbApi::SetChannel(int ChannelNumber, int FrequencyMHz, char Polarization,
|
||||
cDvbApi *CaDvbApi = GetDvbApi(Ca, 0);
|
||||
if (CaDvbApi) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
4
dvbapi.h
4
dvbapi.h
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* 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
|
||||
@ -167,7 +167,7 @@ public:
|
||||
private:
|
||||
int currentChannel;
|
||||
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; }
|
||||
int Channel(void) { return currentChannel; }
|
||||
|
||||
|
7
i18n.c
7
i18n.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* 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>
|
||||
* Italian translations provided by Alberto Carraro <bertocar@tin.it>
|
||||
@ -253,6 +253,11 @@ const tPhrase Phrases[] = {
|
||||
"Apid",
|
||||
"Apid",
|
||||
},
|
||||
{ "Tpid",
|
||||
"Tpid",
|
||||
"Tpid",
|
||||
"Tpid",
|
||||
},
|
||||
{ "CA",
|
||||
"CA",
|
||||
"CA",
|
||||
|
3
menu.c
3
menu.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* 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"
|
||||
@ -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("Vpid"), &data.vpid, 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("Pnr"), &data.pnr, 0));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user