Changeset 4120


Ignore:
Timestamp:
May 12, 2012 7:18:09 AM (8 years ago)
Author:
ming
Message:

Re #1508 (misc): Fixed compilation error if PJMEDIA_STREAM_ENABLE_KA is enabled.
This fix also disable the keep-alive feature in video stream.

Location:
pjproject/trunk/pjmedia/src/pjmedia
Files:
2 edited

Legend:

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

    r4108 r4120  
    11661166                                           &frame->timestamp); 
    11671167        if (dtx_duration > 
    1168             PJMEDIA_STREAM_KA_INTERVAL * stream->port.info.clock_rate) 
     1168            PJMEDIA_STREAM_KA_INTERVAL * PJMEDIA_PIA_SRATE(&stream->port.info)) 
    11691169        { 
    11701170            send_keep_alive_packet(stream); 
  • pjproject/trunk/pjmedia/src/pjmedia/vid_stream.c

    r4115 r4120  
    6969#endif 
    7070 
     71/* Video stream keep-alive feature is currently disabled. */ 
     72#if defined(PJMEDIA_STREAM_ENABLE_KA) && PJMEDIA_STREAM_ENABLE_KA != 0 
     73#   undef PJMEDIA_STREAM_ENABLE_KA 
     74#   define PJMEDIA_STREAM_ENABLE_KA 0 
     75#endif 
     76 
    7177 
    7278/** 
     
    402408 
    403409    /* Keep-alive packet is empty RTP */ 
     410    pjmedia_vid_channel *channel = (pjmedia_vid_channel *)stream; 
    404411    pj_status_t status; 
    405412    void *pkt; 
     
    423430 
    424431    /* Send RTCP */ 
    425     send_rtcp(stream, PJ_TRUE, PJ_FALSE, PJ_FALSE); 
     432    send_rtcp(stream, PJ_TRUE, PJ_FALSE); 
    426433 
    427434#elif PJMEDIA_STREAM_ENABLE_KA == PJMEDIA_STREAM_KA_USER 
    428435 
    429436    /* Keep-alive packet is defined in PJMEDIA_STREAM_KA_USER_PKT */ 
     437    pjmedia_vid_channel *channel = (pjmedia_vid_channel *)stream; 
    430438    int pkt_len; 
    431439    const pj_str_t str_ka = PJMEDIA_STREAM_KA_USER_PKT; 
     
    796804        dtx_duration = pj_timestamp_diff32(&stream->last_frm_ts_sent,  
    797805                                           &frame->timestamp); 
    798         if (dtx_duration > 
    799             PJMEDIA_STREAM_KA_INTERVAL * channel->port.info.clock_rate) 
     806        /* Video stream keep-alive feature is currently disabled. */ 
     807        /* 
     808        if (dtx_duration > 
     809            PJMEDIA_STREAM_KA_INTERVAL * 
     810            PJMEDIA_PIA_SRATE(&channel->port.info)) 
    800811        { 
    801812            send_keep_alive_packet(stream); 
    802813            stream->last_frm_ts_sent = frame->timestamp; 
    803814        } 
     815        */ 
    804816    } 
    805817#endif 
Note: See TracChangeset for help on using the changeset viewer.