Ignore:
Timestamp:
Feb 17, 2009 3:19:45 PM (16 years ago)
Author:
bennylp
Message:

Added bitrate and vad info in pjmedia_format, and changed audio route to use enumeration rather than boolean

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/aps-direct/pjmedia/src/pjmedia/sound_port.c

    r2456 r2457  
    290290        unsigned i, size_decoded; 
    291291 
    292         switch (snd_port->setting.format.u32) { 
     292        switch (snd_port->setting.format.fmt_id) { 
    293293        case PJMEDIA_FORMAT_PCMA: 
    294294            decoder = &pjmedia_alaw_decode; 
     
    299299        default: 
    300300            PJ_LOG(1,(THIS_FILE, "Unsupported format %d",  
    301                       snd_port->setting.format.u32)); 
     301                      snd_port->setting.format.fmt_id)); 
    302302            goto no_frame; 
    303303        } 
     
    392392    fx->base.timestamp.u32.lo = timestamp; 
    393393 
    394     switch (snd_port->setting.format.u32) { 
     394    switch (snd_port->setting.format.fmt_id) { 
    395395    case PJMEDIA_FORMAT_PCMA: 
    396396        encoder = &pjmedia_alaw_encode; 
     
    401401    default: 
    402402        PJ_LOG(1,(THIS_FILE, "Unsupported format %d",  
    403                   snd_port->setting.format.u32)); 
     403                  snd_port->setting.format.fmt_id)); 
    404404        return PJ_SUCCESS; 
    405405    } 
     
    435435                     PJ_EBUG); 
    436436 
    437     if (snd_port->setting.format.u32 == PJMEDIA_FORMAT_L16) { 
     437    if (snd_port->setting.format.fmt_id == PJMEDIA_FORMAT_L16) { 
    438438        snd_rec_cb = &rec_cb; 
    439439        snd_play_cb = &play_cb; 
     
    716716#if !defined(PJMEDIA_SND_SUPPORT_OPEN2) || PJMEDIA_SND_SUPPORT_OPEN2==0 
    717717    /* For devices that doesn't support open2(), enable simulation */ 
    718     if (snd_port->setting.format.u32 != PJMEDIA_FORMAT_L16) { 
     718    if (snd_port->setting.format.fmt_id != PJMEDIA_FORMAT_L16) { 
    719719        snd_port->frm_buf_size = sizeof(pjmedia_frame_ext) +  
    720720                                 (samples_per_frame << 1) + 
Note: See TracChangeset for help on using the changeset viewer.