mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-30 17:59:21 +00:00
Add linphone_video_definition_clone().
This commit is contained in:
parent
b6f74357e0
commit
4011283313
3 changed files with 12 additions and 2 deletions
|
|
@ -206,7 +206,7 @@ LinphoneVideoDefinition * linphone_factory_find_supported_video_definition(const
|
|||
LinphoneVideoDefinition *svdef = (LinphoneVideoDefinition *)bctbx_list_get_data(item);
|
||||
if (linphone_video_definition_equals(svdef, searched_vdef)) {
|
||||
linphone_video_definition_unref(searched_vdef);
|
||||
return svdef;
|
||||
return linphone_video_definition_clone(svdef);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -220,7 +220,7 @@ LinphoneVideoDefinition * linphone_factory_find_supported_video_definition_by_na
|
|||
for (item = supported; item != NULL; item = bctbx_list_next(item)) {
|
||||
LinphoneVideoDefinition *svdef = (LinphoneVideoDefinition *)bctbx_list_get_data(item);
|
||||
if (strcmp(linphone_video_definition_get_name(svdef), name) == 0) {
|
||||
return svdef;
|
||||
return linphone_video_definition_clone(svdef);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -66,6 +66,9 @@ void linphone_video_definition_set_user_data(LinphoneVideoDefinition *vdef, void
|
|||
vdef->user_data = ud;
|
||||
}
|
||||
|
||||
LinphoneVideoDefinition * linphone_video_definition_clone(const LinphoneVideoDefinition *vdef) {
|
||||
return linphone_video_definition_new(linphone_video_definition_get_width(vdef), linphone_video_definition_get_height(vdef), linphone_video_definition_get_name(vdef));
|
||||
}
|
||||
|
||||
unsigned int linphone_video_definition_get_width(const LinphoneVideoDefinition *vdef) {
|
||||
return vdef->width;
|
||||
|
|
|
|||
|
|
@ -61,6 +61,13 @@ LINPHONE_PUBLIC void *linphone_video_definition_get_user_data(const LinphoneVide
|
|||
**/
|
||||
LINPHONE_PUBLIC void linphone_video_definition_set_user_data(LinphoneVideoDefinition *vdef, void *ud);
|
||||
|
||||
/**
|
||||
* Clone a video definition.
|
||||
* @param[in] vdef LinphoneVideoDefinition object to be cloned
|
||||
* @return The new clone of the video definition
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneVideoDefinition * linphone_video_definition_clone(const LinphoneVideoDefinition *vdef);
|
||||
|
||||
/**
|
||||
* Get the width of the video definition.
|
||||
* @param[in] vdef LinphoneVideoDefinition object
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue