Index: /pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/vid_stream.c
===================================================================
--- /pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/vid_stream.c	(revision 3512)
+++ /pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/vid_stream.c	(revision 3513)
@@ -119,15 +119,4 @@
     unsigned		     frame_ts_len;  /**< Frame length in timestamp. */
 
-#if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0)
-    pj_uint32_t		     rtcp_xr_last_tx;  /**< RTCP XR tx time 
-					            in timestamp.           */
-    pj_uint32_t		     rtcp_xr_interval; /**< Interval, in timestamp. */
-    pj_sockaddr		     rtcp_xr_dest;     /**< Additional remote RTCP XR 
-						    dest. If sin_family is 
-						    zero, it will be ignored*/
-    unsigned		     rtcp_xr_dest_len; /**< Length of RTCP XR dest
-					            address		    */
-#endif
-
 #if defined(PJMEDIA_STREAM_ENABLE_KA) && PJMEDIA_STREAM_ENABLE_KA!=0
     pj_bool_t		     use_ka;	       /**< Stream keep-alive with non-
@@ -403,53 +392,4 @@
 	stream->rtcp_last_tx = timestamp;
     }
-
-#if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0)
-    if (stream->rtcp.xr_enabled) {
-
-	if (stream->rtcp_xr_last_tx == 0) {
-    	
-	    stream->rtcp_xr_last_tx = timestamp;
-
-	} else if (timestamp - stream->rtcp_xr_last_tx >= 
-		   stream->rtcp_xr_interval)
-	{
-	    int i;
-	    pjmedia_jb_state jb_state;
-	    void *rtcp_pkt;
-	    int len;
-
-	    /* Update RTCP XR with current JB states */
-	    pjmedia_jbuf_get_state(stream->jb, &jb_state);
-    	    
-	    i = jb_state.avg_delay;
-	    pjmedia_rtcp_xr_update_info(&stream->rtcp.xr_session, 
-					PJMEDIA_RTCP_XR_INFO_JB_NOM,
-					i);
-
-	    i = jb_state.max_delay;
-	    pjmedia_rtcp_xr_update_info(&stream->rtcp.xr_session, 
-					PJMEDIA_RTCP_XR_INFO_JB_MAX,
-					i);
-
-	    /* Build RTCP XR packet */
-	    pjmedia_rtcp_build_rtcp_xr(&stream->rtcp.xr_session, 0, 
-				       &rtcp_pkt, &len);
-
-	    /* Send the RTCP XR to remote address */
-	    pjmedia_transport_send_rtcp(stream->transport, rtcp_pkt, len);
-
-	    /* Send the RTCP XR to third-party destination if specified */
-	    if (stream->rtcp_xr_dest_len) {
-		pjmedia_transport_send_rtcp2(stream->transport, 
-					     &stream->rtcp_xr_dest,
-					     stream->rtcp_xr_dest_len, 
-					     rtcp_pkt, len);
-	    }
-
-	    /* Update last tx RTCP XR */
-	    stream->rtcp_xr_last_tx = timestamp;
-	}
-    }
-#endif
 }
 
@@ -773,5 +713,5 @@
 	/* Update RTP timestamp */
 	pjmedia_rtp_encode_rtp(&channel->rtp, channel->pt, 1, 0,
-			       rtp_ts_len, &rtphdr, &rtphdrlen);
+			       rtp_ts_len,  (const void**)&rtphdr, &rtphdrlen);
         return status;
     }
@@ -797,5 +737,6 @@
 	    /* Update RTP timestamp */
 	    pjmedia_rtp_encode_rtp(&channel->rtp, channel->pt, 1, 0,
-				   rtp_ts_len, &rtphdr, &rtphdrlen);
+				   rtp_ts_len,  (const void**)&rtphdr,
+				   &rtphdrlen);
             return status;
         }
@@ -923,5 +864,5 @@
 		 * the payload (no buffer and memcpy needed), just as we need.
 		 */
-		pjmedia_jbuf_peek_frame(stream->jb, i, &p,
+		pjmedia_jbuf_peek_frame(stream->jb, i, (const void**)&p,
 					&psize, &ptype, NULL, NULL, NULL);
 
@@ -1424,42 +1365,4 @@
     PJ_ASSERT_RETURN(stream != NULL, PJ_EINVAL);
 
-#if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0)
-    /* Send RTCP XR on stream destroy */
-    if (stream->rtcp.xr_enabled) {
-	int i;
-	pjmedia_jb_state jb_state;
-	void *rtcp_pkt;
-	int len;
-
-	/* Update RTCP XR with current JB states */
-	pjmedia_jbuf_get_state(stream->jb, &jb_state);
-    	    
-	i = jb_state.avg_delay;
-	pjmedia_rtcp_xr_update_info(&stream->rtcp.xr_session, 
-				    PJMEDIA_RTCP_XR_INFO_JB_NOM,
-				    i);
-
-	i = jb_state.max_delay;
-	pjmedia_rtcp_xr_update_info(&stream->rtcp.xr_session, 
-				    PJMEDIA_RTCP_XR_INFO_JB_MAX,
-				    i);
-
-	/* Build RTCP XR packet */
-	pjmedia_rtcp_build_rtcp_xr(&stream->rtcp.xr_session, 0, 
-				   &rtcp_pkt, &len);
-
-	/* Send the RTCP XR to remote address */
-	pjmedia_transport_send_rtcp(stream->transport, rtcp_pkt, len);
-	
-	/* Send the RTCP XR to third-party destination if specified */
-	if (stream->rtcp_xr_dest_len) {
-	    pjmedia_transport_send_rtcp2(stream->transport, 
-					 &stream->rtcp_xr_dest,
-					 stream->rtcp_xr_dest_len, 
-					 rtcp_pkt, len);
-	}
-    }
-#endif
-
     /* Send RTCP BYE */
     if (stream->enc && stream->transport) {
@@ -1576,23 +1479,4 @@
 }
 
-
-#if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0)
-/*
- * Get stream extended statistics.
- */
-PJ_DEF(pj_status_t) pjmedia_stream_get_stat_xr(
-					    const pjmedia_vid_stream *stream,
-					    pjmedia_rtcp_xr_stat *stat)
-{
-    PJ_ASSERT_RETURN(stream && stat, PJ_EINVAL);
-
-    if (stream->rtcp.xr_enabled) {
-	pj_memcpy(stat, &stream->rtcp.xr_session.stat,
-		  sizeof(pjmedia_rtcp_xr_stat));
-	return PJ_SUCCESS;
-    }
-    return PJ_ENOTFOUND;
-}
-#endif
 
 /*
@@ -1844,9 +1728,4 @@
 
     pj_bzero(si, sizeof(*si));
-
-#if PJMEDIA_HAS_RTCP_XR && PJMEDIA_STREAM_ENABLE_XR
-    /* Set default RTCP XR enabled/disabled */
-    si->rtcp_xr_enabled = PJ_TRUE;
-#endif
 
     /* Media type: */
