[FFmpeg-cvslog] [ffmpeg-radio] branch master updated. 63ac31eb9f avradio/sdr: Factor demodulate_all_fm out

ffmpeg-git at ffmpeg.org ffmpeg-git at ffmpeg.org
Thu Jul 13 23:11:58 EEST 2023


The branch, master has been updated
       via  63ac31eb9fcfb43a81ae5dc538ad6a694ec05bb9 (commit)
      from  deb22f3ebad6b42c66f5f616b2a1fffd0a87341a (commit)


- Log -----------------------------------------------------------------
commit 63ac31eb9fcfb43a81ae5dc538ad6a694ec05bb9
Author:     Michael Niedermayer <michael at niedermayer.cc>
AuthorDate: Wed Jul 12 01:40:42 2023 +0200
Commit:     Michael Niedermayer <michael at niedermayer.cc>
CommitDate: Wed Jul 12 01:40:42 2023 +0200

    avradio/sdr: Factor demodulate_all_fm out
    
    This is cleaner
    
    Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

diff --git a/libavradio/sdr.h b/libavradio/sdr.h
index 6c4647823e..29ac4a2963 100644
--- a/libavradio/sdr.h
+++ b/libavradio/sdr.h
@@ -130,6 +130,7 @@ typedef struct SDRContext {
     int width, height;
     int single_ch_audio_st_index;
     int waterfall_st_index;
+    int demodulate_all_fm;
     int64_t freq;
     int64_t min_freq;
     int64_t max_freq;
diff --git a/libavradio/sdrdemux.c b/libavradio/sdrdemux.c
index e93cf4dd98..2103feaca8 100644
--- a/libavradio/sdrdemux.c
+++ b/libavradio/sdrdemux.c
@@ -1439,6 +1439,7 @@ int ff_sdr_common_init(AVFormatContext *s)
         st->codecpar->height = sdr->height;
         avpriv_set_pts_info(st, 64, 1, (48000/128) << FREQ_BITS);
         sdr->waterfall_st_index = st->index;
+        sdr->demodulate_all_fm = 1;
     } else
         sdr->waterfall_st_index = -1;
 
@@ -1679,7 +1680,7 @@ process_next_block:
         }
     }
 
-    if (sdr->width > 1) {
+    if (sdr->demodulate_all_fm) {
         Station *station_list[1000];
         int nb_stations = ff_sdr_find_stations(sdr, sdr->block_center_freq, sdr->sdr_sample_rate*0.5, station_list, FF_ARRAY_ELEMS(station_list));
         for (int i= 0; i<nb_stations; i++) {

-----------------------------------------------------------------------

Summary of changes:
 libavradio/sdr.h      | 1 +
 libavradio/sdrdemux.c | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)


hooks/post-receive
-- 



More information about the ffmpeg-cvslog mailing list