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
ae4298fa
Commit
ae4298fa
authored
Jun 19, 2014
by
Simon Morlat
Browse files
video recorder in place
parent
26e13f37
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
6 deletions
+40
-6
coreapi/linphonecore.c
coreapi/linphonecore.c
+1
-1
coreapi/linphonecore.h
coreapi/linphonecore.h
+8
-0
coreapi/misc.c
coreapi/misc.c
+15
-0
coreapi/private.h
coreapi/private.h
+1
-0
gtk/main.c
gtk/main.c
+14
-4
mediastreamer2
mediastreamer2
+1
-1
No files found.
coreapi/linphonecore.c
View file @
ae4298fa
...
...
@@ -5930,7 +5930,7 @@ static void linphone_core_uninit(LinphoneCore *lc)
linphone_presence_model_unref
(
lc
->
presence_model
);
}
linphone_core_free_payload_types
(
lc
);
if
(
lc
->
supported_formats
)
ms_free
(
lc
->
supported_formats
);
linphone_core_message_storage_close
(
lc
);
ms_exit
();
linphone_core_set_state
(
lc
,
LinphoneGlobalOff
,
"Off"
);
...
...
coreapi/linphonecore.h
View file @
ae4298fa
...
...
@@ -2602,6 +2602,14 @@ LINPHONE_PUBLIC void linphone_core_set_tone(LinphoneCore *lc, LinphoneToneID id,
* */
LINPHONE_PUBLIC
void
linphone_core_set_file_transfer_server
(
LinphoneCore
*
core
,
const
char
*
server_url
);
/**
* Returns a null terminated table of strings containing the file format extension supported for call recording.
* @param core the core
* @return the supported formats, typically 'wav' and 'mkv'
* @ingroup media_parameters
**/
LINPHONE_PUBLIC
const
char
**
linphone_core_get_supported_file_formats
(
LinphoneCore
*
core
);
#ifdef __cplusplus
}
#endif
...
...
coreapi/misc.c
View file @
ae4298fa
...
...
@@ -1522,3 +1522,18 @@ const MSCryptoSuite * linphone_core_get_srtp_crypto_suites(LinphoneCore *lc){
lc
->
rtp_conf
.
srtp_suites
=
result
;
return
result
;
}
const
char
**
linphone_core_get_supported_file_formats
(
LinphoneCore
*
core
){
static
const
char
*
mkv
=
"mkv"
;
static
const
char
*
wav
=
"wav"
;
if
(
core
->
supported_formats
==
NULL
){
core
->
supported_formats
=
ms_malloc0
(
3
*
sizeof
(
char
*
));
core
->
supported_formats
[
0
]
=
wav
;
if
(
ms_factory_lookup_filter_by_id
(
ms_factory_get_fallback
(),
MS_MKV_WRITER_ID
)){
core
->
supported_formats
[
1
]
=
mkv
;
}
}
return
core
->
supported_formats
;
}
coreapi/private.h
View file @
ae4298fa
...
...
@@ -726,6 +726,7 @@ struct _LinphoneCore
MSList
*
tones
;
LinphoneReason
chat_deny_code
;
char
*
file_transfer_server
;
const
char
**
supported_formats
;
};
...
...
gtk/main.c
View file @
ae4298fa
...
...
@@ -983,6 +983,9 @@ gchar *linphone_gtk_get_record_path(const LinphoneAddress *address, gboolean is_
char
date
[
64
]
=
{
0
};
time_t
curtime
=
time
(
NULL
);
struct
tm
loctime
;
const
char
**
fmts
=
linphone_core_get_supported_file_formats
(
linphone_gtk_get_core
());
int
i
;
const
char
*
ext
=
"wav"
;
#ifdef WIN32
loctime
=*
localtime
(
&
curtime
);
...
...
@@ -991,19 +994,26 @@ gchar *linphone_gtk_get_record_path(const LinphoneAddress *address, gboolean is_
#endif
snprintf
(
date
,
sizeof
(
date
)
-
1
,
"%i%02i%02i-%02i%02i"
,
loctime
.
tm_year
+
1900
,
loctime
.
tm_mon
+
1
,
loctime
.
tm_mday
,
loctime
.
tm_hour
,
loctime
.
tm_min
);
for
(
i
=
0
;
fmts
[
i
]
!=
NULL
;
++
i
){
if
(
strcmp
(
fmts
[
i
],
"mkv"
)
==
0
){
ext
=
"mkv"
;
break
;
}
}
if
(
address
){
id
=
linphone_address_get_username
(
address
);
if
(
id
==
NULL
)
id
=
linphone_address_get_domain
(
address
);
}
if
(
is_conference
){
snprintf
(
filename
,
sizeof
(
filename
)
-
1
,
"%s-conference-%s.
wav
"
,
snprintf
(
filename
,
sizeof
(
filename
)
-
1
,
"%s-conference-%s.
%s
"
,
linphone_gtk_get_ui_config
(
"title"
,
"Linphone"
),
date
);
date
,
ext
);
}
else
{
snprintf
(
filename
,
sizeof
(
filename
)
-
1
,
"%s-call-%s-%s.
wav
"
,
snprintf
(
filename
,
sizeof
(
filename
)
-
1
,
"%s-call-%s-%s.
%s
"
,
linphone_gtk_get_ui_config
(
"title"
,
"Linphone"
),
date
,
id
);
id
,
ext
);
}
if
(
!
dir
)
{
ms_message
(
"No directory for music, using [%s] instead"
,
dir
=
getenv
(
"HOME"
));
...
...
mediastreamer2
@
a7846bc2
Subproject commit
df42f0d73d930079c43ef92808529a4716e72d99
Subproject commit
a7846bc24f3e5bb1cc89faf879f6d64638665585
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