# HG changeset patch # User voroshil # Date 1163774173 0 # Node ID 1e6ebb9e49eb03933dcd9a56ac0f297ae95860eb # Parent 460da4c85cb4f5d52e735c7293de23187bcb0acb add public wrapper for get_frequency diff -r 460da4c85cb4 -r 1e6ebb9e49eb stream/stream_radio.c --- a/stream/stream_radio.c Fri Nov 17 13:42:46 2006 +0000 +++ b/stream/stream_radio.c Fri Nov 17 14:36:13 2006 +0000 @@ -807,6 +807,21 @@ 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 * \return 1 if success,0 - otherwise diff -r 460da4c85cb4 -r 1e6ebb9e49eb stream/stream_radio.h --- a/stream/stream_radio.h Fri Nov 17 13:42:46 2006 +0000 +++ b/stream/stream_radio.h Fri Nov 17 14:36:13 2006 +0000 @@ -14,6 +14,7 @@ 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);