mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-24 22:58:13 +00:00
Use real pointer for C++ object inside LinphoneCallParams as it is a ClonableObject.
This commit is contained in:
parent
a5ce479aa3
commit
4a13ac6a7a
37 changed files with 335 additions and 339 deletions
|
|
@ -70,7 +70,6 @@ set(LINPHONE_SOURCE_FILES_C
|
|||
buffer.c
|
||||
callbacks.c
|
||||
call_log.c
|
||||
call_params.c
|
||||
carddav.c
|
||||
chat.c
|
||||
chat_file_transfer.c
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ int linphone_call_log_get_duration(LinphoneCallLog *cl){
|
|||
return cl->duration;
|
||||
}
|
||||
|
||||
LinphoneAddress *linphone_call_log_get_from_address(LinphoneCallLog *cl){
|
||||
const LinphoneAddress *linphone_call_log_get_from_address(LinphoneCallLog *cl){
|
||||
return cl->from;
|
||||
}
|
||||
|
||||
|
|
@ -211,7 +211,7 @@ LinphoneCallStatus linphone_call_log_get_status(LinphoneCallLog *cl){
|
|||
return cl->status;
|
||||
}
|
||||
|
||||
LinphoneAddress *linphone_call_log_get_to_address(LinphoneCallLog *cl){
|
||||
const LinphoneAddress *linphone_call_log_get_to_address(LinphoneCallLog *cl){
|
||||
return cl->to;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -191,9 +191,9 @@ BELLE_SIP_INSTANCIATE_VPTR(LinphoneChatRoom, belle_sip_object_t,
|
|||
LinphoneChatRoom *_linphone_core_create_chat_room_base(LinphoneCore *lc, const LinphoneAddress *addr) {
|
||||
LinphoneChatRoom *cr = belle_sip_object_new(LinphoneChatRoom);
|
||||
if (linphone_core_realtime_text_enabled(lc))
|
||||
cr->cr = new LinphonePrivate::RealTimeTextChatRoom(lc, *L_GET_CPP_PTR_FROM_C_STRUCT(addr, Address));
|
||||
cr->cr = new LinphonePrivate::RealTimeTextChatRoom(lc, *L_GET_CPP_PTR_FROM_C_STRUCT(addr, Address, Address));
|
||||
else
|
||||
cr->cr = new LinphonePrivate::BasicChatRoom(lc, *L_GET_CPP_PTR_FROM_C_STRUCT(addr, Address));
|
||||
cr->cr = new LinphonePrivate::BasicChatRoom(lc, *L_GET_CPP_PTR_FROM_C_STRUCT(addr, Address, Address));
|
||||
L_GET_PRIVATE(cr->cr)->setCBackPointer(cr);
|
||||
return cr;
|
||||
}
|
||||
|
|
@ -257,9 +257,20 @@ LinphoneChatRoom *linphone_core_get_chat_room(LinphoneCore *lc, const LinphoneAd
|
|||
}
|
||||
|
||||
LinphoneChatRoom * linphone_core_create_client_group_chat_room(LinphoneCore *lc, bctbx_list_t *addresses) {
|
||||
const char *factoryUri = linphone_core_get_chat_conference_factory_uri(lc);
|
||||
if (!factoryUri)
|
||||
return nullptr;
|
||||
LinphoneChatRoom *cr = belle_sip_object_new(LinphoneChatRoom);
|
||||
LinphoneAddress *factoryAddr = linphone_address_new(factoryUri);
|
||||
LinphoneProxyConfig *proxy = linphone_core_lookup_known_proxy(lc, factoryAddr);
|
||||
linphone_address_unref(factoryAddr);
|
||||
std::string from;
|
||||
if (proxy)
|
||||
from = L_GET_CPP_PTR_FROM_C_STRUCT(linphone_proxy_config_get_identity_address(proxy), Address, Address)->asString();
|
||||
if (from.empty())
|
||||
from = linphone_core_get_primary_contact(lc);
|
||||
LinphonePrivate::Address me(from);
|
||||
std::list<LinphonePrivate::Address> l = L_GET_CPP_LIST_OF_CPP_OBJ_FROM_C_LIST_OF_STRUCT_PTR(addresses, Address);
|
||||
LinphonePrivate::Address me; // TODO
|
||||
cr->cr = new LinphonePrivate::ClientGroupChatRoom(lc, me, l);
|
||||
L_GET_PRIVATE(cr->cr)->setCBackPointer(cr);
|
||||
return cr;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
// For migration purpose.
|
||||
#include "address/address-p.h"
|
||||
#include "c-wrapper/c-private-types.h"
|
||||
#include "c-wrapper/c-tools.h"
|
||||
#include "call/call.h"
|
||||
#include "call/call-p.h"
|
||||
|
|
@ -289,7 +288,9 @@ LinphoneCall * linphone_call_new_outgoing(LinphoneCore *lc, const LinphoneAddres
|
|||
call->paramsCache = linphone_call_params_new_for_wrapper();
|
||||
call->remoteParamsCache = linphone_call_params_new_for_wrapper();
|
||||
call->remoteAddressCache = linphone_address_new(nullptr);
|
||||
call->call = std::make_shared<LinphonePrivate::Call>(call, lc, LinphoneCallOutgoing, *L_GET_CPP_PTR_FROM_C_STRUCT(from, Address), *L_GET_CPP_PTR_FROM_C_STRUCT(to, Address), cfg, nullptr, linphone_call_params_get_cpp_obj(params));
|
||||
call->call = std::make_shared<LinphonePrivate::Call>(call, lc, LinphoneCallOutgoing,
|
||||
*L_GET_CPP_PTR_FROM_C_STRUCT(from, Address, Address), *L_GET_CPP_PTR_FROM_C_STRUCT(to, Address, Address),
|
||||
cfg, nullptr, L_GET_CPP_PTR_FROM_C_STRUCT(params, MediaSessionParams, CallParams));
|
||||
return call;
|
||||
}
|
||||
|
||||
|
|
@ -299,7 +300,9 @@ LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, const LinphoneAddres
|
|||
call->paramsCache = linphone_call_params_new_for_wrapper();
|
||||
call->remoteParamsCache = linphone_call_params_new_for_wrapper();
|
||||
call->remoteAddressCache = linphone_address_new(nullptr);
|
||||
call->call = std::make_shared<LinphonePrivate::Call>(call, lc, LinphoneCallIncoming, *L_GET_CPP_PTR_FROM_C_STRUCT(from, Address), *L_GET_CPP_PTR_FROM_C_STRUCT(to, Address), nullptr, op, nullptr);
|
||||
call->call = std::make_shared<LinphonePrivate::Call>(call, lc, LinphoneCallIncoming,
|
||||
*L_GET_CPP_PTR_FROM_C_STRUCT(from, Address, Address), *L_GET_CPP_PTR_FROM_C_STRUCT(to, Address, Address),
|
||||
nullptr, op, nullptr);
|
||||
L_GET_PRIVATE(linphone_call_get_cpp_obj(call).get())->initiateIncoming();
|
||||
return call;
|
||||
}
|
||||
|
|
@ -453,20 +456,20 @@ void linphone_call_unref(LinphoneCall *obj){
|
|||
}
|
||||
|
||||
const LinphoneCallParams * linphone_call_get_current_params(LinphoneCall *call){
|
||||
call->currentParamsCache->msp = linphone_call_get_cpp_obj(call)->getCurrentParams();
|
||||
L_SET_CPP_PTR_FROM_C_STRUCT(call->currentParamsCache, linphone_call_get_cpp_obj(call)->getCurrentParams());
|
||||
return call->currentParamsCache;
|
||||
}
|
||||
|
||||
const LinphoneCallParams * linphone_call_get_remote_params(LinphoneCall *call) {
|
||||
call->remoteParamsCache->msp = linphone_call_get_cpp_obj(call)->getRemoteParams();
|
||||
if (call->remoteParamsCache->msp)
|
||||
return call->remoteParamsCache;
|
||||
return nullptr;
|
||||
const LinphonePrivate::MediaSessionParams *remoteParams = linphone_call_get_cpp_obj(call)->getRemoteParams();
|
||||
if (!remoteParams)
|
||||
return nullptr;
|
||||
L_SET_CPP_PTR_FROM_C_STRUCT(call->remoteParamsCache, remoteParams);
|
||||
return call->remoteParamsCache;
|
||||
}
|
||||
|
||||
const LinphoneAddress * linphone_call_get_remote_address(const LinphoneCall *call) {
|
||||
std::shared_ptr<LinphonePrivate::Address> addr = std::make_shared<LinphonePrivate::Address>(linphone_call_get_cpp_obj(call)->getRemoteAddress());
|
||||
L_SET_CPP_PTR_FROM_C_STRUCT(call->remoteAddressCache, addr);
|
||||
L_SET_CPP_PTR_FROM_C_STRUCT(call->remoteAddressCache, &linphone_call_get_cpp_obj(call)->getRemoteAddress());
|
||||
return call->remoteAddressCache;
|
||||
}
|
||||
|
||||
|
|
@ -1071,7 +1074,7 @@ void _linphone_call_set_new_params(LinphoneCall *call, const LinphoneCallParams
|
|||
}
|
||||
|
||||
const LinphoneCallParams * linphone_call_get_params(LinphoneCall *call) {
|
||||
call->paramsCache->msp = linphone_call_get_cpp_obj(call)->getParams();
|
||||
L_SET_CPP_PTR_FROM_C_STRUCT(call->paramsCache, linphone_call_get_cpp_obj(call)->getParams());
|
||||
return call->paramsCache;
|
||||
}
|
||||
|
||||
|
|
@ -1281,7 +1284,7 @@ LinphoneStatus linphone_call_accept(LinphoneCall *call) {
|
|||
}
|
||||
|
||||
LinphoneStatus linphone_call_accept_with_params(LinphoneCall *call, const LinphoneCallParams *params) {
|
||||
return linphone_call_get_cpp_obj(call)->accept(params ? linphone_call_params_get_cpp_obj(params) : nullptr);
|
||||
return linphone_call_get_cpp_obj(call)->accept(params ? L_GET_CPP_PTR_FROM_C_STRUCT(params, MediaSessionParams, CallParams) : nullptr);
|
||||
}
|
||||
|
||||
LinphoneStatus linphone_call_accept_early_media(LinphoneCall* call) {
|
||||
|
|
@ -1289,11 +1292,11 @@ LinphoneStatus linphone_call_accept_early_media(LinphoneCall* call) {
|
|||
}
|
||||
|
||||
LinphoneStatus linphone_call_accept_early_media_with_params(LinphoneCall *call, const LinphoneCallParams *params) {
|
||||
return linphone_call_get_cpp_obj(call)->acceptEarlyMedia(params ? linphone_call_params_get_cpp_obj(params) : nullptr);
|
||||
return linphone_call_get_cpp_obj(call)->acceptEarlyMedia(params ? L_GET_CPP_PTR_FROM_C_STRUCT(params, MediaSessionParams, CallParams) : nullptr);
|
||||
}
|
||||
|
||||
LinphoneStatus linphone_call_update(LinphoneCall *call, const LinphoneCallParams *params) {
|
||||
return linphone_call_get_cpp_obj(call)->update(params ? linphone_call_params_get_cpp_obj(params) : nullptr);
|
||||
return linphone_call_get_cpp_obj(call)->update(params ? L_GET_CPP_PTR_FROM_C_STRUCT(params, MediaSessionParams, CallParams) : nullptr);
|
||||
}
|
||||
|
||||
int linphone_call_start_update(LinphoneCall *call) {
|
||||
|
|
@ -1324,7 +1327,7 @@ int linphone_call_start_accept_update(LinphoneCall *call, LinphoneCallState next
|
|||
}
|
||||
|
||||
LinphoneStatus linphone_call_accept_update(LinphoneCall *call, const LinphoneCallParams *params) {
|
||||
return linphone_call_get_cpp_obj(call)->acceptUpdate(params ? linphone_call_params_get_cpp_obj(params) : nullptr);
|
||||
return linphone_call_get_cpp_obj(call)->acceptUpdate(params ? L_GET_CPP_PTR_FROM_C_STRUCT(params, MediaSessionParams, CallParams) : nullptr);
|
||||
}
|
||||
|
||||
LinphoneStatus linphone_call_transfer(LinphoneCall *call, const char *refer_to) {
|
||||
|
|
|
|||
|
|
@ -3359,7 +3359,7 @@ static bctbx_list_t *make_routes_for_proxy(LinphoneProxyConfig *proxy, const Lin
|
|||
ret=bctbx_list_append(ret,sal_address_new(local_route));
|
||||
}
|
||||
if (srv_route){
|
||||
ret=bctbx_list_append(ret,sal_address_clone(L_GET_PRIVATE_FROM_C_STRUCT(srv_route, Address)->getInternalAddress()));
|
||||
ret=bctbx_list_append(ret,sal_address_clone(L_GET_PRIVATE_FROM_C_STRUCT(srv_route, Address, Address)->getInternalAddress()));
|
||||
}
|
||||
if (ret==NULL){
|
||||
/*if the proxy address matches the domain part of the destination, then use the same transport
|
||||
|
|
@ -5918,7 +5918,7 @@ void friends_config_uninit(LinphoneCore* lc)
|
|||
ms_message("Destroying friends done.");
|
||||
}
|
||||
|
||||
LpConfig * linphone_core_get_config(LinphoneCore *lc){
|
||||
LpConfig * linphone_core_get_config(const LinphoneCore *lc){
|
||||
return lc->config;
|
||||
}
|
||||
|
||||
|
|
@ -6671,7 +6671,7 @@ void linphone_core_set_media_encryption_mandatory(LinphoneCore *lc, bool_t m) {
|
|||
}
|
||||
|
||||
void linphone_core_init_default_params(LinphoneCore*lc, LinphoneCallParams *params) {
|
||||
linphone_call_params_get_cpp_obj(params)->initDefault(lc);
|
||||
L_GET_CPP_PTR_FROM_C_STRUCT(params, MediaSessionParams, CallParams)->initDefault(lc);
|
||||
}
|
||||
|
||||
void linphone_core_set_device_identifier(LinphoneCore *lc,const char* device_id) {
|
||||
|
|
@ -7085,6 +7085,14 @@ LinphoneConference *linphone_core_get_conference(LinphoneCore *lc) {
|
|||
return lc->conf_ctx;
|
||||
}
|
||||
|
||||
void linphone_core_set_chat_conference_factory_uri(LinphoneCore *lc, const char *uri) {
|
||||
lp_config_set_string(linphone_core_get_config(lc), "misc", "chat_conference_factory_uri", uri);
|
||||
}
|
||||
|
||||
const char * linphone_core_get_chat_conference_factory_uri(const LinphoneCore *lc) {
|
||||
return lp_config_get_string(linphone_core_get_config(lc), "misc", "chat_conference_factory_uri", nullptr);
|
||||
}
|
||||
|
||||
void linphone_core_set_tls_cert(LinphoneCore *lc, const char *tls_cert) {
|
||||
if (lc->tls_cert) {
|
||||
ms_free(lc->tls_cert);
|
||||
|
|
|
|||
|
|
@ -500,7 +500,7 @@ static void linphone_proxy_config_register(LinphoneProxyConfig *cfg){
|
|||
linphone_configure_op(cfg->lc, cfg->op, cfg->identity_address, cfg->sent_headers, FALSE);
|
||||
|
||||
if ((contact=guess_contact_for_register(cfg))) {
|
||||
sal_op_set_contact_address(cfg->op, L_GET_PRIVATE_FROM_C_STRUCT(contact, Address)->getInternalAddress());
|
||||
sal_op_set_contact_address(cfg->op, L_GET_PRIVATE_FROM_C_STRUCT(contact, Address, Address)->getInternalAddress());
|
||||
linphone_address_unref(contact);
|
||||
}
|
||||
|
||||
|
|
@ -511,7 +511,7 @@ static void linphone_proxy_config_register(LinphoneProxyConfig *cfg){
|
|||
proxy_string,
|
||||
cfg->reg_identity,
|
||||
cfg->expires,
|
||||
cfg->pending_contact ? L_GET_PRIVATE_FROM_C_STRUCT(cfg->pending_contact, Address)->getInternalAddress() : NULL
|
||||
cfg->pending_contact ? L_GET_PRIVATE_FROM_C_STRUCT(cfg->pending_contact, Address, Address)->getInternalAddress() : NULL
|
||||
)==0) {
|
||||
if (cfg->pending_contact) {
|
||||
linphone_address_unref(cfg->pending_contact);
|
||||
|
|
@ -1393,7 +1393,7 @@ const char* linphone_proxy_config_get_transport(const LinphoneProxyConfig *cfg)
|
|||
bool_t destroy_route_addr = FALSE;
|
||||
|
||||
if (linphone_proxy_config_get_service_route(cfg)) {
|
||||
route_addr = L_GET_PRIVATE_FROM_C_STRUCT(linphone_proxy_config_get_service_route(cfg), Address)->getInternalAddress();
|
||||
route_addr = L_GET_PRIVATE_FROM_C_STRUCT(linphone_proxy_config_get_service_route(cfg), Address, Address)->getInternalAddress();
|
||||
} else if (linphone_proxy_config_get_route(cfg)) {
|
||||
addr=linphone_proxy_config_get_route(cfg);
|
||||
} else if(linphone_proxy_config_get_addr(cfg)) {
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ LINPHONE_PUBLIC int linphone_call_log_get_duration(LinphoneCallLog *cl);
|
|||
* @param[in] cl LinphoneCallLog object
|
||||
* @return The origin address (ie from) of the call.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAddress * linphone_call_log_get_from_address(LinphoneCallLog *cl);
|
||||
LINPHONE_PUBLIC const LinphoneAddress * linphone_call_log_get_from_address(LinphoneCallLog *cl);
|
||||
|
||||
/**
|
||||
* Get the RTP statistics computed locally regarding the call.
|
||||
|
|
@ -123,7 +123,7 @@ LINPHONE_PUBLIC LinphoneCallStatus linphone_call_log_get_status(LinphoneCallLog
|
|||
* @param[in] cl LinphoneCallLog object
|
||||
* @return The destination address (ie to) of the call.
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneAddress * linphone_call_log_get_to_address(LinphoneCallLog *cl);
|
||||
LINPHONE_PUBLIC const LinphoneAddress * linphone_call_log_get_to_address(LinphoneCallLog *cl);
|
||||
|
||||
/**
|
||||
* Associate a persistent reference key to the call log.
|
||||
|
|
|
|||
|
|
@ -3908,7 +3908,7 @@ LINPHONE_PUBLIC void linphone_core_set_user_data(LinphoneCore *lc, void *userdat
|
|||
* sections and pairs of key=value in the configuration file.
|
||||
* @ingroup misc
|
||||
**/
|
||||
LINPHONE_PUBLIC LinphoneConfig * linphone_core_get_config(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC LinphoneConfig * linphone_core_get_config(const LinphoneCore *lc);
|
||||
|
||||
/**
|
||||
* Create a LpConfig object from a user config file.
|
||||
|
|
@ -4187,6 +4187,10 @@ LINPHONE_PUBLIC LinphoneStatus linphone_core_stop_conference_recording(LinphoneC
|
|||
*/
|
||||
LINPHONE_PUBLIC LinphoneConference *linphone_core_get_conference(LinphoneCore *lc);
|
||||
|
||||
void linphone_core_set_chat_conference_factory_uri(LinphoneCore *lc, const char *uri);
|
||||
|
||||
const char * linphone_core_get_chat_conference_factory_uri(const LinphoneCore *lc);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
set(LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES
|
||||
address/address-p.h
|
||||
address/address.h
|
||||
c-wrapper/c-private-types.h
|
||||
c-wrapper/c-tools.h
|
||||
call/call-listener.h
|
||||
call/call-p.h
|
||||
|
|
@ -98,6 +97,7 @@ set(LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES
|
|||
set(LINPHONE_CXX_OBJECTS_SOURCE_FILES
|
||||
address/address.cpp
|
||||
c-wrapper/api/c-address.cpp
|
||||
c-wrapper/api/c-call-params.cpp
|
||||
c-wrapper/api/c-event-log.cpp
|
||||
call/call.cpp
|
||||
chat/basic-chat-room.cpp
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
L_DECLARE_C_CLONABLE_STRUCT_IMPL(Address, address);
|
||||
L_DECLARE_C_CLONABLE_STRUCT_IMPL(Address, Address, address);
|
||||
|
||||
LinphoneAddress *linphone_address_new (const char *address) {
|
||||
LINPHONE_NAMESPACE::Address *cppPtr = new LINPHONE_NAMESPACE::Address(L_C_TO_STRING(address));
|
||||
|
|
|
|||
|
|
@ -20,14 +20,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "linphone/call_params.h"
|
||||
#include "private.h"
|
||||
|
||||
#include "c-wrapper/c-private-types.h"
|
||||
#include "c-wrapper/c-tools.h"
|
||||
#include "conference/params/media-session-params.h"
|
||||
#include "conference/params/call-session-params-p.h"
|
||||
#include "conference/params/media-session-params-p.h"
|
||||
|
||||
|
||||
BELLE_SIP_DECLARE_VPTR_NO_EXPORT(LinphoneCallParams);
|
||||
#define GET_CALL_CPP_PTR(obj) L_GET_CPP_PTR_FROM_C_STRUCT(obj, CallSessionParams, CallParams)
|
||||
#define GET_CALL_CPP_PRIVATE_PTR(obj) L_GET_PRIVATE_FROM_C_STRUCT(obj, CallSessionParams, CallParams)
|
||||
#define GET_MEDIA_CPP_PTR(obj) L_GET_CPP_PTR_FROM_C_STRUCT(obj, MediaSessionParams, CallParams)
|
||||
#define GET_MEDIA_CPP_PRIVATE_PTR(obj) L_GET_PRIVATE_FROM_C_STRUCT(obj, MediaSessionParams, CallParams)
|
||||
|
||||
|
||||
L_DECLARE_C_CLONABLE_STRUCT_IMPL(MediaSessionParams, CallParams, call_params)
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
|
|
@ -35,7 +40,7 @@ BELLE_SIP_DECLARE_VPTR_NO_EXPORT(LinphoneCallParams);
|
|||
******************************************************************************/
|
||||
|
||||
SalMediaProto get_proto_from_call_params(const LinphoneCallParams *params) {
|
||||
return params->msp->getMediaProto();
|
||||
return GET_MEDIA_CPP_PTR(params)->getMediaProto();
|
||||
}
|
||||
|
||||
SalStreamDir sal_dir_from_call_params_dir(LinphoneMediaDirection cpdir) {
|
||||
|
|
@ -78,15 +83,15 @@ SalStreamDir get_video_dir_from_call_params(const LinphoneCallParams *params) {
|
|||
}
|
||||
|
||||
void linphone_call_params_set_custom_headers(LinphoneCallParams *params, const SalCustomHeader *ch) {
|
||||
L_GET_PRIVATE(static_cast<LinphonePrivate::CallSessionParams *>(params->msp.get()))->setCustomHeaders(ch);
|
||||
GET_CALL_CPP_PRIVATE_PTR(params)->setCustomHeaders(ch);
|
||||
}
|
||||
|
||||
void linphone_call_params_set_custom_sdp_attributes(LinphoneCallParams *params, const SalCustomSdpAttribute *csa) {
|
||||
L_GET_PRIVATE(params->msp.get())->setCustomSdpAttributes(csa);
|
||||
GET_MEDIA_CPP_PRIVATE_PTR(params)->setCustomSdpAttributes(csa);
|
||||
}
|
||||
|
||||
void linphone_call_params_set_custom_sdp_media_attributes(LinphoneCallParams *params, LinphoneStreamType type, const SalCustomSdpAttribute *csa) {
|
||||
L_GET_PRIVATE(params->msp.get())->setCustomSdpMediaAttributes(type, csa);
|
||||
GET_MEDIA_CPP_PRIVATE_PTR(params)->setCustomSdpMediaAttributes(type, csa);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -95,23 +100,23 @@ void linphone_call_params_set_custom_sdp_media_attributes(LinphoneCallParams *pa
|
|||
******************************************************************************/
|
||||
|
||||
void linphone_call_params_add_custom_header(LinphoneCallParams *params, const char *header_name, const char *header_value) {
|
||||
params->msp->addCustomHeader(header_name, header_value);
|
||||
GET_MEDIA_CPP_PTR(params)->addCustomHeader(header_name, header_value);
|
||||
}
|
||||
|
||||
void linphone_call_params_add_custom_sdp_attribute(LinphoneCallParams *params, const char *attribute_name, const char *attribute_value) {
|
||||
params->msp->addCustomSdpAttribute(attribute_name, attribute_value);
|
||||
GET_MEDIA_CPP_PTR(params)->addCustomSdpAttribute(attribute_name, attribute_value);
|
||||
}
|
||||
|
||||
void linphone_call_params_add_custom_sdp_media_attribute(LinphoneCallParams *params, LinphoneStreamType type, const char *attribute_name, const char *attribute_value) {
|
||||
params->msp->addCustomSdpMediaAttribute(type, attribute_name, attribute_value);
|
||||
GET_MEDIA_CPP_PTR(params)->addCustomSdpMediaAttribute(type, attribute_name, attribute_value);
|
||||
}
|
||||
|
||||
void linphone_call_params_clear_custom_sdp_attributes(LinphoneCallParams *params) {
|
||||
params->msp->clearCustomSdpAttributes();
|
||||
GET_MEDIA_CPP_PTR(params)->clearCustomSdpAttributes();
|
||||
}
|
||||
|
||||
void linphone_call_params_clear_custom_sdp_media_attributes(LinphoneCallParams *params, LinphoneStreamType type) {
|
||||
params->msp->clearCustomSdpMediaAttributes(type);
|
||||
GET_MEDIA_CPP_PTR(params)->clearCustomSdpMediaAttributes(type);
|
||||
}
|
||||
|
||||
LinphoneCallParams * linphone_call_params_copy(const LinphoneCallParams *params) {
|
||||
|
|
@ -119,42 +124,42 @@ LinphoneCallParams * linphone_call_params_copy(const LinphoneCallParams *params)
|
|||
}
|
||||
|
||||
bool_t linphone_call_params_early_media_sending_enabled(const LinphoneCallParams *params) {
|
||||
return params->msp->earlyMediaSendingEnabled();
|
||||
return GET_MEDIA_CPP_PTR(params)->earlyMediaSendingEnabled();
|
||||
}
|
||||
|
||||
void linphone_call_params_enable_early_media_sending(LinphoneCallParams *params, bool_t enabled) {
|
||||
params->msp->enableEarlyMediaSending(enabled);
|
||||
GET_MEDIA_CPP_PTR(params)->enableEarlyMediaSending(enabled);
|
||||
}
|
||||
|
||||
void linphone_call_params_enable_low_bandwidth(LinphoneCallParams *params, bool_t enabled) {
|
||||
params->msp->enableLowBandwidth(enabled);
|
||||
GET_MEDIA_CPP_PTR(params)->enableLowBandwidth(enabled);
|
||||
}
|
||||
|
||||
void linphone_call_params_enable_audio(LinphoneCallParams *params, bool_t enabled) {
|
||||
params->msp->enableAudio(enabled);
|
||||
GET_MEDIA_CPP_PTR(params)->enableAudio(enabled);
|
||||
}
|
||||
|
||||
LinphoneStatus linphone_call_params_enable_realtime_text(LinphoneCallParams *params, bool_t yesno) {
|
||||
params->msp->enableRealtimeText(yesno);
|
||||
GET_MEDIA_CPP_PTR(params)->enableRealtimeText(yesno);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void linphone_call_params_enable_video(LinphoneCallParams *params, bool_t enabled) {
|
||||
params->msp->enableVideo(enabled);
|
||||
GET_MEDIA_CPP_PTR(params)->enableVideo(enabled);
|
||||
}
|
||||
|
||||
const char *linphone_call_params_get_custom_header(const LinphoneCallParams *params, const char *header_name) {
|
||||
std::string value = params->msp->getCustomHeader(header_name);
|
||||
std::string value = GET_MEDIA_CPP_PTR(params)->getCustomHeader(header_name);
|
||||
return value.empty() ? nullptr : value.c_str();
|
||||
}
|
||||
|
||||
const char * linphone_call_params_get_custom_sdp_attribute(const LinphoneCallParams *params, const char *attribute_name) {
|
||||
std::string value = params->msp->getCustomSdpAttribute(attribute_name);
|
||||
std::string value = GET_MEDIA_CPP_PTR(params)->getCustomSdpAttribute(attribute_name);
|
||||
return value.empty() ? nullptr : value.c_str();
|
||||
}
|
||||
|
||||
const char * linphone_call_params_get_custom_sdp_media_attribute(const LinphoneCallParams *params, LinphoneStreamType type, const char *attribute_name) {
|
||||
std::string value = params->msp->getCustomSdpMediaAttribute(type, attribute_name);
|
||||
std::string value = GET_MEDIA_CPP_PTR(params)->getCustomSdpMediaAttribute(type, attribute_name);
|
||||
return value.empty() ? nullptr : value.c_str();
|
||||
}
|
||||
|
||||
|
|
@ -163,20 +168,20 @@ bool_t linphone_call_params_get_local_conference_mode(const LinphoneCallParams *
|
|||
}
|
||||
|
||||
LinphoneMediaEncryption linphone_call_params_get_media_encryption(const LinphoneCallParams *params) {
|
||||
return params->msp->getMediaEncryption();
|
||||
return GET_MEDIA_CPP_PTR(params)->getMediaEncryption();
|
||||
}
|
||||
|
||||
LinphonePrivacyMask linphone_call_params_get_privacy(const LinphoneCallParams *params) {
|
||||
return params->msp->getPrivacy();
|
||||
return GET_MEDIA_CPP_PTR(params)->getPrivacy();
|
||||
}
|
||||
|
||||
float linphone_call_params_get_received_framerate(const LinphoneCallParams *params) {
|
||||
return params->msp->getReceivedFps();
|
||||
return GET_MEDIA_CPP_PTR(params)->getReceivedFps();
|
||||
}
|
||||
|
||||
MSVideoSize linphone_call_params_get_received_video_size(const LinphoneCallParams *params) {
|
||||
MSVideoSize vsize;
|
||||
LinphoneVideoDefinition *vdef = params->msp->getReceivedVideoDefinition();
|
||||
LinphoneVideoDefinition *vdef = GET_MEDIA_CPP_PTR(params)->getReceivedVideoDefinition();
|
||||
if (vdef) {
|
||||
vsize.width = linphone_video_definition_get_width(vdef);
|
||||
vsize.height = linphone_video_definition_get_height(vdef);
|
||||
|
|
@ -188,25 +193,25 @@ MSVideoSize linphone_call_params_get_received_video_size(const LinphoneCallParam
|
|||
}
|
||||
|
||||
const LinphoneVideoDefinition * linphone_call_params_get_received_video_definition(const LinphoneCallParams *params) {
|
||||
return params->msp->getReceivedVideoDefinition();
|
||||
return GET_MEDIA_CPP_PTR(params)->getReceivedVideoDefinition();
|
||||
}
|
||||
|
||||
const char *linphone_call_params_get_record_file(const LinphoneCallParams *params) {
|
||||
const std::string &value = params->msp->getRecordFilePath();
|
||||
const std::string &value = GET_MEDIA_CPP_PTR(params)->getRecordFilePath();
|
||||
return value.empty() ? nullptr : value.c_str();
|
||||
}
|
||||
|
||||
const char * linphone_call_params_get_rtp_profile(const LinphoneCallParams *params) {
|
||||
return params->msp->getRtpProfile();
|
||||
return GET_MEDIA_CPP_PTR(params)->getRtpProfile();
|
||||
}
|
||||
|
||||
float linphone_call_params_get_sent_framerate(const LinphoneCallParams *params) {
|
||||
return params->msp->getSentFps();
|
||||
return GET_MEDIA_CPP_PTR(params)->getSentFps();
|
||||
}
|
||||
|
||||
MSVideoSize linphone_call_params_get_sent_video_size(const LinphoneCallParams *params) {
|
||||
MSVideoSize vsize;
|
||||
LinphoneVideoDefinition *vdef = params->msp->getSentVideoDefinition();
|
||||
LinphoneVideoDefinition *vdef = GET_MEDIA_CPP_PTR(params)->getSentVideoDefinition();
|
||||
if (vdef) {
|
||||
vsize.width = linphone_video_definition_get_width(vdef);
|
||||
vsize.height = linphone_video_definition_get_height(vdef);
|
||||
|
|
@ -218,155 +223,155 @@ MSVideoSize linphone_call_params_get_sent_video_size(const LinphoneCallParams *p
|
|||
}
|
||||
|
||||
const LinphoneVideoDefinition * linphone_call_params_get_sent_video_definition(const LinphoneCallParams *params) {
|
||||
return params->msp->getSentVideoDefinition();
|
||||
return GET_MEDIA_CPP_PTR(params)->getSentVideoDefinition();
|
||||
}
|
||||
|
||||
const char *linphone_call_params_get_session_name(const LinphoneCallParams *params) {
|
||||
const std::string &value = params->msp->getSessionName();
|
||||
const std::string &value = GET_MEDIA_CPP_PTR(params)->getSessionName();
|
||||
return value.empty() ? nullptr : value.c_str();
|
||||
}
|
||||
|
||||
LinphonePayloadType *linphone_call_params_get_used_audio_payload_type(const LinphoneCallParams *params) {
|
||||
return params->msp->getUsedAudioPayloadType();
|
||||
return GET_MEDIA_CPP_PTR(params)->getUsedAudioPayloadType();
|
||||
}
|
||||
|
||||
LinphonePayloadType *linphone_call_params_get_used_video_payload_type(const LinphoneCallParams *params) {
|
||||
return params->msp->getUsedVideoPayloadType();
|
||||
return GET_MEDIA_CPP_PTR(params)->getUsedVideoPayloadType();
|
||||
}
|
||||
|
||||
LinphonePayloadType *linphone_call_params_get_used_text_payload_type(const LinphoneCallParams *params) {
|
||||
return params->msp->getUsedRealtimeTextPayloadType();
|
||||
return GET_MEDIA_CPP_PTR(params)->getUsedRealtimeTextPayloadType();
|
||||
}
|
||||
|
||||
const OrtpPayloadType *linphone_call_params_get_used_audio_codec(const LinphoneCallParams *params) {
|
||||
return params->msp->getUsedAudioCodec();
|
||||
return GET_MEDIA_CPP_PTR(params)->getUsedAudioCodec();
|
||||
}
|
||||
|
||||
void linphone_call_params_set_used_audio_codec(LinphoneCallParams *params, OrtpPayloadType *codec) {
|
||||
L_GET_PRIVATE(params->msp.get())->setUsedAudioCodec(codec);
|
||||
GET_MEDIA_CPP_PRIVATE_PTR(params)->setUsedAudioCodec(codec);
|
||||
}
|
||||
|
||||
const OrtpPayloadType *linphone_call_params_get_used_video_codec(const LinphoneCallParams *params) {
|
||||
return params->msp->getUsedVideoCodec();
|
||||
return GET_MEDIA_CPP_PTR(params)->getUsedVideoCodec();
|
||||
}
|
||||
|
||||
void linphone_call_params_set_used_video_codec(LinphoneCallParams *params, OrtpPayloadType *codec) {
|
||||
L_GET_PRIVATE(params->msp.get())->setUsedVideoCodec(codec);
|
||||
GET_MEDIA_CPP_PRIVATE_PTR(params)->setUsedVideoCodec(codec);
|
||||
}
|
||||
|
||||
const OrtpPayloadType *linphone_call_params_get_used_text_codec(const LinphoneCallParams *params) {
|
||||
return params->msp->getUsedRealtimeTextCodec();
|
||||
return GET_MEDIA_CPP_PTR(params)->getUsedRealtimeTextCodec();
|
||||
}
|
||||
|
||||
void linphone_call_params_set_used_text_codec(LinphoneCallParams *params, OrtpPayloadType *codec) {
|
||||
L_GET_PRIVATE(params->msp.get())->setUsedRealtimeTextCodec(codec);
|
||||
GET_MEDIA_CPP_PRIVATE_PTR(params)->setUsedRealtimeTextCodec(codec);
|
||||
}
|
||||
|
||||
bool_t linphone_call_params_low_bandwidth_enabled(const LinphoneCallParams *params) {
|
||||
return params->msp->lowBandwidthEnabled();
|
||||
return GET_MEDIA_CPP_PTR(params)->lowBandwidthEnabled();
|
||||
}
|
||||
|
||||
int linphone_call_params_get_audio_bandwidth_limit(const LinphoneCallParams *params) {
|
||||
return params->msp->getAudioBandwidthLimit();
|
||||
return GET_MEDIA_CPP_PTR(params)->getAudioBandwidthLimit();
|
||||
}
|
||||
|
||||
void linphone_call_params_set_audio_bandwidth_limit(LinphoneCallParams *params, int bandwidth) {
|
||||
params->msp->setAudioBandwidthLimit(bandwidth);
|
||||
GET_MEDIA_CPP_PTR(params)->setAudioBandwidthLimit(bandwidth);
|
||||
}
|
||||
|
||||
void linphone_call_params_set_media_encryption(LinphoneCallParams *params, LinphoneMediaEncryption encryption) {
|
||||
params->msp->setMediaEncryption(encryption);
|
||||
GET_MEDIA_CPP_PTR(params)->setMediaEncryption(encryption);
|
||||
}
|
||||
|
||||
void linphone_call_params_set_privacy(LinphoneCallParams *params, LinphonePrivacyMask privacy) {
|
||||
params->msp->setPrivacy(privacy);
|
||||
GET_MEDIA_CPP_PTR(params)->setPrivacy(privacy);
|
||||
}
|
||||
|
||||
void linphone_call_params_set_record_file(LinphoneCallParams *params, const char *path) {
|
||||
params->msp->setRecordFilePath(path ? path : "");
|
||||
GET_MEDIA_CPP_PTR(params)->setRecordFilePath(path ? path : "");
|
||||
}
|
||||
|
||||
void linphone_call_params_set_session_name(LinphoneCallParams *params, const char *name) {
|
||||
params->msp->setSessionName(name ? name : "");
|
||||
GET_MEDIA_CPP_PTR(params)->setSessionName(name ? name : "");
|
||||
}
|
||||
|
||||
bool_t linphone_call_params_audio_enabled(const LinphoneCallParams *params) {
|
||||
return params->msp->audioEnabled();
|
||||
return GET_MEDIA_CPP_PTR(params)->audioEnabled();
|
||||
}
|
||||
|
||||
bool_t linphone_call_params_realtime_text_enabled(const LinphoneCallParams *params) {
|
||||
return params->msp->realtimeTextEnabled();
|
||||
return GET_MEDIA_CPP_PTR(params)->realtimeTextEnabled();
|
||||
}
|
||||
|
||||
bool_t linphone_call_params_video_enabled(const LinphoneCallParams *params) {
|
||||
return params->msp->videoEnabled();
|
||||
return GET_MEDIA_CPP_PTR(params)->videoEnabled();
|
||||
}
|
||||
|
||||
LinphoneMediaDirection linphone_call_params_get_audio_direction(const LinphoneCallParams *params) {
|
||||
return params->msp->getAudioDirection();
|
||||
return GET_MEDIA_CPP_PTR(params)->getAudioDirection();
|
||||
}
|
||||
|
||||
LinphoneMediaDirection linphone_call_params_get_video_direction(const LinphoneCallParams *params) {
|
||||
return params->msp->getVideoDirection();
|
||||
return GET_MEDIA_CPP_PTR(params)->getVideoDirection();
|
||||
}
|
||||
|
||||
void linphone_call_params_set_audio_direction(LinphoneCallParams *params, LinphoneMediaDirection dir) {
|
||||
params->msp->setAudioDirection(dir);
|
||||
GET_MEDIA_CPP_PTR(params)->setAudioDirection(dir);
|
||||
}
|
||||
|
||||
void linphone_call_params_set_video_direction(LinphoneCallParams *params, LinphoneMediaDirection dir) {
|
||||
params->msp->setVideoDirection(dir);
|
||||
GET_MEDIA_CPP_PTR(params)->setVideoDirection(dir);
|
||||
}
|
||||
|
||||
void linphone_call_params_enable_audio_multicast(LinphoneCallParams *params, bool_t yesno) {
|
||||
params->msp->enableAudioMulticast(yesno);
|
||||
GET_MEDIA_CPP_PTR(params)->enableAudioMulticast(yesno);
|
||||
}
|
||||
|
||||
bool_t linphone_call_params_audio_multicast_enabled(const LinphoneCallParams *params) {
|
||||
return params->msp->audioMulticastEnabled();
|
||||
return GET_MEDIA_CPP_PTR(params)->audioMulticastEnabled();
|
||||
}
|
||||
|
||||
void linphone_call_params_enable_video_multicast(LinphoneCallParams *params, bool_t yesno) {
|
||||
params->msp->enableVideoMulticast(yesno);
|
||||
GET_MEDIA_CPP_PTR(params)->enableVideoMulticast(yesno);
|
||||
}
|
||||
bool_t linphone_call_params_video_multicast_enabled(const LinphoneCallParams *params) {
|
||||
return params->msp->videoMulticastEnabled();
|
||||
return GET_MEDIA_CPP_PTR(params)->videoMulticastEnabled();
|
||||
}
|
||||
|
||||
bool_t linphone_call_params_real_early_media_enabled(const LinphoneCallParams *params) {
|
||||
return params->msp->earlyMediaSendingEnabled();
|
||||
return GET_MEDIA_CPP_PTR(params)->earlyMediaSendingEnabled();
|
||||
}
|
||||
|
||||
bool_t linphone_call_params_avpf_enabled(const LinphoneCallParams *params) {
|
||||
return params->msp->avpfEnabled();
|
||||
return GET_MEDIA_CPP_PTR(params)->avpfEnabled();
|
||||
}
|
||||
|
||||
void linphone_call_params_enable_avpf(LinphoneCallParams *params, bool_t enable) {
|
||||
params->msp->enableAvpf(enable);
|
||||
GET_MEDIA_CPP_PTR(params)->enableAvpf(enable);
|
||||
}
|
||||
|
||||
bool_t linphone_call_params_mandatory_media_encryption_enabled(const LinphoneCallParams *params) {
|
||||
return params->msp->mandatoryMediaEncryptionEnabled();
|
||||
return GET_MEDIA_CPP_PTR(params)->mandatoryMediaEncryptionEnabled();
|
||||
}
|
||||
|
||||
void linphone_call_params_enable_mandatory_media_encryption(LinphoneCallParams *params, bool_t value) {
|
||||
params->msp->enableMandatoryMediaEncryption(value);
|
||||
GET_MEDIA_CPP_PTR(params)->enableMandatoryMediaEncryption(value);
|
||||
}
|
||||
|
||||
uint16_t linphone_call_params_get_avpf_rr_interval(const LinphoneCallParams *params) {
|
||||
return params->msp->getAvpfRrInterval();
|
||||
return GET_MEDIA_CPP_PTR(params)->getAvpfRrInterval();
|
||||
}
|
||||
|
||||
void linphone_call_params_set_avpf_rr_interval(LinphoneCallParams *params, uint16_t value) {
|
||||
params->msp->setAvpfRrInterval(value);
|
||||
GET_MEDIA_CPP_PTR(params)->setAvpfRrInterval(value);
|
||||
}
|
||||
|
||||
void linphone_call_params_set_sent_fps(LinphoneCallParams *params, float value) {
|
||||
L_GET_PRIVATE(params->msp.get())->setSentFps(value);
|
||||
GET_MEDIA_CPP_PRIVATE_PTR(params)->setSentFps(value);
|
||||
}
|
||||
|
||||
void linphone_call_params_set_received_fps(LinphoneCallParams *params, float value) {
|
||||
L_GET_PRIVATE(params->msp.get())->setReceivedFps(value);
|
||||
GET_MEDIA_CPP_PRIVATE_PTR(params)->setReceivedFps(value);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -375,115 +380,111 @@ void linphone_call_params_set_received_fps(LinphoneCallParams *params, float val
|
|||
******************************************************************************/
|
||||
|
||||
bool_t linphone_call_params_get_in_conference(const LinphoneCallParams *params) {
|
||||
return L_GET_PRIVATE(static_cast<const LinphonePrivate::CallSessionParams *>(params->msp.get()))->getInConference();
|
||||
return GET_CALL_CPP_PRIVATE_PTR(params)->getInConference();
|
||||
}
|
||||
|
||||
void linphone_call_params_set_in_conference(LinphoneCallParams *params, bool_t value) {
|
||||
L_GET_PRIVATE(static_cast<LinphonePrivate::CallSessionParams *>(params->msp.get()))->setInConference(value);
|
||||
GET_CALL_CPP_PRIVATE_PTR(params)->setInConference(value);
|
||||
}
|
||||
|
||||
bool_t linphone_call_params_get_internal_call_update(const LinphoneCallParams *params) {
|
||||
return L_GET_PRIVATE(static_cast<const LinphonePrivate::CallSessionParams *>(params->msp.get()))->getInternalCallUpdate();
|
||||
return GET_CALL_CPP_PRIVATE_PTR(params)->getInternalCallUpdate();
|
||||
}
|
||||
|
||||
void linphone_call_params_set_internal_call_update(LinphoneCallParams *params, bool_t value) {
|
||||
L_GET_PRIVATE(static_cast<LinphonePrivate::CallSessionParams *>(params->msp.get()))->setInternalCallUpdate(value);
|
||||
GET_CALL_CPP_PRIVATE_PTR(params)->setInternalCallUpdate(value);
|
||||
}
|
||||
|
||||
bool_t linphone_call_params_implicit_rtcp_fb_enabled(const LinphoneCallParams *params) {
|
||||
return L_GET_PRIVATE(params->msp.get())->implicitRtcpFbEnabled();
|
||||
return GET_MEDIA_CPP_PRIVATE_PTR(params)->implicitRtcpFbEnabled();
|
||||
}
|
||||
|
||||
void linphone_call_params_enable_implicit_rtcp_fb(LinphoneCallParams *params, bool_t value) {
|
||||
L_GET_PRIVATE(params->msp.get())->enableImplicitRtcpFb(value);
|
||||
GET_MEDIA_CPP_PRIVATE_PTR(params)->enableImplicitRtcpFb(value);
|
||||
}
|
||||
|
||||
int linphone_call_params_get_down_bandwidth(const LinphoneCallParams *params) {
|
||||
return L_GET_PRIVATE(params->msp.get())->getDownBandwidth();
|
||||
return GET_MEDIA_CPP_PRIVATE_PTR(params)->getDownBandwidth();
|
||||
}
|
||||
|
||||
void linphone_call_params_set_down_bandwidth(LinphoneCallParams *params, int value) {
|
||||
L_GET_PRIVATE(params->msp.get())->setDownBandwidth(value);
|
||||
GET_MEDIA_CPP_PRIVATE_PTR(params)->setDownBandwidth(value);
|
||||
}
|
||||
|
||||
int linphone_call_params_get_up_bandwidth(const LinphoneCallParams *params) {
|
||||
return L_GET_PRIVATE(params->msp.get())->getUpBandwidth();
|
||||
return GET_MEDIA_CPP_PRIVATE_PTR(params)->getUpBandwidth();
|
||||
}
|
||||
|
||||
void linphone_call_params_set_up_bandwidth(LinphoneCallParams *params, int value) {
|
||||
L_GET_PRIVATE(params->msp.get())->setUpBandwidth(value);
|
||||
GET_MEDIA_CPP_PRIVATE_PTR(params)->setUpBandwidth(value);
|
||||
}
|
||||
|
||||
int linphone_call_params_get_down_ptime(const LinphoneCallParams *params) {
|
||||
return L_GET_PRIVATE(params->msp.get())->getDownPtime();
|
||||
return GET_MEDIA_CPP_PRIVATE_PTR(params)->getDownPtime();
|
||||
}
|
||||
|
||||
void linphone_call_params_set_down_ptime(LinphoneCallParams *params, int value) {
|
||||
L_GET_PRIVATE(params->msp.get())->setDownPtime(value);
|
||||
GET_MEDIA_CPP_PRIVATE_PTR(params)->setDownPtime(value);
|
||||
}
|
||||
|
||||
int linphone_call_params_get_up_ptime(const LinphoneCallParams *params) {
|
||||
return L_GET_PRIVATE(params->msp.get())->getUpPtime();
|
||||
return GET_MEDIA_CPP_PRIVATE_PTR(params)->getUpPtime();
|
||||
}
|
||||
|
||||
void linphone_call_params_set_up_ptime(LinphoneCallParams *params, int value) {
|
||||
L_GET_PRIVATE(params->msp.get())->setUpPtime(value);
|
||||
GET_MEDIA_CPP_PRIVATE_PTR(params)->setUpPtime(value);
|
||||
}
|
||||
|
||||
SalCustomHeader * linphone_call_params_get_custom_headers(const LinphoneCallParams *params) {
|
||||
return L_GET_PRIVATE(static_cast<const LinphonePrivate::CallSessionParams *>(params->msp.get()))->getCustomHeaders();
|
||||
return GET_CALL_CPP_PRIVATE_PTR(params)->getCustomHeaders();
|
||||
}
|
||||
|
||||
SalCustomSdpAttribute * linphone_call_params_get_custom_sdp_attributes(const LinphoneCallParams *params) {
|
||||
return L_GET_PRIVATE(params->msp.get())->getCustomSdpAttributes();
|
||||
return GET_MEDIA_CPP_PRIVATE_PTR(params)->getCustomSdpAttributes();
|
||||
}
|
||||
|
||||
SalCustomSdpAttribute * linphone_call_params_get_custom_sdp_media_attributes(const LinphoneCallParams *params, LinphoneStreamType type) {
|
||||
return L_GET_PRIVATE(params->msp.get())->getCustomSdpMediaAttributes(type);
|
||||
return GET_MEDIA_CPP_PRIVATE_PTR(params)->getCustomSdpMediaAttributes(type);
|
||||
}
|
||||
|
||||
LinphoneCall * linphone_call_params_get_referer(const LinphoneCallParams *params) {
|
||||
return L_GET_PRIVATE(static_cast<const LinphonePrivate::CallSessionParams *>(params->msp.get()))->getReferer();
|
||||
return GET_CALL_CPP_PRIVATE_PTR(params)->getReferer();
|
||||
}
|
||||
|
||||
void linphone_call_params_set_referer(LinphoneCallParams *params, LinphoneCall *referer) {
|
||||
L_GET_PRIVATE(static_cast<LinphonePrivate::CallSessionParams *>(params->msp.get()))->setReferer(referer);
|
||||
GET_CALL_CPP_PRIVATE_PTR(params)->setReferer(referer);
|
||||
}
|
||||
|
||||
bool_t linphone_call_params_get_update_call_when_ice_completed(const LinphoneCallParams *params) {
|
||||
return L_GET_PRIVATE(params->msp.get())->getUpdateCallWhenIceCompleted();
|
||||
return GET_MEDIA_CPP_PRIVATE_PTR(params)->getUpdateCallWhenIceCompleted();
|
||||
}
|
||||
|
||||
void linphone_call_params_set_update_call_when_ice_completed(LinphoneCallParams *params, bool_t value) {
|
||||
L_GET_PRIVATE(params->msp.get())->setUpdateCallWhenIceCompleted(value);
|
||||
GET_MEDIA_CPP_PRIVATE_PTR(params)->setUpdateCallWhenIceCompleted(value);
|
||||
}
|
||||
|
||||
void linphone_call_params_set_sent_vsize(LinphoneCallParams *params, MSVideoSize vsize) {
|
||||
L_GET_PRIVATE(params->msp.get())->setSentVideoDefinition(linphone_video_definition_new(vsize.width, vsize.height, nullptr));
|
||||
GET_MEDIA_CPP_PRIVATE_PTR(params)->setSentVideoDefinition(linphone_video_definition_new(vsize.width, vsize.height, nullptr));
|
||||
}
|
||||
|
||||
void linphone_call_params_set_recv_vsize(LinphoneCallParams *params, MSVideoSize vsize) {
|
||||
L_GET_PRIVATE(params->msp.get())->setReceivedVideoDefinition(linphone_video_definition_new(vsize.width, vsize.height, nullptr));
|
||||
GET_MEDIA_CPP_PRIVATE_PTR(params)->setReceivedVideoDefinition(linphone_video_definition_new(vsize.width, vsize.height, nullptr));
|
||||
}
|
||||
|
||||
void linphone_call_params_set_sent_video_definition(LinphoneCallParams *params, LinphoneVideoDefinition *vdef) {
|
||||
L_GET_PRIVATE(params->msp.get())->setSentVideoDefinition(vdef);
|
||||
GET_MEDIA_CPP_PRIVATE_PTR(params)->setSentVideoDefinition(vdef);
|
||||
}
|
||||
|
||||
void linphone_call_params_set_received_video_definition(LinphoneCallParams *params, LinphoneVideoDefinition *vdef) {
|
||||
L_GET_PRIVATE(params->msp.get())->setReceivedVideoDefinition(vdef);
|
||||
GET_MEDIA_CPP_PRIVATE_PTR(params)->setReceivedVideoDefinition(vdef);
|
||||
}
|
||||
|
||||
bool_t linphone_call_params_get_no_user_consent(const LinphoneCallParams *params) {
|
||||
return L_GET_PRIVATE(static_cast<const LinphonePrivate::CallSessionParams *>(params->msp.get()))->getNoUserConsent();
|
||||
return GET_CALL_CPP_PRIVATE_PTR(params)->getNoUserConsent();
|
||||
}
|
||||
|
||||
void linphone_call_params_set_no_user_consent(LinphoneCallParams *params, bool_t value) {
|
||||
L_GET_PRIVATE(static_cast<LinphonePrivate::CallSessionParams *>(params->msp.get()))->setNoUserConsent(value);
|
||||
}
|
||||
|
||||
std::shared_ptr<LinphonePrivate::MediaSessionParams> linphone_call_params_get_cpp_obj(const LinphoneCallParams *params) {
|
||||
return params->msp;
|
||||
GET_CALL_CPP_PRIVATE_PTR(params)->setNoUserConsent(value);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -492,11 +493,11 @@ std::shared_ptr<LinphonePrivate::MediaSessionParams> linphone_call_params_get_cp
|
|||
******************************************************************************/
|
||||
|
||||
void *linphone_call_params_get_user_data(const LinphoneCallParams *cp) {
|
||||
return cp->user_data;
|
||||
return cp->userData;
|
||||
}
|
||||
|
||||
void linphone_call_params_set_user_data(LinphoneCallParams *cp, void *ud) {
|
||||
cp->user_data = ud;
|
||||
cp->userData = ud;
|
||||
}
|
||||
|
||||
LinphoneCallParams * linphone_call_params_ref(LinphoneCallParams *cp) {
|
||||
|
|
@ -513,35 +514,18 @@ void linphone_call_params_unref(LinphoneCallParams *cp) {
|
|||
* Constructor and destructor functions *
|
||||
******************************************************************************/
|
||||
|
||||
static void _linphone_call_params_destroy(LinphoneCallParams *params) {
|
||||
params->msp = nullptr;
|
||||
}
|
||||
|
||||
static void _linphone_call_params_clone(LinphoneCallParams *dst, const LinphoneCallParams *src) {
|
||||
dst->msp = std::make_shared<LinphonePrivate::MediaSessionParams>(*src->msp);
|
||||
}
|
||||
|
||||
LinphoneCallParams * linphone_call_params_new(LinphoneCore *core) {
|
||||
LinphoneCallParams *params = belle_sip_object_new(LinphoneCallParams);
|
||||
params->msp = std::make_shared<LinphonePrivate::MediaSessionParams>();
|
||||
params->msp->initDefault(core);
|
||||
LinphoneCallParams *params = _linphone_call_params_init();
|
||||
params->cppPtr = new LinphonePrivate::MediaSessionParams();
|
||||
params->cppPtr->initDefault(core);
|
||||
return params;
|
||||
}
|
||||
|
||||
LinphoneCallParams * linphone_call_params_new_for_wrapper(void) {
|
||||
return belle_sip_object_new(LinphoneCallParams);
|
||||
return _linphone_call_params_init();
|
||||
}
|
||||
|
||||
/* DEPRECATED */
|
||||
void linphone_call_params_destroy(LinphoneCallParams *cp) {
|
||||
linphone_call_params_unref(cp);
|
||||
}
|
||||
|
||||
BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES(LinphoneCallParams);
|
||||
|
||||
BELLE_SIP_INSTANCIATE_VPTR(LinphoneCallParams, belle_sip_object_t,
|
||||
(belle_sip_object_destroy_t)_linphone_call_params_destroy,
|
||||
(belle_sip_object_clone_t)_linphone_call_params_clone, // clone
|
||||
NULL, // marshal
|
||||
FALSE
|
||||
);
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
/*
|
||||
* c-private-types.h
|
||||
* Copyright (C) 2017 Belledonne Communications SARL
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _C_PRIVATE_TYPES_H_
|
||||
#define _C_PRIVATE_TYPES_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "conference/params/media-session-params.h"
|
||||
|
||||
// =============================================================================
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// =============================================================================
|
||||
// C Structures.
|
||||
// =============================================================================
|
||||
|
||||
struct _LinphoneCallParams{
|
||||
belle_sip_object_t base;
|
||||
void *user_data;
|
||||
std::shared_ptr<LinphonePrivate::MediaSessionParams> msp;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // ifndef _C_PRIVATE_TYPES_H_
|
||||
|
|
@ -40,6 +40,7 @@ private:
|
|||
template<typename T>
|
||||
struct WrappedClonableObject {
|
||||
belle_sip_object_t base;
|
||||
void *userData;
|
||||
T *cppPtr;
|
||||
};
|
||||
|
||||
|
|
@ -101,6 +102,16 @@ public:
|
|||
static_cast<WrappedObject<T> *>(object)->cppPtr = cppPtr;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static inline void setCppPtrFromC (void *object, T *cppPtr) {
|
||||
L_ASSERT(object);
|
||||
T *tPtr = reinterpret_cast<T *>(static_cast<WrappedClonableObject<T> *>(object)->cppPtr);
|
||||
if (tPtr != cppPtr) {
|
||||
delete tPtr;
|
||||
static_cast<WrappedClonableObject<T> *>(object)->cppPtr = new T(*cppPtr);
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static T *getCppPtr (const std::shared_ptr<T> &cppPtr) {
|
||||
return cppPtr.get();
|
||||
|
|
@ -173,24 +184,25 @@ LINPHONE_END_NAMESPACE
|
|||
FALSE \
|
||||
);
|
||||
|
||||
#define L_DECLARE_C_CLONABLE_STRUCT_IMPL(STRUCT, C_NAME) \
|
||||
struct _Linphone ## STRUCT { \
|
||||
#define L_DECLARE_C_CLONABLE_STRUCT_IMPL(CPP_CLASS, C_STRUCT, C_NAME) \
|
||||
struct _Linphone ## C_STRUCT { \
|
||||
belle_sip_object_t base; \
|
||||
LINPHONE_NAMESPACE::STRUCT *cppPtr; \
|
||||
void *userData; \
|
||||
LINPHONE_NAMESPACE::CPP_CLASS *cppPtr; \
|
||||
}; \
|
||||
BELLE_SIP_DECLARE_VPTR_NO_EXPORT(Linphone ## STRUCT); \
|
||||
static Linphone ## STRUCT *_linphone_ ## C_NAME ## _init() { \
|
||||
return belle_sip_object_new(Linphone ## STRUCT); \
|
||||
BELLE_SIP_DECLARE_VPTR_NO_EXPORT(Linphone ## C_STRUCT); \
|
||||
static Linphone ## C_STRUCT *_linphone_ ## C_NAME ## _init() { \
|
||||
return belle_sip_object_new(Linphone ## C_STRUCT); \
|
||||
} \
|
||||
static void _linphone_ ## C_NAME ## _uninit(Linphone ## STRUCT * object) { \
|
||||
static void _linphone_ ## C_NAME ## _uninit(Linphone ## C_STRUCT * object) { \
|
||||
delete object->cppPtr; \
|
||||
} \
|
||||
static void _linphone_ ## C_NAME ## _clone(Linphone ## STRUCT * dest, const Linphone ## STRUCT * src) { \
|
||||
static void _linphone_ ## C_NAME ## _clone(Linphone ## C_STRUCT * dest, const Linphone ## C_STRUCT * src) { \
|
||||
L_ASSERT(src->cppPtr); \
|
||||
dest->cppPtr = new LINPHONE_NAMESPACE::STRUCT(*src->cppPtr); \
|
||||
dest->cppPtr = new LINPHONE_NAMESPACE::CPP_CLASS(*src->cppPtr); \
|
||||
} \
|
||||
BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES(Linphone ## STRUCT); \
|
||||
BELLE_SIP_INSTANCIATE_VPTR(Linphone ## STRUCT, belle_sip_object_t, \
|
||||
BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES(Linphone ## C_STRUCT); \
|
||||
BELLE_SIP_INSTANCIATE_VPTR(Linphone ## C_STRUCT, belle_sip_object_t, \
|
||||
_linphone_ ## C_NAME ## _uninit, \
|
||||
_linphone_ ## C_NAME ## _clone, \
|
||||
NULL, \
|
||||
|
|
@ -207,8 +219,8 @@ LINPHONE_END_NAMESPACE
|
|||
#define L_STRING_TO_C(STR) ((STR).empty() ? NULL : (STR).c_str())
|
||||
#define L_C_TO_STRING(STR) ((STR) == NULL ? std::string() : (STR))
|
||||
|
||||
#define L_GET_CPP_PTR_FROM_C_STRUCT(OBJECT, TYPE) \
|
||||
LINPHONE_NAMESPACE::Wrapper::getCppPtrFromC<LINPHONE_NAMESPACE::TYPE, Linphone ## TYPE>(OBJECT)
|
||||
#define L_GET_CPP_PTR_FROM_C_STRUCT(OBJECT, CPP_TYPE, C_TYPE) \
|
||||
LINPHONE_NAMESPACE::Wrapper::getCppPtrFromC<LINPHONE_NAMESPACE::CPP_TYPE, Linphone ## C_TYPE>(OBJECT)
|
||||
|
||||
#define L_SET_CPP_PTR_FROM_C_STRUCT(OBJECT, CPP_PTR) \
|
||||
LINPHONE_NAMESPACE::Wrapper::setCppPtrFromC(OBJECT, CPP_PTR)
|
||||
|
|
@ -216,9 +228,9 @@ LINPHONE_END_NAMESPACE
|
|||
#define L_GET_PRIVATE(OBJECT) \
|
||||
LINPHONE_NAMESPACE::Wrapper::getPrivate(OBJECT)
|
||||
|
||||
#define L_GET_PRIVATE_FROM_C_STRUCT(OBJECT, TYPE) \
|
||||
#define L_GET_PRIVATE_FROM_C_STRUCT(OBJECT, CPP_TYPE, C_TYPE) \
|
||||
L_GET_PRIVATE(LINPHONE_NAMESPACE::Wrapper::getCppPtr( \
|
||||
L_GET_CPP_PTR_FROM_C_STRUCT(OBJECT, TYPE) \
|
||||
L_GET_CPP_PTR_FROM_C_STRUCT(OBJECT, CPP_TYPE, C_TYPE) \
|
||||
))
|
||||
|
||||
#define L_GET_C_LIST_FROM_CPP_LIST(LIST, TYPE) \
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ LINPHONE_BEGIN_NAMESPACE
|
|||
class CallPrivate : public ObjectPrivate, CallListener {
|
||||
public:
|
||||
CallPrivate (LinphoneCall *call, LinphoneCore *core, LinphoneCallDir direction, const Address &from, const Address &to,
|
||||
LinphoneProxyConfig *cfg, SalOp *op, const std::shared_ptr<MediaSessionParams> msp);
|
||||
LinphoneProxyConfig *cfg, SalOp *op, const MediaSessionParams *msp);
|
||||
virtual ~CallPrivate ();
|
||||
|
||||
void initiateIncoming ();
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ LINPHONE_BEGIN_NAMESPACE
|
|||
// =============================================================================
|
||||
|
||||
CallPrivate::CallPrivate (LinphoneCall *call, LinphoneCore *core, LinphoneCallDir direction, const Address &from, const Address &to,
|
||||
LinphoneProxyConfig *cfg, SalOp *op, const shared_ptr<MediaSessionParams> msp) : lcall(call), core(core) {
|
||||
LinphoneProxyConfig *cfg, SalOp *op, const MediaSessionParams *msp) : lcall(call), core(core) {
|
||||
nextVideoFrameDecoded._func = nullptr;
|
||||
nextVideoFrameDecoded._user_data = nullptr;
|
||||
}
|
||||
|
|
@ -189,7 +189,7 @@ void CallPrivate::onResetFirstVideoFrameDecoded () {
|
|||
// =============================================================================
|
||||
|
||||
Call::Call (LinphoneCall *call, LinphoneCore *core, LinphoneCallDir direction, const Address &from, const Address &to,
|
||||
LinphoneProxyConfig *cfg, SalOp *op, const shared_ptr<MediaSessionParams> msp) : Object(*new CallPrivate(call, core, direction, from, to, cfg, op, msp)) {
|
||||
LinphoneProxyConfig *cfg, SalOp *op, const MediaSessionParams *msp) : Object(*new CallPrivate(call, core, direction, from, to, cfg, op, msp)) {
|
||||
L_D(Call);
|
||||
const Address *myAddress = (direction == LinphoneCallIncoming) ? &to : &from;
|
||||
string confType = lp_config_get_string(linphone_core_get_config(core), "misc", "conference_type", "local");
|
||||
|
|
@ -205,17 +205,17 @@ Call::Call (LinphoneCall *call, LinphoneCore *core, LinphoneCallDir direction, c
|
|||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
LinphoneStatus Call::accept (const shared_ptr<MediaSessionParams> msp) {
|
||||
LinphoneStatus Call::accept (const MediaSessionParams *msp) {
|
||||
L_D(Call);
|
||||
return static_cast<MediaSession *>(d->getActiveSession().get())->accept(msp);
|
||||
}
|
||||
|
||||
LinphoneStatus Call::acceptEarlyMedia (const std::shared_ptr<MediaSessionParams> msp) {
|
||||
LinphoneStatus Call::acceptEarlyMedia (const MediaSessionParams *msp) {
|
||||
L_D(Call);
|
||||
return static_cast<MediaSession *>(d->getActiveSession().get())->acceptEarlyMedia(msp);
|
||||
}
|
||||
|
||||
LinphoneStatus Call::acceptUpdate (const shared_ptr<MediaSessionParams> msp) {
|
||||
LinphoneStatus Call::acceptUpdate (const MediaSessionParams *msp) {
|
||||
L_D(Call);
|
||||
return static_cast<MediaSession *>(d->getActiveSession().get())->acceptUpdate(msp);
|
||||
}
|
||||
|
|
@ -270,7 +270,7 @@ LinphoneStatus Call::terminate (const LinphoneErrorInfo *ei) {
|
|||
return d->getActiveSession()->terminate(ei);
|
||||
}
|
||||
|
||||
LinphoneStatus Call::update (const std::shared_ptr<MediaSessionParams> msp) {
|
||||
LinphoneStatus Call::update (const MediaSessionParams *msp) {
|
||||
L_D(Call);
|
||||
return static_cast<MediaSession *>(d->getActiveSession().get())->update(msp);
|
||||
}
|
||||
|
|
@ -342,7 +342,7 @@ LinphoneCore * Call::getCore () const {
|
|||
return d->core;
|
||||
}
|
||||
|
||||
const shared_ptr<MediaSessionParams> Call::getCurrentParams () const {
|
||||
const MediaSessionParams * Call::getCurrentParams () const {
|
||||
L_D(const Call);
|
||||
return static_cast<MediaSession *>(d->getActiveSession().get())->getCurrentParams();
|
||||
}
|
||||
|
|
@ -392,7 +392,7 @@ void * Call::getNativeVideoWindowId () const {
|
|||
return static_cast<const MediaSession *>(d->getActiveSession().get())->getNativeVideoWindowId();
|
||||
}
|
||||
|
||||
const std::shared_ptr<MediaSessionParams> Call::getParams () const {
|
||||
const MediaSessionParams * Call::getParams () const {
|
||||
L_D(const Call);
|
||||
return static_cast<const MediaSession *>(d->getActiveSession().get())->getMediaParams();
|
||||
}
|
||||
|
|
@ -427,7 +427,7 @@ string Call::getRemoteContact () const {
|
|||
return d->getActiveSession()->getRemoteContact();
|
||||
}
|
||||
|
||||
const shared_ptr<MediaSessionParams> Call::getRemoteParams () const {
|
||||
const MediaSessionParams * Call::getRemoteParams () const {
|
||||
L_D(const Call);
|
||||
return static_cast<MediaSession *>(d->getActiveSession().get())->getRemoteParams();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,8 +19,6 @@
|
|||
#ifndef _CALL_CALL_H_
|
||||
#define _CALL_CALL_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "linphone/types.h"
|
||||
|
||||
#include "object/object.h"
|
||||
|
|
@ -42,11 +40,11 @@ class Call : public Object {
|
|||
|
||||
public:
|
||||
Call (LinphoneCall *call, LinphoneCore *core, LinphoneCallDir direction, const Address &from, const Address &to,
|
||||
LinphoneProxyConfig *cfg, SalOp *op, const std::shared_ptr<MediaSessionParams> msp);
|
||||
LinphoneProxyConfig *cfg, SalOp *op, const MediaSessionParams *msp);
|
||||
|
||||
LinphoneStatus accept (const std::shared_ptr<MediaSessionParams> msp = nullptr);
|
||||
LinphoneStatus acceptEarlyMedia (const std::shared_ptr<MediaSessionParams> msp = nullptr);
|
||||
LinphoneStatus acceptUpdate (const std::shared_ptr<MediaSessionParams> msp);
|
||||
LinphoneStatus accept (const MediaSessionParams *msp = nullptr);
|
||||
LinphoneStatus acceptEarlyMedia (const MediaSessionParams *msp = nullptr);
|
||||
LinphoneStatus acceptUpdate (const MediaSessionParams *msp);
|
||||
LinphoneStatus decline (LinphoneReason reason);
|
||||
LinphoneStatus decline (const LinphoneErrorInfo *ei);
|
||||
LinphoneStatus pause ();
|
||||
|
|
@ -57,7 +55,7 @@ public:
|
|||
LinphoneStatus takePreviewSnapshot (const std::string& file);
|
||||
LinphoneStatus takeVideoSnapshot (const std::string& file);
|
||||
LinphoneStatus terminate (const LinphoneErrorInfo *ei = nullptr);
|
||||
LinphoneStatus update (const std::shared_ptr<MediaSessionParams> msp = nullptr);
|
||||
LinphoneStatus update (const MediaSessionParams *msp = nullptr);
|
||||
void zoomVideo (float zoomFactor, float *cx, float *cy);
|
||||
|
||||
bool cameraEnabled () const;
|
||||
|
|
@ -72,7 +70,7 @@ public:
|
|||
bool getAuthenticationTokenVerified () const;
|
||||
float getAverageQuality () const;
|
||||
LinphoneCore * getCore () const;
|
||||
const std::shared_ptr<MediaSessionParams> getCurrentParams () const;
|
||||
const MediaSessionParams * getCurrentParams () const;
|
||||
float getCurrentQuality () const;
|
||||
LinphoneCallDir getDirection () const;
|
||||
int getDuration () const;
|
||||
|
|
@ -82,14 +80,14 @@ public:
|
|||
RtpTransport * getMetaRtpTransport (int streamIndex);
|
||||
float getMicrophoneVolumeGain () const;
|
||||
void * getNativeVideoWindowId () const;
|
||||
const std::shared_ptr<MediaSessionParams> getParams () const;
|
||||
const MediaSessionParams * getParams () const;
|
||||
float getPlayVolume () const;
|
||||
LinphoneReason getReason () const;
|
||||
float getRecordVolume () const;
|
||||
const Address& getRemoteAddress () const;
|
||||
std::string getRemoteAddressAsString () const;
|
||||
std::string getRemoteContact () const;
|
||||
const std::shared_ptr<MediaSessionParams> getRemoteParams () const;
|
||||
const MediaSessionParams * getRemoteParams () const;
|
||||
float getSpeakerVolumeGain () const;
|
||||
LinphoneCallState getState () const;
|
||||
LinphoneCallStats * getStats (LinphoneStreamType type) const;
|
||||
|
|
|
|||
|
|
@ -35,12 +35,12 @@ BasicChatRoom::BasicChatRoom (LinphoneCore *core, const Address &peerAddress) :
|
|||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
shared_ptr<Participant> BasicChatRoom::addParticipant (const Address &addr, const shared_ptr<CallSessionParams> params, bool hasMedia) {
|
||||
shared_ptr<Participant> BasicChatRoom::addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia) {
|
||||
lError() << "addParticipant() is not allowed on a BasicChatRoom";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void BasicChatRoom::addParticipants (const list<Address> &addresses, const shared_ptr<CallSessionParams> params, bool hasMedia) {
|
||||
void BasicChatRoom::addParticipants (const list<Address> &addresses, const CallSessionParams *params, bool hasMedia) {
|
||||
lError() << "addParticipants() is not allowed on a BasicChatRoom";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,8 +39,8 @@ public:
|
|||
virtual ~BasicChatRoom () = default;
|
||||
|
||||
/* ConferenceInterface */
|
||||
std::shared_ptr<Participant> addParticipant (const Address &addr, const std::shared_ptr<CallSessionParams> params, bool hasMedia);
|
||||
void addParticipants (const std::list<Address> &addresses, const std::shared_ptr<CallSessionParams> params, bool hasMedia);
|
||||
std::shared_ptr<Participant> addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia);
|
||||
void addParticipants (const std::list<Address> &addresses, const CallSessionParams *params, bool hasMedia);
|
||||
const std::string& getId () const;
|
||||
int getNbParticipants () const;
|
||||
std::list<std::shared_ptr<Participant>> getParticipants () const;
|
||||
|
|
|
|||
|
|
@ -800,7 +800,7 @@ void ChatRoom::sendMessage (LinphoneChatMessage *msg) {
|
|||
if (identity.empty()) {
|
||||
LinphoneProxyConfig *proxy = linphone_core_lookup_known_proxy(d->core, peer);
|
||||
if (proxy) {
|
||||
identity = L_GET_CPP_PTR_FROM_C_STRUCT(linphone_proxy_config_get_identity_address(proxy), Address)->asString();
|
||||
identity = L_GET_CPP_PTR_FROM_C_STRUCT(linphone_proxy_config_get_identity_address(proxy), Address, Address)->asString();
|
||||
} else {
|
||||
identity = linphone_core_get_primary_contact(d->core);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,18 +32,25 @@ ClientGroupChatRoomPrivate::ClientGroupChatRoomPrivate (LinphoneCore *core) : Ch
|
|||
|
||||
ClientGroupChatRoom::ClientGroupChatRoom (LinphoneCore *core, const Address &me, std::list<Address> &addresses)
|
||||
: ChatRoom(*new ChatRoomPrivate(core)), RemoteConference(core, me, nullptr) {
|
||||
string factoryUri = linphone_core_get_chat_conference_factory_uri(core);
|
||||
focus = make_shared<Participant>(factoryUri);
|
||||
CallSessionParams csp;
|
||||
shared_ptr<CallSession> session = focus->getPrivate()->createSession(*this, &csp, false, this);
|
||||
session->configure(LinphoneCallOutgoing, nullptr, nullptr, me, focus->getAddress());
|
||||
session->initiateOutgoing();
|
||||
session->startInvite(nullptr);
|
||||
// TODO
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
shared_ptr<Participant> ClientGroupChatRoom::addParticipant (const Address &addr, const shared_ptr<CallSessionParams> params, bool hasMedia) {
|
||||
shared_ptr<Participant> ClientGroupChatRoom::addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia) {
|
||||
activeParticipant = make_shared<Participant>(addr);
|
||||
activeParticipant->getPrivate()->createSession(*this, params, hasMedia, this);
|
||||
return activeParticipant;
|
||||
}
|
||||
|
||||
void ClientGroupChatRoom::addParticipants (const list<Address> &addresses, const shared_ptr<CallSessionParams> params, bool hasMedia) {
|
||||
void ClientGroupChatRoom::addParticipants (const list<Address> &addresses, const CallSessionParams *params, bool hasMedia) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@ public:
|
|||
|
||||
public:
|
||||
/* ConferenceInterface */
|
||||
std::shared_ptr<Participant> addParticipant (const Address &addr, const std::shared_ptr<CallSessionParams> params, bool hasMedia);
|
||||
void addParticipants (const std::list<Address> &addresses, const std::shared_ptr<CallSessionParams> params, bool hasMedia);
|
||||
std::shared_ptr<Participant> addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia);
|
||||
void addParticipants (const std::list<Address> &addresses, const CallSessionParams *params, bool hasMedia);
|
||||
const std::string& getId () const;
|
||||
int getNbParticipants () const;
|
||||
std::list<std::shared_ptr<Participant>> getParticipants () const;
|
||||
|
|
|
|||
|
|
@ -140,12 +140,12 @@ LinphoneCall *RealTimeTextChatRoom::getCall () const {
|
|||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
shared_ptr<Participant> RealTimeTextChatRoom::addParticipant (const Address &addr, const shared_ptr<CallSessionParams> params, bool hasMedia) {
|
||||
shared_ptr<Participant> RealTimeTextChatRoom::addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia) {
|
||||
lError() << "addParticipant() is not allowed on a RealTimeTextChatRoom";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void RealTimeTextChatRoom::addParticipants (const list<Address> &addresses, const shared_ptr<CallSessionParams> params, bool hasMedia) {
|
||||
void RealTimeTextChatRoom::addParticipants (const list<Address> &addresses, const CallSessionParams *params, bool hasMedia) {
|
||||
lError() << "addParticipants() is not allowed on a RealTimeTextChatRoom";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@ public:
|
|||
LinphoneCall *getCall () const;
|
||||
|
||||
/* ConferenceInterface */
|
||||
std::shared_ptr<Participant> addParticipant (const Address &addr, const std::shared_ptr<CallSessionParams> params, bool hasMedia);
|
||||
void addParticipants (const std::list<Address> &addresses, const std::shared_ptr<CallSessionParams> params, bool hasMedia);
|
||||
std::shared_ptr<Participant> addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia);
|
||||
void addParticipants (const std::list<Address> &addresses, const CallSessionParams *params, bool hasMedia);
|
||||
const std::string& getId () const;
|
||||
int getNbParticipants () const;
|
||||
std::list<std::shared_ptr<Participant>> getParticipants () const;
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ class ConferenceInterface {
|
|||
public:
|
||||
virtual ~ConferenceInterface() = default;
|
||||
|
||||
virtual std::shared_ptr<Participant> addParticipant (const Address &addr, const std::shared_ptr<CallSessionParams> params, bool hasMedia) = 0;
|
||||
virtual void addParticipants (const std::list<Address> &addresses, const std::shared_ptr<CallSessionParams> params, bool hasMedia) = 0;
|
||||
virtual std::shared_ptr<Participant> addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia) = 0;
|
||||
virtual void addParticipants (const std::list<Address> &addresses, const CallSessionParams *params, bool hasMedia) = 0;
|
||||
virtual const std::string& getId () const = 0;
|
||||
virtual int getNbParticipants () const = 0;
|
||||
virtual std::list<std::shared_ptr<Participant>> getParticipants () const = 0;
|
||||
|
|
|
|||
|
|
@ -39,13 +39,13 @@ shared_ptr<Participant> Conference::getActiveParticipant () const {
|
|||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
shared_ptr<Participant> Conference::addParticipant (const Address &addr, const shared_ptr<CallSessionParams> params, bool hasMedia) {
|
||||
shared_ptr<Participant> Conference::addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia) {
|
||||
activeParticipant = make_shared<Participant>(addr);
|
||||
activeParticipant->getPrivate()->createSession(*this, params, hasMedia, this);
|
||||
return activeParticipant;
|
||||
}
|
||||
|
||||
void Conference::addParticipants (const list<Address> &addresses, const shared_ptr<CallSessionParams> params, bool hasMedia) {
|
||||
void Conference::addParticipants (const list<Address> &addresses, const CallSessionParams *params, bool hasMedia) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,8 +50,8 @@ public:
|
|||
|
||||
public:
|
||||
/* ConferenceInterface */
|
||||
virtual std::shared_ptr<Participant> addParticipant (const Address &addr, const std::shared_ptr<CallSessionParams> params, bool hasMedia);
|
||||
virtual void addParticipants (const std::list<Address> &addresses, const std::shared_ptr<CallSessionParams> params, bool hasMedia);
|
||||
virtual std::shared_ptr<Participant> addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia);
|
||||
virtual void addParticipants (const std::list<Address> &addresses, const CallSessionParams *params, bool hasMedia);
|
||||
virtual const std::string& getId () const;
|
||||
virtual int getNbParticipants () const;
|
||||
virtual std::list<std::shared_ptr<Participant>> getParticipants () const;
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ LINPHONE_BEGIN_NAMESPACE
|
|||
class LocalConference : public Conference {
|
||||
public:
|
||||
LocalConference (LinphoneCore *core, const Address &myAddress, CallListener *listener = nullptr);
|
||||
virtual ~LocalConference() = default;
|
||||
|
||||
private:
|
||||
L_DISABLE_COPY(LocalConference);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
|
||||
// =============================================================================
|
||||
|
||||
extern std::shared_ptr<LinphonePrivate::MediaSessionParams> linphone_call_params_get_cpp_obj(const LinphoneCallParams *params);
|
||||
extern LinphoneCallParams * linphone_call_params_new_for_wrapper(void);
|
||||
|
||||
// =============================================================================
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class ParticipantPrivate : public ObjectPrivate {
|
|||
public:
|
||||
virtual ~ParticipantPrivate () = default;
|
||||
|
||||
void createSession (const Conference &conference, const std::shared_ptr<CallSessionParams> params, bool hasMedia, CallSessionListener *listener);
|
||||
std::shared_ptr<CallSession> createSession (const Conference &conference, const CallSessionParams *params, bool hasMedia, CallSessionListener *listener);
|
||||
std::shared_ptr<CallSession> getSession () const;
|
||||
|
||||
Address addr;
|
||||
|
|
|
|||
|
|
@ -29,12 +29,13 @@ LINPHONE_BEGIN_NAMESPACE
|
|||
|
||||
// =============================================================================
|
||||
|
||||
void ParticipantPrivate::createSession (const Conference &conference, const shared_ptr<CallSessionParams> params, bool hasMedia, CallSessionListener *listener) {
|
||||
if (hasMedia && (!params || dynamic_cast<const MediaSessionParams *>(params.get()))) {
|
||||
shared_ptr<CallSession> ParticipantPrivate::createSession (const Conference &conference, const CallSessionParams *params, bool hasMedia, CallSessionListener *listener) {
|
||||
if (hasMedia && (!params || dynamic_cast<const MediaSessionParams *>(params))) {
|
||||
session = make_shared<MediaSession>(conference, params, listener);
|
||||
} else {
|
||||
session = make_shared<CallSession>(conference, params, listener);
|
||||
}
|
||||
return session;
|
||||
}
|
||||
|
||||
shared_ptr<CallSession> ParticipantPrivate::getSession () const {
|
||||
|
|
|
|||
|
|
@ -30,6 +30,9 @@ public:
|
|||
RemoteConference (LinphoneCore *core, const Address &myAddress, CallListener *listener = nullptr);
|
||||
virtual ~RemoteConference() = default;
|
||||
|
||||
protected:
|
||||
std::shared_ptr<Participant> focus = nullptr;
|
||||
|
||||
private:
|
||||
L_DISABLE_COPY(RemoteConference);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ LINPHONE_BEGIN_NAMESPACE
|
|||
|
||||
class CallSessionPrivate : public ObjectPrivate {
|
||||
public:
|
||||
CallSessionPrivate (const Conference &conference, const std::shared_ptr<CallSessionParams> params, CallSessionListener *listener);
|
||||
CallSessionPrivate (const Conference &conference, const CallSessionParams *params, CallSessionListener *listener);
|
||||
virtual ~CallSessionPrivate ();
|
||||
|
||||
int computeDuration () const;
|
||||
|
|
@ -56,8 +56,8 @@ public:
|
|||
virtual void updating (bool isUpdate);
|
||||
|
||||
protected:
|
||||
void accept (const std::shared_ptr<CallSessionParams> params);
|
||||
virtual LinphoneStatus acceptUpdate (const std::shared_ptr<CallSessionParams> csp, LinphoneCallState nextState, const std::string &stateInfo);
|
||||
void accept (const CallSessionParams *params);
|
||||
virtual LinphoneStatus acceptUpdate (const CallSessionParams *csp, LinphoneCallState nextState, const std::string &stateInfo);
|
||||
LinphoneStatus checkForAcceptation () const;
|
||||
virtual void handleIncomingReceivedStateInIncomingNotification ();
|
||||
virtual bool isReadyForInvite () const;
|
||||
|
|
@ -82,9 +82,9 @@ protected:
|
|||
LinphoneCore *core = nullptr;
|
||||
CallSessionListener *listener = nullptr;
|
||||
|
||||
std::shared_ptr<CallSessionParams> params = nullptr;
|
||||
std::shared_ptr<CallSessionParams> currentParams = nullptr;
|
||||
std::shared_ptr<CallSessionParams> remoteParams = nullptr;
|
||||
CallSessionParams *params = nullptr;
|
||||
CallSessionParams *currentParams = nullptr;
|
||||
CallSessionParams *remoteParams = nullptr;
|
||||
|
||||
LinphoneCallDir direction = LinphoneCallOutgoing;
|
||||
LinphoneCallState state = LinphoneCallIdle;
|
||||
|
|
|
|||
|
|
@ -39,16 +39,22 @@ LINPHONE_BEGIN_NAMESPACE
|
|||
|
||||
// =============================================================================
|
||||
|
||||
CallSessionPrivate::CallSessionPrivate (const Conference &conference, const shared_ptr<CallSessionParams> params, CallSessionListener *listener)
|
||||
CallSessionPrivate::CallSessionPrivate (const Conference &conference, const CallSessionParams *params, CallSessionListener *listener)
|
||||
: conference(conference), listener(listener) {
|
||||
if (params)
|
||||
this->params = make_shared<CallSessionParams>(*params.get());
|
||||
currentParams = make_shared<CallSessionParams>();
|
||||
this->params = new CallSessionParams(*params);
|
||||
currentParams = new CallSessionParams();
|
||||
core = conference.getCore();
|
||||
ei = linphone_error_info_new();
|
||||
}
|
||||
|
||||
CallSessionPrivate::~CallSessionPrivate () {
|
||||
if (currentParams)
|
||||
delete currentParams;
|
||||
if (params)
|
||||
delete params;
|
||||
if (remoteParams)
|
||||
delete remoteParams;
|
||||
if (ei)
|
||||
linphone_error_info_unref(ei);
|
||||
if (log)
|
||||
|
|
@ -475,13 +481,13 @@ void CallSessionPrivate::updating (bool isUpdate) {
|
|||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void CallSessionPrivate::accept (const shared_ptr<CallSessionParams> params) {
|
||||
void CallSessionPrivate::accept (const CallSessionParams *params) {
|
||||
L_Q(CallSession);
|
||||
/* Try to be best-effort in giving real local or routable contact address */
|
||||
setContactOp();
|
||||
if (params) {
|
||||
this->params = params;
|
||||
sal_op_set_sent_custom_header(op, params->getPrivate()->getCustomHeaders());
|
||||
this->params = new CallSessionParams(*params);
|
||||
sal_op_set_sent_custom_header(op, this->params->getPrivate()->getCustomHeaders());
|
||||
}
|
||||
|
||||
sal_call_accept(op);
|
||||
|
|
@ -491,7 +497,7 @@ void CallSessionPrivate::accept (const shared_ptr<CallSessionParams> params) {
|
|||
setState(LinphoneCallConnected, "Connected");
|
||||
}
|
||||
|
||||
LinphoneStatus CallSessionPrivate::acceptUpdate (const shared_ptr<CallSessionParams> csp, LinphoneCallState nextState, const string &stateInfo) {
|
||||
LinphoneStatus CallSessionPrivate::acceptUpdate (const CallSessionParams *csp, LinphoneCallState nextState, const string &stateInfo) {
|
||||
return startAcceptUpdate(nextState, stateInfo);
|
||||
}
|
||||
|
||||
|
|
@ -672,7 +678,7 @@ void CallSessionPrivate::setContactOp () {
|
|||
SalAddress *salAddress = nullptr;
|
||||
LinphoneAddress *contact = getFixedContact();
|
||||
if (contact) {
|
||||
salAddress = const_cast<SalAddress *>(L_GET_PRIVATE_FROM_C_STRUCT(contact, Address)->getInternalAddress());
|
||||
salAddress = const_cast<SalAddress *>(L_GET_PRIVATE_FROM_C_STRUCT(contact, Address, Address)->getInternalAddress());
|
||||
sal_address_ref(salAddress);
|
||||
linphone_address_unref(contact);
|
||||
}
|
||||
|
|
@ -742,7 +748,7 @@ LinphoneAddress * CallSessionPrivate::getFixedContact () const {
|
|||
|
||||
// =============================================================================
|
||||
|
||||
CallSession::CallSession (const Conference &conference, const shared_ptr<CallSessionParams> params, CallSessionListener *listener)
|
||||
CallSession::CallSession (const Conference &conference, const CallSessionParams *params, CallSessionListener *listener)
|
||||
: Object(*new CallSessionPrivate(conference, params, listener)) {
|
||||
lInfo() << "New CallSession [" << this << "] initialized (LinphoneCore version: " << linphone_core_get_version() << ")";
|
||||
}
|
||||
|
|
@ -751,7 +757,7 @@ CallSession::CallSession (CallSessionPrivate &p) : Object(p) {}
|
|||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
LinphoneStatus CallSession::accept (const shared_ptr<CallSessionParams> csp) {
|
||||
LinphoneStatus CallSession::accept (const CallSessionParams *csp) {
|
||||
L_D(CallSession);
|
||||
LinphoneStatus result = d->checkForAcceptation();
|
||||
if (result < 0) return result;
|
||||
|
|
@ -759,7 +765,7 @@ LinphoneStatus CallSession::accept (const shared_ptr<CallSessionParams> csp) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
LinphoneStatus CallSession::acceptUpdate (const shared_ptr<CallSessionParams> csp) {
|
||||
LinphoneStatus CallSession::acceptUpdate (const CallSessionParams *csp) {
|
||||
L_D(CallSession);
|
||||
if (d->state != LinphoneCallUpdatedByRemote) {
|
||||
lError() << "CallSession::acceptUpdate(): invalid state " << linphone_call_state_to_string(d->state) << " to call this method";
|
||||
|
|
@ -798,7 +804,7 @@ void CallSession::configure (LinphoneCallDir direction, LinphoneProxyConfig *cfg
|
|||
if (direction == LinphoneCallOutgoing) {
|
||||
d->startPing();
|
||||
} else if (direction == LinphoneCallIncoming) {
|
||||
d->params = make_shared<CallSessionParams>();
|
||||
d->params = new CallSessionParams();
|
||||
d->params->initDefault(d->core);
|
||||
}
|
||||
}
|
||||
|
|
@ -989,13 +995,13 @@ LinphoneStatus CallSession::terminate (const LinphoneErrorInfo *ei) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
LinphoneStatus CallSession::update (const shared_ptr<CallSessionParams> csp) {
|
||||
LinphoneStatus CallSession::update (const CallSessionParams *csp) {
|
||||
L_D(CallSession);
|
||||
LinphoneCallState nextState;
|
||||
LinphoneCallState initialState = d->state;
|
||||
if (!d->isUpdateAllowed(nextState))
|
||||
return -1;
|
||||
if (d->currentParams.get() == csp.get())
|
||||
if (d->currentParams == csp)
|
||||
lWarning() << "CallSession::update() is given the current params, this is probably not what you intend to do!";
|
||||
LinphoneStatus result = d->startUpdate();
|
||||
if (result && (d->state != initialState)) {
|
||||
|
|
@ -1044,7 +1050,7 @@ const Address& CallSession::getRemoteAddress () const {
|
|||
L_D(const CallSession);
|
||||
return *L_GET_CPP_PTR_FROM_C_STRUCT((d->direction == LinphoneCallIncoming)
|
||||
? linphone_call_log_get_from(d->log) : linphone_call_log_get_to(d->log),
|
||||
Address);
|
||||
Address, Address);
|
||||
}
|
||||
|
||||
string CallSession::getRemoteAddressAsString () const {
|
||||
|
|
@ -1060,14 +1066,14 @@ string CallSession::getRemoteContact () const {
|
|||
return string();
|
||||
}
|
||||
|
||||
const shared_ptr<CallSessionParams> CallSession::getRemoteParams () {
|
||||
const CallSessionParams * CallSession::getRemoteParams () {
|
||||
L_D(CallSession);
|
||||
if (d->op){
|
||||
const SalCustomHeader *ch = sal_op_get_recv_custom_header(d->op);
|
||||
if (ch) {
|
||||
/* Instanciate a remote_params only if a SIP message was received before (custom headers indicates this) */
|
||||
if (!d->remoteParams)
|
||||
d->remoteParams = make_shared<CallSessionParams>();
|
||||
d->remoteParams = new CallSessionParams();
|
||||
d->remoteParams->getPrivate()->setCustomHeaders(ch);
|
||||
}
|
||||
return d->remoteParams;
|
||||
|
|
@ -1089,7 +1095,7 @@ string CallSession::getRemoteUserAgent () const {
|
|||
return string();
|
||||
}
|
||||
|
||||
shared_ptr<CallSessionParams> CallSession::getCurrentParams () {
|
||||
CallSessionParams * CallSession::getCurrentParams () {
|
||||
L_D(CallSession);
|
||||
d->updateCurrentParams();
|
||||
return d->currentParams;
|
||||
|
|
@ -1097,7 +1103,7 @@ shared_ptr<CallSessionParams> CallSession::getCurrentParams () {
|
|||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
const shared_ptr<CallSessionParams> CallSession::getParams () const {
|
||||
const CallSessionParams * CallSession::getParams () const {
|
||||
L_D(const CallSession);
|
||||
return d->params;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,10 +38,10 @@ class CallSession : public Object, public std::enable_shared_from_this<CallSessi
|
|||
friend class CallPrivate;
|
||||
|
||||
public:
|
||||
CallSession (const Conference &conference, const std::shared_ptr<CallSessionParams> params, CallSessionListener *listener);
|
||||
CallSession (const Conference &conference, const CallSessionParams *params, CallSessionListener *listener);
|
||||
|
||||
LinphoneStatus accept (const std::shared_ptr<CallSessionParams> csp = nullptr);
|
||||
LinphoneStatus acceptUpdate (const std::shared_ptr<CallSessionParams> csp);
|
||||
LinphoneStatus accept (const CallSessionParams *csp = nullptr);
|
||||
LinphoneStatus acceptUpdate (const CallSessionParams *csp);
|
||||
virtual void configure (LinphoneCallDir direction, LinphoneProxyConfig *cfg, SalOp *op, const Address &from, const Address &to);
|
||||
LinphoneStatus decline (LinphoneReason reason);
|
||||
LinphoneStatus decline (const LinphoneErrorInfo *ei);
|
||||
|
|
@ -51,19 +51,19 @@ public:
|
|||
virtual void startIncomingNotification ();
|
||||
virtual int startInvite (const Address *destination);
|
||||
LinphoneStatus terminate (const LinphoneErrorInfo *ei = nullptr);
|
||||
LinphoneStatus update (const std::shared_ptr<CallSessionParams> csp);
|
||||
LinphoneStatus update (const CallSessionParams *csp);
|
||||
|
||||
std::shared_ptr<CallSessionParams> getCurrentParams ();
|
||||
CallSessionParams *getCurrentParams ();
|
||||
LinphoneCallDir getDirection () const;
|
||||
int getDuration () const;
|
||||
const LinphoneErrorInfo * getErrorInfo () const;
|
||||
LinphoneCallLog * getLog () const;
|
||||
virtual const std::shared_ptr<CallSessionParams> getParams () const;
|
||||
virtual const CallSessionParams *getParams () const;
|
||||
LinphoneReason getReason () const;
|
||||
const Address& getRemoteAddress () const;
|
||||
std::string getRemoteAddressAsString () const;
|
||||
std::string getRemoteContact () const;
|
||||
const std::shared_ptr<CallSessionParams> getRemoteParams ();
|
||||
const CallSessionParams *getRemoteParams ();
|
||||
LinphoneCallState getState () const;
|
||||
|
||||
std::string getRemoteUserAgent () const;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ LINPHONE_BEGIN_NAMESPACE
|
|||
|
||||
class MediaSessionPrivate : public CallSessionPrivate {
|
||||
public:
|
||||
MediaSessionPrivate (const Conference &conference, const std::shared_ptr<CallSessionParams> params, CallSessionListener *listener);
|
||||
MediaSessionPrivate (const Conference &conference, const CallSessionParams *params, CallSessionListener *listener);
|
||||
virtual ~MediaSessionPrivate ();
|
||||
|
||||
public:
|
||||
|
|
@ -221,8 +221,8 @@ private:
|
|||
void terminate ();
|
||||
void updateCurrentParams ();
|
||||
|
||||
void accept (const std::shared_ptr<MediaSessionParams> params);
|
||||
LinphoneStatus acceptUpdate (const std::shared_ptr<CallSessionParams> csp, LinphoneCallState nextState, const std::string &stateInfo);
|
||||
void accept (const MediaSessionParams *params);
|
||||
LinphoneStatus acceptUpdate (const CallSessionParams *csp, LinphoneCallState nextState, const std::string &stateInfo);
|
||||
|
||||
#ifdef VIDEO_ENABLED
|
||||
void videoStreamEventCb (const MSFilter *f, const unsigned int eventId, const void *args);
|
||||
|
|
@ -235,9 +235,9 @@ private:
|
|||
static const std::string ecStateStore;
|
||||
static const int ecStateMaxLen;
|
||||
|
||||
std::shared_ptr<MediaSessionParams> params = nullptr;
|
||||
std::shared_ptr<MediaSessionParams> currentParams = nullptr;
|
||||
std::shared_ptr<MediaSessionParams> remoteParams = nullptr;
|
||||
MediaSessionParams *params = nullptr;
|
||||
MediaSessionParams *currentParams = nullptr;
|
||||
MediaSessionParams *remoteParams = nullptr;
|
||||
|
||||
AudioStream *audioStream = nullptr;
|
||||
OrtpEvQueue *audioStreamEvQueue = nullptr;
|
||||
|
|
|
|||
|
|
@ -66,11 +66,11 @@ const int MediaSessionPrivate::ecStateMaxLen = 1048576; /* 1Mo */
|
|||
|
||||
// =============================================================================
|
||||
|
||||
MediaSessionPrivate::MediaSessionPrivate (const Conference &conference, const shared_ptr<CallSessionParams> params, CallSessionListener *listener)
|
||||
: CallSessionPrivate(conference, params, listener) {
|
||||
if (params)
|
||||
this->params = make_shared<MediaSessionParams>(*(reinterpret_cast<const MediaSessionParams *>(params.get())));
|
||||
currentParams = make_shared<MediaSessionParams>();
|
||||
MediaSessionPrivate::MediaSessionPrivate (const Conference &conference, const CallSessionParams *csp, CallSessionListener *listener)
|
||||
: CallSessionPrivate(conference, csp, listener) {
|
||||
if (csp)
|
||||
params = new MediaSessionParams(*(reinterpret_cast<const MediaSessionParams *>(csp)));
|
||||
currentParams = new MediaSessionParams();
|
||||
|
||||
audioStats = linphone_call_stats_ref(linphone_call_stats_new());
|
||||
initStats(audioStats, LinphoneStreamTypeAudio);
|
||||
|
|
@ -91,6 +91,12 @@ MediaSessionPrivate::MediaSessionPrivate (const Conference &conference, const sh
|
|||
}
|
||||
|
||||
MediaSessionPrivate::~MediaSessionPrivate () {
|
||||
if (currentParams)
|
||||
delete currentParams;
|
||||
if (params)
|
||||
delete params;
|
||||
if (remoteParams)
|
||||
delete remoteParams;
|
||||
if (audioStats)
|
||||
linphone_call_stats_unref(audioStats);
|
||||
if (videoStats)
|
||||
|
|
@ -317,7 +323,7 @@ bool MediaSessionPrivate::failure () {
|
|||
|
||||
void MediaSessionPrivate::pausedByRemote () {
|
||||
linphone_core_notify_display_status(core, "We are paused by other party");
|
||||
shared_ptr<MediaSessionParams> newParams = make_shared<MediaSessionParams>(*params.get());
|
||||
MediaSessionParams *newParams = new MediaSessionParams(*params);
|
||||
if (lp_config_get_int(linphone_core_get_config(core), "sip", "inactive_video_on_pause", 0))
|
||||
newParams->setVideoDirection(LinphoneMediaDirectionInactive);
|
||||
acceptUpdate(newParams, LinphoneCallPausedByRemote, "Call paused by remote");
|
||||
|
|
@ -419,7 +425,7 @@ void MediaSessionPrivate::updating (bool isUpdate) {
|
|||
/* Refresh the local description, but in paused state, we don't change anything. */
|
||||
if (!rmd && lp_config_get_int(linphone_core_get_config(core), "sip", "sdp_200_ack_follow_video_policy", 0)) {
|
||||
lInfo() << "Applying default policy for offering SDP on CallSession [" << q << "]";
|
||||
params = make_shared<MediaSessionParams>();
|
||||
params = new MediaSessionParams();
|
||||
params->initDefault(core);
|
||||
}
|
||||
makeLocalMediaDescription();
|
||||
|
|
@ -747,7 +753,7 @@ void MediaSessionPrivate::fixCallParams (SalMediaDescription *rmd) {
|
|||
*/
|
||||
/*params.getPrivate()->enableImplicitRtcpFb(params.getPrivate()->implicitRtcpFbEnabled() & sal_media_description_has_implicit_avpf(rmd));*/
|
||||
}
|
||||
const shared_ptr<MediaSessionParams> rcp = q->getRemoteParams();
|
||||
const MediaSessionParams *rcp = q->getRemoteParams();
|
||||
if (rcp) {
|
||||
if (params->audioEnabled() && !rcp->audioEnabled()) {
|
||||
lInfo() << "CallSession [" << q << "]: disabling audio in our call params because the remote doesn't want it";
|
||||
|
|
@ -1111,8 +1117,8 @@ void MediaSessionPrivate::selectOutgoingIpVersion () {
|
|||
return;
|
||||
}
|
||||
|
||||
LinphoneAddress *to = linphone_call_log_get_to_address(log);
|
||||
if (sal_address_is_ipv6(L_GET_PRIVATE_FROM_C_STRUCT(to, Address)->getInternalAddress()))
|
||||
const LinphoneAddress *to = linphone_call_log_get_to_address(log);
|
||||
if (sal_address_is_ipv6(L_GET_PRIVATE_FROM_C_STRUCT(to, Address, Address)->getInternalAddress()))
|
||||
af = AF_INET6;
|
||||
else if (destProxy && destProxy->op)
|
||||
af = sal_op_get_address_family(destProxy->op);
|
||||
|
|
@ -1224,7 +1230,7 @@ void MediaSessionPrivate::makeLocalMediaDescription () {
|
|||
md->nb_streams = (biggestDesc ? biggestDesc->nb_streams : 1);
|
||||
|
||||
/* Re-check local ip address each time we make a new offer, because it may change in case of network reconnection */
|
||||
getLocalIp(*L_GET_CPP_PTR_FROM_C_STRUCT((direction == LinphoneCallOutgoing) ? log->to : log->from, Address));
|
||||
getLocalIp(*L_GET_CPP_PTR_FROM_C_STRUCT((direction == LinphoneCallOutgoing) ? log->to : log->from, Address, Address));
|
||||
strncpy(md->addr, mediaLocalIp.c_str(), sizeof(md->addr));
|
||||
LinphoneAddress *addr = nullptr;
|
||||
if (destProxy) {
|
||||
|
|
@ -2070,7 +2076,7 @@ void MediaSessionPrivate::handleIceEvents (OrtpEvent *ev) {
|
|||
if (iceAgent->hasCompletedCheckList()) {
|
||||
/* At least one ICE session has succeeded, so perform a call update */
|
||||
if (iceAgent->isControlling() && q->getCurrentParams()->getPrivate()->getUpdateCallWhenIceCompleted()) {
|
||||
shared_ptr<MediaSessionParams> newParams = make_shared<MediaSessionParams>(*params.get());
|
||||
MediaSessionParams *newParams = new MediaSessionParams(*params);
|
||||
newParams->getPrivate()->setInternalCallUpdate(true);
|
||||
q->update(newParams);
|
||||
}
|
||||
|
|
@ -3845,9 +3851,9 @@ void MediaSessionPrivate::updateCurrentParams () {
|
|||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void MediaSessionPrivate::accept (const shared_ptr<MediaSessionParams> params) {
|
||||
if (params) {
|
||||
this->params = params;
|
||||
void MediaSessionPrivate::accept (const MediaSessionParams *csp) {
|
||||
if (csp) {
|
||||
params = new MediaSessionParams(*csp);
|
||||
iceAgent->prepare(localDesc, true);
|
||||
makeLocalMediaDescription();
|
||||
sal_call_set_local_media_description(op, localDesc);
|
||||
|
|
@ -3881,7 +3887,7 @@ void MediaSessionPrivate::accept (const shared_ptr<MediaSessionParams> params) {
|
|||
expectMediaInAck = true;
|
||||
}
|
||||
|
||||
LinphoneStatus MediaSessionPrivate::acceptUpdate (const shared_ptr<CallSessionParams> csp, LinphoneCallState nextState, const string &stateInfo) {
|
||||
LinphoneStatus MediaSessionPrivate::acceptUpdate (const CallSessionParams *csp, LinphoneCallState nextState, const string &stateInfo) {
|
||||
L_Q(MediaSession);
|
||||
SalMediaDescription *desc = sal_call_get_remote_media_description(op);
|
||||
bool keepSdpVersion = lp_config_get_int(linphone_core_get_config(core), "sip", "keep_sdp_version", 0);
|
||||
|
|
@ -3893,7 +3899,7 @@ LinphoneStatus MediaSessionPrivate::acceptUpdate (const shared_ptr<CallSessionPa
|
|||
return 0;
|
||||
}
|
||||
if (csp)
|
||||
params = make_shared<MediaSessionParams>(*static_cast<MediaSessionParams *>(csp.get()));
|
||||
params = new MediaSessionParams(*static_cast<const MediaSessionParams *>(csp));
|
||||
else {
|
||||
if (!sal_call_is_offerer(op)) {
|
||||
/* Reset call params for multicast because this param is only relevant when offering */
|
||||
|
|
@ -4006,7 +4012,7 @@ void MediaSessionPrivate::stunAuthRequestedCb (const char *realm, const char *no
|
|||
|
||||
// =============================================================================
|
||||
|
||||
MediaSession::MediaSession (const Conference &conference, const shared_ptr<CallSessionParams> params, CallSessionListener *listener)
|
||||
MediaSession::MediaSession (const Conference &conference, const CallSessionParams *params, CallSessionListener *listener)
|
||||
: CallSession(*new MediaSessionPrivate(conference, params, listener)) {
|
||||
L_D(MediaSession);
|
||||
d->iceAgent = new IceAgent(*this);
|
||||
|
|
@ -4014,7 +4020,7 @@ MediaSession::MediaSession (const Conference &conference, const shared_ptr<CallS
|
|||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
LinphoneStatus MediaSession::accept (const shared_ptr<MediaSessionParams> msp) {
|
||||
LinphoneStatus MediaSession::accept (const MediaSessionParams *msp) {
|
||||
L_D(MediaSession);
|
||||
LinphoneStatus result = d->checkForAcceptation();
|
||||
if (result < 0) return result;
|
||||
|
|
@ -4043,7 +4049,7 @@ LinphoneStatus MediaSession::accept (const shared_ptr<MediaSessionParams> msp) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
LinphoneStatus MediaSession::acceptEarlyMedia (const std::shared_ptr<MediaSessionParams> msp) {
|
||||
LinphoneStatus MediaSession::acceptEarlyMedia (const MediaSessionParams *msp) {
|
||||
L_D(MediaSession);
|
||||
if (d->state != LinphoneCallIncomingReceived) {
|
||||
lError() << "Bad state " << linphone_call_state_to_string(d->state) << " for MediaSession::acceptEarlyMedia()";
|
||||
|
|
@ -4053,7 +4059,7 @@ LinphoneStatus MediaSession::acceptEarlyMedia (const std::shared_ptr<MediaSessio
|
|||
d->setContactOp();
|
||||
/* If parameters are passed, update the media description */
|
||||
if (msp) {
|
||||
d->params = msp;
|
||||
d->params = new MediaSessionParams(*msp);
|
||||
d->makeLocalMediaDescription();
|
||||
sal_call_set_local_media_description(d->op, d->localDesc);
|
||||
sal_op_set_sent_custom_header(d->op, d->params->getPrivate()->getCustomHeaders());
|
||||
|
|
@ -4066,7 +4072,7 @@ LinphoneStatus MediaSession::acceptEarlyMedia (const std::shared_ptr<MediaSessio
|
|||
return 0;
|
||||
}
|
||||
|
||||
LinphoneStatus MediaSession::acceptUpdate (const shared_ptr<MediaSessionParams> msp) {
|
||||
LinphoneStatus MediaSession::acceptUpdate (const MediaSessionParams *msp) {
|
||||
L_D(MediaSession);
|
||||
if (d->expectMediaInAck) {
|
||||
lError() << "MediaSession::acceptUpdate() is not possible during a late offer incoming reINVITE (INVITE without SDP)";
|
||||
|
|
@ -4102,7 +4108,7 @@ void MediaSession::configure (LinphoneCallDir direction, LinphoneProxyConfig *cf
|
|||
Address cleanedFrom = from;
|
||||
cleanedFrom.clean();
|
||||
d->getLocalIp(cleanedFrom);
|
||||
d->params = make_shared<MediaSessionParams>();
|
||||
d->params = new MediaSessionParams();
|
||||
d->params->initDefault(d->core);
|
||||
d->initializeParamsAccordingToIncomingCallParams();
|
||||
SalMediaDescription *md = sal_call_get_remote_media_description(d->op);
|
||||
|
|
@ -4217,7 +4223,7 @@ LinphoneStatus MediaSession::resume () {
|
|||
void MediaSession::sendVfuRequest () {
|
||||
#ifdef VIDEO_ENABLED
|
||||
L_D(MediaSession);
|
||||
shared_ptr<MediaSessionParams> currentParams = getCurrentParams();
|
||||
MediaSessionParams *currentParams = getCurrentParams();
|
||||
if ((currentParams->avpfEnabled() || currentParams->getPrivate()->implicitRtcpFbEnabled())
|
||||
&& d->videoStream && media_stream_get_state(&d->videoStream->ms) == MSStreamStarted) { // || sal_media_description_has_implicit_avpf((const SalMediaDescription *)call->resultdesc)
|
||||
lInfo() << "Request Full Intra Request on CallSession [" << this << "]";
|
||||
|
|
@ -4302,13 +4308,13 @@ void MediaSession::stopRecording () {
|
|||
d->recordActive = false;
|
||||
}
|
||||
|
||||
LinphoneStatus MediaSession::update (const shared_ptr<MediaSessionParams> msp) {
|
||||
LinphoneStatus MediaSession::update (const MediaSessionParams *msp) {
|
||||
L_D(MediaSession);
|
||||
LinphoneCallState nextState;
|
||||
LinphoneCallState initialState = d->state;
|
||||
if (!d->isUpdateAllowed(nextState))
|
||||
return -1;
|
||||
if (d->currentParams.get() == msp.get())
|
||||
if (d->currentParams == msp)
|
||||
lWarning() << "CallSession::update() is given the current params, this is probably not what you intend to do!";
|
||||
d->iceAgent->checkSession(IR_Controlling, true);
|
||||
if (d->params) {
|
||||
|
|
@ -4316,7 +4322,7 @@ LinphoneStatus MediaSession::update (const shared_ptr<MediaSessionParams> msp) {
|
|||
call->broken = FALSE;
|
||||
#endif
|
||||
d->setState(nextState, "Updating call");
|
||||
d->params = msp;
|
||||
d->params = new MediaSessionParams(*msp);
|
||||
if (d->iceAgent->prepare(d->localDesc, false)) {
|
||||
lInfo() << "Defer CallSession update to gather ICE candidates";
|
||||
return 0;
|
||||
|
|
@ -4496,7 +4502,7 @@ float MediaSession::getAverageQuality () const {
|
|||
return MediaSessionPrivate::aggregateQualityRatings(audioRating, videoRating);
|
||||
}
|
||||
|
||||
shared_ptr<MediaSessionParams> MediaSession::getCurrentParams () {
|
||||
MediaSessionParams * MediaSession::getCurrentParams () {
|
||||
L_D(MediaSession);
|
||||
d->updateCurrentParams();
|
||||
return d->currentParams;
|
||||
|
|
@ -4513,7 +4519,7 @@ float MediaSession::getCurrentQuality () const {
|
|||
return MediaSessionPrivate::aggregateQualityRatings(audioRating, videoRating);
|
||||
}
|
||||
|
||||
const shared_ptr<MediaSessionParams> MediaSession::getMediaParams () const {
|
||||
const MediaSessionParams * MediaSession::getMediaParams () const {
|
||||
L_D(const MediaSession);
|
||||
return d->params;
|
||||
}
|
||||
|
|
@ -4563,7 +4569,7 @@ void * MediaSession::getNativeVideoWindowId () const {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
const shared_ptr<CallSessionParams> MediaSession::getParams () const {
|
||||
const CallSessionParams * MediaSession::getParams () const {
|
||||
L_D(const MediaSession);
|
||||
return d->params;
|
||||
}
|
||||
|
|
@ -4588,12 +4594,14 @@ float MediaSession::getRecordVolume () const {
|
|||
return LINPHONE_VOLUME_DB_LOWEST;
|
||||
}
|
||||
|
||||
const shared_ptr<MediaSessionParams> MediaSession::getRemoteParams () {
|
||||
const MediaSessionParams * MediaSession::getRemoteParams () {
|
||||
L_D(MediaSession);
|
||||
if (d->op){
|
||||
SalMediaDescription *md = sal_call_get_remote_media_description(d->op);
|
||||
if (md) {
|
||||
d->remoteParams = make_shared<MediaSessionParams>();
|
||||
if (d->remoteParams)
|
||||
delete d->remoteParams;
|
||||
d->remoteParams = new MediaSessionParams();
|
||||
unsigned int nbAudioStreams = sal_media_description_nb_active_streams_of_type(md, SalAudio);
|
||||
for (unsigned int i = 0; i < nbAudioStreams; i++) {
|
||||
SalStreamDescription *sd = sal_media_description_get_active_stream_of_type(md, SalAudio, i);
|
||||
|
|
@ -4631,7 +4639,7 @@ const shared_ptr<MediaSessionParams> MediaSession::getRemoteParams () {
|
|||
if (ch) {
|
||||
/* Instanciate a remote_params only if a SIP message was received before (custom headers indicates this) */
|
||||
if (!d->remoteParams)
|
||||
d->remoteParams = make_shared<MediaSessionParams>();
|
||||
d->remoteParams = new MediaSessionParams();
|
||||
d->remoteParams->getPrivate()->setCustomHeaders(ch);
|
||||
}
|
||||
return d->remoteParams;
|
||||
|
|
|
|||
|
|
@ -19,8 +19,6 @@
|
|||
#ifndef _MEDIA_SESSION_H_
|
||||
#define _MEDIA_SESSION_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "call-session.h"
|
||||
#include "conference/params/media-session-params.h"
|
||||
|
||||
|
|
@ -37,11 +35,11 @@ class MediaSession : public CallSession {
|
|||
friend class IceAgent;
|
||||
|
||||
public:
|
||||
MediaSession (const Conference &conference, const std::shared_ptr<CallSessionParams> params, CallSessionListener *listener);
|
||||
MediaSession (const Conference &conference, const CallSessionParams *params, CallSessionListener *listener);
|
||||
|
||||
LinphoneStatus accept (const std::shared_ptr<MediaSessionParams> msp = nullptr);
|
||||
LinphoneStatus acceptEarlyMedia (const std::shared_ptr<MediaSessionParams> msp = nullptr);
|
||||
LinphoneStatus acceptUpdate (const std::shared_ptr<MediaSessionParams> msp);
|
||||
LinphoneStatus accept (const MediaSessionParams *msp = nullptr);
|
||||
LinphoneStatus acceptEarlyMedia (const MediaSessionParams *msp = nullptr);
|
||||
LinphoneStatus acceptUpdate (const MediaSessionParams *msp);
|
||||
void configure (LinphoneCallDir direction, LinphoneProxyConfig *cfg, SalOp *op, const Address &from, const Address &to);
|
||||
void initiateIncoming ();
|
||||
bool initiateOutgoing ();
|
||||
|
|
@ -53,7 +51,7 @@ public:
|
|||
int startInvite (const Address *destination);
|
||||
void startRecording ();
|
||||
void stopRecording ();
|
||||
LinphoneStatus update (const std::shared_ptr<MediaSessionParams> msp);
|
||||
LinphoneStatus update (const MediaSessionParams *msp);
|
||||
|
||||
void resetFirstVideoFrameDecoded ();
|
||||
LinphoneStatus takePreviewSnapshot (const std::string& file);
|
||||
|
|
@ -71,17 +69,17 @@ public:
|
|||
std::string getAuthenticationToken () const;
|
||||
bool getAuthenticationTokenVerified () const;
|
||||
float getAverageQuality () const;
|
||||
std::shared_ptr<MediaSessionParams> getCurrentParams ();
|
||||
MediaSessionParams *getCurrentParams ();
|
||||
float getCurrentQuality () const;
|
||||
const std::shared_ptr<MediaSessionParams> getMediaParams () const;
|
||||
const MediaSessionParams *getMediaParams () const;
|
||||
RtpTransport * getMetaRtcpTransport (int streamIndex);
|
||||
RtpTransport * getMetaRtpTransport (int streamIndex);
|
||||
float getMicrophoneVolumeGain () const;
|
||||
void * getNativeVideoWindowId () const;
|
||||
const std::shared_ptr<CallSessionParams> getParams () const;
|
||||
const CallSessionParams *getParams () const;
|
||||
float getPlayVolume () const;
|
||||
float getRecordVolume () const;
|
||||
const std::shared_ptr<MediaSessionParams> getRemoteParams ();
|
||||
const MediaSessionParams *getRemoteParams ();
|
||||
float getSpeakerVolumeGain () const;
|
||||
LinphoneCallStats * getStats (LinphoneStreamType type) const;
|
||||
int getStreamCount ();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue