add public wrapper for get_frequency

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20984 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
voroshil 2006-11-17 14:36:13 +00:00
parent c4c48f002a
commit acce4eff13
2 changed files with 16 additions and 0 deletions

View File

@ -806,6 +806,21 @@ static int init_audio(radio_priv_t *priv)
/*-------------------------------------------------------------------------
for call from mplayer.c
--------------------------------------------------------------------------*/
/*****************************************************************
* \brief public wrapper for get_frequency
* \parameter frequency pointer to float, which will contain frequency in MHz
* \return 1 if success,0 - otherwise
*/
int radio_get_freq(struct stream_st *stream, float* frequency){
radio_priv_t* priv=(radio_priv_t*)stream->priv;
if (!frequency)
return 0;
if (get_frequency(priv,frequency)!=STREAM_OK){
return 0;
}
return 1;
}
/*****************************************************************
* \brief public wrapper for set_frequency
* \parameter frequency frequency in MHz

View File

@ -14,6 +14,7 @@ extern int radio_param_arate;
extern int radio_param_achannels;
int radio_set_freq(struct stream_st *stream, float freq);
int radio_get_freq(struct stream_st *stream, float* freq);
char* radio_get_channel_name(struct stream_st *stream);
int radio_set_channel(struct stream_st *stream, char *channel);
int radio_step_channel(struct stream_st *stream, int direction);