Mercurial > mplayer.hg
comparison libvo/vo_mpegpes.c @ 27430:8bc08d1b115d
100l: Rename missed preprocessor directives from a HAVE_ prefix to CONFIG_.
author | diego |
---|---|
date | Thu, 14 Aug 2008 15:48:11 +0000 |
parents | 8598536ca4f5 |
children | bb738b9ea7c4 |
comparison
equal
deleted
inserted
replaced
27429:bc54ab99e5b6 | 27430:8bc08d1b115d |
---|---|
22 #include <fcntl.h> | 22 #include <fcntl.h> |
23 #include <unistd.h> | 23 #include <unistd.h> |
24 | 24 |
25 #include "mp_msg.h" | 25 #include "mp_msg.h" |
26 | 26 |
27 #ifdef HAVE_DVB | 27 #ifdef CONFIG_DVB |
28 #ifndef HAVE_DVB_HEAD | 28 #ifndef CONFIG_DVB_HEAD |
29 #include <sys/poll.h> | 29 #include <sys/poll.h> |
30 | 30 |
31 #include <sys/ioctl.h> | 31 #include <sys/ioctl.h> |
32 #include <stdio.h> | 32 #include <stdio.h> |
33 #include <time.h> | 33 #include <time.h> |
62 int vo_mpegpes_fd=-1; | 62 int vo_mpegpes_fd=-1; |
63 extern int vo_mpegpes_fd2; | 63 extern int vo_mpegpes_fd2; |
64 | 64 |
65 static const vo_info_t info = | 65 static const vo_info_t info = |
66 { | 66 { |
67 #ifdef HAVE_DVB | 67 #ifdef CONFIG_DVB |
68 "MPEG-PES to DVB card", | 68 "MPEG-PES to DVB card", |
69 #else | 69 #else |
70 "MPEG-PES file", | 70 "MPEG-PES file", |
71 #endif | 71 #endif |
72 "mpegpes", | 72 "mpegpes", |
77 const LIBVO_EXTERN (mpegpes) | 77 const LIBVO_EXTERN (mpegpes) |
78 | 78 |
79 static int | 79 static int |
80 config(uint32_t s_width, uint32_t s_height, uint32_t width, uint32_t height, uint32_t flags, char *title, uint32_t format) | 80 config(uint32_t s_width, uint32_t s_height, uint32_t width, uint32_t height, uint32_t flags, char *title, uint32_t format) |
81 { | 81 { |
82 #ifdef HAVE_DVB | 82 #ifdef CONFIG_DVB |
83 switch(s_height){ | 83 switch(s_height){ |
84 case 288: | 84 case 288: |
85 case 576: | 85 case 576: |
86 case 240: | 86 case 240: |
87 case 480: | 87 case 480: |
93 #endif | 93 #endif |
94 return 0; | 94 return 0; |
95 } | 95 } |
96 | 96 |
97 static int preinit(const char *arg){ | 97 static int preinit(const char *arg){ |
98 #ifdef HAVE_DVB | 98 #ifdef CONFIG_DVB |
99 int card = -1; | 99 int card = -1; |
100 char vo_file[30], ao_file[30], *tmp; | 100 char vo_file[30], ao_file[30], *tmp; |
101 | 101 |
102 if(arg != NULL){ | 102 if(arg != NULL){ |
103 if((tmp = strstr(arg, "card=")) != NULL) { | 103 if((tmp = strstr(arg, "card=")) != NULL) { |
126 } | 126 } |
127 if(card==-1) { | 127 if(card==-1) { |
128 mp_msg(MSGT_VO,MSGL_INFO, "Couldn't find a usable dvb video device, exiting\n"); | 128 mp_msg(MSGT_VO,MSGL_INFO, "Couldn't find a usable dvb video device, exiting\n"); |
129 return -1; | 129 return -1; |
130 } | 130 } |
131 #ifndef HAVE_DVB_HEAD | 131 #ifndef CONFIG_DVB_HEAD |
132 mp_msg(MSGT_VO,MSGL_INFO, "Opening /dev/ost/video+audio\n"); | 132 mp_msg(MSGT_VO,MSGL_INFO, "Opening /dev/ost/video+audio\n"); |
133 sprintf(vo_file, "/dev/ost/video"); | 133 sprintf(vo_file, "/dev/ost/video"); |
134 sprintf(ao_file, "/dev/ost/audio"); | 134 sprintf(ao_file, "/dev/ost/audio"); |
135 #else | 135 #else |
136 mp_msg(MSGT_VO,MSGL_INFO, "Opening /dev/dvb/adapter%d/video0+audio0\n", card); | 136 mp_msg(MSGT_VO,MSGL_INFO, "Opening /dev/dvb/adapter%d/video0+audio0\n", card); |
172 } | 172 } |
173 | 173 |
174 | 174 |
175 static int my_write(unsigned char* data,int len){ | 175 static int my_write(unsigned char* data,int len){ |
176 int orig_len = len; | 176 int orig_len = len; |
177 #ifdef HAVE_DVB | 177 #ifdef CONFIG_DVB |
178 #define NFD 2 | 178 #define NFD 2 |
179 struct pollfd pfd[NFD]; | 179 struct pollfd pfd[NFD]; |
180 | 180 |
181 // printf("write %d bytes \n",len); | 181 // printf("write %d bytes \n",len); |
182 | 182 |