- Timestamp:
- Jun 23, 2010 12:30:04 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/stream.c
r3161 r3218 391 391 /* Keep-alive packet is empty RTP */ 392 392 pj_status_t status; 393 void * rtphdr;393 void *pkt; 394 394 int pkt_len; 395 395 396 396 TRC_((stream->port.info.name.ptr, 397 "Sending keep-alive (RTCP and empty RTP)")); 398 399 /* Send RTP */ 397 400 status = pjmedia_rtp_encode_rtp( &stream->enc->rtp, 398 401 stream->enc->pt, 0, 399 402 1, 400 403 0, 401 (const void**)& rtphdr,404 (const void**)&pkt, 402 405 &pkt_len); 403 406 pj_assert(status == PJ_SUCCESS); 404 407 405 pj_memcpy(stream->enc->out_pkt, rtphdr, pkt_len);408 pj_memcpy(stream->enc->out_pkt, pkt, pkt_len); 406 409 pjmedia_transport_send_rtp(stream->transport, stream->enc->out_pkt, 407 410 pkt_len); 408 TRC_((stream->port.info.name.ptr, "Keep-alive sent (empty RTP)")); 411 412 /* Send RTCP */ 413 pjmedia_rtcp_build_rtcp(&stream->rtcp, &pkt, &pkt_len); 414 pjmedia_transport_send_rtcp(stream->transport, pkt, len); 409 415 410 416 #elif PJMEDIA_STREAM_ENABLE_KA == PJMEDIA_STREAM_KA_USER … … 414 420 const pj_str_t str_ka = PJMEDIA_STREAM_KA_USER_PKT; 415 421 422 TRC_((stream->port.info.name.ptr, 423 "Sending keep-alive (custom RTP/RTCP packets)")); 424 425 /* Send to RTP port */ 416 426 pj_memcpy(stream->enc->out_pkt, str_ka.ptr, str_ka.slen); 417 427 pkt_len = str_ka.slen; 418 428 pjmedia_transport_send_rtp(stream->transport, stream->enc->out_pkt, 419 429 pkt_len); 420 TRC_((stream->port.info.name.ptr, "Keep-alive sent")); 430 431 /* Send to RTCP port */ 432 pjmedia_transport_send_rtcp(stream->transport, stream->enc->out_pkt, 433 pkt_len); 421 434 422 435 #else
Note: See TracChangeset
for help on using the changeset viewer.