summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
Diffstat (limited to 'stream')
-rw-r--r--stream/asf_mmst_streaming.c20
-rw-r--r--stream/audio_in.c16
-rw-r--r--stream/audio_in.h6
-rw-r--r--stream/librtsp/rtsp_rtp.c4
-rw-r--r--stream/network.c2
-rw-r--r--stream/stream.c12
-rw-r--r--stream/stream.h2
-rw-r--r--stream/stream_dvd.h2
-rw-r--r--stream/stream_dvd_common.c2
-rw-r--r--stream/stream_dvd_common.h2
-rw-r--r--stream/stream_radio.c24
-rw-r--r--stream/tcp.c4
-rw-r--r--stream/tvi_bsdbt848.c8
-rw-r--r--stream/udp.c4
14 files changed, 54 insertions, 54 deletions
diff --git a/stream/asf_mmst_streaming.c b/stream/asf_mmst_streaming.c
index 0ab2337a10..2ce21f481a 100644
--- a/stream/asf_mmst_streaming.c
+++ b/stream/asf_mmst_streaming.c
@@ -45,13 +45,13 @@
#include <winsock2.h>
#endif
-#ifndef USE_SETLOCALE
-#undef USE_ICONV
+#ifndef CONFIG_SETLOCALE
+#undef CONFIG_ICONV
#endif
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
#include <iconv.h>
-#ifdef USE_LANGINFO
+#ifdef CONFIG_LANGINFO
#include <langinfo.h>
#endif
#endif
@@ -143,13 +143,13 @@ static void send_command (int s, int command, uint32_t switches,
}
}
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
static iconv_t url_conv;
#endif
static void string_utf16(char *dest, char *src, int len) {
int i;
-#ifdef USE_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 USE_ICONV
+#ifdef CONFIG_ICONV
}
#endif
}
@@ -575,8 +575,8 @@ int asf_mmst_streaming_start(stream_t *stream)
* */
/* prepare for the url encoding conversion */
-#ifdef USE_ICONV
-#ifdef USE_LANGINFO
+#ifdef CONFIG_ICONV
+#ifdef CONFIG_LANGINFO
url_conv = iconv_open("UTF-16LE",nl_langinfo(CODESET));
#else
url_conv = iconv_open("UTF-16LE", NULL);
@@ -690,7 +690,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 USE_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 03259614a4..2b2497a8d9 100644
--- a/stream/audio_in.c
+++ b/stream/audio_in.c
@@ -30,7 +30,7 @@ int audio_in_init(audio_in_t *ai, int type)
ai->alsa.device = strdup("default");
return 0;
#endif
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
case AUDIO_IN_OSS:
ai->oss.audio_fd = -1;
ai->oss.device = strdup("/dev/dsp");
@@ -51,7 +51,7 @@ int audio_in_setup(audio_in_t *ai)
ai->setup = 1;
return 0;
#endif
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
case AUDIO_IN_OSS:
if (ai_oss_init(ai) < 0) return -1;
ai->setup = 1;
@@ -72,7 +72,7 @@ int audio_in_set_samplerate(audio_in_t *ai, int rate)
if (ai_alsa_setup(ai) < 0) return -1;
return ai->samplerate;
#endif
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
case AUDIO_IN_OSS:
ai->req_samplerate = rate;
if (!ai->setup) return 0;
@@ -94,7 +94,7 @@ int audio_in_set_channels(audio_in_t *ai, int channels)
if (ai_alsa_setup(ai) < 0) return -1;
return ai->channels;
#endif
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
case AUDIO_IN_OSS:
ai->req_channels = channels;
if (!ai->setup) return 0;
@@ -123,7 +123,7 @@ int audio_in_set_device(audio_in_t *ai, char *device)
}
return 0;
#endif
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
case AUDIO_IN_OSS:
if (ai->oss.device) free(ai->oss.device);
ai->oss.device = strdup(device);
@@ -148,7 +148,7 @@ int audio_in_uninit(audio_in_t *ai)
ai->setup = 0;
return 0;
#endif
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
case AUDIO_IN_OSS:
close(ai->oss.audio_fd);
ai->setup = 0;
@@ -166,7 +166,7 @@ int audio_in_start_capture(audio_in_t *ai)
case AUDIO_IN_ALSA:
return snd_pcm_start(ai->alsa.handle);
#endif
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
case AUDIO_IN_OSS:
return 0;
#endif
@@ -200,7 +200,7 @@ int audio_in_read_chunk(audio_in_t *ai, unsigned char *buffer)
}
return ret;
#endif
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
case AUDIO_IN_OSS:
ret = read(ai->oss.audio_fd, buffer, ai->blocksize);
if (ret != ai->blocksize) {
diff --git a/stream/audio_in.h b/stream/audio_in.h
index 97bd534433..735e9f4e0e 100644
--- a/stream/audio_in.h
+++ b/stream/audio_in.h
@@ -19,7 +19,7 @@ typedef struct {
} ai_alsa_t;
#endif
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
typedef struct {
char *device;
@@ -46,7 +46,7 @@ typedef struct
#if defined(HAVE_ALSA9) || defined(HAVE_ALSA1X)
ai_alsa_t alsa;
#endif
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
ai_oss_t oss;
#endif
} audio_in_t;
@@ -66,7 +66,7 @@ int ai_alsa_init(audio_in_t *ai);
int ai_alsa_xrun(audio_in_t *ai);
#endif
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
int ai_oss_set_samplerate(audio_in_t *ai);
int ai_oss_set_channels(audio_in_t *ai);
int ai_oss_init(audio_in_t *ai);
diff --git a/stream/librtsp/rtsp_rtp.c b/stream/librtsp/rtsp_rtp.c
index 38228cf59e..beda0dac4f 100644
--- a/stream/librtsp/rtsp_rtp.c
+++ b/stream/librtsp/rtsp_rtp.c
@@ -297,7 +297,7 @@ rtp_connect (char *hostname, int port)
sin.sin_addr.s_addr = htonl (INADDR_ANY);
else
#ifndef HAVE_WINSOCK2
-#ifdef USE_ATON
+#ifdef CONFIG_ATON
inet_aton (hostname, &sin.sin_addr);
#else
inet_pton (AF_INET, hostname, &sin.sin_addr);
@@ -386,7 +386,7 @@ is_multicast_address (char *addr)
sin.sin_family = AF_INET;
#ifndef HAVE_WINSOCK2
-#ifdef USE_ATON
+#ifdef CONFIG_ATON
inet_aton (addr, &sin.sin_addr);
#else
inet_pton (AF_INET, addr, &sin.sin_addr);
diff --git a/stream/network.c b/stream/network.c
index 6874d9a9ea..34f3905734 100644
--- a/stream/network.c
+++ b/stream/network.c
@@ -87,7 +87,7 @@ const mime_struct_t mime_type_table[] = {
// NullSoft Streaming Video
{ "video/nsv", DEMUXER_TYPE_NSV},
{ "misc/ultravox", DEMUXER_TYPE_NSV},
-#ifdef USE_LIBAVFORMAT
+#ifdef CONFIG_LIBAVFORMAT
// Flash Video
{ "video/x-flv", DEMUXER_TYPE_LAVF},
#endif
diff --git a/stream/stream.c b/stream/stream.c
index c95dabefb0..533bf7cd2e 100644
--- a/stream/stream.c
+++ b/stream/stream.c
@@ -88,10 +88,10 @@ static const stream_info_t* const auto_open_streams[] = {
#ifdef HAS_DVBIN_SUPPORT
&stream_info_dvb,
#endif
-#ifdef USE_TV
+#ifdef CONFIG_TV
&stream_info_tv,
#endif
-#ifdef USE_RADIO
+#ifdef CONFIG_RADIO
&stream_info_radio,
#endif
#ifdef HAVE_PVR
@@ -107,11 +107,11 @@ static const stream_info_t* const auto_open_streams[] = {
&stream_info_smb,
#endif
&stream_info_cue,
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
&stream_info_ifo,
&stream_info_dvd,
#endif
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
&stream_info_dvdnav,
#endif
@@ -381,7 +381,7 @@ void stream_reset(stream_t *s){
int stream_control(stream_t *s, int cmd, void *arg){
if(!s->control) return STREAM_UNSUPPORTED;
-#ifdef USE_STREAM_CACHE
+#ifdef CONFIG_STREAM_CACHE
if (s->cache_pid)
return cache_do_control(s, cmd, arg);
#endif
@@ -431,7 +431,7 @@ stream_t* new_stream(int fd,int type){
void free_stream(stream_t *s){
// printf("\n*** free_stream() called ***\n");
-#ifdef USE_STREAM_CACHE
+#ifdef CONFIG_STREAM_CACHE
if(s->cache_pid) {
cache_uninit(s);
}
diff --git a/stream/stream.h b/stream/stream.h
index e53d0f971b..d6ba8b2274 100644
--- a/stream/stream.h
+++ b/stream/stream.h
@@ -118,7 +118,7 @@ typedef struct stream_st {
unsigned char buffer[STREAM_BUFFER_SIZE>VCD_SECTOR_SIZE?STREAM_BUFFER_SIZE:VCD_SECTOR_SIZE];
} stream_t;
-#ifdef USE_STREAM_CACHE
+#ifdef CONFIG_STREAM_CACHE
int stream_enable_cache(stream_t *stream,int size,int min,int prefill);
int cache_stream_fill_buffer(stream_t *s);
int cache_stream_seek_long(stream_t *s,off_t pos);
diff --git a/stream/stream_dvd.h b/stream/stream_dvd.h
index 9a80ea2f42..3532646dbb 100644
--- a/stream/stream_dvd.h
+++ b/stream/stream_dvd.h
@@ -3,7 +3,7 @@
#include "config.h"
#include <stdint.h>
-#ifdef USE_DVDREAD_INTERNAL
+#ifdef CONFIG_DVDREAD_INTERNAL
#include "dvdread/dvd_reader.h"
#include "dvdread/ifo_types.h"
#include "dvdread/ifo_read.h"
diff --git a/stream/stream_dvd_common.c b/stream/stream_dvd_common.c
index 5b08107dae..ffaf1d490c 100644
--- a/stream/stream_dvd_common.c
+++ b/stream/stream_dvd_common.c
@@ -1,6 +1,6 @@
#include "config.h"
#include <inttypes.h>
-#ifdef USE_DVDREAD_INTERNAL
+#ifdef CONFIG_DVDREAD_INTERNAL
#include <dvdread/ifo_types.h>
#else
#include <libdvdread/ifo_types.h>
diff --git a/stream/stream_dvd_common.h b/stream/stream_dvd_common.h
index b1d31d1dde..5d7953571d 100644
--- a/stream/stream_dvd_common.h
+++ b/stream/stream_dvd_common.h
@@ -3,7 +3,7 @@
#include "config.h"
#include <inttypes.h>
-#ifdef USE_DVDREAD_INTERNAL
+#ifdef CONFIG_DVDREAD_INTERNAL
#include <dvdread/ifo_types.h>
#else
#include <libdvdread/ifo_types.h>
diff --git a/stream/stream_radio.c b/stream/stream_radio.c
index 8d1a897a50..642e55a5f7 100644
--- a/stream/stream_radio.c
+++ b/stream/stream_radio.c
@@ -66,7 +66,7 @@
#include "stream_radio.h"
#include "libavutil/avstring.h"
-#ifdef USE_RADIO_CAPTURE
+#ifdef CONFIG_RADIO_CAPTURE
#include "audio_in.h"
#ifdef HAVE_SYS_SOUNDCARD_H
@@ -117,7 +117,7 @@ typedef struct radio_priv_s {
float rangehigh; ///< highest tunable frequency in MHz
const struct radio_driver_s* driver;
int old_snd_volume;
-#ifdef USE_RADIO_CAPTURE
+#ifdef CONFIG_RADIO_CAPTURE
volatile int do_capture; ///< is capture enabled
audio_in_t audio_in;
unsigned char* audio_ringbuffer;
@@ -156,7 +156,7 @@ static const struct m_struct_st stream_opts = {
};
static void close_s(struct stream_st * stream);
-#ifdef USE_RADIO_CAPTURE
+#ifdef CONFIG_RADIO_CAPTURE
static int clear_buffer(radio_priv_t* priv);
#endif
@@ -665,7 +665,7 @@ static inline int set_frequency(radio_priv_t* priv,float frequency){
if(priv->driver->set_frequency(priv,frequency)!=STREAM_OK)
return STREAM_ERROR;
-#ifdef USE_RADIO_CAPTURE
+#ifdef CONFIG_RADIO_CAPTURE
if(clear_buffer(priv)!=STREAM_OK){
mp_msg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_ClearBufferFailed,strerror(errno));
return STREAM_ERROR;
@@ -684,7 +684,7 @@ static inline int get_volume(radio_priv_t* priv,int* volume){
}
-#ifndef USE_RADIO_CAPTURE
+#ifndef CONFIG_RADIO_CAPTURE
/*****************************************************************
* \brief stub, if capture disabled at compile-time
* \return STREAM_OK
@@ -737,7 +737,7 @@ static int read_chunk(audio_in_t *ai, unsigned char *buffer)
}
return ret;
#endif
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
case AUDIO_IN_OSS:
{
int bt=0;
@@ -858,7 +858,7 @@ static int init_audio(radio_priv_t *priv)
mp_msg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_AudioInSetupFailed, strerror(errno));
return STREAM_ERROR;
}
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
if(is_oss)
ioctl(priv->audio_in.oss.audio_fd, SNDCTL_DSP_NONBLOCK, 0);
#endif
@@ -890,7 +890,7 @@ static int init_audio(radio_priv_t *priv)
return STREAM_OK;
}
-#endif //USE_RADIO_CAPTURE
+#endif /* CONFIG_RADIO_CAPTURE */
/*-------------------------------------------------------------------------
for call from mplayer.c
@@ -1062,7 +1062,7 @@ char* radio_get_channel_name(struct stream_st *stream){
static int fill_buffer_s(struct stream_st *s, char* buffer, int max_len){
int len=max_len;
-#ifdef USE_RADIO_CAPTURE
+#ifdef CONFIG_RADIO_CAPTURE
radio_priv_t* priv=(radio_priv_t*)s->priv;
if (priv->do_capture){
@@ -1115,7 +1115,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
priv->radio_param=opts;
-#ifdef USE_RADIO_CAPTURE
+#ifdef CONFIG_RADIO_CAPTURE
if (priv->radio_param->capture && strncmp("capture",priv->radio_param->capture,7)==0)
priv->do_capture=1;
else
@@ -1199,7 +1199,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
return STREAM_ERROR;
}
-#if defined(USE_RADIO_CAPTURE) && defined(USE_STREAM_CACHE)
+#if defined(CONFIG_RADIO_CAPTURE) && defined(CONFIG_STREAM_CACHE)
if(priv->do_capture){
//5 second cache
if(!stream_enable_cache(stream,5*priv->audio_in.samplerate*priv->audio_in.channels*
@@ -1225,7 +1225,7 @@ static void close_s(struct stream_st * stream){
radio_channels_t * tmp;
if (!priv) return;
-#ifdef USE_RADIO_CAPTURE
+#ifdef CONFIG_RADIO_CAPTURE
if(priv->audio_ringbuffer){
free(priv->audio_ringbuffer);
priv->audio_ringbuffer=NULL;
diff --git a/stream/tcp.c b/stream/tcp.c
index d822d95107..f4c71f651d 100644
--- a/stream/tcp.c
+++ b/stream/tcp.c
@@ -116,7 +116,7 @@ connect2Server_with_af(char *host, int port, int af,int verb) {
memset(&server_address, 0, sizeof(server_address));
#ifndef HAVE_WINSOCK2
-#ifdef USE_ATON
+#ifdef CONFIG_ATON
if (inet_aton(host, our_s_addr)!=1)
#else
if (inet_pton(af, host, our_s_addr)!=1)
@@ -164,7 +164,7 @@ connect2Server_with_af(char *host, int port, int af,int verb) {
return TCP_ERROR_FATAL;
}
-#if defined(USE_ATON) || defined(HAVE_WINSOCK2)
+#if defined(CONFIG_ATON) || defined(HAVE_WINSOCK2)
strncpy( buf, inet_ntoa( *((struct in_addr*)our_s_addr) ), 255);
#else
inet_ntop(af, our_s_addr, buf, 255);
diff --git a/stream/tvi_bsdbt848.c b/stream/tvi_bsdbt848.c
index 1ad7778f37..1926a5d45b 100644
--- a/stream/tvi_bsdbt848.c
+++ b/stream/tvi_bsdbt848.c
@@ -39,7 +39,7 @@
#include <errno.h>
#include <sys/param.h>
-#ifdef USE_SUN_AUDIO
+#ifdef CONFIG_SUN_AUDIO
#include <sys/audioio.h>
#endif
@@ -206,7 +206,7 @@ static tvi_handle_t *tvi_init_bsdbt848(tv_param_t* tv_param)
/* set audio device name */
if (!tv_param->adevice)
-#ifdef USE_SUN_AUDIO
+#ifdef CONFIG_SUN_AUDIO
priv->dspdev = strdup("/dev/sound");
#else
priv->dspdev = strdup("/dev/dsp");
@@ -845,13 +845,13 @@ return priv->dspbytesread * 1.0 / priv->dsprate;
static int get_audio_framesize(priv_t *priv)
{
int bytesavail;
-#ifdef USE_SUN_AUDIO
+#ifdef CONFIG_SUN_AUDIO
struct audio_info auinf;
#endif
if(priv->dspready == FALSE) return 0;
-#ifdef USE_SUN_AUDIO
+#ifdef CONFIG_SUN_AUDIO
if(ioctl(priv->dspfd, AUDIO_GETINFO, &auinf) < 0)
{
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "AUDIO_GETINFO", strerror(errno));
diff --git a/stream/udp.c b/stream/udp.c
index 9fbd40ed81..7ad2542ba1 100644
--- a/stream/udp.c
+++ b/stream/udp.c
@@ -92,11 +92,11 @@ udp_open_socket (URL_t *url)
else
{
#ifndef HAVE_WINSOCK2
-#ifdef USE_ATON
+#ifdef CONFIG_ATON
inet_aton (url->hostname, &server_address.sin_addr);
#else
inet_pton (AF_INET, url->hostname, &server_address.sin_addr);
-#endif /* USE_ATON */
+#endif /* CONFIG_ATON */
#else
server_address.sin_addr.s_addr = htonl(INADDR_ANY);
#endif /* HAVE_WINSOCK2 */