Ignore:
Timestamp:
Sep 20, 2006 8:02:18 PM (18 years ago)
Author:
bennylp
Message:

Automatically suspend AEC when nothing is connected to the sound port in the bridge, and resume as soon as frames are transmitted.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/port.c

    r631 r731  
    6363{ 
    6464    PJ_ASSERT_RETURN(port && frame, PJ_EINVAL); 
    65     PJ_ASSERT_RETURN(port->get_frame, PJ_EINVALIDOP); 
    6665 
    67     return port->get_frame(port, frame); 
     66    if (port->get_frame) 
     67        return port->get_frame(port, frame); 
     68    else { 
     69        frame->type = PJMEDIA_FRAME_TYPE_NONE; 
     70        return PJ_EINVALIDOP; 
     71    } 
    6872} 
    6973 
     
    7680{ 
    7781    PJ_ASSERT_RETURN(port && frame, PJ_EINVAL); 
    78     PJ_ASSERT_RETURN(port->put_frame, PJ_EINVALIDOP); 
    7982 
    80     return port->put_frame(port, frame); 
    81  
     83    if (port->put_frame) 
     84        return port->put_frame(port, frame); 
     85    else 
     86        return PJ_EINVALIDOP; 
    8287} 
    8388 
Note: See TracChangeset for help on using the changeset viewer.