~audio-recorder/audio-recorder/trunk

« back to all changes in this revision

Viewing changes to src/gst-vad.c

  • Committer: Osmo Antero
  • Date: 2021-11-01 16:08:01 UTC
  • Revision ID: osmoma@gmail.com-20211101160801-hv2sap9ri52ii3zq
Version 3.3.0. Initial suport for PipeWire. Removed suport for Skype

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
void vad_start_VAD() {
102
102
    PipelineParms *parms = g_malloc0(sizeof(PipelineParms));
103
103
 
 
104
        gint type = -1;
 
105
        gchar *dev_id = NULL;
 
106
                        
 
107
        // These are set in the main window (in device/player combo)
 
108
        conf_get_int_value("audio-device-type", &type);
 
109
        conf_get_string_value("audio-device-id", &dev_id);
 
110
 
104
111
    // Get audio source and device list
105
 
    parms->source = NULL;
106
 
    parms->dev_list = audio_sources_get_device_NEW(&(parms->source));
 
112
    // parms->source = audio_sources_get_source(dev_id, type);
 
113
 
 
114
        parms->gst_plugin = audio_sources_get_gstreamer_plugin();
 
115
        parms->gst_plugin_attrib = audio_sources_get_gstreamer_plugin_attrib();
 
116
        
 
117
    parms->dev_list = audio_sources_get_devices(dev_id, type);
 
118
 
 
119
        g_free(dev_id);
107
120
 
108
121
    gboolean changed = TRUE;
109
122
    if (g_curr_parms) {
110
 
        changed = g_strcmp0(parms->source, g_curr_parms->source);
111
 
        changed = changed || (!str_lists_equal(parms->dev_list, g_curr_parms->dev_list));
 
123
        changed = !str_lists_equal(parms->dev_list, g_curr_parms->dev_list);
112
124
    }
113
125
 
114
126
    // Changed?
301
313
    if (!parms) return NULL;
302
314
 
303
315
#if defined(DEBUG_VAD) || defined(DEBUG_ALL)
304
 
    LOG_VAD("Start VAD for \"%s\"\n", parms->source);
 
316
    LOG_VAD("Start VAD for \"%s\"\n", parms->gst_plugin);
305
317
    str_list_print("Monitor devices", parms->dev_list);
306
318
#endif
307
319