Ignore:
Timestamp:
Feb 16, 2009 4:29:05 PM (11 years ago)
Author:
nanang
Message:

Changed term 'fourcc' to 'format' and few minor fixes/updates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/aps-direct/pjmedia/src/pjmedia/symbian_sound_aps.cpp

    r2449 r2456  
    509509        iSession.Stop(); 
    510510        state_ = STATE_READY; 
    511         TRACE_((THIS_FILE, "Streaming stopped")); 
     511        TRACE_((THIS_FILE, "Sound device stopped")); 
    512512    } 
    513513} 
     
    550550    if (parentStrm_->dir != PJMEDIA_DIR_CAPTURE) { 
    551551        iSession.Write(); 
    552         TRACE_((THIS_FILE, "Player streaming started")); 
     552        TRACE_((THIS_FILE, "Player started")); 
    553553    } 
    554554 
     
    556556    if (parentStrm_->dir != PJMEDIA_DIR_PLAYBACK) { 
    557557        iSession.Read(); 
    558         TRACE_((THIS_FILE, "Recorder streaming started")); 
     558        TRACE_((THIS_FILE, "Recorder started")); 
    559559    } 
    560560 
     
    569569void CPjAudioEngine::InputStreamInitialized(const TInt aStatus) 
    570570{ 
    571     TRACE_((THIS_FILE, "InputStreamInitialized %d", aStatus)); 
     571    TRACE_((THIS_FILE, "Recorder initialized, err=%d", aStatus)); 
    572572 
    573573    state_ = STATE_READY; 
     
    579579void CPjAudioEngine::OutputStreamInitialized(const TInt aStatus) 
    580580{ 
    581     TRACE_((THIS_FILE, "OutputStreamInitialized %d", aStatus)); 
     581    TRACE_((THIS_FILE, "Player initialized, err=%d", aStatus)); 
    582582 
    583583    if (aStatus == KErrNone) { 
     
    605605    if (state_ == STATE_READY || state_ == STATE_STREAMING) { 
    606606        iSession.ActivateLoudspeaker(active); 
    607         TRACE_((THIS_FILE, "Loudspeaker on/off: %d", active)); 
     607        TRACE_((THIS_FILE, "Loudspeaker turned %s", (active? "on":"off"))); 
    608608        return KErrNone; 
    609609    } 
     
    709709     
    710710    switch(strm->setting.format.u32) { 
    711     case PJMEDIA_FOURCC_AMR: 
     711    case PJMEDIA_FORMAT_AMR: 
    712712        { 
    713713            const pj_uint8_t *p = (const pj_uint8_t*)buf.iBuffer.Ptr() + 1; 
     
    724724        break; 
    725725         
    726     case PJMEDIA_FOURCC_G729: 
     726    case PJMEDIA_FORMAT_G729: 
    727727        { 
    728728            /* Check if we got a normal or SID frame. */ 
     
    753753        break; 
    754754 
    755     case PJMEDIA_FOURCC_ILBC: 
     755    case PJMEDIA_FORMAT_ILBC: 
    756756        { 
    757757            unsigned samples_got; 
     
    779779        break; 
    780780         
    781     case PJMEDIA_FOURCC_PCMU: 
    782     case PJMEDIA_FOURCC_PCMA: 
     781    case PJMEDIA_FORMAT_PCMU: 
     782    case PJMEDIA_FORMAT_PCMA: 
    783783        { 
    784784            unsigned samples_processed = 0; 
     
    837837 
    838838    switch(strm->setting.format.u32) { 
    839     case PJMEDIA_FOURCC_AMR: 
     839    case PJMEDIA_FORMAT_AMR: 
    840840        { 
    841841            if (frame->samples_cnt == 0) { 
     
    884884        break; 
    885885         
    886     case PJMEDIA_FOURCC_G729: 
     886    case PJMEDIA_FORMAT_G729: 
    887887        { 
    888888            if (frame->samples_cnt == 0) { 
     
    933933        break; 
    934934         
    935     case PJMEDIA_FOURCC_ILBC: 
     935    case PJMEDIA_FORMAT_ILBC: 
    936936        { 
    937937            if (frame->samples_cnt == 0) { 
     
    973973        break; 
    974974         
    975     case PJMEDIA_FOURCC_PCMU: 
    976     case PJMEDIA_FOURCC_PCMA: 
     975    case PJMEDIA_FORMAT_PCMU: 
     976    case PJMEDIA_FORMAT_PCMA: 
    977977        { 
    978978            unsigned samples_ready = 0; 
     
    10061006                    } else { 
    10071007                        pj_uint8_t silc; 
    1008                         silc = (strm->setting.format.u32==PJMEDIA_FOURCC_PCMU)? 
     1008                        silc = (strm->setting.format.u32==PJMEDIA_FORMAT_PCMU)? 
    10091009                                pjmedia_linear2ulaw(0) : pjmedia_linear2alaw(0); 
    10101010                        buf.iBuffer.AppendFill(silc, samples_cnt); 
     
    10171017                    pj_uint8_t silc; 
    10181018                     
    1019                     silc = (strm->setting.format.u32==PJMEDIA_FOURCC_PCMU)? 
     1019                    silc = (strm->setting.format.u32==PJMEDIA_FORMAT_PCMU)? 
    10201020                            pjmedia_linear2ulaw(0) : pjmedia_linear2alaw(0); 
    10211021                    buf.iBuffer.AppendFill(silc, samples_req - samples_ready); 
     
    11051105    strm->setting = *setting; 
    11061106 
    1107     if (strm->setting.format.u32 == 0) 
    1108         strm->setting.format.u32 = PJMEDIA_FOURCC_L16; 
    1109  
    11101107    /* Set audio engine fourcc. */ 
    1111     if (strm->setting.format.u32 == PJMEDIA_FOURCC_PCMU || 
    1112         strm->setting.format.u32 == PJMEDIA_FOURCC_PCMA || 
    1113         strm->setting.format.u32 == PJMEDIA_FOURCC_L16) 
     1108    if (strm->setting.format.u32 == PJMEDIA_FORMAT_PCMU || 
     1109        strm->setting.format.u32 == PJMEDIA_FORMAT_PCMA || 
     1110        strm->setting.format.u32 == PJMEDIA_FORMAT_L16) 
    11141111    { 
    11151112        aps_setting.fourcc = TFourCC(KMCPFourCCIdG711); 
     
    11191116 
    11201117    /* Set audio engine mode. */ 
    1121     if (strm->setting.format.u32 == PJMEDIA_FOURCC_AMR) 
     1118    if (strm->setting.format.u32 == PJMEDIA_FORMAT_AMR) 
    11221119    { 
    11231120        aps_setting.mode = (TAPSCodecMode)strm->setting.bitrate; 
    11241121    }  
    1125     else if (strm->setting.format.u32 == PJMEDIA_FOURCC_PCMU || 
    1126              strm->setting.format.u32 == PJMEDIA_FOURCC_L16  || 
    1127             (strm->setting.format.u32 == PJMEDIA_FOURCC_ILBC  && 
     1122    else if (strm->setting.format.u32 == PJMEDIA_FORMAT_PCMU || 
     1123             strm->setting.format.u32 == PJMEDIA_FORMAT_L16 || 
     1124            (strm->setting.format.u32 == PJMEDIA_FORMAT_ILBC  && 
    11281125             strm->setting.mode == 30)) 
    11291126    { 
    11301127        aps_setting.mode = EULawOr30ms; 
    11311128    }  
    1132     else if (strm->setting.format.u32 == PJMEDIA_FOURCC_PCMA || 
    1133             (strm->setting.format.u32 == PJMEDIA_FOURCC_ILBC && 
     1129    else if (strm->setting.format.u32 == PJMEDIA_FORMAT_PCMA || 
     1130            (strm->setting.format.u32 == PJMEDIA_FORMAT_ILBC && 
    11341131             strm->setting.mode == 20)) 
    11351132    { 
     
    11381135 
    11391136    /* Disable VAD on L16 and G711. */ 
    1140     if (strm->setting.format.u32 == PJMEDIA_FOURCC_PCMU || 
    1141         strm->setting.format.u32 == PJMEDIA_FOURCC_PCMA || 
    1142         strm->setting.format.u32 == PJMEDIA_FOURCC_L16) 
     1137    if (strm->setting.format.u32 == PJMEDIA_FORMAT_PCMU || 
     1138        strm->setting.format.u32 == PJMEDIA_FORMAT_PCMA || 
     1139        strm->setting.format.u32 == PJMEDIA_FORMAT_L16) 
    11431140    { 
    11441141        aps_setting.vad = EFalse; 
     
    11531150 
    11541151    /* Set audio engine callbacks. */ 
    1155     if (strm->setting.format.u32 == PJMEDIA_FOURCC_L16) { 
     1152    if (strm->setting.format.u32 == PJMEDIA_FORMAT_L16) { 
    11561153        aps_play_cb = &PlayCbPcm; 
    11571154        aps_rec_cb  = &RecCbPcm; 
     
    11831180    strm->rec_buf_len = 0; 
    11841181 
    1185     if (strm->setting.format.u32 == PJMEDIA_FOURCC_G729) { 
     1182    if (strm->setting.format.u32 == PJMEDIA_FORMAT_G729) { 
    11861183        TBitStream *g729_bitstream = new TBitStream; 
    11871184         
     
    12151212 
    12161213    pj_bzero(&setting, sizeof(setting)); 
    1217     setting.format.u32 = PJMEDIA_FOURCC_L16; 
     1214    setting.format.u32 = PJMEDIA_FORMAT_L16; 
    12181215     
    12191216    return sound_open(PJMEDIA_DIR_CAPTURE, clock_rate, channel_count, 
     
    12371234 
    12381235    pj_bzero(&setting, sizeof(setting)); 
    1239     setting.format.u32 = PJMEDIA_FOURCC_L16; 
     1236    setting.format.u32 = PJMEDIA_FORMAT_L16; 
    12401237 
    12411238    return sound_open(PJMEDIA_DIR_PLAYBACK, clock_rate, channel_count, 
     
    12621259 
    12631260    pj_bzero(&setting, sizeof(setting)); 
    1264     setting.format.u32 = PJMEDIA_FOURCC_L16; 
     1261    setting.format.u32 = PJMEDIA_FORMAT_L16; 
    12651262 
    12661263    return sound_open(PJMEDIA_DIR_CAPTURE_PLAYBACK, clock_rate, channel_count, 
     
    13501347    stream->engine = NULL; 
    13511348 
    1352     if (stream->setting.format.u32 == PJMEDIA_FOURCC_G729) { 
     1349    if (stream->setting.format.u32 == PJMEDIA_FORMAT_G729) { 
    13531350        TBitStream *g729_bitstream = (TBitStream*)stream->strm_data; 
    13541351        stream->strm_data = NULL; 
Note: See TracChangeset for help on using the changeset viewer.