Ignore:
Timestamp:
Aug 23, 2016 9:13:28 AM (8 years ago)
Author:
ming
Message:

Fixed #1956: Support for setting audio input source capability in Android JNI audio device

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia-audiodev/android_jni_dev.c

    r5357 r5426  
    484484    pj_ansi_strcpy(info->name, "Android JNI"); 
    485485    info->default_samples_per_sec = 8000; 
    486     info->caps = PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING; 
     486    info->caps = PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING | 
     487                 PJMEDIA_AUD_DEV_CAP_INPUT_SOURCE; 
    487488    info->input_count = 1; 
    488489    info->output_count = 1; 
     490    info->routes = PJMEDIA_AUD_DEV_ROUTE_CUSTOM; 
    489491     
    490492    return PJ_SUCCESS; 
     
    666668        jobject record_obj; 
    667669        int mic_source = 0; /* DEFAULT: default audio source */ 
     670 
     671        if ((param->flags & PJMEDIA_AUD_DEV_CAP_INPUT_SOURCE) && 
     672            (param->input_route & PJMEDIA_AUD_DEV_ROUTE_CUSTOM)) 
     673        { 
     674            mic_source = param->input_route & ~PJMEDIA_AUD_DEV_ROUTE_CUSTOM; 
     675        } 
    668676 
    669677        /* Get pointer to the constructor */ 
Note: See TracChangeset for help on using the changeset viewer.