Changeset 245 for pjproject/trunk


Ignore:
Timestamp:
Feb 27, 2006 11:53:15 PM (19 years ago)
Author:
bennylp
Message:

Added log message when stream and stream thread is started

File:
1 edited

Legend:

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

    r209 r245  
    3333{ 
    3434    pj_pool_t       *pool; 
     35    pj_str_t         name; 
    3536    PaStream        *stream; 
    3637    int              dev_index; 
     
    7071        status = pj_thread_register("pa_rec", stream->thread_desc, &stream->thread); 
    7172        stream->thread_initialized = 1; 
     73        PJ_LOG(5,(THIS_FILE, "Recorder thread started")); 
    7274    } 
    7375 
     
    110112        status = pj_thread_register("pa_rec", stream->thread_desc, &stream->thread); 
    111113        stream->thread_initialized = 1; 
     114        PJ_LOG(5,(THIS_FILE, "Player thread started")); 
    112115    } 
    113116 
     
    230233    stream = pj_pool_calloc(pool, 1, sizeof(*stream)); 
    231234    stream->pool = pool; 
     235    stream->name = pj_str("recorder"); 
    232236    stream->user_data = user_data; 
    233237    stream->dev_index = index; 
     
    309313    stream = pj_pool_calloc(pool, 1, sizeof(*stream)); 
    310314    stream->pool = pool; 
     315    stream->name = pj_str("player"); 
    311316    stream->user_data = user_data; 
    312317    stream->samples_per_sec = param->samples_per_frame; 
     
    349354PJ_DEF(pj_status_t) pj_snd_stream_start(pj_snd_stream *stream) 
    350355{ 
    351     PJ_LOG(5,(THIS_FILE, "Starting stream..")); 
    352     return Pa_StartStream(stream->stream); 
     356    pj_status_t status; 
     357 
     358    PJ_LOG(5,(THIS_FILE, "Starting %s stream..", stream->name.ptr)); 
     359 
     360    status = Pa_StartStream(stream->stream); 
     361 
     362    PJ_LOG(5,(THIS_FILE, "Done, status=%d", status)); 
     363 
     364    return status; 
    353365} 
    354366 
     
    369381 
    370382    err = Pa_StopStream(stream->stream); 
     383 
     384    PJ_LOG(5,(THIS_FILE, "Done, status=%d", err)); 
     385 
    371386    return err; 
    372387} 
Note: See TracChangeset for help on using the changeset viewer.