summaryrefslogtreecommitdiff
path: root/pjsip/src/pjsua-lib
diff options
context:
space:
mode:
Diffstat (limited to 'pjsip/src/pjsua-lib')
-rw-r--r--pjsip/src/pjsua-lib/pjsua_media.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_media.c b/pjsip/src/pjsua-lib/pjsua_media.c
index 07af5fbb..46d99a2b 100644
--- a/pjsip/src/pjsua-lib/pjsua_media.c
+++ b/pjsip/src/pjsua-lib/pjsua_media.c
@@ -784,6 +784,20 @@ PJ_DEF(pjsua_conf_port_id) pjsua_player_get_conf_port(pjsua_player_id id)
return pjsua_var.player[id].slot;
}
+/*
+ * Get the media port for the player.
+ */
+PJ_DEF(pj_status_t) pjsua_player_get_port( pjsua_recorder_id id,
+ pjmedia_port **p_port)
+{
+ PJ_ASSERT_RETURN(id>=0 && id<PJ_ARRAY_SIZE(pjsua_var.player), PJ_EINVAL);
+ PJ_ASSERT_RETURN(pjsua_var.player[id].port != NULL, PJ_EINVAL);
+ PJ_ASSERT_RETURN(p_port != NULL, PJ_EINVAL);
+
+ *p_port = pjsua_var.player[id].port;
+
+ return PJ_SUCCESS;
+}
/*
* Set playback position.
@@ -952,6 +966,19 @@ PJ_DEF(pjsua_conf_port_id) pjsua_recorder_get_conf_port(pjsua_recorder_id id)
return pjsua_var.recorder[id].slot;
}
+/*
+ * Get the media port for the recorder.
+ */
+PJ_DEF(pj_status_t) pjsua_recorder_get_port( pjsua_recorder_id id,
+ pjmedia_port **p_port)
+{
+ PJ_ASSERT_RETURN(id>=0 && id<PJ_ARRAY_SIZE(pjsua_var.recorder), PJ_EINVAL);
+ PJ_ASSERT_RETURN(pjsua_var.recorder[id].port != NULL, PJ_EINVAL);
+ PJ_ASSERT_RETURN(p_port != NULL, PJ_EINVAL);
+
+ *p_port = pjsua_var.recorder[id].port;
+ return PJ_SUCCESS;
+}
/*
* Destroy recorder (this will complete recording).