Index: /pjproject/branches/projects/2.0-dev/pjsip/src/pjsua-lib/pjsua_call.c
===================================================================
--- /pjproject/branches/projects/2.0-dev/pjsip/src/pjsua-lib/pjsua_call.c	(revision 3638)
+++ /pjproject/branches/projects/2.0-dev/pjsip/src/pjsua-lib/pjsua_call.c	(revision 3639)
@@ -1433,4 +1433,133 @@
     *p_type = pjsua_var.calls[call_id].rem_nat_type;
     return PJ_SUCCESS;
+}
+
+
+/*
+ * Get media stream info for the specified media index.
+ */
+PJ_DEF(pj_status_t) pjsua_call_get_stream_info( pjsua_call_id call_id,
+                                                unsigned med_idx,
+                                                pjsua_stream_info *psi)
+{
+    pjsua_call *call;
+    pjsua_call_media *call_med;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(call_id>=0 && call_id<(int)pjsua_var.ua_cfg.max_calls,
+		     PJ_EINVAL);
+    PJ_ASSERT_RETURN(psi, PJ_EINVAL);
+
+    PJSUA_LOCK();
+
+    call = &pjsua_var.calls[call_id];
+    
+    if (med_idx >= call->med_cnt) {
+	PJSUA_UNLOCK();
+	return PJ_EINVAL;
+    }
+
+    call_med = &call->media[med_idx];
+    psi->type = call_med->type;
+    switch (call_med->type) {
+    case PJMEDIA_TYPE_AUDIO:
+	status = pjmedia_stream_get_info(call_med->strm.a.stream,
+					 &psi->info.aud);
+	break;
+    case PJMEDIA_TYPE_VIDEO:
+	status = pjmedia_vid_stream_get_info(call_med->strm.v.stream,
+					     &psi->info.vid);
+	break;
+    default:
+	status = PJMEDIA_EINVALIMEDIATYPE;
+	break;
+    }
+    
+    PJSUA_UNLOCK();
+    return status;
+}
+
+
+/*
+ *  Get media stream statistic for the specified media index.
+ */
+PJ_DEF(pj_status_t) pjsua_call_get_stream_stat( pjsua_call_id call_id,
+                                                unsigned med_idx,
+                                                pjsua_stream_stat *stat)
+{
+    pjsua_call *call;
+    pjsua_call_media *call_med;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(call_id>=0 && call_id<(int)pjsua_var.ua_cfg.max_calls,
+		     PJ_EINVAL);
+    PJ_ASSERT_RETURN(stat, PJ_EINVAL);
+
+    PJSUA_LOCK();
+
+    call = &pjsua_var.calls[call_id];
+    
+    if (med_idx >= call->med_cnt) {
+	PJSUA_UNLOCK();
+	return PJ_EINVAL;
+    }
+
+    call_med = &call->media[med_idx];
+    switch (call_med->type) {
+    case PJMEDIA_TYPE_AUDIO:
+	status = pjmedia_stream_get_stat(call_med->strm.a.stream,
+					 &stat->rtcp);
+	if (status == PJ_SUCCESS)
+	    status = pjmedia_stream_get_stat_jbuf(call_med->strm.a.stream,
+						  &stat->jbuf);
+	break;
+    case PJMEDIA_TYPE_VIDEO:
+	status = pjmedia_vid_stream_get_stat(call_med->strm.v.stream,
+					     &stat->rtcp);
+	if (status == PJ_SUCCESS)
+	    status = pjmedia_vid_stream_get_stat_jbuf(call_med->strm.v.stream,
+						  &stat->jbuf);
+	break;
+    default:
+	status = PJMEDIA_EINVALIMEDIATYPE;
+	break;
+    }
+    
+    PJSUA_UNLOCK();
+    return status;
+}
+
+
+/*
+ * Get media transport info for the specified media index.
+ */
+PJ_DEF(pj_status_t) pjsua_call_get_transport_info( pjsua_call_id call_id,
+                                                   unsigned med_idx,
+                                                   pjmedia_transport_info *t)
+{
+    pjsua_call *call;
+    pjsua_call_media *call_med;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(call_id>=0 && call_id<(int)pjsua_var.ua_cfg.max_calls,
+		     PJ_EINVAL);
+    PJ_ASSERT_RETURN(t, PJ_EINVAL);
+
+    PJSUA_LOCK();
+
+    call = &pjsua_var.calls[call_id];
+    
+    if (med_idx >= call->med_cnt) {
+	PJSUA_UNLOCK();
+	return PJ_EINVAL;
+    }
+
+    call_med = &call->media[med_idx];
+
+    pjmedia_transport_info_init(t);
+    status = pjmedia_transport_get_info(call_med->tp, t);
+    
+    PJSUA_UNLOCK();
+    return status;
 }
 
Index: /pjproject/branches/projects/2.0-dev/pjsip/src/pjsua-lib/pjsua_vid.c
===================================================================
--- /pjproject/branches/projects/2.0-dev/pjsip/src/pjsua-lib/pjsua_vid.c	(revision 3638)
+++ /pjproject/branches/projects/2.0-dev/pjsip/src/pjsua-lib/pjsua_vid.c	(revision 3639)
@@ -1589,4 +1589,27 @@
 
 
+/*
+ * Get the media stream index of the default video stream in the call.
+ */
+PJ_DEF(int) pjsua_call_get_vid_stream_idx(pjsua_call_id call_id)
+{
+    pjsua_call *call;
+    int first_active, first_inactive;
+
+    PJ_ASSERT_RETURN(call_id>=0 && call_id<(int)pjsua_var.ua_cfg.max_calls,
+		     PJ_EINVAL);
+
+    PJSUA_LOCK();
+    call = &pjsua_var.calls[call_id];
+    call_get_vid_strm_info(call, &first_active, &first_inactive, NULL, NULL);
+    PJSUA_UNLOCK();
+
+    if (first_active == -1)
+	return first_inactive;
+
+    return first_active;
+}
+
+
 #endif /* PJSUA_HAS_VIDEO */
 
