|
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);
}
|