Changeset 642


Ignore:
Timestamp:
Aug 2, 2006 6:22:22 PM (18 years ago)
Author:
bennylp
Message:

Added experimental AEC media port (aec_port.[hc]) based on Speex AEC in pjmedia and pjsua-lib.

Location:
pjproject/trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/build/pjmedia.dsp

    r631 r642  
    4242# PROP Target_Dir "" 
    4343# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c 
    44 # ADD CPP /nologo /MD /W4 /GX /O2 /I "../include" /I "../../pjlib/include" /I "../../pjlib-util/include" /I "../src/pjmedia/portaudio" /D "NDEBUG" /D "PA_NO_ASIO" /D "WIN32" /D "_MBCS" /D "_LIB" /D PJ_WIN32=1 /D PJ_M_I386=1 /FR /FD /c 
     44# ADD CPP /nologo /MD /W4 /GX /O2 /I "../include" /I "../../pjlib/include" /I "../../pjlib-util/include" /I "../src/pjmedia/portaudio" /I "../src/pjmedia-codec" /D "NDEBUG" /D "PA_NO_ASIO" /D "WIN32" /D "_MBCS" /D "_LIB" /D PJ_WIN32=1 /D PJ_M_I386=1 /FR /FD /c 
    4545# SUBTRACT CPP /YX 
    4646# ADD BASE RSC /l 0x409 /d "NDEBUG" 
     
    6666# PROP Target_Dir "" 
    6767# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c 
    68 # ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "../include" /I "../../pjlib/include" /I "../../pjlib-util/include" /I "../src/pjmedia/portaudio" /D "_DEBUG" /D "PA_NO_ASIO" /D "PA_NO_WMME" /D "WIN32" /D "_MBCS" /D "_LIB" /D PJ_WIN32=1 /D PJ_M_I386=1 /FR /FD /GZ /c 
     68# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "../include" /I "../../pjlib/include" /I "../../pjlib-util/include" /I "../src/pjmedia/portaudio" /I "../src/pjmedia-codec" /D "_DEBUG" /D "PA_NO_ASIO" /D "PA_NO_WMME" /D "WIN32" /D "_MBCS" /D "_LIB" /D PJ_WIN32=1 /D PJ_M_I386=1 /FR /FD /GZ /c 
    6969# SUBTRACT CPP /YX 
    7070# ADD BASE RSC /l 0x409 /d "_DEBUG" 
     
    8888# Begin Source File 
    8989 
     90SOURCE=..\src\pjmedia\aec_port.c 
     91# End Source File 
     92# Begin Source File 
     93 
    9094SOURCE=..\src\pjmedia\alaw_ulaw.c 
    9195# End Source File 
     
    226230 
    227231# PROP Default_Filter "h;hpp;hxx;hm;inl" 
     232# Begin Source File 
     233 
     234SOURCE=..\include\pjmedia\aec_port.h 
     235# End Source File 
    228236# Begin Source File 
    229237 
  • pjproject/trunk/pjmedia/include/pjmedia.h

    r558 r642  
    2626 
    2727#include <pjmedia/types.h> 
     28#include <pjmedia/aec_port.h> 
    2829#include <pjmedia/clock.h> 
    2930#include <pjmedia/codec.h> 
  • pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h

    r637 r642  
    21292129    unsigned            rx_drop_pct; 
    21302130 
     2131    /** 
     2132     * Echo canceller tail length, in miliseconds. 
     2133     * 
     2134     * Default: 256 
     2135     */ 
     2136    unsigned            ec_tail_len; 
    21312137}; 
    21322138 
     
    21472153    cfg->quality = 6; 
    21482154    cfg->ilbc_mode = 20; 
     2155    cfg->ec_tail_len = 256; 
    21492156} 
    21502157 
  • pjproject/trunk/pjsip/include/pjsua-lib/pjsua_internal.h

    r632 r642  
    205205    int                  cap_dev;   /**< Capture device ID.             */ 
    206206    int                  play_dev;  /**< Playback device ID.            */ 
     207    pjmedia_port        *aec_port;  /**< AEC port to conf bridge.       */ 
    207208    pj_bool_t            no_snd;    /**< No sound (app will manage it)  */ 
    208209    pjmedia_snd_port    *snd_port;  /**< Sound port.                    */ 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c

    r637 r642  
    969969    pj_assert(conf_port != NULL); 
    970970 
    971     /* Connect to the conference port */ 
    972     status = pjmedia_snd_port_connect(pjsua_var.snd_port, conf_port); 
     971    /* Create AEC if it's not created */ 
     972    if (pjsua_var.aec_port == NULL) { 
     973        status = pjmedia_aec_port_create(pjsua_var.pool, conf_port, 
     974                                         conf_port->info.clock_rate *  
     975                                            pjsua_var.media_cfg.ec_tail_len / 
     976                                            1000, 
     977                                         &pjsua_var.aec_port); 
     978        if (status != PJ_SUCCESS) { 
     979            pjsua_perror(THIS_FILE, "Unable to create AEC port", status); 
     980            pjmedia_snd_port_destroy(pjsua_var.snd_port); 
     981            pjsua_var.snd_port = NULL; 
     982            return status; 
     983        } 
     984    } 
     985 
     986    /* Connect to the AEC port */ 
     987    status = pjmedia_snd_port_connect(pjsua_var.snd_port, pjsua_var.aec_port); 
    973988    if (status != PJ_SUCCESS) { 
    974989        pjsua_perror(THIS_FILE, "Unable to connect conference port to " 
Note: See TracChangeset for help on using the changeset viewer.