mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-22 13:48:09 +00:00
Merge remote-tracking branch 'private/dev_recorder'
Conflicts: mediastreamer2
This commit is contained in:
commit
570be5ea3f
7 changed files with 50 additions and 10 deletions
|
|
@ -1885,6 +1885,7 @@ static RtpProfile *make_profile(LinphoneCall *call, const SalMediaDescription *m
|
|||
const LinphoneCallParams *params=&call->params;
|
||||
|
||||
*used_pt=-1;
|
||||
|
||||
if (desc->type==SalAudio)
|
||||
bw=get_ideal_audio_bw(call,md,desc);
|
||||
else if (desc->type==SalVideo)
|
||||
|
|
@ -1911,6 +1912,7 @@ static RtpProfile *make_profile(LinphoneCall *call, const SalMediaDescription *m
|
|||
first=FALSE;
|
||||
}
|
||||
if (pt->flags & PAYLOAD_TYPE_BITRATE_OVERRIDE){
|
||||
ms_message("Payload type [%s/%i] has explicit bitrate [%i] kbit/s", pt->mime_type, pt->clock_rate, pt->normal_bitrate/1000);
|
||||
pt->normal_bitrate=get_min_bandwidth(pt->normal_bitrate,bw*1000);
|
||||
} else pt->normal_bitrate=bw*1000;
|
||||
if (desc->ptime>0){
|
||||
|
|
@ -2227,11 +2229,15 @@ void linphone_call_start_media_streams(LinphoneCall *call, bool_t all_inputs_mut
|
|||
use_arc=FALSE;
|
||||
}
|
||||
#endif
|
||||
ms_message("linphone_call_start_media_streams() call=[%p] local upload_bandwidth=[%i] kbit/s; local download_bandwidth=[%i] kbit/s",
|
||||
call, linphone_core_get_upload_bandwidth(lc),linphone_core_get_download_bandwidth(lc));
|
||||
|
||||
if (call->audiostream!=NULL) {
|
||||
linphone_call_start_audio_stream(call,cname,all_inputs_muted,send_ringbacktone,use_arc);
|
||||
}
|
||||
call->current_params.has_video=FALSE;
|
||||
if (call->videostream!=NULL) {
|
||||
if (call->audiostream) audio_stream_link_video(call->audiostream,call->videostream);
|
||||
linphone_call_start_video_stream(call,cname,all_inputs_muted);
|
||||
}
|
||||
|
||||
|
|
@ -2352,7 +2358,7 @@ static void linphone_call_log_fill_stats(LinphoneCallLog *log, MediaStream *st){
|
|||
}
|
||||
}
|
||||
|
||||
void linphone_call_stop_audio_stream(LinphoneCall *call) {
|
||||
static void linphone_call_stop_audio_stream(LinphoneCall *call) {
|
||||
if (call->audiostream!=NULL) {
|
||||
linphone_reporting_update_media_info(call, LINPHONE_CALL_STATS_AUDIO);
|
||||
media_stream_reclaim_sessions(&call->audiostream->ms,&call->sessions[0]);
|
||||
|
|
@ -2380,7 +2386,7 @@ void linphone_call_stop_audio_stream(LinphoneCall *call) {
|
|||
}
|
||||
}
|
||||
|
||||
void linphone_call_stop_video_stream(LinphoneCall *call) {
|
||||
static void linphone_call_stop_video_stream(LinphoneCall *call) {
|
||||
#ifdef VIDEO_ENABLED
|
||||
if (call->videostream!=NULL){
|
||||
linphone_reporting_update_media_info(call, LINPHONE_CALL_STATS_VIDEO);
|
||||
|
|
@ -2404,6 +2410,8 @@ static void unset_rtp_profile(LinphoneCall *call, int i){
|
|||
|
||||
void linphone_call_stop_media_streams(LinphoneCall *call){
|
||||
if (call->audiostream || call->videostream) {
|
||||
if (call->audiostream && call->videostream)
|
||||
audio_stream_unlink_video(call->audiostream, call->videostream);
|
||||
linphone_call_stop_audio_stream(call);
|
||||
linphone_call_stop_video_stream(call);
|
||||
|
||||
|
|
|
|||
|
|
@ -5939,7 +5939,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");
|
||||
|
|
|
|||
|
|
@ -2612,6 +2612,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
|
||||
|
|
|
|||
|
|
@ -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_RECORDER_ID)){
|
||||
core->supported_formats[1]=mkv;
|
||||
}
|
||||
}
|
||||
return core->supported_formats;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -375,8 +375,6 @@ void linphone_call_init_video_stream(LinphoneCall *call);
|
|||
void linphone_call_init_media_streams(LinphoneCall *call);
|
||||
void linphone_call_start_media_streams(LinphoneCall *call, bool_t all_inputs_muted, bool_t send_ringbacktone);
|
||||
void linphone_call_start_media_streams_for_ice_gathering(LinphoneCall *call);
|
||||
void linphone_call_stop_audio_stream(LinphoneCall *call);
|
||||
void linphone_call_stop_video_stream(LinphoneCall *call);
|
||||
void linphone_call_stop_media_streams(LinphoneCall *call);
|
||||
void linphone_call_delete_ice_session(LinphoneCall *call);
|
||||
void linphone_call_delete_upnp_session(LinphoneCall *call);
|
||||
|
|
@ -727,6 +725,7 @@ struct _LinphoneCore
|
|||
MSList *tones;
|
||||
LinphoneReason chat_deny_code;
|
||||
char *file_transfer_server;
|
||||
const char **supported_formats;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
18
gtk/main.c
18
gtk/main.c
|
|
@ -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"));
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 84ce0753edfae002c0f5bcff17f80f6f9c285f14
|
||||
Subproject commit 5313bf3a57474411efce3b8f60a8c7190554a619
|
||||
Loading…
Add table
Reference in a new issue