Ignore:
Timestamp:
Mar 9, 2009 12:55:29 PM (12 years ago)
Author:
bennylp
Message:

PJMEDIA/PJMEDIA-AUDIODEV update:

  • pjmedia.h: re-added inclusion of <sound.h> since we have compat

layer now

  • audiodev.h:
    • added input_vol and output_vol in pjmedia_aud_param, and

implement it on WMME dev

  • added pjmedia_aud_dev_cap_name() to see cap name
  • added pjmedia_aud_param_set_cap() and pjmedia_aud_param_get_cap() to set and get specific capability in param
  • conference.h: exported PJMEDIA_CONF_BRIDGE_SIGNATURE and

PJMEDIA_CONF_SWITCH_SIGNATURE since these are needed by PJSUA-LIB

  • WMME: bug due to addition of input_vol and output_vol in param:

volumes are set in flags in default_param(), but the
fields are not set. This would cause audio volume to be set to
zero for example.

  • WMME: some refactoring, removed duplicate settings in param
  • WMME: bug: setting set in set_cap() is not saved to param, so

get_param() will return wrong setting

  • APS: update because of s/out_route/output_route/ in param
  • APS: same bug as WMME due to addition of input_vol and output_vol in

param: flags are set in param but the fields are not

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/aps-direct/pjmedia/include/pjmedia-audiodev/audiodev.h

    r2489 r2492  
    6565    PJMEDIA_AUD_INVALID_DEV = -3 
    6666}; 
    67  
    68  
    69 /**  
    70  * Type for device unique identifier. The unique device ID can be used to save 
    71  * a reference to a particular device across software reboots. 
    72  */ 
    73 typedef pj_uint32_t pjmedia_aud_dev_uid; 
    7467 
    7568 
     
    187180     * PJ_FALSE. 
    188181     */ 
    189     PJMEDIA_AUD_DEV_CAP_PLC = 8192 
     182    PJMEDIA_AUD_DEV_CAP_PLC = 8192, 
    190183     
     184    /** 
     185     * End of capability 
     186     */ 
     187    PJMEDIA_AUD_DEV_CAP_MAX = 16384 
     188 
    191189} pjmedia_aud_dev_cap; 
    192190 
     
    370368    unsigned output_latency_ms; 
    371369 
     370    /** 
     371     * Input volume setting, in percent. This setting is optional, and will  
     372     * only be used if PJMEDIA_AUD_DEV_CAP_INPUT_VOLUME_SETTING is set in  
     373     * the flags. 
     374     */ 
     375    unsigned input_vol; 
     376 
     377    /** 
     378     * Output volume setting, in percent. This setting is optional, and will  
     379     * only be used if PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING is set in  
     380     * the flags. 
     381     */ 
     382    unsigned output_vol; 
     383 
     384    /**  
     385     * Set the audio input route. This setting is optional, and will only be 
     386     * used if PJMEDIA_AUD_DEV_CAP_INPUT_ROUTE is set in the flags. 
     387     */ 
     388    pjmedia_aud_dev_route input_route; 
     389 
    372390    /**  
    373391     * Set the audio output route. This setting is optional, and will only be 
    374392     * used if PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE is set in the flags. 
    375393     */ 
    376     pjmedia_aud_dev_route out_route; 
     394    pjmedia_aud_dev_route output_route; 
    377395 
    378396    /** 
     
    411429typedef struct pjmedia_aud_dev_factory pjmedia_aud_dev_factory; 
    412430 
     431/** 
     432 * Get string info for the specified capability. 
     433 * 
     434 * @param cap           The capability ID. 
     435 * @param p_desc        Optional pointer which will be filled with longer  
     436 *                      description about the capability. 
     437 * 
     438 * @return              Capability name. 
     439 */ 
     440PJ_DECL(const char*) pjmedia_aud_dev_cap_name(pjmedia_aud_dev_cap cap, 
     441                                              const char **p_desc); 
     442 
     443 
     444/** 
     445 * Set a capability field value in #pjmedia_aud_param structure. This will 
     446 * also set the flags field for the specified capability in the structure. 
     447 * 
     448 * @param param         The structure. 
     449 * @param cap           The audio capability which value is to be set. 
     450 * @param value         Pointer to value. Please see the type of value to 
     451 *                      be supplied in the pjmedia_aud_dev_cap documentation. 
     452 * 
     453 * @return              PJ_SUCCESS on successful operation or the appropriate 
     454 *                      error code. 
     455 */ 
     456PJ_DECL(pj_status_t) pjmedia_aud_param_set_cap(pjmedia_aud_param *param, 
     457                                               pjmedia_aud_dev_cap cap, 
     458                                               const void *pval); 
     459 
     460 
     461/** 
     462 * Get a capability field value from #pjmedia_aud_param structure. This 
     463 * function will return PJMEDIA_EAUD_INVCAP error if the flag for that 
     464 * capability is not set in the flags field in the structure. 
     465 * 
     466 * @param param         The structure. 
     467 * @param cap           The audio capability which value is to be retrieved. 
     468 * @param value         Pointer to value. Please see the type of value to 
     469 *                      be supplied in the pjmedia_aud_dev_cap documentation. 
     470 * 
     471 * @return              PJ_SUCCESS on successful operation or the appropriate 
     472 *                      error code. 
     473 */ 
     474PJ_DECL(pj_status_t) pjmedia_aud_param_get_cap(const pjmedia_aud_param *param, 
     475                                               pjmedia_aud_dev_cap cap, 
     476                                               void *pval); 
    413477 
    414478/** 
     
    444508 */ 
    445509PJ_DECL(pj_status_t) pjmedia_aud_subsys_shutdown(void); 
    446  
    447  
    448 /** 
    449  * Get string info for the specified capability. 
    450  * 
    451  * @param cap           The capability ID. 
    452  * @param p_desc        Optional pointer which will be filled with longer  
    453  *                      description about the capability. 
    454  * 
    455  * @return              Capability name. 
    456  */ 
    457 PJ_DECL(const char*) pjmedia_aud_dev_cap_name(pjmedia_aud_dev_cap cap, 
    458                                               const char **p_desc); 
    459510 
    460511 
     
    549600 * @param cap           The audio capability which value is to be retrieved. 
    550601 * @param value         Pointer to value to be filled in by this function  
    551  *                      once it returns successfully. 
     602 *                      once it returns successfully.  Please see the type  
     603 *                      of value to be supplied in the pjmedia_aud_dev_cap 
     604 *                      documentation. 
    552605 * 
    553606 * @return              PJ_SUCCESS on successful operation or the appropriate 
     
    563616 * @param strm          The audio stream. 
    564617 * @param cap           The audio capability which value is to be set. 
    565  * @param value         Pointer to value. 
     618 * @param value         Pointer to value. Please see the type of value to 
     619 *                      be supplied in the pjmedia_aud_dev_cap documentation. 
    566620 * 
    567621 * @return              PJ_SUCCESS on successful operation or the appropriate 
Note: See TracChangeset for help on using the changeset viewer.