Re #1263:
 - Implemented media info/statistics APIs: stream info, stream statistic, and transport info.
 - Implemented API of default video stream index in call, pjsua_call_get_vid_stream_idx().



git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/2.0-dev@3639 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjsip/src/pjsua-lib/pjsua_vid.c b/pjsip/src/pjsua-lib/pjsua_vid.c
index ef95ee3..610ff0f 100644
--- a/pjsip/src/pjsua-lib/pjsua_vid.c
+++ b/pjsip/src/pjsua-lib/pjsua_vid.c
@@ -1588,5 +1588,28 @@
 }
 
 
+/*
+ * 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 */