From c2551b2baa2f7e1b1cfd0f5f016bd7bef780ee20 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Wed, 4 Feb 2015 16:39:22 +0100 Subject: [PATCH] fix multicast documentation, add java api --- coreapi/help/doxygen.dox | 5 ++ coreapi/linphonecore.h | 45 +++++----- .../org/linphone/core/LinphoneCore.java | 84 +++++++++++++++++++ mediastreamer2 | 2 +- 4 files changed, 112 insertions(+), 24 deletions(-) diff --git a/coreapi/help/doxygen.dox b/coreapi/help/doxygen.dox index 8831758d6..0f8e094f4 100644 --- a/coreapi/help/doxygen.dox +++ b/coreapi/help/doxygen.dox @@ -53,6 +53,11 @@ /** * @defgroup media_parameters Controlling media parameters + * Multicast + *
Call using rtp multicast addresses are supported for both audio and video with some limitations. Limitations are, no stun, no ice, no encryption. + *
  • Incoming call with multicast address are automatically accepted. The called party switches in a media receive only mode. + *
  • Outgoing call willing to send media to a multicast address can activate multicast using \link linphone_core_enable_video_multicast\endlink or + *\link linphone_core_enable_audio_multicast\endlink . The calling party switches in a media listen send only mode. **/ /** diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index e8ab365c6..8e1efa4cd 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -3307,7 +3307,7 @@ LINPHONE_PUBLIC int linphone_core_get_avpf_rr_interval(const LinphoneCore *lc); /** * Use to set multicast address to be used for audio stream. - * @param core the core + * @param core #LinphoneCore * @param ip an ipv4/6 multicast address * @return 0 in case of success * @ingroup media_parameters @@ -3315,7 +3315,7 @@ LINPHONE_PUBLIC int linphone_core_get_avpf_rr_interval(const LinphoneCore *lc); LINPHONE_PUBLIC int linphone_core_set_audio_multicast_addr(LinphoneCore *core, const char* ip); /** * Use to set multicast address to be used for video stream. - * @param core the core + * @param core #LinphoneCore * @param ip an ipv4/6 multicast address * @return 0 in case of success * @ingroup media_parameters @@ -3324,7 +3324,7 @@ LINPHONE_PUBLIC int linphone_core_set_video_multicast_addr(LinphoneCore *lc, con /** * Use to get multicast address to be used for audio stream. - * @param core the core + * @param core #LinphoneCore * @return an ipv4/6 multicast address or default value * @ingroup media_parameters **/ @@ -3332,7 +3332,7 @@ LINPHONE_PUBLIC const char* linphone_core_get_audio_multicast_addr(const Linphon /** * Use to get multicast address to be used for video stream. - * @param core the core + * @param core #LinphoneCore * @return an ipv4/6 multicast address, or default value * @ingroup media_parameters **/ @@ -3340,16 +3340,16 @@ LINPHONE_PUBLIC const char* linphone_core_get_video_multicast_addr(const Linphon /** * Use to set multicast ttl to be used for audio stream. - * @param core the core - * @param ip an ttl or -1 if not used [0..255] default value is 1 + * @param core #LinphoneCore + * @param ttl value or -1 if not used. [0..255] default value is 1 * @return 0 in case of success * @ingroup media_parameters **/ LINPHONE_PUBLIC int linphone_core_set_audio_multicast_ttl(LinphoneCore *core, int ttl); /** * Use to set multicast ttl to be used for video stream. - * @param core the core - * @param ip an ttl or -1 if not used [0..255] default value is 1 + * @param core #LinphoneCore + * @param ttl value or -1 if not used. [0..255] default value is 1 * @return 0 in case of success * @ingroup media_parameters **/ @@ -3357,16 +3357,16 @@ LINPHONE_PUBLIC int linphone_core_set_video_multicast_ttl(LinphoneCore *lc, int /** * Use to get multicast ttl to be used for audio stream. - * @param core the core - * @return an time to leave value or -1 if not set + * @param core #LinphoneCore + * @return a time to leave value * @ingroup media_parameters **/ LINPHONE_PUBLIC int linphone_core_get_audio_multicast_ttl(const LinphoneCore *core); /** * Use to get multicast ttl to be used for video stream. - * @param core the core - * @return an an time to leave value or -1 if not set + * @param core #LinphoneCore + * @return a time to leave value * @ingroup media_parameters **/ LINPHONE_PUBLIC int linphone_core_get_video_multicast_ttl(const LinphoneCore *core); @@ -3374,36 +3374,35 @@ LINPHONE_PUBLIC int linphone_core_get_video_multicast_ttl(const LinphoneCore *co /** * Use to enable multicast rtp for audio stream. - * * If enable, outgoing calls put a multicast address from #linphone_core_get_video_multicast_addr into audio cline. In case of outgoing call audio stream is sent to this multicast address. + * * If enabled, outgoing calls put a multicast address from #linphone_core_get_video_multicast_addr into audio cline. In case of outgoing call audio stream is sent to this multicast address. *
    For incoming calls behavior is unchanged. - * @param core the core - * @param yesno if yes, subsequent calls propose multicast ip set by #linphone_core_set_audio_multicast_addr - * @return an ipv4/6 multicast address or null + * @param core #LinphoneCore + * @param yesno if yes, subsequent calls will propose multicast ip set by #linphone_core_set_audio_multicast_addr * @ingroup media_parameters **/ LINPHONE_PUBLIC void linphone_core_enable_audio_multicast(LinphoneCore *core, bool_t yesno); /** * Use to get multicast state of audio stream. - * @param core the core - * @return true if subsequent calls propose multicast ip set by #linphone_core_set_audio_multicast_addr + * @param core #LinphoneCore + * @return true if subsequent calls will propose multicast ip set by #linphone_core_set_audio_multicast_addr * @ingroup media_parameters **/ LINPHONE_PUBLIC bool_t linphone_core_audio_multicast_enabled(const LinphoneCore *core); /** * Use to enable multicast rtp for video stream. - * If enable, outgoing calls put a multicast address from #linphone_core_get_video_multicast_addr into video cline. In case of outgoing call video stream is sent to this a multicast address. + * If enabled, outgoing calls put a multicast address from #linphone_core_get_video_multicast_addr into video cline. In case of outgoing call video stream is sent to this multicast address. *
    For incoming calls behavior is unchanged. - * @param core the core - * @param yesno if yes, subsequent outgoing calls propose multicast ip set by #linphone_core_set_video_multicast_addr + * @param core #LinphoneCore + * @param yesno if yes, subsequent outgoing calls will propose multicast ip set by #linphone_core_set_video_multicast_addr * @ingroup media_parameters **/ LINPHONE_PUBLIC void linphone_core_enable_video_multicast(LinphoneCore *core, bool_t yesno); /** * Use to get multicast state of video stream. - * @param core the core - * @return true if subsequent calls propose multicast ip set by #linphone_core_set_audio_multicast_addr + * @param core #LinphoneCore + * @return true if subsequent calls will propose multicast ip set by #linphone_core_set_video_multicast_addr * @ingroup media_parameters **/ LINPHONE_PUBLIC bool_t linphone_core_video_multicast_enabled(const LinphoneCore *core); diff --git a/java/common/org/linphone/core/LinphoneCore.java b/java/common/org/linphone/core/LinphoneCore.java index 3ff4a3865..9c2a0f34e 100644 --- a/java/common/org/linphone/core/LinphoneCore.java +++ b/java/common/org/linphone/core/LinphoneCore.java @@ -1879,4 +1879,88 @@ public interface LinphoneCore { * Upload the log collection to the configured server url. */ public void uploadLogCollection(); + + + /** + * Use to set multicast address to be used for audio stream. + * @param ip an ipv4/6 multicast address + * @thow LinphoneCoreException + **/ + public setAudioMulticastAddr(String ip) throw LinphoneCoreException; + /** + * Use to set multicast address to be used for video stream. + * @param ip an ipv4/6 multicast address + * @thow LinphoneCoreException + **/ + public void setVideoMulticastAddr(String ip); + + /** + * Use to get multicast address to be used for audio stream. + * @return an ipv4/6 multicast address or default value + **/ + public String getAudioMulticastAddr(); + + /** + * Use to get multicast address to be used for video stream. + * @return an ipv4/6 multicast address, or default value + **/ + public String getVideoMulticastAddr(); + + /** + * Use to set multicast ttl to be used for audio stream. + * @param ttl value or -1 if not used. [0..255] default value is 1 + * @thow LinphoneCoreException + **/ + public void setAudioMulticastTtl(int ttl); + /** + * Use to set multicast ttl to be used for video stream. + * @param ttl value or -1 if not used. [0..255] default value is 1 + * @thow LinphoneCoreException + **/ + public void setVideoMulticastTtl(int ttl); + + /** + * Use to get multicast ttl to be used for audio stream. + * @return a time to leave value + * @thow LinphoneCoreException + * **/ + public void getAudioMulticastTtl(); + + /** + * Use to get multicast ttl to be used for video stream. + * @return a time to leave value + * @thow LinphoneCoreException + **/ + public void getVideoMulticastTtl(const LinphoneCore *core); + + + /** + * Use to enable multicast rtp for audio stream. + * * If enabled, outgoing calls put a multicast address from {@link linphone_core_get_video_multicast_addr} into audio cline. In case of outgoing call audio stream is sent to this multicast address. + *
    For incoming calls behavior is unchanged. + * @param yesno if yes, subsequent calls will propose multicast ip set by {@link linphone_core_set_audio_multicast_addr} + **/ + public void enableAudioMulticast(boolean yesno); + + /** + * Use to get multicast state of audio stream. + * @return true if subsequent calls will propose multicast ip set by {@link linphone_core_set_audio_multicast_addr} + **/ + public boolean audioMulticastEnabled(); + + /** + * Use to enable multicast rtp for video stream. + * If enabled, outgoing calls put a multicast address from {@link linphone_core_get_video_multicast_addr} into video cline. In case of outgoing call video stream is sent to this multicast address. + *
    For incoming calls behavior is unchanged. + * @param yesno if yes, subsequent outgoing calls will propose multicast ip set by {@link linphone_core_set_video_multicast_addr} + **/ + public void enableVideoMulticast(boolean yesno); + /** + * Use to get multicast state of video stream. + * @return true if subsequent calls will propose multicast ip set by {@link linphone_core_set_video_multicast_addr} + **/ + public boolean videoMulticastEnabled(); + + + } diff --git a/mediastreamer2 b/mediastreamer2 index 93d48f997..0ebccd5f6 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 93d48f9970b0be6966f990792c72160bd4f4934b +Subproject commit 0ebccd5f6f844ecfae865c7d2ef1133405b4ecde