Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
cb7d8ff9
Commit
cb7d8ff9
authored
Aug 12, 2013
by
Ghislain MARY
Browse files
Change API to access sent and received video size via call parameters.
parent
67962422
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
40 deletions
+37
-40
coreapi/linphonecall.c
coreapi/linphonecall.c
+20
-26
coreapi/linphonecore.h
coreapi/linphonecore.h
+15
-14
coreapi/private.h
coreapi/private.h
+2
-0
No files found.
coreapi/linphonecall.c
View file @
cb7d8ff9
...
...
@@ -815,6 +815,18 @@ void linphone_call_unref(LinphoneCall *obj){
* Returns current parameters associated to the call.
**/
const
LinphoneCallParams
*
linphone_call_get_current_params
(
LinphoneCall
*
call
){
VideoStream
*
vstream
;
MS_VIDEO_SIZE_ASSIGN
(
call
->
current_params
.
sent_vsize
,
UNKNOWN
);
MS_VIDEO_SIZE_ASSIGN
(
call
->
current_params
.
recv_vsize
,
UNKNOWN
);
#ifdef VIDEO_ENABLED
vstream
=
call
->
videostream
;
if
(
vstream
!=
NULL
)
{
call
->
current_params
.
sent_vsize
=
video_stream_get_sent_video_size
(
vstream
);
call
->
current_params
.
recv_vsize
=
video_stream_get_received_video_size
(
vstream
);
}
#endif
return
&
call
->
current_params
;
}
...
...
@@ -1061,6 +1073,14 @@ const PayloadType* linphone_call_params_get_used_video_codec(const LinphoneCallP
return
cp
->
video_codec
;
}
MSVideoSize
linphone_call_params_get_sent_video_size
(
const
LinphoneCallParams
*
cp
)
{
return
cp
->
sent_vsize
;
}
MSVideoSize
linphone_call_params_get_received_video_size
(
const
LinphoneCallParams
*
cp
)
{
return
cp
->
recv_vsize
;
}
/**
* @ingroup call_control
* Use to know if this call has been configured in low bandwidth mode.
...
...
@@ -2508,32 +2528,6 @@ 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
)
{
MSVideoSize
vsize
;
VideoStream
*
vstream
;
MS_VIDEO_SIZE_ASSIGN
(
vsize
,
UNKNOWN
);
#ifdef VIDEO_ENABLED
vstream
=
call
->
videostream
;
if
(
vstream
!=
NULL
)
{
vsize
=
video_stream_get_sent_video_size
(
vstream
);
}
#endif
return
vsize
;
}
MSVideoSize
linphone_call_get_received_video_size
(
const
LinphoneCall
*
call
)
{
MSVideoSize
vsize
;
VideoStream
*
vstream
;
MS_VIDEO_SIZE_ASSIGN
(
vsize
,
UNKNOWN
);
#ifdef VIDEO_ENABLED
vstream
=
call
->
videostream
;
if
(
vstream
!=
NULL
)
{
vsize
=
video_stream_get_received_video_size
(
vstream
);
}
#endif
return
vsize
;
}
#ifndef USE_BELLESIP
static
char
*
get_fixed_contact
(
LinphoneCore
*
lc
,
LinphoneCall
*
call
,
LinphoneProxyConfig
*
dest_proxy
){
#else
...
...
coreapi/linphonecore.h
View file @
cb7d8ff9
...
...
@@ -283,6 +283,21 @@ LINPHONE_PUBLIC const char *linphone_call_params_get_record_file(const LinphoneC
LINPHONE_PUBLIC
void
linphone_call_params_add_custom_header
(
LinphoneCallParams
*
params
,
const
char
*
header_name
,
const
char
*
header_value
);
LINPHONE_PUBLIC
const
char
*
linphone_call_params_get_custom_header
(
const
LinphoneCallParams
*
params
,
const
char
*
header_name
);
/**
* Gets the size of the video that is sent.
* @param[in] cp The call parameters 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_params_get_sent_video_size
(
const
LinphoneCallParams
*
cp
);
/**
* Gets the size of the video that is received.
* @param[in] cp The call paramaters 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_params_get_received_video_size
(
const
LinphoneCallParams
*
cp
);
/*
* Note for developers: this enum must be kept synchronized with the SalPrivacy enum declared in sal.h
*/
...
...
@@ -592,20 +607,6 @@ 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*/
/**
...
...
coreapi/private.h
View file @
cb7d8ff9
...
...
@@ -80,6 +80,8 @@ struct _LinphoneCallParams{
LinphoneMediaEncryption
media_encryption
;
PayloadType
*
audio_codec
;
/*audio codec currently in use */
PayloadType
*
video_codec
;
/*video codec currently in use */
MSVideoSize
sent_vsize
;
/* Size of the video currently being sent */
MSVideoSize
recv_vsize
;
/* Size of the video currently being received */
int
down_bw
;
int
up_bw
;
int
down_ptime
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment