From 61bce335f7d0fc56a50200a4e47fe743aa5c0aaf Mon Sep 17 00:00:00 2001 From: voroshil Date: Sun, 29 Jul 2007 12:20:25 +0000 Subject: Replacing global variables in radio:// with context-sensitive structure. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23910 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/stream_radio.h | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) (limited to 'stream/stream_radio.h') diff --git a/stream/stream_radio.h b/stream/stream_radio.h index e2a6cd0648..c04ec48483 100644 --- a/stream/stream_radio.h +++ b/stream/stream_radio.h @@ -4,17 +4,35 @@ #define RADIO_CHANNEL_LOWER 1 #define RADIO_CHANNEL_HIGHER 2 -extern char *radio_param_device; -extern char *radio_param_driver; -#ifdef RADIO_BSDBT848_HDR -extern float radio_param_freq_min; -extern float radio_param_freq_max; +typedef struct radio_param_s{ + /** name of radio device file */ + char* device; +#ifdef HAVE_RADIO_BSDBT848 + /** minimal allowed frequency */ + float freq_min; + /** maximal allowed frequency */ + float freq_max; #endif -extern char **radio_param_channels; -extern int radio_param_volume; -extern char* radio_param_adevice; -extern int radio_param_arate; -extern int radio_param_achannels; + /** radio driver (v4l,v4l2) */ + char* driver; + /** channels list (see man page) */ + char** channels; + /** initial volume for radio device */ + int volume; + /** name of audio device file to grab data from */ + char* adevice; + /** audio framerate (please also set -rawaudio rate + parameter to the same value) */ + int arate; + /** number of audio channels */ + int achannels; + /** if channels parameter exist, here will be channel + number otherwise - frequency */ + float freq_channel; + char* capture; +} radio_param_t; + +extern radio_param_t stream_radio_defaults; int radio_set_freq(struct stream_st *stream, float freq); int radio_get_freq(struct stream_st *stream, float* freq); -- cgit v1.2.3