You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(10) |
Jun
(35) |
Jul
(11) |
Aug
(9) |
Sep
|
Oct
(9) |
Nov
(1) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
(9) |
Nov
(3) |
Dec
|
| 2004 |
Jan
(2) |
Feb
|
Mar
(28) |
Apr
(5) |
May
|
Jun
(1) |
Jul
(5) |
Aug
(2) |
Sep
|
Oct
(2) |
Nov
|
Dec
(5) |
| 2005 |
Jan
(2) |
Feb
(8) |
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2007 |
Jan
|
Feb
|
Mar
(26) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
|
| 2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <lin...@us...> - 2002-06-28 06:38:39
|
Update of /cvsroot/dvbtools/dvbstream
In directory usw-pr-cvs1:/tmp/cvs-serv28501
Modified Files:
tune.c
Log Message:
display DVB-C tuning message
Index: tune.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbstream/tune.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** tune.c 27 Jun 2002 19:29:36 -0000 1.3
--- tune.c 28 Jun 2002 06:38:36 -0000 1.4
***************
*** 243,246 ****
--- 243,247 ----
break;
case FE_QAM:
+ fprintf(stderr,"tuning DVB-C to %d, srate=%d\n",freq,srate);
feparams.Frequency=freq;
feparams.Inversion=INVERSION_OFF;
|
|
From: <lin...@us...> - 2002-06-28 06:38:13
|
Update of /cvsroot/dvbtools/dvbtune
In directory usw-pr-cvs1:/tmp/cvs-serv28399
Modified Files:
tune.c
Log Message:
display DVB-C tuning message
Index: tune.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbtune/tune.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** tune.c 27 Jun 2002 18:41:40 -0000 1.5
--- tune.c 28 Jun 2002 06:38:09 -0000 1.6
***************
*** 243,246 ****
--- 243,247 ----
break;
case FE_QAM:
+ fprintf(stderr,"tuning DVB-C to %d, srate=%d\n",freq,srate);
feparams.Frequency=freq;
feparams.Inversion=INVERSION_OFF;
|
|
From: <lin...@us...> - 2002-06-27 20:21:03
|
Update of /cvsroot/dvbtools/dvbtune
In directory usw-pr-cvs1:/tmp/cvs-serv2172
Modified Files:
dvbtune.c
Log Message:
PMT parsing patch by Douglas Kosovic
Index: dvbtune.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbtune/dvbtune.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** dvbtune.c 12 Jun 2002 21:56:49 -0000 1.3
--- dvbtune.c 27 Jun 2002 20:20:47 -0000 1.4
***************
*** 40,43 ****
--- 40,44 ----
#include <stdio.h>
#include <stdlib.h>
+ #include <string.h>
#include <ctype.h>
#include <sys/ioctl.h>
***************
*** 696,701 ****
int fd_pmt;
int n,seclen;
! int i,k;
! int max_k;
unsigned char buf[4096];
struct dmxSctFilterParams sctFilterParams;
--- 697,701 ----
int fd_pmt;
int n,seclen;
! int i;
unsigned char buf[4096];
struct dmxSctFilterParams sctFilterParams;
***************
*** 734,739 ****
return;
}
! max_k=1;
! for (k=0;k<max_k;k++) {
if (read(fd_pmt,buf,3)==3) {
seclen=((buf[1] & 0x0f) << 8) | (buf[2] & 0xff);
--- 734,738 ----
return;
}
!
if (read(fd_pmt,buf,3)==3) {
seclen=((buf[1] & 0x0f) << 8) | (buf[2] & 0xff);
***************
*** 745,749 ****
// printf("<service id=\"%d\" pmt_pid=\"%d\">\n",service_id,pid);
! max_k=buf[7]+1; // last_sec_num - read this many (+1) sections
info_len=((buf[10]&0x0f)<<8)|buf[11];
i=12;
--- 744,753 ----
// printf("<service id=\"%d\" pmt_pid=\"%d\">\n",service_id,pid);
! if (sid != service_id) {
! close(fd_pmt);
! scan_pmt(pid, sid, change);
! return;
! }
!
info_len=((buf[10]&0x0f)<<8)|buf[11];
i=12;
***************
*** 774,784 ****
} else {
printf("Under-read bytes for PMT - wanted %d, got %d\n",seclen,n);
- close(fd_pmt);
}
} else {
fprintf(stderr,"Nothing to read from fd_pmt\n");
}
! }
! close(fd_pmt);
}
--- 778,787 ----
} else {
printf("Under-read bytes for PMT - wanted %d, got %d\n",seclen,n);
}
} else {
fprintf(stderr,"Nothing to read from fd_pmt\n");
}
!
! close(fd_pmt);
}
|
|
From: <lin...@us...> - 2002-06-27 19:34:35
|
Update of /cvsroot/dvbtools/dvbstream In directory usw-pr-cvs1:/tmp/cvs-serv18690 Modified Files: README Log Message: updated documentation Index: README =================================================================== RCS file: /cvsroot/dvbtools/dvbstream/README,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** README 15 May 2002 16:39:55 -0000 1.1.1.1 --- README 27 Jun 2002 19:34:29 -0000 1.2 *************** *** 1,4 **** ! DVBstream - v0.4pre2 ! -------------------- INTRODUCTION --- 1,4 ---- ! DVBstream - v0.4 ! ---------------- INTRODUCTION *************** *** 31,34 **** --- 31,38 ---- Just type "make" to compile (you may need to change the path to the DVB include files in the first line of the Makefile). + + If you are using dvbtune for DVB-T in Finland, you should replace the + "make" command with "make FINLAND=1". or "make FINLAND2=1" (see the + comments in the dvb_defaults.h file for details). USAGE - SERVER |
|
From: <lin...@us...> - 2002-06-27 19:33:32
|
Update of /cvsroot/dvbtools/dvbstream In directory usw-pr-cvs1:/tmp/cvs-serv18439 Modified Files: Makefile Log Message: added DVB country parameters Index: Makefile =================================================================== RCS file: /cvsroot/dvbtools/dvbstream/Makefile,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile 15 May 2002 16:39:53 -0000 1.1.1.1 --- Makefile 27 Jun 2002 19:33:28 -0000 1.2 *************** *** 4,7 **** --- 4,19 ---- OBJS=dvbstream dumprtp ts_filter rtpfeed rtp.o + ifdef UK + CFLAGS += -DUK + endif + + ifdef FINLAND + CFLAGS += -DFINLAND + endif + + ifdef FINLAND2 + CFLAGS += -DFINLAND2 + endif + all: $(OBJS) |
|
From: <lin...@us...> - 2002-06-27 19:30:36
|
Update of /cvsroot/dvbtools/dvbstream In directory usw-pr-cvs1:/tmp/cvs-serv17585 Modified Files: ts_filter.c Log Message: fixed compiler warning Index: ts_filter.c =================================================================== RCS file: /cvsroot/dvbtools/dvbstream/ts_filter.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ts_filter.c 27 Jun 2002 19:11:31 -0000 1.2 --- ts_filter.c 27 Jun 2002 19:30:29 -0000 1.3 *************** *** 3,6 **** --- 3,7 ---- #include <stdio.h> + #include <stdlib.h> #include <unistd.h> |
|
From: <lin...@us...> - 2002-06-27 19:29:42
|
Update of /cvsroot/dvbtools/dvbstream In directory usw-pr-cvs1:/tmp/cvs-serv17263 Modified Files: tune.c Added Files: dvb_defaults.h Log Message: copied tune.c from dvbtune --- NEW FILE: dvb_defaults.h --- /* dvb_defaults.h Idea provided by Tomi Ollila, implemented by Dave Chapman. Copyright (C) Dave Chapman 2002 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Or, point your browser to http://www.gnu.org/copyleft/gpl.html */ #ifndef _DVB_DEFAULTS_H #define _DVB_DEFAULTS_H /* Either uncomment one of the following lines, or add it to your "make" command. e.g. make FINLAND=1 */ //#define UK //#define FINLAND //#define FINLAND2 /* Firstly, lets define some world-wide defaults */ #define BANDWIDTH_DEFAULT BANDWIDTH_8_MHZ #define CONSTELLATION_DEFAULT QAM_64 #define HIERARCHY_DEFAULT HIERARCHY_NONE #define LP_CODERATE_DEFAULT FEC_1_2 /* DVB-T */ #ifdef UK /* UNITED KINGDOM settings */ #define HP_CODERATE_DEFAULT FEC_2_3 #define TRANSMISSION_MODE_DEFAULT TRANSMISSION_MODE_2K #define GUARD_INTERVAL_DEFAULT GUARD_INTERVAL_1_32 #endif #ifdef FINLAND /* FINLAND settings 1 */ #define HP_CODERATE_DEFAULT FEC_2_3 #define TRANSMISSION_MODE_DEFAULT TRANSMISSION_MODE_8K #define GUARD_INTERVAL_DEFAULT GUARD_INTERVAL_1_8 #endif #ifdef FINLAND2 /* FINLAND settings 2 */ #define HP_CODERATE_DEFAULT FEC_1_2 #define TRANSMISSION_MODE_DEFAULT TRANSMISSION_MODE_2K #define GUARD_INTERVAL_DEFAULT GUARD_INTERVAL_1_8 #endif #ifndef HP_CODERATE_DEFAULT #warning No DVB-T country defined in dvb_defaults.h #warning defaulting to UK #warning Ignore this if using Satellite or Cable /* Default to the UK */ #define HP_CODERATE_DEFAULT FEC_2_3 #define TRANSMISSION_MODE_DEFAULT TRANSMISSION_MODE_2K #define GUARD_INTERVAL_DEFAULT GUARD_INTERVAL_1_32 #endif #endif Index: tune.c =================================================================== RCS file: /cvsroot/dvbtools/dvbstream/tune.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tune.c 17 May 2002 16:25:12 -0000 1.2 --- tune.c 27 Jun 2002 19:29:36 -0000 1.3 *************** *** 1,2 **** --- 1,23 ---- + /* dvbtune - tune.c + + Copyright (C) Dave Chapman 2001,2002 + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + Or, point your browser to http://www.gnu.org/copyleft/gpl.html + + */ + #include <stdio.h> #include <stdlib.h> *************** *** 4,12 **** #include <sys/ioctl.h> #include <sys/poll.h> ! #include <fcntl.h> #include <ost/dmx.h> #include <ost/sec.h> #include <ost/frontend.h> #define slof (11700*1000UL) --- 25,36 ---- #include <sys/ioctl.h> #include <sys/poll.h> ! #include <unistd.h> #include <ost/dmx.h> #include <ost/sec.h> #include <ost/frontend.h> + #include <ost/frontend.h> + + #include "dvb_defaults.h" #define slof (11700*1000UL) *************** *** 14,19 **** #define lof2 (10600*1000UL) ! int tune_it(int fd_frontend, int fd_sec, unsigned long freq, unsigned long srate, char pol) { int i,res; int32_t strength; --- 38,151 ---- #define lof2 (10600*1000UL) ! int OSTSelftest(int fd) ! { ! int ans; ! ! if ( (ans = ioctl(fd,FE_SELFTEST,0) < 0)){ ! perror("FE SELF TEST: "); ! return -1; ! } ! ! return 0; ! } ! ! int OSTSetPowerState(int fd, uint32_t state) ! { ! int ans; ! ! if ( (ans = ioctl(fd,FE_SET_POWER_STATE,state) < 0)){ ! perror("OST SET POWER STATE: "); ! return -1; ! } ! ! return 0; ! } ! ! int OSTGetPowerState(int fd, uint32_t *state) ! { ! int ans; ! ! if ( (ans = ioctl(fd,FE_GET_POWER_STATE,state) < 0)){ ! perror("OST GET POWER STATE: "); ! return -1; ! } ! ! switch(*state){ ! case FE_POWER_ON: ! fprintf(stderr,"POWER ON (%d)\n",*state); ! break; ! case FE_POWER_STANDBY: ! fprintf(stderr,"POWER STANDBY (%d)\n",*state); ! break; ! case FE_POWER_SUSPEND: ! fprintf(stderr,"POWER SUSPEND (%d)\n",*state); ! break; ! case FE_POWER_OFF: ! fprintf(stderr,"POWER OFF (%d)\n",*state); ! break; ! default: ! fprintf(stderr,"unknown (%d)\n",*state); ! break; ! } ! ! return 0; ! } ! ! int SecGetStatus (int fd, struct secStatus *state) ! { ! int ans; ! ! if ( (ans = ioctl(fd,SEC_GET_STATUS, state) < 0)){ ! perror("SEC GET STATUS: "); ! return -1; ! } ! ! switch (state->busMode){ ! case SEC_BUS_IDLE: ! fprintf(stderr,"SEC BUS MODE: IDLE (%d)\n",state->busMode); ! break; ! case SEC_BUS_BUSY: ! fprintf(stderr,"SEC BUS MODE: BUSY (%d)\n",state->busMode); ! break; ! case SEC_BUS_OFF: ! fprintf(stderr,"SEC BUS MODE: OFF (%d)\n",state->busMode); ! break; ! case SEC_BUS_OVERLOAD: ! fprintf(stderr,"SEC BUS MODE: OVERLOAD (%d)\n",state->busMode); ! break; ! default: ! fprintf(stderr,"SEC BUS MODE: unknown (%d)\n",state->busMode); ! break; ! } + switch (state->selVolt){ + case SEC_VOLTAGE_OFF: + fprintf(stderr,"SEC VOLTAGE: OFF (%d)\n",state->selVolt); + break; + case SEC_VOLTAGE_LT: + fprintf(stderr,"SEC VOLTAGE: LT (%d)\n",state->selVolt); + break; + case SEC_VOLTAGE_13: + fprintf(stderr,"SEC VOLTAGE: 13 (%d)\n",state->selVolt); + break; + case SEC_VOLTAGE_13_5: + fprintf(stderr,"SEC VOLTAGE: 13.5 (%d)\n",state->selVolt); + break; + case SEC_VOLTAGE_18: + fprintf(stderr,"SEC VOLTAGE: 18 (%d)\n",state->selVolt); + break; + case SEC_VOLTAGE_18_5: + fprintf(stderr,"SEC VOLTAGE: 18.5 (%d)\n",state->selVolt); + break; + default: + fprintf(stderr,"SEC VOLTAGE: unknown (%d)\n",state->selVolt); + break; + } + + fprintf(stderr,"SEC CONT TONE: %s\n", (state->contTone == SEC_TONE_ON ? "ON" : "OFF")); + return 0; + } + + int tune_it(int fd_frontend, int fd_sec, unsigned int freq, unsigned int srate, char pol, int tone, SpectralInversion specInv, unsigned int diseqc) { int i,res; int32_t strength; *************** *** 21,85 **** FrontendEvent event; FrontendParameters feparams; - secToneMode tone; secVoltage voltage; ! if (freq > 100000000) { ! fprintf(stderr,"tuning DVB-T to %u\n",freq); ! feparams.Frequency=freq; ! feparams.u.ofdm.bandWidth=BANDWIDTH_8_MHZ; // WAS: 8 ! feparams.u.ofdm.HP_CodeRate=FEC_2_3; ! feparams.u.ofdm.LP_CodeRate=FEC_1_2; ! feparams.u.ofdm.Constellation=QAM_64; // WAS: 16 ! feparams.u.ofdm.TransmissionMode=TRANSMISSION_MODE_2K; ! feparams.u.ofdm.guardInterval=GUARD_INTERVAL_1_32; ! feparams.u.ofdm.HierarchyInformation=HIERARCHY_NONE; ! } else { ! fprintf(stderr,"tuning DVB-S to %d%c %d\n",freq,pol,srate); ! if (freq < slof) { ! feparams.Frequency=(freq-lof1); ! tone = SEC_TONE_OFF; ! } else { ! feparams.Frequency=(freq-lof2); ! tone = SEC_TONE_ON; ! } ! feparams.Inversion=INVERSION_AUTO; ! if ((pol=='h') || (pol=='H')) { ! voltage = SEC_VOLTAGE_18; ! } else { ! voltage = SEC_VOLTAGE_13; ! } ! feparams.u.qpsk.SymbolRate=srate; ! feparams.u.qpsk.FEC_inner=FEC_AUTO; ! if (ioctl(fd_sec,SEC_SET_TONE,tone) < 0) { ! perror("ERROR setting tone\n"); ! } ! ! if (ioctl(fd_sec,SEC_SET_VOLTAGE,voltage) < 0) { ! perror("ERROR setting voltage\n"); ! } ! usleep(200000); ! } ! if (ioctl(fd_frontend,FE_SET_FRONTEND,&feparams) < 0) { ! perror("ERROR tuning channel\n"); ! } else { ! fprintf(stderr,"Channel tuned\n"); } ! // usleep(5000000); ! i=10; ! res = ioctl(fd_frontend, FE_GET_EVENT, &event); ! while ((i<10) && (res < 0)) { ! res = ioctl(fd_frontend, FE_GET_EVENT, &event); ! i--; } ! if (res < 0) ! perror("qpsk get event"); ! else switch (event.type) { case FE_UNEXPECTED_EV: fprintf(stderr,"FE_UNEXPECTED_EV\n"); --- 153,297 ---- FrontendEvent event; FrontendParameters feparams; secVoltage voltage; + struct pollfd pfd[1]; + struct secStatus sec_state; + FrontendInfo fe_info; ! if ( (res = ioctl(fd_frontend,FE_GET_INFO, &fe_info) < 0)){ ! perror("FE_GET_INFO: "); ! return -1; ! } ! ! // OSTSelftest(fd_frontend); ! // OSTSetPowerState(fd_frontend, FE_POWER_ON); ! // OSTGetPowerState(fd_frontend, &festatus); ! switch(fe_info.type) { ! case FE_OFDM: ! fprintf(stderr,"tuning DVB-T to %d\n",freq); ! feparams.Frequency=freq; ! feparams.Inversion=INVERSION_OFF; ! feparams.u.ofdm.bandWidth=BANDWIDTH_DEFAULT; ! feparams.u.ofdm.HP_CodeRate=HP_CODERATE_DEFAULT; ! feparams.u.ofdm.LP_CodeRate=LP_CODERATE_DEFAULT; ! feparams.u.ofdm.Constellation=CONSTELLATION_DEFAULT; ! feparams.u.ofdm.TransmissionMode=TRANSMISSION_MODE_DEFAULT; ! feparams.u.ofdm.guardInterval=GUARD_INTERVAL_DEFAULT; ! feparams.u.ofdm.HierarchyInformation=HIERARCHY_DEFAULT; ! break; ! case FE_QPSK: ! fprintf(stderr,"tuning DVB-S to L-Band:%d, Pol:%c Srate=%d, 22kHz=%s\n",feparams.Frequency,pol,srate,tone == SEC_TONE_ON ? "on" : "off"); ! if ((pol=='h') || (pol=='H')) { ! voltage = SEC_VOLTAGE_18; ! } else { ! voltage = SEC_VOLTAGE_13; ! } ! if (ioctl(fd_sec,SEC_SET_VOLTAGE,voltage) < 0) { ! perror("ERROR setting voltage\n"); ! } ! if (freq > 2200000) { ! // this must be an absolute frequency ! if (freq < slof) { ! feparams.Frequency=(freq-lof1); ! if (tone < 0) tone = SEC_TONE_OFF; ! } else { ! feparams.Frequency=(freq-lof2); ! if (tone < 0) tone = SEC_TONE_ON; ! } ! } else { ! // this is an L-Band frequency ! feparams.Frequency=freq; ! } ! ! feparams.Inversion=specInv; ! feparams.u.qpsk.SymbolRate=srate; ! feparams.u.qpsk.FEC_inner=FEC_AUTO; ! if (ioctl(fd_sec,SEC_SET_TONE,tone) < 0) { ! perror("ERROR setting tone\n"); ! } ! if (diseqc > 0) { ! struct secCommand scmd; ! struct secCmdSequence scmds; ! ! scmds.continuousTone = tone; ! scmds.voltage = voltage; ! /* ! scmds.miniCommand = toneBurst ? SEC_MINI_B : SEC_MINI_A; ! */ ! scmds.miniCommand = SEC_MINI_NONE; ! ! scmd.type = 0; ! scmds.numCommands = 1; ! scmds.commands = &scmd; ! ! scmd.u.diseqc.addr = 0x10; ! scmd.u.diseqc.cmd = 0x38; ! scmd.u.diseqc.numParams = 1; ! scmd.u.diseqc.params[0] = 0xf0 | ! (((diseqc - 1) << 2) & 0x0c) | ! (voltage==SEC_VOLTAGE_18 ? 0x02 : 0) | ! (tone==SEC_TONE_ON ? 0x01 : 0); ! ! if (ioctl(fd_sec,SEC_SEND_SEQUENCE,&scmds) < 0) { ! perror("Error sending DisEqC"); ! return -1; ! } ! } ! break; ! case FE_QAM: ! feparams.Frequency=freq; ! feparams.Inversion=INVERSION_OFF; ! feparams.u.qam.SymbolRate = srate; ! feparams.u.qam.FEC_inner = FEC_AUTO; ! feparams.u.qam.QAM = QAM_64; break; ! default: ! fprintf(stderr,"Unknown FE type. Aborting\n"); ! exit(-1); } + usleep(100000); + + if (fd_sec) SecGetStatus(fd_sec, &sec_state); + + i = 0; res = -1; + while ((i < 3) && (res < 0)) { + if (ioctl(fd_frontend,FE_SET_FRONTEND,&feparams) < 0) { + perror("ERROR tuning channel\n"); + return -1; + } ! pfd[0].fd = fd_frontend; ! pfd[0].events = POLLIN; ! if (poll(pfd,1,10000)){ ! if (pfd[0].revents & POLLIN){ ! fprintf(stderr,"Getting frontend event\n"); ! if ( ioctl(fd_frontend, FE_GET_EVENT, &event) == -EBUFFEROVERFLOW){ ! perror("FE_GET_EVENT"); ! return -1; ! } ! fprintf(stderr,"Received "); ! switch(event.type){ ! case FE_UNEXPECTED_EV: ! fprintf(stderr,"unexpected event\n"); ! res = -1; ! break; ! case FE_FAILURE_EV: ! fprintf(stderr,"failure event\n"); ! res = -1; ! break; ! case FE_COMPLETION_EV: ! fprintf(stderr,"completion event\n"); ! res = 0; ! break; ! } ! } ! i++; ! } } ! if (res > 0) switch (event.type) { case FE_UNEXPECTED_EV: fprintf(stderr,"FE_UNEXPECTED_EV\n"); *************** *** 89,128 **** case FE_FAILURE_EV: fprintf(stderr,"FE_FAILURE_EV\n"); break; ! } ! if (freq > 100000000) { ! fprintf(stderr,"Event: iFrequency: %ld\n",event.u.completionEvent.Frequency); ! } else { ! fprintf(stderr,"Event: iFrequency: %ld\n",(event.u.completionEvent.Frequency)+(tone==SEC_TONE_OFF ? lof1 : lof2)); ! fprintf(stderr," SymbolRate: %ld\n",event.u.completionEvent.u.qpsk.SymbolRate); ! fprintf(stderr," FEC_inner: %d\n",event.u.completionEvent.u.qpsk.FEC_inner); ! fprintf(stderr,"\n"); ! } ! strength=0; ! ioctl(fd_frontend,FE_READ_BER,&strength); ! fprintf(stderr,"Bit error rate: %ld\n",strength); ! strength=0; ! ioctl(fd_frontend,FE_READ_SIGNAL_STRENGTH,&strength); ! fprintf(stderr,"Signal strength: %ld\n",strength); ! strength=0; ! ioctl(fd_frontend,FE_READ_SNR,&strength); ! fprintf(stderr,"SNR: %ld\n",strength); ! festatus=0; ! ioctl(fd_frontend,FE_READ_STATUS,&festatus); ! fprintf(stderr,"FE_STATUS:"); ! if (festatus & FE_HAS_POWER) fprintf(stderr," FE_HAS_POWER"); ! if (festatus & FE_HAS_SIGNAL) fprintf(stderr," FE_HAS_SIGNAL"); ! if (festatus & FE_SPECTRUM_INV) fprintf(stderr," FE_SPECTRUM_INV"); ! if (festatus & FE_HAS_LOCK) fprintf(stderr," FE_HAS_LOCK"); ! if (festatus & FE_HAS_CARRIER) fprintf(stderr," FE_HAS_CARRIER"); ! if (festatus & FE_HAS_VITERBI) fprintf(stderr," FE_HAS_VITERBI"); ! if (festatus & FE_HAS_SYNC) fprintf(stderr," FE_HAS_SYNC"); ! if (festatus & FE_TUNER_HAS_LOCK) fprintf(stderr," FE_TUNER_HAS_LOCK"); ! fprintf(stderr,"\n"); ! } --- 301,369 ---- case FE_FAILURE_EV: fprintf(stderr,"FE_FAILURE_EV\n"); break; ! } ! if (event.type == FE_COMPLETION_EV) { ! switch(fe_info.type) { ! case FE_OFDM: ! fprintf(stderr,"Event: Frequency: %d\n",event.u.completionEvent.Frequency); ! break; ! case FE_QPSK: ! fprintf(stderr,"Event: Frequency: %d\n",(unsigned int)((event.u.completionEvent.Frequency)+(tone==SEC_TONE_OFF ? lof1 : lof2))); ! fprintf(stderr," SymbolRate: %d\n",event.u.completionEvent.u.qpsk.SymbolRate); ! fprintf(stderr," FEC_inner: %d\n",event.u.completionEvent.u.qpsk.FEC_inner); ! fprintf(stderr,"\n"); ! break; ! case FE_QAM: ! fprintf(stderr,"Event: Frequency: %d\n",event.u.completionEvent.Frequency); ! fprintf(stderr," SymbolRate: %d\n",event.u.completionEvent.u.qpsk.SymbolRate); ! fprintf(stderr," FEC_inner: %d\n",event.u.completionEvent.u.qpsk.FEC_inner); ! break; ! default: ! break; ! } ! strength=0; ! ioctl(fd_frontend,FE_READ_BER,&strength); ! fprintf(stderr,"Bit error rate: %d\n",strength); ! strength=0; ! ioctl(fd_frontend,FE_READ_SIGNAL_STRENGTH,&strength); ! fprintf(stderr,"Signal strength: %d\n",strength); ! strength=0; ! ioctl(fd_frontend,FE_READ_SNR,&strength); ! fprintf(stderr,"SNR: %d\n",strength); ! festatus=0; ! ioctl(fd_frontend,FE_READ_STATUS,&festatus); ! fprintf(stderr,"FE_STATUS:"); ! if (festatus & FE_HAS_POWER) fprintf(stderr," FE_HAS_POWER"); ! if (festatus & FE_HAS_SIGNAL) fprintf(stderr," FE_HAS_SIGNAL"); ! if (festatus & FE_SPECTRUM_INV) fprintf(stderr," FE_SPECTRUM_INV"); ! if (festatus & FE_HAS_LOCK) fprintf(stderr," FE_HAS_LOCK"); ! if (festatus & FE_HAS_CARRIER) fprintf(stderr," FE_HAS_CARRIER"); ! if (festatus & FE_HAS_VITERBI) fprintf(stderr," FE_HAS_VITERBI"); ! if (festatus & FE_HAS_SYNC) fprintf(stderr," FE_HAS_SYNC"); ! if (festatus & FE_TUNER_HAS_LOCK) fprintf(stderr," FE_TUNER_HAS_LOCK"); ! fprintf(stderr,"\n"); ! } else { ! #if 0 ! FrontendInfo info; ! if ( (res = ioctl(fd_frontend,FE_GET_INFO, &info) < 0)){ ! perror("FE_GET_INFO: "); ! return -1; ! } + fprintf(stderr,"min Frequency : %d\n", info.minFrequency); + fprintf(stderr,"max Frequency : %d\n", info.maxFrequency); + fprintf(stderr,"min Symbol Rate : %d\n", info.minSymbolRate); + fprintf(stderr,"max Symbol Rate : %d\n", info.maxSymbolRate); + fprintf(stderr,"Hardware Type : %d\n", info.hwType); + fprintf(stderr,"Hardware Version: %d\n", info.hwVersion); + #endif + fprintf(stderr,"Not able to lock to the signal on the given frequency\n"); + return -1; + } + return 0; + } |
|
From: <lin...@us...> - 2002-06-27 19:11:34
|
Update of /cvsroot/dvbtools/dvbstream
In directory usw-pr-cvs1:/tmp/cvs-serv12261
Modified Files:
ts_filter.c dumprtp.c rtp.c dvbstream.c tune.h rtpfeed.c
Log Message:
fixed compiler warnings
Index: ts_filter.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbstream/ts_filter.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** ts_filter.c 15 May 2002 16:39:56 -0000 1.1.1.1
--- ts_filter.c 27 Jun 2002 19:11:31 -0000 1.2
***************
*** 22,24 ****
--- 22,25 ----
}
}
+ return(0);
}
Index: dumprtp.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbstream/dumprtp.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** dumprtp.c 15 May 2002 16:39:56 -0000 1.1.1.1
--- dumprtp.c 27 Jun 2002 19:11:31 -0000 1.2
***************
*** 22,29 ****
--- 22,31 ----
#include <stdio.h>
+ #include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <resolv.h>
+ #include <unistd.h>
#include "rtp.h"
***************
*** 40,44 ****
}
! main(int argc, char *argv[]) {
struct sockaddr_in si;
--- 42,46 ----
}
! int main(int argc, char *argv[]) {
struct sockaddr_in si;
***************
*** 48,55 ****
int port;
- char tmp[50];
- register int i, s, len;
- struct sockaddr_un saun;
-
fprintf(stderr,"Rtp dump\n");
--- 50,53 ----
***************
*** 73,75 ****
--- 71,74 ----
close(socketIn);
+ return(0);
}
Index: rtp.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbstream/rtp.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** rtp.c 15 May 2002 16:39:54 -0000 1.1.1.1
--- rtp.c 27 Jun 2002 19:11:31 -0000 1.2
***************
*** 93,97 ****
}
if (lengthPacket<12) {
! fprintf(stderr,"packet too small (%d) to be an rtp frame (>12bytes)\n");
exit(3);
}
--- 93,97 ----
}
if (lengthPacket<12) {
! fprintf(stderr,"packet too small (%d) to be an rtp frame (>12bytes)\n",lengthPacket);
exit(3);
}
***************
*** 157,161 ****
int headerSize;
int lengthPacket;
- int i;
lengthPacket=recv(fd,buf,1590,0);
--- 157,160 ----
***************
*** 164,167 ****
--- 163,167 ----
*data = (char*) buf + headerSize;
fprintf(stderr,"[%d] %02x %x\n",lengthPacket,buf[8],buf[0]);
+ return(0);
}
Index: dvbstream.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbstream/dvbstream.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** dvbstream.c 15 May 2002 16:40:04 -0000 1.1.1.1
--- dvbstream.c 27 Jun 2002 19:11:31 -0000 1.2
***************
*** 42,52 ****
#include <netdb.h>
#include "rtp.h"
#include "mpegtools/transform.h"
#include "mpegtools/remux.h"
! // DVB includes:
! #include <ost/dmx.h>
! #include <ost/frontend.h>
// The default telnet port.
--- 42,54 ----
#include <netdb.h>
+ // DVB includes:
+ #include <ost/dmx.h>
+ #include <ost/frontend.h>
+
#include "rtp.h"
#include "mpegtools/transform.h"
#include "mpegtools/remux.h"
! #include "tune.h"
// The default telnet port.
***************
*** 232,236 ****
else { pestype=DMX_PES_OTHER; i=3; }
while (cmd[i]==' ') i++;
! if (ch=(char*)strstr(&cmd[i],":")) {
pid2=atoi(&ch[1]);
ch[0]=0;
--- 234,238 ----
else { pestype=DMX_PES_OTHER; i=3; }
while (cmd[i]==' ') i++;
! if ((ch=(char*)strstr(&cmd[i],":"))!=NULL) {
pid2=atoi(&ch[1]);
ch[0]=0;
***************
*** 293,297 ****
srate=atoi(&cmd[i])*1000UL;
if (open_fe(&fd_frontend,&fd_sec)) {
! fprintf(stderr,"Tuning to %d,%d,%c\n",freq,srate,pol);
tune_it(fd_frontend,fd_sec,freq,srate,pol);
close(fd_frontend);
--- 295,299 ----
srate=atoi(&cmd[i])*1000UL;
if (open_fe(&fd_frontend,&fd_sec)) {
! fprintf(stderr,"Tuning to %ld,%ld,%c\n",freq,srate,pol);
tune_it(fd_frontend,fd_sec,freq,srate,pol);
close(fd_frontend);
***************
*** 307,311 ****
}
}
!
}
--- 309,313 ----
}
}
! return(0);
}
***************
*** 381,389 ****
int main(int argc, char **argv)
{
! state_t state=STREAM_OFF;
unsigned short int port=DEFAULT_PORT;
int fd_dvr;
int i;
- unsigned char c;
unsigned char buf[MTU];
struct pollfd pfds[2]; // DVR device and Telnet connection
--- 383,390 ----
int main(int argc, char **argv)
{
! // state_t state=STREAM_OFF;
unsigned short int port=DEFAULT_PORT;
int fd_dvr;
int i;
unsigned char buf[MTU];
struct pollfd pfds[2]; // DVR device and Telnet connection
***************
*** 395,399 ****
char* ch;
dmxPesType_t pestype;
- int bytes_filled;
int bytes_read;
unsigned char* free_bytes;
--- 396,399 ----
***************
*** 467,471 ****
pestype=DMX_PES_TELETEXT;
} else {
! if (ch=(char*)strstr(argv[i],":")) {
pid2=atoi(&ch[1]);
ch[0]=0;
--- 467,471 ----
pestype=DMX_PES_TELETEXT;
} else {
! if ((ch=(char*)strstr(argv[i],":"))!=NULL) {
pid2=atoi(&ch[1]);
ch[0]=0;
Index: tune.h
===================================================================
RCS file: /cvsroot/dvbtools/dvbstream/tune.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** tune.h 15 May 2002 16:39:57 -0000 1.1.1.1
--- tune.h 27 Jun 2002 19:11:31 -0000 1.2
***************
*** 1,3 ****
! #ifdef _TUNE_H
#define _TUNE_H
--- 1,3 ----
! #ifndef _TUNE_H
#define _TUNE_H
Index: rtpfeed.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbstream/rtpfeed.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** rtpfeed.c 15 May 2002 16:39:56 -0000 1.1.1.1
--- rtpfeed.c 27 Jun 2002 19:11:31 -0000 1.2
***************
*** 27,30 ****
--- 27,31 ----
// Linux includes:
#include <stdio.h>
+ #include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
***************
*** 34,37 ****
--- 35,39 ----
#include <fcntl.h>
#include <getopt.h>
+ #include <unistd.h>
#include "rtp.h"
***************
*** 78,82 ****
! main(int argc, char *argv[]) {
// filedescriptors for video, audio and dvr-device
--- 80,84 ----
! int main(int argc, char *argv[]) {
// filedescriptors for video, audio and dvr-device
***************
*** 88,94 ****
uint16_t apid = 0;
- struct dmxPesFilterParams pesFilterParams;
-
-
struct sockaddr_in si;
int socketIn;
--- 90,93 ----
***************
*** 97,104 ****
int port = 5004;
- char tmp[50];
- register int i, s, len;
- struct sockaddr_un saun;
-
// process command-line arguments
static struct option long_options[]={
--- 96,99 ----
***************
*** 133,137 ****
break;
case 'h':
! fprintf(stderr,"Usage: rtpfeed [-g group] [-p port] [-v video PID] [-a audio PID] \n",argv[0]);
exit(1);
}// end switch
--- 128,132 ----
break;
case 'h':
! fprintf(stderr,"Usage: %s [-g group] [-p port] [-v video PID] [-a audio PID] \n",argv[0]);
exit(1);
}// end switch
***************
*** 168,170 ****
--- 163,166 ----
close(socketIn);
+ return(0);
}
|
|
From: <lin...@us...> - 2002-06-27 18:52:47
|
Update of /cvsroot/dvbtools/dvbtune In directory usw-pr-cvs1:/tmp/cvs-serv6678 Modified Files: README Log Message: changes to README Index: README =================================================================== RCS file: /cvsroot/dvbtools/dvbtune/README,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** README 27 Jun 2002 18:41:40 -0000 1.3 --- README 27 Jun 2002 18:52:43 -0000 1.4 *************** *** 7,13 **** This is still very experimental - especially the XML output. ! The latest version can be found at www.linuxstb.org. You can contact the author at <da...@dc...>. Installation ------------ --- 7,19 ---- This is still very experimental - especially the XML output. ! The latest release can be found at www.linuxstb.org. You can contact the author at <da...@dc...>. + There is also a CVS repository (normally more recent than + linuxstb.org) available at + + http://sourceforge.net/projects/dvbtools + + Installation ------------ *************** *** 87,90 **** --- 93,100 ---- Added -D diseqc support, and made the 22kHz tone automatic again. + + Tomi Ollila - June 2002. + + Changes to FINLAND DVB-T tuning, and dvb_defaults.h suggestion. |
|
From: <lin...@us...> - 2002-06-27 18:41:45
|
Update of /cvsroot/dvbtools/dvbtune In directory usw-pr-cvs1:/tmp/cvs-serv3402 Modified Files: README Makefile tune.c Added Files: dvb_defaults.h Log Message: added new dvb_defaults.h file and related changes --- NEW FILE: dvb_defaults.h --- /* dvb_defaults.h Idea provided by Tomi Ollila, implemented by Dave Chapman. Copyright (C) Dave Chapman 2002 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Or, point your browser to http://www.gnu.org/copyleft/gpl.html */ #ifndef _DVB_DEFAULTS_H #define _DVB_DEFAULTS_H /* Either uncomment one of the following lines, or add it to your "make" command. e.g. make FINLAND=1 */ //#define UK //#define FINLAND //#define FINLAND2 /* Firstly, lets define some world-wide defaults */ #define BANDWIDTH_DEFAULT BANDWIDTH_8_MHZ #define CONSTELLATION_DEFAULT QAM_64 #define HIERARCHY_DEFAULT HIERARCHY_NONE #define LP_CODERATE_DEFAULT FEC_1_2 /* DVB-T */ #ifdef UK /* UNITED KINGDOM settings */ #define HP_CODERATE_DEFAULT FEC_2_3 #define TRANSMISSION_MODE_DEFAULT TRANSMISSION_MODE_2K #define GUARD_INTERVAL_DEFAULT GUARD_INTERVAL_1_32 #endif #ifdef FINLAND /* FINLAND settings 1 */ #define HP_CODERATE_DEFAULT FEC_2_3 #define TRANSMISSION_MODE_DEFAULT TRANSMISSION_MODE_8K #define GUARD_INTERVAL_DEFAULT GUARD_INTERVAL_1_8 #endif #ifdef FINLAND2 /* FINLAND settings 2 */ #define HP_CODERATE_DEFAULT FEC_1_2 #define TRANSMISSION_MODE_DEFAULT TRANSMISSION_MODE_2K #define GUARD_INTERVAL_DEFAULT GUARD_INTERVAL_1_8 #endif #ifndef HP_CODERATE_DEFAULT #warning No DVB-T country defined in dvb_defaults.h #warning defaulting to UK #warning Ignore this if using Satellite or Cable /* Default to the UK */ #define HP_CODERATE_DEFAULT FEC_2_3 #define TRANSMISSION_MODE_DEFAULT TRANSMISSION_MODE_2K #define GUARD_INTERVAL_DEFAULT GUARD_INTERVAL_1_32 #endif #endif Index: README =================================================================== RCS file: /cvsroot/dvbtools/dvbtune/README,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** README 16 May 2002 21:39:46 -0000 1.2 --- README 27 Jun 2002 18:41:40 -0000 1.3 *************** *** 36,40 **** If you are using dvbtune for DVB-T in Finland, you should replace the ! "make" command with "make FINLAND=1". Once you have installed libxml (if required), then you can compile --- 36,41 ---- If you are using dvbtune for DVB-T in Finland, you should replace the ! "make" command with "make FINLAND=1". or "make FINLAND2=1" (see the ! comments in the dvb_defaults.h file for details). Once you have installed libxml (if required), then you can compile Index: Makefile =================================================================== RCS file: /cvsroot/dvbtools/dvbtune/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile 16 May 2002 21:39:46 -0000 1.2 --- Makefile 27 Jun 2002 18:41:40 -0000 1.3 *************** *** 4,12 **** all: dvbtune ifdef FINLAND CFLAGS += -DFINLAND endif ! tune.o: tune.c tune.h dvbtune: dvbtune.c tune.o --- 4,20 ---- all: dvbtune + ifdef UK + CFLAGS += -DUK + endif + ifdef FINLAND CFLAGS += -DFINLAND endif ! ifdef FINLAND2 ! CFLAGS += -DFINLAND2 ! endif ! ! tune.o: tune.c tune.h dvb_defaults.h dvbtune: dvbtune.c tune.o Index: tune.c =================================================================== RCS file: /cvsroot/dvbtools/dvbtune/tune.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tune.c 27 Jun 2002 08:04:08 -0000 1.4 --- tune.c 27 Jun 2002 18:41:40 -0000 1.5 *************** *** 1,2 **** --- 1,23 ---- + /* dvbtune - tune.c + + Copyright (C) Dave Chapman 2001,2002 + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + Or, point your browser to http://www.gnu.org/copyleft/gpl.html + + */ + #include <stdio.h> #include <stdlib.h> *************** *** 11,19 **** #include <ost/frontend.h> #define slof (11700*1000UL) #define lof1 (9750*1000UL) #define lof2 (10600*1000UL) - int OSTSelftest(int fd) { --- 32,41 ---- #include <ost/frontend.h> + #include "dvb_defaults.h" + #define slof (11700*1000UL) #define lof1 (9750*1000UL) #define lof2 (10600*1000UL) int OSTSelftest(int fd) { *************** *** 150,172 **** feparams.Frequency=freq; feparams.Inversion=INVERSION_OFF; ! #ifdef FINLAND ! /* FINLAND Parameters */ ! feparams.u.ofdm.bandWidth=BANDWIDTH_8_MHZ; // WAS: 8 ! feparams.u.ofdm.HP_CodeRate=FEC_1_2; ! feparams.u.ofdm.LP_CodeRate=FEC_1_2; ! feparams.u.ofdm.Constellation=QAM_64; // WAS: 16 ! feparams.u.ofdm.TransmissionMode=TRANSMISSION_MODE_2K; ! feparams.u.ofdm.guardInterval=GUARD_INTERVAL_1_8; ! feparams.u.ofdm.HierarchyInformation=HIERARCHY_NONE; ! #else ! /* UK Parameters */ ! feparams.u.ofdm.bandWidth=BANDWIDTH_8_MHZ; // WAS: 8 ! feparams.u.ofdm.HP_CodeRate=FEC_2_3; ! feparams.u.ofdm.LP_CodeRate=FEC_1_2; ! feparams.u.ofdm.Constellation=QAM_64; // WAS: 16 ! feparams.u.ofdm.TransmissionMode=TRANSMISSION_MODE_2K; ! feparams.u.ofdm.guardInterval=GUARD_INTERVAL_1_32; ! feparams.u.ofdm.HierarchyInformation=HIERARCHY_NONE; ! #endif break; case FE_QPSK: --- 172,182 ---- feparams.Frequency=freq; feparams.Inversion=INVERSION_OFF; ! feparams.u.ofdm.bandWidth=BANDWIDTH_DEFAULT; ! feparams.u.ofdm.HP_CodeRate=HP_CODERATE_DEFAULT; ! feparams.u.ofdm.LP_CodeRate=LP_CODERATE_DEFAULT; ! feparams.u.ofdm.Constellation=CONSTELLATION_DEFAULT; ! feparams.u.ofdm.TransmissionMode=TRANSMISSION_MODE_DEFAULT; ! feparams.u.ofdm.guardInterval=GUARD_INTERVAL_DEFAULT; ! feparams.u.ofdm.HierarchyInformation=HIERARCHY_DEFAULT; break; case FE_QPSK: |
|
From: <lin...@us...> - 2002-06-27 08:04:12
|
Update of /cvsroot/dvbtools/dvbtune
In directory usw-pr-cvs1:/tmp/cvs-serv14734
Modified Files:
tune.c
Log Message:
bug fix for FINLAND by Tomi Ollila
Index: tune.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbtune/tune.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** tune.c 23 Jun 2002 19:20:11 -0000 1.3
--- tune.c 27 Jun 2002 08:04:08 -0000 1.4
***************
*** 168,173 ****
feparams.u.ofdm.guardInterval=GUARD_INTERVAL_1_32;
feparams.u.ofdm.HierarchyInformation=HIERARCHY_NONE;
- break;
#endif
case FE_QPSK:
fprintf(stderr,"tuning DVB-S to L-Band:%d, Pol:%c Srate=%d, 22kHz=%s\n",feparams.Frequency,pol,srate,tone == SEC_TONE_ON ? "on" : "off");
--- 168,173 ----
feparams.u.ofdm.guardInterval=GUARD_INTERVAL_1_32;
feparams.u.ofdm.HierarchyInformation=HIERARCHY_NONE;
#endif
+ break;
case FE_QPSK:
fprintf(stderr,"tuning DVB-S to L-Band:%d, Pol:%c Srate=%d, 22kHz=%s\n",feparams.Frequency,pol,srate,tone == SEC_TONE_ON ? "on" : "off");
|
|
From: <lin...@us...> - 2002-06-26 20:41:08
|
Update of /cvsroot/dvbtools/dvbts2pes
In directory usw-pr-cvs1:/tmp/cvs-serv19942
Modified Files:
dvbts2pes.c
Log Message:
first use of discontinuity_indicator
Index: dvbts2pes.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbts2pes/dvbts2pes.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** dvbts2pes.c 26 Jun 2002 19:32:58 -0000 1.3
--- dvbts2pes.c 26 Jun 2002 20:41:04 -0000 1.4
***************
*** 99,102 ****
--- 99,103 ----
int adaption_field_control,continuity_counter;
int adaption_field_length;
+ int discontinuity_indicator;
int max_pes=0;
int min_pes=9999999;
***************
*** 104,107 ****
--- 105,109 ----
int pes_dropped=0;
int ts_dropped=0;
+ int pes_dirty;
if (argc==2) {
***************
*** 137,140 ****
--- 139,151 ----
continuity_counter=buf[3]&0x0f;
adaption_field_control=(buf[3]&0x30)>>4;
+ discontinuity_indicator=0;
+ if ((adaption_field_control==2) || (adaption_field_control==3)) {
+ if (buf[4] > 0) { // adaption_field_length
+ discontinuity_indicator=(buf[5]&0x80)>>7;
+ }
+ }
+ if (discontinuity_indicator) {
+ fprintf(stderr,"INFORMATION: packet %d - discontinuity_indicator set\n",packet);
+ }
/* Firstly, check the integrity of the stream */
***************
*** 142,153 ****
counter=continuity_counter;
} else {
! counter++; counter%=16;
}
if (counter!=continuity_counter) {
! n=(continuity_counter+16-counter)%16;
! fprintf(stderr,"TS: missing %d packet(s), packet=%d, expecting %02x, received %02x\n",n,packet,counter,continuity_counter);
! ts_dropped+=n;
counter=continuity_counter;
}
--- 153,169 ----
counter=continuity_counter;
} else {
! if ((adaption_field_control!=0) && (adaption_field_control!=2)) {
! counter++; counter%=16;
! }
}
if (counter!=continuity_counter) {
! if (discontinuity_indicator==0) {
! n=(continuity_counter+16-counter)%16;
! fprintf(stderr,"TS: missing %d packet(s), packet=%d, expecting %02x, received %02x afc=%d, di=%d\n",n,packet,counter,continuity_counter,adaption_field_control,discontinuity_indicator);
! ts_dropped+=n;
! pes_dirty=1;
! }
counter=continuity_counter;
}
***************
*** 158,162 ****
// fprintf(stderr,"previous peslength=%d\n",peslength);
if (ts_status==TS_IN_PAYLOAD) {
! if (check_pes(pesbuf,peslength)) {
c=0;
while (c<peslength) {
--- 174,178 ----
// fprintf(stderr,"previous peslength=%d\n",peslength);
if (ts_status==TS_IN_PAYLOAD) {
! if ((pes_dirty==0) && (check_pes(pesbuf,peslength))) {
c=0;
while (c<peslength) {
***************
*** 169,174 ****
--- 185,192 ----
pes_written++;
} else {
+ fprintf(stderr,"Dropped PES packet\n");
pes_dropped++;
}
+ pes_dirty=0;
} else {
ts_status=TS_IN_PAYLOAD;
|
|
From: <lin...@us...> - 2002-06-26 19:33:01
|
Update of /cvsroot/dvbtools/dvbts2pes
In directory usw-pr-cvs1:/tmp/cvs-serv30982
Modified Files:
dvbts2pes.c
Log Message:
removed test code
Index: dvbts2pes.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbts2pes/dvbts2pes.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** dvbts2pes.c 26 Jun 2002 19:29:28 -0000 1.2
--- dvbts2pes.c 26 Jun 2002 19:32:58 -0000 1.3
***************
*** 146,155 ****
if (counter!=continuity_counter) {
- n=0;
- c=counter;
- while (c!=continuity_counter) {
- c++; c%=16;
- n++;
- }
n=(continuity_counter+16-counter)%16;
--- 146,149 ----
|
|
From: <lin...@us...> - 2002-06-26 19:29:32
|
Update of /cvsroot/dvbtools/dvbts2pes
In directory usw-pr-cvs1:/tmp/cvs-serv30008
Modified Files:
dvbts2pes.c
Log Message:
first usable version - converts ts to pes and checks for errors in stream
Index: dvbts2pes.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbts2pes/dvbts2pes.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** dvbts2pes.c 24 Jun 2002 18:11:00 -0000 1.1.1.1
--- dvbts2pes.c 26 Jun 2002 19:29:28 -0000 1.2
***************
*** 21,22 ****
--- 21,212 ----
Or, point your browser to http://www.gnu.org/copyleft/gpl.html
*/
+
+ /* Structure of Transport Stream (from ISO/IEC 13818-1):
+
+ transport_packet() {
+ sync_byte 8 bslbf 0
+ transport_error_indicator 1 bslbf 1
+ payload_unit_start_indicator 1 bslbf 1
+ transport_priority 1 bslbf 1
+ PID 13 uimsbf 1,2
+ transport_scrambling_control 2 bslbf 3
+ adaption_field_control 2 bslbf 3
+ continuity_counter 4 uimsbf 3
+ if (adaption_field_control=='10' || adaption_field_control=='11'){
+ adaption_field()
+ }
+ if (adaption_field_control=='01' || adaption_field_control=='11'){
+ for (i=0;i<N;i++){
+ data_byte 8 bslbf
+ }
+ }
+ }
+
+ */
+
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ typedef enum {
+ TS_WAITING,
+ TS_ERROR,
+ TS_IN_PAYLOAD
+ } ts_status_t;
+
+ int check_pes(unsigned char* buf,int n) {
+ int i=0;
+ int stream_id;
+ int PES_packet_length;
+
+
+ if ((buf[0]!=0) || (buf[1]!=0) || (buf[2]!=1)) {
+ fprintf(stderr,"PES ERROR: does not start with 0x000001\n");
+ return(0);
+ // } else {
+ // fprintf(stderr,"PES starts with 0x000001\n");
+ }
+ i=3;
+ // stream_id: e0=video, c0=audio, bd=DVB subtitles, AC3 etc
+ stream_id=buf[i++];
+ PES_packet_length=(buf[i]<<8)|buf[i+1]; i+=2;
+
+ if ((stream_id&0xe0)==0xe0) {
+ // Video stream - PES_packet_length must be equal to zero
+ if (PES_packet_length!=0) {
+ fprintf(stderr,"VIDEO PES STREAM: PES_packet_length=%d (must be zero)\n",PES_packet_length);
+ return(0);
+ }
+ } else {
+ if (PES_packet_length+6!=n) {
+ fprintf(stderr,"NON-VIDEO PES: n=%d,PES_packet_length=%d\n",n,PES_packet_length);
+ return(0);
+ }
+ }
+ return(1);
+ }
+
+ int main(int argc, char** argv) {
+ unsigned char buf[188];
+ unsigned char pesbuf[165536];
+ int peslength;
+ unsigned short pid;
+ int n,c;
+ ts_status_t ts_status;
+ int i;
+ int packet;
+ int counter;
+ int adaption_field_control,continuity_counter;
+ int adaption_field_length;
+ int max_pes=0;
+ int min_pes=9999999;
+ int pes_written=0;
+ int pes_dropped=0;
+ int ts_dropped=0;
+
+ if (argc==2) {
+ pid=atoi(argv[1]);
+ } else {
+ fprintf(stderr,"dvbts2pes: Usage - dvbts2pes PID < file.ts > file.pes\n");
+ exit(0);
+ }
+
+ packet=0;
+ peslength=-1;
+ counter=-1;
+ ts_status=TS_WAITING;
+ for (;;) {
+ c=0;
+ while (c<188) {
+ n=read(0,&buf[c],188-c);
+ if (n==0) {
+ fprintf(stderr,"END OF STREAM\n");
+ fprintf(stderr,"Processed %d TS packets (%d bytes).\n",packet,188*packet);
+ fprintf(stderr,"Number of TS packets missing: %d\n",ts_dropped);
+ fprintf(stderr,"Minimum PES packet size: %d bytes\n",min_pes);
+ fprintf(stderr,"Maximum PES packet size: %d bytes\n",max_pes);
+ fprintf(stderr,"Number of PES packets written: %d\n",pes_written);
+ fprintf(stderr,"Number of PES packets dropped: %d\n",pes_dropped);
+ exit(0);
+ }
+ c+=n;
+ }
+ // fprintf(stderr,"Read %d bytes\n",c);
+
+ if ( (((buf[1]&0x1f)<<8) | buf[2]) == pid) {
+ continuity_counter=buf[3]&0x0f;
+ adaption_field_control=(buf[3]&0x30)>>4;
+
+ /* Firstly, check the integrity of the stream */
+ if (counter==-1) {
+ counter=continuity_counter;
+ } else {
+ counter++; counter%=16;
+ }
+
+ if (counter!=continuity_counter) {
+ n=0;
+ c=counter;
+ while (c!=continuity_counter) {
+ c++; c%=16;
+ n++;
+ }
+ n=(continuity_counter+16-counter)%16;
+
+ fprintf(stderr,"TS: missing %d packet(s), packet=%d, expecting %02x, received %02x\n",n,packet,counter,continuity_counter);
+ ts_dropped+=n;
+ counter=continuity_counter;
+ }
+
+ // Check payload start indicator.
+ if (buf[1]&0x40) {
+ // fprintf(stderr,"%d: payload start\n",packet);
+ // fprintf(stderr,"previous peslength=%d\n",peslength);
+ if (ts_status==TS_IN_PAYLOAD) {
+ if (check_pes(pesbuf,peslength)) {
+ c=0;
+ while (c<peslength) {
+ n=write(1,&pesbuf[c],peslength-c);
+ c+=n;
+ }
+ // fprintf(stderr,"written PES packet - %d bytes\n",peslength);
+ if (peslength > max_pes) { max_pes=peslength; }
+ if (peslength < min_pes) { min_pes=peslength; }
+ pes_written++;
+ } else {
+ pes_dropped++;
+ }
+ } else {
+ ts_status=TS_IN_PAYLOAD;
+ }
+ peslength=0;
+ }
+
+ if (ts_status==TS_IN_PAYLOAD) {
+ // fprintf(stderr,"processing packet\n");
+ i=4;
+ if ((adaption_field_control==2) || (adaption_field_control==3)) {
+ // Adaption field!!!
+ adaption_field_length=buf[i++];
+ i+=adaption_field_length;
+ // fprintf(stderr,"Adaption field length=%d\n",adaption_field_length);
+ }
+ if ((adaption_field_control==1) || (adaption_field_control==3)) {
+ // Data
+ // fprintf(stderr,"(before)peslength=%d\n",peslength);
+ // fprintf(stderr,"copying %d bytes to pesbuf\n",188-i);
+ if ((peslength+(188-i)) > sizeof(pesbuf)) {
+ fprintf(stderr,"ERROR: TS PACKET %d: PES packet > %d bytes, skipping end\n",packet,sizeof(pesbuf));
+ } else {
+ memcpy(&pesbuf[peslength],&buf[i],188-i);
+ }
+ peslength+=(188-i);
+ // fprintf(stderr,"(after)peslength=%d\n",peslength);
+ }
+
+ // fprintf(stderr,"packet %d, counter=%d, cc=%d, afc=%d\n",packet,counter,continuity_counter,adaption_field_control);
+ }
+ packet++;
+ }
+ }
+ }
|
|
From: <lin...@us...> - 2002-06-24 18:13:42
|
Update of /cvsroot/dvbtools/dvbts2pes In directory usw-pr-cvs1:/tmp/cvs-serv4092 Added Files: Makefile Log Message: initial version --- NEW FILE: Makefile --- all: dvbts2pes dvbts2pes: dvbts2pes.c gcc -Wall -o dvbts2pes dvbts2pes.c clean: rm -f dvbts2pes *~ |
|
From: <lin...@us...> - 2002-06-24 07:58:31
|
Update of /cvsroot/dvbtools/dvbsubs
In directory usw-pr-cvs1:/tmp/cvs-serv23952
Modified Files:
dvbsubs.c
Log Message:
partly fixed transparency bug
Index: dvbsubs.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbsubs/dvbsubs.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** dvbsubs.c 24 Jun 2002 07:53:09 -0000 1.12
--- dvbsubs.c 24 Jun 2002 07:58:27 -0000 1.13
***************
*** 222,226 ****
colour[1]=B;
colour[2]=G;
! colour[3]=T_value;
fprintf(stderr,"setting palette: region=%d,id=%d, R=%d,G=%d,B=%d,T=%d\n",region_id,id,R,G,B,T_value);
--- 222,230 ----
colour[1]=B;
colour[2]=G;
! if (Y==0) {
! colour[3]=0;
! } else {
! colour[3]=255;
! }
fprintf(stderr,"setting palette: region=%d,id=%d, R=%d,G=%d,B=%d,T=%d\n",region_id,id,R,G,B,T_value);
|
|
From: <lin...@us...> - 2002-06-24 07:53:13
|
Update of /cvsroot/dvbtools/dvbsubs
In directory usw-pr-cvs1:/tmp/cvs-serv22538
Modified Files:
dvbsubs.c
Log Message:
remove transparency hack
Index: dvbsubs.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbsubs/dvbsubs.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** dvbsubs.c 24 Jun 2002 07:12:00 -0000 1.11
--- dvbsubs.c 24 Jun 2002 07:53:09 -0000 1.12
***************
*** 227,231 ****
OSDcmd(OSD_SetWindow,regions[region_id].win,0,0,0,0,NULL);
! if (id<15) OSDcmd(OSD_SetPalette,id,0,0,0,id,colour);
}
--- 227,231 ----
OSDcmd(OSD_SetWindow,regions[region_id].win,0,0,0,0,NULL);
! OSDcmd(OSD_SetPalette,id,0,0,0,id,colour);
}
***************
*** 461,465 ****
if (region_fill_flag==1) {
fprintf(stderr,"filling region %d with %d\n",region_id,region_4_bit_pixel_code);
! memset(regions[region_id].img,15,sizeof(regions[region_id].img));
// OSDcmd(OSD_SetWindow,regions[region_id].win,0,0,0,0,NULL);
// OSDcmd(OSD_SetBlock,0,0,regions[region_id].width-1,regions[region_id].height-1,-1,regions[region_id].img);
--- 461,465 ----
if (region_fill_flag==1) {
fprintf(stderr,"filling region %d with %d\n",region_id,region_4_bit_pixel_code);
! memset(regions[region_id].img,region_4_bit_pixel_code,sizeof(regions[region_id].img));
// OSDcmd(OSD_SetWindow,regions[region_id].win,0,0,0,0,NULL);
// OSDcmd(OSD_SetBlock,0,0,regions[region_id].width-1,regions[region_id].height-1,-1,regions[region_id].img);
***************
*** 778,782 ****
fprintf(stderr,"hiding region %d\n",r);
OSDcmd(OSD_SetWindow,regions[r].win,0,0,0,0,NULL);
! OSDcmd(OSD_MoveWindow,720,0,0,0,0,NULL);
}
}
--- 778,782 ----
fprintf(stderr,"hiding region %d\n",r);
OSDcmd(OSD_SetWindow,regions[r].win,0,0,0,0,NULL);
! OSDcmd(OSD_MoveWindow,0,600,0,0,0,NULL);
}
}
|
|
From: <lin...@us...> - 2002-06-24 07:12:03
|
Update of /cvsroot/dvbtools/dvbsubs
In directory usw-pr-cvs1:/tmp/cvs-serv12489
Modified Files:
dvbsubs.c
Log Message:
removed debugging sleep
Index: dvbsubs.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbsubs/dvbsubs.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** dvbsubs.c 24 Jun 2002 07:05:46 -0000 1.10
--- dvbsubs.c 24 Jun 2002 07:12:00 -0000 1.11
***************
*** 789,793 ****
OSDcmd(OSD_Hide,0,0,0,0,0,NULL);
}
! if (acquired) { sleep(1); }
}
}
--- 789,793 ----
OSDcmd(OSD_Hide,0,0,0,0,0,NULL);
}
! // if (acquired) { sleep(1); }
}
}
|
|
From: <lin...@us...> - 2002-06-24 07:05:50
|
Update of /cvsroot/dvbtools/dvbsubs In directory usw-pr-cvs1:/tmp/cvs-serv11333 Modified Files: dvbsubs.c Added Files: dvbsubs.h Log Message: major modifications - use multiple OSD windows --- NEW FILE: dvbsubs.h --- /* dvbsubs - a program for decoding DVB subtitles (ETS 300 743) File: dvbsubs.h Copyright (C) Dave Chapman 2002 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Or, point your browser to http://www.gnu.org/copyleft/gpl.html */ #define MAX_REGIONS 5 typedef struct { int x,y; unsigned char is_visible; } visible_region_t; typedef struct { int acquired; int page_time_out; int page_version_number; int page_state; visible_region_t regions[MAX_REGIONS]; } page_t; typedef struct { int width,height; int depth; int CLUT_id; int win; int objects_start,objects_end; unsigned int object_pos[65536]; unsigned char img[720*576]; } region_t; Index: dvbsubs.c =================================================================== RCS file: /cvsroot/dvbtools/dvbsubs/dvbsubs.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** dvbsubs.c 18 Jun 2002 13:31:28 -0000 1.9 --- dvbsubs.c 24 Jun 2002 07:05:46 -0000 1.10 *************** *** 2,5 **** --- 2,7 ---- dvbsubs - a program for decoding DVB subtitles (ETS 300 743) + File: dvbsubs.c + Copyright (C) Dave Chapman 2002 *************** *** 22,26 **** #include <stdio.h> ! #include <stdio.h> #include <stdint.h> #include <sys/types.h> --- 24,28 ---- #include <stdio.h> ! #include <stdlib.h> #include <stdint.h> #include <sys/types.h> *************** *** 31,34 **** --- 33,38 ---- #include <time.h> #include <sys/poll.h> + #include <ctype.h> + #include <sys/time.h> #include <ost/dmx.h> *************** *** 37,53 **** #include <ost/osd.h> int y=0; int x=0; ! int minx=0; ! int miny=999; ! int width=720; ! int height=226; - unsigned int object_xs[65536]; - unsigned int object_ys[65536]; unsigned int curr_obj; - unsigned int region_xs[64]; - unsigned int region_ys[64]; unsigned int curr_reg[64]; --- 41,58 ---- #include <ost/osd.h> + #include "dvbsubs.h" + + page_t page; + region_t regions[MAX_REGIONS]; + int y=0; int x=0; ! int fd_osd; ! int num_windows=1; ! int acquired=0; ! struct timeval start_tv; unsigned int curr_obj; unsigned int curr_reg[64]; *************** *** 61,80 **** unsigned char othercol[4]={0,255,255,0xff}; ! unsigned char trans[16][4]={ {255,255,255,0}, ! {255,255,255,0}, ! {255,255,255,0}, ! {255,255,255,0}, ! {255,255,255,0}, ! {255,255,255,0}, ! {255,255,255,0}, ! {255,255,255,0}, ! {255,255,255,0}, ! {255,255,255,0}, ! {255,255,255,0}, ! {255,255,255,0}, ! {255,255,255,0}, ! {255,255,255,0}, ! {255,255,255,0}, ! {255,255,255,0} } ; unsigned char buf[100000]; --- 66,70 ---- unsigned char othercol[4]={0,255,255,0xff}; ! unsigned char trans[4]={0,255,0,0}; unsigned char buf[100000]; *************** *** 83,95 **** int in_scanline=0; ! unsigned char img[720*576]; ! int fd_osd=-1; ! int OSDcmd(int fd, OSD_Command cmd, int x0, int y0, int x1, int y1, int color, void* data) { osd_cmd_t osd; int res; if (fd_osd > 0) { osd.cmd=cmd; osd.x0=x0; --- 73,92 ---- int in_scanline=0; ! void init_data() { ! int i; ! for (i=0;i<MAX_REGIONS;i++) { ! page.regions[i].is_visible=0; ! regions[i].win=-1; ! } ! } ! void OSDcmd(OSD_Command cmd, int x0, int y0, int x1, int y1, int color, void* data) { osd_cmd_t osd; int res; if (fd_osd > 0) { + if (cmd==OSD_SetBlock) fprintf(stderr,"in OSD_SetBlock\n"); + if (cmd==OSD_SetWindow) fprintf(stderr,"in OSD_SetWindow - win=%d\n",x0); osd.cmd=cmd; osd.x0=x0; *************** *** 99,105 **** osd.color=color; osd.data=data; ! if ((res=ioctl(fd,OSD_SEND_CMD,&osd))!=0) { perror("OSDCmd"); } } else { fprintf(stderr,"in OSD_cmd, fd_osd=%d\n",fd_osd); --- 96,103 ---- osd.color=color; osd.data=data; ! if ((res=ioctl(fd_osd,OSD_SEND_CMD,&osd))!=0) { perror("OSDCmd"); } + //fprintf(stderr,"end of OSDcmd\n"); } else { fprintf(stderr,"in OSD_cmd, fd_osd=%d\n",fd_osd); *************** *** 107,159 **** } ! int open_OSD() { ! if ((fd_osd=open("/dev/ost/osd",O_RDWR)) < 0) { ! perror("OSD device"); ! return 0; ! } else { ! return 1; ! } ! } ! ! int init_OSD() { int i; ! if (fd_osd) { ! OSDcmd(fd_osd, OSD_Open,minx,miny,minx+width,miny+height,4,NULL); ! OSDcmd(fd_osd, OSD_Hide,0,0,0,0,0,NULL); ! OSDcmd(fd_osd, OSD_Clear,0,0,0,0,0,NULL); ! OSDcmd(fd_osd, OSD_Show,0,0,0,0,0,NULL); ! // OSDcmd(fd_osd, OSD_SetPalette,0,0,0,0,0,green); /* Bg colour */ ! // OSDcmd(fd_osd, OSD_SetPalette,1,0,0,0,1,blue); ! // OSDcmd(fd_osd, OSD_SetPalette,2,0,0,0,2,black); ! // OSDcmd(fd_osd, OSD_SetPalette,3,0,0,0,3,magenta); ! // OSDcmd(fd_osd, OSD_SetPalette,4,0,0,0,4,white); ! // OSDcmd(fd_osd, OSD_SetPalette,5,0,0,0,5,yellow); ! // OSDcmd(fd_osd, OSD_SetPalette,6,0,0,0,6,red); ! // OSDcmd(fd_osd, OSD_SetPalette,7,0,0,0,7,othercol); ! // OSDcmd(fd_osd, OSD_SetPalette,8,0,0,0,8,blue); ! for (i=15;i>=0;i--) { ! OSDcmd(fd_osd, OSD_SetPalette,i,0,0,0,i,trans); ! } } } ! int test_OSD() { // OSDcmd(fd_osd, OSD_Text,6,2,0,0,1,"TEST STRING"); } ! void do_plot(int x, int y, unsigned char pixel) { int i; ! if ((y >= 0) && (y < height)) { ! i=(y*720)+x; ! img[i]=pixel; } else { ! fprintf(stderr,"plot out of region: x=%d, y=%d\n",x,y); } } ! void plot(int run_length, unsigned char pixel) { int x2=x+run_length; while (x < x2) { ! do_plot(x,y,pixel); x++; } --- 105,159 ---- } ! void create_region(int region_id,int region_width,int region_height,int region_depth) { int i; ! ! OSDcmd(OSD_Open,0,0,region_width-1,region_height-1,4,(void*)1); ! ! regions[region_id].win=num_windows++; ! OSDcmd(OSD_SetWindow,regions[region_id].win,0,0,0,0,NULL); ! OSDcmd(OSD_MoveWindow,0,600,0,0,0,NULL); ! fprintf(stderr,"region %d created - win=%d, height=%d, width=%d, depth=%d\n",region_id,regions[region_id].win,region_height,region_width,region_depth); ! regions[region_id].width=region_width; ! regions[region_id].height=region_height; ! ! memset(regions[region_id].img,15,sizeof(regions[region_id].img)); ! OSDcmd(OSD_SetBlock,0,0,regions[region_id].width-1,regions[region_id].height-1,-1,regions[region_id].img); ! ! // OSDcmd(regions[region_id].fd, OSD_SetPalette,0,0,0,0,0,green); /* Bg colour */ ! // OSDcmd(regions[region_id].fd, OSD_SetPalette,1,0,0,0,1,blue); ! // OSDcmd(regions[region_id].fd, OSD_SetPalette,2,0,0,0,2,black); ! // OSDcmd(regions[region_id].fd, OSD_SetPalette,3,0,0,0,3,magenta); ! // OSDcmd(regions[region_id].fd, OSD_SetPalette,4,0,0,0,4,white); ! // OSDcmd(regions[region_id].fd, OSD_SetPalette,5,0,0,0,5,yellow); ! // OSDcmd(regions[region_id].fd, OSD_SetPalette,6,0,0,0,6,red); ! // OSDcmd(regions[region_id].fd, OSD_SetPalette,7,0,0,0,7,othercol); ! // OSDcmd(regions[region_id].fd, OSD_SetPalette,8,0,0,0,8,blue); ! for (i=15;i>=0;i--) { ! OSDcmd(OSD_SetPalette,i,0,0,0,i,trans); } + } ! void test_OSD() { // OSDcmd(fd_osd, OSD_Text,6,2,0,0,1,"TEST STRING"); + return; } ! void do_plot(int r,int x, int y, unsigned char pixel) { int i; ! if ((y >= 0) && (y < regions[r].height)) { ! i=(y*regions[r].width)+x; ! regions[r].img[i]=pixel; } else { ! fprintf(stderr,"plot out of region: x=%d, y=%d - r=%d, height=%d\n",x,y,r,regions[r].height); } } ! void plot(int r,int run_length, unsigned char pixel) { int x2=x+run_length; + + // fprintf(stderr,"plot: x=%d,y=%d,length=%d,pixel=%d\n",x,y,run_length,pixel); while (x < x2) { ! do_plot(r,x,y,pixel); x++; } *************** *** 176,180 **** void set_filt(int fd,uint16_t tt_pid, dmxPesType_t t) { - size_t bytesRead; struct dmxPesFilterParams pesFilterParams; --- 176,179 ---- *************** *** 207,211 **** ! void set_palette(int id,int Y_value, int Cr_value, int Cb_value, int T_value) { int Y,Cr,Cb,R,G,B; unsigned char colour[4]; --- 206,210 ---- ! void set_palette(int region_id,int id,int Y_value, int Cr_value, int Cb_value, int T_value) { int Y,Cr,Cb,R,G,B; unsigned char colour[4]; *************** *** 224,231 **** colour[2]=G; colour[3]=T_value; ! if (id < 15) OSDcmd(fd_osd, OSD_SetPalette,id,0,0,0,id,colour); } ! void decode_4bit_pixel_code_string(int n) { int next_bits, switch_1, --- 223,234 ---- colour[2]=G; colour[3]=T_value; ! ! fprintf(stderr,"setting palette: region=%d,id=%d, R=%d,G=%d,B=%d,T=%d\n",region_id,id,R,G,B,T_value); ! ! OSDcmd(OSD_SetWindow,regions[region_id].win,0,0,0,0,NULL); ! if (id<15) OSDcmd(OSD_SetPalette,id,0,0,0,id,colour); } ! void decode_4bit_pixel_code_string(int r, int object_id, int ofs, int n) { int next_bits, switch_1, *************** *** 255,259 **** pixel_code=next_bits; printf("<pixel run_length=\"1\" pixel_code=\"%d\" />\n",pixel_code); ! plot(1,pixel_code); bits+=4; } else { --- 258,262 ---- pixel_code=next_bits; printf("<pixel run_length=\"1\" pixel_code=\"%d\" />\n",pixel_code); ! plot(r,1,pixel_code); bits+=4; } else { *************** *** 267,271 **** if (run_length!=0) { printf("<pixel run_length=\"%d\" pixel_code=\"0\" />\n",run_length+2); ! plot(run_length+2,pixel_code); } else { // printf("end_of_string - run_length=%d\n",run_length); --- 270,274 ---- if (run_length!=0) { printf("<pixel run_length=\"%d\" pixel_code=\"0\" />\n",run_length+2); ! plot(r,run_length+2,pixel_code); } else { // printf("end_of_string - run_length=%d\n",run_length); *************** *** 281,285 **** bits+=4; printf("<pixel run_length=\"%d\" pixel_code=\"%d\" />\n",run_length+4,pixel_code); ! plot(run_length+4,pixel_code); } else { switch_3=(data&0x03); --- 284,288 ---- bits+=4; printf("<pixel run_length=\"%d\" pixel_code=\"%d\" />\n",run_length+4,pixel_code); ! plot(r,run_length+4,pixel_code); } else { switch_3=(data&0x03); *************** *** 287,294 **** switch (switch_3) { case 0: printf("<pixel run_length=\"1\" pixel_code=\"0\" />\n"); ! plot(1,pixel_code); break; case 1: printf("<pixel run_length=\"2\" pixel_code=\"0\" />\n"); ! plot(2,pixel_code); break; case 2: run_length=next_nibble(); --- 290,297 ---- switch (switch_3) { case 0: printf("<pixel run_length=\"1\" pixel_code=\"0\" />\n"); ! plot(r,1,pixel_code); break; case 1: printf("<pixel run_length=\"2\" pixel_code=\"0\" />\n"); ! plot(r,2,pixel_code); break; case 2: run_length=next_nibble(); *************** *** 297,301 **** bits+=4; printf("<pixel run_length=\"%d\", pixel_code=\"%d\" />\n",run_length+9,pixel_code); ! plot(run_length+9,pixel_code); break; case 3: run_length=next_nibble(); --- 300,304 ---- bits+=4; printf("<pixel run_length=\"%d\", pixel_code=\"%d\" />\n",run_length+9,pixel_code); ! plot(r,run_length+9,pixel_code); break; case 3: run_length=next_nibble(); *************** *** 305,309 **** bits+=4; printf("<pixel run_length=\"%d\" pixel_code=\"%d\" />\n",run_length+25,pixel_code); ! plot(run_length+25,pixel_code); } } --- 308,312 ---- bits+=4; printf("<pixel run_length=\"%d\" pixel_code=\"%d\" />\n",run_length+25,pixel_code); ! plot(r,run_length+25,pixel_code); } } *************** *** 320,324 **** ! void process_pixel_data_sub_block(int n) { int data_type; int j; --- 323,327 ---- ! void process_pixel_data_sub_block(int r, int o, int ofs, int n) { int data_type; int j; *************** *** 326,329 **** --- 329,335 ---- j=i+n; + x=(regions[r].object_pos[o])>>16; + y=((regions[r].object_pos[o])&0xffff)+ofs; + fprintf(stderr,"process_pixel_data_sub_block: r=%d, x=%d, y=%d\n",r,x,y); // printf("process_pixel_data: %02x %02x %02x %02x %02x %02x\n",buf[i],buf[i+1],buf[i+2],buf[i+3],buf[i+4],buf[i+5]); while (i < j) { *************** *** 333,341 **** switch(data_type) { ! case 0x11: decode_4bit_pixel_code_string(n-1); break; case 0xf0: printf("</scanline>\n"); in_scanline=0; ! x=object_xs[curr_obj]; y+=2; break; --- 339,347 ---- switch(data_type) { ! case 0x11: decode_4bit_pixel_code_string(r,o,ofs,n-1); break; case 0xf0: printf("</scanline>\n"); in_scanline=0; ! x=(regions[r].object_pos[o])>>16; y+=2; break; *************** *** 347,352 **** } void process_page_composition_segment() { ! int segment_type, ! page_id, segment_length, page_time_out, --- 353,357 ---- } void process_page_composition_segment() { ! int page_id, segment_length, page_time_out, *************** *** 377,381 **** } printf("</page_state>\n"); ! printf("<page_regions>\n"); while (i<j) { --- 382,393 ---- } printf("</page_state>\n"); ! ! fprintf(stderr,"page_state=%d\n",page_state); ! if ((acquired==0) && (page_state!=2) && (page_state!=1)) { ! fprintf(stderr,"waiting for mode_change\n"); ! return; ! } else { ! acquired=1; ! } printf("<page_regions>\n"); while (i<j) { *************** *** 385,402 **** region_y=(buf[i]<<8)|buf[i+1]; i+=2; ! if (region_y < miny) { miny=region_y; } ! ! region_xs[region_id]=region_x; ! region_ys[region_id]=region_y; ! printf("<page_region id=\"%02x\" x=\"%d\" y=\"%d\" />\n",region_id,region_x,region_y); } printf("</page_regions>\n"); printf("</page_composition_segment>\n"); } void process_region_composition_segment() { ! int segment_type, ! page_id, segment_length, region_id, --- 397,413 ---- region_y=(buf[i]<<8)|buf[i+1]; i+=2; ! page.regions[region_id].x=region_x; ! page.regions[region_id].y=region_y; ! page.regions[region_id].is_visible=1; ! printf("<page_region id=\"%02x\" x=\"%d\" y=\"%d\" />\n",region_id,region_x,region_y); } printf("</page_regions>\n"); printf("</page_composition_segment>\n"); + } void process_region_composition_segment() { ! int page_id, segment_length, region_id, *************** *** 419,422 **** --- 430,434 ---- background_pixel_code; int j; + int o; page_id=(buf[i]<<8)|buf[i+1]; i+=2; *************** *** 440,448 **** i++; if (region_fill_flag==1) { ! // fprintf(stderr,"filling image with %d\n",region_4_bit_pixel_code); ! memset(img,15,sizeof(img)); ! OSDcmd(fd_osd, OSD_SetBlock,0,0,719,height,-1,img); ! OSDcmd(fd_osd, OSD_Show,0,0,0,0,0,NULL); } --- 452,467 ---- i++; + + if (regions[region_id].win < 0) { + // If the region doesn't exist, then open it. + create_region(region_id,region_width,region_height,region_depth); + regions[region_id].CLUT_id=CLUT_id; + } + if (region_fill_flag==1) { ! fprintf(stderr,"filling region %d with %d\n",region_id,region_4_bit_pixel_code); ! memset(regions[region_id].img,15,sizeof(regions[region_id].img)); ! // OSDcmd(OSD_SetWindow,regions[region_id].win,0,0,0,0,NULL); ! // OSDcmd(OSD_SetBlock,0,0,regions[region_id].width-1,regions[region_id].height-1,-1,regions[region_id].img); } *************** *** 459,463 **** printf("<region_4_bit_pixel_code>%d</region_4_bit_pixel_code>\n",region_4_bit_pixel_code); printf("<region_2_bit_pixel_code>%d</region_2_bit_pixel_code>\n",region_2_bit_pixel_code); ! printf("<objects>\n"); while (i < j) { --- 478,489 ---- printf("<region_4_bit_pixel_code>%d</region_4_bit_pixel_code>\n",region_4_bit_pixel_code); printf("<region_2_bit_pixel_code>%d</region_2_bit_pixel_code>\n",region_2_bit_pixel_code); ! ! regions[region_id].objects_start=i; ! regions[region_id].objects_end=j; ! ! for (o=0;o<65536;o++) { ! regions[region_id].object_pos[o]=0xffffffff; ! } ! printf("<objects>\n"); while (i < j) { *************** *** 467,472 **** object_x=((buf[i]&0x0f)<<8)|buf[i+1]; i+=2; object_y=((buf[i]&0x0f)<<8)|buf[i+1]; i+=2; ! object_xs[object_id]=object_x+region_xs[region_id]; ! object_ys[object_id]=object_y+region_ys[region_id]-miny; printf("<object id=\"0x%02x\" type=\"0x%02x\">\n",object_id,object_type); --- 493,498 ---- object_x=((buf[i]&0x0f)<<8)|buf[i+1]; i+=2; object_y=((buf[i]&0x0f)<<8)|buf[i+1]; i+=2; ! ! regions[region_id].object_pos[object_id]=(object_x<<16)|object_y; printf("<object id=\"0x%02x\" type=\"0x%02x\">\n",object_id,object_type); *************** *** 504,507 **** --- 530,534 ---- int j; + int r; page_id=(buf[i]<<8)|buf[i+1]; i+=2; *************** *** 547,552 **** printf("<T_value>%d</T_value>\n",T_value); printf("</CLUT_entry>\n"); ! if (CLUT_id==0) { ! set_palette(CLUT_entry_id,Y_value,Cr_value,Cb_value,255-T_value); } } --- 574,585 ---- printf("<T_value>%d</T_value>\n",T_value); printf("</CLUT_entry>\n"); ! ! // Apply CLUT to every region it applies to. ! for (r=0;r<MAX_REGIONS;r++) { ! if (regions[r].win >= 0) { ! if (regions[r].CLUT_id==CLUT_id) { ! set_palette(r,CLUT_entry_id,Y_value,Cr_value,Cb_value,255-T_value); ! } ! } } } *************** *** 556,561 **** void process_object_data_segment() { ! int segment_type, ! page_id, segment_length, object_id, --- 589,593 ---- void process_object_data_segment() { ! int page_id, segment_length, object_id, *************** *** 568,571 **** --- 600,605 ---- int j; + int old_i; + int r; page_id=(buf[i]<<8)|buf[i+1]; i+=2; *************** *** 586,609 **** printf("<non_modifying_colour_flag>%d</non_modifying_colour_flag>\n",non_modifying_colour_flag); ! if (object_coding_method==0) { ! top_field_data_block_length=(buf[i]<<8)|buf[i+1]; i+=2; ! bottom_field_data_block_length=(buf[i]<<8)|buf[i+1]; i+=2; ! ! printf("<pixel_data_sub_block type=\"top\" length=\"0x%04x\"/>\n",top_field_data_block_length); ! x=object_xs[curr_obj]; ! y=object_ys[curr_obj]; ! process_pixel_data_sub_block(top_field_data_block_length); ! printf("<pixel_data_sub_block type=\"bottom\" length=\"0x%04x\"/>\n",bottom_field_data_block_length); ! x=object_xs[curr_obj]; ! y=object_ys[curr_obj]+1; ! process_pixel_data_sub_block(bottom_field_data_block_length); ! // OSDcmd(fd_osd, OSD_Hide,0,0,0,0,0,NULL); ! OSDcmd(fd_osd, OSD_SetBlock,0,0,719,height,-1,img); ! OSDcmd(fd_osd, OSD_Show,0,0,0,0,0,NULL); ! usleep(20000); } - printf("</object_data_segment>\n"); } --- 620,643 ---- printf("<non_modifying_colour_flag>%d</non_modifying_colour_flag>\n",non_modifying_colour_flag); ! fprintf(stderr,"decoding object %d\n",object_id); ! old_i=i; ! for (r=0;r<MAX_REGIONS;r++) { ! // If this object is in this region... ! if (regions[r].win >= 0) { ! fprintf(stderr,"testing region %d, object_pos=%08x\n",r,regions[r].object_pos[object_id]); ! if (regions[r].object_pos[object_id]!=0xffffffff) { ! fprintf(stderr,"rendering object %d into region %d\n",object_id,r); ! i=old_i; ! if (object_coding_method==0) { ! top_field_data_block_length=(buf[i]<<8)|buf[i+1]; i+=2; ! bottom_field_data_block_length=(buf[i]<<8)|buf[i+1]; i+=2; ! process_pixel_data_sub_block(r,object_id,0,top_field_data_block_length); ! process_pixel_data_sub_block(r,object_id,1,bottom_field_data_block_length); ! } ! } ! } } } *************** *** 612,616 **** int n; int fd; - int x; int pid; int is_num; --- 646,649 ---- *************** *** 623,626 **** --- 656,660 ---- unsigned short PTS_2,PTS_3; double PTS_secs; + int r; int segment_length, *************** *** 638,645 **** } - // open_OSD(); - // init_OSD(); - // test_OSD(); - if (is_num) { pid=atoi(argv[1]); --- 672,675 ---- *************** *** 661,664 **** --- 691,702 ---- } + if ((fd_osd=open("/dev/ost/osd",O_RDWR)) < 0) { + perror("OSD device, region"); + exit(-1); + } + init_data(); + + gettimeofday(&start_tv,NULL); + printf("<?xml version=\"1.0\" ?>\n"); while (1) { *************** *** 714,722 **** break; case 0x11: process_region_composition_segment(); - if ((fd_osd < 0) && (miny != 999)) { - fprintf(stderr,"opening osd device, miny=%d\n",miny); - open_OSD(); - init_OSD(); - } break; case 0x12: process_CLUT_definition_segment(); --- 752,755 ---- *************** *** 732,769 **** printf("</subtitle_stream>\n"); printf("</pes_packet>\n"); } } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- 765,793 ---- printf("</subtitle_stream>\n"); printf("</pes_packet>\n"); + fprintf(stderr,"End of PES packet - time=%.2f\n",PTS_secs); + n=0; + for (r=0;r<MAX_REGIONS;r++) { + if (regions[r].win >= 0) { + if (page.regions[r].is_visible) { + fprintf(stderr,"displaying region %d at %d,%d width=%d,height=%d\n",r,page.regions[r].x,page.regions[r].y,regions[r].width,regions[r].height); + OSDcmd(OSD_SetWindow,regions[r].win,0,0,0,0,NULL); + OSDcmd(OSD_SetBlock,0,0,regions[r].width-1,regions[r].height-1,-1,regions[r].img); + OSDcmd(OSD_MoveWindow,page.regions[r].x,page.regions[r].y,0,0,0,NULL); + n++; + } else { + fprintf(stderr,"hiding region %d\n",r); + OSDcmd(OSD_SetWindow,regions[r].win,0,0,0,0,NULL); + OSDcmd(OSD_MoveWindow,720,0,0,0,0,NULL); + } + } + } + if (n > 0) { + fprintf(stderr,"%d regions visible - showing\n",n); + OSDcmd(OSD_Show,0,0,0,0,0,NULL); + } else { + fprintf(stderr,"%d regions visible - hiding\n",n); + OSDcmd(OSD_Hide,0,0,0,0,0,NULL); + } + if (acquired) { sleep(1); } } } |
|
From: <lin...@us...> - 2002-06-23 19:20:15
|
Update of /cvsroot/dvbtools/dvbtune
In directory usw-pr-cvs1:/tmp/cvs-serv9455
Modified Files:
tune.c
Log Message:
added DVB-C tuning (untested)
Index: tune.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbtune/tune.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** tune.c 16 May 2002 21:39:46 -0000 1.2
--- tune.c 23 Jun 2002 19:20:11 -0000 1.3
***************
*** 134,235 ****
struct pollfd pfd[1];
struct secStatus sec_state;
// OSTSelftest(fd_frontend);
// OSTSetPowerState(fd_frontend, FE_POWER_ON);
// OSTGetPowerState(fd_frontend, &festatus);
! if (freq > 100000000) {
! fprintf(stderr,"tuning DVB-T to %d\n",freq);
! feparams.Frequency=freq;
! feparams.u.ofdm.bandWidth=BANDWIDTH_8_MHZ; // WAS: 8
#ifdef FINLAND
! feparams.u.ofdm.HP_CodeRate=FEC_1_2;
! feparams.u.ofdm.LP_CodeRate=FEC_1_2;
! feparams.u.ofdm.Constellation=QAM_64; // WAS: 16
! feparams.u.ofdm.TransmissionMode=TRANSMISSION_MODE_2K;
! feparams.u.ofdm.guardInterval=GUARD_INTERVAL_1_8;
! feparams.u.ofdm.HierarchyInformation=HIERARCHY_NONE;
#else
! /* UK Parameters */
! feparams.u.ofdm.HP_CodeRate=FEC_2_3;
! feparams.u.ofdm.LP_CodeRate=FEC_1_2;
! feparams.u.ofdm.Constellation=QAM_64; // WAS: 16
! feparams.u.ofdm.TransmissionMode=TRANSMISSION_MODE_2K;
! feparams.u.ofdm.guardInterval=GUARD_INTERVAL_1_32;
! feparams.u.ofdm.HierarchyInformation=HIERARCHY_NONE;
#endif
! } else {
! if ((pol=='h') || (pol=='H')) {
! voltage = SEC_VOLTAGE_18;
! } else {
! voltage = SEC_VOLTAGE_13;
! }
! if (ioctl(fd_sec,SEC_SET_VOLTAGE,voltage) < 0) {
! perror("ERROR setting voltage\n");
! }
! if (freq > 2200000) {
! // this must be an absolute frequency
! if (freq < slof) {
! feparams.Frequency=(freq-lof1);
! if (tone < 0) tone = SEC_TONE_OFF;
! } else {
! feparams.Frequency=(freq-lof2);
! if (tone < 0) tone = SEC_TONE_ON;
! }
! } else {
! // this is an L-Band frequency
! feparams.Frequency=freq;
! }
! #ifdef FINLAND
! feparams.Inversion=INVERSION_OFF;
! #else
! feparams.Inversion=specInv;
! #endif
! feparams.u.qpsk.SymbolRate=srate;
! feparams.u.qpsk.FEC_inner=FEC_AUTO;
! if (ioctl(fd_sec,SEC_SET_TONE,tone) < 0) {
! perror("ERROR setting tone\n");
! }
! if (diseqc > 0) {
! struct secCommand scmd;
! struct secCmdSequence scmds;
! scmds.continuousTone = tone;
! scmds.voltage = voltage;
! /*
! scmds.miniCommand = toneBurst ? SEC_MINI_B : SEC_MINI_A;
! */
! scmds.miniCommand = SEC_MINI_NONE;
! scmd.type = 0;
! scmds.numCommands = 1;
! scmds.commands = &scmd;
! scmd.u.diseqc.addr = 0x10;
! scmd.u.diseqc.cmd = 0x38;
! scmd.u.diseqc.numParams = 1;
! scmd.u.diseqc.params[0] = 0xf0 |
! (((diseqc - 1) << 2) & 0x0c) |
! (voltage==SEC_VOLTAGE_18 ? 0x02 : 0) |
! (tone==SEC_TONE_ON ? 0x01 : 0);
! if (ioctl(fd_sec,SEC_SEND_SEQUENCE,&scmds) < 0) {
! perror("Error sending DisEqC");
! return -1;
}
! }
!
! fprintf(stderr,"tuning DVB-S to L-Band:%d, Pol:%c Srate=%d, 22kHz=%s\n",feparams.Frequency,pol,srate,tone == SEC_TONE_ON ? "on" : "off");
! usleep(100000);
}
!
if (fd_sec) SecGetStatus(fd_sec, &sec_state);
!
i = 0; res = -1;
while ((i < 3) && (res < 0)) {
-
if (ioctl(fd_frontend,FE_SET_FRONTEND,&feparams) < 0) {
perror("ERROR tuning channel\n");
--- 134,251 ----
struct pollfd pfd[1];
struct secStatus sec_state;
+ FrontendInfo fe_info;
+ if ( (res = ioctl(fd_frontend,FE_GET_INFO, &fe_info) < 0)){
+ perror("FE_GET_INFO: ");
+ return -1;
+ }
+
// OSTSelftest(fd_frontend);
// OSTSetPowerState(fd_frontend, FE_POWER_ON);
// OSTGetPowerState(fd_frontend, &festatus);
! switch(fe_info.type) {
! case FE_OFDM:
! fprintf(stderr,"tuning DVB-T to %d\n",freq);
! feparams.Frequency=freq;
! feparams.Inversion=INVERSION_OFF;
#ifdef FINLAND
! /* FINLAND Parameters */
! feparams.u.ofdm.bandWidth=BANDWIDTH_8_MHZ; // WAS: 8
! feparams.u.ofdm.HP_CodeRate=FEC_1_2;
! feparams.u.ofdm.LP_CodeRate=FEC_1_2;
! feparams.u.ofdm.Constellation=QAM_64; // WAS: 16
! feparams.u.ofdm.TransmissionMode=TRANSMISSION_MODE_2K;
! feparams.u.ofdm.guardInterval=GUARD_INTERVAL_1_8;
! feparams.u.ofdm.HierarchyInformation=HIERARCHY_NONE;
#else
! /* UK Parameters */
! feparams.u.ofdm.bandWidth=BANDWIDTH_8_MHZ; // WAS: 8
! feparams.u.ofdm.HP_CodeRate=FEC_2_3;
! feparams.u.ofdm.LP_CodeRate=FEC_1_2;
! feparams.u.ofdm.Constellation=QAM_64; // WAS: 16
! feparams.u.ofdm.TransmissionMode=TRANSMISSION_MODE_2K;
! feparams.u.ofdm.guardInterval=GUARD_INTERVAL_1_32;
! feparams.u.ofdm.HierarchyInformation=HIERARCHY_NONE;
! break;
#endif
! case FE_QPSK:
! fprintf(stderr,"tuning DVB-S to L-Band:%d, Pol:%c Srate=%d, 22kHz=%s\n",feparams.Frequency,pol,srate,tone == SEC_TONE_ON ? "on" : "off");
! if ((pol=='h') || (pol=='H')) {
! voltage = SEC_VOLTAGE_18;
! } else {
! voltage = SEC_VOLTAGE_13;
! }
! if (ioctl(fd_sec,SEC_SET_VOLTAGE,voltage) < 0) {
! perror("ERROR setting voltage\n");
! }
! if (freq > 2200000) {
! // this must be an absolute frequency
! if (freq < slof) {
! feparams.Frequency=(freq-lof1);
! if (tone < 0) tone = SEC_TONE_OFF;
! } else {
! feparams.Frequency=(freq-lof2);
! if (tone < 0) tone = SEC_TONE_ON;
! }
! } else {
! // this is an L-Band frequency
! feparams.Frequency=freq;
! }
!
! feparams.Inversion=specInv;
! feparams.u.qpsk.SymbolRate=srate;
! feparams.u.qpsk.FEC_inner=FEC_AUTO;
! if (ioctl(fd_sec,SEC_SET_TONE,tone) < 0) {
! perror("ERROR setting tone\n");
! }
! if (diseqc > 0) {
! struct secCommand scmd;
! struct secCmdSequence scmds;
! scmds.continuousTone = tone;
! scmds.voltage = voltage;
! /*
! scmds.miniCommand = toneBurst ? SEC_MINI_B : SEC_MINI_A;
! */
! scmds.miniCommand = SEC_MINI_NONE;
! scmd.type = 0;
! scmds.numCommands = 1;
! scmds.commands = &scmd;
! scmd.u.diseqc.addr = 0x10;
! scmd.u.diseqc.cmd = 0x38;
! scmd.u.diseqc.numParams = 1;
! scmd.u.diseqc.params[0] = 0xf0 |
! (((diseqc - 1) << 2) & 0x0c) |
! (voltage==SEC_VOLTAGE_18 ? 0x02 : 0) |
! (tone==SEC_TONE_ON ? 0x01 : 0);
! if (ioctl(fd_sec,SEC_SEND_SEQUENCE,&scmds) < 0) {
! perror("Error sending DisEqC");
! return -1;
! }
}
! break;
! case FE_QAM:
! feparams.Frequency=freq;
! feparams.Inversion=INVERSION_OFF;
! feparams.u.qam.SymbolRate = srate;
! feparams.u.qam.FEC_inner = FEC_AUTO;
! feparams.u.qam.QAM = QAM_64; break;
! default:
! fprintf(stderr,"Unknown FE type. Aborting\n");
! exit(-1);
}
! usleep(100000);
!
if (fd_sec) SecGetStatus(fd_sec, &sec_state);
!
i = 0; res = -1;
while ((i < 3) && (res < 0)) {
if (ioctl(fd_frontend,FE_SET_FRONTEND,&feparams) < 0) {
perror("ERROR tuning channel\n");
***************
*** 241,267 ****
if (poll(pfd,1,10000)){
! if (pfd[0].revents & POLLIN){
! fprintf(stderr,"Getting frontend event\n");
! if ( ioctl(fd_frontend, FE_GET_EVENT, &event) == -EBUFFEROVERFLOW){
! perror("FE_GET_EVENT");
! return -1;
! }
! fprintf(stderr,"Received ");
! switch(event.type){
! case FE_UNEXPECTED_EV:
! fprintf(stderr,"unexpected event\n");
! res = -1;
! break;
! case FE_FAILURE_EV:
! fprintf(stderr,"failure event\n");
! res = -1;
! break;
! case FE_COMPLETION_EV:
! fprintf(stderr,"completion event\n");
! res = 0;
break;
- }
}
! i++;
}
}
--- 257,283 ----
if (poll(pfd,1,10000)){
! if (pfd[0].revents & POLLIN){
! fprintf(stderr,"Getting frontend event\n");
! if ( ioctl(fd_frontend, FE_GET_EVENT, &event) == -EBUFFEROVERFLOW){
! perror("FE_GET_EVENT");
! return -1;
! }
! fprintf(stderr,"Received ");
! switch(event.type){
! case FE_UNEXPECTED_EV:
! fprintf(stderr,"unexpected event\n");
! res = -1;
! break;
! case FE_FAILURE_EV:
! fprintf(stderr,"failure event\n");
! res = -1;
! break;
! case FE_COMPLETION_EV:
! fprintf(stderr,"completion event\n");
! res = 0;
break;
}
! }
! i++;
}
}
***************
*** 278,288 ****
if (event.type == FE_COMPLETION_EV) {
! if (freq > 100000000) {
! fprintf(stderr,"Event: Frequency: %d\n",event.u.completionEvent.Frequency);
! } else {
! fprintf(stderr,"Event: Frequency: %d\n",(unsigned int)((event.u.completionEvent.Frequency)+(tone==SEC_TONE_OFF ? lof1 : lof2)));
! fprintf(stderr," SymbolRate: %d\n",event.u.completionEvent.u.qpsk.SymbolRate);
! fprintf(stderr," FEC_inner: %d\n",event.u.completionEvent.u.qpsk.FEC_inner);
! fprintf(stderr,"\n");
}
--- 294,314 ----
if (event.type == FE_COMPLETION_EV) {
! switch(fe_info.type) {
! case FE_OFDM:
! fprintf(stderr,"Event: Frequency: %d\n",event.u.completionEvent.Frequency);
! break;
! case FE_QPSK:
! fprintf(stderr,"Event: Frequency: %d\n",(unsigned int)((event.u.completionEvent.Frequency)+(tone==SEC_TONE_OFF ? lof1 : lof2)));
! fprintf(stderr," SymbolRate: %d\n",event.u.completionEvent.u.qpsk.SymbolRate);
! fprintf(stderr," FEC_inner: %d\n",event.u.completionEvent.u.qpsk.FEC_inner);
! fprintf(stderr,"\n");
! break;
! case FE_QAM:
! fprintf(stderr,"Event: Frequency: %d\n",event.u.completionEvent.Frequency);
! fprintf(stderr," SymbolRate: %d\n",event.u.completionEvent.u.qpsk.SymbolRate);
! fprintf(stderr," FEC_inner: %d\n",event.u.completionEvent.u.qpsk.FEC_inner);
! break;
! default:
! break;
}
***************
*** 332,334 ****
return 0;
}
-
--- 358,359 ----
|
|
From: <lin...@us...> - 2002-06-18 13:31:32
|
Update of /cvsroot/dvbtools/dvbsubs
In directory usw-pr-cvs1:/tmp/cvs-serv26283
Modified Files:
dvbsubs.c
Log Message:
better hack for initial region position (but still a hack)
Index: dvbsubs.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbsubs/dvbsubs.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** dvbsubs.c 18 Jun 2002 12:33:55 -0000 1.8
--- dvbsubs.c 18 Jun 2002 13:31:28 -0000 1.9
***************
*** 41,45 ****
int minx=0;
! int miny=0;
int width=720;
int height=226;
--- 41,45 ----
int minx=0;
! int miny=999;
int width=720;
int height=226;
***************
*** 85,89 ****
unsigned char img[720*576];
! int fd_osd;
int OSDcmd(int fd, OSD_Command cmd, int x0, int y0, int x1, int y1, int color, void* data) {
--- 85,89 ----
unsigned char img[720*576];
! int fd_osd=-1;
int OSDcmd(int fd, OSD_Command cmd, int x0, int y0, int x1, int y1, int color, void* data) {
***************
*** 102,105 ****
--- 102,107 ----
perror("OSDCmd");
}
+ } else {
+ fprintf(stderr,"in OSD_cmd, fd_osd=%d\n",fd_osd);
}
}
***************
*** 120,123 ****
--- 122,126 ----
OSDcmd(fd_osd, OSD_Hide,0,0,0,0,0,NULL);
OSDcmd(fd_osd, OSD_Clear,0,0,0,0,0,NULL);
+ OSDcmd(fd_osd, OSD_Show,0,0,0,0,0,NULL);
// OSDcmd(fd_osd, OSD_SetPalette,0,0,0,0,0,green); /* Bg colour */
// OSDcmd(fd_osd, OSD_SetPalette,1,0,0,0,1,blue);
***************
*** 382,385 ****
--- 385,390 ----
region_y=(buf[i]<<8)|buf[i+1]; i+=2;
+ if (region_y < miny) { miny=region_y; }
+
region_xs[region_id]=region_x;
region_ys[region_id]=region_y;
***************
*** 598,602 ****
OSDcmd(fd_osd, OSD_SetBlock,0,0,719,height,-1,img);
OSDcmd(fd_osd, OSD_Show,0,0,0,0,0,NULL);
! // usleep(20000);
}
printf("</object_data_segment>\n");
--- 603,607 ----
OSDcmd(fd_osd, OSD_SetBlock,0,0,719,height,-1,img);
OSDcmd(fd_osd, OSD_Show,0,0,0,0,0,NULL);
! usleep(20000);
}
printf("</object_data_segment>\n");
***************
*** 633,639 ****
}
! open_OSD();
! init_OSD();
! test_OSD();
if (is_num) {
--- 638,644 ----
}
! // open_OSD();
! // init_OSD();
! // test_OSD();
if (is_num) {
***************
*** 706,712 ****
/* SEGMENT_DATA_FIELD */
switch(segment_type) {
! case 0x10: process_page_composition_segment();
break;
case 0x11: process_region_composition_segment();
break;
case 0x12: process_CLUT_definition_segment();
--- 711,722 ----
/* SEGMENT_DATA_FIELD */
switch(segment_type) {
! case 0x10: process_page_composition_segment();
break;
case 0x11: process_region_composition_segment();
+ if ((fd_osd < 0) && (miny != 999)) {
+ fprintf(stderr,"opening osd device, miny=%d\n",miny);
+ open_OSD();
+ init_OSD();
+ }
break;
case 0x12: process_CLUT_definition_segment();
***************
*** 724,725 ****
--- 734,769 ----
}
}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
|
From: <lin...@us...> - 2002-06-18 12:33:59
|
Update of /cvsroot/dvbtools/dvbsubs
In directory usw-pr-cvs1:/tmp/cvs-serv9093
Modified Files:
dvbsubs.c
Log Message:
more improvements
Index: dvbsubs.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbsubs/dvbsubs.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** dvbsubs.c 17 Jun 2002 16:39:03 -0000 1.7
--- dvbsubs.c 18 Jun 2002 12:33:55 -0000 1.8
***************
*** 37,63 ****
#include <ost/osd.h>
- int OSDcmd(int fd, OSD_Command cmd, int x0, int y0, int x1, int y1, int color, void* data) {
- osd_cmd_t osd;
- int res;
-
- osd.cmd=cmd;
- osd.x0=x0;
- osd.y0=y0;
- osd.x1=x1;
- osd.y1=y1;
- osd.color=color;
- osd.data=data;
- if ((res=ioctl(fd,OSD_SEND_CMD,&osd))!=0) {
- perror("OSDCmd");
- }
- }
-
int y=0;
int x=0;
int minx=0;
! int miny=452;
int width=720;
! int height=96;
unsigned char white[4]={255,255,255,0xff};
--- 37,54 ----
#include <ost/osd.h>
int y=0;
int x=0;
int minx=0;
! int miny=0;
int width=720;
! int height=226;
!
! unsigned int object_xs[65536];
! unsigned int object_ys[65536];
! unsigned int curr_obj;
! unsigned int region_xs[64];
! unsigned int region_ys[64];
! unsigned int curr_reg[64];
unsigned char white[4]={255,255,255,0xff};
***************
*** 70,73 ****
--- 61,80 ----
unsigned char othercol[4]={0,255,255,0xff};
+ unsigned char trans[16][4]={ {255,255,255,0},
+ {255,255,255,0},
+ {255,255,255,0},
+ {255,255,255,0},
+ {255,255,255,0},
+ {255,255,255,0},
+ {255,255,255,0},
+ {255,255,255,0},
+ {255,255,255,0},
+ {255,255,255,0},
+ {255,255,255,0},
+ {255,255,255,0},
+ {255,255,255,0},
+ {255,255,255,0},
+ {255,255,255,0},
+ {255,255,255,0} } ;
unsigned char buf[100000];
***************
*** 80,83 ****
--- 87,108 ----
int fd_osd;
+ int OSDcmd(int fd, OSD_Command cmd, int x0, int y0, int x1, int y1, int color, void* data) {
+ osd_cmd_t osd;
+ int res;
+
+ if (fd_osd > 0) {
+ osd.cmd=cmd;
+ osd.x0=x0;
+ osd.y0=y0;
+ osd.x1=x1;
+ osd.y1=y1;
+ osd.color=color;
+ osd.data=data;
+ if ((res=ioctl(fd,OSD_SEND_CMD,&osd))!=0) {
+ perror("OSDCmd");
+ }
+ }
+ }
+
int open_OSD() {
if ((fd_osd=open("/dev/ost/osd",O_RDWR)) < 0) {
***************
*** 90,106 ****
int init_OSD() {
if (fd_osd) {
OSDcmd(fd_osd, OSD_Open,minx,miny,minx+width,miny+height,4,NULL);
OSDcmd(fd_osd, OSD_Hide,0,0,0,0,0,NULL);
OSDcmd(fd_osd, OSD_Clear,0,0,0,0,0,NULL);
! OSDcmd(fd_osd, OSD_SetPalette,0,0,0,0,0,green); /* Bg colour */
! OSDcmd(fd_osd, OSD_SetPalette,1,0,0,0,1,blue);
! OSDcmd(fd_osd, OSD_SetPalette,2,0,0,0,2,black);
! OSDcmd(fd_osd, OSD_SetPalette,3,0,0,0,3,magenta);
! OSDcmd(fd_osd, OSD_SetPalette,4,0,0,0,4,white);
! OSDcmd(fd_osd, OSD_SetPalette,5,0,0,0,5,yellow);
! OSDcmd(fd_osd, OSD_SetPalette,6,0,0,0,6,red);
! OSDcmd(fd_osd, OSD_SetPalette,7,0,0,0,7,othercol);
! OSDcmd(fd_osd, OSD_SetPalette,8,0,0,0,8,blue);
}
}
--- 115,135 ----
int init_OSD() {
+ int i;
if (fd_osd) {
OSDcmd(fd_osd, OSD_Open,minx,miny,minx+width,miny+height,4,NULL);
OSDcmd(fd_osd, OSD_Hide,0,0,0,0,0,NULL);
OSDcmd(fd_osd, OSD_Clear,0,0,0,0,0,NULL);
! // OSDcmd(fd_osd, OSD_SetPalette,0,0,0,0,0,green); /* Bg colour */
! // OSDcmd(fd_osd, OSD_SetPalette,1,0,0,0,1,blue);
! // OSDcmd(fd_osd, OSD_SetPalette,2,0,0,0,2,black);
! // OSDcmd(fd_osd, OSD_SetPalette,3,0,0,0,3,magenta);
! // OSDcmd(fd_osd, OSD_SetPalette,4,0,0,0,4,white);
! // OSDcmd(fd_osd, OSD_SetPalette,5,0,0,0,5,yellow);
! // OSDcmd(fd_osd, OSD_SetPalette,6,0,0,0,6,red);
! // OSDcmd(fd_osd, OSD_SetPalette,7,0,0,0,7,othercol);
! // OSDcmd(fd_osd, OSD_SetPalette,8,0,0,0,8,blue);
! for (i=15;i>=0;i--) {
! OSDcmd(fd_osd, OSD_SetPalette,i,0,0,0,i,trans);
! }
}
}
***************
*** 112,117 ****
void do_plot(int x, int y, unsigned char pixel) {
int i;
! i=(y*720)+x;
! img[i]=pixel;
}
--- 141,150 ----
void do_plot(int x, int y, unsigned char pixel) {
int i;
! if ((y >= 0) && (y < height)) {
! i=(y*720)+x;
! img[i]=pixel;
! } else {
! fprintf(stderr,"plot out of region: x=%d, y=%d\n",x,y);
! }
}
***************
*** 188,192 ****
colour[2]=G;
colour[3]=T_value;
! OSDcmd(fd_osd, OSD_SetPalette,id,0,0,0,id,colour);
}
--- 221,225 ----
colour[2]=G;
colour[3]=T_value;
! if (id < 15) OSDcmd(fd_osd, OSD_SetPalette,id,0,0,0,id,colour);
}
***************
*** 301,305 ****
case 0xf0: printf("</scanline>\n");
in_scanline=0;
! x=0; y+=2;
break;
default: fprintf(stderr,"unimplemented data_type %02x in pixel_data_sub_block\n",data_type);
--- 334,339 ----
case 0xf0: printf("</scanline>\n");
in_scanline=0;
! x=object_xs[curr_obj];
! y+=2;
break;
default: fprintf(stderr,"unimplemented data_type %02x in pixel_data_sub_block\n",data_type);
***************
*** 348,351 ****
--- 382,388 ----
region_y=(buf[i]<<8)|buf[i+1]; i+=2;
+ region_xs[region_id]=region_x;
+ region_ys[region_id]=region_y;
+
printf("<page_region id=\"%02x\" x=\"%d\" y=\"%d\" />\n",region_id,region_x,region_y);
}
***************
*** 398,401 ****
--- 435,445 ----
i++;
+ if (region_fill_flag==1) {
+ // fprintf(stderr,"filling image with %d\n",region_4_bit_pixel_code);
+ memset(img,15,sizeof(img));
+ OSDcmd(fd_osd, OSD_SetBlock,0,0,719,height,-1,img);
+ OSDcmd(fd_osd, OSD_Show,0,0,0,0,0,NULL);
+ }
+
printf("<region_composition_segment page_id=\"0x%02x\" region_id=\"0x%02x\">\n",page_id,region_id);
***************
*** 418,421 ****
--- 462,467 ----
object_x=((buf[i]&0x0f)<<8)|buf[i+1]; i+=2;
object_y=((buf[i]&0x0f)<<8)|buf[i+1]; i+=2;
+ object_xs[object_id]=object_x+region_xs[region_id];
+ object_ys[object_id]=object_y+region_ys[region_id]-miny;
printf("<object id=\"0x%02x\" type=\"0x%02x\">\n",object_id,object_type);
***************
*** 496,500 ****
printf("<T_value>%d</T_value>\n",T_value);
printf("</CLUT_entry>\n");
! set_palette(CLUT_entry_id,Y_value,Cr_value,Cb_value,255-T_value);
}
printf("</CLUT_entries>\n");
--- 542,548 ----
printf("<T_value>%d</T_value>\n",T_value);
printf("</CLUT_entry>\n");
! if (CLUT_id==0) {
! set_palette(CLUT_entry_id,Y_value,Cr_value,Cb_value,255-T_value);
! }
}
printf("</CLUT_entries>\n");
***************
*** 521,524 ****
--- 569,573 ----
object_id=(buf[i]<<8)|buf[i+1]; i+=2;
+ curr_obj=object_id;
object_version_number=(buf[i]&0xf0)>>4;
object_coding_method=(buf[i]&0x0c)>>2;
***************
*** 537,552 ****
printf("<pixel_data_sub_block type=\"top\" length=\"0x%04x\"/>\n",top_field_data_block_length);
!
! y=0; x=0;
process_pixel_data_sub_block(top_field_data_block_length);
printf("<pixel_data_sub_block type=\"bottom\" length=\"0x%04x\"/>\n",bottom_field_data_block_length);
! y=1; x=0;
process_pixel_data_sub_block(bottom_field_data_block_length);
! OSDcmd(fd_osd, OSD_SetBlock,0,0,719,95,-1,img);
! memset(img,0,sizeof(img));
OSDcmd(fd_osd, OSD_Show,0,0,0,0,0,NULL);
! sleep(1);
}
printf("</object_data_segment>\n");
--- 586,602 ----
printf("<pixel_data_sub_block type=\"top\" length=\"0x%04x\"/>\n",top_field_data_block_length);
! x=object_xs[curr_obj];
! y=object_ys[curr_obj];
process_pixel_data_sub_block(top_field_data_block_length);
printf("<pixel_data_sub_block type=\"bottom\" length=\"0x%04x\"/>\n",bottom_field_data_block_length);
! x=object_xs[curr_obj];
! y=object_ys[curr_obj]+1;
process_pixel_data_sub_block(bottom_field_data_block_length);
! // OSDcmd(fd_osd, OSD_Hide,0,0,0,0,0,NULL);
! OSDcmd(fd_osd, OSD_SetBlock,0,0,719,height,-1,img);
OSDcmd(fd_osd, OSD_Show,0,0,0,0,0,NULL);
! // usleep(20000);
}
printf("</object_data_segment>\n");
***************
*** 595,602 ****
set_filt(fd,pid,DMX_PES_OTHER);
} else {
! fd=open(argv[1],O_RDONLY);
! if (fd <= 0) {
! fprintf(stderr,"can't open file\n");
! exit(0);
}
}
--- 645,656 ----
set_filt(fd,pid,DMX_PES_OTHER);
} else {
! if (!strcmp(argv[1],"-")) {
! fd=0;
! } else {
! fd=open(argv[1],O_RDONLY);
! if (fd < 0) {
! fprintf(stderr,"can't open file\n");
! exit(0);
! }
}
}
|
|
From: <lin...@us...> - 2002-06-17 16:39:13
|
Update of /cvsroot/dvbtools/dvbsubs
In directory usw-pr-cvs1:/tmp/cvs-serv15049
Modified Files:
dvbsubs.c
Log Message:
first working version!
Index: dvbsubs.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbsubs/dvbsubs.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** dvbsubs.c 17 Jun 2002 10:27:24 -0000 1.6
--- dvbsubs.c 17 Jun 2002 16:39:03 -0000 1.7
***************
*** 34,37 ****
--- 34,74 ----
#include <ost/dmx.h>
+ // DVB includes:
+ #include <ost/osd.h>
+
+ int OSDcmd(int fd, OSD_Command cmd, int x0, int y0, int x1, int y1, int color, void* data) {
+ osd_cmd_t osd;
+ int res;
+
+ osd.cmd=cmd;
+ osd.x0=x0;
+ osd.y0=y0;
+ osd.x1=x1;
+ osd.y1=y1;
+ osd.color=color;
+ osd.data=data;
+ if ((res=ioctl(fd,OSD_SEND_CMD,&osd))!=0) {
+ perror("OSDCmd");
+ }
+ }
+
+ int y=0;
+ int x=0;
+
+ int minx=0;
+ int miny=452;
+ int width=720;
+ int height=96;
+
+ unsigned char white[4]={255,255,255,0xff};
+ unsigned char green[4]={0,255,0,0xdf} ;
+ unsigned char blue[4]={0,0,255,0xbf} ;
+ unsigned char yellow[4]={255,255,0,0xbf} ;
+ unsigned char black[4]={0,0,0,0xff} ;
+ unsigned char red[4]={255,0,0,0xbf} ;
+ unsigned char magenta[4]={255,0,255,0xff};
+ unsigned char othercol[4]={0,255,255,0xff};
+
+
unsigned char buf[100000];
int i=0;
***************
*** 39,42 ****
--- 76,130 ----
int in_scanline=0;
+ unsigned char img[720*576];
+
+ int fd_osd;
+
+ int open_OSD() {
+ if ((fd_osd=open("/dev/ost/osd",O_RDWR)) < 0) {
+ perror("OSD device");
+ return 0;
+ } else {
+ return 1;
+ }
+ }
+
+ int init_OSD() {
+ if (fd_osd) {
+ OSDcmd(fd_osd, OSD_Open,minx,miny,minx+width,miny+height,4,NULL);
+ OSDcmd(fd_osd, OSD_Hide,0,0,0,0,0,NULL);
+ OSDcmd(fd_osd, OSD_Clear,0,0,0,0,0,NULL);
+ OSDcmd(fd_osd, OSD_SetPalette,0,0,0,0,0,green); /* Bg colour */
+ OSDcmd(fd_osd, OSD_SetPalette,1,0,0,0,1,blue);
+ OSDcmd(fd_osd, OSD_SetPalette,2,0,0,0,2,black);
+ OSDcmd(fd_osd, OSD_SetPalette,3,0,0,0,3,magenta);
+ OSDcmd(fd_osd, OSD_SetPalette,4,0,0,0,4,white);
+ OSDcmd(fd_osd, OSD_SetPalette,5,0,0,0,5,yellow);
+ OSDcmd(fd_osd, OSD_SetPalette,6,0,0,0,6,red);
+ OSDcmd(fd_osd, OSD_SetPalette,7,0,0,0,7,othercol);
+ OSDcmd(fd_osd, OSD_SetPalette,8,0,0,0,8,blue);
+ }
+ }
+
+ int test_OSD() {
+ // OSDcmd(fd_osd, OSD_Text,6,2,0,0,1,"TEST STRING");
+ }
+
+ void do_plot(int x, int y, unsigned char pixel) {
+ int i;
+ i=(y*720)+x;
+ img[i]=pixel;
+ }
+
+ void plot(int run_length, unsigned char pixel) {
+ int x2=x+run_length;
+ while (x < x2) {
+ do_plot(x,y,pixel);
+ x++;
+ }
+
+ // OSDcmd(fd_osd,OSD_Line,x,y,x+run_length-1,y,pixel,NULL);
+ // x+=run_length;
+ }
+
ssize_t safe_read(int fd, void *buf, size_t count) {
ssize_t n,tot;
***************
*** 82,91 ****
*/
! /*
! void palette(int p,int i) {
! double Y,Cr,Cb,R,G,B;
! Y=sub[i+0];
! Cr=sub[i+1];
! Cb=sub[i+2];
B = 1.164*(Y - 16) + 2.018*(Cb - 128);
G = 1.164*(Y - 16) - 0.813*(Cr - 128) - 0.391*(Cb - 128);
--- 170,181 ----
*/
!
! void set_palette(int id,int Y_value, int Cr_value, int Cb_value, int T_value) {
! int Y,Cr,Cb,R,G,B;
! unsigned char colour[4];
!
! Y=Y_value;
! Cr=Cr_value;
! Cb=Cb_value;
B = 1.164*(Y - 16) + 2.018*(Cb - 128);
G = 1.164*(Y - 16) - 0.813*(Cr - 128) - 0.391*(Cb - 128);
***************
*** 94,103 ****
if (G<0) G=0; if (G>255) G=255;
if (R<0) R=0; if (R>255) R=255;
! pal[p].r=R;
! pal[p].g=G;
! pal[p].b=B;
! pal[p].t=sub[i+3];
}
- */
void decode_4bit_pixel_code_string(int n) {
--- 184,193 ----
if (G<0) G=0; if (G>255) G=255;
if (R<0) R=0; if (R>255) R=255;
! colour[0]=R;
! colour[1]=B;
! colour[2]=G;
! colour[3]=T_value;
! OSDcmd(fd_osd, OSD_SetPalette,id,0,0,0,id,colour);
}
void decode_4bit_pixel_code_string(int n) {
***************
*** 129,132 ****
--- 219,223 ----
pixel_code=next_bits;
printf("<pixel run_length=\"1\" pixel_code=\"%d\" />\n",pixel_code);
+ plot(1,pixel_code);
bits+=4;
} else {
***************
*** 140,143 ****
--- 231,235 ----
if (run_length!=0) {
printf("<pixel run_length=\"%d\" pixel_code=\"0\" />\n",run_length+2);
+ plot(run_length+2,pixel_code);
} else {
// printf("end_of_string - run_length=%d\n",run_length);
***************
*** 153,156 ****
--- 245,249 ----
bits+=4;
printf("<pixel run_length=\"%d\" pixel_code=\"%d\" />\n",run_length+4,pixel_code);
+ plot(run_length+4,pixel_code);
} else {
switch_3=(data&0x03);
***************
*** 158,163 ****
--- 251,258 ----
switch (switch_3) {
case 0: printf("<pixel run_length=\"1\" pixel_code=\"0\" />\n");
+ plot(1,pixel_code);
break;
case 1: printf("<pixel run_length=\"2\" pixel_code=\"0\" />\n");
+ plot(2,pixel_code);
break;
case 2: run_length=next_nibble();
***************
*** 166,169 ****
--- 261,265 ----
bits+=4;
printf("<pixel run_length=\"%d\", pixel_code=\"%d\" />\n",run_length+9,pixel_code);
+ plot(run_length+9,pixel_code);
break;
case 3: run_length=next_nibble();
***************
*** 173,176 ****
--- 269,273 ----
bits+=4;
printf("<pixel run_length=\"%d\" pixel_code=\"%d\" />\n",run_length+25,pixel_code);
+ plot(run_length+25,pixel_code);
}
}
***************
*** 204,207 ****
--- 301,305 ----
case 0xf0: printf("</scanline>\n");
in_scanline=0;
+ x=0; y+=2;
break;
default: fprintf(stderr,"unimplemented data_type %02x in pixel_data_sub_block\n",data_type);
***************
*** 398,401 ****
--- 496,500 ----
printf("<T_value>%d</T_value>\n",T_value);
printf("</CLUT_entry>\n");
+ set_palette(CLUT_entry_id,Y_value,Cr_value,Cb_value,255-T_value);
}
printf("</CLUT_entries>\n");
***************
*** 439,446 ****
--- 538,552 ----
printf("<pixel_data_sub_block type=\"top\" length=\"0x%04x\"/>\n",top_field_data_block_length);
+ y=0; x=0;
process_pixel_data_sub_block(top_field_data_block_length);
printf("<pixel_data_sub_block type=\"bottom\" length=\"0x%04x\"/>\n",bottom_field_data_block_length);
+ y=1; x=0;
process_pixel_data_sub_block(bottom_field_data_block_length);
+
+ OSDcmd(fd_osd, OSD_SetBlock,0,0,719,95,-1,img);
+ memset(img,0,sizeof(img));
+ OSDcmd(fd_osd, OSD_Show,0,0,0,0,0,NULL);
+ sleep(1);
}
printf("</object_data_segment>\n");
***************
*** 476,480 ****
if (!(isdigit(argv[1][n]))) is_num=0;
}
!
if (is_num) {
pid=atoi(argv[1]);
--- 582,590 ----
if (!(isdigit(argv[1][n]))) is_num=0;
}
!
! open_OSD();
! init_OSD();
! test_OSD();
!
if (is_num) {
pid=atoi(argv[1]);
|
|
From: <lin...@us...> - 2002-06-17 10:27:27
|
Update of /cvsroot/dvbtools/dvbsubs
In directory usw-pr-cvs1:/tmp/cvs-serv1845
Modified Files:
dvbsubs.c
Log Message:
added YCbCr to RGB conversion function
Index: dvbsubs.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbsubs/dvbsubs.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** dvbsubs.c 17 Jun 2002 07:47:48 -0000 1.5
--- dvbsubs.c 17 Jun 2002 10:27:24 -0000 1.6
***************
*** 78,81 ****
--- 78,104 ----
}
+ /* function taken from "dvd2sub.c" in the svcdsubs packages in the
+ vcdimager contribs directory. Author unknown, but released under GPL2.
+ */
+
+ /*
+ void palette(int p,int i) {
+ double Y,Cr,Cb,R,G,B;
+ Y=sub[i+0];
+ Cr=sub[i+1];
+ Cb=sub[i+2];
+ B = 1.164*(Y - 16) + 2.018*(Cb - 128);
+ G = 1.164*(Y - 16) - 0.813*(Cr - 128) - 0.391*(Cb - 128);
+ R = 1.164*(Y - 16) + 1.596*(Cr - 128);
+ if (B<0) B=0; if (B>255) B=255;
+ if (G<0) G=0; if (G>255) G=255;
+ if (R<0) R=0; if (R>255) R=255;
+ pal[p].r=R;
+ pal[p].g=G;
+ pal[p].b=B;
+ pal[p].t=sub[i+3];
+ }
+ */
+
void decode_4bit_pixel_code_string(int n) {
int next_bits,
|
|
From: <lin...@us...> - 2002-06-17 07:48:43
|
Update of /cvsroot/dvbtools/dvbsubs
In directory usw-pr-cvs1:/tmp/cvs-serv23098
Added Files:
COPYING
Log Message:
initial checkin
--- NEW FILE: COPYING ---
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
|