| ice.h | | ice.h | |
| /* | | /* | |
| mediastreamer2 library - modular sound and video processing and streaming | | mediastreamer2 library - modular sound and video processing and streaming | |
|
| Copyright (C) 2006 Simon MORLAT (simon.morlat@linphone.org) | | Copyright (C) 2012 Belledonne Communications | |
| | | | |
| This program is free software; you can redistribute it and/or | | This program is free software; you can redistribute it and/or | |
| modify it under the terms of the GNU General Public License | | modify it under the terms of the GNU General Public License | |
| as published by the Free Software Foundation; either version 2 | | as published by the Free Software Foundation; either version 2 | |
| of the License, or (at your option) any later version. | | of the License, or (at your option) any later version. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
| along with this program; if not, write to the Free Software | | along with this program; if not, write to the Free Software | |
| Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
| */ | | */ | |
| | | | |
|
| #ifndef ice_hh | | #ifndef ice_h | |
| #define ice_hh | | #define ice_h | |
| | | | |
|
| #include <mediastreamer2/msfilter.h> | | #include "mscommon.h" | |
| #include "ortp/stun_udp.h" | | #include "ortp/stun_udp.h" | |
| #include "ortp/stun.h" | | #include "ortp/stun.h" | |
| #include "ortp/ortp.h" | | #include "ortp/ortp.h" | |
| | | | |
|
| /* list of state for STUN connectivity check */ | | /** | |
| #define ICE_PRUNED -1 | | * @file ice.h | |
| #define ICE_FROZEN 0 | | * @brief mediastreamer2 ice.h include file | |
| #define ICE_WAITING 1 | | * | |
| #define ICE_IN_PROGRESS 2 /* STUN request was sent */ | | * This file provides the API to handle the ICE protocol defined in the RFC | |
| #define ICE_SUCCEEDED 3 | | 5245. | |
| #define ICE_FAILED 4 /* no answer or unrecoverable failure */ | | */ | |
| | | | |
| struct SdpCandidate { | | /** | |
| /* mandatory attributes: draft 19 */ | | * ICE agent role. | |
| int foundation; | | * | |
| int component_id; | | * See the terminology in paragraph 3 of the RFC 5245 for more details. | |
| char transport[20]; | | */ | |
| int priority; | | typedef enum { | |
| char conn_addr[64]; | | IR_Controlling, | |
| int conn_port; | | IR_Controlled | |
| char cand_type[20]; | | } IceRole; | |
| char rel_addr[64]; | | | |
| int rel_port; | | /** | |
| | | * ICE candidate type. | |
| /* optionnal attributes: draft 19 */ | | * | |
| char extension_attr[512]; /* *(SP extension-att-name SP extension-at | | * See the terminology in paragraph 3 of the RFC 5245 for more details. | |
| t-value) */ | | */ | |
| }; | | typedef enum { | |
| | | ICT_HostCandidate, | |
| struct CandidatePair { | | ICT_ServerReflexiveCandidate, | |
| | | ICT_PeerReflexiveCandidate, | |
| struct SdpCandidate local_candidate; | | ICT_RelayedCandidate | |
| struct SdpCandidate remote_candidate; | | } IceCandidateType; | |
| long long pair_priority; | | | |
| /* additionnal information */ | | /** | |
| int rem_controlling; | | * ICE candidate pair state. | |
| UInt96 tid; | | * | |
| int connectivity_check; | | * See paragraph 5.7.4 ("Computing states") of RFC 5245 for more details. | |
| int retransmission_number; | | */ | |
| uint64_t retransmission_time; | | typedef enum { | |
| int nominated_pair; | | ICP_Waiting, | |
| }; | | ICP_InProgress, | |
| | | ICP_Succeeded, | |
| #define MAX_ICE_CANDIDATES 10 | | ICP_Failed, | |
| | | ICP_Frozen | |
| struct IceCheckList { | | } IceCandidatePairState; | |
| struct CandidatePair cand_pairs[MAX_ICE_CANDIDATES]; | | | |
| int nominated_pair_index; | | /** | |
| | | * ICE check list state. | |
| char loc_ice_ufrag[256]; | | * | |
| char loc_ice_pwd[256]; | | * See paragraph 5.7.4 ("Computing states") of RFC 5245 for more details. | |
| char rem_ice_ufrag[256]; | | */ | |
| char rem_ice_pwd[256]; | | typedef enum { | |
| | | ICL_Running, | |
| int rem_controlling; | | ICL_Completed, | |
| uint64_t tiebreak_value; | | ICL_Failed | |
| | | } IceCheckListState; | |
| #define ICE_CL_RUNNING 0 | | | |
| #define ICE_CL_COMPLETED 1 | | /** | |
| #define ICE_CL_FAILED 2 | | * ICE session state. | |
| int state; | | */ | |
| | | typedef enum { | |
| int RTO; | | IS_Stopped, | |
| int Ta; | | IS_Running, | |
| uint64_t keepalive_time; | | IS_Completed, | |
| }; | | IS_Failed | |
| | | } IceSessionState; | |
| | | | |
| | | /** | |
| | | * Structure representing an ICE session. | |
| | | */ | |
| | | typedef struct _IceSession { | |
| | | MSList *streams; /**< List of IceChecklist structures. Each e | |
| | | lement of the list represents a media stream */ | |
| | | char *local_ufrag; /**< Local username fragment for the session | |
| | | (assigned during the session creation) */ | |
| | | char *local_pwd; /**< Local password for the session (assigne | |
| | | d during the session creation) */ | |
| | | char *remote_ufrag; /**< Remote username fragment for the sessio | |
| | | n (provided via SDP by the peer) */ | |
| | | char *remote_pwd; /**< Remote password for the session (provid | |
| | | ed via SDP by the peer) */ | |
| | | IceRole role; /**< Role played by the agent for this session */ | |
| | | IceSessionState state; /**< State of the session */ | |
| | | uint64_t tie_breaker; /**< Random number used to resolve role conf | |
| | | licts (see paragraph 5.2 of the RFC 5245) */ | |
| | | uint32_t ta; /**< Duration of timer for sending connectivity chec | |
| | | ks in ms */ | |
| | | uint8_t max_connectivity_checks; /**< Configuration parameter | |
| | | to limit the number of connectivity checks performed by the agent (default | |
| | | is 100) */ | |
| | | uint8_t keepalive_timeout; /**< Configuration parameter to defi | |
| | | ne the timeout between each keepalive packets (default is 15s) */ | |
| | | MSTimeSpec event_time; /**< Time when an event must be sent */ | |
| | | int event_value; /** Value of the event to send */ | |
| | | bool_t send_event; /**< Boolean value telling whether an event | |
| | | must be sent or not */ | |
| | | struct sockaddr_storage ss; /**< STUN server address to use for | |
| | | the candidates gathering process */ | |
| | | socklen_t ss_len; /**< Length of the STUN server address to us | |
| | | e for the candidates gathering process */ | |
| | | MSTimeSpec gathering_start_ts; | |
| | | MSTimeSpec gathering_end_ts; | |
| | | } IceSession; | |
| | | | |
| | | typedef struct _IceStunServerCheckTransaction { | |
| | | UInt96 transactionID; | |
| | | MSTimeSpec request_time; | |
| | | MSTimeSpec response_time; | |
| | | } IceStunServerCheckTransaction; | |
| | | | |
| | | typedef struct _IceStunServerCheck { | |
| | | ortp_socket_t sock; | |
| | | int srcport; | |
| | | MSList *transactions; /**< List of IceStunServerCheckTransaction s | |
| | | tructures. */ | |
| | | MSTimeSpec next_transmission_time; | |
| | | bool_t responded; | |
| | | } IceStunServerCheck; | |
| | | | |
| | | /** | |
| | | * Structure representing an ICE transport address. | |
| | | */ | |
| | | typedef struct _IceTransportAddress { | |
| | | char ip[64]; | |
| | | int port; | |
| | | // TODO: Handling of IP version (4 or 6) and transport type: TCP, UD | |
| | | P... | |
| | | } IceTransportAddress; | |
| | | | |
| | | /** | |
| | | * Structure representing an ICE candidate. | |
| | | */ | |
| | | typedef struct _IceCandidate { | |
| | | char foundation[32]; /**< Foundation of the candidate (see paragr | |
| | | aph 3 of the RFC 5245 for more details */ | |
| | | IceTransportAddress taddr; /**< Transport address of the candid | |
| | | ate */ | |
| | | IceCandidateType type; /**< Type of the candidate */ | |
| | | uint32_t priority; /**< Priority of the candidate */ | |
| | | uint16_t componentID; /**< component ID between 1 and 256: usually | |
| | | 1 for RTP component and 2 for RTCP component */ | |
| | | struct _IceCandidate *base; /**< Pointer to the candidate that i | |
| | | s the base of the current one */ | |
| | | bool_t is_default; /**< Boolean value telling whether this cand | |
| | | idate is a default candidate or not */ | |
| | | } IceCandidate; | |
| | | | |
| | | /** | |
| | | * Structure representing an ICE candidate pair. | |
| | | */ | |
| | | typedef struct _IceCandidatePair { | |
| | | IceCandidate *local; /**< Pointer to the local candidate of the p | |
| | | air */ | |
| | | IceCandidate *remote; /**< Pointer to the remote candidate of the | |
| | | pair */ | |
| | | IceCandidatePairState state; /**< State of the candidate pair */ | |
| | | uint64_t priority; /**< Priority of the candidate pair */ | |
| | | MSTimeSpec transmission_time; /**< Time when the connectivity chec | |
| | | k for the candidate pair has been sent */ | |
| | | uint32_t rto; /**< Duration of the retransmit timer for the connec | |
| | | tivity check sent for the candidate pair in ms */ | |
| | | uint8_t retransmissions; /**< Number of retransmissions for t | |
| | | he connectivity check sent for the candidate pair */ | |
| | | IceRole role; /**< Role of the agent when the connectivity check h | |
| | | as been sent for the candidate pair */ | |
| | | bool_t is_default; /**< Boolean value telling whether this cand | |
| | | idate pair is a default candidate pair or not */ | |
| | | bool_t use_candidate; /**< Boolean value telling if the USE-CANDID | |
| | | ATE attribute must be set for the connectivity checks send for the candidat | |
| | | e pair */ | |
| | | bool_t is_nominated; /**< Boolean value telling whether this cand | |
| | | idate pair is nominated or not */ | |
| | | bool_t wait_transaction_timeout; /**< Boolean value telling t | |
| | | o create a new binding request on retransmission timeout */ | |
| | | } IceCandidatePair; | |
| | | | |
| | | /** | |
| | | * Structure representing the foundation of an ICE candidate pair. | |
| | | * | |
| | | * It is the concatenation of the foundation of a local candidate and the f | |
| | | oundation of a remote candidate. | |
| | | */ | |
| | | typedef struct _IcePairFoundation { | |
| | | char local[32]; /**< Foundation of the local candidate */ | |
| | | char remote[32]; /**< Foundation of the remote candidate */ | |
| | | } IcePairFoundation; | |
| | | | |
| | | typedef struct _IceValidCandidatePair { | |
| | | IceCandidatePair *valid; /**< Pointer to a valid candidate pa | |
| | | ir (it may be in the check list or not */ | |
| | | IceCandidatePair *generated_from; /**< Pointer to the candidat | |
| | | e pair that generated the connectivity check producing the valid candidate | |
| | | pair */ | |
| | | bool_t selected; /**< Boolean value telling whether this vali | |
| | | d candidate pair has been selected or not */ | |
| | | } IceValidCandidatePair; | |
| | | | |
| | | typedef struct _IceTransaction { | |
| | | UInt96 transactionID; /**< Transaction ID of the connectivity chec | |
| | | k sent for the candidate pair */ | |
| | | IceCandidatePair *pair; /**< A pointer to the candidate pair associa | |
| | | ted with the transaction. */ | |
| | | } IceTransaction; | |
| | | | |
| | | /** | |
| | | * Structure representing an ICE check list. | |
| | | * | |
| | | * Each media stream must be assigned a check list. | |
| | | * Check lists are added to an ICE session using the ice_session_add_check_ | |
| | | list() function. | |
| | | */ | |
| | | typedef struct _IceCheckList { | |
| | | IceSession *session; /**< Pointer to the ICE session */ | |
| | | RtpSession *rtp_session; /**< Pointer to the RTP session asso | |
| | | ciated with this ICE check list */ | |
| | | char *remote_ufrag; /**< Remote username fragment for this check | |
| | | list (provided via SDP by the peer) */ | |
| | | char *remote_pwd; /**< Remote password for this check list (pr | |
| | | ovided via SDP by the peer) */ | |
| | | MSList *stun_server_checks; /**< List of IceStunServerCheck stru | |
| | | ctures */ | |
| | | MSList *local_candidates; /**< List of IceCandidate structures | |
| | | */ | |
| | | MSList *remote_candidates; /**< List of IceCandidate structures | |
| | | */ | |
| | | MSList *pairs; /**< List of IceCandidatePair structures */ | |
| | | MSList *losing_pairs; /**< List of IceCandidatePair structures */ | |
| | | MSList *triggered_checks_queue; /**< List of IceCandidatePair struct | |
| | | ures */ | |
| | | MSList *check_list; /**< List of IceCandidatePair structures */ | |
| | | MSList *valid_list; /**< List of IceValidCandidatePair structure | |
| | | s */ | |
| | | MSList *foundations; /**< List of IcePairFoundation structures */ | |
| | | MSList *local_componentIDs; /**< List of uint16_t */ | |
| | | MSList *remote_componentIDs; /**< List of uint16_t */ | |
| | | MSList *transaction_list; /**< List of IceTransaction structur | |
| | | es */ | |
| | | IceCheckListState state; /**< Global state of the ICE check l | |
| | | ist */ | |
| | | MSTimeSpec ta_time; /**< Time when the Ta timer has been process | |
| | | ed for the last time */ | |
| | | MSTimeSpec keepalive_time; /**< Time when the last keepalive pa | |
| | | cket has been sent for this stream */ | |
| | | uint32_t foundation_generator; /**< Autoincremented integer to gene | |
| | | rate unique foundation values */ | |
| | | bool_t mismatch; /**< Boolean value telling whether there was | |
| | | a mismatch during the answer/offer process */ | |
| | | bool_t gathering_candidates; /**< Boolean value telling whether a | |
| | | candidate gathering process is running or not */ | |
| | | bool_t gathering_finished; /**< Boolean value telling whether t | |
| | | he candidate gathering process has finished or not */ | |
| | | bool_t nomination_delay_running; /**< Boolean value telling w | |
| | | hether the nomination process has been delayed or not */ | |
| | | MSTimeSpec gathering_start_time; /**< Time when the gathering | |
| | | process was started */ | |
| | | MSTimeSpec nomination_delay_start_time; /**< Time when the nominatio | |
| | | n process has been delayed */ | |
| | | } IceCheckList; | |
| | | | |
|
| #define MS_ICE_SET_SESSION MS_FILTER_METHOD(MS_ICE_ID,0 | | #ifdef __cplusplus | |
| ,RtpSession*) | | extern "C"{ | |
| #define MS_ICE_SET_CANDIDATEPAIRS MS_FILTER_METHOD(MS_ICE_ID,1,struct | | #endif | |
| CandidatePair*) | | | |
| | | /** | |
| | | * Allocate a new ICE session. | |
| | | * | |
| | | * @return Pointer to the allocated session | |
| | | * | |
| | | * This must be performed for each media session that is to use ICE. | |
| | | */ | |
| | | MS2_PUBLIC IceSession * ice_session_new(void); | |
| | | | |
| | | /** | |
| | | * Destroy a previously allocated ICE session. | |
| | | * | |
| | | * @param session The session to destroy. | |
| | | * | |
| | | * To be used when a media session using ICE is tore down. | |
| | | */ | |
| | | MS2_PUBLIC void ice_session_destroy(IceSession *session); | |
| | | | |
| | | /** | |
| | | * Allocate a new ICE check list. | |
| | | * | |
| | | * @return Pointer to the allocated check list | |
| | | * | |
| | | * A check list must be allocated for each media stream of a media session | |
| | | and be added to an ICE session using the ice_session_add_check_list() funct | |
| | | ion. | |
| | | */ | |
| | | MS2_PUBLIC IceCheckList * ice_check_list_new(void); | |
| | | | |
| | | /** | |
| | | * Destroy a previously allocated ICE check list. | |
| | | * | |
| | | * @param cl The check list to destroy | |
| | | */ | |
| | | MS2_PUBLIC void ice_check_list_destroy(IceCheckList *cl); | |
| | | | |
| | | /** | |
| | | * Tell whether ICE local candidates have been gathered for an ICE check li | |
| | | st or not. | |
| | | * | |
| | | * @param session A pointer to a check list | |
| | | * @return TRUE if local candidates have been gathered for the check list, | |
| | | FALSE otherwise. | |
| | | */ | |
| | | MS2_PUBLIC bool_t ice_check_list_candidates_gathered(const IceCheckList *cl | |
| | | ); | |
| | | | |
| | | /** | |
| | | * Get the nth check list of an ICE session. | |
| | | * | |
| | | * @param session A pointer to a session | |
| | | * @param n The number of the check list to access | |
| | | * @return A pointer to the nth check list of the session if it exists, NUL | |
| | | L otherwise | |
| | | */ | |
| | | MS2_PUBLIC IceCheckList *ice_session_check_list(const IceSession *session, | |
| | | unsigned int n); | |
| | | | |
| | | /** | |
| | | * Get the local username fragment of an ICE session. | |
| | | * | |
| | | * @param session A pointer to a session | |
| | | * @return A pointer to the local username fragment of the session | |
| | | */ | |
| | | MS2_PUBLIC const char * ice_session_local_ufrag(const IceSession *session); | |
| | | | |
| | | /** | |
| | | * Get the local password of an ICE session. | |
| | | * | |
| | | * @param session A pointer to a session | |
| | | * @return A pointer to the local password of the session | |
| | | */ | |
| | | MS2_PUBLIC const char * ice_session_local_pwd(const IceSession *session); | |
| | | | |
| | | /** | |
| | | * Get the remote username fragment of an ICE session. | |
| | | * | |
| | | * @param session A pointer to a session | |
| | | * @return A pointer to the remote username fragment of the session | |
| | | */ | |
| | | MS2_PUBLIC const char * ice_session_remote_ufrag(const IceSession *session) | |
| | | ; | |
| | | | |
| | | /** | |
| | | * Get the remote password of an ICE session. | |
| | | * | |
| | | * @param session A pointer to a session | |
| | | * @return A pointer to the remote password of the session | |
| | | */ | |
| | | MS2_PUBLIC const char * ice_session_remote_pwd(const IceSession *session); | |
| | | | |
| | | /** | |
| | | * Get the state of an ICE session. | |
| | | * | |
| | | * @param session A pointer to a session | |
| | | * @return The state of the session | |
| | | */ | |
| | | MS2_PUBLIC IceSessionState ice_session_state(const IceSession *session); | |
| | | | |
| | | /** | |
| | | * Gte the role of the agent for an ICE session. | |
| | | * | |
| | | * @param session A pointer to a session | |
| | | * @return The role of the agent for the session | |
| | | */ | |
| | | MS2_PUBLIC IceRole ice_session_role(const IceSession *session); | |
| | | | |
| | | /** | |
| | | * Set the role of the agent for an ICE session. | |
| | | * | |
| | | * @param session The session for which to set the role | |
| | | * @param role The role to set the session to | |
| | | */ | |
| | | MS2_PUBLIC void ice_session_set_role(IceSession *session, IceRole role); | |
| | | | |
| | | /** | |
| | | * Set the local credentials of an ICE session. | |
| | | * | |
| | | * This function SHOULD not be used. However, it is used by mediastream for | |
| | | testing purpose to | |
| | | * apply the same credentials for local and remote agents because the SDP e | |
| | | xchange is bypassed. | |
| | | */ | |
| | | MS2_PUBLIC void ice_session_set_local_credentials(IceSession *session, cons | |
| | | t char *ufrag, const char *pwd); | |
| | | | |
| | | /** | |
| | | * Tell if remote credentials of an ICE session have changed or not. | |
| | | * | |
| | | * @param session A pointer to a session | |
| | | * @param ufrag The new remote username fragment | |
| | | * @param pwd The new remote password | |
| | | * @return TRUE if the remote credentials of the session have changed, FALS | |
| | | E otherwise. | |
| | | */ | |
| | | MS2_PUBLIC bool_t ice_session_remote_credentials_changed(IceSession *sessio | |
| | | n, const char *ufrag, const char *pwd); | |
| | | | |
| | | /** | |
| | | * Set the remote credentials of an ICE session. | |
| | | * | |
| | | * @param session A pointer to a session | |
| | | * @param ufrag The remote username fragment | |
| | | * @param pwd The remote password | |
| | | * | |
| | | * This function is to be called once the remote credentials have been rece | |
| | | ived via SDP. | |
| | | */ | |
| | | MS2_PUBLIC void ice_session_set_remote_credentials(IceSession *session, con | |
| | | st char *ufrag, const char *pwd); | |
| | | | |
| | | /** | |
| | | * Define the maximum number of connectivity checks that will be performed | |
| | | by the agent. | |
| | | * | |
| | | * @param session A pointer to a session | |
| | | * @param max_connectivity_checks The maximum number of connectivity checks | |
| | | to perform | |
| | | * | |
| | | * This function is to be called just after the creation of the session, be | |
| | | fore any connectivity check is performed. | |
| | | * The default number of connectivity checks is 100. | |
| | | */ | |
| | | MS2_PUBLIC void ice_session_set_max_connectivity_checks(IceSession *session | |
| | | , uint8_t max_connectivity_checks); | |
| | | | |
| | | /** | |
| | | * Define the timeout between each keepalive packet in seconds. | |
| | | * | |
| | | * @param session A pointer to a session | |
| | | * @param timeout The duration of the keepalive timeout in seconds | |
| | | * | |
| | | * The default keepalive timeout is set to 15 seconds. | |
| | | */ | |
| | | MS2_PUBLIC void ice_session_set_keepalive_timeout(IceSession *session, uint | |
| | | 8_t timeout); | |
| | | | |
| | | /** | |
| | | * Get the number of check lists in an ICE session. | |
| | | * | |
| | | * @param session A pointer to a session | |
| | | * @return The number of check lists in the ICE session | |
| | | */ | |
| | | MS2_PUBLIC int ice_session_nb_check_lists(IceSession *session); | |
| | | | |
| | | /** | |
| | | * Tell whether an ICE session has at least one completed check list. | |
| | | * | |
| | | * @param session A pointer to a session | |
| | | * @return TRUE if the session has at least one completed check list, FALSE | |
| | | otherwise | |
| | | */ | |
| | | MS2_PUBLIC bool_t ice_session_has_completed_check_list(const IceSession *se | |
| | | ssion); | |
| | | | |
| | | /** | |
| | | * Add an ICE check list to an ICE session. | |
| | | * | |
| | | * @param session The session that is assigned the check list | |
| | | * @param cl The check list to assign to the session | |
| | | */ | |
| | | MS2_PUBLIC void ice_session_add_check_list(IceSession *session, IceCheckLis | |
| | | t *cl); | |
| | | | |
| | | /** | |
| | | * Remove an ICE check list from an ICE session. | |
| | | * | |
| | | * @param session The session from which to remove the check list | |
| | | * @param cl The check list to remove from the session | |
| | | */ | |
| | | MS2_PUBLIC void ice_session_remove_check_list(IceSession *session, IceCheck | |
| | | List *cl); | |
| | | | |
| | | /** | |
| | | * Tell whether ICE local candidates have been gathered for an ICE session | |
| | | or not. | |
| | | * | |
| | | * @param session A pointer to a session | |
| | | * @return TRUE if local candidates have been gathered for the session, FAL | |
| | | SE otherwise. | |
| | | */ | |
| | | MS2_PUBLIC bool_t ice_session_candidates_gathered(const IceSession *session | |
| | | ); | |
| | | | |
| | | /** | |
| | | * Gather ICE local candidates for an ICE session. | |
| | | * | |
| | | * @param session A pointer to a session | |
| | | * @param ss The STUN server address | |
| | | * @param ss_len The length of the STUN server address | |
| | | */ | |
| | | MS2_PUBLIC void ice_session_gather_candidates(IceSession *session, struct s | |
| | | ockaddr_storage ss, socklen_t ss_len); | |
| | | | |
| | | /** | |
| | | * Tell the duration of the gathering process for an ICE session in ms. | |
| | | * | |
| | | * @param session A pointer to a session | |
| | | * @return -1 if gathering has not been run, the duration of the gathering | |
| | | process in ms otherwise. | |
| | | */ | |
| | | MS2_PUBLIC int ice_session_gathering_duration(IceSession *session); | |
| | | | |
| | | /** | |
| | | * Tell the average round trip time during the gathering process for an ICE | |
| | | session in ms. | |
| | | * | |
| | | * @param session A pointer to a session | |
| | | * @return -1 if gathering has not been run, the average round trip time in | |
| | | ms otherwise. | |
| | | */ | |
| | | MS2_PUBLIC int ice_session_average_gathering_round_trip_time(IceSession *se | |
| | | ssion); | |
| | | | |
| | | /** | |
| | | * Select ICE candidates that will be used and notified in the SDP. | |
| | | * | |
| | | * @param session A pointer to a session | |
| | | * | |
| | | * This function is to be used by the Controlling agent when ICE processing | |
| | | has finished. | |
| | | */ | |
| | | MS2_PUBLIC void ice_session_select_candidates(IceSession *session); | |
| | | | |
| | | /** | |
| | | * Restart an ICE session. | |
| | | * | |
| | | * @param session A pointer to a session | |
| | | */ | |
| | | MS2_PUBLIC void ice_session_restart(IceSession *session); | |
| | | | |
| | | /** | |
| | | * Get the state of an ICE check list. | |
| | | * | |
| | | * @param cl A pointer to a check list | |
| | | * @return The check list state | |
| | | */ | |
| | | MS2_PUBLIC IceCheckListState ice_check_list_state(const IceCheckList *cl); | |
| | | | |
| | | /** | |
| | | * Set the state of an ICE check list. | |
| | | * | |
| | | * @param cl A pointer to a check list | |
| | | * @param state The new state of the check list | |
| | | */ | |
| | | MS2_PUBLIC void ice_check_list_set_state(IceCheckList *cl, IceCheckListStat | |
| | | e state); | |
| | | | |
| | | /** | |
| | | * Assign an RTP session to an ICE check list. | |
| | | * | |
| | | * @param cl A pointer to a check list | |
| | | * @param rtp_session A pointer to the RTP session to assign to the check l | |
| | | ist | |
| | | */ | |
| | | MS2_PUBLIC void ice_check_list_set_rtp_session(IceCheckList *cl, RtpSession | |
| | | *rtp_session); | |
| | | | |
| | | /** | |
| | | * Get the local username fragment of an ICE check list. | |
| | | * | |
| | | * @param cl A pointer to a check list | |
| | | * @return A pointer to the local username fragment of the check list | |
| | | */ | |
| | | MS2_PUBLIC const char * ice_check_list_local_ufrag(const IceCheckList *cl); | |
| | | | |
| | | /** | |
| | | * Get the local password of an ICE check list. | |
| | | * | |
| | | * @param cl A pointer to a check list | |
| | | * @return A pointer to the local password of the check list | |
| | | */ | |
| | | MS2_PUBLIC const char * ice_check_list_local_pwd(const IceCheckList *cl); | |
| | | | |
| | | /** | |
| | | * Get the remote username fragment of an ICE check list. | |
| | | * | |
| | | * @param cl A pointer to a check list | |
| | | * @return A pointer to the remote username fragment of the check list | |
| | | */ | |
| | | MS2_PUBLIC const char * ice_check_list_remote_ufrag(const IceCheckList *cl) | |
| | | ; | |
| | | | |
| | | /** | |
| | | * Get the remote password of an ICE check list. | |
| | | * | |
| | | * @param cl A pointer to a check list | |
| | | * @return A pointer to the remote password of the check list | |
| | | */ | |
| | | MS2_PUBLIC const char * ice_check_list_remote_pwd(const IceCheckList *cl); | |
| | | | |
| | | /** | |
| | | * Get the mismatch property of an ICE check list. | |
| | | * | |
| | | * @param cl A pointer to a check list | |
| | | * @return TRUE if there was a mismatch for the check list, FALSE otherwise | |
| | | */ | |
| | | MS2_PUBLIC bool_t ice_check_list_is_mismatch(const IceCheckList *cl); | |
| | | | |
| | | /** | |
| | | * Tell if remote credentials of an ICE check list have changed or not. | |
| | | * | |
| | | * @param cl A pointer to a check list | |
| | | * @param ufrag The new remote username fragment | |
| | | * @param pwd The new remote password | |
| | | * @return TRUE if the remote credentials of the check list have changed, F | |
| | | ALSE otherwise. | |
| | | */ | |
| | | MS2_PUBLIC bool_t ice_check_list_remote_credentials_changed(IceCheckList *c | |
| | | l, const char *ufrag, const char *pwd); | |
| | | | |
| | | /** | |
| | | * Set the remote credentials of an ICE check list. | |
| | | * | |
| | | * @param cl A pointer to a check list | |
| | | * @param ufrag The remote username fragment | |
| | | * @param pwd The remote password | |
| | | * | |
| | | * This function is to be called once the remote credentials have been rece | |
| | | ived via SDP. | |
| | | */ | |
| | | MS2_PUBLIC void ice_check_list_set_remote_credentials(IceCheckList *cl, con | |
| | | st char *ufrag, const char *pwd); | |
| | | | |
| | | /** | |
| | | * Get the default local candidate for an ICE check list. | |
| | | * | |
| | | * @param cl A pointer to a check list | |
| | | * @param rtp_addr A pointer to store the RTP address | |
| | | * @param rtp_port A pointer to store the RTP port | |
| | | * @param rtcp_addr A pointer to store the RTCP address | |
| | | * @param rtcp_port A pointer to store the RTCP port | |
| | | * @return TRUE if the information have been successfully retrieved, FALSE | |
| | | otherwise | |
| | | */ | |
| | | MS2_PUBLIC bool_t ice_check_list_default_local_candidate(const IceCheckList | |
| | | *cl, const char **rtp_addr, int *rtp_port, const char **rtcp_addr, int *rt | |
| | | cp_port); | |
| | | | |
| | | /** | |
| | | * Get the selected valid local candidate for an ICE check list. | |
| | | * | |
| | | * @param cl A pointer to a check list | |
| | | * @param rtp_addr A pointer to store the RTP address | |
| | | * @param rtp_port A pointer to store the RTP port | |
| | | * @param rtcp_addr A pointer to store the RTCP address | |
| | | * @param rtcp_port A pointer to store the RTCP port | |
| | | * @return TRUE if the information have been successfully retrieved, FALSE | |
| | | otherwise | |
| | | */ | |
| | | MS2_PUBLIC bool_t ice_check_list_selected_valid_local_candidate(const IceCh | |
| | | eckList *cl, const char **rtp_addr, int *rtp_port, const char **rtcp_addr, | |
| | | int *rtcp_port); | |
| | | | |
| | | /** | |
| | | * Get the selected valid remote candidate for an ICE check list. | |
| | | * | |
| | | * @param cl A pointer to a check list | |
| | | * @param rtp_addr A pointer to store the RTP address | |
| | | * @param rtp_port A pointer to store the RTP port | |
| | | * @param rtcp_addr A pointer to store the RTCP address | |
| | | * @param rtcp_port A pointer to store the RTCP port | |
| | | * @return TRUE if the information have been successfully retrieved, FALSE | |
| | | otherwise | |
| | | */ | |
| | | MS2_PUBLIC bool_t ice_check_list_selected_valid_remote_candidate(const IceC | |
| | | heckList *cl, const char **rtp_addr, int *rtp_port, const char **rtcp_addr, | |
| | | int *rtcp_port); | |
| | | | |
| | | /** | |
| | | * Get the type of the selected valid candidate for an ICE check list. | |
| | | * | |
| | | * @param cl A pointer to a check list | |
| | | * @return The type of the selected valid candidate | |
| | | */ | |
| | | MS2_PUBLIC IceCandidateType ice_check_list_selected_valid_candidate_type(co | |
| | | nst IceCheckList *cl); | |
| | | | |
| | | /** | |
| | | * Check if an ICE check list can be set in the Completed state after handl | |
| | | ing losing pairs. | |
| | | * | |
| | | * @param cl A pointer to a check list | |
| | | */ | |
| | | MS2_PUBLIC void ice_check_list_check_completed(IceCheckList *cl); | |
| | | | |
| | | /** | |
| | | * Get the candidate type as a string. | |
| | | * | |
| | | * @param candidate A pointer to a candidate | |
| | | * @return A pointer to the candidate type as a string | |
| | | */ | |
| | | MS2_PUBLIC const char * ice_candidate_type(const IceCandidate *candidate); | |
| | | | |
| | | /** | |
| | | * Add a local candidate to an ICE check list. | |
| | | * | |
| | | * @param cl A pointer to a check list | |
| | | * @param type The type of the local candidate to add as a string (must be | |
| | | one of: "host", "srflx", "prflx" or "relay") | |
| | | * @param ip The IP address of the local candidate as a string (eg. 192.168 | |
| | | .0.10) | |
| | | * @param port The port of the local candidate | |
| | | * @param componentID The component ID of the local candidate (usually 1 fo | |
| | | r RTP and 2 for RTCP) | |
| | | * @param base A pointer to the base candidate of the candidate to add. | |
| | | * | |
| | | * This function is to be called when gathering local candidates. | |
| | | */ | |
| | | MS2_PUBLIC IceCandidate * ice_add_local_candidate(IceCheckList *cl, const c | |
| | | har *type, const char *ip, int port, uint16_t componentID, IceCandidate *ba | |
| | | se); | |
| | | | |
| | | /** | |
| | | * Add a remote candidate to an ICE check list. | |
| | | * | |
| | | * @param cl A pointer to a check list | |
| | | * @param type The type of the remote candidate to add as a string (must be | |
| | | one of: "host", "srflx", "prflx" or "relay") | |
| | | * @param ip The IP address of the remote candidate as a string (eg. 192.16 | |
| | | 8.0.10) | |
| | | * @param port The port of the remote candidate | |
| | | * @param componentID The component ID of the remote candidate (usually 1 f | |
| | | or RTP and 2 for RTCP) | |
| | | * @param priority The priority of the remote candidate | |
| | | * @param foundation The foundation of the remote candidate | |
| | | * @param is_default Boolean value telling whether the remote candidate is | |
| | | a default candidate or not | |
| | | * | |
| | | * This function is to be called once the remote candidate list has been re | |
| | | ceived via SDP. | |
| | | */ | |
| | | MS2_PUBLIC IceCandidate * ice_add_remote_candidate(IceCheckList *cl, const | |
| | | char *type, const char *ip, int port, uint16_t componentID, uint32_t priori | |
| | | ty, const char * const foundation, bool_t is_default); | |
| | | | |
| | | /** | |
| | | * Add a losing pair to an ICE check list. | |
| | | * | |
| | | * @param cl A pointer to a check list | |
| | | * @param componentID The component ID of the candidates of the pair to add | |
| | | * @param local_addr The address of the local candidate of the pair to add | |
| | | * @param local_port The port of the local candidate of the pair to add | |
| | | * @param remote_addr The address of the remote candidate of the pair to ad | |
| | | d | |
| | | * @param remote_port The port of the remote candidate of the pair to add | |
| | | * | |
| | | * This function is to be called when a RE-INVITE with an SDP containing a | |
| | | remote-candidates attribute is received. | |
| | | */ | |
| | | MS2_PUBLIC void ice_add_losing_pair(IceCheckList *cl, uint16_t componentID, | |
| | | const char *local_addr, int local_port, const char *remote_addr, int remot | |
| | | e_port); | |
| | | | |
| | | /** | |
| | | * Get the number of losing candidate pairs for an ICE session. | |
| | | * | |
| | | * @param session A pointer to a session | |
| | | * @return The number of losing candidate pairs for the session. | |
| | | */ | |
| | | MS2_PUBLIC int ice_session_nb_losing_pairs(const IceSession *session); | |
| | | | |
| | | /** | |
| | | * Unselect the previously selected valid pairs. | |
| | | * | |
| | | * @param cl A pointer to a check list | |
| | | * | |
| | | * This function is to be used to use the pairs given by the remote control | |
| | | ling agent instead of the pairs we found ourselves. | |
| | | */ | |
| | | MS2_PUBLIC void ice_check_list_unselect_valid_pairs(IceCheckList *cl); | |
| | | | |
| | | /** | |
| | | * Set the base for the local server reflexive candidates of an ICE session | |
| | | . | |
| | | * | |
| | | * This function SHOULD not be used. However, it is used by mediastream for | |
| | | testing purpose to | |
| | | * work around the fact that it does not use candidates gathering. | |
| | | * It is to be called automatically when the gathering process finishes. | |
| | | */ | |
| | | MS2_PUBLIC void ice_session_set_base_for_srflx_candidates(IceSession *sessi | |
| | | on); | |
| | | | |
| | | /** | |
| | | * Compute the foundations of the local candidates of an ICE session. | |
| | | * | |
| | | * @param session A pointer to a session | |
| | | * | |
| | | * This function is to be called at the end of the local candidates gatheri | |
| | | ng process, before sending | |
| | | * the SDP to the remote agent. | |
| | | */ | |
| | | MS2_PUBLIC void ice_session_compute_candidates_foundations(IceSession *sess | |
| | | ion); | |
| | | | |
| | | /** | |
| | | * Eliminate the redundant candidates of an ICE session. | |
| | | * | |
| | | * @param session A pointer to a session | |
| | | * | |
| | | * This function is to be called at the end of the local candidates gatheri | |
| | | ng process, before sending | |
| | | * the SDP to the remote agent. | |
| | | */ | |
| | | MS2_PUBLIC void ice_session_eliminate_redundant_candidates(IceSession *sess | |
| | | ion); | |
| | | | |
| | | /** | |
| | | * Choose the default candidates of an ICE session. | |
| | | * | |
| | | * @param session A pointer to a session | |
| | | * | |
| | | * This function is to be called at the end of the local candidates gatheri | |
| | | ng process, before sending | |
| | | * the SDP to the remote agent. | |
| | | */ | |
| | | MS2_PUBLIC void ice_session_choose_default_candidates(IceSession *session); | |
| | | | |
| | | /** | |
| | | * Choose the default remote candidates of an ICE session. | |
| | | * | |
| | | * This function SHOULD not be used. Instead, the default remote candidates | |
| | | MUST be defined as default | |
| | | * when creating them with ice_add_remote_candidate(). | |
| | | * However, this function is used by mediastream for testing purpose. | |
| | | */ | |
| | | MS2_PUBLIC void ice_session_choose_default_remote_candidates(IceSession *se | |
| | | ssion); | |
| | | | |
| | | /** | |
| | | * Pair the local and the remote candidates for an ICE session and start se | |
| | | nding connectivity checks. | |
| | | * | |
| | | * @param session A pointer to a session | |
| | | */ | |
| | | MS2_PUBLIC void ice_session_start_connectivity_checks(IceSession *session); | |
| | | | |
| | | /** | |
| | | * Check whether all the ICE check lists of the session includes a default | |
| | | candidate for each component ID in its remote candidates list. | |
| | | * | |
| | | * @param session A pointer to a session | |
| | | */ | |
| | | MS2_PUBLIC void ice_session_check_mismatch(IceSession *session); | |
| | | | |
| | | /** | |
| | | * Core ICE check list processing. | |
| | | * | |
| | | * This function is called from the audiostream or the videostream and is N | |
| | | OT to be called by the user. | |
| | | */ | |
| | | void ice_check_list_process(IceCheckList* cl, RtpSession* rtp_session); | |
| | | | |
| | | /** | |
| | | * Handle a STUN packet that has been received. | |
| | | * | |
| | | * This function is called from the audiostream or the videostream and is N | |
| | | OT to be called by the user. | |
| | | */ | |
| | | void ice_handle_stun_packet(IceCheckList* cl, RtpSession* rtp_session, cons | |
| | | t OrtpEventData* evt_data); | |
| | | | |
| | | /** | |
| | | * Get the remote address, RTP port and RTCP port to use to send the stream | |
| | | once the ICE process has finished successfully. | |
| | | * | |
| | | * @param cl A pointer to a check list | |
| | | * @param rtp_addr A pointer to the buffer to use to store the remote RTP a | |
| | | ddress | |
| | | * @param rtp_port A pointer to the location to store the RTP port to | |
| | | * @param rtcp_aadr A pointer to the buffer to use to store the remote RTCP | |
| | | address | |
| | | * @param rtcp_port A pointer to the location to store the RTCP port to | |
| | | * @param addr_len The size of the buffer to use to store the remote addres | |
| | | ses | |
| | | * | |
| | | * This function will usually be called from within the success callback de | |
| | | fined while creating the ICE check list with ice_check_list_new(). | |
| | | */ | |
| | | MS2_PUBLIC void ice_get_remote_addr_and_ports_from_valid_pairs(const IceChe | |
| | | ckList *cl, char *rtp_addr, int *rtp_port, char *rtcp_addr, int *rtcp_port, | |
| | | int addr_len); | |
| | | | |
| | | /** | |
| | | * Print the route used to send the stream if the ICE process has finished | |
| | | successfully. | |
| | | * | |
| | | * @param cl A pointer to a check list | |
| | | * @param message A message to print before the route | |
| | | */ | |
| | | MS2_PUBLIC void ice_check_list_print_route(const IceCheckList *cl, const ch | |
| | | ar *message); | |
| | | | |
| | | /** | |
| | | * Dump an ICE session in the traces (debug function). | |
| | | */ | |
| | | MS2_PUBLIC void ice_dump_session(const IceSession *session); | |
| | | | |
| | | /** | |
| | | * Dump the candidates of an ICE check list in the traces (debug function). | |
| | | */ | |
| | | MS2_PUBLIC void ice_dump_candidates(const IceCheckList *cl); | |
| | | | |
| | | /** | |
| | | * Dump the candidate pairs of an ICE check list in the traces (debug funct | |
| | | ion). | |
| | | */ | |
| | | MS2_PUBLIC void ice_dump_candidate_pairs(const IceCheckList *cl); | |
| | | | |
| | | /** | |
| | | * Dump the valid list of an ICE check list in the traces (debug function). | |
| | | */ | |
| | | MS2_PUBLIC void ice_dump_valid_list(const IceCheckList *cl); | |
| | | | |
| | | /** | |
| | | * Dump the list of candidate pair foundations of an ICE check list in the | |
| | | traces (debug function). | |
| | | */ | |
| | | MS2_PUBLIC void ice_dump_candidate_pairs_foundations(const IceCheckList *cl | |
| | | ); | |
| | | | |
| | | /** | |
| | | * Dump the list of component IDs of an ICE check list in the traces (debug | |
| | | function). | |
| | | */ | |
| | | MS2_PUBLIC void ice_dump_componentIDs(const IceCheckList *cl); | |
| | | | |
| | | /** | |
| | | * Dump an ICE check list in the traces (debug function). | |
| | | */ | |
| | | MS2_PUBLIC void ice_dump_check_list(const IceCheckList *cl); | |
| | | | |
| | | /** | |
| | | * Dump the triggered checks queue of an ICE check list in the traces (debu | |
| | | g function). | |
| | | */ | |
| | | MS2_PUBLIC void ice_dump_triggered_checks_queue(const IceCheckList *cl); | |
| | | | |
|
| extern MSFilterDesc ms_ice_desc; | | #ifdef __cplusplus | |
| | | } | |
| | | #endif | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 6 change blocks. |
| 71 lines changed or deleted | | 944 lines changed or added | |
|
| linphonecore.h | | linphonecore.h | |
| | | | |
| skipping to change at line 40 | | skipping to change at line 40 | |
| #include "linphone/sipsetup.h" | | #include "linphone/sipsetup.h" | |
| #endif | | #endif | |
| | | | |
| #define LINPHONE_IPADDR_SIZE 64 | | #define LINPHONE_IPADDR_SIZE 64 | |
| #define LINPHONE_HOSTNAME_SIZE 128 | | #define LINPHONE_HOSTNAME_SIZE 128 | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| struct _MSSndCard; | | | |
| struct _LinphoneCore; | | struct _LinphoneCore; | |
| /** | | /** | |
| * Linphone core main object created by function linphone_core_new() . | | * Linphone core main object created by function linphone_core_new() . | |
| * @ingroup initializing | | * @ingroup initializing | |
| */ | | */ | |
| typedef struct _LinphoneCore LinphoneCore; | | typedef struct _LinphoneCore LinphoneCore; | |
|
| struct SalOp; | | | |
| | | | |
| struct _LpConfig; | | struct _LpConfig; | |
| | | | |
|
| struct _LCSipTransports{ | | /** | |
| | | * Linphone core SIP transport ports. | |
| | | * Use with #linphone_core_set_sip_transports | |
| | | * @ingroup initializing | |
| | | */ | |
| | | typedef struct _LCSipTransports{ | |
| | | /** | |
| | | * udp port to listening on, negative value if not set | |
| | | * */ | |
| int udp_port; | | int udp_port; | |
|
| | | /** | |
| | | * tcp port to listening on, negative value if not set | |
| | | * */ | |
| int tcp_port; | | int tcp_port; | |
|
| | | /** | |
| | | * dtls port to listening on, negative value if not set | |
| | | * */ | |
| int dtls_port; | | int dtls_port; | |
|
| | | /** | |
| | | * tls port to listening on, negative value if not set | |
| | | * */ | |
| int tls_port; | | int tls_port; | |
|
| }; | | } LCSipTransports; | |
| | | | |
| typedef struct _LCSipTransports LCSipTransports; | | | |
| | | | |
| /** | | /** | |
| * Object that represents a SIP address. | | * Object that represents a SIP address. | |
| * | | * | |
| * The LinphoneAddress is an opaque object to represents SIP addresses, ie | | * The LinphoneAddress is an opaque object to represents SIP addresses, ie | |
| * the content of SIP's 'from' and 'to' headers. | | * the content of SIP's 'from' and 'to' headers. | |
| * A SIP address is made of display name, username, domain name, port, and
various | | * A SIP address is made of display name, username, domain name, port, and
various | |
| * uri headers (such as tags). It looks like 'Alice <sip:alice@example.net>
'. | | * uri headers (such as tags). It looks like 'Alice <sip:alice@example.net>
'. | |
| * The LinphoneAddress has methods to extract and manipulate all parts of t
he address. | | * The LinphoneAddress has methods to extract and manipulate all parts of t
he address. | |
| * When some part of the address (for example the username) is empty, the a
ccessor methods | | * When some part of the address (for example the username) is empty, the a
ccessor methods | |
| | | | |
| skipping to change at line 142 | | skipping to change at line 155 | |
| LinphoneCallMissed, /**< The call was missed (unanswered)*/ | | LinphoneCallMissed, /**< The call was missed (unanswered)*/ | |
| LinphoneCallDeclined /**< The call was declined, either locally or b
y remote end*/ | | LinphoneCallDeclined /**< The call was declined, either locally or b
y remote end*/ | |
| } LinphoneCallStatus; | | } LinphoneCallStatus; | |
| | | | |
| /** | | /** | |
| * Structure representing a call log. | | * Structure representing a call log. | |
| * | | * | |
| * @ingroup call_logs | | * @ingroup call_logs | |
| * | | * | |
| **/ | | **/ | |
|
| typedef struct _LinphoneCallLog{ | | typedef struct _LinphoneCallLog LinphoneCallLog; | |
| LinphoneCallDir dir; /**< The direction of the call*/ | | | |
| LinphoneCallStatus status; /**< The status of the call*/ | | | |
| LinphoneAddress *from; /**<Originator of the call as a LinphoneAddre | | | |
| ss object*/ | | | |
| LinphoneAddress *to; /**<Destination of the call as a LinphoneAddres | | | |
| s object*/ | | | |
| char start_date[128]; /**<Human readable string containg the start d | | | |
| ate*/ | | | |
| int duration; /**<Duration of the call in seconds*/ | | | |
| char *refkey; | | | |
| void *user_pointer; | | | |
| rtp_stats_t local_stats; | | | |
| rtp_stats_t remote_stats; | | | |
| float quality; | | | |
| struct _LinphoneCore *lc; | | | |
| } LinphoneCallLog; | | | |
| | | | |
|
| | | /** | |
| | | * Enum describing type of media encryption types. | |
| | | **/ | |
| enum LinphoneMediaEncryption { | | enum LinphoneMediaEncryption { | |
| LinphoneMediaEncryptionNone, | | LinphoneMediaEncryptionNone, | |
| LinphoneMediaEncryptionSRTP, | | LinphoneMediaEncryptionSRTP, | |
| LinphoneMediaEncryptionZRTP | | LinphoneMediaEncryptionZRTP | |
| }; | | }; | |
| | | | |
|
| | | /** | |
| | | * Enum describing type of media encryption types. | |
| | | **/ | |
| typedef enum LinphoneMediaEncryption LinphoneMediaEncryption; | | typedef enum LinphoneMediaEncryption LinphoneMediaEncryption; | |
| | | | |
| /*public: */ | | /*public: */ | |
|
| | | LinphoneAddress *linphone_call_log_get_from(LinphoneCallLog *cl); | |
| | | LinphoneAddress *linphone_call_log_get_to(LinphoneCallLog *cl); | |
| | | LinphoneAddress *linphone_call_log_get_remote_address(LinphoneCallLog *cl); | |
| | | LinphoneCallDir linphone_call_log_get_dir(LinphoneCallLog *cl); | |
| | | LinphoneCallStatus linphone_call_log_get_status(LinphoneCallLog *cl); | |
| | | LinphoneCallStatus linphone_call_log_video_enabled(LinphoneCallLog *cl); | |
| | | time_t linphone_call_log_get_start_date(LinphoneCallLog *cl); | |
| | | int linphone_call_log_get_duration(LinphoneCallLog *cl); | |
| | | float linphone_call_log_get_quality(LinphoneCallLog *cl); | |
| void linphone_call_log_set_user_pointer(LinphoneCallLog *cl, void *up); | | void linphone_call_log_set_user_pointer(LinphoneCallLog *cl, void *up); | |
| void *linphone_call_log_get_user_pointer(const LinphoneCallLog *cl); | | void *linphone_call_log_get_user_pointer(const LinphoneCallLog *cl); | |
| void linphone_call_log_set_ref_key(LinphoneCallLog *cl, const char *refkey)
; | | void linphone_call_log_set_ref_key(LinphoneCallLog *cl, const char *refkey)
; | |
| const char *linphone_call_log_get_ref_key(const LinphoneCallLog *cl); | | const char *linphone_call_log_get_ref_key(const LinphoneCallLog *cl); | |
| const rtp_stats_t *linphone_call_log_get_local_stats(const LinphoneCallLog
*cl); | | const rtp_stats_t *linphone_call_log_get_local_stats(const LinphoneCallLog
*cl); | |
| const rtp_stats_t *linphone_call_log_get_remote_stats(const LinphoneCallLog
*cl); | | const rtp_stats_t *linphone_call_log_get_remote_stats(const LinphoneCallLog
*cl); | |
|
| | | const char *linphone_call_log_get_call_id(const LinphoneCallLog *cl); | |
| char * linphone_call_log_to_str(LinphoneCallLog *cl); | | char * linphone_call_log_to_str(LinphoneCallLog *cl); | |
| | | | |
|
| | | struct _LinphoneCallParams; | |
| | | | |
| /** | | /** | |
| * The LinphoneCallParams is an object containing various call related para
meters. | | * The LinphoneCallParams is an object containing various call related para
meters. | |
| * It can be used to retrieve parameters from a currently running call or m
odify the call's characteristics | | * It can be used to retrieve parameters from a currently running call or m
odify the call's characteristics | |
| * dynamically. | | * dynamically. | |
| **/ | | **/ | |
|
| struct _LinphoneCallParams; | | | |
| typedef struct _LinphoneCallParams LinphoneCallParams; | | typedef struct _LinphoneCallParams LinphoneCallParams; | |
| | | | |
|
| | | const PayloadType* linphone_call_params_get_used_audio_codec(const Linphone | |
| | | CallParams *cp); | |
| | | const PayloadType* linphone_call_params_get_used_video_codec(const Linphone | |
| | | CallParams *cp); | |
| LinphoneCallParams * linphone_call_params_copy(const LinphoneCallParams *cp
); | | LinphoneCallParams * linphone_call_params_copy(const LinphoneCallParams *cp
); | |
| void linphone_call_params_enable_video(LinphoneCallParams *cp, bool_t enabl
ed); | | void linphone_call_params_enable_video(LinphoneCallParams *cp, bool_t enabl
ed); | |
| bool_t linphone_call_params_video_enabled(const LinphoneCallParams *cp); | | bool_t linphone_call_params_video_enabled(const LinphoneCallParams *cp); | |
| LinphoneMediaEncryption linphone_call_params_get_media_encryption(const Lin
phoneCallParams *cp); | | LinphoneMediaEncryption linphone_call_params_get_media_encryption(const Lin
phoneCallParams *cp); | |
| void linphone_call_params_set_media_encryption(LinphoneCallParams *cp, Linp
honeMediaEncryption e); | | void linphone_call_params_set_media_encryption(LinphoneCallParams *cp, Linp
honeMediaEncryption e); | |
| void linphone_call_params_enable_early_media_sending(LinphoneCallParams *cp
, bool_t enabled); | | void linphone_call_params_enable_early_media_sending(LinphoneCallParams *cp
, bool_t enabled); | |
| bool_t linphone_call_params_early_media_sending_enabled(const LinphoneCallP
arams *cp); | | bool_t linphone_call_params_early_media_sending_enabled(const LinphoneCallP
arams *cp); | |
| bool_t linphone_call_params_local_conference_mode(const LinphoneCallParams
*cp); | | bool_t linphone_call_params_local_conference_mode(const LinphoneCallParams
*cp); | |
| void linphone_call_params_set_audio_bandwidth_limit(LinphoneCallParams *cp,
int bw); | | void linphone_call_params_set_audio_bandwidth_limit(LinphoneCallParams *cp,
int bw); | |
| void linphone_call_params_destroy(LinphoneCallParams *cp); | | void linphone_call_params_destroy(LinphoneCallParams *cp); | |
|
| | | bool_t linphone_call_params_low_bandwidth_enabled(const LinphoneCallParams | |
| | | *cp); | |
| | | void linphone_call_params_enable_low_bandwidth(LinphoneCallParams *cp, bool | |
| | | _t enabled); | |
| | | void linphone_call_params_set_record_file(LinphoneCallParams *cp, const cha | |
| | | r *path); | |
| | | const char *linphone_call_params_get_record_file(const LinphoneCallParams * | |
| | | cp); | |
| | | void linphone_call_params_add_custom_header(LinphoneCallParams *params, con | |
| | | st char *header_name, const char *header_value); | |
| | | const char *linphone_call_params_get_custom_header(const LinphoneCallParams | |
| | | *params, const char *header_name); | |
| /** | | /** | |
| * Enum describing failure reasons. | | * Enum describing failure reasons. | |
| * @ingroup initializing | | * @ingroup initializing | |
| **/ | | **/ | |
| enum _LinphoneReason{ | | enum _LinphoneReason{ | |
| LinphoneReasonNone, | | LinphoneReasonNone, | |
| LinphoneReasonNoResponse, /**<No response received from remote*/ | | LinphoneReasonNoResponse, /**<No response received from remote*/ | |
| LinphoneReasonBadCredentials, /**<Authentication failed due to bad o
r missing credentials*/ | | LinphoneReasonBadCredentials, /**<Authentication failed due to bad o
r missing credentials*/ | |
| LinphoneReasonDeclined, /**<The call has been declined*/ | | LinphoneReasonDeclined, /**<The call has been declined*/ | |
|
| LinphoneReasonNotFound, | | LinphoneReasonNotFound, /**<Destination of the calls was not found.* | |
| | | / | |
| | | LinphoneReasonNotAnswered, /**<The call was not answered in time*/ | |
| | | LinphoneReasonBusy /**<Phone line was busy */ | |
| }; | | }; | |
| | | | |
|
| | | /** | |
| | | * Enum describing failure reasons. | |
| | | * @ingroup initializing | |
| | | **/ | |
| typedef enum _LinphoneReason LinphoneReason; | | typedef enum _LinphoneReason LinphoneReason; | |
| | | | |
| const char *linphone_reason_to_string(LinphoneReason err); | | const char *linphone_reason_to_string(LinphoneReason err); | |
| | | | |
| /** | | /** | |
|
| | | * Structure describing policy regarding video streams establishments. | |
| | | * @ingroup media_parameters | |
| | | **/ | |
| | | struct _LinphoneVideoPolicy{ | |
| | | bool_t automatically_initiate; /**<Whether video shall be automatica | |
| | | lly proposed for outgoing calls.*/ | |
| | | bool_t automatically_accept; /**<Whether video shall be automaticall | |
| | | y accepted for incoming calls*/ | |
| | | bool_t unused[2]; | |
| | | }; | |
| | | | |
| | | /** | |
| | | * Structure describing policy regarding video streams establishments. | |
| | | * @ingroup media_parameters | |
| | | **/ | |
| | | typedef struct _LinphoneVideoPolicy LinphoneVideoPolicy; | |
| | | | |
| | | /** | |
| * The LinphoneCall object represents a call issued or received by the Linp
honeCore | | * The LinphoneCall object represents a call issued or received by the Linp
honeCore | |
|
| | | * @ingroup call_control | |
| **/ | | **/ | |
| struct _LinphoneCall; | | struct _LinphoneCall; | |
|
| | | /** | |
| | | * The LinphoneCall object represents a call issued or received by the Linp | |
| | | honeCore | |
| | | * @ingroup call_control | |
| | | **/ | |
| typedef struct _LinphoneCall LinphoneCall; | | typedef struct _LinphoneCall LinphoneCall; | |
| | | | |
| /** | | /** | |
|
| | | * @addtogroup call_misc | |
| | | * @{ | |
| | | **/ | |
| | | | |
| | | #define LINPHONE_CALL_STATS_AUDIO 0 | |
| | | #define LINPHONE_CALL_STATS_VIDEO 1 | |
| | | | |
| | | /** | |
| | | * Enum describing ICE states. | |
| | | * @ingroup initializing | |
| | | **/ | |
| | | enum _LinphoneIceState{ | |
| | | LinphoneIceStateNotActivated, /**< ICE has not been activated for th | |
| | | is call */ | |
| | | LinphoneIceStateFailed, /**< ICE processing has failed */ | |
| | | LinphoneIceStateInProgress, /**< ICE process is in progress */ | |
| | | LinphoneIceStateHostConnection, /**< ICE has established a direct co | |
| | | nnection to the remote host */ | |
| | | LinphoneIceStateReflexiveConnection, /**< ICE has established a conn | |
| | | ection to the remote host through one or several NATs */ | |
| | | LinphoneIceStateRelayConnection /**< ICE has established a connectio | |
| | | n through a relay */ | |
| | | }; | |
| | | | |
| | | /** | |
| | | * Enum describing Ice states. | |
| | | * @ingroup initializing | |
| | | **/ | |
| | | typedef enum _LinphoneIceState LinphoneIceState; | |
| | | | |
| | | /** | |
| | | * Enum describing uPnP states. | |
| | | * @ingroup initializing | |
| | | **/ | |
| | | enum _LinphoneUpnpState{ | |
| | | LinphoneUpnpStateIdle, /**< uPnP is not activate */ | |
| | | LinphoneUpnpStatePending, /**< uPnP process is in progress */ | |
| | | LinphoneUpnpStateAdding, /**< Internal use: Only used by port bind | |
| | | ing */ | |
| | | LinphoneUpnpStateRemoving, /**< Internal use: Only used by port bind | |
| | | ing */ | |
| | | LinphoneUpnpStateNotAvailable, /**< uPnP is not available */ | |
| | | LinphoneUpnpStateOk, /**< uPnP is enabled */ | |
| | | LinphoneUpnpStateKo, /**< uPnP processing has failed */ | |
| | | }; | |
| | | | |
| | | /** | |
| | | * Enum describing uPnP states. | |
| | | * @ingroup initializing | |
| | | **/ | |
| | | typedef enum _LinphoneUpnpState LinphoneUpnpState; | |
| | | | |
| | | /** | |
| | | * The LinphoneCallStats objects carries various statistic informations reg | |
| | | arding quality of audio or video streams. | |
| | | * | |
| | | * To receive these informations periodically and as soon as they are compu | |
| | | ted, the application is invited to place a #CallStatsUpdated callback in th | |
| | | e LinphoneCoreVTable structure | |
| | | * it passes for instanciating the LinphoneCore object (see linphone_core_n | |
| | | ew() ). | |
| | | * | |
| | | * At any time, the application can access last computed statistics using l | |
| | | inphone_call_get_audio_stats() or linphone_call_get_video_stats(). | |
| | | **/ | |
| | | typedef struct _LinphoneCallStats LinphoneCallStats; | |
| | | | |
| | | /** | |
| | | * The LinphoneCallStats objects carries various statistic informations reg | |
| | | arding quality of audio or video streams. | |
| | | * | |
| | | * To receive these informations periodically and as soon as they are compu | |
| | | ted, the application is invited to place a #CallStatsUpdated callback in th | |
| | | e LinphoneCoreVTable structure | |
| | | * it passes for instanciating the LinphoneCore object (see linphone_core_n | |
| | | ew() ). | |
| | | * | |
| | | * At any time, the application can access last computed statistics using l | |
| | | inphone_call_get_audio_stats() or linphone_call_get_video_stats(). | |
| | | **/ | |
| | | struct _LinphoneCallStats { | |
| | | int type; /**< Can be either LINPHONE_CALL_STATS_AUDIO o | |
| | | r LINPHONE_CALL_STATS_VIDEO*/ | |
| | | jitter_stats_t jitter_stats; /**<jitter buffer statistics, see oRTP | |
| | | documentation for details */ | |
| | | mblk_t* received_rtcp; /**<Last RTCP packet received, as a m | |
| | | blk_t structure. See oRTP documentation for details how to extract informat | |
| | | ion from it*/ | |
| | | mblk_t* sent_rtcp;/**<Last RTCP packet sent, as a mblk_t str | |
| | | ucture. See oRTP documentation for details how to extract information from | |
| | | it*/ | |
| | | float round_trip_delay; /**<Round trip propagation time in | |
| | | seconds if known, -1 if unknown.*/ | |
| | | LinphoneIceState ice_state; /**< State of ICE processing. */ | |
| | | LinphoneUpnpState upnp_state; /**< State of uPnP processing. * | |
| | | / | |
| | | float download_bandwidth; /**<Download bandwidth measurement of rece | |
| | | ived stream, expressed in kbit/s, including IP/UDP/RTP headers*/ | |
| | | float upload_bandwidth; /**<Download bandwidth measurement of sent s | |
| | | tream, expressed in kbit/s, including IP/UDP/RTP headers*/ | |
| | | float local_late_rate; /**<percentage of packet received too late ov | |
| | | er last second*/ | |
| | | float local_loss_rate; /**<percentage of lost packet over last secon | |
| | | d*/ | |
| | | }; | |
| | | | |
| | | /** | |
| | | * @} | |
| | | **/ | |
| | | | |
| | | const LinphoneCallStats *linphone_call_get_audio_stats(LinphoneCall *call); | |
| | | const LinphoneCallStats *linphone_call_get_video_stats(LinphoneCall *call); | |
| | | | |
| | | /** Callback prototype */ | |
| | | typedef void (*LinphoneCallCbFunc)(struct _LinphoneCall *call,void * user_d | |
| | | ata); | |
| | | | |
| | | /** | |
| * LinphoneCallState enum represents the different state a call can reach i
nto. | | * LinphoneCallState enum represents the different state a call can reach i
nto. | |
| * The application is notified of state changes through the LinphoneCoreVTa
ble::call_state_changed callback. | | * The application is notified of state changes through the LinphoneCoreVTa
ble::call_state_changed callback. | |
| * @ingroup call_control | | * @ingroup call_control | |
| **/ | | **/ | |
| typedef enum _LinphoneCallState{ | | typedef enum _LinphoneCallState{ | |
| LinphoneCallIdle, /**<Initial
call state */ | | LinphoneCallIdle, /**<Initial
call state */ | |
| LinphoneCallIncomingReceived, /**<This is a new incoming call */ | | LinphoneCallIncomingReceived, /**<This is a new incoming call */ | |
| LinphoneCallOutgoingInit, /**<An outgoing call is started */ | | LinphoneCallOutgoingInit, /**<An outgoing call is started */ | |
| LinphoneCallOutgoingProgress, /**<An outgoing call is in progress */ | | LinphoneCallOutgoingProgress, /**<An outgoing call is in progress */ | |
| LinphoneCallOutgoingRinging, /**<An outgoing call is ringing at remo
te end */ | | LinphoneCallOutgoingRinging, /**<An outgoing call is ringing at remo
te end */ | |
| LinphoneCallOutgoingEarlyMedia, /**<An outgoing call is proposed ear
ly media */ | | LinphoneCallOutgoingEarlyMedia, /**<An outgoing call is proposed ear
ly media */ | |
| LinphoneCallConnected, /**<Connected, the call is answered */ | | LinphoneCallConnected, /**<Connected, the call is answered */ | |
| LinphoneCallStreamsRunning, /**<The media streams are established an
d running*/ | | LinphoneCallStreamsRunning, /**<The media streams are established an
d running*/ | |
| LinphoneCallPausing, /**<The call is pausing at the initiative of lo
cal end */ | | LinphoneCallPausing, /**<The call is pausing at the initiative of lo
cal end */ | |
| LinphoneCallPaused, /**< The call is paused, remote end has accepted
the pause */ | | LinphoneCallPaused, /**< The call is paused, remote end has accepted
the pause */ | |
| LinphoneCallResuming, /**<The call is being resumed by local end*/ | | LinphoneCallResuming, /**<The call is being resumed by local end*/ | |
| LinphoneCallRefered, /**<The call is being transfered to another par
ty, resulting in a new outgoing call to follow immediately*/ | | LinphoneCallRefered, /**<The call is being transfered to another par
ty, resulting in a new outgoing call to follow immediately*/ | |
| LinphoneCallError, /**<The call encountered an error*/ | | LinphoneCallError, /**<The call encountered an error*/ | |
| LinphoneCallEnd, /**<The call ended normally*/ | | LinphoneCallEnd, /**<The call ended normally*/ | |
| LinphoneCallPausedByRemote, /**<The call is paused by remote end*/ | | LinphoneCallPausedByRemote, /**<The call is paused by remote end*/ | |
|
| LinphoneCallUpdatedByRemote, /**<The call's parameters are updated,
used for example when video is asked by remote */ | | LinphoneCallUpdatedByRemote, /**<The call's parameters change is req
uested by remote end, used for example when video is added by remote */ | |
| LinphoneCallIncomingEarlyMedia, /**<We are proposing early media to
an incoming call */ | | LinphoneCallIncomingEarlyMedia, /**<We are proposing early media to
an incoming call */ | |
|
| LinphoneCallUpdated, /**<The remote accepted the call update initiat
ed by us */ | | LinphoneCallUpdating, /**<A call update has been initiated by us */ | |
| LinphoneCallReleased /**< The call object is no more retained by the
core */ | | LinphoneCallReleased /**< The call object is no more retained by the
core */ | |
| } LinphoneCallState; | | } LinphoneCallState; | |
| | | | |
| const char *linphone_call_state_to_string(LinphoneCallState cs); | | const char *linphone_call_state_to_string(LinphoneCallState cs); | |
| | | | |
| LinphoneCore *linphone_call_get_core(const LinphoneCall *call); | | LinphoneCore *linphone_call_get_core(const LinphoneCall *call); | |
| LinphoneCallState linphone_call_get_state(const LinphoneCall *call); | | LinphoneCallState linphone_call_get_state(const LinphoneCall *call); | |
| bool_t linphone_call_asked_to_autoanswer(LinphoneCall *call); | | bool_t linphone_call_asked_to_autoanswer(LinphoneCall *call); | |
| const LinphoneAddress * linphone_core_get_current_call_remote_address(struc
t _LinphoneCore *lc); | | const LinphoneAddress * linphone_core_get_current_call_remote_address(struc
t _LinphoneCore *lc); | |
| const LinphoneAddress * linphone_call_get_remote_address(const LinphoneCall
*call); | | const LinphoneAddress * linphone_call_get_remote_address(const LinphoneCall
*call); | |
| char *linphone_call_get_remote_address_as_string(const LinphoneCall *call); | | char *linphone_call_get_remote_address_as_string(const LinphoneCall *call); | |
| LinphoneCallDir linphone_call_get_dir(const LinphoneCall *call); | | LinphoneCallDir linphone_call_get_dir(const LinphoneCall *call); | |
| LinphoneCall * linphone_call_ref(LinphoneCall *call); | | LinphoneCall * linphone_call_ref(LinphoneCall *call); | |
| void linphone_call_unref(LinphoneCall *call); | | void linphone_call_unref(LinphoneCall *call); | |
| LinphoneCallLog *linphone_call_get_call_log(const LinphoneCall *call); | | LinphoneCallLog *linphone_call_get_call_log(const LinphoneCall *call); | |
| const char *linphone_call_get_refer_to(const LinphoneCall *call); | | const char *linphone_call_get_refer_to(const LinphoneCall *call); | |
| bool_t linphone_call_has_transfer_pending(const LinphoneCall *call); | | bool_t linphone_call_has_transfer_pending(const LinphoneCall *call); | |
| LinphoneCall *linphone_call_get_replaced_call(LinphoneCall *call); | | LinphoneCall *linphone_call_get_replaced_call(LinphoneCall *call); | |
| int linphone_call_get_duration(const LinphoneCall *call); | | int linphone_call_get_duration(const LinphoneCall *call); | |
|
| const LinphoneCallParams * linphone_call_get_current_params(const LinphoneC | | const LinphoneCallParams * linphone_call_get_current_params(LinphoneCall *c | |
| all *call); | | all); | |
| | | const LinphoneCallParams * linphone_call_get_remote_params(LinphoneCall *ca | |
| | | ll); | |
| void linphone_call_enable_camera(LinphoneCall *lc, bool_t enabled); | | void linphone_call_enable_camera(LinphoneCall *lc, bool_t enabled); | |
| bool_t linphone_call_camera_enabled(const LinphoneCall *lc); | | bool_t linphone_call_camera_enabled(const LinphoneCall *lc); | |
| int linphone_call_take_video_snapshot(LinphoneCall *call, const char *file)
; | | int linphone_call_take_video_snapshot(LinphoneCall *call, const char *file)
; | |
| LinphoneReason linphone_call_get_reason(const LinphoneCall *call); | | LinphoneReason linphone_call_get_reason(const LinphoneCall *call); | |
| const char *linphone_call_get_remote_user_agent(LinphoneCall *call); | | const char *linphone_call_get_remote_user_agent(LinphoneCall *call); | |
|
| | | const char *linphone_call_get_remote_contact(LinphoneCall *call); | |
| float linphone_call_get_play_volume(LinphoneCall *call); | | float linphone_call_get_play_volume(LinphoneCall *call); | |
| float linphone_call_get_record_volume(LinphoneCall *call); | | float linphone_call_get_record_volume(LinphoneCall *call); | |
| float linphone_call_get_current_quality(LinphoneCall *call); | | float linphone_call_get_current_quality(LinphoneCall *call); | |
| float linphone_call_get_average_quality(LinphoneCall *call); | | float linphone_call_get_average_quality(LinphoneCall *call); | |
| const char* linphone_call_get_authentication_token(LinphoneCall *call); | | const char* linphone_call_get_authentication_token(LinphoneCall *call); | |
| bool_t linphone_call_get_authentication_token_verified(LinphoneCall *call); | | bool_t linphone_call_get_authentication_token_verified(LinphoneCall *call); | |
| void linphone_call_set_authentication_token_verified(LinphoneCall *call, bo
ol_t verified); | | void linphone_call_set_authentication_token_verified(LinphoneCall *call, bo
ol_t verified); | |
| void linphone_call_send_vfu_request(LinphoneCall *call); | | void linphone_call_send_vfu_request(LinphoneCall *call); | |
| void *linphone_call_get_user_pointer(LinphoneCall *call); | | void *linphone_call_get_user_pointer(LinphoneCall *call); | |
| void linphone_call_set_user_pointer(LinphoneCall *call, void *user_pointer)
; | | void linphone_call_set_user_pointer(LinphoneCall *call, void *user_pointer)
; | |
|
| | | void linphone_call_set_next_video_frame_decoded_callback(LinphoneCall *call | |
| | | , LinphoneCallCbFunc cb, void* user_data); | |
| | | LinphoneCallState linphone_call_get_transfer_state(LinphoneCall *call); | |
| | | void linphone_call_zoom_video(LinphoneCall* call, float zoom_factor, float* | |
| | | cx, float* cy); | |
| | | void linphone_call_start_recording(LinphoneCall *call); | |
| | | void linphone_call_stop_recording(LinphoneCall *call); | |
| | | /** | |
| | | * Return TRUE if this call is currently part of a conference | |
| | | *@param call #LinphoneCall | |
| | | *@return TRUE if part of a conference. | |
| | | * | |
| | | @ingroup call_control | |
| | | */ | |
| | | bool_t linphone_call_is_in_conference(const LinphoneCall *call); | |
| /** | | /** | |
| * Enables or disable echo cancellation for this call | | * Enables or disable echo cancellation for this call | |
| * @param call | | * @param call | |
| * @param val | | * @param val | |
| * | | * | |
| * @ingroup media_parameters | | * @ingroup media_parameters | |
| **/ | | **/ | |
| void linphone_call_enable_echo_cancellation(LinphoneCall *call, bool_t val)
; | | void linphone_call_enable_echo_cancellation(LinphoneCall *call, bool_t val)
; | |
| /** | | /** | |
| * Returns TRUE if echo cancellation is enabled. | | * Returns TRUE if echo cancellation is enabled. | |
| | | | |
| skipping to change at line 304 | | skipping to change at line 459 | |
| **/ | | **/ | |
| void linphone_call_enable_echo_limiter(LinphoneCall *call, bool_t val); | | void linphone_call_enable_echo_limiter(LinphoneCall *call, bool_t val); | |
| /** | | /** | |
| * Returns TRUE if echo limiter is enabled. | | * Returns TRUE if echo limiter is enabled. | |
| * | | * | |
| * @ingroup media_parameters | | * @ingroup media_parameters | |
| **/ | | **/ | |
| bool_t linphone_call_echo_limiter_enabled(const LinphoneCall *call); | | bool_t linphone_call_echo_limiter_enabled(const LinphoneCall *call); | |
| | | | |
| /*keep this in sync with mediastreamer2/msvolume.h*/ | | /*keep this in sync with mediastreamer2/msvolume.h*/ | |
|
| #define LINPHONE_VOLUME_DB_LOWEST (-120) /**< Lowest measured that can be r | | | |
| eturned.*/ | | /** | |
| | | * Lowest volume measurement that can be returned by linphone_call_get_play | |
| | | _volume() or linphone_call_get_record_volume(), corresponding to pure silen | |
| | | ce. | |
| | | * @ingroup call_misc | |
| | | **/ | |
| | | #define LINPHONE_VOLUME_DB_LOWEST (-120) | |
| | | | |
| /** | | /** | |
| * @addtogroup proxies | | * @addtogroup proxies | |
| * @{ | | * @{ | |
| **/ | | **/ | |
| /** | | /** | |
| * The LinphoneProxyConfig object represents a proxy configuration to be us
ed | | * The LinphoneProxyConfig object represents a proxy configuration to be us
ed | |
| * by the LinphoneCore object. | | * by the LinphoneCore object. | |
| * Its fields must not be used directly in favour of the accessors methods. | | * Its fields must not be used directly in favour of the accessors methods. | |
| * Once created and filled properly the LinphoneProxyConfig can be given to | | * Once created and filled properly the LinphoneProxyConfig can be given to | |
| | | | |
| skipping to change at line 382 | | skipping to change at line 542 | |
| bool_t linphone_proxy_config_is_registered(const LinphoneProxyConfig *obj); | | bool_t linphone_proxy_config_is_registered(const LinphoneProxyConfig *obj); | |
| const char *linphone_proxy_config_get_domain(const LinphoneProxyConfig *cfg
); | | const char *linphone_proxy_config_get_domain(const LinphoneProxyConfig *cfg
); | |
| | | | |
| const char *linphone_proxy_config_get_route(const LinphoneProxyConfig *obj)
; | | const char *linphone_proxy_config_get_route(const LinphoneProxyConfig *obj)
; | |
| const char *linphone_proxy_config_get_identity(const LinphoneProxyConfig *o
bj); | | const char *linphone_proxy_config_get_identity(const LinphoneProxyConfig *o
bj); | |
| bool_t linphone_proxy_config_publish_enabled(const LinphoneProxyConfig *obj
); | | bool_t linphone_proxy_config_publish_enabled(const LinphoneProxyConfig *obj
); | |
| const char *linphone_proxy_config_get_addr(const LinphoneProxyConfig *obj); | | const char *linphone_proxy_config_get_addr(const LinphoneProxyConfig *obj); | |
| int linphone_proxy_config_get_expires(const LinphoneProxyConfig *obj); | | int linphone_proxy_config_get_expires(const LinphoneProxyConfig *obj); | |
| bool_t linphone_proxy_config_register_enabled(const LinphoneProxyConfig *ob
j); | | bool_t linphone_proxy_config_register_enabled(const LinphoneProxyConfig *ob
j); | |
| void linphone_proxy_config_refresh_register(LinphoneProxyConfig *obj); | | void linphone_proxy_config_refresh_register(LinphoneProxyConfig *obj); | |
|
| | | const char *linphone_proxy_config_get_contact_parameters(const LinphoneProx | |
| | | yConfig *obj); | |
| | | void linphone_proxy_config_set_contact_parameters(LinphoneProxyConfig *obj, | |
| | | const char *contact_params); | |
| struct _LinphoneCore * linphone_proxy_config_get_core(const LinphoneProxyCo
nfig *obj); | | struct _LinphoneCore * linphone_proxy_config_get_core(const LinphoneProxyCo
nfig *obj); | |
| | | | |
| bool_t linphone_proxy_config_get_dial_escape_plus(const LinphoneProxyConfig
*cfg); | | bool_t linphone_proxy_config_get_dial_escape_plus(const LinphoneProxyConfig
*cfg); | |
| const char * linphone_proxy_config_get_dial_prefix(const LinphoneProxyConfi
g *cfg); | | const char * linphone_proxy_config_get_dial_prefix(const LinphoneProxyConfi
g *cfg); | |
| | | | |
| LinphoneReason linphone_proxy_config_get_error(const LinphoneProxyConfig *c
fg); | | LinphoneReason linphone_proxy_config_get_error(const LinphoneProxyConfig *c
fg); | |
| | | | |
| /* destruction is called automatically when removing the proxy config */ | | /* destruction is called automatically when removing the proxy config */ | |
| void linphone_proxy_config_destroy(LinphoneProxyConfig *cfg); | | void linphone_proxy_config_destroy(LinphoneProxyConfig *cfg); | |
| void linphone_proxy_config_set_sip_setup(LinphoneProxyConfig *cfg, const ch
ar *type); | | void linphone_proxy_config_set_sip_setup(LinphoneProxyConfig *cfg, const ch
ar *type); | |
| | | | |
| skipping to change at line 470 | | skipping to change at line 632 | |
| * transactions and retry them with authentication headers. | | * transactions and retry them with authentication headers. | |
| * | | * | |
| **/ | | **/ | |
| typedef struct _LinphoneAuthInfo LinphoneAuthInfo; | | typedef struct _LinphoneAuthInfo LinphoneAuthInfo; | |
| | | | |
| LinphoneAuthInfo *linphone_auth_info_new(const char *username, const char *
userid, | | LinphoneAuthInfo *linphone_auth_info_new(const char *username, const char *
userid, | |
| const char *passwd, const char *ha1,const char *realm); | | const char *passwd, const char *ha1,const char *realm); | |
| void linphone_auth_info_set_passwd(LinphoneAuthInfo *info, const char *pass
wd); | | void linphone_auth_info_set_passwd(LinphoneAuthInfo *info, const char *pass
wd); | |
| void linphone_auth_info_set_username(LinphoneAuthInfo *info, const char *us
ername); | | void linphone_auth_info_set_username(LinphoneAuthInfo *info, const char *us
ername); | |
| void linphone_auth_info_set_userid(LinphoneAuthInfo *info, const char *user
id); | | void linphone_auth_info_set_userid(LinphoneAuthInfo *info, const char *user
id); | |
|
| | | void linphone_auth_info_set_realm(LinphoneAuthInfo *info, const char *realm | |
| | | ); | |
| | | void linphone_auth_info_set_ha1(LinphoneAuthInfo *info, const char *ha1); | |
| | | | |
| const char *linphone_auth_info_get_username(const LinphoneAuthInfo *i); | | const char *linphone_auth_info_get_username(const LinphoneAuthInfo *i); | |
| const char *linphone_auth_info_get_passwd(const LinphoneAuthInfo *i); | | const char *linphone_auth_info_get_passwd(const LinphoneAuthInfo *i); | |
| const char *linphone_auth_info_get_userid(const LinphoneAuthInfo *i); | | const char *linphone_auth_info_get_userid(const LinphoneAuthInfo *i); | |
|
| | | const char *linphone_auth_info_get_realm(const LinphoneAuthInfo *i); | |
| | | const char *linphone_auth_info_get_ha1(const LinphoneAuthInfo *i); | |
| | | | |
| /* you don't need those function*/ | | /* you don't need those function*/ | |
| void linphone_auth_info_destroy(LinphoneAuthInfo *info); | | void linphone_auth_info_destroy(LinphoneAuthInfo *info); | |
| LinphoneAuthInfo * linphone_auth_info_new_from_config_file(struct _LpConfig
*config, int pos); | | LinphoneAuthInfo * linphone_auth_info_new_from_config_file(struct _LpConfig
*config, int pos); | |
| | | | |
| struct _LinphoneChatRoom; | | struct _LinphoneChatRoom; | |
| /** | | /** | |
| * @addtogroup chatroom | | * @addtogroup chatroom | |
| * @{ | | * @{ | |
| */ | | */ | |
|
| | | | |
| | | /** | |
| | | * A chat room message to old content to be sent. | |
| | | * <br> Can be created by linphone_chat_room_create_message(). | |
| | | */ | |
| | | typedef struct _LinphoneChatMessage LinphoneChatMessage; | |
| | | | |
| /** | | /** | |
| * A chat room is the place where text messages are exchanged. | | * A chat room is the place where text messages are exchanged. | |
| * <br> Can be created by linphone_core_create_chat_room(). | | * <br> Can be created by linphone_core_create_chat_room(). | |
| */ | | */ | |
| typedef struct _LinphoneChatRoom LinphoneChatRoom; | | typedef struct _LinphoneChatRoom LinphoneChatRoom; | |
|
| | | | |
| /** | | /** | |
|
| * Create a new chat room for messaging from a sip uri like sip:joe@sip.lin | | *LinphoneChatMessageState is used to notify if messages have been succesfu | |
| phone.org | | lly delivered or not. | |
| * @param lc #LinphoneCore object | | | |
| * @param to destination address for messages | | | |
| * @return #LinphoneChatRoom where messaging can take place. | | | |
| */ | | | |
| LinphoneChatRoom * linphone_core_create_chat_room(LinphoneCore *lc, const c | | | |
| har *to); | | | |
| /** | | | |
| * Destructor | | | |
| * @param cr #LinphoneChatRoom object | | | |
| */ | | */ | |
|
| void linphone_chat_room_destroy(LinphoneChatRoom *cr); | | typedef enum _LinphoneChatMessageStates { | |
| | | LinphoneChatMessageStateIdle, /**<initial state*/ | |
| | | LinphoneChatMessageStateInProgress, /**<delivery in progress**/ | |
| | | LinphoneChatMessageStateDelivered, /**<message succesffully delivere | |
| | | d an acknoleged by remote end point*/ | |
| | | LinphoneChatMessageStateNotDelivered /**<message was not delivered*/ | |
| | | }LinphoneChatMessageState; | |
| | | | |
| /** | | /** | |
|
| * get peer address \link linphone_core_create_chat_room() associated to \e | | * Call back used to notify message delivery status | |
| ndlink this #LinphoneChatRoom | | *@param msg #LinphoneChatMessage object | |
| * @param cr #LinphoneChatRoom object | | *@param status LinphoneChatMessageState | |
| * @return #LinphoneAddress peer address | | *@param ud application user data | |
| */ | | */ | |
|
| | | typedef void (*LinphoneChatMessageStateChangeCb)(LinphoneChatMessage* msg,L | |
| | | inphoneChatMessageState state,void* ud); | |
| | | | |
| | | void linphone_core_set_chat_database_path(LinphoneCore *lc, const char *pat | |
| | | h); | |
| | | LinphoneChatRoom * linphone_core_create_chat_room(LinphoneCore *lc, const c | |
| | | har *to); | |
| | | LinphoneChatRoom *linphone_core_get_chat_room(LinphoneCore *lc, const Linph | |
| | | oneAddress *addr); | |
| | | void linphone_chat_room_destroy(LinphoneChatRoom *cr); | |
| | | LinphoneChatMessage* linphone_chat_room_create_message(LinphoneChatRoom *cr | |
| | | ,const char* message); | |
| const LinphoneAddress* linphone_chat_room_get_peer_address(LinphoneChatRoom
*cr); | | const LinphoneAddress* linphone_chat_room_get_peer_address(LinphoneChatRoom
*cr); | |
|
| /** | | | |
| * send a message to peer member of this chat room. | | | |
| * @param cr #LinphoneChatRoom object | | | |
| * @param msg message to be sent | | | |
| */ | | | |
| void linphone_chat_room_send_message(LinphoneChatRoom *cr, const char *msg)
; | | void linphone_chat_room_send_message(LinphoneChatRoom *cr, const char *msg)
; | |
|
| | | void linphone_chat_room_send_message2(LinphoneChatRoom *cr, LinphoneChatMes | |
| | | sage* msg,LinphoneChatMessageStateChangeCb status_cb,void* ud); | |
| | | MSList *linphone_chat_room_get_history(LinphoneChatRoom *cr,int nb_message) | |
| | | ; | |
| | | void linphone_chat_room_mark_as_read(LinphoneChatRoom *cr); | |
| | | void linphone_chat_room_delete_history(LinphoneChatRoom *cr); | |
| | | int linphone_chat_room_get_unread_messages_count(LinphoneChatRoom *cr); | |
| | | LinphoneCore* linphone_chat_room_get_lc(LinphoneChatRoom *cr); | |
| void linphone_chat_room_set_user_data(LinphoneChatRoom *cr, void * ud); | | void linphone_chat_room_set_user_data(LinphoneChatRoom *cr, void * ud); | |
| void * linphone_chat_room_get_user_data(LinphoneChatRoom *cr); | | void * linphone_chat_room_get_user_data(LinphoneChatRoom *cr); | |
| | | | |
|
| | | LinphoneChatMessageState linphone_chat_message_get_state(const LinphoneChat | |
| | | Message* message); | |
| | | const char* linphone_chat_message_state_to_string(const LinphoneChatMessage | |
| | | State state); | |
| | | LinphoneChatMessage* linphone_chat_message_clone(const LinphoneChatMessage* | |
| | | message); | |
| | | void linphone_chat_message_destroy(LinphoneChatMessage* msg); | |
| | | void linphone_chat_message_set_from(LinphoneChatMessage* message, const Lin | |
| | | phoneAddress* from); | |
| | | const LinphoneAddress* linphone_chat_message_get_from(const LinphoneChatMes | |
| | | sage* message); | |
| | | const LinphoneAddress* linphone_chat_message_get_to(const LinphoneChatMessa | |
| | | ge* message); | |
| | | const char* linphone_chat_message_get_external_body_url(const LinphoneChatM | |
| | | essage* message); | |
| | | void linphone_chat_message_set_external_body_url(LinphoneChatMessage* messa | |
| | | ge,const char* url); | |
| | | const char * linphone_chat_message_get_text(const LinphoneChatMessage* mess | |
| | | age); | |
| | | time_t linphone_chat_message_get_time(const LinphoneChatMessage* message); | |
| | | void* linphone_chat_message_get_user_data(const LinphoneChatMessage* messag | |
| | | e); | |
| | | void linphone_chat_message_set_user_data(LinphoneChatMessage* message,void* | |
| | | ); | |
| | | LinphoneChatRoom* linphone_chat_message_get_chat_room(LinphoneChatMessage * | |
| | | msg); | |
| | | const LinphoneAddress* linphone_chat_message_get_peer_address(LinphoneChatM | |
| | | essage *msg); | |
| | | LinphoneAddress *linphone_chat_message_get_local_address(const LinphoneChat | |
| | | Message* message); | |
| | | void linphone_chat_message_add_custom_header(LinphoneChatMessage* message, | |
| | | const char *header_name, const char *header_value); | |
| | | const char * linphone_chat_message_get_custom_header(LinphoneChatMessage* m | |
| | | essage, const char *header_name); | |
| | | | |
| /** | | /** | |
| * @} | | * @} | |
| */ | | */ | |
| | | | |
| /** | | /** | |
| * @addtogroup initializing | | * @addtogroup initializing | |
| * @{ | | * @{ | |
| **/ | | **/ | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 584 | | skipping to change at line 782 | |
| * @param url of the subscriber | | * @param url of the subscriber | |
| * Callback prototype | | * Callback prototype | |
| * */ | | * */ | |
| typedef void (*NewSubscribtionRequestCb)(struct _LinphoneCore *lc, Linphone
Friend *lf, const char *url); | | typedef void (*NewSubscribtionRequestCb)(struct _LinphoneCore *lc, Linphone
Friend *lf, const char *url); | |
| /** Callback prototype */ | | /** Callback prototype */ | |
| typedef void (*AuthInfoRequested)(struct _LinphoneCore *lc, const char *rea
lm, const char *username); | | typedef void (*AuthInfoRequested)(struct _LinphoneCore *lc, const char *rea
lm, const char *username); | |
| /** Callback prototype */ | | /** Callback prototype */ | |
| typedef void (*CallLogUpdated)(struct _LinphoneCore *lc, struct _LinphoneCa
llLog *newcl); | | typedef void (*CallLogUpdated)(struct _LinphoneCore *lc, struct _LinphoneCa
llLog *newcl); | |
| /** | | /** | |
| * Callback prototype | | * Callback prototype | |
|
| | | * @deprecated use #MessageReceived instead. | |
| * | | * | |
| * @param lc #LinphoneCore object | | * @param lc #LinphoneCore object | |
| * @param room #LinphoneChatRoom involved in this conversation. Can be be c
reated by the framework in case \link #LinphoneAddress the from \endlink is
not present in any chat room. | | * @param room #LinphoneChatRoom involved in this conversation. Can be be c
reated by the framework in case \link #LinphoneAddress the from \endlink is
not present in any chat room. | |
| * @param from #LinphoneAddress from | | * @param from #LinphoneAddress from | |
| * @param message incoming message | | * @param message incoming message | |
| * */ | | * */ | |
| typedef void (*TextMessageReceived)(LinphoneCore *lc, LinphoneChatRoom *roo
m, const LinphoneAddress *from, const char *message); | | typedef void (*TextMessageReceived)(LinphoneCore *lc, LinphoneChatRoom *roo
m, const LinphoneAddress *from, const char *message); | |
|
| | | /** | |
| | | * Chat message callback prototype | |
| | | * | |
| | | * @param lc #LinphoneCore object | |
| | | * @param room #LinphoneChatRoom involved in this conversation. Can be be c | |
| | | reated by the framework in case \link #LinphoneAddress the from \endlink is | |
| | | not present in any chat room. | |
| | | * @param LinphoneChatMessage incoming message | |
| | | * */ | |
| | | typedef void (*MessageReceived)(LinphoneCore *lc, LinphoneChatRoom *room, L | |
| | | inphoneChatMessage *message); | |
| | | | |
| /** Callback prototype */ | | /** Callback prototype */ | |
| typedef void (*DtmfReceived)(struct _LinphoneCore* lc, LinphoneCall *call,
int dtmf); | | typedef void (*DtmfReceived)(struct _LinphoneCore* lc, LinphoneCall *call,
int dtmf); | |
| /** Callback prototype */ | | /** Callback prototype */ | |
| typedef void (*ReferReceived)(struct _LinphoneCore *lc, const char *refer_t
o); | | typedef void (*ReferReceived)(struct _LinphoneCore *lc, const char *refer_t
o); | |
| /** Callback prototype */ | | /** Callback prototype */ | |
| typedef void (*BuddyInfoUpdated)(struct _LinphoneCore *lc, LinphoneFriend *
lf); | | typedef void (*BuddyInfoUpdated)(struct _LinphoneCore *lc, LinphoneFriend *
lf); | |
|
| | | /** Callback prototype for in progress transfers. The new_call_state is the | |
| | | state of the call resulting of the transfer, at the other party. */ | |
| | | typedef void (*LinphoneTransferStateChanged)(struct _LinphoneCore *lc, Linp | |
| | | honeCall *transfered, LinphoneCallState new_call_state); | |
| | | /** Callback prototype for receiving quality statistics for calls*/ | |
| | | typedef void (*CallStatsUpdated)(struct _LinphoneCore *lc, LinphoneCall *ca | |
| | | ll, const LinphoneCallStats *stats); | |
| | | | |
| /** | | /** | |
| * This structure holds all callbacks that the application should implement
. | | * This structure holds all callbacks that the application should implement
. | |
| * None is mandatory. | | * None is mandatory. | |
| **/ | | **/ | |
| typedef struct _LinphoneVTable{ | | typedef struct _LinphoneVTable{ | |
| LinphoneGlobalStateCb global_state_changed; /**<Notifies globlal sta
te changes*/ | | LinphoneGlobalStateCb global_state_changed; /**<Notifies globlal sta
te changes*/ | |
| LinphoneRegistrationStateCb registration_state_changed;/**<Notifies
registration state changes*/ | | LinphoneRegistrationStateCb registration_state_changed;/**<Notifies
registration state changes*/ | |
| LinphoneCallStateCb call_state_changed;/**<Notifies call state chang
es*/ | | LinphoneCallStateCb call_state_changed;/**<Notifies call state chang
es*/ | |
| NotifyPresenceReceivedCb notify_presence_recv; /**< Notify received
presence events*/ | | NotifyPresenceReceivedCb notify_presence_recv; /**< Notify received
presence events*/ | |
| NewSubscribtionRequestCb new_subscription_request; /**< Notify about
pending subscription request */ | | NewSubscribtionRequestCb new_subscription_request; /**< Notify about
pending subscription request */ | |
| AuthInfoRequested auth_info_requested; /**< Ask the application some
authentication information */ | | AuthInfoRequested auth_info_requested; /**< Ask the application some
authentication information */ | |
| CallLogUpdated call_log_updated; /**< Notifies that call log list ha
s been updated */ | | CallLogUpdated call_log_updated; /**< Notifies that call log list ha
s been updated */ | |
|
| TextMessageReceived text_received; /**< A text message has been rece | | TextMessageReceived text_received; /** @deprecated, use #message_rec | |
| ived */ | | eived instead <br> A text message has been received */ | |
| | | MessageReceived message_received; /** a message is received, can be | |
| | | text or external body*/ | |
| DtmfReceived dtmf_received; /**< A dtmf has been received received *
/ | | DtmfReceived dtmf_received; /**< A dtmf has been received received *
/ | |
| ReferReceived refer_received; /**< An out of call refer was received
*/ | | ReferReceived refer_received; /**< An out of call refer was received
*/ | |
|
| | | CallEncryptionChangedCb call_encryption_changed; /**<Notifies on cha | |
| | | nge in the encryption of call streams */ | |
| | | LinphoneTransferStateChanged transfer_state_changed; /**<Notifies wh | |
| | | en a transfer is in progress */ | |
| BuddyInfoUpdated buddy_info_updated; /**< a LinphoneFriend's BuddyIn
fo has changed*/ | | BuddyInfoUpdated buddy_info_updated; /**< a LinphoneFriend's BuddyIn
fo has changed*/ | |
| NotifyReceivedCb notify_recv; /**< Other notifications*/ | | NotifyReceivedCb notify_recv; /**< Other notifications*/ | |
|
| DisplayStatusCb display_status; /**< Callback that notifies various | | CallStatsUpdated call_stats_updated; /**<Notifies on refreshing of c | |
| events with human readable text.*/ | | all's statistics. */ | |
| DisplayMessageCb display_message;/**< Callback to display a message | | DisplayStatusCb display_status; /**< DEPRECATED Callback that notifi | |
| to the user */ | | es various events with human readable text.*/ | |
| DisplayMessageCb display_warning;/** Callback to display a warning t | | DisplayMessageCb display_message;/**< DEPRECATED Callback to display | |
| o the user */ | | a message to the user */ | |
| DisplayUrlCb display_url; | | DisplayMessageCb display_warning;/**< DEPRECATED Callback to display | |
| ShowInterfaceCb show; /**< Notifies the application that it should s | | a warning to the user */ | |
| how up*/ | | DisplayUrlCb display_url; /**< DEPRECATED */ | |
| CallEncryptionChangedCb call_encryption_changed; /**<Notifies on cha | | ShowInterfaceCb show; /**< DEPRECATED Notifies the application that | |
| nge in the encryption of call streams */ | | it should show up*/ | |
| } LinphoneCoreVTable; | | } LinphoneCoreVTable; | |
| | | | |
| /** | | /** | |
| * @} | | * @} | |
| **/ | | **/ | |
| | | | |
| typedef struct _LCCallbackObj | | typedef struct _LCCallbackObj | |
| { | | { | |
| LinphoneCoreCbFunc _func; | | LinphoneCoreCbFunc _func; | |
| void * _user_data; | | void * _user_data; | |
| }LCCallbackObj; | | }LCCallbackObj; | |
| | | | |
| typedef enum _LinphoneFirewallPolicy{ | | typedef enum _LinphoneFirewallPolicy{ | |
| LinphonePolicyNoFirewall, | | LinphonePolicyNoFirewall, | |
| LinphonePolicyUseNatAddress, | | LinphonePolicyUseNatAddress, | |
|
| LinphonePolicyUseStun | | LinphonePolicyUseStun, | |
| | | LinphonePolicyUseIce, | |
| | | LinphonePolicyUseUpnp, | |
| } LinphoneFirewallPolicy; | | } LinphoneFirewallPolicy; | |
| | | | |
| typedef enum _LinphoneWaitingState{ | | typedef enum _LinphoneWaitingState{ | |
| LinphoneWaitingStart, | | LinphoneWaitingStart, | |
| LinphoneWaitingProgress, | | LinphoneWaitingProgress, | |
| LinphoneWaitingFinished | | LinphoneWaitingFinished | |
| } LinphoneWaitingState; | | } LinphoneWaitingState; | |
| typedef void * (*LinphoneWaitingCallback)(struct _LinphoneCore *lc, void *c
ontext, LinphoneWaitingState ws, const char *purpose, float progress); | | typedef void * (*LinphoneWaitingCallback)(struct _LinphoneCore *lc, void *c
ontext, LinphoneWaitingState ws, const char *purpose, float progress); | |
| | | | |
| /* THE main API */ | | /* THE main API */ | |
| | | | |
|
| | | /** | |
| | | * Define a log handler. | |
| | | * | |
| | | * @ingroup misc | |
| | | * | |
| | | * @param logfunc The function pointer of the log handler. | |
| | | */ | |
| | | void linphone_core_set_log_handler(OrtpLogFunc logfunc); | |
| | | /** | |
| | | * Define a log file. | |
| | | * | |
| | | * @ingroup misc | |
| | | * | |
| | | * If the file pointer passed as an argument is NULL, stdout is used instea | |
| | | d. | |
| | | * | |
| | | * @param file A pointer to the FILE structure of the file to write to. | |
| | | */ | |
| | | void linphone_core_set_log_file(FILE *file); | |
| | | /** | |
| | | * Define the log level. | |
| | | * | |
| | | * @ingroup misc | |
| | | * | |
| | | * The loglevel parameter is a bitmask parameter. Therefore to enable only | |
| | | warning and error | |
| | | * messages, use ORTP_WARNING | ORTP_ERROR. To disable logs, simply set log | |
| | | level to 0. | |
| | | * | |
| | | * @param loglevel A bitmask of the log levels to set. | |
| | | */ | |
| | | void linphone_core_set_log_level(OrtpLogLevel loglevel); | |
| void linphone_core_enable_logs(FILE *file); | | void linphone_core_enable_logs(FILE *file); | |
| void linphone_core_enable_logs_with_cb(OrtpLogFunc logfunc); | | void linphone_core_enable_logs_with_cb(OrtpLogFunc logfunc); | |
| void linphone_core_disable_logs(void); | | void linphone_core_disable_logs(void); | |
|
| /*sets the user-agent string in sip messages, must be set before linphone_c | | | |
| ore_new() or linphone_core_init() */ | | | |
| void linphone_core_set_user_agent(const char *ua_name, const char *version) | | | |
| ; | | | |
| const char *linphone_core_get_version(void); | | const char *linphone_core_get_version(void); | |
|
| | | const char *linphone_core_get_user_agent_name(void); | |
| | | const char *linphone_core_get_user_agent_version(void); | |
| | | | |
| LinphoneCore *linphone_core_new(const LinphoneCoreVTable *vtable, | | LinphoneCore *linphone_core_new(const LinphoneCoreVTable *vtable, | |
| const char *config_path, con
st char *factory_config, void* userdata); | | const char *config_path, con
st char *factory_config, void* userdata); | |
| | | | |
|
| | | /** | |
| | | * Instantiates a LinphoneCore object with a given LpConfig. | |
| | | * @ingroup initializing | |
| | | * | |
| | | * The LinphoneCore object is the primary handle for doing all phone action | |
| | | s. | |
| | | * It should be unique within your application. | |
| | | * @param vtable a LinphoneCoreVTable structure holding your application ca | |
| | | llbacks | |
| | | * @param config a pointer to an LpConfig object holding the configuration | |
| | | of the LinphoneCore to be instantiated. | |
| | | * @param userdata an opaque user pointer that can be retrieved at any time | |
| | | (for example in | |
| | | * callbacks) using linphone_core_get_user_data(). | |
| | | * @see linphone_core_new | |
| | | **/ | |
| | | LinphoneCore *linphone_core_new_with_config(const LinphoneCoreVTable *vtabl | |
| | | e, struct _LpConfig *config, void *userdata); | |
| | | | |
| /* function to be periodically called in a main loop */ | | /* function to be periodically called in a main loop */ | |
|
| | | /* For ICE to work properly it should be called every 20ms */ | |
| void linphone_core_iterate(LinphoneCore *lc); | | void linphone_core_iterate(LinphoneCore *lc); | |
|
| | | #if 0 /*not implemented yet*/ | |
| | | /** | |
| | | * @ingroup initializing | |
| | | * Provide Linphone Core with an unique identifier. This be later used to i | |
| | | dentified contact address coming from this device. | |
| | | * Value is not saved. | |
| | | * @param lc object | |
| | | * @param string identifying the device, can be EMEI or UDID | |
| | | * | |
| | | */ | |
| | | void linphone_core_set_device_identifier(LinphoneCore *lc,const char* devic | |
| | | e_id); | |
| | | /** | |
| | | * @ingroup initializing | |
| | | * get Linphone unique identifier | |
| | | * | |
| | | */ | |
| | | const char* linphone_core_get_device_identifier(const LinphoneCore *lc); | |
| | | | |
| | | #endif | |
| | | | |
| | | /*sets the user-agent string in sip messages, ideally called just after lin | |
| | | phone_core_new() or linphone_core_init() */ | |
| | | void linphone_core_set_user_agent(LinphoneCore *lc, const char *ua_name, co | |
| | | nst char *version); | |
| | | | |
| LinphoneAddress * linphone_core_interpret_url(LinphoneCore *lc, const char
*url); | | LinphoneAddress * linphone_core_interpret_url(LinphoneCore *lc, const char
*url); | |
| | | | |
| LinphoneCall * linphone_core_invite(LinphoneCore *lc, const char *url); | | LinphoneCall * linphone_core_invite(LinphoneCore *lc, const char *url); | |
| | | | |
| LinphoneCall * linphone_core_invite_address(LinphoneCore *lc, const Linphon
eAddress *addr); | | LinphoneCall * linphone_core_invite_address(LinphoneCore *lc, const Linphon
eAddress *addr); | |
| | | | |
| LinphoneCall * linphone_core_invite_with_params(LinphoneCore *lc, const cha
r *url, const LinphoneCallParams *params); | | LinphoneCall * linphone_core_invite_with_params(LinphoneCore *lc, const cha
r *url, const LinphoneCallParams *params); | |
| | | | |
| LinphoneCall * linphone_core_invite_address_with_params(LinphoneCore *lc, c
onst LinphoneAddress *addr, const LinphoneCallParams *params); | | LinphoneCall * linphone_core_invite_address_with_params(LinphoneCore *lc, c
onst LinphoneAddress *addr, const LinphoneCallParams *params); | |
| | | | |
| skipping to change at line 683 | | skipping to change at line 965 | |
| int linphone_core_transfer_call_to_another(LinphoneCore *lc, LinphoneCall *
call, LinphoneCall *dest); | | int linphone_core_transfer_call_to_another(LinphoneCore *lc, LinphoneCall *
call, LinphoneCall *dest); | |
| | | | |
| bool_t linphone_core_inc_invite_pending(LinphoneCore*lc); | | bool_t linphone_core_inc_invite_pending(LinphoneCore*lc); | |
| | | | |
| bool_t linphone_core_in_call(const LinphoneCore *lc); | | bool_t linphone_core_in_call(const LinphoneCore *lc); | |
| | | | |
| LinphoneCall *linphone_core_get_current_call(const LinphoneCore *lc); | | LinphoneCall *linphone_core_get_current_call(const LinphoneCore *lc); | |
| | | | |
| int linphone_core_accept_call(LinphoneCore *lc, LinphoneCall *call); | | int linphone_core_accept_call(LinphoneCore *lc, LinphoneCall *call); | |
| | | | |
|
| | | int linphone_core_accept_call_with_params(LinphoneCore *lc, LinphoneCall *c | |
| | | all, const LinphoneCallParams *params); | |
| | | | |
| int linphone_core_terminate_call(LinphoneCore *lc, LinphoneCall *call); | | int linphone_core_terminate_call(LinphoneCore *lc, LinphoneCall *call); | |
| | | | |
| int linphone_core_redirect_call(LinphoneCore *lc, LinphoneCall *call, const
char *redirect_uri); | | int linphone_core_redirect_call(LinphoneCore *lc, LinphoneCall *call, const
char *redirect_uri); | |
| | | | |
|
| | | int linphone_core_decline_call(LinphoneCore *lc, LinphoneCall * call, Linph | |
| | | oneReason reason); | |
| | | | |
| int linphone_core_terminate_all_calls(LinphoneCore *lc); | | int linphone_core_terminate_all_calls(LinphoneCore *lc); | |
| | | | |
| int linphone_core_pause_call(LinphoneCore *lc, LinphoneCall *call); | | int linphone_core_pause_call(LinphoneCore *lc, LinphoneCall *call); | |
| | | | |
| int linphone_core_pause_all_calls(LinphoneCore *lc); | | int linphone_core_pause_all_calls(LinphoneCore *lc); | |
| | | | |
| int linphone_core_resume_call(LinphoneCore *lc, LinphoneCall *call); | | int linphone_core_resume_call(LinphoneCore *lc, LinphoneCall *call); | |
| | | | |
| int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, const L
inphoneCallParams *params); | | int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, const L
inphoneCallParams *params); | |
| | | | |
|
| | | int linphone_core_defer_call_update(LinphoneCore *lc, LinphoneCall *call); | |
| | | | |
| | | int linphone_core_accept_call_update(LinphoneCore *lc, LinphoneCall *call, | |
| | | const LinphoneCallParams *params); | |
| | | /** | |
| | | * @ingroup media_parameters | |
| | | * Get default call parameters reflecting current linphone core configurati | |
| | | on | |
| | | * @param LinphoneCore object | |
| | | * @return LinphoneCallParams | |
| | | */ | |
| LinphoneCallParams *linphone_core_create_default_call_parameters(LinphoneCo
re *lc); | | LinphoneCallParams *linphone_core_create_default_call_parameters(LinphoneCo
re *lc); | |
| | | | |
| LinphoneCall *linphone_core_get_call_by_remote_address(LinphoneCore *lc, co
nst char *remote_address); | | LinphoneCall *linphone_core_get_call_by_remote_address(LinphoneCore *lc, co
nst char *remote_address); | |
| | | | |
| void linphone_core_send_dtmf(LinphoneCore *lc,char dtmf); | | void linphone_core_send_dtmf(LinphoneCore *lc,char dtmf); | |
| | | | |
| int linphone_core_set_primary_contact(LinphoneCore *lc, const char *contact
); | | int linphone_core_set_primary_contact(LinphoneCore *lc, const char *contact
); | |
| | | | |
| const char *linphone_core_get_primary_contact(LinphoneCore *lc); | | const char *linphone_core_get_primary_contact(LinphoneCore *lc); | |
| | | | |
| | | | |
| skipping to change at line 726 | | skipping to change at line 1021 | |
| const char * linphone_core_get_identity(LinphoneCore *lc); | | const char * linphone_core_get_identity(LinphoneCore *lc); | |
| /*0= no bandwidth limit*/ | | /*0= no bandwidth limit*/ | |
| void linphone_core_set_download_bandwidth(LinphoneCore *lc, int bw); | | void linphone_core_set_download_bandwidth(LinphoneCore *lc, int bw); | |
| void linphone_core_set_upload_bandwidth(LinphoneCore *lc, int bw); | | void linphone_core_set_upload_bandwidth(LinphoneCore *lc, int bw); | |
| | | | |
| int linphone_core_get_download_bandwidth(const LinphoneCore *lc); | | int linphone_core_get_download_bandwidth(const LinphoneCore *lc); | |
| int linphone_core_get_upload_bandwidth(const LinphoneCore *lc); | | int linphone_core_get_upload_bandwidth(const LinphoneCore *lc); | |
| | | | |
| void linphone_core_enable_adaptive_rate_control(LinphoneCore *lc, bool_t en
abled); | | void linphone_core_enable_adaptive_rate_control(LinphoneCore *lc, bool_t en
abled); | |
| bool_t linphone_core_adaptive_rate_control_enabled(const LinphoneCore *lc); | | bool_t linphone_core_adaptive_rate_control_enabled(const LinphoneCore *lc); | |
|
| /** | | | |
| * set audio packetization time linphone expect to receive from peer | | | |
| * @ingroup media_parameters | | | |
| * | | | |
| */ | | | |
| void linphone_core_set_download_ptime(LinphoneCore *lc, int ptime); | | void linphone_core_set_download_ptime(LinphoneCore *lc, int ptime); | |
|
| /** | | | |
| * get audio packetization time linphone expect to receive from peer, 0 mea | | | |
| ns unspecified | | | |
| * @ingroup media_parameters | | | |
| */ | | | |
| int linphone_core_get_download_ptime(LinphoneCore *lc); | | int linphone_core_get_download_ptime(LinphoneCore *lc); | |
| | | | |
| void linphone_core_set_upload_ptime(LinphoneCore *lc, int ptime); | | void linphone_core_set_upload_ptime(LinphoneCore *lc, int ptime); | |
| | | | |
| int linphone_core_get_upload_ptime(LinphoneCore *lc); | | int linphone_core_get_upload_ptime(LinphoneCore *lc); | |
| | | | |
| /* returns a MSList of PayloadType */ | | /* returns a MSList of PayloadType */ | |
| const MSList *linphone_core_get_audio_codecs(const LinphoneCore *lc); | | const MSList *linphone_core_get_audio_codecs(const LinphoneCore *lc); | |
| | | | |
| int linphone_core_set_audio_codecs(LinphoneCore *lc, MSList *codecs); | | int linphone_core_set_audio_codecs(LinphoneCore *lc, MSList *codecs); | |
| /* returns a MSList of PayloadType */ | | /* returns a MSList of PayloadType */ | |
| const MSList *linphone_core_get_video_codecs(const LinphoneCore *lc); | | const MSList *linphone_core_get_video_codecs(const LinphoneCore *lc); | |
| | | | |
| int linphone_core_set_video_codecs(LinphoneCore *lc, MSList *codecs); | | int linphone_core_set_video_codecs(LinphoneCore *lc, MSList *codecs); | |
| | | | |
|
| bool_t linphone_core_payload_type_enabled(LinphoneCore *lc, PayloadType *pt | | bool_t linphone_core_payload_type_enabled(LinphoneCore *lc, const PayloadTy | |
| ); | | pe *pt); | |
| | | /** | |
| | | * Enable payload type | |
| | | * @param linphone core | |
| | | * @param pt payload type to enable, can be retrieve from #linphone_core_fi | |
| | | nd_payload_type | |
| | | * @param TRUE if enabled | |
| | | * @return 0 if succed | |
| | | * | |
| | | */ | |
| int linphone_core_enable_payload_type(LinphoneCore *lc, PayloadType *pt, bo
ol_t enable); | | int linphone_core_enable_payload_type(LinphoneCore *lc, PayloadType *pt, bo
ol_t enable); | |
| | | | |
|
| PayloadType* linphone_core_find_payload_type(LinphoneCore* lc, const char* | | /** | |
| type, int rate) ; | | * Wildcard value used by #linphone_core_find_payload_type to ignore rate i | |
| | | n search algorithm | |
| | | * @ingroup media_parameters | |
| | | */ | |
| | | #define LINPHONE_FIND_PAYLOAD_IGNORE_RATE -1 | |
| | | /** | |
| | | * Wildcard value used by #linphone_core_find_payload_type to ignore channe | |
| | | l in search algorithm | |
| | | * @ingroup media_parameters | |
| | | */ | |
| | | #define LINPHONE_FIND_PAYLOAD_IGNORE_CHANNELS -1 | |
| | | /** | |
| | | * Get payload type from mime type and clock rate | |
| | | * @ingroup media_parameters | |
| | | * This function searches in audio and video codecs for the given payload t | |
| | | ype name and clockrate. | |
| | | * @param lc #LinphoneCore object | |
| | | * @param type payload mime type (I.E SPEEX, PCMU, VP8) | |
| | | * @param rate can be #LINPHONE_FIND_PAYLOAD_IGNORE_RATE | |
| | | * @param channels number of channels, can be #LINPHONE_FIND_PAYLOAD_IGNOR | |
| | | E_CHANNELS | |
| | | * @return Returns NULL if not found. | |
| | | */ | |
| | | PayloadType* linphone_core_find_payload_type(LinphoneCore* lc, const char* | |
| | | type, int rate, int channels) ; | |
| | | | |
| | | int linphone_core_get_payload_type_number(LinphoneCore *lc, const PayloadTy | |
| | | pe *pt); | |
| | | | |
| const char *linphone_core_get_payload_type_description(LinphoneCore *lc, Pa
yloadType *pt); | | const char *linphone_core_get_payload_type_description(LinphoneCore *lc, Pa
yloadType *pt); | |
| | | | |
| bool_t linphone_core_check_payload_type_usability(LinphoneCore *lc, Payload
Type *pt); | | bool_t linphone_core_check_payload_type_usability(LinphoneCore *lc, Payload
Type *pt); | |
| | | | |
|
| | | /** | |
| | | * @ingroup proxy | |
| | | *Create a proxy config with default value from Linphone core. | |
| | | *@param lc #LinphoneCore object | |
| | | *@return #LinphoneProxyConfig with defualt value set | |
| | | */ | |
| | | LinphoneProxyConfig * linphone_core_create_proxy_config(LinphoneCore *lc); | |
| | | | |
| int linphone_core_add_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *c
onfig); | | int linphone_core_add_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *c
onfig); | |
| | | | |
| void linphone_core_clear_proxy_config(LinphoneCore *lc); | | void linphone_core_clear_proxy_config(LinphoneCore *lc); | |
| | | | |
| void linphone_core_remove_proxy_config(LinphoneCore *lc, LinphoneProxyConfi
g *config); | | void linphone_core_remove_proxy_config(LinphoneCore *lc, LinphoneProxyConfi
g *config); | |
| | | | |
| const MSList *linphone_core_get_proxy_config_list(const LinphoneCore *lc); | | const MSList *linphone_core_get_proxy_config_list(const LinphoneCore *lc); | |
| | | | |
| void linphone_core_set_default_proxy(LinphoneCore *lc, LinphoneProxyConfig
*config); | | void linphone_core_set_default_proxy(LinphoneCore *lc, LinphoneProxyConfig
*config); | |
| | | | |
| | | | |
| skipping to change at line 787 | | skipping to change at line 1111 | |
| void linphone_core_remove_auth_info(LinphoneCore *lc, const LinphoneAuthInf
o *info); | | void linphone_core_remove_auth_info(LinphoneCore *lc, const LinphoneAuthInf
o *info); | |
| | | | |
| const MSList *linphone_core_get_auth_info_list(const LinphoneCore *lc); | | const MSList *linphone_core_get_auth_info_list(const LinphoneCore *lc); | |
| | | | |
| const LinphoneAuthInfo *linphone_core_find_auth_info(LinphoneCore *lc, cons
t char *realm, const char *username); | | const LinphoneAuthInfo *linphone_core_find_auth_info(LinphoneCore *lc, cons
t char *realm, const char *username); | |
| | | | |
| void linphone_core_abort_authentication(LinphoneCore *lc, LinphoneAuthInfo
*info); | | void linphone_core_abort_authentication(LinphoneCore *lc, LinphoneAuthInfo
*info); | |
| | | | |
| void linphone_core_clear_all_auth_info(LinphoneCore *lc); | | void linphone_core_clear_all_auth_info(LinphoneCore *lc); | |
| | | | |
|
| | | void linphone_core_enable_audio_adaptive_jittcomp(LinphoneCore *lc, bool_t | |
| | | enable); | |
| | | | |
| | | bool_t linphone_core_audio_adaptive_jittcomp_enabled(LinphoneCore *lc); | |
| | | | |
| int linphone_core_get_audio_jittcomp(LinphoneCore *lc); | | int linphone_core_get_audio_jittcomp(LinphoneCore *lc); | |
| | | | |
| void linphone_core_set_audio_jittcomp(LinphoneCore *lc, int value); | | void linphone_core_set_audio_jittcomp(LinphoneCore *lc, int value); | |
| | | | |
|
| | | void linphone_core_enable_video_adaptive_jittcomp(LinphoneCore *lc, bool_t | |
| | | enable); | |
| | | | |
| | | bool_t linphone_core_video_adaptive_jittcomp_enabled(LinphoneCore *lc); | |
| | | | |
| | | int linphone_core_get_video_jittcomp(LinphoneCore *lc); | |
| | | | |
| | | void linphone_core_set_video_jittcomp(LinphoneCore *lc, int value); | |
| | | | |
| int linphone_core_get_audio_port(const LinphoneCore *lc); | | int linphone_core_get_audio_port(const LinphoneCore *lc); | |
| | | | |
|
| | | void linphone_core_get_audio_port_range(const LinphoneCore *lc, int *min_po | |
| | | rt, int *max_port); | |
| | | | |
| int linphone_core_get_video_port(const LinphoneCore *lc); | | int linphone_core_get_video_port(const LinphoneCore *lc); | |
| | | | |
|
| | | void linphone_core_get_video_port_range(const LinphoneCore *lc, int *min_po | |
| | | rt, int *max_port); | |
| | | | |
| int linphone_core_get_nortp_timeout(const LinphoneCore *lc); | | int linphone_core_get_nortp_timeout(const LinphoneCore *lc); | |
| | | | |
| void linphone_core_set_audio_port(LinphoneCore *lc, int port); | | void linphone_core_set_audio_port(LinphoneCore *lc, int port); | |
| | | | |
|
| | | void linphone_core_set_audio_port_range(LinphoneCore *lc, int min_port, int | |
| | | max_port); | |
| | | | |
| void linphone_core_set_video_port(LinphoneCore *lc, int port); | | void linphone_core_set_video_port(LinphoneCore *lc, int port); | |
| | | | |
|
| | | void linphone_core_set_video_port_range(LinphoneCore *lc, int min_port, int | |
| | | max_port); | |
| | | | |
| void linphone_core_set_nortp_timeout(LinphoneCore *lc, int port); | | void linphone_core_set_nortp_timeout(LinphoneCore *lc, int port); | |
| | | | |
| void linphone_core_set_use_info_for_dtmf(LinphoneCore *lc, bool_t use_info)
; | | void linphone_core_set_use_info_for_dtmf(LinphoneCore *lc, bool_t use_info)
; | |
| | | | |
| bool_t linphone_core_get_use_info_for_dtmf(LinphoneCore *lc); | | bool_t linphone_core_get_use_info_for_dtmf(LinphoneCore *lc); | |
| | | | |
| void linphone_core_set_use_rfc2833_for_dtmf(LinphoneCore *lc,bool_t use_rfc
2833); | | void linphone_core_set_use_rfc2833_for_dtmf(LinphoneCore *lc,bool_t use_rfc
2833); | |
| | | | |
| bool_t linphone_core_get_use_rfc2833_for_dtmf(LinphoneCore *lc); | | bool_t linphone_core_get_use_rfc2833_for_dtmf(LinphoneCore *lc); | |
| | | | |
| | | | |
| skipping to change at line 830 | | skipping to change at line 1174 | |
| * Give access to the UDP sip socket. Can be useful to configure this socke
t as persistent I.E kCFStreamNetworkServiceType set to kCFStreamNetworkServ
iceTypeVoIP) | | * Give access to the UDP sip socket. Can be useful to configure this socke
t as persistent I.E kCFStreamNetworkServiceType set to kCFStreamNetworkServ
iceTypeVoIP) | |
| * @param lc #LinphoneCore | | * @param lc #LinphoneCore | |
| * @return socket file descriptor | | * @return socket file descriptor | |
| */ | | */ | |
| ortp_socket_t linphone_core_get_sip_socket(LinphoneCore *lc); | | ortp_socket_t linphone_core_get_sip_socket(LinphoneCore *lc); | |
| | | | |
| void linphone_core_set_inc_timeout(LinphoneCore *lc, int seconds); | | void linphone_core_set_inc_timeout(LinphoneCore *lc, int seconds); | |
| | | | |
| int linphone_core_get_inc_timeout(LinphoneCore *lc); | | int linphone_core_get_inc_timeout(LinphoneCore *lc); | |
| | | | |
|
| | | void linphone_core_set_in_call_timeout(LinphoneCore *lc, int seconds); | |
| | | | |
| | | int linphone_core_get_in_call_timeout(LinphoneCore *lc); | |
| | | | |
| | | void linphone_core_set_delayed_timeout(LinphoneCore *lc, int seconds); | |
| | | | |
| | | int linphone_core_get_delayed_timeout(LinphoneCore *lc); | |
| | | | |
| void linphone_core_set_stun_server(LinphoneCore *lc, const char *server); | | void linphone_core_set_stun_server(LinphoneCore *lc, const char *server); | |
| | | | |
| const char * linphone_core_get_stun_server(const LinphoneCore *lc); | | const char * linphone_core_get_stun_server(const LinphoneCore *lc); | |
| | | | |
|
| | | /** | |
| | | * @ingroup network_parameters | |
| | | * Return the availability of uPnP. | |
| | | * | |
| | | * @return true if uPnP is available otherwise return false. | |
| | | */ | |
| | | bool_t linphone_core_upnp_available(); | |
| | | | |
| | | /** | |
| | | * @ingroup network_parameters | |
| | | * Return the internal state of uPnP. | |
| | | * | |
| | | * @param lc #LinphoneCore | |
| | | * @return an LinphoneUpnpState. | |
| | | */ | |
| | | LinphoneUpnpState linphone_core_get_upnp_state(const LinphoneCore *lc); | |
| | | | |
| | | /** | |
| | | * @ingroup network_parameters | |
| | | * Return the external ip address of router. | |
| | | * In some cases the uPnP can have an external ip address but not a usable | |
| | | uPnP | |
| | | * (state different of Ok). | |
| | | * | |
| | | * @param lc #LinphoneCore | |
| | | * @return a null terminated string containing the external ip address. If | |
| | | the | |
| | | * the external ip address is not available return null. | |
| | | */ | |
| | | const char * linphone_core_get_upnp_external_ipaddress(const LinphoneCore * | |
| | | lc); | |
| | | | |
| void linphone_core_set_nat_address(LinphoneCore *lc, const char *addr); | | void linphone_core_set_nat_address(LinphoneCore *lc, const char *addr); | |
| | | | |
| const char *linphone_core_get_nat_address(const LinphoneCore *lc); | | const char *linphone_core_get_nat_address(const LinphoneCore *lc); | |
| | | | |
| void linphone_core_set_firewall_policy(LinphoneCore *lc, LinphoneFirewallPo
licy pol); | | void linphone_core_set_firewall_policy(LinphoneCore *lc, LinphoneFirewallPo
licy pol); | |
| | | | |
| LinphoneFirewallPolicy linphone_core_get_firewall_policy(const LinphoneCore
*lc); | | LinphoneFirewallPolicy linphone_core_get_firewall_policy(const LinphoneCore
*lc); | |
| | | | |
| const char * linphone_core_get_relay_addr(const LinphoneCore *lc); | | const char * linphone_core_get_relay_addr(const LinphoneCore *lc); | |
| | | | |
| int linphone_core_set_relay_addr(LinphoneCore *lc, const char *addr); | | int linphone_core_set_relay_addr(LinphoneCore *lc, const char *addr); | |
| | | | |
| /* sound functions */ | | /* sound functions */ | |
| /* returns a null terminated static array of string describing the sound de
vices */ | | /* returns a null terminated static array of string describing the sound de
vices */ | |
| const char** linphone_core_get_sound_devices(LinphoneCore *lc); | | const char** linphone_core_get_sound_devices(LinphoneCore *lc); | |
|
| | | void linphone_core_reload_sound_devices(LinphoneCore *lc); | |
| bool_t linphone_core_sound_device_can_capture(LinphoneCore *lc, const char
*device); | | bool_t linphone_core_sound_device_can_capture(LinphoneCore *lc, const char
*device); | |
| bool_t linphone_core_sound_device_can_playback(LinphoneCore *lc, const char
*device); | | bool_t linphone_core_sound_device_can_playback(LinphoneCore *lc, const char
*device); | |
| int linphone_core_get_ring_level(LinphoneCore *lc); | | int linphone_core_get_ring_level(LinphoneCore *lc); | |
| int linphone_core_get_play_level(LinphoneCore *lc); | | int linphone_core_get_play_level(LinphoneCore *lc); | |
| int linphone_core_get_rec_level(LinphoneCore *lc); | | int linphone_core_get_rec_level(LinphoneCore *lc); | |
| void linphone_core_set_ring_level(LinphoneCore *lc, int level); | | void linphone_core_set_ring_level(LinphoneCore *lc, int level); | |
| void linphone_core_set_play_level(LinphoneCore *lc, int level); | | void linphone_core_set_play_level(LinphoneCore *lc, int level); | |
| | | | |
|
| | | void linphone_core_set_mic_gain_db(LinphoneCore *lc, float level); | |
| | | float linphone_core_get_mic_gain_db(LinphoneCore *lc); | |
| void linphone_core_set_playback_gain_db(LinphoneCore *lc, float level); | | void linphone_core_set_playback_gain_db(LinphoneCore *lc, float level); | |
|
| | | | |
| float linphone_core_get_playback_gain_db(LinphoneCore *lc); | | float linphone_core_get_playback_gain_db(LinphoneCore *lc); | |
|
| | | | |
| void linphone_core_set_rec_level(LinphoneCore *lc, int level); | | void linphone_core_set_rec_level(LinphoneCore *lc, int level); | |
| const char * linphone_core_get_ringer_device(LinphoneCore *lc); | | const char * linphone_core_get_ringer_device(LinphoneCore *lc); | |
| const char * linphone_core_get_playback_device(LinphoneCore *lc); | | const char * linphone_core_get_playback_device(LinphoneCore *lc); | |
| const char * linphone_core_get_capture_device(LinphoneCore *lc); | | const char * linphone_core_get_capture_device(LinphoneCore *lc); | |
| int linphone_core_set_ringer_device(LinphoneCore *lc, const char * devid); | | int linphone_core_set_ringer_device(LinphoneCore *lc, const char * devid); | |
| int linphone_core_set_playback_device(LinphoneCore *lc, const char * devid)
; | | int linphone_core_set_playback_device(LinphoneCore *lc, const char * devid)
; | |
| int linphone_core_set_capture_device(LinphoneCore *lc, const char * devid); | | int linphone_core_set_capture_device(LinphoneCore *lc, const char * devid); | |
| char linphone_core_get_sound_source(LinphoneCore *lc); | | char linphone_core_get_sound_source(LinphoneCore *lc); | |
| void linphone_core_set_sound_source(LinphoneCore *lc, char source); | | void linphone_core_set_sound_source(LinphoneCore *lc, char source); | |
| void linphone_core_set_ring(LinphoneCore *lc, const char *path); | | void linphone_core_set_ring(LinphoneCore *lc, const char *path); | |
| const char *linphone_core_get_ring(const LinphoneCore *lc); | | const char *linphone_core_get_ring(const LinphoneCore *lc); | |
| void linphone_core_verify_server_certificates(LinphoneCore *lc, bool_t yesn
o); | | void linphone_core_verify_server_certificates(LinphoneCore *lc, bool_t yesn
o); | |
|
| | | void linphone_core_verify_server_cn(LinphoneCore *lc, bool_t yesno); | |
| void linphone_core_set_root_ca(LinphoneCore *lc, const char *path); | | void linphone_core_set_root_ca(LinphoneCore *lc, const char *path); | |
|
| | | const char *linphone_core_get_root_ca(LinphoneCore *lc); | |
| void linphone_core_set_ringback(LinphoneCore *lc, const char *path); | | void linphone_core_set_ringback(LinphoneCore *lc, const char *path); | |
| const char * linphone_core_get_ringback(const LinphoneCore *lc); | | const char * linphone_core_get_ringback(const LinphoneCore *lc); | |
| | | | |
| void linphone_core_set_remote_ringback_tone(LinphoneCore *lc,const char *); | | void linphone_core_set_remote_ringback_tone(LinphoneCore *lc,const char *); | |
| const char *linphone_core_get_remote_ringback_tone(const LinphoneCore *lc); | | const char *linphone_core_get_remote_ringback_tone(const LinphoneCore *lc); | |
| | | | |
| int linphone_core_preview_ring(LinphoneCore *lc, const char *ring,LinphoneC
oreCbFunc func,void * userdata); | | int linphone_core_preview_ring(LinphoneCore *lc, const char *ring,LinphoneC
oreCbFunc func,void * userdata); | |
| void linphone_core_enable_echo_cancellation(LinphoneCore *lc, bool_t val); | | void linphone_core_enable_echo_cancellation(LinphoneCore *lc, bool_t val); | |
| bool_t linphone_core_echo_cancellation_enabled(LinphoneCore *lc); | | bool_t linphone_core_echo_cancellation_enabled(LinphoneCore *lc); | |
| | | | |
| | | | |
| skipping to change at line 897 | | skipping to change at line 1283 | |
| bool_t linphone_core_agc_enabled(const LinphoneCore *lc); | | bool_t linphone_core_agc_enabled(const LinphoneCore *lc); | |
| | | | |
| void linphone_core_mute_mic(LinphoneCore *lc, bool_t muted); | | void linphone_core_mute_mic(LinphoneCore *lc, bool_t muted); | |
| /** | | /** | |
| * return mic state. | | * return mic state. | |
| * | | * | |
| * @ingroup media_parameters | | * @ingroup media_parameters | |
| **/ | | **/ | |
| bool_t linphone_core_is_mic_muted(LinphoneCore *lc); | | bool_t linphone_core_is_mic_muted(LinphoneCore *lc); | |
| | | | |
|
| bool_t linphone_core_is_audio_muted(LinphoneCore *lc); | | | |
| bool_t linphone_core_is_rtp_muted(LinphoneCore *lc); | | bool_t linphone_core_is_rtp_muted(LinphoneCore *lc); | |
| | | | |
| bool_t linphone_core_get_rtp_no_xmit_on_audio_mute(const LinphoneCore *lc); | | bool_t linphone_core_get_rtp_no_xmit_on_audio_mute(const LinphoneCore *lc); | |
| void linphone_core_set_rtp_no_xmit_on_audio_mute(LinphoneCore *lc, bool_t v
al); | | void linphone_core_set_rtp_no_xmit_on_audio_mute(LinphoneCore *lc, bool_t v
al); | |
| | | | |
| /* returns a list of LinphoneCallLog */ | | /* returns a list of LinphoneCallLog */ | |
| const MSList * linphone_core_get_call_logs(LinphoneCore *lc); | | const MSList * linphone_core_get_call_logs(LinphoneCore *lc); | |
| void linphone_core_clear_call_logs(LinphoneCore *lc); | | void linphone_core_clear_call_logs(LinphoneCore *lc); | |
|
| | | int linphone_core_get_missed_calls_count(LinphoneCore *lc); | |
| | | void linphone_core_reset_missed_calls_count(LinphoneCore *lc); | |
| | | void linphone_core_remove_call_log(LinphoneCore *lc, LinphoneCallLog *call_ | |
| | | log); | |
| | | | |
| /* video support */ | | /* video support */ | |
|
| | | bool_t linphone_core_video_supported(LinphoneCore *lc); | |
| void linphone_core_enable_video(LinphoneCore *lc, bool_t vcap_enabled, bool
_t display_enabled); | | void linphone_core_enable_video(LinphoneCore *lc, bool_t vcap_enabled, bool
_t display_enabled); | |
| bool_t linphone_core_video_enabled(LinphoneCore *lc); | | bool_t linphone_core_video_enabled(LinphoneCore *lc); | |
|
| | | void linphone_core_set_video_policy(LinphoneCore *lc, const LinphoneVideoPo | |
| | | licy *policy); | |
| | | const LinphoneVideoPolicy *linphone_core_get_video_policy(LinphoneCore *lc) | |
| | | ; | |
| | | | |
| typedef struct MSVideoSizeDef{ | | typedef struct MSVideoSizeDef{ | |
| MSVideoSize vsize; | | MSVideoSize vsize; | |
| const char *name; | | const char *name; | |
| }MSVideoSizeDef; | | }MSVideoSizeDef; | |
| /* returns a zero terminated table of MSVideoSizeDef*/ | | /* returns a zero terminated table of MSVideoSizeDef*/ | |
| const MSVideoSizeDef *linphone_core_get_supported_video_sizes(LinphoneCore
*lc); | | const MSVideoSizeDef *linphone_core_get_supported_video_sizes(LinphoneCore
*lc); | |
| void linphone_core_set_preferred_video_size(LinphoneCore *lc, MSVideoSize v
size); | | void linphone_core_set_preferred_video_size(LinphoneCore *lc, MSVideoSize v
size); | |
| MSVideoSize linphone_core_get_preferred_video_size(LinphoneCore *lc); | | MSVideoSize linphone_core_get_preferred_video_size(LinphoneCore *lc); | |
| void linphone_core_set_preferred_video_size_by_name(LinphoneCore *lc, const
char *name); | | void linphone_core_set_preferred_video_size_by_name(LinphoneCore *lc, const
char *name); | |
| | | | |
| void linphone_core_enable_video_preview(LinphoneCore *lc, bool_t val); | | void linphone_core_enable_video_preview(LinphoneCore *lc, bool_t val); | |
| bool_t linphone_core_video_preview_enabled(const LinphoneCore *lc); | | bool_t linphone_core_video_preview_enabled(const LinphoneCore *lc); | |
| | | | |
| void linphone_core_enable_self_view(LinphoneCore *lc, bool_t val); | | void linphone_core_enable_self_view(LinphoneCore *lc, bool_t val); | |
| bool_t linphone_core_self_view_enabled(const LinphoneCore *lc); | | bool_t linphone_core_self_view_enabled(const LinphoneCore *lc); | |
| | | | |
| /* returns a null terminated static array of string describing the webcams
*/ | | /* returns a null terminated static array of string describing the webcams
*/ | |
|
| | | void linphone_core_reload_video_devices(LinphoneCore *lc); | |
| const char** linphone_core_get_video_devices(const LinphoneCore *lc); | | const char** linphone_core_get_video_devices(const LinphoneCore *lc); | |
| int linphone_core_set_video_device(LinphoneCore *lc, const char *id); | | int linphone_core_set_video_device(LinphoneCore *lc, const char *id); | |
| const char *linphone_core_get_video_device(const LinphoneCore *lc); | | const char *linphone_core_get_video_device(const LinphoneCore *lc); | |
| | | | |
|
| /* Set static picture to be used when "Static picture" is the video device
*/ | | /* Set and get static picture to be used when "Static picture" is the video
device */ | |
| int linphone_core_set_static_picture(LinphoneCore *lc, const char *path); | | int linphone_core_set_static_picture(LinphoneCore *lc, const char *path); | |
|
| | | const char *linphone_core_get_static_picture(LinphoneCore *lc); | |
| | | | |
| /* Set and get frame rate for static picture */ | | /* Set and get frame rate for static picture */ | |
| int linphone_core_set_static_picture_fps(LinphoneCore *lc, float fps); | | int linphone_core_set_static_picture_fps(LinphoneCore *lc, float fps); | |
| float linphone_core_get_static_picture_fps(LinphoneCore *lc); | | float linphone_core_get_static_picture_fps(LinphoneCore *lc); | |
| | | | |
| /*function to be used for eventually setting window decorations (icons, tit
le...)*/ | | /*function to be used for eventually setting window decorations (icons, tit
le...)*/ | |
| unsigned long linphone_core_get_native_video_window_id(const LinphoneCore *
lc); | | unsigned long linphone_core_get_native_video_window_id(const LinphoneCore *
lc); | |
| void linphone_core_set_native_video_window_id(LinphoneCore *lc, unsigned lo
ng id); | | void linphone_core_set_native_video_window_id(LinphoneCore *lc, unsigned lo
ng id); | |
| | | | |
| unsigned long linphone_core_get_native_preview_window_id(const LinphoneCore
*lc); | | unsigned long linphone_core_get_native_preview_window_id(const LinphoneCore
*lc); | |
| void linphone_core_set_native_preview_window_id(LinphoneCore *lc, unsigned
long id); | | void linphone_core_set_native_preview_window_id(LinphoneCore *lc, unsigned
long id); | |
| | | | |
| void linphone_core_use_preview_window(LinphoneCore *lc, bool_t yesno); | | void linphone_core_use_preview_window(LinphoneCore *lc, bool_t yesno); | |
| int linphone_core_get_device_rotation(LinphoneCore *lc ); | | int linphone_core_get_device_rotation(LinphoneCore *lc ); | |
| void linphone_core_set_device_rotation(LinphoneCore *lc, int rotation); | | void linphone_core_set_device_rotation(LinphoneCore *lc, int rotation); | |
| | | | |
|
| | | /** | |
| | | * @brief Get the camera sensor rotation. | |
| | | * | |
| | | * This is needed on some mobile platforms to get the number of degrees the | |
| | | camera sensor | |
| | | * is rotated relative to the screen. | |
| | | * | |
| | | * @param lc The linphone core related to the operation | |
| | | * @return The camera sensor rotation in degrees (0 to 360) or -1 if it cou | |
| | | ld not be retrieved | |
| | | */ | |
| | | int linphone_core_get_camera_sensor_rotation(LinphoneCore *lc); | |
| | | | |
| /* start or stop streaming video in case of embedded window */ | | /* start or stop streaming video in case of embedded window */ | |
| void linphone_core_show_video(LinphoneCore *lc, bool_t show); | | void linphone_core_show_video(LinphoneCore *lc, bool_t show); | |
| | | | |
| /*play/record support: use files instead of soundcard*/ | | /*play/record support: use files instead of soundcard*/ | |
| void linphone_core_use_files(LinphoneCore *lc, bool_t yesno); | | void linphone_core_use_files(LinphoneCore *lc, bool_t yesno); | |
| void linphone_core_set_play_file(LinphoneCore *lc, const char *file); | | void linphone_core_set_play_file(LinphoneCore *lc, const char *file); | |
| void linphone_core_set_record_file(LinphoneCore *lc, const char *file); | | void linphone_core_set_record_file(LinphoneCore *lc, const char *file); | |
| | | | |
| void linphone_core_play_dtmf(LinphoneCore *lc, char dtmf, int duration_ms); | | void linphone_core_play_dtmf(LinphoneCore *lc, char dtmf, int duration_ms); | |
| void linphone_core_stop_dtmf(LinphoneCore *lc); | | void linphone_core_stop_dtmf(LinphoneCore *lc); | |
| | | | |
| int linphone_core_get_current_call_duration(const LinphoneCore *lc); | | int linphone_core_get_current_call_duration(const LinphoneCore *lc); | |
| | | | |
| int linphone_core_get_mtu(const LinphoneCore *lc); | | int linphone_core_get_mtu(const LinphoneCore *lc); | |
| void linphone_core_set_mtu(LinphoneCore *lc, int mtu); | | void linphone_core_set_mtu(LinphoneCore *lc, int mtu); | |
| | | | |
| /** | | /** | |
| * @ingroup network_parameters | | * @ingroup network_parameters | |
| * This method is called by the application to notify the linphone core lib
rary when network is reachable. | | * This method is called by the application to notify the linphone core lib
rary when network is reachable. | |
|
| * Calling this method with true trigger linphone to initiate a registratio | | * Calling this method with true trigger linphone to initiate a registratio | |
| n process for all proxy | | n process for all proxies. | |
| * configuration with parameter register set to enable. | | * Calling this method disables the automatic network detection mode. It me | |
| * This method disable the automatic registration mode. It means you must c | | ans you must call this method after each network state changes. | |
| all this method after each network state changes | | | |
| * | | | |
| */ | | */ | |
| void linphone_core_set_network_reachable(LinphoneCore* lc,bool_t value); | | void linphone_core_set_network_reachable(LinphoneCore* lc,bool_t value); | |
| /** | | /** | |
| * @ingroup network_parameters | | * @ingroup network_parameters | |
|
| * return network state either as positioned by the application or by linph
one | | * return network state either as positioned by the application or by linph
one itself. | |
| */ | | */ | |
|
| bool_t linphone_core_is_network_reachabled(LinphoneCore* lc); | | bool_t linphone_core_is_network_reachable(LinphoneCore* lc); | |
| | | | |
| /** | | /** | |
| * @ingroup network_parameters | | * @ingroup network_parameters | |
| * enable signaling keep alive. small udp packet sent periodically to keep
udp NAT association | | * enable signaling keep alive. small udp packet sent periodically to keep
udp NAT association | |
| */ | | */ | |
| void linphone_core_enable_keep_alive(LinphoneCore* lc,bool_t enable); | | void linphone_core_enable_keep_alive(LinphoneCore* lc,bool_t enable); | |
| /** | | /** | |
| * @ingroup network_parameters | | * @ingroup network_parameters | |
| * Is signaling keep alive | | * Is signaling keep alive | |
| */ | | */ | |
| bool_t linphone_core_keep_alive_enabled(LinphoneCore* lc); | | bool_t linphone_core_keep_alive_enabled(LinphoneCore* lc); | |
| | | | |
| void *linphone_core_get_user_data(LinphoneCore *lc); | | void *linphone_core_get_user_data(LinphoneCore *lc); | |
|
| | | void linphone_core_set_user_data(LinphoneCore *lc, void *userdata); | |
| | | | |
| /* returns LpConfig object to read/write to the config file: usefull if you
wish to extend | | /* returns LpConfig object to read/write to the config file: usefull if you
wish to extend | |
| the config file with your own sections */ | | the config file with your own sections */ | |
| struct _LpConfig *linphone_core_get_config(LinphoneCore *lc); | | struct _LpConfig *linphone_core_get_config(LinphoneCore *lc); | |
| | | | |
| /*set a callback for some blocking operations, it takes you informed of the
progress of the operation*/ | | /*set a callback for some blocking operations, it takes you informed of the
progress of the operation*/ | |
| void linphone_core_set_waiting_callback(LinphoneCore *lc, LinphoneWaitingCa
llback cb, void *user_context); | | void linphone_core_set_waiting_callback(LinphoneCore *lc, LinphoneWaitingCa
llback cb, void *user_context); | |
| | | | |
| /*returns the list of registered SipSetup (linphonecore plugins) */ | | /*returns the list of registered SipSetup (linphonecore plugins) */ | |
| const MSList * linphone_core_get_sip_setups(LinphoneCore *lc); | | const MSList * linphone_core_get_sip_setups(LinphoneCore *lc); | |
| | | | |
| skipping to change at line 1024 | | skipping to change at line 1427 | |
| void *video_rtp_func_data; | | void *video_rtp_func_data; | |
| LinphoneRtpTransportFactoryFunc video_rtcp_func; | | LinphoneRtpTransportFactoryFunc video_rtcp_func; | |
| void *video_rtcp_func_data; | | void *video_rtcp_func_data; | |
| }; | | }; | |
| typedef struct _LinphoneRtpTransportFactories LinphoneRtpTransportFactories
; | | typedef struct _LinphoneRtpTransportFactories LinphoneRtpTransportFactories
; | |
| | | | |
| void linphone_core_set_rtp_transport_factories(LinphoneCore* lc, LinphoneRt
pTransportFactories *factories); | | void linphone_core_set_rtp_transport_factories(LinphoneCore* lc, LinphoneRt
pTransportFactories *factories); | |
| | | | |
| int linphone_core_get_current_call_stats(LinphoneCore *lc, rtp_stats_t *loc
al, rtp_stats_t *remote); | | int linphone_core_get_current_call_stats(LinphoneCore *lc, rtp_stats_t *loc
al, rtp_stats_t *remote); | |
| | | | |
|
| | | int linphone_core_get_calls_nb(const LinphoneCore *lc); | |
| | | | |
| const MSList *linphone_core_get_calls(LinphoneCore *lc); | | const MSList *linphone_core_get_calls(LinphoneCore *lc); | |
| | | | |
| LinphoneGlobalState linphone_core_get_global_state(const LinphoneCore *lc); | | LinphoneGlobalState linphone_core_get_global_state(const LinphoneCore *lc); | |
| /** | | /** | |
| * force registration refresh to be initiated upon next iterate | | * force registration refresh to be initiated upon next iterate | |
| * @ingroup proxies | | * @ingroup proxies | |
| */ | | */ | |
| void linphone_core_refresh_registers(LinphoneCore* lc); | | void linphone_core_refresh_registers(LinphoneCore* lc); | |
| | | | |
| /* Path to the file storing secrets cache */ | | /* Path to the file storing secrets cache */ | |
| void linphone_core_set_zrtp_secrets_file(LinphoneCore *lc, const char* file
); | | void linphone_core_set_zrtp_secrets_file(LinphoneCore *lc, const char* file
); | |
|
| | | const char *linphone_core_get_zrtp_secrets_file(LinphoneCore *lc); | |
| | | /** | |
| | | * Search from the list of current calls if a remote address match uri | |
| | | * @ingroup call_control | |
| | | * @param lc | |
| | | * @param uri which should match call remote uri | |
| | | * @return LinphoneCall or NULL is no match is found | |
| | | */ | |
| const LinphoneCall* linphone_core_find_call_from_uri(LinphoneCore *lc, cons
t char *uri); | | const LinphoneCall* linphone_core_find_call_from_uri(LinphoneCore *lc, cons
t char *uri); | |
| | | | |
| int linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCall *call); | | int linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCall *call); | |
| int linphone_core_add_all_to_conference(LinphoneCore *lc); | | int linphone_core_add_all_to_conference(LinphoneCore *lc); | |
| int linphone_core_remove_from_conference(LinphoneCore *lc, LinphoneCall *ca
ll); | | int linphone_core_remove_from_conference(LinphoneCore *lc, LinphoneCall *ca
ll); | |
| bool_t linphone_core_is_in_conference(const LinphoneCore *lc); | | bool_t linphone_core_is_in_conference(const LinphoneCore *lc); | |
| int linphone_core_enter_conference(LinphoneCore *lc); | | int linphone_core_enter_conference(LinphoneCore *lc); | |
| int linphone_core_leave_conference(LinphoneCore *lc); | | int linphone_core_leave_conference(LinphoneCore *lc); | |
| float linphone_core_get_conference_local_input_volume(LinphoneCore *lc); | | float linphone_core_get_conference_local_input_volume(LinphoneCore *lc); | |
| | | | |
| int linphone_core_terminate_conference(LinphoneCore *lc); | | int linphone_core_terminate_conference(LinphoneCore *lc); | |
| int linphone_core_get_conference_size(LinphoneCore *lc); | | int linphone_core_get_conference_size(LinphoneCore *lc); | |
|
| | | int linphone_core_start_conference_recording(LinphoneCore *lc, const char * | |
| | | path); | |
| | | int linphone_core_stop_conference_recording(LinphoneCore *lc); | |
| | | /** | |
| | | * Get the maximum number of simultaneous calls Linphone core can manage at | |
| | | a time. All new call above this limit are declined with a busy answer | |
| | | * @ingroup initializing | |
| | | * @param lc core | |
| | | * @return max number of simultaneous calls | |
| | | */ | |
| int linphone_core_get_max_calls(LinphoneCore *lc); | | int linphone_core_get_max_calls(LinphoneCore *lc); | |
|
| | | /** | |
| | | * Set the maximum number of simultaneous calls Linphone core can manage at | |
| | | a time. All new call above this limit are declined with a busy answer | |
| | | * @ingroup initializing | |
| | | * @param lc core | |
| | | * @param max number of simultaneous calls | |
| | | */ | |
| void linphone_core_set_max_calls(LinphoneCore *lc, int max); | | void linphone_core_set_max_calls(LinphoneCore *lc, int max); | |
| | | | |
| bool_t linphone_core_sound_resources_locked(LinphoneCore *lc); | | bool_t linphone_core_sound_resources_locked(LinphoneCore *lc); | |
| | | | |
| bool_t linphone_core_media_encryption_supported(const LinphoneCore *lc, Lin
phoneMediaEncryption menc); | | bool_t linphone_core_media_encryption_supported(const LinphoneCore *lc, Lin
phoneMediaEncryption menc); | |
| | | | |
| /** | | /** | |
| * Choose media encryption policy to be used for RTP packets | | * Choose media encryption policy to be used for RTP packets | |
| */ | | */ | |
| int linphone_core_set_media_encryption(LinphoneCore *lc, enum LinphoneMedia
Encryption menc); | | int linphone_core_set_media_encryption(LinphoneCore *lc, enum LinphoneMedia
Encryption menc); | |
| | | | |
| skipping to change at line 1079 | | skipping to change at line 1504 | |
| /** | | /** | |
| * Init call params using LinphoneCore's current configuration | | * Init call params using LinphoneCore's current configuration | |
| */ | | */ | |
| void linphone_core_init_default_params(LinphoneCore*lc, LinphoneCallParams
*params); | | void linphone_core_init_default_params(LinphoneCore*lc, LinphoneCallParams
*params); | |
| | | | |
| /** | | /** | |
| * True if tunnel support was compiled. | | * True if tunnel support was compiled. | |
| */ | | */ | |
| bool_t linphone_core_tunnel_available(void); | | bool_t linphone_core_tunnel_available(void); | |
| | | | |
|
| typedef struct LinphoneTunnel LinphoneTunnel; | | typedef struct _LinphoneTunnel LinphoneTunnel; | |
| /** | | /** | |
| * get tunnel instance if available | | * get tunnel instance if available | |
| */ | | */ | |
| LinphoneTunnel *linphone_core_get_tunnel(LinphoneCore *lc); | | LinphoneTunnel *linphone_core_get_tunnel(LinphoneCore *lc); | |
| | | | |
|
| | | void linphone_core_set_sip_dscp(LinphoneCore *lc, int dscp); | |
| | | int linphone_core_get_sip_dscp(const LinphoneCore *lc); | |
| | | | |
| | | void linphone_core_set_audio_dscp(LinphoneCore *lc, int dscp); | |
| | | int linphone_core_get_audio_dscp(const LinphoneCore *lc); | |
| | | | |
| | | void linphone_core_set_video_dscp(LinphoneCore *lc, int dscp); | |
| | | int linphone_core_get_video_dscp(const LinphoneCore *lc); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 93 change blocks. |
| 101 lines changed or deleted | | 647 lines changed or added | |
|
| mediastream.h | | mediastream.h | |
| | | | |
| skipping to change at line 30 | | skipping to change at line 30 | |
| #ifndef MEDIASTREAM_H | | #ifndef MEDIASTREAM_H | |
| #define MEDIASTREAM_H | | #define MEDIASTREAM_H | |
| | | | |
| #include <mediastreamer2/msfilter.h> | | #include <mediastreamer2/msfilter.h> | |
| #include <mediastreamer2/msticker.h> | | #include <mediastreamer2/msticker.h> | |
| #include <mediastreamer2/mssndcard.h> | | #include <mediastreamer2/mssndcard.h> | |
| #include <mediastreamer2/mswebcam.h> | | #include <mediastreamer2/mswebcam.h> | |
| #include <mediastreamer2/msvideo.h> | | #include <mediastreamer2/msvideo.h> | |
| #include <mediastreamer2/bitratecontrol.h> | | #include <mediastreamer2/bitratecontrol.h> | |
| #include <mediastreamer2/qualityindicator.h> | | #include <mediastreamer2/qualityindicator.h> | |
|
| | | #include <mediastreamer2/ice.h> | |
| #include <ortp/ortp.h> | | #include <ortp/ortp.h> | |
| #include <ortp/event.h> | | #include <ortp/event.h> | |
| #include <ortp/zrtp.h> | | #include <ortp/zrtp.h> | |
| #include <ortp/ortp_srtp.h> | | #include <ortp/ortp_srtp.h> | |
| | | | |
| #include <ortp/zrtp.h> | | #include <ortp/zrtp.h> | |
| | | | |
| #define PAYLOAD_TYPE_FLAG_CAN_RECV PAYLOAD_TYPE_USER_FLAG_1 | | #define PAYLOAD_TYPE_FLAG_CAN_RECV PAYLOAD_TYPE_USER_FLAG_1 | |
| #define PAYLOAD_TYPE_FLAG_CAN_SEND PAYLOAD_TYPE_USER_FLAG_2 | | #define PAYLOAD_TYPE_FLAG_CAN_SEND PAYLOAD_TYPE_USER_FLAG_2 | |
| | | | |
|
| | | #ifdef __cplusplus | |
| | | extern "C" { | |
| | | #endif | |
| | | | |
| | | /** | |
| | | * @addtogroup ring_api | |
| | | * @{ | |
| | | **/ | |
| | | | |
| | | struct _RingStream | |
| | | { | |
| | | MSTicker *ticker; | |
| | | MSFilter *source; | |
| | | MSFilter *gendtmf; | |
| | | MSFilter *write_resampler; | |
| | | MSFilter *sndwrite; | |
| | | }; | |
| | | | |
| | | typedef struct _RingStream RingStream; | |
| | | | |
| | | MS2_PUBLIC RingStream *ring_start (const char * file, int interval, MSSndCa | |
| | | rd *sndcard); | |
| | | MS2_PUBLIC RingStream *ring_start_with_cb(const char * file, int interval, | |
| | | MSSndCard *sndcard, MSFilterNotifyFunc func, void * user_data); | |
| | | MS2_PUBLIC void ring_stop (RingStream * stream); | |
| | | | |
| | | /** | |
| | | * @} | |
| | | **/ | |
| | | | |
| | | typedef enum StreamType { | |
| | | AudioStreamType, | |
| | | VideoStreamType | |
| | | } StreamType; | |
| | | | |
| | | struct _MediaStream { | |
| | | StreamType type; | |
| | | MSTicker *ticker; | |
| | | RtpSession *session; | |
| | | OrtpEvQueue *evq; | |
| | | MSFilter *rtprecv; | |
| | | MSFilter *rtpsend; | |
| | | MSFilter *encoder; | |
| | | MSFilter *decoder; | |
| | | MSFilter *voidsink; | |
| | | MSBitrateController *rc; | |
| | | MSQualityIndicator *qi; | |
| | | IceCheckList *ice_check_list; | |
| | | OrtpZrtpContext *zrtp_context; | |
| | | srtp_t srtp_session; | |
| | | time_t start_time; | |
| | | time_t last_iterate_time; | |
| | | bool_t use_rc; | |
| | | bool_t is_beginning; | |
| | | bool_t pad[2]; | |
| | | }; | |
| | | | |
| | | typedef struct _MediaStream MediaStream; | |
| | | | |
| | | MS2_PUBLIC void media_stream_set_rtcp_information(MediaStream *stream, cons | |
| | | t char *cname, const char *tool); | |
| | | | |
| | | MS2_PUBLIC void media_stream_get_local_rtp_stats(MediaStream *stream, rtp_s | |
| | | tats_t *stats); | |
| | | | |
| | | MS2_PUBLIC int media_stream_set_dscp(MediaStream *stream, int dscp); | |
| | | | |
| | | MS2_PUBLIC void media_stream_enable_adaptive_bitrate_control(MediaStream *s | |
| | | tream, bool_t enabled); | |
| | | | |
| | | MS2_PUBLIC void media_stream_enable_adaptive_jittcomp(MediaStream *stream, | |
| | | bool_t enabled); | |
| | | | |
| | | MS2_PUBLIC bool_t media_stream_enable_srtp(MediaStream* stream, enum ortp_s | |
| | | rtp_crypto_suite_t suite, const char* snd_key, const char* rcv_key); | |
| | | | |
| | | MS2_PUBLIC const MSQualityIndicator *media_stream_get_quality_indicator(Med | |
| | | iaStream *stream); | |
| | | | |
| | | MS2_PUBLIC float media_stream_get_quality_rating(MediaStream *stream); | |
| | | | |
| | | MS2_PUBLIC float media_stream_get_average_quality_rating(MediaStream *strea | |
| | | m); | |
| | | | |
| | | /*shall only called internally*/ | |
| | | void media_stream_iterate(MediaStream * stream); | |
| | | /** | |
| | | * @addtogroup audio_stream_api | |
| | | * @{ | |
| | | **/ | |
| | | | |
| typedef enum EchoLimiterType{ | | typedef enum EchoLimiterType{ | |
| ELInactive, | | ELInactive, | |
| ELControlMic, | | ELControlMic, | |
| ELControlFull | | ELControlFull | |
| } EchoLimiterType; | | } EchoLimiterType; | |
| | | | |
| struct _AudioStream | | struct _AudioStream | |
| { | | { | |
|
| MSTicker *ticker; | | MediaStream ms; | |
| RtpSession *session; | | | |
| MSFilter *soundread; | | MSFilter *soundread; | |
| MSFilter *soundwrite; | | MSFilter *soundwrite; | |
|
| MSFilter *encoder; | | | |
| MSFilter *decoder; | | | |
| MSFilter *rtprecv; | | | |
| MSFilter *rtpsend; | | | |
| MSFilter *dtmfgen; | | MSFilter *dtmfgen; | |
| MSFilter *dtmfgen_rtp; | | MSFilter *dtmfgen_rtp; | |
|
| | | MSFilter *plc; | |
| MSFilter *ec;/*echo canceler*/ | | MSFilter *ec;/*echo canceler*/ | |
| MSFilter *volsend,*volrecv; /*MSVolumes*/ | | MSFilter *volsend,*volrecv; /*MSVolumes*/ | |
| MSFilter *read_resampler; | | MSFilter *read_resampler; | |
| MSFilter *write_resampler; | | MSFilter *write_resampler; | |
| MSFilter *equalizer; | | MSFilter *equalizer; | |
|
| | | MSFilter *dummy; | |
| | | MSFilter *send_tee; | |
| | | MSFilter *recv_tee; | |
| | | MSFilter *recorder_mixer; | |
| | | MSFilter *recorder; | |
| | | char *recorder_file; | |
| uint64_t last_packet_count; | | uint64_t last_packet_count; | |
| time_t last_packet_time; | | time_t last_packet_time; | |
| EchoLimiterType el_type; /*use echo limiter: two MSVolume, measured
input level controlling local output level*/ | | EchoLimiterType el_type; /*use echo limiter: two MSVolume, measured
input level controlling local output level*/ | |
|
| OrtpEvQueue *evq; | | uint32_t features; | |
| MSBitrateController *rc; | | | |
| MSQualityIndicator *qi; | | | |
| time_t start_time; | | | |
| bool_t play_dtmfs; | | bool_t play_dtmfs; | |
| bool_t use_gc; | | bool_t use_gc; | |
| bool_t use_agc; | | bool_t use_agc; | |
| bool_t eq_active; | | bool_t eq_active; | |
| bool_t use_ng;/*noise gate*/ | | bool_t use_ng;/*noise gate*/ | |
|
| bool_t use_rc; | | bool_t is_ec_delay_set; | |
| bool_t is_beginning; | | | |
| OrtpZrtpContext *ortpZrtpContext; | | | |
| srtp_t srtp_session; | | | |
| }; | | }; | |
| | | | |
|
| #ifdef __cplusplus | | | |
| extern "C" { | | | |
| #endif | | | |
| | | | |
| /** | | | |
| * @addtogroup audio_stream_api | | | |
| * @{ | | | |
| **/ | | | |
| | | | |
| /** | | /** | |
| * The AudioStream holds all resources to create and run typical VoIP audio
stream. | | * The AudioStream holds all resources to create and run typical VoIP audio
stream. | |
| **/ | | **/ | |
| typedef struct _AudioStream AudioStream; | | typedef struct _AudioStream AudioStream; | |
| | | | |
|
| struct _RingStream | | | |
| { | | | |
| MSTicker *ticker; | | | |
| MSFilter *source; | | | |
| MSFilter *gendtmf; | | | |
| MSFilter *write_resampler; | | | |
| MSFilter *sndwrite; | | | |
| }; | | | |
| | | | |
| typedef struct _RingStream RingStream; | | | |
| | | | |
| /* start a thread that does sampling->encoding->rtp_sending|rtp_receiving->
decoding->playing */ | | /* start a thread that does sampling->encoding->rtp_sending|rtp_receiving->
decoding->playing */ | |
| MS2_PUBLIC AudioStream *audio_stream_start (RtpProfile * prof, int locport,
const char *remip, | | MS2_PUBLIC AudioStream *audio_stream_start (RtpProfile * prof, int locport,
const char *remip, | |
| int remport, int payload_type, int jitt_com
p, bool_t echo_cancel); | | int remport, int payload_type, int jitt_com
p, bool_t echo_cancel); | |
| | | | |
| MS2_PUBLIC AudioStream *audio_stream_start_with_sndcards(RtpProfile * prof,
int locport, const char *remip4, int remport, int payload_type, int jitt_c
omp, MSSndCard *playcard, MSSndCard *captcard, bool_t echocancel); | | MS2_PUBLIC AudioStream *audio_stream_start_with_sndcards(RtpProfile * prof,
int locport, const char *remip4, int remport, int payload_type, int jitt_c
omp, MSSndCard *playcard, MSSndCard *captcard, bool_t echocancel); | |
| | | | |
| MS2_PUBLIC int audio_stream_start_with_files (AudioStream * stream, RtpProf
ile * prof, | | MS2_PUBLIC int audio_stream_start_with_files (AudioStream * stream, RtpProf
ile * prof, | |
| const char *remip, int remport,
int rem_rtcp_port, | | const char *remip, int remport,
int rem_rtcp_port, | |
| int pt, int jitt_comp, | | int pt, int jitt_comp, | |
| const char * infile, const char
* outfile); | | const char * infile, const char
* outfile); | |
| | | | |
| /** | | /** | |
| * Starts an audio stream from/to local wav files or soundcards. | | * Starts an audio stream from/to local wav files or soundcards. | |
| * | | * | |
| * This method starts the processing of the audio stream, that is playing f
rom wav file or soundcard, voice processing, encoding, | | * This method starts the processing of the audio stream, that is playing f
rom wav file or soundcard, voice processing, encoding, | |
| * sending through RTP, receiving from RTP, decoding, voice processing and
wav file recording or soundcard playback. | | * sending through RTP, receiving from RTP, decoding, voice processing and
wav file recording or soundcard playback. | |
| * | | * | |
| * | | * | |
| * @param stream an AudioStream previously created with audio_stream_new(). | | * @param stream an AudioStream previously created with audio_stream_new(). | |
| * @param prof a RtpProfile containing all PayloadType possible during the
audio session. | | * @param prof a RtpProfile containing all PayloadType possible during the
audio session. | |
|
| * @param remip remote IP address where to send the encoded audio. | | * @param rem_rtp_ip remote IP address where to send the encoded audio. | |
| * @param remport remote IP port where to send the encoded audio | | * @param rem_rtp_port remote IP port where to send the encoded audio. | |
| | | * @param rem_rtcp_ip remote IP address for RTCP. | |
| * @param rem_rtcp_port remote port for RTCP. | | * @param rem_rtcp_port remote port for RTCP. | |
| * @param payload_type payload type index to use for the sending stream. Th
is index must point to a valid PayloadType in the RtpProfile. | | * @param payload_type payload type index to use for the sending stream. Th
is index must point to a valid PayloadType in the RtpProfile. | |
| * @param jitt_comp Nominal jitter buffer size in milliseconds. | | * @param jitt_comp Nominal jitter buffer size in milliseconds. | |
| * @param infile path to wav file to play out (can be NULL) | | * @param infile path to wav file to play out (can be NULL) | |
| * @param outfile path to wav file to record into (can be NULL) | | * @param outfile path to wav file to record into (can be NULL) | |
| * @param playcard The soundcard to be used for playback (can be NULL) | | * @param playcard The soundcard to be used for playback (can be NULL) | |
| * @param captcard The soundcard to be used for catpure. (can be NULL) | | * @param captcard The soundcard to be used for catpure. (can be NULL) | |
| * @param echo_cancel whether echo cancellation is to be performed. | | * @param echo_cancel whether echo cancellation is to be performed. | |
| * @returns 0 if sucessful, -1 otherwise. | | * @returns 0 if sucessful, -1 otherwise. | |
| **/ | | **/ | |
|
| MS2_PUBLIC int audio_stream_start_full(AudioStream *stream, RtpProfile *pro | | MS2_PUBLIC int audio_stream_start_full(AudioStream *stream, RtpProfile *pro | |
| file, const char *remip,int remport, | | file, const char *rem_rtp_ip,int rem_rtp_port, | |
| int rem_rtcp_port, int payload,int jitt_comp, const char *infile, co | | const char *rem_rtcp_ip, int rem_rtcp_port, int payload,int jitt_com | |
| nst char *outfile, | | p, const char *infile, const char *outfile, | |
| MSSndCard *playcard, MSSndCard *captcard, bool_t use_ec); | | MSSndCard *playcard, MSSndCard *captcard, bool_t use_ec); | |
| | | | |
| MS2_PUBLIC void audio_stream_play(AudioStream *st, const char *name); | | MS2_PUBLIC void audio_stream_play(AudioStream *st, const char *name); | |
| MS2_PUBLIC void audio_stream_record(AudioStream *st, const char *name); | | MS2_PUBLIC void audio_stream_record(AudioStream *st, const char *name); | |
| | | | |
|
| MS2_PUBLIC void audio_stream_set_rtcp_information(AudioStream *st, const ch | | static inline void audio_stream_set_rtcp_information(AudioStream *st, const | |
| ar *cname, const char *tool); | | char *cname, const char *tool) { | |
| | | media_stream_set_rtcp_information(&st->ms, cname, tool); | |
| | | } | |
| | | | |
| MS2_PUBLIC void audio_stream_play_received_dtmfs(AudioStream *st, bool_t ye
sno); | | MS2_PUBLIC void audio_stream_play_received_dtmfs(AudioStream *st, bool_t ye
sno); | |
| | | | |
| /** | | /** | |
| * Creates an AudioStream object listening on a RTP port. | | * Creates an AudioStream object listening on a RTP port. | |
|
| * @param locport the local UDP port to listen for RTP packets. | | * @param loc_rtp_port the local UDP port to listen for RTP packets. | |
| | | * @param loc_rtcp_port the local UDP port to listen for RTCP packets | |
| * @param ipv6 TRUE if ipv6 must be used. | | * @param ipv6 TRUE if ipv6 must be used. | |
| * @returns a new AudioStream. | | * @returns a new AudioStream. | |
| **/ | | **/ | |
|
| MS2_PUBLIC AudioStream *audio_stream_new(int locport, bool_t ipv6); | | MS2_PUBLIC AudioStream *audio_stream_new(int loc_rtp_port, int loc_rtcp_por | |
| | | t, bool_t ipv6); | |
| | | | |
| | | #define AUDIO_STREAM_FEATURE_PLC (1 << 0) | |
| | | #define AUDIO_STREAM_FEATURE_EC (1 << 1) | |
| | | #define AUDIO_STREAM_FEATURE_EQUALIZER (1 << 2) | |
| | | #define AUDIO_STREAM_FEATURE_VOL_SND (1 << 3) | |
| | | #define AUDIO_STREAM_FEATURE_VOL_RCV (1 << 4) | |
| | | #define AUDIO_STREAM_FEATURE_DTMF (1 << 5) | |
| | | #define AUDIO_STREAM_FEATURE_DTMF_ECHO (1 << 6) | |
| | | #define AUDIO_STREAM_FEATURE_MIXED_RECORDING (1 << 7) | |
| | | | |
| | | #define AUDIO_STREAM_FEATURE_ALL (\ | |
| | | AUDIO_STREAM_FEATURE_PLC | \ | |
| | | AUDIO_STREAM_FEATURE_EC | \ | |
| | | AUDIO_STREAM_FEATURE_EQUALIZER | \ | |
| | | AUDIO_STREAM_FEATURE_VOL_SND | \ | |
| | | AUDIO_STREAM_FEATURE_VOL_RCV | \ | |
| | | AUDIO_STREAM_FEATURE_DTMF | \ | |
| | | AUDIO_STREAM_FEATURE_DTMF_ECHO |\ | |
| | | AUDIO_STREAM_FEATURE_MIXED_RECORDING | |
| | | \ | |
| | | ) | |
| | | | |
| | | MS2_PUBLIC uint32_t audio_stream_get_features(AudioStream *st); | |
| | | MS2_PUBLIC void audio_stream_set_features(AudioStream *st, uint32_t feature | |
| | | s); | |
| | | | |
| | | MS2_PUBLIC void audio_stream_prepare_sound(AudioStream *st, MSSndCard *play | |
| | | card, MSSndCard *captcard); | |
| | | MS2_PUBLIC void audio_stream_unprepare_sound(AudioStream *st); | |
| | | MS2_PUBLIC bool_t audio_stream_started(AudioStream *stream); | |
| /** | | /** | |
| * Starts an audio stream from local soundcards. | | * Starts an audio stream from local soundcards. | |
| * | | * | |
| * This method starts the processing of the audio stream, that is capture f
rom soundcard, voice processing, encoding, | | * This method starts the processing of the audio stream, that is capture f
rom soundcard, voice processing, encoding, | |
| * sending through RTP, receiving from RTP, decoding, voice processing and
soundcard playback. | | * sending through RTP, receiving from RTP, decoding, voice processing and
soundcard playback. | |
| * | | * | |
| * @param stream an AudioStream previously created with audio_stream_new(). | | * @param stream an AudioStream previously created with audio_stream_new(). | |
| * @param prof a RtpProfile containing all PayloadType possible during the
audio session. | | * @param prof a RtpProfile containing all PayloadType possible during the
audio session. | |
| * @param remip remote IP address where to send the encoded audio. | | * @param remip remote IP address where to send the encoded audio. | |
| * @param remport remote IP port where to send the encoded audio | | * @param remport remote IP port where to send the encoded audio | |
| | | | |
| skipping to change at line 197 | | skipping to change at line 287 | |
| /*enable gain control, to be done before start() */ | | /*enable gain control, to be done before start() */ | |
| MS2_PUBLIC void audio_stream_enable_gain_control(AudioStream *stream, bool_
t val); | | MS2_PUBLIC void audio_stream_enable_gain_control(AudioStream *stream, bool_
t val); | |
| | | | |
| /*enable automatic gain control, to be done before start() */ | | /*enable automatic gain control, to be done before start() */ | |
| MS2_PUBLIC void audio_stream_enable_automatic_gain_control(AudioStream *str
eam, bool_t val); | | MS2_PUBLIC void audio_stream_enable_automatic_gain_control(AudioStream *str
eam, bool_t val); | |
| | | | |
| /*to be done before start */ | | /*to be done before start */ | |
| MS2_PUBLIC void audio_stream_set_echo_canceller_params(AudioStream *st, int
tail_len_ms, int delay_ms, int framesize); | | MS2_PUBLIC void audio_stream_set_echo_canceller_params(AudioStream *st, int
tail_len_ms, int delay_ms, int framesize); | |
| | | | |
| /*enable adaptive rate control */ | | /*enable adaptive rate control */ | |
|
| MS2_PUBLIC void audio_stream_enable_adaptive_bitrate_control(AudioStream *s | | static inline void audio_stream_enable_adaptive_bitrate_control(AudioStream | |
| t, bool_t enabled); | | *stream, bool_t enabled) { | |
| | | media_stream_enable_adaptive_bitrate_control(&stream->ms, enabled); | |
| | | } | |
| | | | |
| | | /* Enable adaptive jitter compensation */ | |
| | | static inline void audio_stream_enable_adaptive_jittcomp(AudioStream *strea | |
| | | m, bool_t enabled) { | |
| | | media_stream_enable_adaptive_jittcomp(&stream->ms, enabled); | |
| | | } | |
| | | | |
| MS2_PUBLIC void audio_stream_set_mic_gain(AudioStream *stream, float gain); | | MS2_PUBLIC void audio_stream_set_mic_gain(AudioStream *stream, float gain); | |
| | | | |
| /* enable/disable rtp stream */ | | /* enable/disable rtp stream */ | |
| MS2_PUBLIC void audio_stream_mute_rtp(AudioStream *stream, bool_t val); | | MS2_PUBLIC void audio_stream_mute_rtp(AudioStream *stream, bool_t val); | |
| | | | |
| /*enable noise gate, must be done before start()*/ | | /*enable noise gate, must be done before start()*/ | |
| MS2_PUBLIC void audio_stream_enable_noise_gate(AudioStream *stream, bool_t
val); | | MS2_PUBLIC void audio_stream_enable_noise_gate(AudioStream *stream, bool_t
val); | |
| | | | |
| /*enable parametric equalizer in the stream that goes to the speaker*/ | | /*enable parametric equalizer in the stream that goes to the speaker*/ | |
| MS2_PUBLIC void audio_stream_enable_equalizer(AudioStream *stream, bool_t e
nabled); | | MS2_PUBLIC void audio_stream_enable_equalizer(AudioStream *stream, bool_t e
nabled); | |
| | | | |
| MS2_PUBLIC void audio_stream_equalizer_set_gain(AudioStream *stream, int fr
equency, float gain, int freq_width); | | MS2_PUBLIC void audio_stream_equalizer_set_gain(AudioStream *stream, int fr
equency, float gain, int freq_width); | |
| | | | |
| /* stop the audio streaming thread and free everything*/ | | /* stop the audio streaming thread and free everything*/ | |
| MS2_PUBLIC void audio_stream_stop (AudioStream * stream); | | MS2_PUBLIC void audio_stream_stop (AudioStream * stream); | |
| | | | |
|
| MS2_PUBLIC RingStream *ring_start (const char * file, int interval, MSSndCa | | | |
| rd *sndcard); | | | |
| MS2_PUBLIC RingStream *ring_start_with_cb(const char * file, int interval, | | | |
| MSSndCard *sndcard, MSFilterNotifyFunc func, void * user_data); | | | |
| MS2_PUBLIC void ring_stop (RingStream * stream); | | | |
| | | | |
| /* send a dtmf */ | | /* send a dtmf */ | |
| MS2_PUBLIC int audio_stream_send_dtmf (AudioStream * stream, char dtmf); | | MS2_PUBLIC int audio_stream_send_dtmf (AudioStream * stream, char dtmf); | |
| | | | |
|
| | | MS2_PUBLIC int audio_stream_mixed_record_open(AudioStream *st, const char*f | |
| | | ilename); | |
| | | | |
| | | MS2_PUBLIC int audio_stream_mixed_record_start(AudioStream *st); | |
| | | | |
| | | MS2_PUBLIC int audio_stream_mixed_record_stop(AudioStream *st); | |
| | | | |
| MS2_PUBLIC void audio_stream_set_default_card(int cardindex); | | MS2_PUBLIC void audio_stream_set_default_card(int cardindex); | |
| | | | |
| /* retrieve RTP statistics*/ | | /* retrieve RTP statistics*/ | |
|
| MS2_PUBLIC void audio_stream_get_local_rtp_stats(AudioStream *stream, rtp_s | | static inline void audio_stream_get_local_rtp_stats(AudioStream *stream, rt | |
| tats_t *stats); | | p_stats_t *stats) { | |
| | | media_stream_get_local_rtp_stats(&stream->ms, stats); | |
| | | } | |
| | | | |
| /* returns a realtime indicator of the stream quality between 0 and 5 */ | | /* returns a realtime indicator of the stream quality between 0 and 5 */ | |
| MS2_PUBLIC float audio_stream_get_quality_rating(AudioStream *stream); | | MS2_PUBLIC float audio_stream_get_quality_rating(AudioStream *stream); | |
| | | | |
| /* returns the quality rating as an average since the start of the streamin
g session.*/ | | /* returns the quality rating as an average since the start of the streamin
g session.*/ | |
| MS2_PUBLIC float audio_stream_get_average_quality_rating(AudioStream *strea
m); | | MS2_PUBLIC float audio_stream_get_average_quality_rating(AudioStream *strea
m); | |
| | | | |
| /* enable ZRTP on the audio stream */ | | /* enable ZRTP on the audio stream */ | |
| MS2_PUBLIC void audio_stream_enable_zrtp(AudioStream *stream, OrtpZrtpParam
s *params); | | MS2_PUBLIC void audio_stream_enable_zrtp(AudioStream *stream, OrtpZrtpParam
s *params); | |
| | | | |
| /* enable SRTP on the audio stream */ | | /* enable SRTP on the audio stream */ | |
|
| MS2_PUBLIC bool_t audio_stream_enable_strp(AudioStream* stream, enum ortp_s | | static inline bool_t audio_stream_enable_srtp(AudioStream* stream, enum ort | |
| rtp_crypto_suite_t suite, const char* snd_key, const char* rcv_key); | | p_srtp_crypto_suite_t suite, const char* snd_key, const char* rcv_key) { | |
| | | return media_stream_enable_srtp(&stream->ms, suite, snd_key, rcv_key | |
| | | ); | |
| | | } | |
| | | | |
|
| /***************** | | static inline int audio_stream_set_dscp(AudioStream *stream, int dscp) { | |
| Video Support | | return media_stream_set_dscp(&stream->ms, dscp); | |
| *****************/ | | } | |
| | | | |
| | | /** | |
| | | * @} | |
| | | **/ | |
| | | | |
| | | /** | |
| | | * @addtogroup video_stream_api | |
| | | * @{ | |
| | | **/ | |
| | | | |
| typedef void (*VideoStreamRenderCallback)(void *user_pointer, const MSPictu
re *local_view, const MSPicture *remote_view); | | typedef void (*VideoStreamRenderCallback)(void *user_pointer, const MSPictu
re *local_view, const MSPicture *remote_view); | |
| typedef void (*VideoStreamEventCallback)(void *user_pointer, const MSFilter
*f, const unsigned int event_id, const void *args); | | typedef void (*VideoStreamEventCallback)(void *user_pointer, const MSFilter
*f, const unsigned int event_id, const void *args); | |
| | | | |
| typedef enum _VideoStreamDir{ | | typedef enum _VideoStreamDir{ | |
| VideoStreamSendRecv, | | VideoStreamSendRecv, | |
| VideoStreamSendOnly, | | VideoStreamSendOnly, | |
| VideoStreamRecvOnly | | VideoStreamRecvOnly | |
| }VideoStreamDir; | | }VideoStreamDir; | |
| | | | |
| struct _VideoStream | | struct _VideoStream | |
| { | | { | |
|
| MSTicker *ticker; | | MediaStream ms; | |
| RtpSession *session; | | | |
| MSFilter *source; | | MSFilter *source; | |
| MSFilter *pixconv; | | MSFilter *pixconv; | |
| MSFilter *sizeconv; | | MSFilter *sizeconv; | |
| MSFilter *tee; | | MSFilter *tee; | |
| MSFilter *output; | | MSFilter *output; | |
|
| MSFilter *encoder; | | | |
| MSFilter *decoder; | | | |
| MSFilter *rtprecv; | | | |
| MSFilter *rtpsend; | | | |
| MSFilter *tee2; | | MSFilter *tee2; | |
| MSFilter *jpegwriter; | | MSFilter *jpegwriter; | |
| MSFilter *output2; | | MSFilter *output2; | |
|
| OrtpEvQueue *evq; | | | |
| MSVideoSize sent_vsize; | | MSVideoSize sent_vsize; | |
| int corner; /*for selfview*/ | | int corner; /*for selfview*/ | |
| VideoStreamRenderCallback rendercb; | | VideoStreamRenderCallback rendercb; | |
| void *render_pointer; | | void *render_pointer; | |
| VideoStreamEventCallback eventcb; | | VideoStreamEventCallback eventcb; | |
| void *event_pointer; | | void *event_pointer; | |
| char *display_name; | | char *display_name; | |
| unsigned long window_id; | | unsigned long window_id; | |
| unsigned long preview_window_id; | | unsigned long preview_window_id; | |
| VideoStreamDir dir; | | VideoStreamDir dir; | |
| MSWebCam *cam; | | MSWebCam *cam; | |
|
| bool_t use_preview_window; | | | |
| bool_t use_rc; | | | |
| bool_t pad[2]; | | | |
| int device_orientation; /* warning: meaning of this variable depends
on the platform (Android, iOS, ...) */ | | int device_orientation; /* warning: meaning of this variable depends
on the platform (Android, iOS, ...) */ | |
|
| OrtpZrtpContext *ortpZrtpContext; | | bool_t use_preview_window; | |
| srtp_t srtp_session; | | bool_t display_filter_auto_rotate_enabled; | |
| MSBitrateController *rc; | | bool_t prepare_ongoing; | |
| | | bool_t source_performs_encoding; | |
| | | bool_t output_performs_decoding; | |
| }; | | }; | |
| | | | |
| typedef struct _VideoStream VideoStream; | | typedef struct _VideoStream VideoStream; | |
| | | | |
|
| MS2_PUBLIC VideoStream *video_stream_new(int locport, bool_t use_ipv6); | | MS2_PUBLIC VideoStream *video_stream_new(int loc_rtp_port, int loc_rtcp_por
t, bool_t use_ipv6); | |
| MS2_PUBLIC void video_stream_set_direction(VideoStream *vs, VideoStreamDir
dir); | | MS2_PUBLIC void video_stream_set_direction(VideoStream *vs, VideoStreamDir
dir); | |
|
| MS2_PUBLIC void video_stream_enable_adaptive_bitrate_control(VideoStream *s | | static inline void video_stream_enable_adaptive_bitrate_control(VideoStream | |
| , bool_t yesno); | | *stream, bool_t enabled) { | |
| | | media_stream_enable_adaptive_bitrate_control(&stream->ms, enabled); | |
| | | } | |
| | | static inline void video_stream_enable_adaptive_jittcomp(VideoStream *strea | |
| | | m, bool_t enabled) { | |
| | | media_stream_enable_adaptive_jittcomp(&stream->ms, enabled); | |
| | | } | |
| MS2_PUBLIC void video_stream_set_render_callback(VideoStream *s, VideoStrea
mRenderCallback cb, void *user_pointer); | | MS2_PUBLIC void video_stream_set_render_callback(VideoStream *s, VideoStrea
mRenderCallback cb, void *user_pointer); | |
| MS2_PUBLIC void video_stream_set_event_callback(VideoStream *s, VideoStream
EventCallback cb, void *user_pointer); | | MS2_PUBLIC void video_stream_set_event_callback(VideoStream *s, VideoStream
EventCallback cb, void *user_pointer); | |
| MS2_PUBLIC void video_stream_set_display_filter_name(VideoStream *s, const
char *fname); | | MS2_PUBLIC void video_stream_set_display_filter_name(VideoStream *s, const
char *fname); | |
|
| MS2_PUBLIC int video_stream_start(VideoStream * stream, RtpProfile *profile
, const char *remip, int remport, int rem_rtcp_port, | | MS2_PUBLIC int video_stream_start(VideoStream * stream, RtpProfile *profile
, const char *rem_rtp_ip, int rem_rtp_port, const char *rem_rtcp_ip, int re
m_rtcp_port, | |
| int payload, int jitt_comp, MSWebCam *device); | | int payload, int jitt_comp, MSWebCam *device); | |
|
| | | MS2_PUBLIC void video_stream_prepare_video(VideoStream *stream); | |
| | | MS2_PUBLIC void video_stream_unprepare_video(VideoStream *stream); | |
| | | | |
| MS2_PUBLIC void video_stream_set_relay_session_id(VideoStream *stream, cons
t char *relay_session_id); | | MS2_PUBLIC void video_stream_set_relay_session_id(VideoStream *stream, cons
t char *relay_session_id); | |
|
| MS2_PUBLIC void video_stream_set_rtcp_information(VideoStream *st, const ch | | static inline void video_stream_set_rtcp_information(VideoStream *st, const | |
| ar *cname, const char *tool); | | char *cname, const char *tool) { | |
| | | media_stream_set_rtcp_information(&st->ms, cname, tool); | |
| | | } | |
| MS2_PUBLIC void video_stream_change_camera(VideoStream *stream, MSWebCam *c
am); | | MS2_PUBLIC void video_stream_change_camera(VideoStream *stream, MSWebCam *c
am); | |
| /* Calling video_stream_set_sent_video_size() or changing the bitrate value
in the used PayloadType during a stream is running does nothing. | | /* Calling video_stream_set_sent_video_size() or changing the bitrate value
in the used PayloadType during a stream is running does nothing. | |
| The following function allows to take into account new parameters by redraw
ing the sending graph*/ | | The following function allows to take into account new parameters by redraw
ing the sending graph*/ | |
| MS2_PUBLIC void video_stream_update_video_params(VideoStream *stream); | | MS2_PUBLIC void video_stream_update_video_params(VideoStream *stream); | |
| /*function to call periodically to handle various events */ | | /*function to call periodically to handle various events */ | |
| MS2_PUBLIC void video_stream_iterate(VideoStream *stream); | | MS2_PUBLIC void video_stream_iterate(VideoStream *stream); | |
| MS2_PUBLIC void video_stream_send_vfu(VideoStream *stream); | | MS2_PUBLIC void video_stream_send_vfu(VideoStream *stream); | |
| MS2_PUBLIC void video_stream_stop(VideoStream * stream); | | MS2_PUBLIC void video_stream_stop(VideoStream * stream); | |
| MS2_PUBLIC void video_stream_set_sent_video_size(VideoStream *stream, MSVid
eoSize vsize); | | MS2_PUBLIC void video_stream_set_sent_video_size(VideoStream *stream, MSVid
eoSize vsize); | |
| MS2_PUBLIC void video_stream_enable_self_view(VideoStream *stream, bool_t v
al); | | MS2_PUBLIC void video_stream_enable_self_view(VideoStream *stream, bool_t v
al); | |
| MS2_PUBLIC unsigned long video_stream_get_native_window_id(VideoStream *str
eam); | | MS2_PUBLIC unsigned long video_stream_get_native_window_id(VideoStream *str
eam); | |
| MS2_PUBLIC void video_stream_set_native_window_id(VideoStream *stream, unsi
gned long id); | | MS2_PUBLIC void video_stream_set_native_window_id(VideoStream *stream, unsi
gned long id); | |
| MS2_PUBLIC void video_stream_set_native_preview_window_id(VideoStream *stre
am, unsigned long id); | | MS2_PUBLIC void video_stream_set_native_preview_window_id(VideoStream *stre
am, unsigned long id); | |
| MS2_PUBLIC unsigned long video_stream_get_native_preview_window_id(VideoStr
eam *stream); | | MS2_PUBLIC unsigned long video_stream_get_native_preview_window_id(VideoStr
eam *stream); | |
| MS2_PUBLIC void video_stream_use_preview_video_window(VideoStream *stream,
bool_t yesno); | | MS2_PUBLIC void video_stream_use_preview_video_window(VideoStream *stream,
bool_t yesno); | |
| MS2_PUBLIC void video_stream_set_device_rotation(VideoStream *stream, int o
rientation); | | MS2_PUBLIC void video_stream_set_device_rotation(VideoStream *stream, int o
rientation); | |
| MS2_PUBLIC void video_stream_show_video(VideoStream *stream, bool_t show); | | MS2_PUBLIC void video_stream_show_video(VideoStream *stream, bool_t show); | |
| | | | |
|
| | | /** | |
| | | * @brief Gets the camera sensor rotation. | |
| | | * | |
| | | * This is needed on some mobile platforms to get the number of degrees the | |
| | | camera sensor | |
| | | * is rotated relative to the screen. | |
| | | * | |
| | | * @param stream The video stream related to the operation | |
| | | * @return The camera sensor rotation in degrees (0 to 360) or -1 if it cou | |
| | | ld not be retrieved | |
| | | */ | |
| | | MS2_PUBLIC int video_stream_get_camera_sensor_rotation(VideoStream *stream) | |
| | | ; | |
| | | | |
| /*provided for compatibility, use video_stream_set_direction() instead */ | | /*provided for compatibility, use video_stream_set_direction() instead */ | |
| MS2_PUBLIC int video_stream_recv_only_start(VideoStream *videostream, RtpPr
ofile *profile, const char *addr, int port, int used_pt, int jitt_comp); | | MS2_PUBLIC int video_stream_recv_only_start(VideoStream *videostream, RtpPr
ofile *profile, const char *addr, int port, int used_pt, int jitt_comp); | |
| MS2_PUBLIC int video_stream_send_only_start(VideoStream *videostream, | | MS2_PUBLIC int video_stream_send_only_start(VideoStream *videostream, | |
| RtpProfile *profile, const char *addr, int p
ort, int rtcp_port, | | RtpProfile *profile, const char *addr, int p
ort, int rtcp_port, | |
| int used_pt, int jitt_comp, MSWebCam *devic
e); | | int used_pt, int jitt_comp, MSWebCam *devic
e); | |
| MS2_PUBLIC void video_stream_recv_only_stop(VideoStream *vs); | | MS2_PUBLIC void video_stream_recv_only_stop(VideoStream *vs); | |
| MS2_PUBLIC void video_stream_send_only_stop(VideoStream *vs); | | MS2_PUBLIC void video_stream_send_only_stop(VideoStream *vs); | |
| | | | |
| /* enable ZRTP on the video stream using information from the audio stream
*/ | | /* enable ZRTP on the video stream using information from the audio stream
*/ | |
| MS2_PUBLIC void video_stream_enable_zrtp(VideoStream *vstream, AudioStream
*astream, OrtpZrtpParams *param); | | MS2_PUBLIC void video_stream_enable_zrtp(VideoStream *vstream, AudioStream
*astream, OrtpZrtpParams *param); | |
| | | | |
| /* enable SRTP on the video stream */ | | /* enable SRTP on the video stream */ | |
|
| MS2_PUBLIC bool_t video_stream_enable_strp(VideoStream* stream, enum ortp_s | | static inline bool_t video_stream_enable_strp(VideoStream* stream, enum ort | |
| rtp_crypto_suite_t suite, const char* snd_key, const char* rcv_key); | | p_srtp_crypto_suite_t suite, const char* snd_key, const char* rcv_key) { | |
| | | return media_stream_enable_srtp(&stream->ms, suite, snd_key, rcv_key | |
| | | ); | |
| | | } | |
| | | | |
| | | /* if enabled, the display filter will internaly rotate the video, accordin | |
| | | g to the device orientation */ | |
| | | MS2_PUBLIC void video_stream_enable_display_filter_auto_rotate(VideoStream* | |
| | | stream, bool_t enable); | |
| | | | |
| | | /* retrieve RTP statistics*/ | |
| | | static inline void video_stream_get_local_rtp_stats(VideoStream *stream, rt | |
| | | p_stats_t *stats) { | |
| | | media_stream_get_local_rtp_stats(&stream->ms, stats); | |
| | | } | |
| | | | |
| | | static inline int video_stream_set_dscp(VideoStream *stream, int dscp) { | |
| | | return media_stream_set_dscp(&stream->ms, dscp); | |
| | | } | |
| | | | |
| /** | | /** | |
| * Small API to display a local preview window. | | * Small API to display a local preview window. | |
| **/ | | **/ | |
| | | | |
| typedef VideoStream VideoPreview; | | typedef VideoStream VideoPreview; | |
| | | | |
| MS2_PUBLIC VideoPreview * video_preview_new(); | | MS2_PUBLIC VideoPreview * video_preview_new(); | |
| #define video_preview_set_size(p,s)
video_stream_set_sent_video_size(p,s) | | #define video_preview_set_size(p,s)
video_stream_set_sent_video_size(p,s) | |
| #define video_preview_set_display_filter_name(p,dt) video_stream_set_dis
play_filter_name(p,dt) | | #define video_preview_set_display_filter_name(p,dt) video_stream_set_dis
play_filter_name(p,dt) | |
| #define video_preview_set_native_window_id(p,id) video_stream
_set_native_preview_window_id (p,id) | | #define video_preview_set_native_window_id(p,id) video_stream
_set_native_preview_window_id (p,id) | |
| #define video_preview_get_native_window_id(p) video_stream
_get_native_preview_window_id (p) | | #define video_preview_get_native_window_id(p) video_stream
_get_native_preview_window_id (p) | |
| MS2_PUBLIC void video_preview_start(VideoPreview *stream, MSWebCam *device)
; | | MS2_PUBLIC void video_preview_start(VideoPreview *stream, MSWebCam *device)
; | |
| MS2_PUBLIC void video_preview_stop(VideoPreview *stream); | | MS2_PUBLIC void video_preview_stop(VideoPreview *stream); | |
| | | | |
|
| | | /** | |
| | | * @} | |
| | | **/ | |
| | | | |
| MS2_PUBLIC bool_t ms_is_ipv6(const char *address); | | MS2_PUBLIC bool_t ms_is_ipv6(const char *address); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
|
| /** | | | |
| * @} | | | |
| **/ | | | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 35 change blocks. |
| 84 lines changed or deleted | | 245 lines changed or added | |
|
| msfilter.h | | msfilter.h | |
| | | | |
| skipping to change at line 83 | | skipping to change at line 83 | |
| /** | | /** | |
| * Filter's category | | * Filter's category | |
| * | | * | |
| */ | | */ | |
| enum _MSFilterCategory{ | | enum _MSFilterCategory{ | |
| /**others*/ | | /**others*/ | |
| MS_FILTER_OTHER, | | MS_FILTER_OTHER, | |
| /**used by encoders*/ | | /**used by encoders*/ | |
| MS_FILTER_ENCODER, | | MS_FILTER_ENCODER, | |
| /**used by decoders*/ | | /**used by decoders*/ | |
|
| MS_FILTER_DECODER | | MS_FILTER_DECODER, | |
| | | /**used by capture filters that perform encoding*/ | |
| | | MS_FILTER_ENCODING_CAPTURER, | |
| | | /**used by render filters that perform decoding*/ | |
| | | MS_FILTER_DECODING_RENDERER | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * Structure to describe filter's category. | | * Structure to describe filter's category. | |
| * <PRE> | | * <PRE> | |
| * MS_FILTER_OTHER | | * MS_FILTER_OTHER | |
| * MS_FILTER_ENCODER | | * MS_FILTER_ENCODER | |
| * MS_FILTER_DECODER | | * MS_FILTER_DECODER | |
|
| | | * MS_FILTER_ENCODING_CAPTURER | |
| | | * MS_FILTER_DECODING_RENDERER | |
| * </PRE> | | * </PRE> | |
| * @var MSFilterCategory | | * @var MSFilterCategory | |
| */ | | */ | |
| typedef enum _MSFilterCategory MSFilterCategory; | | typedef enum _MSFilterCategory MSFilterCategory; | |
| | | | |
|
| | | /** | |
| | | * Filter's flags controlling special behaviours. | |
| | | **/ | |
| enum _MSFilterFlags{ | | enum _MSFilterFlags{ | |
|
| MS_FILTER_IS_PUMP = 1 | | MS_FILTER_IS_PUMP = 1 /**< The filter must be called in process func
tion every tick.*/ | |
| }; | | }; | |
| | | | |
|
| | | /** | |
| | | * Filter's flags controlling special behaviours. | |
| | | **/ | |
| typedef enum _MSFilterFlags MSFilterFlags; | | typedef enum _MSFilterFlags MSFilterFlags; | |
| | | | |
| struct _MSFilterStats{ | | struct _MSFilterStats{ | |
| const char *name; /*<filter name*/ | | const char *name; /*<filter name*/ | |
| uint64_t elapsed; /*<cumulative number of nanoseconds elapsed */ | | uint64_t elapsed; /*<cumulative number of nanoseconds elapsed */ | |
| unsigned int count; /*<number of time the filter is called for proce
ssing*/ | | unsigned int count; /*<number of time the filter is called for proce
ssing*/ | |
| }; | | }; | |
| | | | |
| typedef struct _MSFilterStats MSFilterStats; | | typedef struct _MSFilterStats MSFilterStats; | |
| | | | |
| struct _MSFilterDesc{ | | struct _MSFilterDesc{ | |
|
| MSFilterId id; /* the id declared in allfilters.h */ | | MSFilterId id; /**< the id declared in allfilters.h */ | |
| const char *name; /* filter name */ | | const char *name; /**< the filter name*/ | |
| const char *text; /*some descriptive text*/ | | const char *text; /**< short text describing the filter's function*/ | |
| MSFilterCategory category; | | MSFilterCategory category; /**< filter's category*/ | |
| const char *enc_fmt; /* must be set if MS_FILTER_ENCODER/MS_FILTER_D | | const char *enc_fmt; /**< sub-mime of the format, must be set if cat | |
| ECODER */ | | egory is MS_FILTER_ENCODER or MS_FILTER_DECODER */ | |
| int ninputs; /*number of inputs */ | | int ninputs; /**< number of inputs */ | |
| int noutputs; /*number of outputs */ | | int noutputs; /**< number of outputs */ | |
| MSFilterFunc init; | | MSFilterFunc init; /**< Filter's init function*/ | |
| MSFilterFunc preprocess; /* called once before processing */ | | MSFilterFunc preprocess; /**< Filter's preprocess function, called o | |
| MSFilterFunc process; /* called every tick to do the filte | | ne time before starting to process*/ | |
| r's job*/ | | MSFilterFunc process; /**< Filter's process function, called every t | |
| MSFilterFunc postprocess; /*called once after processing */ | | ick by the MSTicker to do the filter's job*/ | |
| MSFilterFunc uninit; | | MSFilterFunc postprocess; /**< Filter's postprocess function, called | |
| MSFilterMethod *methods; | | once after processing (the filter is no longer called in process() after)* | |
| unsigned int flags; | | / | |
| | | MSFilterFunc uninit; /**< Filter's uninit function, used to dealloca | |
| | | te internal structures*/ | |
| | | MSFilterMethod *methods; /**<Filter's method table*/ | |
| | | unsigned int flags; /**<Filter's special flags, from the MSFilterFla | |
| | | gs enum.*/ | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * Structure for filter's description. | | * Structure for filter's description. | |
| * @var MSFilterDesc | | * @var MSFilterDesc | |
| */ | | */ | |
| typedef struct _MSFilterDesc MSFilterDesc; | | typedef struct _MSFilterDesc MSFilterDesc; | |
| | | | |
| struct _MSFilter{ | | struct _MSFilter{ | |
|
| MSFilterDesc *desc; | | MSFilterDesc *desc; /**<Back pointer to filter's descriptor.*/ | |
| /*protected attributes */ | | /*protected attributes */ | |
| ms_mutex_t lock; | | ms_mutex_t lock; | |
|
| MSQueue **inputs; | | MSQueue **inputs; /**<Table of input queues.*/ | |
| MSQueue **outputs; | | MSQueue **outputs;/**<Table of output queues */ | |
| MSFilterNotifyFunc notify; | | MSFilterNotifyFunc notify; | |
| void *notify_ud; | | void *notify_ud; | |
|
| void *data; | | void *data; /**<Pointer used by the filter for internal state and co | |
| struct _MSTicker *ticker; | | mputations.*/ | |
| | | struct _MSTicker *ticker; /**<Pointer to the ticker object. It is no | |
| | | t NULL when being called process()*/ | |
| /*private attributes */ | | /*private attributes */ | |
| uint32_t last_tick; | | uint32_t last_tick; | |
| MSFilterStats *stats; | | MSFilterStats *stats; | |
|
| | | int postponed_task; /*number of postponed tasks*/ | |
| bool_t seen; | | bool_t seen; | |
| }; | | }; | |
| | | | |
| /** | | /** | |
|
| * Structure to create/link/unlink/destroy filter's object. | | * Structure of filter's object. | |
| * @var MSFilter | | * @var MSFilter | |
| */ | | */ | |
| typedef struct _MSFilter MSFilter; | | typedef struct _MSFilter MSFilter; | |
| | | | |
| struct _MSConnectionPoint{ | | struct _MSConnectionPoint{ | |
|
| MSFilter *filter; | | MSFilter *filter; /**<Pointer to filter*/ | |
| int pin; | | int pin; /**<Pin index on the filter*/ | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * Structure that represents a connection point of a MSFilter | | * Structure that represents a connection point of a MSFilter | |
| * @var MSConnectionPoint | | * @var MSConnectionPoint | |
| */ | | */ | |
| typedef struct _MSConnectionPoint MSConnectionPoint; | | typedef struct _MSConnectionPoint MSConnectionPoint; | |
| | | | |
| struct _MSConnectionHelper{ | | struct _MSConnectionHelper{ | |
| MSConnectionPoint last; | | MSConnectionPoint last; | |
| | | | |
| skipping to change at line 200 | | skipping to change at line 213 | |
| * ms_filter_create_encoder, ms_filter_create_decoder | | * ms_filter_create_encoder, ms_filter_create_decoder | |
| * and ms_filter_codec_supported | | * and ms_filter_codec_supported | |
| * can then be used as if the codec was internally. | | * can then be used as if the codec was internally. | |
| * supported. | | * supported. | |
| * | | * | |
| * @param desc a filter description. | | * @param desc a filter description. | |
| */ | | */ | |
| MS2_PUBLIC void ms_filter_register(MSFilterDesc *desc); | | MS2_PUBLIC void ms_filter_register(MSFilterDesc *desc); | |
| | | | |
| /** | | /** | |
|
| | | * Retrieve capture filter that supports encoding to codec name. | |
| | | * | |
| | | * @param mime A string indicating the codec. | |
| | | * | |
| | | * Returns: a MSFilterDesc if successfull, NULL otherwise. | |
| | | */ | |
| | | MS2_PUBLIC MSFilterDesc * ms_filter_get_encoding_capturer(const char *mime) | |
| | | ; | |
| | | | |
| | | /** | |
| | | * Retrieve render filter that supports decoding to codec name. | |
| | | * | |
| | | * @param mime A string indicating the codec. | |
| | | * | |
| | | * Returns: a MSFilterDesc if successfull, NULL otherwise. | |
| | | */ | |
| | | MS2_PUBLIC MSFilterDesc * ms_filter_get_decoding_renderer(const char *mime) | |
| | | ; | |
| | | | |
| | | /** | |
| * Retrieve encoders according to codec name. | | * Retrieve encoders according to codec name. | |
| * | | * | |
| * Internal supported codecs: | | * Internal supported codecs: | |
| * PCMU, PCMA, speex, gsm | | * PCMU, PCMA, speex, gsm | |
| * Existing Public plugins: | | * Existing Public plugins: | |
| * iLBC | | * iLBC | |
| * | | * | |
| * @param mime A string indicating the codec. | | * @param mime A string indicating the codec. | |
| * | | * | |
| * Returns: a MSFilterDesc if successfull, NULL otherwise. | | * Returns: a MSFilterDesc if successfull, NULL otherwise. | |
| | | | |
| skipping to change at line 488 | | skipping to change at line 519 | |
| * | | * | |
| **/ | | **/ | |
| MS2_PUBLIC void ms_filter_log_statistics(void); | | MS2_PUBLIC void ms_filter_log_statistics(void); | |
| | | | |
| /* I define the id taking the lower bits of the address of the MSFilterDesc
object, | | /* I define the id taking the lower bits of the address of the MSFilterDesc
object, | |
| the method index (_cnt_) and the argument size */ | | the method index (_cnt_) and the argument size */ | |
| /* I hope using this to avoid type mismatch (calling a method on the wrong
filter)*/ | | /* I hope using this to avoid type mismatch (calling a method on the wrong
filter)*/ | |
| #define MS_FILTER_METHOD_ID(_id_,_cnt_,_argsize_) \ | | #define MS_FILTER_METHOD_ID(_id_,_cnt_,_argsize_) \ | |
| ( (((unsigned long)(_id_)) & 0xFFFF)<<16 | (_cnt_<<8) | (_argsize_
& 0xFF )) | | ( (((unsigned long)(_id_)) & 0xFFFF)<<16 | (_cnt_<<8) | (_argsize_
& 0xFF )) | |
| | | | |
|
| | | /** | |
| | | * Macro to create a method id, unique per filter. | |
| | | * First argument shall be the filter's ID (MSFilterId) or interface ID (MS | |
| | | FilterInterfaceId). | |
| | | * Second argument is the method index within the context of the filter. It | |
| | | should start from 0 and increment for each new method. | |
| | | * Third argument is the argument type of the method, for example "int", "f | |
| | | loat" or any structure. | |
| | | **/ | |
| #define MS_FILTER_METHOD(_id_,_count_,_argtype_) \ | | #define MS_FILTER_METHOD(_id_,_count_,_argtype_) \ | |
| MS_FILTER_METHOD_ID(_id_,_count_,sizeof(_argtype_)) | | MS_FILTER_METHOD_ID(_id_,_count_,sizeof(_argtype_)) | |
| | | | |
|
| | | /** | |
| | | * Same as MS_FILTER_METHOD, but for method that do not take any argument. | |
| | | **/ | |
| #define MS_FILTER_METHOD_NO_ARG(_id_,_count_) \ | | #define MS_FILTER_METHOD_NO_ARG(_id_,_count_) \ | |
| MS_FILTER_METHOD_ID(_id_,_count_,0) | | MS_FILTER_METHOD_ID(_id_,_count_,0) | |
| | | | |
| #define MS_FILTER_BASE_METHOD(_count_,_argtype_) \ | | #define MS_FILTER_BASE_METHOD(_count_,_argtype_) \ | |
| MS_FILTER_METHOD_ID(MS_FILTER_BASE_ID,_count_,sizeof(_argtype_)) | | MS_FILTER_METHOD_ID(MS_FILTER_BASE_ID,_count_,sizeof(_argtype_)) | |
| | | | |
| #define MS_FILTER_BASE_METHOD_NO_ARG(_count_) \ | | #define MS_FILTER_BASE_METHOD_NO_ARG(_count_) \ | |
| MS_FILTER_METHOD_ID(MS_FILTER_BASE_ID,_count_,0) | | MS_FILTER_METHOD_ID(MS_FILTER_BASE_ID,_count_,0) | |
| | | | |
| #define MS_FILTER_EVENT(_id_,_count_,_argtype_) \ | | #define MS_FILTER_EVENT(_id_,_count_,_argtype_) \ | |
| | | | |
| skipping to change at line 539 | | skipping to change at line 579 | |
| * Set codec dependent attributes as taken from the SDP | | * Set codec dependent attributes as taken from the SDP | |
| */ | | */ | |
| #define MS_FILTER_ADD_FMTP MS_FILTER_BASE_METHOD(7,const char) | | #define MS_FILTER_ADD_FMTP MS_FILTER_BASE_METHOD(7,const char) | |
| | | | |
| #define MS_FILTER_ADD_ATTR MS_FILTER_BASE_METHOD(8,const char) | | #define MS_FILTER_ADD_ATTR MS_FILTER_BASE_METHOD(8,const char) | |
| #define MS_FILTER_SET_MTU MS_FILTER_BASE_METHOD(9,int) | | #define MS_FILTER_SET_MTU MS_FILTER_BASE_METHOD(9,int) | |
| #define MS_FILTER_GET_MTU MS_FILTER_BASE_METHOD(10,int) | | #define MS_FILTER_GET_MTU MS_FILTER_BASE_METHOD(10,int) | |
| /**Filters can return their latency in milliseconds (if known) using this m
ethod:*/ | | /**Filters can return their latency in milliseconds (if known) using this m
ethod:*/ | |
| #define MS_FILTER_GET_LATENCY MS_FILTER_BASE_METHOD(11,int) | | #define MS_FILTER_GET_LATENCY MS_FILTER_BASE_METHOD(11,int) | |
| | | | |
|
| | | /** | |
| | | * Interface IDs, used to generate method names (see MS_FILTER_METHOD macro | |
| | | ). | |
| | | * The purpose of these interfaces is to allow different filter implementat | |
| | | ions to share the same methods, by implementing the method definitions for | |
| | | these interfaces. | |
| | | * For example every video encoder implementation would need a method to re | |
| | | quest the generation of a key frame. Instead of having each implementation | |
| | | defining its own method to do this, | |
| | | * each implementation can just implement the MS_VIDEO_ENCODER_REQ_VFU meth | |
| | | od of the MSFilterVideoEncoderInterface. | |
| | | **/ | |
| enum _MSFilterInterfaceId{ | | enum _MSFilterInterfaceId{ | |
| MSFilterInterfaceBegin=16384, | | MSFilterInterfaceBegin=16384, | |
|
| MSFilterPlayerInterface, | | MSFilterPlayerInterface, /**<Player interface, used to control playi | |
| MSFilterRecorderInterface, | | ng of files.*/ | |
| MSFilterVideoDisplayInterface, | | MSFilterRecorderInterface,/**<Recorder interface, used to control re | |
| MSFilterEchoCancellerInterface, | | cording of stream into files.*/ | |
| MSFilterVideoDecoderInterface, | | MSFilterVideoDisplayInterface,/**<Video display interface, used to c | |
| MSFilterVideoCaptureInterface, | | ontrol the rendering of raw pictures onscreen.*/ | |
| | | MSFilterEchoCancellerInterface,/**Echo canceller interface, used to | |
| | | control echo canceller implementations.*/ | |
| | | MSFilterVideoDecoderInterface,/**<Video decoder interface*/ | |
| | | MSFilterVideoCaptureInterface,/**<Video capture interface*/ | |
| | | MSFilterAudioDecoderInterface,/**<Audio Decoder interface*/ | |
| | | MSFilterVideoEncoderInterface,/**<Video encoder interface*/ | |
| | | MSFilterAudioCaptureInterface,/**<Interface for audio capture filter | |
| | | s*/ | |
| | | MSFilterAudioPlaybackInterface,/**Interface for audio playback filte | |
| | | rs.*/ | |
| | | MSFilterAudioEncoderInterface,/**<Video encoder interface*/ | |
| }; | | }; | |
| | | | |
|
| | | /** | |
| | | * Interface IDs, used to generate method names (see MS_FILTER_METHOD macro | |
| | | ). | |
| | | * | |
| | | **/ | |
| typedef enum _MSFilterInterfaceId MSFilterInterfaceId; | | typedef enum _MSFilterInterfaceId MSFilterInterfaceId; | |
| | | | |
| /* more specific methods: to be moved into implementation specific header f
iles*/ | | /* more specific methods: to be moved into implementation specific header f
iles*/ | |
| #define MS_FILTER_SET_FILTERLENGTH MS_FILTER_BASE_METHOD(12,int) | | #define MS_FILTER_SET_FILTERLENGTH MS_FILTER_BASE_METHOD(12,int) | |
| #define MS_FILTER_SET_OUTPUT_SAMPLE_RATE MS_FILTER_BASE_METHOD(13,int) | | #define MS_FILTER_SET_OUTPUT_SAMPLE_RATE MS_FILTER_BASE_METHOD(13,int) | |
| #define MS_FILTER_ENABLE_DIRECTMODE MS_FILTER_BASE_METHOD(14,int) | | #define MS_FILTER_ENABLE_DIRECTMODE MS_FILTER_BASE_METHOD(14,int) | |
| #define MS_FILTER_ENABLE_VAD MS_FILTER_BASE_METHOD(15,int) | | #define MS_FILTER_ENABLE_VAD MS_FILTER_BASE_METHOD(15,int) | |
| #define MS_FILTER_GET_STAT_DISCARDED MS_FILTER_BASE_METHOD(16,int) | | #define MS_FILTER_GET_STAT_DISCARDED MS_FILTER_BASE_METHOD(16,int) | |
| #define MS_FILTER_GET_STAT_MISSED MS_FILTER_BASE_METHOD(17,int) | | #define MS_FILTER_GET_STAT_MISSED MS_FILTER_BASE_METHOD(17,int) | |
| #define MS_FILTER_GET_STAT_INPUT MS_FILTER_BASE_METHOD(18,int) | | #define MS_FILTER_GET_STAT_INPUT MS_FILTER_BASE_METHOD(18,int) | |
| #define MS_FILTER_GET_STAT_OUTPUT MS_FILTER_BASE_METHOD(19,int) | | #define MS_FILTER_GET_STAT_OUTPUT MS_FILTER_BASE_METHOD(19,int) | |
| #define MS_FILTER_ENABLE_AGC MS_FILTER_BASE_METHOD(20,int) | | #define MS_FILTER_ENABLE_AGC MS_FILTER_BASE_METHOD(20,int) | |
| #define MS_FILTER_SET_PLAYBACKDELAY MS_FILTER_BASE_METHOD(21,int) | | #define MS_FILTER_SET_PLAYBACKDELAY MS_FILTER_BASE_METHOD(21,int) | |
| #define MS_FILTER_ENABLE_HALFDUPLEX MS_FILTER_BASE_METHOD(22,int) | | #define MS_FILTER_ENABLE_HALFDUPLEX MS_FILTER_BASE_METHOD(22,int) | |
| #define MS_FILTER_SET_VAD_PROB_START MS_FILTER_BASE_METHOD(23,int) | | #define MS_FILTER_SET_VAD_PROB_START MS_FILTER_BASE_METHOD(23,int) | |
| #define MS_FILTER_SET_VAD_PROB_CONTINUE MS_FILTER_BASE_METHOD(24,int) | | #define MS_FILTER_SET_VAD_PROB_CONTINUE MS_FILTER_BASE_METHOD(24,int) | |
| #define MS_FILTER_SET_MAX_GAIN MS_FILTER_BASE_METHOD(25,int) | | #define MS_FILTER_SET_MAX_GAIN MS_FILTER_BASE_METHOD(25,int) | |
| #define MS_VIDEO_CAPTURE_SET_AUTOFOCUS MS_FILTER_BASE_METHOD(26,int) | | #define MS_VIDEO_CAPTURE_SET_AUTOFOCUS MS_FILTER_BASE_METHOD(26,int) | |
| /* pass value of type MSRtpPayloadPickerContext copied by the filter*/ | | /* pass value of type MSRtpPayloadPickerContext copied by the filter*/ | |
| #define MS_FILTER_SET_RTP_PAYLOAD_PICKER MS_FILTER_BASE_METHOD(27,void*) | | #define MS_FILTER_SET_RTP_PAYLOAD_PICKER MS_FILTER_BASE_METHOD(27,void*) | |
|
| | | #define MS_FILTER_SET_OUTPUT_NCHANNELS MS_FILTER_BASE_METHOD(28,int) | |
| | | | |
| #define MS_CONF_SPEEX_PREPROCESS_MIC MS_FILTER_EVENT(MS_CONF_ID, 1, void*
) | | #define MS_CONF_SPEEX_PREPROCESS_MIC MS_FILTER_EVENT(MS_CONF_ID, 1, void*
) | |
| #define MS_CONF_CHANNEL_VOLUME MS_FILTER_EVENT(MS_CONF_ID, 3, void*) | | #define MS_CONF_CHANNEL_VOLUME MS_FILTER_EVENT(MS_CONF_ID, 3, void*) | |
| | | | |
| /** @} */ | | /** @} */ | |
| | | | |
| /*protected/ private methods*/ | | /*protected/ private methods*/ | |
| void ms_filter_process(MSFilter *f); | | void ms_filter_process(MSFilter *f); | |
| void ms_filter_preprocess(MSFilter *f, struct _MSTicker *t); | | void ms_filter_preprocess(MSFilter *f, struct _MSTicker *t); | |
| void ms_filter_postprocess(MSFilter *f); | | void ms_filter_postprocess(MSFilter *f); | |
| bool_t ms_filter_inputs_have_data(MSFilter *f); | | bool_t ms_filter_inputs_have_data(MSFilter *f); | |
| void ms_filter_notify(MSFilter *f, unsigned int id, void *arg); | | void ms_filter_notify(MSFilter *f, unsigned int id, void *arg); | |
| void ms_filter_notify_synchronous(MSFilter *f, unsigned int id, void *arg); | | void ms_filter_notify_synchronous(MSFilter *f, unsigned int id, void *arg); | |
| void ms_filter_notify_no_arg(MSFilter *f, unsigned int id); | | void ms_filter_notify_no_arg(MSFilter *f, unsigned int id); | |
| #define ms_filter_lock(f) ms_mutex_lock(&(f)->lock) | | #define ms_filter_lock(f) ms_mutex_lock(&(f)->lock) | |
| #define ms_filter_unlock(f) ms_mutex_unlock(&(f)->lock) | | #define ms_filter_unlock(f) ms_mutex_unlock(&(f)->lock) | |
| void ms_filter_unregister_all(void); | | void ms_filter_unregister_all(void); | |
| | | | |
|
| | | struct _MSFilterTask{ | |
| | | MSFilter *f; | |
| | | MSFilterFunc taskfunc; | |
| | | }; | |
| | | typedef struct _MSFilterTask MSFilterTask; | |
| | | void ms_filter_task_process(MSFilterTask *task); | |
| | | | |
| | | /** | |
| | | * Allow a filter to request the ticker to call him the tick after. | |
| | | * The ticker will call the taskfunc prior to all filter's process func. | |
| | | **/ | |
| | | void ms_filter_postpone_task(MSFilter *f, MSFilterFunc taskfunc); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #include "msinterfaces.h" | | #include "msinterfaces.h" | |
| | | | |
| /* used by awk script in Makefile.am to generate alldescs.c */ | | /* used by awk script in Makefile.am to generate alldescs.c */ | |
| #define MS_FILTER_DESC_EXPORT(desc) | | #define MS_FILTER_DESC_EXPORT(desc) | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 20 change blocks. |
| 32 lines changed or deleted | | 126 lines changed or added | |
|
| rtpsession.h | | rtpsession.h | |
| | | | |
| skipping to change at line 35 | | skipping to change at line 35 | |
| * local and remote network addresses and a payload type is given, it let y
ou send | | * local and remote network addresses and a payload type is given, it let y
ou send | |
| * and recv a media stream. | | * and recv a media stream. | |
| **/ | | **/ | |
| | | | |
| #ifndef RTPSESSION_H | | #ifndef RTPSESSION_H | |
| #define RTPSESSION_H | | #define RTPSESSION_H | |
| | | | |
| #include <ortp/port.h> | | #include <ortp/port.h> | |
| #include <ortp/rtp.h> | | #include <ortp/rtp.h> | |
| #include <ortp/payloadtype.h> | | #include <ortp/payloadtype.h> | |
|
| | | #include <ortp/rtpprofile.h> | |
| #include <ortp/sessionset.h> | | #include <ortp/sessionset.h> | |
| #include <ortp/rtcp.h> | | #include <ortp/rtcp.h> | |
| #include <ortp/str_utils.h> | | #include <ortp/str_utils.h> | |
| #include <ortp/rtpsignaltable.h> | | #include <ortp/rtpsignaltable.h> | |
| #include <ortp/event.h> | | #include <ortp/event.h> | |
| | | | |
| typedef enum { | | typedef enum { | |
| RTP_SESSION_RECVONLY, | | RTP_SESSION_RECVONLY, | |
| RTP_SESSION_SENDONLY, | | RTP_SESSION_SENDONLY, | |
| RTP_SESSION_SENDRECV | | RTP_SESSION_SENDRECV | |
| | | | |
| skipping to change at line 60 | | skipping to change at line 61 | |
| int min_size; /**< in milliseconds*/ | | int min_size; /**< in milliseconds*/ | |
| int nom_size; /**< idem */ | | int nom_size; /**< idem */ | |
| int max_size; /**< idem */ | | int max_size; /**< idem */ | |
| bool_t adaptive; | | bool_t adaptive; | |
| bool_t pad[3]; | | bool_t pad[3]; | |
| int max_packets; /**< max number of packets allowed to be queued in
the jitter buffer */ | | int max_packets; /**< max number of packets allowed to be queued in
the jitter buffer */ | |
| } JBParameters; | | } JBParameters; | |
| | | | |
| typedef struct _JitterControl | | typedef struct _JitterControl | |
| { | | { | |
|
| int count; | | unsigned int count; | |
| int jitt_comp; /* the user jitt_comp in miliseconds*/ | | int jitt_comp; /* the user jitt_comp in miliseconds*/ | |
| int jitt_comp_ts; /* the jitt_comp converted in rtp time (same unit
as timestamp) */ | | int jitt_comp_ts; /* the jitt_comp converted in rtp time (same unit
as timestamp) */ | |
| int adapt_jitt_comp_ts; | | int adapt_jitt_comp_ts; | |
| int64_t slide; | | int64_t slide; | |
| int64_t prev_slide; | | int64_t prev_slide; | |
| float jitter; | | float jitter; | |
| int olddiff; | | int olddiff; | |
| float inter_jitter; /* interarrival jitter as defined in the RFC
*/ | | float inter_jitter; /* interarrival jitter as defined in the RFC
*/ | |
| int corrective_step; | | int corrective_step; | |
| int corrective_slide; | | int corrective_slide; | |
|
| | | uint64_t cum_jitter_buffer_size; /*in timestamp units*/ | |
| | | unsigned int cum_jitter_buffer_count; /*used for computation of jitt | |
| | | er buffer size*/ | |
| | | int clock_rate; | |
| bool_t adaptive; | | bool_t adaptive; | |
| bool_t enabled; | | bool_t enabled; | |
| } JitterControl; | | } JitterControl; | |
| | | | |
| typedef struct _WaitPoint | | typedef struct _WaitPoint | |
| { | | { | |
| ortp_mutex_t lock; | | ortp_mutex_t lock; | |
| ortp_cond_t cond; | | ortp_cond_t cond; | |
| uint32_t time; | | uint32_t time; | |
| bool_t wakeup; | | bool_t wakeup; | |
| | | | |
| skipping to change at line 165 | | skipping to change at line 169 | |
| int ssrc_changed_thres; | | int ssrc_changed_thres; | |
| jitter_stats_t jitter_stats; | | jitter_stats_t jitter_stats; | |
| }RtpStream; | | }RtpStream; | |
| | | | |
| typedef struct _RtcpStream | | typedef struct _RtcpStream | |
| { | | { | |
| ortp_socket_t socket; | | ortp_socket_t socket; | |
| int sockfamily; | | int sockfamily; | |
| struct _RtpTransport *tr; | | struct _RtpTransport *tr; | |
| mblk_t *cached_mp; | | mblk_t *cached_mp; | |
|
| | | int loc_port; | |
| #ifdef ORTP_INET6 | | #ifdef ORTP_INET6 | |
| struct sockaddr_storage rem_addr; | | struct sockaddr_storage rem_addr; | |
| #else | | #else | |
| struct sockaddr_in rem_addr; | | struct sockaddr_in rem_addr; | |
| #endif | | #endif | |
| int rem_addrlen; | | int rem_addrlen; | |
| int interval; | | int interval; | |
| uint32_t last_rtcp_report_snt_r; /* the time of the last rtcp
report sent, in recv timestamp unit */ | | uint32_t last_rtcp_report_snt_r; /* the time of the last rtcp
report sent, in recv timestamp unit */ | |
| uint32_t last_rtcp_report_snt_s; /* the time of the last rtcp
report sent, in send timestamp unit */ | | uint32_t last_rtcp_report_snt_s; /* the time of the last rtcp
report sent, in send timestamp unit */ | |
| uint32_t rtcp_report_snt_interval_r; /* the interval in timestamp un
it for receive path between rtcp report sent */ | | uint32_t rtcp_report_snt_interval_r; /* the interval in timestamp un
it for receive path between rtcp report sent */ | |
| | | | |
| skipping to change at line 239 | | skipping to change at line 244 | |
| queue_t contributing_sources; | | queue_t contributing_sources; | |
| unsigned int lost_packets_test_vector; | | unsigned int lost_packets_test_vector; | |
| unsigned int interarrival_jitter_test_vector; | | unsigned int interarrival_jitter_test_vector; | |
| unsigned int delay_test_vector; | | unsigned int delay_test_vector; | |
| float rtt;/*last round trip delay calculated*/ | | float rtt;/*last round trip delay calculated*/ | |
| OrtpNetworkSimulatorCtx *net_sim_ctx; | | OrtpNetworkSimulatorCtx *net_sim_ctx; | |
| bool_t symmetric_rtp; | | bool_t symmetric_rtp; | |
| bool_t permissive; /*use the permissive algorithm*/ | | bool_t permissive; /*use the permissive algorithm*/ | |
| bool_t use_connect; /* use connect() on the socket */ | | bool_t use_connect; /* use connect() on the socket */ | |
| bool_t ssrc_set; | | bool_t ssrc_set; | |
|
| | | bool_t reuseaddr; /*setsockopt SO_REUSEADDR */ | |
| }; | | }; | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" | | extern "C" | |
| { | | { | |
| #endif | | #endif | |
| | | | |
| /* public API */ | | /* public API */ | |
|
| RtpSession *rtp_session_new(int mode); | | ORTP_PUBLIC RtpSession *rtp_session_new(int mode); | |
| void rtp_session_set_scheduling_mode(RtpSession *session, int yesno); | | ORTP_PUBLIC void rtp_session_set_scheduling_mode(RtpSession *session, int y | |
| void rtp_session_set_blocking_mode(RtpSession *session, int yesno); | | esno); | |
| void rtp_session_set_profile(RtpSession *session, RtpProfile *profile); | | ORTP_PUBLIC void rtp_session_set_blocking_mode(RtpSession *session, int yes | |
| void rtp_session_set_send_profile(RtpSession *session,RtpProfile *profile); | | no); | |
| void rtp_session_set_recv_profile(RtpSession *session,RtpProfile *profile); | | ORTP_PUBLIC void rtp_session_set_profile(RtpSession *session, RtpProfile *p | |
| RtpProfile *rtp_session_get_profile(RtpSession *session); | | rofile); | |
| RtpProfile *rtp_session_get_send_profile(RtpSession *session); | | ORTP_PUBLIC void rtp_session_set_send_profile(RtpSession *session,RtpProfil | |
| RtpProfile *rtp_session_get_recv_profile(RtpSession *session); | | e *profile); | |
| int rtp_session_signal_connect(RtpSession *session,const char *signal_name, | | ORTP_PUBLIC void rtp_session_set_recv_profile(RtpSession *session,RtpProfil | |
| RtpCallback cb, unsigned long user_data); | | e *profile); | |
| int rtp_session_signal_disconnect_by_callback(RtpSession *session,const cha | | ORTP_PUBLIC RtpProfile *rtp_session_get_profile(RtpSession *session); | |
| r *signal_name, RtpCallback cb); | | ORTP_PUBLIC RtpProfile *rtp_session_get_send_profile(RtpSession *session); | |
| void rtp_session_set_ssrc(RtpSession *session, uint32_t ssrc); | | ORTP_PUBLIC RtpProfile *rtp_session_get_recv_profile(RtpSession *session); | |
| uint32_t rtp_session_get_send_ssrc(RtpSession* session); | | ORTP_PUBLIC int rtp_session_signal_connect(RtpSession *session,const char * | |
| void rtp_session_set_seq_number(RtpSession *session, uint16_t seq); | | signal_name, RtpCallback cb, unsigned long user_data); | |
| uint16_t rtp_session_get_seq_number(RtpSession *session); | | ORTP_PUBLIC int rtp_session_signal_disconnect_by_callback(RtpSession *sessi | |
| | | on,const char *signal_name, RtpCallback cb); | |
| void rtp_session_enable_jitter_buffer(RtpSession *session , bool_t enabled) | | ORTP_PUBLIC void rtp_session_set_ssrc(RtpSession *session, uint32_t ssrc); | |
| ; | | ORTP_PUBLIC uint32_t rtp_session_get_send_ssrc(RtpSession* session); | |
| bool_t rtp_session_jitter_buffer_enabled(const RtpSession *session); | | ORTP_PUBLIC uint32_t rtp_session_get_recv_ssrc(RtpSession *session); | |
| void rtp_session_set_jitter_buffer_params(RtpSession *session, const JBPara | | ORTP_PUBLIC void rtp_session_set_seq_number(RtpSession *session, uint16_t s | |
| meters *par); | | eq); | |
| void rtp_session_get_jitter_buffer_params(RtpSession *session, JBParameters | | ORTP_PUBLIC uint16_t rtp_session_get_seq_number(RtpSession *session); | |
| *par); | | ORTP_PUBLIC uint32_t rtp_session_get_rcv_ext_seq_number(RtpSession *session | |
| | | ); | |
| | | | |
| | | ORTP_PUBLIC void rtp_session_enable_jitter_buffer(RtpSession *session , boo | |
| | | l_t enabled); | |
| | | ORTP_PUBLIC bool_t rtp_session_jitter_buffer_enabled(const RtpSession *sess | |
| | | ion); | |
| | | ORTP_PUBLIC void rtp_session_set_jitter_buffer_params(RtpSession *session, | |
| | | const JBParameters *par); | |
| | | ORTP_PUBLIC void rtp_session_get_jitter_buffer_params(RtpSession *session, | |
| | | JBParameters *par); | |
| | | | |
| /*deprecated jitter control functions*/ | | /*deprecated jitter control functions*/ | |
|
| void rtp_session_set_jitter_compensation(RtpSession *session, int milisec); | | ORTP_PUBLIC void rtp_session_set_jitter_compensation(RtpSession *session, i | |
| void rtp_session_enable_adaptive_jitter_compensation(RtpSession *session, b | | nt milisec); | |
| ool_t val); | | ORTP_PUBLIC void rtp_session_enable_adaptive_jitter_compensation(RtpSession | |
| bool_t rtp_session_adaptive_jitter_compensation_enabled(RtpSession *session | | *session, bool_t val); | |
| ); | | ORTP_PUBLIC bool_t rtp_session_adaptive_jitter_compensation_enabled(RtpSess | |
| | | ion *session); | |
| void rtp_session_set_time_jump_limit(RtpSession *session, int miliseconds); | | | |
| int rtp_session_set_local_addr(RtpSession *session,const char *addr, int po | | ORTP_PUBLIC void rtp_session_set_time_jump_limit(RtpSession *session, int m | |
| rt); | | iliseconds); | |
| int rtp_session_get_local_port(const RtpSession *session); | | ORTP_PUBLIC int rtp_session_set_local_addr(RtpSession *session,const char * | |
| | | addr, int rtp_port, int rtcp_port); | |
| | | ORTP_PUBLIC int rtp_session_get_local_port(const RtpSession *session); | |
| | | | |
|
| int | | ORTP_PUBLIC int | |
| rtp_session_set_remote_addr_full (RtpSession * session, const char * addr, | | rtp_session_set_remote_addr_full (RtpSession * session, const char * rtp_ad | |
| int rtp_port, int rtcp_port); | | dr, int rtp_port, const char * rtcp_addr, int rtcp_port); | |
| /*same as previous function, old name:*/ | | /*same as previous function, old name:*/ | |
|
| int rtp_session_set_remote_addr_and_port (RtpSession * session, const char | | ORTP_PUBLIC int rtp_session_set_remote_addr_and_port (RtpSession * session, | |
| * addr, int rtp_port, int rtcp_port); | | const char * addr, int rtp_port, int rtcp_port); | |
| int rtp_session_set_remote_addr(RtpSession *session,const char *addr, int p | | ORTP_PUBLIC int rtp_session_set_remote_addr(RtpSession *session,const char | |
| ort); | | *addr, int port); | |
| /* alternatively to the set_remote_addr() and set_local_addr(), an applicat
ion can give | | /* alternatively to the set_remote_addr() and set_local_addr(), an applicat
ion can give | |
| a valid socket (potentially connect()ed )to be used by the RtpSession */ | | a valid socket (potentially connect()ed )to be used by the RtpSession */ | |
|
| void rtp_session_set_sockets(RtpSession *session, int rtpfd, int rtcpfd); | | ORTP_PUBLIC void rtp_session_set_sockets(RtpSession *session, int rtpfd, in | |
| void rtp_session_set_transports(RtpSession *session, RtpTransport *rtptr, R | | t rtcpfd); | |
| tpTransport *rtcptr); | | ORTP_PUBLIC void rtp_session_set_transports(RtpSession *session, RtpTranspo | |
| | | rt *rtptr, RtpTransport *rtcptr); | |
| | | | |
| /*those methods are provided for people who wants to send non-RTP messages
using the RTP/RTCP sockets */ | | /*those methods are provided for people who wants to send non-RTP messages
using the RTP/RTCP sockets */ | |
|
| ortp_socket_t rtp_session_get_rtp_socket(const RtpSession *session); | | ORTP_PUBLIC ortp_socket_t rtp_session_get_rtp_socket(const RtpSession *sess | |
| ortp_socket_t rtp_session_get_rtcp_socket(const RtpSession *session); | | ion); | |
| | | ORTP_PUBLIC ortp_socket_t rtp_session_get_rtcp_socket(const RtpSession *ses | |
| | | sion); | |
| | | | |
| /* QOS / DSCP */ | | /* QOS / DSCP */ | |
|
| int rtp_session_set_dscp(RtpSession *session, int dscp); | | ORTP_PUBLIC int rtp_session_set_dscp(RtpSession *session, int dscp); | |
| int rtp_session_get_dscp(const RtpSession *session); | | ORTP_PUBLIC int rtp_session_get_dscp(const RtpSession *session); | |
| | | | |
| | | /* Packet info */ | |
| | | ORTP_PUBLIC int rtp_session_set_pktinfo(RtpSession *session, int activate); | |
| | | | |
| /* Multicast methods */ | | /* Multicast methods */ | |
|
| int rtp_session_set_multicast_ttl(RtpSession *session, int ttl); | | ORTP_PUBLIC int rtp_session_set_multicast_ttl(RtpSession *session, int ttl) | |
| int rtp_session_get_multicast_ttl(RtpSession *session); | | ; | |
| | | ORTP_PUBLIC int rtp_session_get_multicast_ttl(RtpSession *session); | |
| | | | |
|
| int rtp_session_set_multicast_loopback(RtpSession *session, int yesno); | | ORTP_PUBLIC int rtp_session_set_multicast_loopback(RtpSession *session, int | |
| int rtp_session_get_multicast_loopback(RtpSession *session); | | yesno); | |
| | | ORTP_PUBLIC int rtp_session_get_multicast_loopback(RtpSession *session); | |
| | | | |
|
| int rtp_session_set_send_payload_type(RtpSession *session, int paytype); | | ORTP_PUBLIC int rtp_session_set_send_payload_type(RtpSession *session, int | |
| int rtp_session_get_send_payload_type(const RtpSession *session); | | paytype); | |
| | | ORTP_PUBLIC int rtp_session_get_send_payload_type(const RtpSession *session | |
| | | ); | |
| | | | |
|
| int rtp_session_get_recv_payload_type(const RtpSession *session); | | ORTP_PUBLIC int rtp_session_get_recv_payload_type(const RtpSession *session | |
| int rtp_session_set_recv_payload_type(RtpSession *session, int pt); | | ); | |
| | | ORTP_PUBLIC int rtp_session_set_recv_payload_type(RtpSession *session, int | |
| | | pt); | |
| | | | |
|
| int rtp_session_set_payload_type(RtpSession *session, int pt); | | ORTP_PUBLIC int rtp_session_set_payload_type(RtpSession *session, int pt); | |
| | | | |
|
| void rtp_session_set_symmetric_rtp (RtpSession * session, bool_t yesno); | | ORTP_PUBLIC void rtp_session_set_symmetric_rtp (RtpSession * session, bool_
t yesno); | |
| | | | |
|
| void rtp_session_set_connected_mode(RtpSession *session, bool_t yesno); | | ORTP_PUBLIC void rtp_session_set_connected_mode(RtpSession *session, bool_t
yesno); | |
| | | | |
|
| void rtp_session_enable_rtcp(RtpSession *session, bool_t yesno); | | ORTP_PUBLIC void rtp_session_enable_rtcp(RtpSession *session, bool_t yesno)
; | |
| | | | |
|
| void rtp_session_set_rtcp_report_interval(RtpSession *session, int value_ms
); | | ORTP_PUBLIC void rtp_session_set_rtcp_report_interval(RtpSession *session,
int value_ms); | |
| | | | |
|
| void rtp_session_set_ssrc_changed_threshold(RtpSession *session, int numpac
kets); | | ORTP_PUBLIC void rtp_session_set_ssrc_changed_threshold(RtpSession *session
, int numpackets); | |
| | | | |
| /*low level recv and send functions */ | | /*low level recv and send functions */ | |
|
| mblk_t * rtp_session_recvm_with_ts (RtpSession * session, uint32_t user_ts) | | ORTP_PUBLIC mblk_t * rtp_session_recvm_with_ts (RtpSession * session, uint3 | |
| ; | | 2_t user_ts); | |
| mblk_t * rtp_session_create_packet(RtpSession *session,int header_size, con | | ORTP_PUBLIC mblk_t * rtp_session_create_packet(RtpSession *session,int head | |
| st uint8_t *payload, int payload_size); | | er_size, const uint8_t *payload, int payload_size); | |
| mblk_t * rtp_session_create_packet_with_data(RtpSession *session, uint8_t * | | ORTP_PUBLIC mblk_t * rtp_session_create_packet_with_data(RtpSession *sessio | |
| payload, int payload_size, void (*freefn)(void*)); | | n, uint8_t *payload, int payload_size, void (*freefn)(void*)); | |
| mblk_t * rtp_session_create_packet_in_place(RtpSession *session,uint8_t *bu | | ORTP_PUBLIC mblk_t * rtp_session_create_packet_in_place(RtpSession *session | |
| ffer, int size, void (*freefn)(void*) ); | | ,uint8_t *buffer, int size, void (*freefn)(void*) ); | |
| int rtp_session_sendm_with_ts (RtpSession * session, mblk_t *mp, uint32_t u | | ORTP_PUBLIC int rtp_session_sendm_with_ts (RtpSession * session, mblk_t *mp | |
| serts); | | , uint32_t userts); | |
| /* high level recv and send functions */ | | /* high level recv and send functions */ | |
|
| int rtp_session_recv_with_ts(RtpSession *session, uint8_t *buffer, int len, | | ORTP_PUBLIC int rtp_session_recv_with_ts(RtpSession *session, uint8_t *buff | |
| uint32_t ts, int *have_more); | | er, int len, uint32_t ts, int *have_more); | |
| int rtp_session_send_with_ts(RtpSession *session, const uint8_t *buffer, in | | ORTP_PUBLIC int rtp_session_send_with_ts(RtpSession *session, const uint8_t | |
| t len, uint32_t userts); | | *buffer, int len, uint32_t userts); | |
| | | | |
| /* event API*/ | | /* event API*/ | |
|
| void rtp_session_register_event_queue(RtpSession *session, OrtpEvQueue *q); | | ORTP_PUBLIC void rtp_session_register_event_queue(RtpSession *session, Ortp | |
| void rtp_session_unregister_event_queue(RtpSession *session, OrtpEvQueue *q | | EvQueue *q); | |
| ); | | ORTP_PUBLIC void rtp_session_unregister_event_queue(RtpSession *session, Or | |
| | | tpEvQueue *q); | |
| | | | |
| /* IP bandwidth usage estimation functions, returning bits/s*/ | | /* IP bandwidth usage estimation functions, returning bits/s*/ | |
|
| float rtp_session_compute_send_bandwidth(RtpSession *session); | | ORTP_PUBLIC float rtp_session_compute_send_bandwidth(RtpSession *session); | |
| float rtp_session_compute_recv_bandwidth(RtpSession *session); | | ORTP_PUBLIC float rtp_session_compute_recv_bandwidth(RtpSession *session); | |
| | | | |
|
| void rtp_session_send_rtcp_APP(RtpSession *session, uint8_t subtype, const
char *name, const uint8_t *data, int datalen); | | ORTP_PUBLIC void rtp_session_send_rtcp_APP(RtpSession *session, uint8_t sub
type, const char *name, const uint8_t *data, int datalen); | |
| | | | |
|
| uint32_t rtp_session_get_current_send_ts(RtpSession *session); | | ORTP_PUBLIC uint32_t rtp_session_get_current_send_ts(RtpSession *session); | |
| uint32_t rtp_session_get_current_recv_ts(RtpSession *session); | | ORTP_PUBLIC uint32_t rtp_session_get_current_recv_ts(RtpSession *session); | |
| void rtp_session_flush_sockets(RtpSession *session); | | ORTP_PUBLIC void rtp_session_flush_sockets(RtpSession *session); | |
| void rtp_session_release_sockets(RtpSession *session); | | ORTP_PUBLIC void rtp_session_release_sockets(RtpSession *session); | |
| void rtp_session_resync(RtpSession *session); | | ORTP_PUBLIC void rtp_session_resync(RtpSession *session); | |
| void rtp_session_reset(RtpSession *session); | | ORTP_PUBLIC void rtp_session_reset(RtpSession *session); | |
| void rtp_session_destroy(RtpSession *session); | | ORTP_PUBLIC void rtp_session_destroy(RtpSession *session); | |
| | | | |
| const rtp_stats_t * rtp_session_get_stats(const RtpSession *session); | | ORTP_PUBLIC const rtp_stats_t * rtp_session_get_stats(const RtpSession *ses | |
| const jitter_stats_t * rtp_session_get_jitter_stats( const RtpSession *sess | | sion); | |
| ion ); | | ORTP_PUBLIC const jitter_stats_t * rtp_session_get_jitter_stats( const RtpS | |
| void rtp_session_reset_stats(RtpSession *session); | | ession *session ); | |
| | | ORTP_PUBLIC void rtp_session_reset_stats(RtpSession *session); | |
| void rtp_session_set_data(RtpSession *session, void *data); | | | |
| void *rtp_session_get_data(const RtpSession *session); | | ORTP_PUBLIC void rtp_session_set_data(RtpSession *session, void *data); | |
| | | ORTP_PUBLIC void *rtp_session_get_data(const RtpSession *session); | |
| void rtp_session_set_recv_buf_size(RtpSession *session, int bufsize); | | | |
| void rtp_session_set_rtp_socket_send_buffer_size(RtpSession * session, unsi | | ORTP_PUBLIC void rtp_session_set_recv_buf_size(RtpSession *session, int buf | |
| gned int size); | | size); | |
| void rtp_session_set_rtp_socket_recv_buffer_size(RtpSession * session, unsi | | ORTP_PUBLIC void rtp_session_set_rtp_socket_send_buffer_size(RtpSession * s | |
| gned int size); | | ession, unsigned int size); | |
| | | ORTP_PUBLIC void rtp_session_set_rtp_socket_recv_buffer_size(RtpSession * s | |
| | | ession, unsigned int size); | |
| | | | |
| /* in use with the scheduler to convert a timestamp in scheduler time unit
(ms) */ | | /* in use with the scheduler to convert a timestamp in scheduler time unit
(ms) */ | |
|
| uint32_t rtp_session_ts_to_time(RtpSession *session,uint32_t timestamp); | | ORTP_PUBLIC uint32_t rtp_session_ts_to_time(RtpSession *session,uint32_t ti | |
| uint32_t rtp_session_time_to_ts(RtpSession *session, int millisecs); | | mestamp); | |
| | | ORTP_PUBLIC uint32_t rtp_session_time_to_ts(RtpSession *session, int millis | |
| | | ecs); | |
| /* this function aims at simulating senders with "imprecise" clocks, result
ing in | | /* this function aims at simulating senders with "imprecise" clocks, result
ing in | |
| rtp packets sent with timestamp uncorrelated with the system clock . | | rtp packets sent with timestamp uncorrelated with the system clock . | |
| This is only availlable to sessions working with the oRTP scheduler */ | | This is only availlable to sessions working with the oRTP scheduler */ | |
|
| void rtp_session_make_time_distorsion(RtpSession *session, int milisec); | | ORTP_PUBLIC void rtp_session_make_time_distorsion(RtpSession *session, int
milisec); | |
| | | | |
| /*RTCP functions */ | | /*RTCP functions */ | |
|
| void rtp_session_set_source_description(RtpSession *session, const char *cn
ame, | | ORTP_PUBLIC void rtp_session_set_source_description(RtpSession *session, co
nst char *cname, | |
| const char *name, const char *email, const char *phone, | | const char *name, const char *email, const char *phone, | |
| const char *loc, const char *tool, const char *note); | | const char *loc, const char *tool, const char *note); | |
|
| void rtp_session_add_contributing_source(RtpSession *session, uint32_t csrc
, | | ORTP_PUBLIC void rtp_session_add_contributing_source(RtpSession *session, u
int32_t csrc, | |
| const char *cname, const char *name, const char *email, const char *pho
ne, | | const char *cname, const char *name, const char *email, const char *pho
ne, | |
| const char *loc, const char *tool, const char *note); | | const char *loc, const char *tool, const char *note); | |
|
| void rtp_session_remove_contributing_sources(RtpSession *session, uint32_t | | ORTP_PUBLIC void rtp_session_remove_contributing_sources(RtpSession *sessio | |
| csrc); | | n, uint32_t csrc); | |
| mblk_t* rtp_session_create_rtcp_sdes_packet(RtpSession *session); | | ORTP_PUBLIC mblk_t* rtp_session_create_rtcp_sdes_packet(RtpSession *session | |
| | | ); | |
| | | | |
|
| void rtp_session_get_last_recv_time(RtpSession *session, struct timeval *tv | | ORTP_PUBLIC void rtp_session_get_last_recv_time(RtpSession *session, struct | |
| ); | | timeval *tv); | |
| int rtp_session_bye(RtpSession *session, const char *reason); | | ORTP_PUBLIC int rtp_session_bye(RtpSession *session, const char *reason); | |
| | | | |
|
| int rtp_session_get_last_send_error_code(RtpSession *session); | | ORTP_PUBLIC int rtp_session_get_last_send_error_code(RtpSession *session); | |
| void rtp_session_clear_send_error_code(RtpSession *session); | | ORTP_PUBLIC void rtp_session_clear_send_error_code(RtpSession *session); | |
| int rtp_session_get_last_recv_error_code(RtpSession *session); | | ORTP_PUBLIC int rtp_session_get_last_recv_error_code(RtpSession *session); | |
| void rtp_session_clear_recv_error_code(RtpSession *session); | | ORTP_PUBLIC void rtp_session_clear_recv_error_code(RtpSession *session); | |
| | | | |
| float rtp_session_get_round_trip_propagation(RtpSession *session); | | ORTP_PUBLIC float rtp_session_get_round_trip_propagation(RtpSession *sessio | |
| | | n); | |
| void rtp_session_enable_network_simulation(RtpSession *session, const OrtpN | | | |
| etworkSimulatorParams *params); | | ORTP_PUBLIC void rtp_session_enable_network_simulation(RtpSession *session, | |
| void rtp_session_rtcp_set_lost_packet_value( RtpSession *session, const uns | | const OrtpNetworkSimulatorParams *params); | |
| igned int value ); | | ORTP_PUBLIC void rtp_session_rtcp_set_lost_packet_value( RtpSession *sessio | |
| void rtp_session_rtcp_set_jitter_value(RtpSession *session, const unsigned | | n, const unsigned int value ); | |
| int value ); | | ORTP_PUBLIC void rtp_session_rtcp_set_jitter_value(RtpSession *session, con | |
| void rtp_session_rtcp_set_delay_value(RtpSession *session, const unsigned i | | st unsigned int value ); | |
| nt value ); | | ORTP_PUBLIC void rtp_session_rtcp_set_delay_value(RtpSession *session, cons | |
| mblk_t * rtp_session_pick_with_cseq (RtpSession * session, const uint16_t s | | t unsigned int value ); | |
| equence_number); | | ORTP_PUBLIC mblk_t * rtp_session_pick_with_cseq (RtpSession * session, cons | |
| | | t uint16_t sequence_number); | |
| /*private */ | | /*private */ | |
|
| void rtp_session_init(RtpSession *session, int mode); | | ORTP_PUBLIC void rtp_session_init(RtpSession *session, int mode); | |
| #define rtp_session_set_flag(session,flag) (session)->flags|=(flag) | | #define rtp_session_set_flag(session,flag) (session)->flags|=(flag) | |
| #define rtp_session_unset_flag(session,flag) (session)->flags&=~(flag) | | #define rtp_session_unset_flag(session,flag) (session)->flags&=~(flag) | |
|
| void rtp_session_uninit(RtpSession *session); | | ORTP_PUBLIC void rtp_session_uninit(RtpSession *session); | |
| | | ORTP_PUBLIC void rtp_session_dispatch_event(RtpSession *session, OrtpEvent | |
| | | *ev); | |
| | | | |
| | | ORTP_PUBLIC void rtp_session_set_reuseaddr(RtpSession *session, bool_t yes) | |
| | | ; | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 37 change blocks. |
| 135 lines changed or deleted | | 178 lines changed or added | |
|