diff options
author | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-08-08 02:04:43 +0300 |
---|---|---|
committer | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-08-08 02:13:09 +0300 |
commit | 17d3e4b36d18f4a653f7c5f6ea2f15fcd3a2f069 (patch) | |
tree | 5d1910a2ab6381f6b4fb0ffc2834f55f7fef7129 /stream | |
parent | 2ba9df3df3d61a7cc1bde9f897bc77eaaf14b383 (diff) | |
parent | af76be6e197382af491fadef3fcf821a721c99f5 (diff) | |
download | mpv-17d3e4b36d18f4a653f7c5f6ea2f15fcd3a2f069.tar.bz2 mpv-17d3e4b36d18f4a653f7c5f6ea2f15fcd3a2f069.tar.xz |
Merge svn changes up to r27441
Conflicts:
cfg-common-opts.h
command.c
configure
input/input.c
libmpcodecs/dec_video.c
libmpcodecs/vd.c
libmpdemux/stheader.h
libvo/sub.c
libvo/video_out.c
libvo/vo_xv.c
libvo/vosub_vidix.c
libvo/x11_common.c
libvo/x11_common.h
mp_core.h
mplayer.c
stream/stream.h
Diffstat (limited to 'stream')
-rw-r--r-- | stream/asf_mmst_streaming.c | 14 | ||||
-rw-r--r-- | stream/audio_in.c | 18 | ||||
-rw-r--r-- | stream/audio_in.h | 6 | ||||
-rw-r--r-- | stream/cdd.h | 4 | ||||
-rw-r--r-- | stream/dvb_tune.c | 38 | ||||
-rw-r--r-- | stream/dvbin.h | 2 | ||||
-rw-r--r-- | stream/stream.c | 24 | ||||
-rw-r--r-- | stream/stream.h | 4 | ||||
-rw-r--r-- | stream/stream_cdda.c | 16 | ||||
-rw-r--r-- | stream/stream_dvb.c | 8 | ||||
-rw-r--r-- | stream/stream_radio.c | 34 | ||||
-rw-r--r-- | stream/stream_radio.h | 2 | ||||
-rw-r--r-- | stream/tv.c | 16 | ||||
-rw-r--r-- | stream/tvi_dshow.c | 14 | ||||
-rw-r--r-- | stream/tvi_v4l.c | 14 | ||||
-rw-r--r-- | stream/tvi_v4l2.c | 14 |
16 files changed, 114 insertions, 114 deletions
diff --git a/stream/asf_mmst_streaming.c b/stream/asf_mmst_streaming.c index 6301711176..aaf43ff49a 100644 --- a/stream/asf_mmst_streaming.c +++ b/stream/asf_mmst_streaming.c @@ -46,10 +46,10 @@ #endif #ifndef CONFIG_SETLOCALE -#undef HAVE_ICONV +#undef CONFIG_ICONV #endif -#ifdef HAVE_ICONV +#ifdef CONFIG_ICONV #include <iconv.h> #ifdef HAVE_LANGINFO #include <langinfo.h> @@ -143,13 +143,13 @@ static void send_command (int s, int command, uint32_t switches, } } -#ifdef HAVE_ICONV +#ifdef CONFIG_ICONV static iconv_t url_conv; #endif static void string_utf16(char *dest, char *src, int len) { int i; -#ifdef HAVE_ICONV +#ifdef CONFIG_ICONV size_t len1, len2; char *ip, *op; @@ -172,7 +172,7 @@ static void string_utf16(char *dest, char *src, int len) { /* trailing zeroes */ dest[i*2] = 0; dest[i*2+1] = 0; -#ifdef HAVE_ICONV +#ifdef CONFIG_ICONV } #endif } @@ -575,7 +575,7 @@ int asf_mmst_streaming_start(stream_t *stream) * */ /* prepare for the url encoding conversion */ -#ifdef HAVE_ICONV +#ifdef CONFIG_ICONV #ifdef HAVE_LANGINFO url_conv = iconv_open("UTF-16LE",nl_langinfo(CODESET)); #else @@ -691,7 +691,7 @@ int asf_mmst_streaming_start(stream_t *stream) packet_length1 = packet_length; mp_msg(MSGT_NETWORK,MSGL_INFO,"mmst packet_length = %d\n", packet_length); -#ifdef HAVE_ICONV +#ifdef CONFIG_ICONV if (url_conv != (iconv_t)(-1)) iconv_close(url_conv); #endif diff --git a/stream/audio_in.c b/stream/audio_in.c index 2b2497a8d9..45b1e9b79d 100644 --- a/stream/audio_in.c +++ b/stream/audio_in.c @@ -23,7 +23,7 @@ int audio_in_init(audio_in_t *ai, int type) ai->samplesize = -1; switch (ai->type) { -#if defined(HAVE_ALSA9) || defined(HAVE_ALSA1X) +#ifdef CONFIG_ALSA case AUDIO_IN_ALSA: ai->alsa.handle = NULL; ai->alsa.log = NULL; @@ -45,7 +45,7 @@ int audio_in_setup(audio_in_t *ai) { switch (ai->type) { -#if defined(HAVE_ALSA9) || defined(HAVE_ALSA1X) +#ifdef CONFIG_ALSA case AUDIO_IN_ALSA: if (ai_alsa_init(ai) < 0) return -1; ai->setup = 1; @@ -65,7 +65,7 @@ int audio_in_setup(audio_in_t *ai) int audio_in_set_samplerate(audio_in_t *ai, int rate) { switch (ai->type) { -#if defined(HAVE_ALSA9) || defined(HAVE_ALSA1X) +#ifdef CONFIG_ALSA case AUDIO_IN_ALSA: ai->req_samplerate = rate; if (!ai->setup) return 0; @@ -87,7 +87,7 @@ int audio_in_set_samplerate(audio_in_t *ai, int rate) int audio_in_set_channels(audio_in_t *ai, int channels) { switch (ai->type) { -#if defined(HAVE_ALSA9) || defined(HAVE_ALSA1X) +#ifdef CONFIG_ALSA case AUDIO_IN_ALSA: ai->req_channels = channels; if (!ai->setup) return 0; @@ -108,12 +108,12 @@ int audio_in_set_channels(audio_in_t *ai, int channels) int audio_in_set_device(audio_in_t *ai, char *device) { -#if defined(HAVE_ALSA9) || defined(HAVE_ALSA1X) +#ifdef CONFIG_ALSA int i; #endif if (ai->setup) return -1; switch (ai->type) { -#if defined(HAVE_ALSA9) || defined(HAVE_ALSA1X) +#ifdef CONFIG_ALSA case AUDIO_IN_ALSA: if (ai->alsa.device) free(ai->alsa.device); ai->alsa.device = strdup(device); @@ -138,7 +138,7 @@ int audio_in_uninit(audio_in_t *ai) { if (ai->setup) { switch (ai->type) { -#if defined(HAVE_ALSA9) || defined(HAVE_ALSA1X) +#ifdef CONFIG_ALSA case AUDIO_IN_ALSA: if (ai->alsa.log) snd_output_close(ai->alsa.log); @@ -162,7 +162,7 @@ int audio_in_uninit(audio_in_t *ai) int audio_in_start_capture(audio_in_t *ai) { switch (ai->type) { -#if defined(HAVE_ALSA9) || defined(HAVE_ALSA1X) +#ifdef CONFIG_ALSA case AUDIO_IN_ALSA: return snd_pcm_start(ai->alsa.handle); #endif @@ -180,7 +180,7 @@ int audio_in_read_chunk(audio_in_t *ai, unsigned char *buffer) int ret; switch (ai->type) { -#if defined(HAVE_ALSA9) || defined(HAVE_ALSA1X) +#ifdef CONFIG_ALSA case AUDIO_IN_ALSA: ret = snd_pcm_readi(ai->alsa.handle, buffer, ai->alsa.chunk_size); if (ret != ai->alsa.chunk_size) { diff --git a/stream/audio_in.h b/stream/audio_in.h index 735e9f4e0e..855d613964 100644 --- a/stream/audio_in.h +++ b/stream/audio_in.h @@ -6,7 +6,7 @@ #include "config.h" -#if defined(HAVE_ALSA9) || defined(HAVE_ALSA1X) +#ifdef CONFIG_ALSA #include <alsa/asoundlib.h> typedef struct { @@ -43,7 +43,7 @@ typedef struct int bytes_per_sample; int samplesize; -#if defined(HAVE_ALSA9) || defined(HAVE_ALSA1X) +#ifdef CONFIG_ALSA ai_alsa_t alsa; #endif #ifdef CONFIG_OSS_AUDIO @@ -60,7 +60,7 @@ int audio_in_uninit(audio_in_t *ai); int audio_in_start_capture(audio_in_t *ai); int audio_in_read_chunk(audio_in_t *ai, unsigned char *buffer); -#if defined(HAVE_ALSA9) || defined(HAVE_ALSA1X) +#ifdef CONFIG_ALSA int ai_alsa_setup(audio_in_t *ai); int ai_alsa_init(audio_in_t *ai); int ai_alsa_xrun(audio_in_t *ai); diff --git a/stream/cdd.h b/stream/cdd.h index 10fb64763f..1208684769 100644 --- a/stream/cdd.h +++ b/stream/cdd.h @@ -2,7 +2,7 @@ #define MPLAYER_CDD_H #include "config.h" -#ifndef HAVE_LIBCDIO +#ifndef CONFIG_LIBCDIO #include <cdda_interface.h> #include <cdda_paranoia.h> #else @@ -54,7 +54,7 @@ typedef struct { } cd_info_t; typedef struct { -#ifndef HAVE_LIBCDIO +#ifndef CONFIG_LIBCDIO cdrom_drive* cd; cdrom_paranoia* cdp; #else 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 <errno.h> #include "config.h" -#ifdef HAVE_DVB_HEAD +#ifdef CONFIG_DVB_HEAD #include <linux/dvb/dmx.h> #include <linux/dvb/frontend.h> #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 <linux/dvb/dmx.h> #include <linux/dvb/frontend.h> #include <linux/dvb/version.h> diff --git a/stream/stream.c b/stream/stream.c index af43b6da69..47d55be71f 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -67,19 +67,19 @@ 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 +#ifdef CONFIG_CDDA &stream_info_cdda, #endif -#ifdef MPLAYER_NETWORK +#ifdef CONFIG_NETWORK &stream_info_netstream, &stream_info_http1, &stream_info_asf, &stream_info_pnm, &stream_info_rtsp, -#ifdef STREAMING_LIVE555 +#ifdef CONFIG_LIVE555 &stream_info_sdp, &stream_info_rtsp_sip, #endif @@ -87,7 +87,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 @@ -96,16 +96,16 @@ 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 +#ifdef CONFIG_FTP &stream_info_ftp, #endif -#ifdef HAVE_VSTREAM +#ifdef CONFIG_VSTREAM &stream_info_vstream, #endif -#ifdef LIBSMBCLIENT +#ifdef CONFIG_LIBSMBCLIENT &stream_info_smb, #endif &stream_info_cue, @@ -151,7 +151,7 @@ static stream_t *open_stream_plugin(const stream_info_t *sinfo, char *filename, s->flags |= mode; *ret = sinfo->open(s,mode,arg,file_format); if((*ret) != STREAM_OK) { -#ifdef MPLAYER_NETWORK +#ifdef CONFIG_NETWORK if (*ret == STREAM_REDIRECTED && redirected_url) { if (s->streaming_ctrl && s->streaming_ctrl->url && s->streaming_ctrl->url->url) @@ -245,7 +245,7 @@ int stream_fill_buffer(stream_t *s){ if (/*s->fd == NULL ||*/ s->eof) { s->buf_pos = s->buf_len = 0; return 0; } switch(s->type){ case STREAMTYPE_STREAM: -#ifdef MPLAYER_NETWORK +#ifdef CONFIG_NETWORK if( s->streaming_ctrl!=NULL && s->streaming_ctrl->streaming_read ) { len=s->streaming_ctrl->streaming_read(s->fd,s->buffer,STREAM_BUFFER_SIZE, s->streaming_ctrl);break; } else { @@ -312,7 +312,7 @@ if(newpos==0 || newpos!=s->pos){ // Some streaming protocol allow to seek backward and forward // A function call that return -1 can tell that the protocol // doesn't support seeking. -#ifdef MPLAYER_NETWORK +#ifdef CONFIG_NETWORK if(s->seek) { // new stream seek is much cleaner than streaming_ctrl one if(!s->seek(s,newpos)) { mp_msg(MSGT_STREAM,MSGL_ERR, "Seek failed\n"); diff --git a/stream/stream.h b/stream/stream.h index e058dcfaf2..a2f78307de 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -65,7 +65,7 @@ #define STREAM_CTRL_GET_ANGLE 10 #define STREAM_CTRL_SET_ANGLE 11 -#ifdef MPLAYER_NETWORK +#ifdef CONFIG_NETWORK #include "network.h" #endif @@ -113,7 +113,7 @@ typedef struct stream { void* priv; // used for DVD, TV, RTSP etc char* url; // strdup() of filename/url struct MPOpts *opts; -#ifdef MPLAYER_NETWORK +#ifdef CONFIG_NETWORK streaming_ctrl_t *streaming_ctrl; #endif unsigned char buffer[STREAM_BUFFER_SIZE>VCD_SECTOR_SIZE?STREAM_BUFFER_SIZE:VCD_SECTOR_SIZE]; diff --git a/stream/stream_cdda.c b/stream/stream_cdda.c index 00c8a4934e..fb6f2e9358 100644 --- a/stream/stream_cdda.c +++ b/stream/stream_cdda.c @@ -147,7 +147,7 @@ static int open_cdda(stream_t *st,int m, void* opts, int* file_format) { struct cdda_params* p = (struct cdda_params*)opts; int mode = p->paranoia_mode; int offset = p->toc_offset; -#ifndef HAVE_LIBCDIO +#ifndef CONFIG_LIBCDIO cdrom_drive* cdd = NULL; #else cdrom_drive_t* cdd = NULL; @@ -171,7 +171,7 @@ static int open_cdda(stream_t *st,int m, void* opts, int* file_format) { p->device = strdup(DEFAULT_CDROM_DEVICE); } -#ifdef HAVE_CDDB +#ifdef CONFIG_CDDB // cdd_identify returns -1 if it cannot read the TOC, // in which case there is no point in calling cddb_resolve if(cdd_identify(p->device) >= 0 && strncmp(st->url,"cddb",4) == 0) { @@ -183,7 +183,7 @@ static int open_cdda(stream_t *st,int m, void* opts, int* file_format) { } #endif -#ifndef HAVE_LIBCDIO +#ifndef CONFIG_LIBCDIO if(p->generic_dev) cdd = cdda_identify_scsi(p->generic_dev,p->device,0,NULL); else @@ -205,7 +205,7 @@ static int open_cdda(stream_t *st,int m, void* opts, int* file_format) { if(p->sector_size) { cdd->nsectors = p->sector_size; -#ifndef HAVE_LIBCDIO +#ifndef CONFIG_LIBCDIO cdd->bigbuff = p->sector_size * CD_FRAMESIZE_RAW; #endif } @@ -283,7 +283,7 @@ static int open_cdda(stream_t *st,int m, void* opts, int* file_format) { if(p->no_skip) mode |= PARANOIA_MODE_NEVERSKIP; -#ifndef HAVE_LIBCDIO +#ifndef CONFIG_LIBCDIO paranoia_modeset(cdd, mode); if(p->search_overlap >= 0) @@ -298,7 +298,7 @@ static int open_cdda(stream_t *st,int m, void* opts, int* file_format) { paranoia_seek(priv->cdp,priv->start_sector,SEEK_SET); priv->sector = priv->start_sector; -#ifdef HAVE_CDDB +#ifdef CONFIG_CDDB if(cddb_info) { cd_info_free(cd_info); priv->cd_info = cddb_info; @@ -324,7 +324,7 @@ static int open_cdda(stream_t *st,int m, void* opts, int* file_format) { return STREAM_OK; } -#ifndef HAVE_LIBCDIO +#ifndef CONFIG_LIBCDIO static void cdparanoia_callback(long inpos, int function) { #else static void cdparanoia_callback(long int inpos, paranoia_cb_mode_t function) { @@ -438,7 +438,7 @@ const stream_info_t stream_info_cdda = { "", open_cdda, { "cdda", -#ifdef HAVE_CDDB +#ifdef CONFIG_CDDB "cddb", #endif NULL }, 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 68c5a29b45..f0b9745a5f 100644 --- a/stream/stream_radio.c +++ b/stream/stream_radio.c @@ -35,21 +35,21 @@ #include <errno.h> #include <unistd.h> -#ifdef HAVE_RADIO_BSDBT848 +#ifdef CONFIG_RADIO_BSDBT848 #include <sys/param.h> #ifdef IOCTL_BT848_H_NAME #include IOCTL_BT848_H_NAME #endif -#else // HAVE_RADIO_BSDBT848 +#else /* CONFIG_RADIO_BSDBT848 */ #include <linux/types.h> -#ifdef HAVE_RADIO_V4L2 +#ifdef CONFIG_RADIO_V4L2 #include <linux/videodev2.h> #endif -#ifdef HAVE_RADIO_V4L +#ifdef CONFIG_RADIO_V4L #include <linux/videodev.h> #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); @@ -715,7 +715,7 @@ static int read_chunk(audio_in_t *ai, unsigned char *buffer) int ret; switch (ai->type) { -#if defined(HAVE_ALSA9) || defined(HAVE_ALSA1X) +#ifdef CONFIG_ALSA case AUDIO_IN_ALSA: //device opened in non-blocking mode ret = snd_pcm_readi(ai->alsa.handle, buffer, ai->alsa.chunk_size); @@ -836,7 +836,7 @@ static int init_audio(radio_priv_t *priv) priv->do_capture=1; mp_msg(MSGT_RADIO,MSGL_V,MSGTR_RADIO_CaptureStarting); -#if defined(HAVE_ALSA9) || defined(HAVE_ALSA1X) +#ifdef CONFIG_ALSA while ((tmp = strrchr(priv->radio_param->adevice, '='))){ tmp[0] = ':'; //adevice option looks like ALSA device name. Switching to ALSA @@ -862,7 +862,7 @@ static int init_audio(radio_priv_t *priv) if(is_oss) ioctl(priv->audio_in.oss.audio_fd, SNDCTL_DSP_NONBLOCK, 0); #endif -#if defined(HAVE_ALSA9) || defined(HAVE_ALSA1X) +#ifdef CONFIG_ALSA if(!is_oss) snd_pcm_nonblock(priv->audio_in.alsa.handle,1); #endif @@ -1080,13 +1080,13 @@ static int fill_buffer_s(struct stream *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 1c76cb9cc7..69066970e3 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..8979691776 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; @@ -627,7 +627,7 @@ static int init(priv_t *priv) /* audio init */ if (!priv->tv_param->noaudio) { -#if defined(HAVE_ALSA9) || defined(HAVE_ALSA1X) +#ifdef CONFIG_ALSA if (priv->tv_param->alsa) audio_in_init(&priv->audio_in, AUDIO_IN_ALSA); else @@ -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 |