From 226657f35876471b401fdb30d126cf2527ba83ec Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Tue, 9 Jul 2013 11:58:18 +0200 Subject: [PATCH] Add API to get the sizes of the sent and received video streams of a call. --- coreapi/linphonecall.c | 18 ++++++++++++++++++ coreapi/linphonecore.h | 14 ++++++++++++++ mediastreamer2 | 2 +- 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index c19a7a882..01dbaf8db 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -2506,6 +2506,24 @@ void linphone_call_zoom_video(LinphoneCall* call, float zoom_factor, float* cx, }else ms_warning("Could not apply zoom: video output wasn't activated."); } +MSVideoSize linphone_call_get_sent_video_size(const LinphoneCall *call) { + VideoStream *vstream = call->videostream; + MSVideoSize vsize = MS_VIDEO_SIZE_UNKNOWN; + if (vstream != NULL) { + vsize = video_stream_get_sent_video_size(vstream); + } + return vsize; +} + +MSVideoSize linphone_call_get_received_video_size(const LinphoneCall *call) { + VideoStream *vstream = call->videostream; + MSVideoSize vsize = MS_VIDEO_SIZE_UNKNOWN; + if (vstream != NULL) { + vsize = video_stream_get_received_video_size(vstream); + } + return vsize; +} + #ifndef USE_BELLESIP static char *get_fixed_contact(LinphoneCore *lc, LinphoneCall *call , LinphoneProxyConfig *dest_proxy){ #else diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 5053961f9..a48ec44b8 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -589,6 +589,20 @@ LINPHONE_PUBLIC void linphone_call_enable_echo_limiter(LinphoneCall *call, bool_ **/ LINPHONE_PUBLIC bool_t linphone_call_echo_limiter_enabled(const LinphoneCall *call); +/** + * Gets the size of the video that is sent. + * @param[in] call The call for which to get the sent video size. + * @return The sent video size or MS_VIDEO_SIZE_UNKNOWN if not available. + */ +LINPHONE_PUBLIC MSVideoSize linphone_call_get_sent_video_size(const LinphoneCall *call); + +/** + * Gets the size of the video that is received. + * @param[in] call The call for which to get the received video size. + * @return The received video size or MS_VIDEO_SIZE_UNKNOWN if not available. + */ +LINPHONE_PUBLIC MSVideoSize linphone_call_get_received_video_size(const LinphoneCall *call); + /*keep this in sync with mediastreamer2/msvolume.h*/ /** diff --git a/mediastreamer2 b/mediastreamer2 index 2d30405af..e09b7d290 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 2d30405af1fbfd8192de3ebecdd9db01011b4672 +Subproject commit e09b7d2903732769e9121baf8d9d1b989ab0bb00