[FFmpeg-devel] [PATCH 05/14] avradio/sdr: snap2station() documentation

Michael Niedermayer michael at niedermayer.cc
Wed Jul 19 00:45:33 EEST 2023


Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavradio/sdrdemux.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/libavradio/sdrdemux.c b/libavradio/sdrdemux.c
index f189c85a0d..07b43dec1c 100644
--- a/libavradio/sdrdemux.c
+++ b/libavradio/sdrdemux.c
@@ -1287,6 +1287,16 @@ static int sdrfile_read_callback(SDRContext *sdr, FIFOElement *fifo_element, int
     return ret;
 }
 
+/**
+ * switch to the closest station in view and the provided seek_direction.
+ *
+ * This function is scanning friendly, it will not consider stations not in
+ * view and rather wait for a future invocation when they are in view
+ *
+ * when a station is found, this will move to it and stop scanning if needed
+ *
+ * @return 1 if a station is found, 0 if not, or a negative error code on error
+ */
 static int snap2station(SDRContext *sdr, int *seek_direction) {
     AVFormatContext *avfmt = sdr->avfmt;
     AVStream *st = avfmt->streams[sdr->single_ch_audio_st_index];
-- 
2.31.1



More information about the ffmpeg-devel mailing list