mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Added support for ATSC devices
This commit is contained in:
parent
3e09f8565d
commit
ab9af4cea1
@ -2572,3 +2572,6 @@ Stephan Austerm
|
|||||||
|
|
||||||
Lars Hanisch <dvb@flensrocker.de>
|
Lars Hanisch <dvb@flensrocker.de>
|
||||||
for suggesting to assign the source character 'V' to "Analog Video"
|
for suggesting to assign the source character 'V' to "Analog Video"
|
||||||
|
|
||||||
|
Alex Lasnier <alex@fepg.org>
|
||||||
|
for adding tuning support for ATSC devices
|
||||||
|
4
HISTORY
4
HISTORY
@ -6384,8 +6384,10 @@ Video Disk Recorder Revision History
|
|||||||
tracks appear in the "Audio" menu. Dolby Digital is always recorded.
|
tracks appear in the "Audio" menu. Dolby Digital is always recorded.
|
||||||
This obsoletes the DOLBYINREC patch.
|
This obsoletes the DOLBYINREC patch.
|
||||||
|
|
||||||
2010-03-05: Version 1.7.14
|
2010-03-06: Version 1.7.14
|
||||||
|
|
||||||
- Fixed handling empty strings in cSource::FromString().
|
- Fixed handling empty strings in cSource::FromString().
|
||||||
- Assigned the source character 'I' to "IPTV" (suggested by Rolf Ahrenberg).
|
- Assigned the source character 'I' to "IPTV" (suggested by Rolf Ahrenberg).
|
||||||
- Assigned the source character 'V' to "Analog Video" (suggested by Lars Hanisch).
|
- Assigned the source character 'V' to "Analog Video" (suggested by Lars Hanisch).
|
||||||
|
- Added support for ATSC devices (thanks to Alex Lasnier).
|
||||||
|
This obsoletes the ATSC patch.
|
||||||
|
@ -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: channels.h 2.8 2010/02/21 14:05:49 kls Exp $
|
* $Id: channels.h 2.9 2010/03/06 11:54:17 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __CHANNELS_H
|
#ifndef __CHANNELS_H
|
||||||
@ -172,6 +172,7 @@ public:
|
|||||||
const char *Parameters(void) const { return parameters; }
|
const char *Parameters(void) const { return parameters; }
|
||||||
const cLinkChannels* LinkChannels(void) const { return linkChannels; }
|
const cLinkChannels* LinkChannels(void) const { return linkChannels; }
|
||||||
const cChannel *RefChannel(void) const { return refChannel; }
|
const cChannel *RefChannel(void) const { return refChannel; }
|
||||||
|
bool IsAtsc(void) const { return cSource::IsAtsc(source); }
|
||||||
bool IsCable(void) const { return cSource::IsCable(source); }
|
bool IsCable(void) const { return cSource::IsCable(source); }
|
||||||
bool IsSat(void) const { return cSource::IsSat(source); }
|
bool IsSat(void) const { return cSource::IsSat(source); }
|
||||||
bool IsTerr(void) const { return cSource::IsTerr(source); }
|
bool IsTerr(void) const { return cSource::IsTerr(source); }
|
||||||
|
24
dvbdevice.c
24
dvbdevice.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: dvbdevice.c 2.29 2010/02/21 17:10:35 kls Exp $
|
* $Id: dvbdevice.c 2.30 2010/03/06 11:07:05 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dvbdevice.h"
|
#include "dvbdevice.h"
|
||||||
@ -27,6 +27,8 @@
|
|||||||
#define DVBC_LOCK_TIMEOUT 2000 //ms
|
#define DVBC_LOCK_TIMEOUT 2000 //ms
|
||||||
#define DVBT_TUNE_TIMEOUT 9000 //ms
|
#define DVBT_TUNE_TIMEOUT 9000 //ms
|
||||||
#define DVBT_LOCK_TIMEOUT 2000 //ms
|
#define DVBT_LOCK_TIMEOUT 2000 //ms
|
||||||
|
#define ATSC_TUNE_TIMEOUT 9000 //ms
|
||||||
|
#define ATSC_LOCK_TIMEOUT 2000 //ms
|
||||||
|
|
||||||
// --- DVB Parameter Maps ----------------------------------------------------
|
// --- DVB Parameter Maps ----------------------------------------------------
|
||||||
|
|
||||||
@ -189,8 +191,8 @@ cString cDvbTransponderParameters::ToString(char Type) const
|
|||||||
ST(" CST") q += PrintParameter(q, 'C', MapToUser(coderateH, CoderateValues));
|
ST(" CST") q += PrintParameter(q, 'C', MapToUser(coderateH, CoderateValues));
|
||||||
ST(" T") q += PrintParameter(q, 'D', MapToUser(coderateL, CoderateValues));
|
ST(" T") q += PrintParameter(q, 'D', MapToUser(coderateL, CoderateValues));
|
||||||
ST(" T") q += PrintParameter(q, 'G', MapToUser(guard, GuardValues));
|
ST(" T") q += PrintParameter(q, 'G', MapToUser(guard, GuardValues));
|
||||||
ST("CST") q += PrintParameter(q, 'I', MapToUser(inversion, InversionValues));
|
ST("ACST") q += PrintParameter(q, 'I', MapToUser(inversion, InversionValues));
|
||||||
ST("CST") q += PrintParameter(q, 'M', MapToUser(modulation, ModulationValues));
|
ST("ACST") q += PrintParameter(q, 'M', MapToUser(modulation, ModulationValues));
|
||||||
ST(" S ") q += PrintParameter(q, 'O', MapToUser(rollOff, RollOffValues));
|
ST(" S ") q += PrintParameter(q, 'O', MapToUser(rollOff, RollOffValues));
|
||||||
ST(" S ") q += PrintParameter(q, 'S', MapToUser(system, SystemValues));
|
ST(" S ") q += PrintParameter(q, 'S', MapToUser(system, SystemValues));
|
||||||
ST(" T") q += PrintParameter(q, 'T', MapToUser(transmission, TransmissionValues));
|
ST(" T") q += PrintParameter(q, 'T', MapToUser(transmission, TransmissionValues));
|
||||||
@ -486,6 +488,16 @@ bool cDvbTuner::SetFrontend(void)
|
|||||||
tuneTimeout = DVBT_TUNE_TIMEOUT;
|
tuneTimeout = DVBT_TUNE_TIMEOUT;
|
||||||
lockTimeout = DVBT_LOCK_TIMEOUT;
|
lockTimeout = DVBT_LOCK_TIMEOUT;
|
||||||
}
|
}
|
||||||
|
else if (frontendType == SYS_ATSC) {
|
||||||
|
// ATSC
|
||||||
|
SETCMD(DTV_DELIVERY_SYSTEM, frontendType);
|
||||||
|
SETCMD(DTV_FREQUENCY, FrequencyToHz(channel.Frequency()));
|
||||||
|
SETCMD(DTV_INVERSION, dtp.Inversion());
|
||||||
|
SETCMD(DTV_MODULATION, dtp.Modulation());
|
||||||
|
|
||||||
|
tuneTimeout = ATSC_TUNE_TIMEOUT;
|
||||||
|
lockTimeout = ATSC_LOCK_TIMEOUT;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
esyslog("ERROR: attempt to set channel with unknown DVB frontend type");
|
esyslog("ERROR: attempt to set channel with unknown DVB frontend type");
|
||||||
return false;
|
return false;
|
||||||
@ -601,10 +613,10 @@ cOsdItem *cDvbSourceParam::GetOsdItem(void)
|
|||||||
case 0: ST(" S ") return new cMenuEditChrItem( tr("Polarization"), &dtp.polarization, "hvlr"); else return GetOsdItem();
|
case 0: ST(" S ") return new cMenuEditChrItem( tr("Polarization"), &dtp.polarization, "hvlr"); else return GetOsdItem();
|
||||||
case 1: ST(" S ") return new cMenuEditMapItem( tr("System"), &dtp.system, SystemValues); else return GetOsdItem();
|
case 1: ST(" S ") return new cMenuEditMapItem( tr("System"), &dtp.system, SystemValues); else return GetOsdItem();
|
||||||
case 2: ST(" CS ") return new cMenuEditIntItem( tr("Srate"), &data.srate); else return GetOsdItem();
|
case 2: ST(" CS ") return new cMenuEditIntItem( tr("Srate"), &data.srate); else return GetOsdItem();
|
||||||
case 3: ST("CST") return new cMenuEditMapItem( tr("Inversion"), &dtp.inversion, InversionValues); else return GetOsdItem();
|
case 3: ST("ACST") return new cMenuEditMapItem( tr("Inversion"), &dtp.inversion, InversionValues); else return GetOsdItem();
|
||||||
case 4: ST(" CST") return new cMenuEditMapItem( tr("CoderateH"), &dtp.coderateH, CoderateValues); else return GetOsdItem();
|
case 4: ST(" CST") return new cMenuEditMapItem( tr("CoderateH"), &dtp.coderateH, CoderateValues); else return GetOsdItem();
|
||||||
case 5: ST(" T") return new cMenuEditMapItem( tr("CoderateL"), &dtp.coderateL, CoderateValues); else return GetOsdItem();
|
case 5: ST(" T") return new cMenuEditMapItem( tr("CoderateL"), &dtp.coderateL, CoderateValues); else return GetOsdItem();
|
||||||
case 6: ST("CST") return new cMenuEditMapItem( tr("Modulation"), &dtp.modulation, ModulationValues); else return GetOsdItem();
|
case 6: ST("ACST") return new cMenuEditMapItem( tr("Modulation"), &dtp.modulation, ModulationValues); else return GetOsdItem();
|
||||||
case 7: ST(" T") return new cMenuEditMapItem( tr("Bandwidth"), &dtp.bandwidth, BandwidthValues); else return GetOsdItem();
|
case 7: ST(" T") return new cMenuEditMapItem( tr("Bandwidth"), &dtp.bandwidth, BandwidthValues); else return GetOsdItem();
|
||||||
case 8: ST(" T") return new cMenuEditMapItem( tr("Transmission"), &dtp.transmission, TransmissionValues); else return GetOsdItem();
|
case 8: ST(" T") return new cMenuEditMapItem( tr("Transmission"), &dtp.transmission, TransmissionValues); else return GetOsdItem();
|
||||||
case 9: ST(" T") return new cMenuEditMapItem( tr("Guard"), &dtp.guard, GuardValues); else return GetOsdItem();
|
case 9: ST(" T") return new cMenuEditMapItem( tr("Guard"), &dtp.guard, GuardValues); else return GetOsdItem();
|
||||||
@ -745,6 +757,7 @@ bool cDvbDevice::Probe(int Adapter, int Frontend)
|
|||||||
|
|
||||||
bool cDvbDevice::Initialize(void)
|
bool cDvbDevice::Initialize(void)
|
||||||
{
|
{
|
||||||
|
new cDvbSourceParam('A', "ATSC");
|
||||||
new cDvbSourceParam('C', "DVB-C");
|
new cDvbSourceParam('C', "DVB-C");
|
||||||
new cDvbSourceParam('S', "DVB-S");
|
new cDvbSourceParam('S', "DVB-S");
|
||||||
new cDvbSourceParam('T', "DVB-T");
|
new cDvbSourceParam('T', "DVB-T");
|
||||||
@ -863,6 +876,7 @@ bool cDvbDevice::ProvidesSource(int Source) const
|
|||||||
{
|
{
|
||||||
int type = Source & cSource::st_Mask;
|
int type = Source & cSource::st_Mask;
|
||||||
return type == cSource::stNone
|
return type == cSource::stNone
|
||||||
|
|| type == cSource::stAtsc && (frontendType == SYS_ATSC)
|
||||||
|| type == cSource::stCable && (frontendType == SYS_DVBC_ANNEX_AC || frontendType == SYS_DVBC_ANNEX_B)
|
|| type == cSource::stCable && (frontendType == SYS_DVBC_ANNEX_AC || frontendType == SYS_DVBC_ANNEX_B)
|
||||||
|| type == cSource::stSat && (frontendType == SYS_DVBS || frontendType == SYS_DVBS2)
|
|| type == cSource::stSat && (frontendType == SYS_DVBS || frontendType == SYS_DVBS2)
|
||||||
|| type == cSource::stTerr && (frontendType == SYS_DVBT);
|
|| type == cSource::stTerr && (frontendType == SYS_DVBT);
|
||||||
|
25
pat.c
25
pat.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: pat.c 2.7 2010/01/01 15:40:05 kls Exp $
|
* $Id: pat.c 2.8 2010/03/06 12:00:30 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pat.h"
|
#include "pat.h"
|
||||||
@ -447,6 +447,29 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 0x81: // STREAMTYPE_USER_PRIVATE
|
||||||
|
if (Channel->IsAtsc()) { // ATSC AC-3
|
||||||
|
char lang[MAXLANGCODE1] = { 0 };
|
||||||
|
SI::Descriptor *d;
|
||||||
|
for (SI::Loop::Iterator it; (d = stream.streamDescriptors.getNext(it)); ) {
|
||||||
|
switch (d->getDescriptorTag()) {
|
||||||
|
case SI::ISO639LanguageDescriptorTag: {
|
||||||
|
SI::ISO639LanguageDescriptor *ld = (SI::ISO639LanguageDescriptor *)d;
|
||||||
|
strn0cpy(lang, I18nNormalizeLanguageCode(ld->languageCode), MAXLANGCODE1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default: ;
|
||||||
|
}
|
||||||
|
delete d;
|
||||||
|
}
|
||||||
|
if (NumDpids < MAXDPIDS) {
|
||||||
|
Dpids[NumDpids] = esPid;
|
||||||
|
strn0cpy(DLangs[NumDpids], lang, MAXLANGCODE1);
|
||||||
|
NumDpids++;
|
||||||
|
}
|
||||||
|
ProcessCaDescriptors = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
default: ;//printf("PID: %5d %5d %2d %3d %3d\n", pmt.getServiceId(), stream.getPid(), stream.getStreamType(), pmt.getVersionNumber(), Channel->Number());
|
default: ;//printf("PID: %5d %5d %2d %3d %3d\n", pmt.getServiceId(), stream.getPid(), stream.getStreamType(), pmt.getVersionNumber(), Channel->Number());
|
||||||
}
|
}
|
||||||
if (ProcessCaDescriptors) {
|
if (ProcessCaDescriptors) {
|
||||||
|
@ -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: sourceparams.c 1.1 2010/02/28 12:15:49 kls Exp $
|
* $Id: sourceparams.c 1.2 2010/03/06 11:13:39 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "sourceparams.h"
|
#include "sourceparams.h"
|
||||||
@ -21,7 +21,7 @@ cSourceParam::cSourceParam(char Source, const char *Description)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SourceParams.Add(this);
|
SourceParams.Add(this);
|
||||||
if (Source != 'C' && Source != 'S' && Source != 'T')
|
if (!strchr("ACST", Source)) // no, it's not "ATSC" ;-)
|
||||||
Sources.Add(new cSource(Source, Description));
|
Sources.Add(new cSource(Source, Description));
|
||||||
dsyslog("registered source parameters for '%c - %s'", source, Description);
|
dsyslog("registered source parameters for '%c - %s'", source, Description);
|
||||||
}
|
}
|
||||||
|
@ -196,6 +196,10 @@ C DVB-C
|
|||||||
|
|
||||||
T DVB-T
|
T DVB-T
|
||||||
|
|
||||||
|
# ATSC
|
||||||
|
|
||||||
|
A ATSC
|
||||||
|
|
||||||
# Plugins
|
# Plugins
|
||||||
|
|
||||||
I IPTV
|
I IPTV
|
||||||
|
@ -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: sources.h 2.1 2010/02/21 16:11:19 kls Exp $
|
* $Id: sources.h 2.2 2010/03/06 11:53:54 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __SOURCES_H
|
#ifndef __SOURCES_H
|
||||||
@ -16,6 +16,7 @@ class cSource : public cListObject {
|
|||||||
public:
|
public:
|
||||||
enum eSourceType {
|
enum eSourceType {
|
||||||
stNone = 0x00000000,
|
stNone = 0x00000000,
|
||||||
|
stAtsc = ('A' << 24),
|
||||||
stCable = ('C' << 24),
|
stCable = ('C' << 24),
|
||||||
stSat = ('S' << 24),
|
stSat = ('S' << 24),
|
||||||
stTerr = ('T' << 24),
|
stTerr = ('T' << 24),
|
||||||
@ -35,6 +36,7 @@ public:
|
|||||||
static cString ToString(int Code);
|
static cString ToString(int Code);
|
||||||
static int FromString(const char *s);
|
static int FromString(const char *s);
|
||||||
static int FromData(eSourceType SourceType, int Position = 0, bool East = false);
|
static int FromData(eSourceType SourceType, int Position = 0, bool East = false);
|
||||||
|
static bool IsAtsc(int Code) { return (Code & st_Mask) == stAtsc; }
|
||||||
static bool IsCable(int Code) { return (Code & st_Mask) == stCable; }
|
static bool IsCable(int Code) { return (Code & st_Mask) == stCable; }
|
||||||
static bool IsSat(int Code) { return (Code & st_Mask) == stSat; }
|
static bool IsSat(int Code) { return (Code & st_Mask) == stSat; }
|
||||||
static bool IsTerr(int Code) { return (Code & st_Mask) == stTerr; }
|
static bool IsTerr(int Code) { return (Code & st_Mask) == stTerr; }
|
||||||
|
5
vdr.5
5
vdr.5
@ -8,7 +8,7 @@
|
|||||||
.\" License as specified in the file COPYING that comes with the
|
.\" License as specified in the file COPYING that comes with the
|
||||||
.\" vdr distribution.
|
.\" vdr distribution.
|
||||||
.\"
|
.\"
|
||||||
.\" $Id: vdr.5 2.15 2010/02/21 14:29:06 kls Exp $
|
.\" $Id: vdr.5 2.16 2010/03/06 12:01:00 kls Exp $
|
||||||
.\"
|
.\"
|
||||||
.TH vdr 5 "10 Feb 2008" "1.6" "Video Disk Recorder Files"
|
.TH vdr 5 "10 Feb 2008" "1.6" "Video Disk Recorder Files"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
@ -402,8 +402,9 @@ The first character of the \fBcode\fR must be one of
|
|||||||
.TS
|
.TS
|
||||||
tab (@);
|
tab (@);
|
||||||
l l.
|
l l.
|
||||||
\fBS\fR@Satellite
|
\fBA\fR@ATSC
|
||||||
\fBC\fR@Cable
|
\fBC\fR@Cable
|
||||||
|
\fBS\fR@Satellite
|
||||||
\fBT\fR@Terrestrial
|
\fBT\fR@Terrestrial
|
||||||
.TE
|
.TE
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user