|
From: <lin...@us...> - 2003-07-18 07:05:14
|
Update of /cvsroot/dvbtools/dvbtext
In directory sc8-pr-cvs1:/tmp/cvs-serv18898
Modified Files:
Makefile dvbtext.c
Log Message:
Updated to use NEWSTRUCT versions (i.e. post October 2002) DVB driver
Index: Makefile
===================================================================
RCS file: /cvsroot/dvbtools/dvbtext/Makefile,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** Makefile 17 May 2002 07:14:00 -0000 1.1.1.1
--- Makefile 18 Jul 2003 07:05:09 -0000 1.2
***************
*** 1,8 ****
! INCS=-I ../DVB/ost/include
all: dvbtext
dvbtext: dvbtext.c tables.h
! gcc -Wall $(INCS) -o dvbtext dvbtext.c
clean:
--- 1,23 ----
! INCS=
! CFLAGS= -Wall
! CC=gcc
all: dvbtext
+ # Delete the following line if you are not using a
+ # "NEWSTRUCT" driver. If you are using a "NEWSTRUCT"
+ # driver, it must be later than October 10th 2002
+
+ NEWSTRUCT=1
+
+ ifdef NEWSTRUCT
+ CFLAGS += -DNEWSTRUCT
+ INCS += -I ../DVB/include
+ else
+ INCS += -I ../DVB/ost/include
+ endif
+
dvbtext: dvbtext.c tables.h
! $(CC) $(CFLAGS) $(INCS) -o dvbtext dvbtext.c
clean:
Index: dvbtext.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbtext/dvbtext.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** dvbtext.c 17 May 2002 07:14:00 -0000 1.1.1.1
--- dvbtext.c 18 Jul 2003 07:05:09 -0000 1.2
***************
*** 35,39 ****
--- 35,43 ----
#include <fcntl.h>
#include <unistd.h>
+ #ifdef NEWSTRUCT
+ #include <linux/dvb/dmx.h>
+ #else
#include <ost/dmx.h>
+ #endif
#include "tables.h"
***************
*** 129,132 ****
--- 133,153 ----
}
+ #ifdef NEWSTRUCT
+ void set_tt_filt(int fd,uint16_t tt_pid)
+ {
+ struct dmx_pes_filter_params pesFilterParams;
+
+ pesFilterParams.pid = tt_pid;
+ pesFilterParams.input = DMX_IN_FRONTEND;
+ pesFilterParams.output = DMX_OUT_TS_TAP;
+ pesFilterParams.pes_type = DMX_PES_OTHER;
+ pesFilterParams.flags = DMX_IMMEDIATE_START;
+
+ if (ioctl(fd, DMX_SET_PES_FILTER, &pesFilterParams) < 0) {
+ fprintf(stderr,"FILTER %i: ",tt_pid);
+ perror("DMX SET PES FILTER");
+ }
+ }
+ #else
void set_tt_filt(int fd,uint16_t tt_pid)
{
***************
*** 136,141 ****
pesFilterParams.input = DMX_IN_FRONTEND;
pesFilterParams.output = DMX_OUT_TS_TAP;
! pesFilterParams.pesType = DMX_PES_TELETEXT;
! pesFilterParams.flags = DMX_IMMEDIATE_START|DMX_ONESHOT;
if (ioctl(fd, DMX_SET_PES_FILTER, &pesFilterParams) < 0) {
--- 157,162 ----
pesFilterParams.input = DMX_IN_FRONTEND;
pesFilterParams.output = DMX_OUT_TS_TAP;
! pesFilterParams.pesType = DMX_PES_OTHER;
! pesFilterParams.flags = DMX_IMMEDIATE_START;
if (ioctl(fd, DMX_SET_PES_FILTER, &pesFilterParams) < 0) {
***************
*** 144,147 ****
--- 165,169 ----
}
}
+ #endif
int main(int argc, char **argv)
|