From 02135001b44afc5446228228055c9ce7f29df5be Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 3 Aug 2008 15:21:40 +0000 Subject: Change a bunch of video/audio-output-specific preprocessor directives from a HAVE_ prefix to a CONFIG_ prefix. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27402 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/dvb_tune.c | 38 +++++++++++++++++++------------------- stream/dvbin.h | 2 +- stream/stream.c | 6 +++--- stream/stream_dvb.c | 8 ++++---- stream/stream_radio.c | 28 ++++++++++++++-------------- stream/stream_radio.h | 2 +- stream/tv.c | 16 ++++++++-------- stream/tvi_dshow.c | 14 +++++++------- stream/tvi_v4l.c | 12 ++++++------ stream/tvi_v4l2.c | 12 ++++++------ 10 files changed, 69 insertions(+), 69 deletions(-) (limited to 'stream') diff --git a/stream/dvb_tune.c b/stream/dvb_tune.c index b438cac5f8..2235541fe1 100644 --- a/stream/dvb_tune.c +++ b/stream/dvb_tune.c @@ -34,7 +34,7 @@ #include #include "config.h" -#ifdef HAVE_DVB_HEAD +#ifdef CONFIG_DVB_HEAD #include #include #else @@ -50,7 +50,7 @@ int dvb_get_tuner_type(int fe_fd) { -#ifdef HAVE_DVB_HEAD +#ifdef CONFIG_DVB_HEAD struct dvb_frontend_info fe_info; #else FrontendInfo fe_info; @@ -98,7 +98,7 @@ int dvb_open_devices(dvb_priv_t *priv, int n, int demux_cnt) int i; char frontend_dev[32], dvr_dev[32], demux_dev[32], sec_dev[32]; -#ifdef HAVE_DVB_HEAD +#ifdef CONFIG_DVB_HEAD sprintf(frontend_dev, "/dev/dvb/adapter%d/frontend0", n); sprintf(dvr_dev, "/dev/dvb/adapter%d/dvr0", n); sprintf(demux_dev, "/dev/dvb/adapter%d/demux0", n); @@ -114,7 +114,7 @@ int dvb_open_devices(dvb_priv_t *priv, int n, int demux_cnt) mp_msg(MSGT_DEMUX, MSGL_ERR, "ERROR OPENING FRONTEND DEVICE %s: ERRNO %d\n", frontend_dev, errno); return 0; } -#ifdef HAVE_DVB_HEAD +#ifdef CONFIG_DVB_HEAD priv->sec_fd=0; #else priv->sec_fd = open(sec_dev, O_RDWR); @@ -159,7 +159,7 @@ int dvb_fix_demuxes(dvb_priv_t *priv, int cnt) int i; char demux_dev[32]; -#ifdef HAVE_DVB_HEAD +#ifdef CONFIG_DVB_HEAD sprintf(demux_dev, "/dev/dvb/adapter%d/demux0", priv->card); #else sprintf(demux_dev, "/dev/ost/demux%d", priv->card); @@ -202,7 +202,7 @@ int dvb_set_ts_filt(int fd, uint16_t pid, dmx_pes_type_t pestype) pesFilterParams.pid = pid; pesFilterParams.input = DMX_IN_FRONTEND; pesFilterParams.output = DMX_OUT_TS_TAP; -#ifdef HAVE_DVB_HEAD +#ifdef CONFIG_DVB_HEAD pesFilterParams.pes_type = pestype; #else pesFilterParams.pesType = pestype; @@ -268,7 +268,7 @@ int dvb_tune(dvb_priv_t *priv, int freq, char pol, int srate, int diseqc, int to } -#ifndef HAVE_DVB_HEAD +#ifndef CONFIG_DVB_HEAD static int SecGetStatus (int fd, struct secStatus *state) { if(ioctl(fd, SEC_GET_STATUS, state) < 0) @@ -331,7 +331,7 @@ static void print_status(fe_status_t festatus) { mp_msg(MSGT_DEMUX, MSGL_V, "FE_STATUS:"); if (festatus & FE_HAS_SIGNAL) mp_msg(MSGT_DEMUX, MSGL_V," FE_HAS_SIGNAL"); -#ifdef HAVE_DVB_HEAD +#ifdef CONFIG_DVB_HEAD if (festatus & FE_TIMEDOUT) mp_msg(MSGT_DEMUX, MSGL_V, " FE_TIMEDOUT"); #else if (festatus & FE_HAS_POWER) mp_msg(MSGT_DEMUX, MSGL_V, " FE_HAS_POWER"); @@ -346,7 +346,7 @@ static void print_status(fe_status_t festatus) } -#ifdef HAVE_DVB_HEAD +#ifdef CONFIG_DVB_HEAD static int check_status(int fd_frontend, int tmout) { int32_t strength; @@ -500,7 +500,7 @@ static int check_status(int fd_frontend, int tmout) } #endif -#ifdef HAVE_DVB_HEAD +#ifdef CONFIG_DVB_HEAD struct diseqc_cmd { struct dvb_diseqc_master_cmd cmd; @@ -585,7 +585,7 @@ static int tune_it(int fd_frontend, int fd_sec, unsigned int freq, unsigned int fe_code_rate_t LP_CodeRate, fe_hierarchy_t hier, int timeout) { int res, hi_lo, dfd; -#ifdef HAVE_DVB_HEAD +#ifdef CONFIG_DVB_HEAD struct dvb_frontend_parameters feparams; struct dvb_frontend_info fe_info; #else @@ -608,14 +608,14 @@ static int tune_it(int fd_frontend, int fd_sec, unsigned int freq, unsigned int } -#ifdef HAVE_DVB_HEAD +#ifdef CONFIG_DVB_HEAD mp_msg(MSGT_DEMUX, MSGL_V, "Using DVB card \"%s\"\n", fe_info.name); #endif switch(fe_info.type) { case FE_OFDM: -#ifdef HAVE_DVB_HEAD +#ifdef CONFIG_DVB_HEAD if (freq < 1000000) freq*=1000UL; feparams.frequency=freq; feparams.inversion=specInv; @@ -646,7 +646,7 @@ static int tune_it(int fd_frontend, int fd_sec, unsigned int freq, unsigned int // this must be an absolute frequency if (freq < SLOF) { -#ifdef HAVE_DVB_HEAD +#ifdef CONFIG_DVB_HEAD freq = feparams.frequency=(freq-LOF1); #else freq = feparams.Frequency=(freq-LOF1); @@ -655,7 +655,7 @@ static int tune_it(int fd_frontend, int fd_sec, unsigned int freq, unsigned int } else { -#ifdef HAVE_DVB_HEAD +#ifdef CONFIG_DVB_HEAD freq = feparams.frequency=(freq-LOF2); #else freq = feparams.Frequency=(freq-LOF2); @@ -666,14 +666,14 @@ static int tune_it(int fd_frontend, int fd_sec, unsigned int freq, unsigned int else { // this is an L-Band frequency -#ifdef HAVE_DVB_HEAD +#ifdef CONFIG_DVB_HEAD feparams.frequency=freq; #else feparams.Frequency=freq; #endif } -#ifdef HAVE_DVB_HEAD +#ifdef CONFIG_DVB_HEAD feparams.inversion=specInv; feparams.u.qpsk.symbol_rate=srate; feparams.u.qpsk.fec_inner=HP_CodeRate; @@ -697,7 +697,7 @@ static int tune_it(int fd_frontend, int fd_sec, unsigned int freq, unsigned int break; case FE_QAM: mp_msg(MSGT_DEMUX, MSGL_V, "tuning DVB-C to %d, srate=%d\n",freq,srate); -#ifdef HAVE_DVB_HEAD +#ifdef CONFIG_DVB_HEAD feparams.frequency=freq; feparams.inversion=specInv; feparams.u.qam.symbol_rate = srate; @@ -724,7 +724,7 @@ static int tune_it(int fd_frontend, int fd_sec, unsigned int freq, unsigned int } usleep(100000); -#ifndef HAVE_DVB_HEAD +#ifndef CONFIG_DVB_HEAD if (fd_sec) SecGetStatus(fd_sec, &sec_state); while(1) { diff --git a/stream/dvbin.h b/stream/dvbin.h index c24832c4d2..172cd1299d 100644 --- a/stream/dvbin.h +++ b/stream/dvbin.h @@ -14,7 +14,7 @@ #define LOF1 (9750*1000UL) #define LOF2 (10600*1000UL) -#ifdef HAVE_DVB_HEAD +#ifdef CONFIG_DVB_HEAD #include #include #include diff --git a/stream/stream.c b/stream/stream.c index 533bf7cd2e..d9636da1f6 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -65,7 +65,7 @@ extern const stream_info_t stream_info_ifo; extern const stream_info_t stream_info_dvd; static const stream_info_t* const auto_open_streams[] = { -#ifdef HAVE_VCD +#ifdef CONFIG_VCD &stream_info_vcd, #endif #ifdef HAVE_CDDA @@ -85,7 +85,7 @@ static const stream_info_t* const auto_open_streams[] = { &stream_info_udp, &stream_info_http2, #endif -#ifdef HAS_DVBIN_SUPPORT +#ifdef CONFIG_DVBIN &stream_info_dvb, #endif #ifdef CONFIG_TV @@ -94,7 +94,7 @@ static const stream_info_t* const auto_open_streams[] = { #ifdef CONFIG_RADIO &stream_info_radio, #endif -#ifdef HAVE_PVR +#ifdef CONFIG_PVR &stream_info_pvr, #endif #ifdef HAVE_FTP diff --git a/stream/stream_dvb.c b/stream/stream_dvb.c index b65152f1e8..948bd70c81 100644 --- a/stream/stream_dvb.c +++ b/stream/stream_dvb.c @@ -288,7 +288,7 @@ static dvb_channels_list *dvb_get_channels(char *filename, int type) ptr->cr =FEC_2_3; else if(! strcmp(cr, "FEC_3_4")) ptr->cr =FEC_3_4; -#ifdef HAVE_DVB_HEAD +#ifdef CONFIG_DVB_HEAD else if(! strcmp(cr, "FEC_4_5")) ptr->cr =FEC_4_5; else if(! strcmp(cr, "FEC_6_7")) @@ -358,7 +358,7 @@ static dvb_channels_list *dvb_get_channels(char *filename, int type) ptr->cr_lp =FEC_2_3; else if(! strcmp(tmp_lcr, "FEC_3_4")) ptr->cr_lp =FEC_3_4; -#ifdef HAVE_DVB_HEAD +#ifdef CONFIG_DVB_HEAD else if(! strcmp(tmp_lcr, "FEC_4_5")) ptr->cr_lp =FEC_4_5; else if(! strcmp(tmp_lcr, "FEC_6_7")) @@ -381,7 +381,7 @@ static dvb_channels_list *dvb_get_channels(char *filename, int type) ptr->hier = HIERARCHY_2; else if(! strcmp(tmp_hier, "HIERARCHY_4")) ptr->hier = HIERARCHY_4; -#ifdef HAVE_DVB_HEAD +#ifdef CONFIG_DVB_HEAD else if(! strcmp(tmp_hier, "HIERARCHY_AUTO")) ptr->hier = HIERARCHY_AUTO; #endif @@ -611,7 +611,7 @@ static void dvbin_close(stream_t *stream) close(priv->dvr_fd); close(priv->fe_fd); -#ifdef HAVE_DVB +#ifdef CONFIG_DVB close(priv->sec_fd); #endif diff --git a/stream/stream_radio.c b/stream/stream_radio.c index 642e55a5f7..6714760e8d 100644 --- a/stream/stream_radio.c +++ b/stream/stream_radio.c @@ -35,21 +35,21 @@ #include #include -#ifdef HAVE_RADIO_BSDBT848 +#ifdef CONFIG_RADIO_BSDBT848 #include #ifdef IOCTL_BT848_H_NAME #include IOCTL_BT848_H_NAME #endif -#else // HAVE_RADIO_BSDBT848 +#else /* CONFIG_RADIO_BSDBT848 */ #include -#ifdef HAVE_RADIO_V4L2 +#ifdef CONFIG_RADIO_V4L2 #include #endif -#ifdef HAVE_RADIO_V4L +#ifdef CONFIG_RADIO_V4L #include #warning "V4L is deprecated and will be removed in future" #endif @@ -91,7 +91,7 @@ typedef struct radio_channels_s { /// default values for options radio_param_t stream_radio_defaults={ -#ifdef HAVE_RADIO_BSDBT848 +#ifdef CONFIG_RADIO_BSDBT848 "/dev/tuner0", //device 87.50, //freq_min 108.00, //freq_max @@ -252,7 +252,7 @@ static int parse_channels(radio_priv_t* priv,float freq_channel,float* pfreq){ return STREAM_OK; } -#ifdef HAVE_RADIO_V4L2 +#ifdef CONFIG_RADIO_V4L2 /***************************************************************** * \brief get fraction value for using in set_frequency and get_frequency * \return STREAM_OK if success, STREAM_ERROR otherwise @@ -409,8 +409,8 @@ static const radio_driver_t radio_driver_v4l2={ set_frequency_v4l2, get_frequency_v4l2 }; -#endif //HAVE_RADIO_V4L2 -#ifdef HAVE_RADIO_V4L +#endif /* CONFIG_RADIO_V4L2 */ +#ifdef CONFIG_RADIO_V4L /***************************************************************** * \brief get fraction value for using in set_frequency and get_frequency * \return STREAM_OK if success, STREAM_ERROR otherwise @@ -540,8 +540,8 @@ static const radio_driver_t radio_driver_v4l={ set_frequency_v4l, get_frequency_v4l }; -#endif //HAVE_RADIO_V4L -#ifdef HAVE_RADIO_BSDBT848 +#endif /* CONFIG_RADIO_V4L */ +#ifdef CONFIG_RADIO_BSDBT848 /***************************************************************** * \brief get fraction value for using in set_frequency and get_frequency @@ -652,7 +652,7 @@ static const radio_driver_t radio_driver_bsdbt848={ set_frequency_bsdbt848, get_frequency_bsdbt848 }; -#endif //HAVE_RADIO_BSDBT848 +#endif /* CONFIG_RADIO_BSDBT848 */ static inline int init_frac(radio_priv_t* priv){ return priv->driver->init_frac(priv); @@ -1080,13 +1080,13 @@ static int fill_buffer_s(struct stream_st *s, char* buffer, int max_len){ when no driver explicitly specified first available will be used */ static const radio_driver_t* radio_drivers[]={ -#ifdef HAVE_RADIO_BSDBT848 +#ifdef CONFIG_RADIO_BSDBT848 &radio_driver_bsdbt848, #endif -#ifdef HAVE_RADIO_V4L2 +#ifdef CONFIG_RADIO_V4L2 &radio_driver_v4l2, #endif -#ifdef HAVE_RADIO_V4L +#ifdef CONFIG_RADIO_V4L &radio_driver_v4l, #endif 0 diff --git a/stream/stream_radio.h b/stream/stream_radio.h index 3a258d9085..e77f4aa05e 100644 --- a/stream/stream_radio.h +++ b/stream/stream_radio.h @@ -9,7 +9,7 @@ typedef struct radio_param_s{ /** name of radio device file */ char* device; -#ifdef HAVE_RADIO_BSDBT848 +#ifdef CONFIG_RADIO_BSDBT848 /** minimal allowed frequency */ float freq_min; /** maximal allowed frequency */ diff --git a/stream/tv.c b/stream/tv.c index 1d31f1daf7..58321d5302 100644 --- a/stream/tv.c +++ b/stream/tv.c @@ -49,16 +49,16 @@ extern const tvi_info_t tvi_info_bsdbt848; /** List of drivers in autodetection order */ static const tvi_info_t* tvi_driver_list[]={ -#ifdef HAVE_TV_V4L2 +#ifdef CONFIG_TV_V4L2 &tvi_info_v4l2, #endif -#ifdef HAVE_TV_V4L1 +#ifdef CONFIG_TV_V4L1 &tvi_info_v4l, #endif -#ifdef HAVE_TV_BSDBT848 +#ifdef CONFIG_TV_BSDBT848 &tvi_info_bsdbt848, #endif -#ifdef HAVE_TV_DSHOW +#ifdef CONFIG_TV_DSHOW &tvi_info_dshow, #endif &tvi_info_dummy, @@ -404,12 +404,12 @@ static int open_tv(tvi_handle_t *tvh) /* set some params got from cmdline */ funcs->control(tvh->priv, TVI_CONTROL_SPC_SET_INPUT, &tvh->tv_param->input); -#if defined(HAVE_TV_V4L2) || defined(HAVE_TV_DSHOW) +#if defined(CONFIG_TV_V4L2) || defined(CONFIG_TV_DSHOW) if (0 -#ifdef HAVE_TV_V4L2 +#ifdef CONFIG_TV_V4L2 || (!strcmp(tvh->tv_param->driver, "v4l2") && tvh->tv_param->normid >= 0) #endif -#ifdef HAVE_TV_DSHOW +#ifdef CONFIG_TV_DSHOW || (!strcmp(tvh->tv_param->driver, "dshow") && tvh->tv_param->normid >= 0) #endif ) @@ -418,7 +418,7 @@ static int open_tv(tvi_handle_t *tvh) #endif tv_set_norm(tvh,tvh->tv_param->norm); -#ifdef HAVE_TV_V4L1 +#ifdef CONFIG_TV_V4L1 if ( tvh->tv_param->mjpeg ) { /* set width to expected value */ diff --git a/stream/tvi_dshow.c b/stream/tvi_dshow.c index 3cf574cee4..438ce7288f 100644 --- a/stream/tvi_dshow.c +++ b/stream/tvi_dshow.c @@ -2306,7 +2306,7 @@ static int get_audio_framesize(priv_t * priv) return priv->chains[1]->rbuf->blocksize; } -#ifdef HAVE_TV_TELETEXT +#ifdef CONFIG_TV_TELETEXT static int vbi_get_props(priv_t* priv,tt_stream_props* ptsp) { if(!priv || !ptsp) @@ -2352,7 +2352,7 @@ static void vbi_grabber(priv_t* priv) } free(buf); } -#endif //HAVE_TV_TELETEXT +#endif /* CONFIG_TV_TELETEXT */ /** * \brief fills given buffer with video data (usually one frame) @@ -2397,7 +2397,7 @@ static double grab_video_frame(priv_t * priv, char *buffer, int len) rb->count--; LeaveCriticalSection(rb->pMutex); -#ifdef HAVE_TV_TELETEXT +#ifdef CONFIG_TV_TELETEXT vbi_grabber(priv); #endif return pts; @@ -2588,7 +2588,7 @@ static HRESULT build_audio_chain(priv_t *priv) */ static HRESULT build_vbi_chain(priv_t *priv) { -#ifdef HAVE_TV_TELETEXT +#ifdef CONFIG_TV_TELETEXT HRESULT hr; if(priv->chains[2]->rbuf) @@ -2944,7 +2944,7 @@ static int init(priv_t * priv) OLE_QUERYINTERFACE(priv->pBuilder,IID_IBaseFilter,pBF); OLE_CALL_ARGS(pBF,SetSyncSource,rc); } -#ifdef HAVE_TV_TELETEXT +#ifdef CONFIG_TV_TELETEXT if(vbi_get_props(priv,&(priv->tsp))!=TVI_CONTROL_TRUE) break; #endif @@ -3017,7 +3017,7 @@ static int uninit(priv_t * priv) if (priv->dwRegister) { RemoveFromRot(priv->dwRegister); } -#ifdef HAVE_TV_TELETEXT +#ifdef CONFIG_TV_TELETEXT teletext_control(priv->priv_vbi,TV_VBI_CONTROL_STOP,(void*)1); #endif //stop audio grabber thread @@ -3524,7 +3524,7 @@ static int control(priv_t * priv, int cmd, void *arg) case TVI_CONTROL_IMMEDIATE: priv->immediate_mode = 1; return TVI_CONTROL_TRUE; -#ifdef HAVE_TV_TELETEXT +#ifdef CONFIG_TV_TELETEXT case TVI_CONTROL_VBI_INIT: { void* ptr; diff --git a/stream/tvi_v4l.c b/stream/tvi_v4l.c index 72af5c4d14..bdaab01d61 100644 --- a/stream/tvi_v4l.c +++ b/stream/tvi_v4l.c @@ -141,7 +141,7 @@ typedef struct { long audio_recv_blocks_total; long audio_sent_blocks_total; long mjpeg_bufsize; -#ifdef HAVE_TV_TELETEXT +#ifdef CONFIG_TV_TELETEXT char *vbi_dev; int vbi_fd; int vbi_bufsize; @@ -675,7 +675,7 @@ static int uninit(priv_t *priv) { unsigned long num; -#ifdef HAVE_TV_TELETEXT +#ifdef CONFIG_TV_TELETEXT priv->vbi_shutdown=1; if(priv->vbi_grabber_thread) pthread_join(priv->vbi_grabber_thread, NULL); @@ -781,7 +781,7 @@ static int get_capture_buffer_size(priv_t *priv) return cnt; } -#ifdef HAVE_TV_TELETEXT +#ifdef CONFIG_TV_TELETEXT static int vbi_init(priv_t* priv,char* device) { int vbi_fd=0; @@ -897,7 +897,7 @@ static void *vbi_grabber(void *data) free(buf); return NULL; } -#endif //HAVE_TV_TELETEXT +#endif /* CONFIG_TV_TELETEXT */ static int start(priv_t *priv) { @@ -1111,7 +1111,7 @@ static int start(priv_t *priv) ioctl(priv->video_fd, VIDIOCSAUDIO, &priv->audio[priv->audio_id]); } -#ifdef HAVE_TV_TELETEXT +#ifdef CONFIG_TV_TELETEXT /* start vbi thread */ if(priv->priv_vbi){ priv->vbi_shutdown = 0; @@ -1511,7 +1511,7 @@ static int control(priv_t *priv, int cmd, void *arg) priv->immediate_mode = 1; return TVI_CONTROL_TRUE; } -#ifdef HAVE_TV_TELETEXT +#ifdef CONFIG_TV_TELETEXT case TVI_CONTROL_VBI_INIT: { void* ptr; diff --git a/stream/tvi_v4l2.c b/stream/tvi_v4l2.c index 97bce47754..c7d39841aa 100644 --- a/stream/tvi_v4l2.c +++ b/stream/tvi_v4l2.c @@ -77,7 +77,7 @@ typedef struct { /* video */ char *video_dev; int video_fd; -#ifdef HAVE_TV_TELETEXT +#ifdef CONFIG_TV_TELETEXT char *vbi_dev; int vbi_fd; int vbi_bufsize; @@ -580,7 +580,7 @@ static int get_control(priv_t *priv, struct v4l2_control *control, int val_signe return TVI_CONTROL_TRUE; } -#ifdef HAVE_TV_TELETEXT +#ifdef CONFIG_TV_TELETEXT static int vbi_init(priv_t* priv,char* device) { int vbi_fd=0; @@ -703,7 +703,7 @@ static void *vbi_grabber(void *data) free(buf); return NULL; } -#endif //HAVE_TV_TELETEXT +#endif /* CONFIG_TV_TELETEXT */ static int control(priv_t *priv, int cmd, void *arg) { @@ -1019,7 +1019,7 @@ static int control(priv_t *priv, int cmd, void *arg) if (audio_in_set_samplerate(&priv->audio_in, *(int*)arg) < 0) return TVI_CONTROL_FALSE; // setup_audio_buffer_sizes(priv); return TVI_CONTROL_TRUE; -#ifdef HAVE_TV_TELETEXT +#ifdef CONFIG_TV_TELETEXT case TVI_CONTROL_VBI_INIT: { void* ptr; @@ -1086,7 +1086,7 @@ static int uninit(priv_t *priv) { int i, frames, dropped = 0; -#ifdef HAVE_TV_TELETEXT +#ifdef CONFIG_TV_TELETEXT priv->vbi_shutdown=1; if(priv->vbi_grabber_thread) pthread_join(priv->vbi_grabber_thread, NULL); @@ -1540,7 +1540,7 @@ static int start(priv_t *priv) } } -#ifdef HAVE_TV_TELETEXT +#ifdef CONFIG_TV_TELETEXT /* start vbi thread */ if(priv->priv_vbi){ priv->vbi_shutdown = 0; -- cgit v1.2.3