Ignore:
Timestamp:
Feb 20, 2006 1:28:25 AM (18 years ago)
Author:
bennylp
Message:

Added conference bridge prototype

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia/vad.h

    r202 r203  
    2727#include <pjmedia/types.h> 
    2828 
     29PJ_BEGIN_DECL 
     30 
    2931 
    3032/** 
    31  * Opaque data type for pjmedia vad. 
     33 * @see pjmedia_vad 
    3234 */ 
    3335typedef struct pjmedia_vad  pjmedia_vad; 
     
    4951 
    5052/** 
     53 * Set the vad to operate in adaptive mode. 
     54 * 
     55 * @param vad               The vad 
     56 * @param frame_size Number of samplse per frame. 
     57 * 
     58 * @return                  PJ_SUCCESS on success. 
     59 */ 
     60PJ_DECL(pj_status_t) pjmedia_vad_set_adaptive( pjmedia_vad *vad, 
     61                                               unsigned frame_size); 
     62 
     63 
     64/** 
     65 * Set the vad to operate in fixed threshold mode. 
     66 * 
     67 * @param vad               The vad 
     68 * @param frame_size Number of samplse per frame. 
     69 * @param threshold         The silence threshold. 
     70 * 
     71 * @return                  PJ_SUCCESS on success. 
     72 */ 
     73PJ_DECL(pj_status_t) pjmedia_vad_set_fixed( pjmedia_vad *vad, 
     74                                            unsigned frame_size, 
     75                                            unsigned threshold ); 
     76 
     77/** 
     78 * Disable the vad. 
     79 * 
     80 * @param vad           The vad 
     81 * 
     82 * @return              PJ_SUCCESS on success. 
     83 */ 
     84PJ_DECL(pj_status_t) pjmedia_vad_disable( pjmedia_vad *vad ); 
     85 
     86 
     87/** 
    5188 * Calculate average signal level for the given samples. 
    5289 * 
     
    5794 *                      divided by number of samples. 
    5895 */ 
    59 PJ_DECL(pj_uint32_t) pjmedia_vad_calc_avg_signal_level( pj_int16_t samples[], 
    60                                                         pj_size_t count ); 
     96PJ_DECL(pj_int32_t) pjmedia_vad_calc_avg_signal( const pj_int16_t samples[], 
     97                                                 pj_size_t count ); 
    6198 
    6299 
     
    67104 * @param samples       Pointer to 16-bit PCM input samples. 
    68105 * @param count         Number of samples in the input. 
    69  * @param p_silence     Pointer to receive the silence detection result. 
    70  *                      Non-zero value indicates that that input is considered 
    71  *                      as silence. 
     106 * @param p_level       Optional pointer to receive average signal level 
     107 *                      of the input samples. 
    72108 * 
    73109 * @return              PJ_SUCCESS on success. 
    74110 */ 
    75 PJ_DECL(pj_status_t) pjmedia_vad_detect_silence( pjmedia_vad *vad, 
    76                                                 pj_int16_t samples[], 
    77                                                 pj_size_t count, 
    78                                                  pj_bool_t *p_silence); 
     111PJ_DECL(pj_bool_t) pjmedia_vad_detect_silence( pjmedia_vad *vad, 
     112                                               const pj_int16_t samples[], 
     113                                              pj_size_t count, 
     114                                               pj_int32_t *p_level); 
    79115 
    80116 
     117PJ_END_DECL 
    81118 
    82119#endif  /* __PJMEDIA_VAD_H__ */ 
Note: See TracChangeset for help on using the changeset viewer.