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
40112833
Commit
40112833
authored
Apr 19, 2017
by
Ghislain MARY
Browse files
Add linphone_video_definition_clone().
parent
b6f74357
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
2 deletions
+12
-2
coreapi/factory.c
coreapi/factory.c
+2
-2
coreapi/video_definition.c
coreapi/video_definition.c
+3
-0
include/linphone/video_definition.h
include/linphone/video_definition.h
+7
-0
No files found.
coreapi/factory.c
View file @
40112833
...
...
@@ -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
;
...
...
coreapi/video_definition.c
View file @
40112833
...
...
@@ -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
;
...
...
include/linphone/video_definition.h
View file @
40112833
...
...
@@ -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
...
...
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