mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Completely switched to the HEAD driver version
This commit is contained in:
parent
8c18d579ef
commit
0598e41418
6
HISTORY
6
HISTORY
@ -1670,3 +1670,9 @@ Video Disk Recorder Revision History
|
|||||||
- Fixed a crash when learning the keys of several remote controls and pressing
|
- Fixed a crash when learning the keys of several remote controls and pressing
|
||||||
buttons of those that have already been learned (thanks to Oliver Endriss for
|
buttons of those that have already been learned (thanks to Oliver Endriss for
|
||||||
reporting this one).
|
reporting this one).
|
||||||
|
|
||||||
|
2002-11-01: Version 1.1.15
|
||||||
|
|
||||||
|
- Completely switched to the new CVS HEAD version of the linux-dvb driver.
|
||||||
|
The NEWSTRUCT compile time switch is now obsolete. The required driver is now
|
||||||
|
the CVS HEAD version dated 2002-11-01 or later.
|
||||||
|
7
Makefile
7
Makefile
@ -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: Makefile 1.49 2002/10/19 15:46:08 kls Exp $
|
# $Id: Makefile 1.50 2002/11/01 10:07:35 kls Exp $
|
||||||
|
|
||||||
.DELETE_ON_ERROR:
|
.DELETE_ON_ERROR:
|
||||||
|
|
||||||
@ -23,12 +23,7 @@ PLUGINDIR= ./PLUGINS
|
|||||||
|
|
||||||
VIDEODIR = /video
|
VIDEODIR = /video
|
||||||
|
|
||||||
ifdef NEWSTRUCT
|
|
||||||
INCLUDES = -I$(DVBDIR)/include
|
INCLUDES = -I$(DVBDIR)/include
|
||||||
DEFINES += -DNEWSTRUCT
|
|
||||||
else
|
|
||||||
INCLUDES = -I$(DVBDIR)/ost/include
|
|
||||||
endif
|
|
||||||
|
|
||||||
DTVLIB = $(DTVDIR)/libdtv.a
|
DTVLIB = $(DTVDIR)/libdtv.a
|
||||||
|
|
||||||
|
@ -30,3 +30,9 @@ VDR Plugin 'hello' Revision History
|
|||||||
2002-10-26: Version 0.0.7
|
2002-10-26: Version 0.0.7
|
||||||
|
|
||||||
- Fixed a typo.
|
- Fixed a typo.
|
||||||
|
|
||||||
|
2002-11-01: Version 0.0.8
|
||||||
|
|
||||||
|
- Completely switched to the new CVS HEAD version of the linux-dvb driver.
|
||||||
|
The NEWSTRUCT compile time switch is now obsolete. The required driver is now
|
||||||
|
the CVS HEAD version dated 2002-11-01 or later.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Makefile for a Video Disk Recorder plugin
|
# Makefile for a Video Disk Recorder plugin
|
||||||
#
|
#
|
||||||
# $Id: Makefile 1.5 2002/09/21 08:38:39 kls Exp $
|
# $Id: Makefile 1.6 2002/11/01 10:15:37 kls Exp $
|
||||||
|
|
||||||
# The official name of this plugin.
|
# The official name of this plugin.
|
||||||
# This name will be used in the '-P...' option of VDR to load the plugin.
|
# This name will be used in the '-P...' option of VDR to load the plugin.
|
||||||
@ -15,12 +15,7 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri
|
|||||||
|
|
||||||
### The directory environment:
|
### The directory environment:
|
||||||
|
|
||||||
ifdef NEWSTRUCT
|
|
||||||
DVBDIR = ../../../../DVB/include
|
DVBDIR = ../../../../DVB/include
|
||||||
DEFINES += -DNEWSTRUCT
|
|
||||||
else
|
|
||||||
DVBDIR = ../../../../DVB/ost/include
|
|
||||||
endif
|
|
||||||
VDRDIR = ../../..
|
VDRDIR = ../../..
|
||||||
VDRINC = $(VDRDIR)/include
|
VDRINC = $(VDRDIR)/include
|
||||||
LIBDIR = ../../lib
|
LIBDIR = ../../lib
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: hello.c 1.8 2002/10/26 14:34:48 kls Exp $
|
* $Id: hello.c 1.9 2002/11/01 10:16:53 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
@ -12,7 +12,7 @@
|
|||||||
#include <vdr/plugin.h>
|
#include <vdr/plugin.h>
|
||||||
#include "i18n.h"
|
#include "i18n.h"
|
||||||
|
|
||||||
static const char *VERSION = "0.0.7";
|
static const char *VERSION = "0.0.8";
|
||||||
static const char *DESCRIPTION = "A friendly greeting";
|
static const char *DESCRIPTION = "A friendly greeting";
|
||||||
static const char *MAINMENUENTRY = "Hello";
|
static const char *MAINMENUENTRY = "Hello";
|
||||||
|
|
||||||
|
@ -16,3 +16,9 @@ VDR Plugin 'status' Revision History
|
|||||||
2002-10-26: Version 0.0.4
|
2002-10-26: Version 0.0.4
|
||||||
|
|
||||||
- Fixed a typo.
|
- Fixed a typo.
|
||||||
|
|
||||||
|
2002-11-01: Version 0.0.5
|
||||||
|
|
||||||
|
- Completely switched to the new CVS HEAD version of the linux-dvb driver.
|
||||||
|
The NEWSTRUCT compile time switch is now obsolete. The required driver is now
|
||||||
|
the CVS HEAD version dated 2002-11-01 or later.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Makefile for a Video Disk Recorder plugin
|
# Makefile for a Video Disk Recorder plugin
|
||||||
#
|
#
|
||||||
# $Id: Makefile 1.3 2002/09/21 08:38:39 kls Exp $
|
# $Id: Makefile 1.4 2002/11/01 10:15:44 kls Exp $
|
||||||
|
|
||||||
# The official name of this plugin.
|
# The official name of this plugin.
|
||||||
# This name will be used in the '-P...' option of VDR to load the plugin.
|
# This name will be used in the '-P...' option of VDR to load the plugin.
|
||||||
@ -15,12 +15,7 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri
|
|||||||
|
|
||||||
### The directory environment:
|
### The directory environment:
|
||||||
|
|
||||||
ifdef NEWSTRUCT
|
|
||||||
DVBDIR = ../../../../DVB/include
|
DVBDIR = ../../../../DVB/include
|
||||||
DEFINES += -DNEWSTRUCT
|
|
||||||
else
|
|
||||||
DVBDIR = ../../../../DVB/ost/include
|
|
||||||
endif
|
|
||||||
VDRDIR = ../../..
|
VDRDIR = ../../..
|
||||||
VDRINC = $(VDRDIR)/include
|
VDRINC = $(VDRDIR)/include
|
||||||
LIBDIR = ../../lib
|
LIBDIR = ../../lib
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: status.c 1.4 2002/10/26 14:34:53 kls Exp $
|
* $Id: status.c 1.5 2002/11/01 10:16:59 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <vdr/plugin.h>
|
#include <vdr/plugin.h>
|
||||||
#include <vdr/status.h>
|
#include <vdr/status.h>
|
||||||
|
|
||||||
static const char *VERSION = "0.0.4";
|
static const char *VERSION = "0.0.5";
|
||||||
static const char *DESCRIPTION = "Status monitor test";
|
static const char *DESCRIPTION = "Status monitor test";
|
||||||
static const char *MAINMENUENTRY = NULL;
|
static const char *MAINMENUENTRY = NULL;
|
||||||
|
|
||||||
|
70
channels.c
70
channels.c
@ -4,15 +4,11 @@
|
|||||||
* 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.c 1.5 2002/10/20 11:50:47 kls Exp $
|
* $Id: channels.c 1.6 2002/11/01 10:26:45 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "channels.h"
|
#include "channels.h"
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
#include <linux/dvb/frontend.h>
|
#include <linux/dvb/frontend.h>
|
||||||
#else
|
|
||||||
#include <ost/frontend.h>
|
|
||||||
#endif
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
// IMPORTANT NOTE: in the 'sscanf()' calls there is a blank after the '%d'
|
// IMPORTANT NOTE: in the 'sscanf()' calls there is a blank after the '%d'
|
||||||
@ -32,9 +28,7 @@ const tChannelParameterMap BandwidthValues[] = {
|
|||||||
{ 6, BANDWIDTH_6_MHZ },
|
{ 6, BANDWIDTH_6_MHZ },
|
||||||
{ 7, BANDWIDTH_7_MHZ },
|
{ 7, BANDWIDTH_7_MHZ },
|
||||||
{ 8, BANDWIDTH_8_MHZ },
|
{ 8, BANDWIDTH_8_MHZ },
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
{ 999, BANDWIDTH_AUTO },
|
{ 999, BANDWIDTH_AUTO },
|
||||||
#endif
|
|
||||||
{ -1 }
|
{ -1 }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -43,17 +37,11 @@ const tChannelParameterMap CoderateValues[] = {
|
|||||||
{ 12, FEC_1_2 },
|
{ 12, FEC_1_2 },
|
||||||
{ 23, FEC_2_3 },
|
{ 23, FEC_2_3 },
|
||||||
{ 34, FEC_3_4 },
|
{ 34, FEC_3_4 },
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
{ 45, FEC_4_5 },
|
{ 45, FEC_4_5 },
|
||||||
#endif
|
|
||||||
{ 56, FEC_5_6 },
|
{ 56, FEC_5_6 },
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
{ 67, FEC_6_7 },
|
{ 67, FEC_6_7 },
|
||||||
#endif
|
|
||||||
{ 78, FEC_7_8 },
|
{ 78, FEC_7_8 },
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
{ 89, FEC_8_9 },
|
{ 89, FEC_8_9 },
|
||||||
#endif
|
|
||||||
{ 999, FEC_AUTO },
|
{ 999, FEC_AUTO },
|
||||||
{ -1 }
|
{ -1 }
|
||||||
};
|
};
|
||||||
@ -65,18 +53,14 @@ const tChannelParameterMap ModulationValues[] = {
|
|||||||
{ 64, QAM_64 },
|
{ 64, QAM_64 },
|
||||||
{ 128, QAM_128 },
|
{ 128, QAM_128 },
|
||||||
{ 256, QAM_256 },
|
{ 256, QAM_256 },
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
{ 999, QAM_AUTO },
|
{ 999, QAM_AUTO },
|
||||||
#endif
|
|
||||||
{ -1 }
|
{ -1 }
|
||||||
};
|
};
|
||||||
|
|
||||||
const tChannelParameterMap TransmissionValues[] = {
|
const tChannelParameterMap TransmissionValues[] = {
|
||||||
{ 2, TRANSMISSION_MODE_2K },
|
{ 2, TRANSMISSION_MODE_2K },
|
||||||
{ 8, TRANSMISSION_MODE_8K },
|
{ 8, TRANSMISSION_MODE_8K },
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
{ 999, TRANSMISSION_MODE_AUTO },
|
{ 999, TRANSMISSION_MODE_AUTO },
|
||||||
#endif
|
|
||||||
{ -1 }
|
{ -1 }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -85,9 +69,7 @@ const tChannelParameterMap GuardValues[] = {
|
|||||||
{ 8, GUARD_INTERVAL_1_8 },
|
{ 8, GUARD_INTERVAL_1_8 },
|
||||||
{ 16, GUARD_INTERVAL_1_16 },
|
{ 16, GUARD_INTERVAL_1_16 },
|
||||||
{ 32, GUARD_INTERVAL_1_32 },
|
{ 32, GUARD_INTERVAL_1_32 },
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
{ 999, GUARD_INTERVAL_AUTO },
|
{ 999, GUARD_INTERVAL_AUTO },
|
||||||
#endif
|
|
||||||
{ -1 }
|
{ -1 }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -96,9 +78,7 @@ const tChannelParameterMap HierarchyValues[] = {
|
|||||||
{ 1, HIERARCHY_1 },
|
{ 1, HIERARCHY_1 },
|
||||||
{ 2, HIERARCHY_2 },
|
{ 2, HIERARCHY_2 },
|
||||||
{ 4, HIERARCHY_4 },
|
{ 4, HIERARCHY_4 },
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
{ 999, HIERARCHY_AUTO },
|
{ 999, HIERARCHY_AUTO },
|
||||||
#endif
|
|
||||||
{ -1 }
|
{ -1 }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -160,16 +140,15 @@ cChannel::cChannel(void)
|
|||||||
sid = 0;
|
sid = 0;
|
||||||
number = 0;
|
number = 0;
|
||||||
groupSep = false;
|
groupSep = false;
|
||||||
//XXX
|
|
||||||
polarization = 'v';
|
polarization = 'v';
|
||||||
inversion = INVERSION_AUTO;
|
inversion = INVERSION_AUTO;
|
||||||
bandwidth = BANDWIDTH_8_MHZ;
|
bandwidth = BANDWIDTH_AUTO;
|
||||||
coderateH = FEC_AUTO;//XXX FEC_2_3
|
coderateH = FEC_AUTO;
|
||||||
coderateL = FEC_1_2;//XXX
|
coderateL = FEC_AUTO;
|
||||||
modulation = QAM_64;
|
modulation = QAM_AUTO;
|
||||||
transmission = TRANSMISSION_MODE_2K;
|
transmission = TRANSMISSION_MODE_AUTO;
|
||||||
guard = GUARD_INTERVAL_1_32;
|
guard = GUARD_INTERVAL_AUTO;
|
||||||
hierarchy = HIERARCHY_NONE;
|
hierarchy = HIERARCHY_AUTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
cChannel::cChannel(const cChannel *Channel)
|
cChannel::cChannel(const cChannel *Channel)
|
||||||
@ -187,24 +166,20 @@ cChannel::cChannel(const cChannel *Channel)
|
|||||||
ca = Channel ? Channel->ca : 0;
|
ca = Channel ? Channel->ca : 0;
|
||||||
sid = Channel ? Channel->sid : 0;
|
sid = Channel ? Channel->sid : 0;
|
||||||
groupSep = Channel ? Channel->groupSep : false;
|
groupSep = Channel ? Channel->groupSep : false;
|
||||||
//XXX
|
|
||||||
polarization = Channel ? Channel->polarization : 'v';
|
polarization = Channel ? Channel->polarization : 'v';
|
||||||
inversion = Channel ? Channel->inversion : INVERSION_AUTO;
|
inversion = Channel ? Channel->inversion : INVERSION_AUTO;
|
||||||
bandwidth = Channel ? Channel->bandwidth : BANDWIDTH_8_MHZ;
|
bandwidth = Channel ? Channel->bandwidth : BANDWIDTH_AUTO;
|
||||||
coderateH = Channel ? Channel->coderateH : FEC_AUTO;//XXX FEC_2_3
|
coderateH = Channel ? Channel->coderateH : FEC_AUTO;
|
||||||
coderateL = Channel ? Channel->coderateL : FEC_1_2;//XXX
|
coderateL = Channel ? Channel->coderateL : FEC_AUTO;
|
||||||
modulation = Channel ? Channel->modulation : QAM_64;
|
modulation = Channel ? Channel->modulation : QAM_AUTO;
|
||||||
transmission = Channel ? Channel->transmission : TRANSMISSION_MODE_2K;
|
transmission = Channel ? Channel->transmission : TRANSMISSION_MODE_AUTO;
|
||||||
guard = Channel ? Channel->guard : GUARD_INTERVAL_1_32;
|
guard = Channel ? Channel->guard : GUARD_INTERVAL_AUTO;
|
||||||
hierarchy = Channel ? Channel->hierarchy : HIERARCHY_NONE;
|
hierarchy = Channel ? Channel->hierarchy : HIERARCHY_AUTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int PrintParameter(char *p, char Name, int Value)
|
static int PrintParameter(char *p, char Name, int Value)
|
||||||
{
|
{
|
||||||
//XXX return Value >= 0 && Value != 999 ? sprintf(p, "%c%d", Name, Value) : 0;
|
return Value >= 0 && Value != 999 ? sprintf(p, "%c%d", Name, Value) : 0;
|
||||||
//XXX let's store 999 for the moment, until we generally switch to the NEWSTRUCT
|
|
||||||
//XXX driver (where the defaults will all be AUTO)
|
|
||||||
return Value >= 0 && (Value != 999 || (Name != 'I' && Name != 'C')) ? sprintf(p, "%c%d", Name, Value) : 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *cChannel::ParametersToString(void)
|
const char *cChannel::ParametersToString(void)
|
||||||
@ -233,17 +208,8 @@ static const char *ParseParameter(const char *s, int &Value, const tChannelParam
|
|||||||
errno = 0;
|
errno = 0;
|
||||||
int n = strtol(s, &p, 10);
|
int n = strtol(s, &p, 10);
|
||||||
if (!errno && p != s) {
|
if (!errno && p != s) {
|
||||||
//XXX let's tolerate 999 for the moment, until we generally switch to the NEWSTRUCT
|
Value = MapToDriver(n, Map);
|
||||||
//XXX driver (where the defaults will all be AUTO)
|
if (Value >= 0)
|
||||||
//XXX Value = MapToDriver(n, Map);
|
|
||||||
//XXX if (Value >= 0)
|
|
||||||
//XXX return p;
|
|
||||||
int v = MapToDriver(n, Map);
|
|
||||||
if (v >= 0) {
|
|
||||||
Value = v;
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
else if (v == 999)
|
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
4
config.h
4
config.h
@ -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.137 2002/10/19 15:43:31 kls Exp $
|
* $Id: config.h 1.138 2002/11/01 09:27:17 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __CONFIG_H
|
#ifndef __CONFIG_H
|
||||||
@ -20,7 +20,7 @@
|
|||||||
#include "eit.h"
|
#include "eit.h"
|
||||||
#include "tools.h"
|
#include "tools.h"
|
||||||
|
|
||||||
#define VDRVERSION "1.1.14"
|
#define VDRVERSION "1.1.15"
|
||||||
|
|
||||||
#define MAXPRIORITY 99
|
#define MAXPRIORITY 99
|
||||||
#define MAXLIFETIME 99
|
#define MAXLIFETIME 99
|
||||||
|
169
dvbdevice.c
169
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 1.30 2002/10/26 11:37:03 kls Exp $
|
* $Id: dvbdevice.c 1.31 2002/11/01 10:05:27 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dvbdevice.h"
|
#include "dvbdevice.h"
|
||||||
@ -18,17 +18,10 @@ extern "C" {
|
|||||||
}
|
}
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <linux/videodev.h>
|
#include <linux/videodev.h>
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
#include <linux/dvb/audio.h>
|
#include <linux/dvb/audio.h>
|
||||||
#include <linux/dvb/dmx.h>
|
#include <linux/dvb/dmx.h>
|
||||||
#include <linux/dvb/frontend.h>
|
#include <linux/dvb/frontend.h>
|
||||||
#include <linux/dvb/video.h>
|
#include <linux/dvb/video.h>
|
||||||
#else
|
|
||||||
#include <ost/audio.h>
|
|
||||||
#include <ost/dmx.h>
|
|
||||||
#include <ost/sec.h>
|
|
||||||
#include <ost/video.h>
|
|
||||||
#endif
|
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#include "channels.h"
|
#include "channels.h"
|
||||||
@ -40,7 +33,6 @@ extern "C" {
|
|||||||
#include "transfer.h"
|
#include "transfer.h"
|
||||||
|
|
||||||
#define DEV_VIDEO "/dev/video"
|
#define DEV_VIDEO "/dev/video"
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
#define DEV_DVB_ADAPTER "/dev/dvb/adapter"
|
#define DEV_DVB_ADAPTER "/dev/dvb/adapter"
|
||||||
#define DEV_DVB_OSD "osd"
|
#define DEV_DVB_OSD "osd"
|
||||||
#define DEV_DVB_FRONTEND "frontend"
|
#define DEV_DVB_FRONTEND "frontend"
|
||||||
@ -48,24 +40,11 @@ extern "C" {
|
|||||||
#define DEV_DVB_DEMUX "demux"
|
#define DEV_DVB_DEMUX "demux"
|
||||||
#define DEV_DVB_VIDEO "video"
|
#define DEV_DVB_VIDEO "video"
|
||||||
#define DEV_DVB_AUDIO "audio"
|
#define DEV_DVB_AUDIO "audio"
|
||||||
#else
|
|
||||||
#define DEV_DVB_OSD "/dev/ost/osd"
|
|
||||||
#define DEV_DVB_FRONTEND "/dev/ost/frontend"
|
|
||||||
#define DEV_DVB_SEC "/dev/ost/sec"
|
|
||||||
#define DEV_DVB_DVR "/dev/ost/dvr"
|
|
||||||
#define DEV_DVB_DEMUX "/dev/ost/demux"
|
|
||||||
#define DEV_DVB_VIDEO "/dev/ost/video"
|
|
||||||
#define DEV_DVB_AUDIO "/dev/ost/audio"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static const char *DvbName(const char *Name, int n)
|
static const char *DvbName(const char *Name, int n)
|
||||||
{
|
{
|
||||||
static char buffer[PATH_MAX];
|
static char buffer[PATH_MAX];
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
snprintf(buffer, sizeof(buffer), "%s%d/%s%d", DEV_DVB_ADAPTER, n, Name, 0);
|
snprintf(buffer, sizeof(buffer), "%s%d/%s%d", DEV_DVB_ADAPTER, n, Name, 0);
|
||||||
#else
|
|
||||||
snprintf(buffer, sizeof(buffer), "%s%d", Name, n);
|
|
||||||
#endif
|
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,11 +59,7 @@ static int DvbOpen(const char *Name, int n, int Mode, bool ReportError = false)
|
|||||||
|
|
||||||
cDvbDevice::cDvbDevice(int n)
|
cDvbDevice::cDvbDevice(int n)
|
||||||
{
|
{
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
frontendType = fe_type_t(-1); // don't know how else to initialize this - there is no FE_UNKNOWN
|
frontendType = fe_type_t(-1); // don't know how else to initialize this - there is no FE_UNKNOWN
|
||||||
#else
|
|
||||||
frontendType = FrontendType(-1); // don't know how else to initialize this - there is no FE_UNKNOWN
|
|
||||||
#endif
|
|
||||||
siProcessor = NULL;
|
siProcessor = NULL;
|
||||||
spuDecoder = NULL;
|
spuDecoder = NULL;
|
||||||
playMode = pmNone;
|
playMode = pmNone;
|
||||||
@ -99,12 +74,6 @@ cDvbDevice::cDvbDevice(int n)
|
|||||||
fd_video = DvbOpen(DEV_DVB_VIDEO, n, O_RDWR | O_NONBLOCK);
|
fd_video = DvbOpen(DEV_DVB_VIDEO, n, O_RDWR | O_NONBLOCK);
|
||||||
fd_audio = DvbOpen(DEV_DVB_AUDIO, n, O_RDWR | O_NONBLOCK);
|
fd_audio = DvbOpen(DEV_DVB_AUDIO, n, O_RDWR | O_NONBLOCK);
|
||||||
|
|
||||||
#ifndef NEWSTRUCT
|
|
||||||
// Devices that are only present on DVB-S cards:
|
|
||||||
|
|
||||||
fd_sec = DvbOpen(DEV_DVB_SEC, n, O_RDWR);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// The DVR device (will be opened and closed as needed):
|
// The DVR device (will be opened and closed as needed):
|
||||||
|
|
||||||
fd_dvr = -1;
|
fd_dvr = -1;
|
||||||
@ -116,11 +85,7 @@ cDvbDevice::cDvbDevice(int n)
|
|||||||
// We only check the devices that must be present - the others will be checked before accessing them://XXX
|
// We only check the devices that must be present - the others will be checked before accessing them://XXX
|
||||||
|
|
||||||
if (fd_frontend >= 0) {
|
if (fd_frontend >= 0) {
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
dvb_frontend_info feinfo;
|
dvb_frontend_info feinfo;
|
||||||
#else
|
|
||||||
FrontendInfo feinfo;
|
|
||||||
#endif
|
|
||||||
siProcessor = new cSIProcessor(DvbName(DEV_DVB_DEMUX, n));
|
siProcessor = new cSIProcessor(DvbName(DEV_DVB_DEMUX, n));
|
||||||
if (ioctl(fd_frontend, FE_GET_INFO, &feinfo) >= 0)
|
if (ioctl(fd_frontend, FE_GET_INFO, &feinfo) >= 0)
|
||||||
frontendType = feinfo.type;
|
frontendType = feinfo.type;
|
||||||
@ -312,20 +277,12 @@ void cDvbDevice::SetVideoFormat(bool VideoFormat16_9)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ptAudio ptVideo ptTeletext ptDolby ptOther
|
// ptAudio ptVideo ptTeletext ptDolby ptOther
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
dmx_pes_type_t PesTypes[] = { DMX_PES_AUDIO, DMX_PES_VIDEO, DMX_PES_TELETEXT, DMX_PES_OTHER, DMX_PES_OTHER };
|
dmx_pes_type_t PesTypes[] = { DMX_PES_AUDIO, DMX_PES_VIDEO, DMX_PES_TELETEXT, DMX_PES_OTHER, DMX_PES_OTHER };
|
||||||
#else
|
|
||||||
dmxPesType_t PesTypes[] = { DMX_PES_AUDIO, DMX_PES_VIDEO, DMX_PES_TELETEXT, DMX_PES_OTHER, DMX_PES_OTHER };
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool cDvbDevice::SetPid(cPidHandle *Handle, int Type, bool On)
|
bool cDvbDevice::SetPid(cPidHandle *Handle, int Type, bool On)
|
||||||
{
|
{
|
||||||
if (Handle->pid) {
|
if (Handle->pid) {
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
dmx_pes_filter_params pesFilterParams;
|
dmx_pes_filter_params pesFilterParams;
|
||||||
#else
|
|
||||||
dmxPesFilterParams pesFilterParams;
|
|
||||||
#endif
|
|
||||||
memset(&pesFilterParams, 0, sizeof(pesFilterParams));
|
memset(&pesFilterParams, 0, sizeof(pesFilterParams));
|
||||||
if (On) {
|
if (On) {
|
||||||
if (Handle->handle < 0) {
|
if (Handle->handle < 0) {
|
||||||
@ -336,11 +293,7 @@ bool cDvbDevice::SetPid(cPidHandle *Handle, int Type, bool On)
|
|||||||
pesFilterParams.pid = Handle->pid;
|
pesFilterParams.pid = Handle->pid;
|
||||||
pesFilterParams.input = DMX_IN_FRONTEND;
|
pesFilterParams.input = DMX_IN_FRONTEND;
|
||||||
pesFilterParams.output = (Type <= ptTeletext && Handle->used <= 1) ? DMX_OUT_DECODER : DMX_OUT_TS_TAP;
|
pesFilterParams.output = (Type <= ptTeletext && Handle->used <= 1) ? DMX_OUT_DECODER : DMX_OUT_TS_TAP;
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
pesFilterParams.pes_type= PesTypes[Type < ptOther ? Type : ptOther];
|
pesFilterParams.pes_type= PesTypes[Type < ptOther ? Type : ptOther];
|
||||||
#else
|
|
||||||
pesFilterParams.pesType = PesTypes[Type < ptOther ? Type : ptOther];
|
|
||||||
#endif
|
|
||||||
pesFilterParams.flags = DMX_IMMEDIATE_START;
|
pesFilterParams.flags = DMX_IMMEDIATE_START;
|
||||||
if (ioctl(Handle->handle, DMX_SET_PES_FILTER, &pesFilterParams) < 0) {
|
if (ioctl(Handle->handle, DMX_SET_PES_FILTER, &pesFilterParams) < 0) {
|
||||||
LOG_ERROR;
|
LOG_ERROR;
|
||||||
@ -353,11 +306,7 @@ bool cDvbDevice::SetPid(cPidHandle *Handle, int Type, bool On)
|
|||||||
pesFilterParams.pid = 0x1FFF;
|
pesFilterParams.pid = 0x1FFF;
|
||||||
pesFilterParams.input = DMX_IN_FRONTEND;
|
pesFilterParams.input = DMX_IN_FRONTEND;
|
||||||
pesFilterParams.output = DMX_OUT_DECODER;
|
pesFilterParams.output = DMX_OUT_DECODER;
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
pesFilterParams.pes_type= PesTypes[Type];
|
pesFilterParams.pes_type= PesTypes[Type];
|
||||||
#else
|
|
||||||
pesFilterParams.pesType = PesTypes[Type];
|
|
||||||
#endif
|
|
||||||
pesFilterParams.flags = DMX_IMMEDIATE_START;
|
pesFilterParams.flags = DMX_IMMEDIATE_START;
|
||||||
CHECK(ioctl(Handle->handle, DMX_SET_PES_FILTER, &pesFilterParams));
|
CHECK(ioctl(Handle->handle, DMX_SET_PES_FILTER, &pesFilterParams));
|
||||||
close(Handle->handle);
|
close(Handle->handle);
|
||||||
@ -491,11 +440,7 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
|
|||||||
|
|
||||||
if (DoTune) {
|
if (DoTune) {
|
||||||
|
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
dvb_frontend_parameters Frontend;
|
dvb_frontend_parameters Frontend;
|
||||||
#else
|
|
||||||
FrontendParameters Frontend;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
memset(&Frontend, 0, sizeof(Frontend));
|
memset(&Frontend, 0, sizeof(Frontend));
|
||||||
|
|
||||||
@ -508,14 +453,9 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
|
|||||||
cDiseqc *diseqc = Diseqcs.Get(Channel->Source(), Channel->Frequency(), Channel->Polarization());
|
cDiseqc *diseqc = Diseqcs.Get(Channel->Source(), Channel->Frequency(), Channel->Polarization());
|
||||||
if (diseqc) {
|
if (diseqc) {
|
||||||
if (diseqc->Commands() && (!diseqcCommands || strcmp(diseqcCommands, diseqc->Commands()) != 0)) {
|
if (diseqc->Commands() && (!diseqcCommands || strcmp(diseqcCommands, diseqc->Commands()) != 0)) {
|
||||||
#ifndef NEWSTRUCT
|
|
||||||
int SecTone = SEC_TONE_OFF;
|
|
||||||
int SecVolt = SEC_VOLTAGE_13;
|
|
||||||
#endif
|
|
||||||
cDiseqc::eDiseqcActions da;
|
cDiseqc::eDiseqcActions da;
|
||||||
for (bool Start = true; (da = diseqc->Execute(Start)) != cDiseqc::daNone; Start = false) {
|
for (bool Start = true; (da = diseqc->Execute(Start)) != cDiseqc::daNone; Start = false) {
|
||||||
switch (da) {
|
switch (da) {
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
case cDiseqc::daNone: break;
|
case cDiseqc::daNone: break;
|
||||||
case cDiseqc::daToneOff: CHECK(ioctl(fd_frontend, FE_SET_TONE, SEC_TONE_OFF)); break;
|
case cDiseqc::daToneOff: CHECK(ioctl(fd_frontend, FE_SET_TONE, SEC_TONE_OFF)); break;
|
||||||
case cDiseqc::daToneOn: CHECK(ioctl(fd_frontend, FE_SET_TONE, SEC_TONE_ON)); break;
|
case cDiseqc::daToneOn: CHECK(ioctl(fd_frontend, FE_SET_TONE, SEC_TONE_ON)); break;
|
||||||
@ -534,49 +474,6 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#else
|
|
||||||
// This may not work very good with the old driver.
|
|
||||||
// Let's try to emulate the NEWSTRUCT driver's behaviour as good as possible...
|
|
||||||
case cDiseqc::daNone: break;
|
|
||||||
case cDiseqc::daToneOff: CHECK(ioctl(fd_sec, SEC_SET_TONE, SecTone = SEC_TONE_OFF)); break;
|
|
||||||
case cDiseqc::daToneOn: CHECK(ioctl(fd_sec, SEC_SET_TONE, SecTone = SEC_TONE_ON)); break;
|
|
||||||
case cDiseqc::daVoltage13: CHECK(ioctl(fd_sec, SEC_SET_VOLTAGE, SecVolt = SEC_VOLTAGE_13)); break;
|
|
||||||
case cDiseqc::daVoltage18: CHECK(ioctl(fd_sec, SEC_SET_VOLTAGE, SecVolt = SEC_VOLTAGE_18)); break;
|
|
||||||
case cDiseqc::daMiniA:
|
|
||||||
case cDiseqc::daMiniB: {
|
|
||||||
secCmdSequence scmds;
|
|
||||||
memset(&scmds, 0, sizeof(scmds));
|
|
||||||
scmds.voltage = SecVolt;
|
|
||||||
scmds.miniCommand = (da == cDiseqc::daMiniA) ? SEC_MINI_A : SEC_MINI_B;
|
|
||||||
scmds.continuousTone = SecTone;
|
|
||||||
CHECK(ioctl(fd_sec, SEC_SEND_SEQUENCE, &scmds));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case cDiseqc::daCodes: {
|
|
||||||
int n = 0;
|
|
||||||
uchar *codes = diseqc->Codes(n);
|
|
||||||
if (codes && n >= 3 && codes[0] == 0xE0) {
|
|
||||||
secCommand scmd;
|
|
||||||
memset(&scmd, 0, sizeof(scmd));
|
|
||||||
scmd.type = SEC_CMDTYPE_DISEQC;
|
|
||||||
scmd.u.diseqc.addr = codes[1];
|
|
||||||
scmd.u.diseqc.cmd = codes[2];
|
|
||||||
scmd.u.diseqc.numParams = n - 3;
|
|
||||||
memcpy(scmd.u.diseqc.params, &codes[3], min(n - 3, int(sizeof(scmd.u.diseqc.params))));
|
|
||||||
|
|
||||||
secCmdSequence scmds;
|
|
||||||
memset(&scmds, 0, sizeof(scmds));
|
|
||||||
scmds.voltage = SecVolt;
|
|
||||||
scmds.miniCommand = SEC_MINI_NONE;
|
|
||||||
scmds.continuousTone = SecTone;
|
|
||||||
scmds.numCommands = 1;
|
|
||||||
scmds.commands = &scmd;
|
|
||||||
|
|
||||||
CHECK(ioctl(fd_sec, SEC_SEND_SEQUENCE, &scmds));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
diseqcCommands = diseqc->Commands();
|
diseqcCommands = diseqc->Commands();
|
||||||
@ -600,56 +497,31 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
|
|||||||
tone = SEC_TONE_ON;
|
tone = SEC_TONE_ON;
|
||||||
}
|
}
|
||||||
int volt = (Channel->Polarization() == 'v' || Channel->Polarization() == 'V') ? SEC_VOLTAGE_13 : SEC_VOLTAGE_18;
|
int volt = (Channel->Polarization() == 'v' || Channel->Polarization() == 'V') ? SEC_VOLTAGE_13 : SEC_VOLTAGE_18;
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
CHECK(ioctl(fd_frontend, FE_SET_VOLTAGE, volt));
|
CHECK(ioctl(fd_frontend, FE_SET_VOLTAGE, volt));
|
||||||
CHECK(ioctl(fd_frontend, FE_SET_TONE, tone));
|
CHECK(ioctl(fd_frontend, FE_SET_TONE, tone));
|
||||||
#else
|
|
||||||
secCmdSequence scmds;
|
|
||||||
memset(&scmds, 0, sizeof(scmds));
|
|
||||||
scmds.voltage = volt;
|
|
||||||
scmds.miniCommand = SEC_MINI_NONE;
|
|
||||||
scmds.continuousTone = tone;
|
|
||||||
CHECK(ioctl(fd_sec, SEC_SEND_SEQUENCE, &scmds));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
Frontend.frequency = frequency * 1000UL;
|
Frontend.frequency = frequency * 1000UL;
|
||||||
Frontend.inversion = fe_spectral_inversion_t(Channel->Inversion());
|
Frontend.inversion = fe_spectral_inversion_t(Channel->Inversion());
|
||||||
Frontend.u.qpsk.symbol_rate = Channel->Srate() * 1000UL;
|
Frontend.u.qpsk.symbol_rate = Channel->Srate() * 1000UL;
|
||||||
Frontend.u.qpsk.fec_inner = fe_code_rate_t(Channel->CoderateH());
|
Frontend.u.qpsk.fec_inner = fe_code_rate_t(Channel->CoderateH());
|
||||||
#else
|
|
||||||
Frontend.Frequency = frequency * 1000UL;
|
|
||||||
Frontend.Inversion = SpectralInversion(Channel->Inversion());
|
|
||||||
Frontend.u.qpsk.SymbolRate = Channel->Srate() * 1000UL;
|
|
||||||
Frontend.u.qpsk.FEC_inner = CodeRate(Channel->CoderateH());
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FE_QAM: { // DVB-C
|
case FE_QAM: { // DVB-C
|
||||||
|
|
||||||
// Frequency and symbol rate:
|
// Frequency and symbol rate:
|
||||||
|
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
Frontend.frequency = FrequencyToHz(Channel->Frequency());
|
Frontend.frequency = FrequencyToHz(Channel->Frequency());
|
||||||
Frontend.inversion = fe_spectral_inversion_t(Channel->Inversion());
|
Frontend.inversion = fe_spectral_inversion_t(Channel->Inversion());
|
||||||
Frontend.u.qam.symbol_rate = Channel->Srate() * 1000UL;
|
Frontend.u.qam.symbol_rate = Channel->Srate() * 1000UL;
|
||||||
Frontend.u.qam.fec_inner = fe_code_rate_t(Channel->CoderateH());
|
Frontend.u.qam.fec_inner = fe_code_rate_t(Channel->CoderateH());
|
||||||
Frontend.u.qam.modulation = fe_modulation_t(Channel->Modulation());
|
Frontend.u.qam.modulation = fe_modulation_t(Channel->Modulation());
|
||||||
#else
|
|
||||||
Frontend.Frequency = FrequencyToHz(Channel->Frequency());
|
|
||||||
Frontend.Inversion = SpectralInversion(Channel->Inversion());
|
|
||||||
Frontend.u.qam.SymbolRate = Channel->Srate() * 1000UL;
|
|
||||||
Frontend.u.qam.FEC_inner = CodeRate(Channel->CoderateH());
|
|
||||||
Frontend.u.qam.QAM = Modulation(Channel->Modulation());
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FE_OFDM: { // DVB-T
|
case FE_OFDM: { // DVB-T
|
||||||
|
|
||||||
// Frequency and OFDM paramaters:
|
// Frequency and OFDM paramaters:
|
||||||
|
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
Frontend.frequency = FrequencyToHz(Channel->Frequency());
|
Frontend.frequency = FrequencyToHz(Channel->Frequency());
|
||||||
Frontend.inversion = fe_spectral_inversion_t(Channel->Inversion());
|
Frontend.inversion = fe_spectral_inversion_t(Channel->Inversion());
|
||||||
Frontend.u.ofdm.bandwidth = fe_bandwidth_t(Channel->Bandwidth());
|
Frontend.u.ofdm.bandwidth = fe_bandwidth_t(Channel->Bandwidth());
|
||||||
@ -659,17 +531,6 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
|
|||||||
Frontend.u.ofdm.transmission_mode = fe_transmit_mode_t(Channel->Transmission());
|
Frontend.u.ofdm.transmission_mode = fe_transmit_mode_t(Channel->Transmission());
|
||||||
Frontend.u.ofdm.guard_interval = fe_guard_interval_t(Channel->Guard());
|
Frontend.u.ofdm.guard_interval = fe_guard_interval_t(Channel->Guard());
|
||||||
Frontend.u.ofdm.hierarchy_information = fe_hierarchy_t(Channel->Hierarchy());
|
Frontend.u.ofdm.hierarchy_information = fe_hierarchy_t(Channel->Hierarchy());
|
||||||
#else
|
|
||||||
Frontend.Frequency = FrequencyToHz(Channel->Frequency());
|
|
||||||
Frontend.Inversion = SpectralInversion(Channel->Inversion());
|
|
||||||
Frontend.u.ofdm.bandWidth = BandWidth(Channel->Bandwidth());
|
|
||||||
Frontend.u.ofdm.HP_CodeRate = CodeRate(Channel->CoderateH());
|
|
||||||
Frontend.u.ofdm.LP_CodeRate = CodeRate(Channel->CoderateL());
|
|
||||||
Frontend.u.ofdm.Constellation = Modulation(Channel->Modulation());
|
|
||||||
Frontend.u.ofdm.TransmissionMode = TransmitMode(Channel->Transmission());
|
|
||||||
Frontend.u.ofdm.guardInterval = GuardInterval(Channel->Guard());
|
|
||||||
Frontend.u.ofdm.HierarchyInformation = Hierarchy(Channel->Hierarchy());
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -677,7 +538,6 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
// Discard stale events:
|
// Discard stale events:
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
@ -685,7 +545,6 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
|
|||||||
if (ioctl(fd_frontend, FE_GET_EVENT, &event) < 0)
|
if (ioctl(fd_frontend, FE_GET_EVENT, &event) < 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// Tuning:
|
// Tuning:
|
||||||
|
|
||||||
@ -693,7 +552,6 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
|
|||||||
|
|
||||||
// Wait for channel lock:
|
// Wait for channel lock:
|
||||||
|
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
fe_status_t status = fe_status_t(0);
|
fe_status_t status = fe_status_t(0);
|
||||||
for (int i = 0; i < 100; i++) {
|
for (int i = 0; i < 100; i++) {
|
||||||
CHECK(ioctl(fd_frontend, FE_READ_STATUS, &status));
|
CHECK(ioctl(fd_frontend, FE_READ_STATUS, &status));
|
||||||
@ -707,23 +565,6 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
|
|||||||
cThread::RaisePanic();
|
cThread::RaisePanic();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
if (cFile::FileReady(fd_frontend, 5000)) {
|
|
||||||
FrontendEvent event;
|
|
||||||
if (ioctl(fd_frontend, FE_GET_EVENT, &event) >= 0) {
|
|
||||||
if (event.type != FE_COMPLETION_EV) {
|
|
||||||
esyslog("ERROR: channel %d not sync'ed on DVB card %d!", Channel->Number(), CardIndex() + 1);
|
|
||||||
if (LiveView && IsPrimaryDevice())
|
|
||||||
cThread::RaisePanic();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
esyslog("ERROR in frontend get event (channel %d, card %d): %m", Channel->Number(), CardIndex() + 1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
esyslog("ERROR: timeout while tuning on DVB card %d", CardIndex() + 1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
source = Channel->Source();
|
source = Channel->Source();
|
||||||
frequency = Channel->Frequency();
|
frequency = Channel->Frequency();
|
||||||
@ -757,11 +598,7 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
|
|||||||
void cDvbDevice::SetVolumeDevice(int Volume)
|
void cDvbDevice::SetVolumeDevice(int Volume)
|
||||||
{
|
{
|
||||||
if (HasDecoder()) {
|
if (HasDecoder()) {
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
audio_mixer_t am;
|
audio_mixer_t am;
|
||||||
#else
|
|
||||||
audioMixer_t am;
|
|
||||||
#endif
|
|
||||||
am.volume_left = am.volume_right = Volume;
|
am.volume_left = am.volume_right = Volume;
|
||||||
CHECK(ioctl(fd_audio, AUDIO_SET_MIXER, &am));
|
CHECK(ioctl(fd_audio, AUDIO_SET_MIXER, &am));
|
||||||
}
|
}
|
||||||
@ -991,11 +828,7 @@ bool cDvbDevice::GetTSPacket(uchar *&Data)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (FATALERRNO) {
|
else if (FATALERRNO) {
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
if (errno == EOVERFLOW)
|
if (errno == EOVERFLOW)
|
||||||
#else
|
|
||||||
if (errno == EBUFFEROVERFLOW) // this error code is not defined in the library
|
|
||||||
#endif
|
|
||||||
esyslog("ERROR: DVB driver buffer overflow on device %d", CardIndex() + 1);
|
esyslog("ERROR: DVB driver buffer overflow on device %d", CardIndex() + 1);
|
||||||
else {
|
else {
|
||||||
LOG_ERROR;
|
LOG_ERROR;
|
||||||
|
11
dvbdevice.h
11
dvbdevice.h
@ -4,17 +4,13 @@
|
|||||||
* 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.h 1.15 2002/10/26 11:35:04 kls Exp $
|
* $Id: dvbdevice.h 1.16 2002/11/01 10:05:41 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __DVBDEVICE_H
|
#ifndef __DVBDEVICE_H
|
||||||
#define __DVBDEVICE_H
|
#define __DVBDEVICE_H
|
||||||
|
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
#include <linux/dvb/frontend.h>
|
#include <linux/dvb/frontend.h>
|
||||||
#else
|
|
||||||
#include <ost/frontend.h>
|
|
||||||
#endif
|
|
||||||
#include "device.h"
|
#include "device.h"
|
||||||
#include "dvbspu.h"
|
#include "dvbspu.h"
|
||||||
#include "eit.h"
|
#include "eit.h"
|
||||||
@ -31,13 +27,8 @@ public:
|
|||||||
// Initializes the DVB devices.
|
// Initializes the DVB devices.
|
||||||
// Must be called before accessing any DVB functions.
|
// Must be called before accessing any DVB functions.
|
||||||
private:
|
private:
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
fe_type_t frontendType;
|
fe_type_t frontendType;
|
||||||
int fd_osd, fd_frontend, fd_audio, fd_video, fd_dvr;
|
int fd_osd, fd_frontend, fd_audio, fd_video, fd_dvr;
|
||||||
#else
|
|
||||||
FrontendType frontendType;
|
|
||||||
int fd_osd, fd_frontend, fd_sec, fd_audio, fd_video, fd_dvr;
|
|
||||||
#endif
|
|
||||||
int OsdDeviceHandle(void) const { return fd_osd; }
|
int OsdDeviceHandle(void) const { return fd_osd; }
|
||||||
protected:
|
protected:
|
||||||
virtual void MakePrimaryDevice(bool On);
|
virtual void MakePrimaryDevice(bool On);
|
||||||
|
6
dvbosd.h
6
dvbosd.h
@ -4,17 +4,13 @@
|
|||||||
* 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: dvbosd.h 1.15 2002/08/09 16:16:48 kls Exp $
|
* $Id: dvbosd.h 1.16 2002/11/01 10:05:47 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __DVBOSD_H
|
#ifndef __DVBOSD_H
|
||||||
#define __DVBOSD_H
|
#define __DVBOSD_H
|
||||||
|
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
#include <linux/dvb/osd.h>
|
#include <linux/dvb/osd.h>
|
||||||
#else
|
|
||||||
#include <ost/osd.h>
|
|
||||||
#endif
|
|
||||||
#include "dvbdevice.h"
|
#include "dvbdevice.h"
|
||||||
#include "osdbase.h"
|
#include "osdbase.h"
|
||||||
|
|
||||||
|
10
eit.c
10
eit.c
@ -16,18 +16,14 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or *
|
* the Free Software Foundation; either version 2 of the License, or *
|
||||||
* (at your option) any later version. *
|
* (at your option) any later version. *
|
||||||
* *
|
* *
|
||||||
* $Id: eit.c 1.57 2002/10/13 09:29:05 kls Exp $
|
* $Id: eit.c 1.58 2002/11/01 10:05:56 kls Exp $
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#include "eit.h"
|
#include "eit.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
#include <linux/dvb/dmx.h>
|
#include <linux/dvb/dmx.h>
|
||||||
#else
|
|
||||||
#include <ost/dmx.h>
|
|
||||||
#endif
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -1196,11 +1192,7 @@ void cSIProcessor::Action()
|
|||||||
table identifer tid */
|
table identifer tid */
|
||||||
bool cSIProcessor::AddFilter(u_char pid, u_char tid)
|
bool cSIProcessor::AddFilter(u_char pid, u_char tid)
|
||||||
{
|
{
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
dmx_sct_filter_params sctFilterParams;
|
dmx_sct_filter_params sctFilterParams;
|
||||||
#else
|
|
||||||
dmxSctFilterParams sctFilterParams;
|
|
||||||
#endif
|
|
||||||
memset(&sctFilterParams, 0, sizeof(sctFilterParams));
|
memset(&sctFilterParams, 0, sizeof(sctFilterParams));
|
||||||
sctFilterParams.pid = pid;
|
sctFilterParams.pid = pid;
|
||||||
sctFilterParams.timeout = 0;
|
sctFilterParams.timeout = 0;
|
||||||
|
@ -12,7 +12,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: newplugin 1.9 2002/10/26 14:32:12 kls Exp $
|
# $Id: newplugin 1.10 2002/11/01 10:06:32 kls Exp $
|
||||||
|
|
||||||
$PLUGIN_NAME = $ARGV[0] || die "Usage: newplugin <name>\n";
|
$PLUGIN_NAME = $ARGV[0] || die "Usage: newplugin <name>\n";
|
||||||
|
|
||||||
@ -70,12 +70,7 @@ VERSION = \$(shell grep 'static const char \\*VERSION *=' \$(PLUGIN).c | awk '{
|
|||||||
|
|
||||||
### The directory environment:
|
### The directory environment:
|
||||||
|
|
||||||
ifdef NEWSTRUCT
|
|
||||||
DVBDIR = ../../../../DVB/include
|
DVBDIR = ../../../../DVB/include
|
||||||
DEFINES += -DNEWSTRUCT
|
|
||||||
else
|
|
||||||
DVBDIR = ../../../../DVB/ost/include
|
|
||||||
endif
|
|
||||||
VDRDIR = ../../..
|
VDRDIR = ../../..
|
||||||
VDRINC = \$(VDRDIR)/include
|
VDRINC = \$(VDRDIR)/include
|
||||||
LIBDIR = ../../lib
|
LIBDIR = ../../lib
|
||||||
|
6
remux.h
6
remux.h
@ -4,18 +4,14 @@
|
|||||||
* 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: remux.h 1.8 2002/10/12 13:30:24 kls Exp $
|
* $Id: remux.h 1.9 2002/11/01 10:06:46 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __REMUX_H
|
#ifndef __REMUX_H
|
||||||
#define __REMUX_H
|
#define __REMUX_H
|
||||||
|
|
||||||
#include <time.h> //XXX FIXME: DVB/linux/dvb/dmx.h should include <time.h> itself!!!
|
#include <time.h> //XXX FIXME: DVB/linux/dvb/dmx.h should include <time.h> itself!!!
|
||||||
#ifdef NEWSTRUCT
|
|
||||||
#include <linux/dvb/dmx.h>
|
#include <linux/dvb/dmx.h>
|
||||||
#else
|
|
||||||
#include <ost/dmx.h>
|
|
||||||
#endif
|
|
||||||
#include "tools.h"
|
#include "tools.h"
|
||||||
|
|
||||||
// Picture types:
|
// Picture types:
|
||||||
|
Loading…
Reference in New Issue
Block a user