Commit 8833490f authored by Ghislain MARY's avatar Ghislain MARY

Use ORTP_PUBLIC macro instead of ortp.def file to export oRTP symbols on Windows.

parent 4934d1de
......@@ -67,7 +67,7 @@
LinkIncremental="1"
AdditionalLibraryDirectories=""..\..\..\win32-bin\lib""
IgnoreAllDefaultLibraries="false"
ModuleDefinitionFile="oRTP.def"
ModuleDefinitionFile=""
DelayLoadDLLs="Qwave.dll"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/oRTP.pdb"
......@@ -414,10 +414,6 @@
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
<File
RelativePath=".\ortp.def"
>
</File>
</Filter>
</Files>
<Globals>
......
LIBRARY ortp
EXPORTS
ortp_init
ortp_scheduler_init
ortp_exit
ortp_get_scheduler
ortp_set_log_file
ortp_set_log_level_mask
ortp_logv_out
ortp_set_log_handler
ortp_strdup_printf
ortp_logv
ortp_get_global_stats
ortp_global_stats_display
session_set_new
session_set_select
session_set_destroy
rtp_stats_display
rtp_session_get_stats
rtp_session_init
rtp_session_new
rtp_session_set_scheduling_mode
rtp_session_set_blocking_mode
rtp_session_set_profile
rtp_session_get_profile
rtp_session_set_data
rtp_session_set_ssrc_changed_threshold
rtp_session_signal_connect
rtp_session_signal_disconnect_by_callback
rtp_session_set_ssrc
rtp_session_get_send_ssrc
rtp_session_get_recv_ssrc
rtp_session_set_seq_number
rtp_session_get_seq_number
rtp_session_set_jitter_compensation
rtp_session_set_local_addr
rtp_session_set_remote_addr
rtp_session_enable_adaptive_jitter_compensation
rtp_session_set_recv_buf_size
rtp_session_send_with_ts
rtp_session_sendm_with_ts
rtp_session_set_sockets
rtp_session_get_rtp_socket
rtp_session_get_rtcp_socket
rtp_session_set_payload_type
rtp_session_get_send_profile
rtp_session_set_send_payload_type
rtp_session_get_send_payload_type
rtp_session_set_recv_payload_type
rtp_session_get_recv_payload_type
rtp_session_recv_with_ts
rtp_session_recvm_with_ts
rtp_session_create_packet
rtp_session_get_current_send_ts
rtp_session_get_current_recv_ts
rtp_session_reset
rtp_session_uninit
rtp_session_destroy
rtp_add_csrc
rtp_session_send_dtmf
rtp_session_add_telephone_event
rtp_session_create_telephone_event_packet
rtp_session_set_source_description
rtp_session_set_symmetric_rtp
rtp_profile_new
rtp_profile_set_payload
rtp_profile_clone_full
rtp_profile_destroy
rtp_profile_get_payload_from_rtpmap
rtp_profile_get_payload_from_mime
payload_type_set_send_fmtp
payload_type_clone
fmtp_get_value
ortp_free
ortp_malloc
ortp_strdup
ortp_realloc
ortp_malloc0
freemsg
dupmsg
allocb
getq
putq
msgpullup
qinit
flushq
msgdsize
peekq
freeb
dupb
concatb
esballoc
copyb
copymsg
WIN_thread_create
WIN_thread_join
WIN_cond_init
WIN_mutex_init
WIN_mutex_unlock
WIN_cond_wait
WIN_mutex_lock
WIN_cond_destroy
WIN_mutex_destroy
WIN_cond_signal
__ortp_log_mask
rtp_session_register_event_queue
rtp_session_unregister_event_queue
ortp_ev_queue_new
ortp_ev_queue_flush
ortp_ev_queue_get
ortp_ev_queue_destroy
ortp_event_get_type
ortp_event_get_data
ortp_event_destroy
stunParseHostName
stunParseServerName
sendMessage
stunEncodeMessage
stunBuildReqSimple
stunParseMessage
stunServerProcessMsg
stunNatType
stunTest
stunOpenSocket
stunOpenSocketPair
stunCalculateIntegrity_shortterm
stunCalculateIntegrity_longterm
stunCalculateFingerprint
getWinSocketError
rtp_session_set_transports
rtp_session_set_dscp
rtp_session_compute_recv_bandwidth
rtp_session_compute_send_bandwidth
rtcp_next_packet
rtcp_is_SDES
rtcp_sdes_parse
rtcp_is_SR
rtcp_SR_get_ssrc
rtcp_SR_get_report_block
rtcp_SR_get_sender_info
rtcp_is_RR
rtcp_RR_get_ssrc
rtcp_RR_get_report_block
rtcp_is_BYE
rtcp_BYE_get_ssrc
rtcp_BYE_get_reason
rtcp_is_APP
rtcp_APP_get_subtype
rtcp_APP_get_ssrc
rtcp_APP_get_name
rtcp_APP_get_data
rtp_session_flush_sockets
rtp_session_resync
rtp_session_set_remote_addr_and_port
rtp_session_set_time_jump_limit
rtp_session_enable_rtcp
rtp_session_enable_jitter_buffer
rtp_session_set_rtp_socket_recv_buffer_size
rtp_session_set_rtp_socket_send_buffer_size
rtp_session_set_jitter_buffer_params
rtp_session_get_round_trip_propagation
rtp_session_set_rtcp_report_interval
rtp_get_payload
rtp_get_extheader
rtp_session_set_remote_addr_full
rtp_session_send_rtcp_APP
b64_decode
b64_encode
payload_type_new
payload_type_set_recv_fmtp
rtp_session_get_local_port
rtp_session_get_jitter_buffer_params
turnAllocateSocketPair
ortp_shm_open
ortp_shm_close
ortp_pipe_read
ortp_pipe_write
ortp_client_pipe_connect
ortp_client_pipe_close
ortp_file_exist
ortp_zrtp_available
ortp_zrtp_context_new
ortp_zrtp_multistream_new
ortp_zrtp_sas_verified
ortp_zrtp_sas_reset_verified
ortp_zrtp_context_destroy
srtp_transport_new
ortp_srtp_init
ortp_srtp_create_configure_session
ortp_srtp_supported
rtp_session_pick_with_cseq
rtp_session_enable_network_simulation
ortp_crypto_get_random
......@@ -227,7 +227,7 @@ extern "C" {
*
* \see b64::encode()
*/
size_t b64_encode(void const *src, size_t srcSize, char *dest, size_t destLen);
ORTP_PUBLIC size_t b64_encode(void const *src, size_t srcSize, char *dest, size_t destLen);
/** \brief Encodes a block of binary data into Base-64
*
......@@ -298,7 +298,7 @@ size_t b64_encode2( void const *src
*
* \see b64::decode()
*/
size_t b64_decode(char const *src, size_t srcLen, void *dest, size_t destSize);
ORTP_PUBLIC size_t b64_decode(char const *src, size_t srcLen, void *dest, size_t destSize);
/** \brief Decodes a sequence of Base-64 into a block of binary data
*
......
......@@ -66,11 +66,11 @@ typedef struct _OrtpEventData OrtpEventData;
extern "C"{
#endif
RtpEndpoint *rtp_endpoint_new(struct sockaddr *addr, socklen_t addrlen);
RtpEndpoint *rtp_endpoint_dup(const RtpEndpoint *ep);
ORTP_PUBLIC RtpEndpoint *rtp_endpoint_new(struct sockaddr *addr, socklen_t addrlen);
ORTP_PUBLIC RtpEndpoint *rtp_endpoint_dup(const RtpEndpoint *ep);
OrtpEvent * ortp_event_new(OrtpEventType tp);
OrtpEventType ortp_event_get_type(const OrtpEvent *ev);
ORTP_PUBLIC OrtpEvent * ortp_event_new(OrtpEventType tp);
ORTP_PUBLIC OrtpEventType ortp_event_get_type(const OrtpEvent *ev);
/* type is one of the following*/
#define ORTP_EVENT_STUN_PACKET_RECEIVED 1
#define ORTP_EVENT_PAYLOAD_TYPE_CHANGED 2
......@@ -85,19 +85,19 @@ OrtpEventType ortp_event_get_type(const OrtpEvent *ev);
#define ORTP_EVENT_ICE_LOSING_PAIRS_COMPLETED 11
#define ORTP_EVENT_ICE_RESTART_NEEDED 12
OrtpEventData * ortp_event_get_data(OrtpEvent *ev);
void ortp_event_destroy(OrtpEvent *ev);
OrtpEvent *ortp_event_dup(OrtpEvent *ev);
ORTP_PUBLIC OrtpEventData * ortp_event_get_data(OrtpEvent *ev);
ORTP_PUBLIC void ortp_event_destroy(OrtpEvent *ev);
ORTP_PUBLIC OrtpEvent *ortp_event_dup(OrtpEvent *ev);
typedef struct OrtpEvQueue{
queue_t q;
ortp_mutex_t mutex;
} OrtpEvQueue;
OrtpEvQueue * ortp_ev_queue_new(void);
void ortp_ev_queue_destroy(OrtpEvQueue *q);
OrtpEvent * ortp_ev_queue_get(OrtpEvQueue *q);
void ortp_ev_queue_flush(OrtpEvQueue * qp);
ORTP_PUBLIC OrtpEvQueue * ortp_ev_queue_new(void);
ORTP_PUBLIC void ortp_ev_queue_destroy(OrtpEvQueue *q);
ORTP_PUBLIC OrtpEvent * ortp_ev_queue_get(OrtpEvQueue *q);
ORTP_PUBLIC void ortp_ev_queue_flush(OrtpEvQueue * qp);
#ifdef __cplusplus
}
......
......@@ -46,12 +46,12 @@ typedef enum {
typedef void (*OrtpLogFunc)(OrtpLogLevel lev, const char *fmt, va_list args);
void ortp_set_log_file(FILE *file);
void ortp_set_log_handler(OrtpLogFunc func);
ORTP_PUBLIC void ortp_set_log_file(FILE *file);
ORTP_PUBLIC void ortp_set_log_handler(OrtpLogFunc func);
VAR_DECLSPEC OrtpLogFunc ortp_logv_out;
ORTP_PUBLIC OrtpLogFunc ortp_logv_out;
extern unsigned int __ortp_log_mask;
ORTP_PUBLIC extern unsigned int __ortp_log_mask;
#define ortp_log_level_enabled(level) (__ortp_log_mask & (level))
......@@ -63,10 +63,10 @@ extern unsigned int __ortp_log_mask;
if ((level)==ORTP_FATAL) abort();\
}while(0)
#else
void ortp_logv(int level, const char *fmt, va_list args);
ORTP_PUBLIC void ortp_logv(int level, const char *fmt, va_list args);
#endif
void ortp_set_log_level_mask(int levelmask);
ORTP_PUBLIC void ortp_set_log_level_mask(int levelmask);
#ifdef __GNUC__
#define CHECK_FORMAT_ARGS(m,n) __attribute__((format(printf,m,n)))
......
......@@ -73,10 +73,10 @@ extern "C"
{
#endif
bool_t ortp_min_version_required(int major, int minor, int micro);
void ortp_init(void);
void ortp_scheduler_init(void);
void ortp_exit(void);
ORTP_PUBLIC bool_t ortp_min_version_required(int major, int minor, int micro);
ORTP_PUBLIC void ortp_init(void);
ORTP_PUBLIC void ortp_scheduler_init(void);
ORTP_PUBLIC void ortp_exit(void);
/****************/
/*statistics api*/
......@@ -84,12 +84,12 @@ void ortp_exit(void);
extern rtp_stats_t ortp_global_stats;
void ortp_global_stats_reset(void);
rtp_stats_t *ortp_get_global_stats(void);
ORTP_PUBLIC void ortp_global_stats_reset(void);
ORTP_PUBLIC rtp_stats_t *ortp_get_global_stats(void);
void ortp_global_stats_display(void);
void rtp_stats_display(const rtp_stats_t *stats, const char *header);
void rtp_stats_reset(rtp_stats_t *stats);
ORTP_PUBLIC void ortp_global_stats_display(void);
ORTP_PUBLIC void rtp_stats_display(const rtp_stats_t *stats, const char *header);
ORTP_PUBLIC void rtp_stats_reset(rtp_stats_t *stats);
#if defined(_MSC_VER)
#define ORTP_PUBLIC __declspec(dllexport)
......
......@@ -55,16 +55,16 @@ enum ortp_srtp_crypto_suite_t {
NO_CIPHER_SHA1_80
};
err_status_t ortp_srtp_init(void);
err_status_t ortp_srtp_create(srtp_t *session, const srtp_policy_t *policy);
err_status_t ortp_srtp_dealloc(srtp_t session);
err_status_t ortp_srtp_add_stream(srtp_t session, const srtp_policy_t *policy);
err_status_t ortp_crypto_get_random(uint8_t *tmp, int size);
bool_t ortp_srtp_supported(void);
ORTP_PUBLIC err_status_t ortp_srtp_init(void);
ORTP_PUBLIC err_status_t ortp_srtp_create(srtp_t *session, const srtp_policy_t *policy);
ORTP_PUBLIC err_status_t ortp_srtp_dealloc(srtp_t session);
ORTP_PUBLIC err_status_t ortp_srtp_add_stream(srtp_t session, const srtp_policy_t *policy);
ORTP_PUBLIC err_status_t ortp_crypto_get_random(uint8_t *tmp, int size);
ORTP_PUBLIC bool_t ortp_srtp_supported(void);
int srtp_transport_new(srtp_t srtp, RtpTransport **rtpt, RtpTransport **rtcpt );
ORTP_PUBLIC int srtp_transport_new(srtp_t srtp, RtpTransport **rtpt, RtpTransport **rtcpt );
srtp_t ortp_srtp_create_configure_session(enum ortp_srtp_crypto_suite_t suite, uint32_t ssrc, const char* snd_key, const char* rcv_key);
ORTP_PUBLIC srtp_t ortp_srtp_create_configure_session(enum ortp_srtp_crypto_suite_t suite, uint32_t ssrc, const char* snd_key, const char* rcv_key);
#ifdef __cplusplus
}
#endif
......
......@@ -77,20 +77,20 @@ typedef struct _PayloadType PayloadType;
#define payload_type_get_flags(pt) (pt)->flags
PayloadType *payload_type_new(void);
PayloadType *payload_type_clone(PayloadType *payload);
char *payload_type_get_rtpmap(PayloadType *pt);
void payload_type_destroy(PayloadType *pt);
void payload_type_set_recv_fmtp(PayloadType *pt, const char *fmtp);
void payload_type_set_send_fmtp(PayloadType *pt, const char *fmtp);
void payload_type_append_recv_fmtp(PayloadType *pt, const char *fmtp);
void payload_type_append_send_fmtp(PayloadType *pt, const char *fmtp);
ORTP_PUBLIC PayloadType *payload_type_new(void);
ORTP_PUBLIC PayloadType *payload_type_clone(PayloadType *payload);
ORTP_PUBLIC char *payload_type_get_rtpmap(PayloadType *pt);
ORTP_PUBLIC void payload_type_destroy(PayloadType *pt);
ORTP_PUBLIC void payload_type_set_recv_fmtp(PayloadType *pt, const char *fmtp);
ORTP_PUBLIC void payload_type_set_send_fmtp(PayloadType *pt, const char *fmtp);
ORTP_PUBLIC void payload_type_append_recv_fmtp(PayloadType *pt, const char *fmtp);
ORTP_PUBLIC void payload_type_append_send_fmtp(PayloadType *pt, const char *fmtp);
#define payload_type_get_bitrate(pt) ((pt)->normal_bitrate)
#define payload_type_get_rate(pt) ((pt)->clock_rate)
#define payload_type_get_mime(pt) ((pt)->mime_type)
bool_t fmtp_get_value(const char *fmtp, const char *param_name, char *result, size_t result_len);
ORTP_PUBLIC bool_t fmtp_get_value(const char *fmtp, const char *param_name, char *result, size_t result_len);
#define payload_type_set_user_data(pt,p) (pt)->user_data=(p)
#define payload_type_get_user_data(pt) ((pt)->user_data)
......
......@@ -121,6 +121,7 @@ int __ortp_thread_create(pthread_t *thread, pthread_attr_t *attr, void * (*routi
#include <ws2tcpip.h>
#ifdef _MSC_VER
#define ORTP_PUBLIC __declspec(dllexport)
#pragma push_macro("_WINSOCKAPI_")
#ifndef _WINSOCKAPI_
#define _WINSOCKAPI_
......@@ -136,6 +137,7 @@ typedef __int16 int16_t;
#else
#include <stdint.h> /*provided by mingw32*/
#include <io.h>
#define ORTP_PUBLIC
#endif
#define vsnprintf _vsnprintf
......@@ -167,17 +169,17 @@ extern "C"
{
#endif
int WIN_mutex_init(ortp_mutex_t *m, void *attr_unused);
int WIN_mutex_lock(ortp_mutex_t *mutex);
int WIN_mutex_unlock(ortp_mutex_t *mutex);
int WIN_mutex_destroy(ortp_mutex_t *mutex);
int WIN_thread_create(ortp_thread_t *t, void *attr_unused, void *(*func)(void*), void *arg);
int WIN_thread_join(ortp_thread_t thread, void **unused);
int WIN_cond_init(ortp_cond_t *cond, void *attr_unused);
int WIN_cond_wait(ortp_cond_t * cond, ortp_mutex_t * mutex);
int WIN_cond_signal(ortp_cond_t * cond);
int WIN_cond_broadcast(ortp_cond_t * cond);
int WIN_cond_destroy(ortp_cond_t * cond);
ORTP_PUBLIC int WIN_mutex_init(ortp_mutex_t *m, void *attr_unused);
ORTP_PUBLIC int WIN_mutex_lock(ortp_mutex_t *mutex);
ORTP_PUBLIC int WIN_mutex_unlock(ortp_mutex_t *mutex);
ORTP_PUBLIC int WIN_mutex_destroy(ortp_mutex_t *mutex);
ORTP_PUBLIC int WIN_thread_create(ortp_thread_t *t, void *attr_unused, void *(*func)(void*), void *arg);
ORTP_PUBLIC int WIN_thread_join(ortp_thread_t thread, void **unused);
ORTP_PUBLIC int WIN_cond_init(ortp_cond_t *cond, void *attr_unused);
ORTP_PUBLIC int WIN_cond_wait(ortp_cond_t * cond, ortp_mutex_t * mutex);
ORTP_PUBLIC int WIN_cond_signal(ortp_cond_t * cond);
ORTP_PUBLIC int WIN_cond_broadcast(ortp_cond_t * cond);
ORTP_PUBLIC int WIN_cond_destroy(ortp_cond_t * cond);
#ifdef __cplusplus
}
......@@ -212,7 +214,7 @@ const char * ortp_strerror(DWORD value);
#endif
const char *getWinSocketError(int error);
ORTP_PUBLIC const char *getWinSocketError(int error);
#define getSocketErrorCode() WSAGetLastError()
#define getSocketError() getWinSocketError(WSAGetLastError())
......@@ -248,11 +250,11 @@ typedef struct ortpTimeSpec{
extern "C"{
#endif
void* ortp_malloc(size_t sz);
void ortp_free(void *ptr);
void* ortp_realloc(void *ptr, size_t sz);
void* ortp_malloc0(size_t sz);
char * ortp_strdup(const char *tmp);
ORTP_PUBLIC void* ortp_malloc(size_t sz);
ORTP_PUBLIC void ortp_free(void *ptr);
ORTP_PUBLIC void* ortp_realloc(void *ptr, size_t sz);
ORTP_PUBLIC void* ortp_malloc0(size_t sz);
ORTP_PUBLIC char * ortp_strdup(const char *tmp);
/*override the allocator with this method, to be called BEFORE ortp_init()*/
typedef struct _OrtpMemoryFunctions{
......@@ -266,16 +268,16 @@ void ortp_set_memory_functions(OrtpMemoryFunctions *functions);
#define ortp_new(type,count) (type*)ortp_malloc(sizeof(type)*(count))
#define ortp_new0(type,count) (type*)ortp_malloc0(sizeof(type)*(count))
int close_socket(ortp_socket_t sock);
int set_non_blocking_socket(ortp_socket_t sock);
ORTP_PUBLIC int close_socket(ortp_socket_t sock);
ORTP_PUBLIC int set_non_blocking_socket(ortp_socket_t sock);
char *ortp_strndup(const char *str,int n);
char *ortp_strdup_printf(const char *fmt,...);
char *ortp_strdup_vprintf(const char *fmt, va_list ap);
ORTP_PUBLIC char *ortp_strndup(const char *str,int n);
ORTP_PUBLIC char *ortp_strdup_printf(const char *fmt,...);
ORTP_PUBLIC char *ortp_strdup_vprintf(const char *fmt, va_list ap);
int ortp_file_exist(const char *pathname);
ORTP_PUBLIC int ortp_file_exist(const char *pathname);
void ortp_get_cur_time(ortpTimeSpec *ret);
ORTP_PUBLIC void ortp_get_cur_time(ortpTimeSpec *ret);
/* portable named pipes and shared memory*/
#if !defined(_WIN32_WCE)
......@@ -287,24 +289,24 @@ typedef int ortp_pipe_t;
#define ORTP_PIPE_INVALID (-1)
#endif
ortp_pipe_t ortp_server_pipe_create(const char *name);
ORTP_PUBLIC ortp_pipe_t ortp_server_pipe_create(const char *name);
/*
* warning: on win32 ortp_server_pipe_accept_client() might return INVALID_HANDLE_VALUE without
* any specific error, this happens when ortp_server_pipe_close() is called on another pipe.
* This pipe api is not thread-safe.
*/
ortp_pipe_t ortp_server_pipe_accept_client(ortp_pipe_t server);
int ortp_server_pipe_close(ortp_pipe_t spipe);
int ortp_server_pipe_close_client(ortp_pipe_t client);
ORTP_PUBLIC ortp_pipe_t ortp_server_pipe_accept_client(ortp_pipe_t server);
ORTP_PUBLIC int ortp_server_pipe_close(ortp_pipe_t spipe);
ORTP_PUBLIC int ortp_server_pipe_close_client(ortp_pipe_t client);
ortp_pipe_t ortp_client_pipe_connect(const char *name);
int ortp_client_pipe_close(ortp_pipe_t sock);
ORTP_PUBLIC ortp_pipe_t ortp_client_pipe_connect(const char *name);
ORTP_PUBLIC int ortp_client_pipe_close(ortp_pipe_t sock);
int ortp_pipe_read(ortp_pipe_t p, uint8_t *buf, int len);
int ortp_pipe_write(ortp_pipe_t p, const uint8_t *buf, int len);
ORTP_PUBLIC int ortp_pipe_read(ortp_pipe_t p, uint8_t *buf, int len);
ORTP_PUBLIC int ortp_pipe_write(ortp_pipe_t p, const uint8_t *buf, int len);
void *ortp_shm_open(unsigned int keyid, int size, int create);
void ortp_shm_close(void *memory);
ORTP_PUBLIC void *ortp_shm_open(unsigned int keyid, int size, int create);
ORTP_PUBLIC void ortp_shm_close(void *memory);
#endif
......
......@@ -197,8 +197,8 @@ typedef struct rtcp_app{
} rtcp_app_t;
struct _RtpSession;
void rtp_session_rtcp_process_send(struct _RtpSession *s);
void rtp_session_rtcp_process_recv(struct _RtpSession *s);
ORTP_PUBLIC void rtp_session_rtcp_process_send(struct _RtpSession *s);
ORTP_PUBLIC void rtp_session_rtcp_process_recv(struct _RtpSession *s);
#define RTCP_DEFAULT_REPORT_INTERVAL 5000 /*ms*/
......@@ -208,42 +208,42 @@ void rtp_session_rtcp_process_recv(struct _RtpSession *s);
/*in case of coumpound packet, set read pointer of m to the beginning of the next RTCP
packet */
bool_t rtcp_next_packet(mblk_t *m);
ORTP_PUBLIC bool_t rtcp_next_packet(mblk_t *m);
/* put the read pointer at the first RTCP packet of the compound packet (as before any previous calls ot rtcp_next_packet() */
void rtcp_rewind(mblk_t *m);
ORTP_PUBLIC void rtcp_rewind(mblk_t *m);
/* get common header*/
const rtcp_common_header_t * rtcp_get_common_header(const mblk_t *m);
ORTP_PUBLIC const rtcp_common_header_t * rtcp_get_common_header(const mblk_t *m);
/*Sender Report accessors */
/* check if this packet is a SR and if it is correct */
bool_t rtcp_is_SR(const mblk_t *m);
uint32_t rtcp_SR_get_ssrc(const mblk_t *m);
const sender_info_t * rtcp_SR_get_sender_info(const mblk_t *m);
const report_block_t * rtcp_SR_get_report_block(const mblk_t *m, int idx);
ORTP_PUBLIC bool_t rtcp_is_SR(const mblk_t *m);
ORTP_PUBLIC uint32_t rtcp_SR_get_ssrc(const mblk_t *m);
ORTP_PUBLIC const sender_info_t * rtcp_SR_get_sender_info(const mblk_t *m);
ORTP_PUBLIC const report_block_t * rtcp_SR_get_report_block(const mblk_t *m, int idx);
/*Receiver report accessors*/
bool_t rtcp_is_RR(const mblk_t *m);
uint32_t rtcp_RR_get_ssrc(const mblk_t *m);
const report_block_t * rtcp_RR_get_report_block(const mblk_t *m,int idx);
ORTP_PUBLIC bool_t rtcp_is_RR(const mblk_t *m);
ORTP_PUBLIC uint32_t rtcp_RR_get_ssrc(const mblk_t *m);
ORTP_PUBLIC const report_block_t * rtcp_RR_get_report_block(const mblk_t *m,int idx);
/*SDES accessors */
bool_t rtcp_is_SDES(const mblk_t *m);
ORTP_PUBLIC bool_t rtcp_is_SDES(const mblk_t *m);
typedef void (*SdesItemFoundCallback)(void *user_data, uint32_t csrc, rtcp_sdes_type_t t, const char *content, uint8_t content_len);
void rtcp_sdes_parse(const mblk_t *m, SdesItemFoundCallback cb, void *user_data);
ORTP_PUBLIC void rtcp_sdes_parse(const mblk_t *m, SdesItemFoundCallback cb, void *user_data);
/*BYE accessors */
bool_t rtcp_is_BYE(const mblk_t *m);
bool_t rtcp_BYE_get_ssrc(const mblk_t *m, int idx, uint32_t *ssrc);
bool_t rtcp_BYE_get_reason(const mblk_t *m, const char **reason, int *reason_len);
ORTP_PUBLIC bool_t rtcp_is_BYE(const mblk_t *m);
ORTP_PUBLIC bool_t rtcp_BYE_get_ssrc(const mblk_t *m, int idx, uint32_t *ssrc);
ORTP_PUBLIC bool_t rtcp_BYE_get_reason(const mblk_t *m, const char **reason, int *reason_len);
/*APP accessors */
bool_t rtcp_is_APP(const mblk_t *m);
int rtcp_APP_get_subtype(const mblk_t *m);
uint32_t rtcp_APP_get_ssrc(const mblk_t *m);
ORTP_PUBLIC bool_t rtcp_is_APP(const mblk_t *m);
ORTP_PUBLIC int rtcp_APP_get_subtype(const mblk_t *m);
ORTP_PUBLIC uint32_t rtcp_APP_get_ssrc(const mblk_t *m);
/* name argument is supposed to be at least 4 characters (note: no '\0' written)*/
void rtcp_APP_get_name(const mblk_t *m, char *name);
ORTP_PUBLIC void rtcp_APP_get_name(const mblk_t *m, char *name);
/* retrieve the data. when returning, data points directly into the mblk_t */
void rtcp_APP_get_data(const mblk_t *m, uint8_t **data, int *len);
ORTP_PUBLIC void rtcp_APP_get_data(const mblk_t *m, uint8_t **data, int *len);
#ifdef __cplusplus
......
......@@ -104,7 +104,7 @@ extern "C"{
#define rtp_set_seqnumber(mp,seq) ((rtp_header_t*)((mp)->b_rptr))->seq_number=(seq)
#define rtp_set_timestamp(mp,ts) ((rtp_header_t*)((mp)->b_rptr))->timestamp=(ts)
#define rtp_set_ssrc(mp,_ssrc) ((rtp_header_t*)((mp)->b_rptr))->ssrc=(_ssrc)
void rtp_add_csrc(mblk_t *mp ,uint32_t csrc);
ORTP_PUBLIC void rtp_add_csrc(mblk_t *mp ,uint32_t csrc);
#define rtp_set_payload_type(mp,pt) ((rtp_header_t*)((mp)->b_rptr))->paytype=(pt)
#define rtp_get_markbit(mp) (((rtp_header_t*)((mp)->b_rptr))->markbit)
......@@ -116,8 +116,8 @@ void rtp_add_csrc(mblk_t *mp ,uint32_t csrc);
#define rtp_get_cc(mp) (((rtp_header_t*)((mp)->b_rptr))->cc)
#define rtp_get_csrc(mp, idx) (((rtp_header_t*)((mp)->b_rptr))->csrc[idx])
int rtp_get_payload(mblk_t *packet, unsigned char **start);
int rtp_get_extheader(mblk_t *packet, uint16_t *profile, uint8_t **start_ext);
ORTP_PUBLIC int rtp_get_payload(mblk_t *packet, unsigned char **start);
ORTP_PUBLIC int rtp_get_extheader(mblk_t *packet, uint16_t *profile, uint8_t **start_ext);
#ifdef __cplusplus
}
......
......@@ -51,7 +51,7 @@ VAR_DECLSPEC RtpProfile av_profile;
#define rtp_profile_get_name(profile) (const char*)((profile)->name)
void rtp_profile_set_payload(RtpProfile *prof, int idx, PayloadType *pt);
ORTP_PUBLIC void rtp_profile_set_payload(RtpProfile *prof, int idx, PayloadType *pt);
/**
* Set payload type number @index unassigned in the profile.
......@@ -77,25 +77,25 @@ static inline PayloadType * rtp_profile_get_payload(RtpProfile *prof, int idx){
}
return prof->payload[idx];
}
void rtp_profile_clear_all(RtpProfile *prof);
void rtp_profile_set_name(RtpProfile *prof, const char *name);
PayloadType * rtp_profile_get_payload_from_mime(RtpProfile *profile,const char *mime);
PayloadType * rtp_profile_get_payload_from_rtpmap(RtpProfile *profile, const char *rtpmap);
int rtp_profile_get_payload_number_from_mime(RtpProfile *profile,const char *mime);
int rtp_profile_get_payload_number_from_rtpmap(RtpProfile *profile, const char *rtpmap);
int rtp_profile_find_payload_number(RtpProfile *prof,const char *mime,int rate, int channels);
PayloadType * rtp_profile_find_payload(RtpProfile *prof,const char *mime,int rate, int channels);
int rtp_profile_move_payload(RtpProfile *prof,int oldpos,int newpos);
RtpProfile * rtp_profile_new(const char *name);
ORTP_PUBLIC void rtp_profile_clear_all(RtpProfile *prof);
ORTP_PUBLIC void rtp_profile_set_name(RtpProfile *prof, const char *name);
ORTP_PUBLIC PayloadType * rtp_profile_get_payload_from_mime(RtpProfile *profile,const char *mime);
ORTP_PUBLIC PayloadType * rtp_profile_get_payload_from_rtpmap(RtpProfile *profile, const char *rtpmap);
ORTP_PUBLIC int rtp_profile_get_payload_number_from_mime(RtpProfile *profile,const char *mime);
ORTP_PUBLIC int rtp_profile_get_payload_number_from_rtpmap(RtpProfile *profile, const char *rtpmap);
ORTP_PUBLIC int rtp_profile_find_payload_number(RtpProfile *prof,const char *mime,int rate, int channels);
ORTP_PUBLIC PayloadType * rtp_profile_find_payload(RtpProfile *prof,const char *mime,int rate, int channels);
ORTP_PUBLIC int rtp_profile_move_payload(RtpProfile *prof,int oldpos,int newpos);
ORTP_PUBLIC RtpProfile * rtp_profile_new(const char *name);
/* clone a profile, payload are not cloned */
RtpProfile * rtp_profile_clone(RtpProfile *prof);
ORTP_PUBLIC RtpProfile * rtp_profile_clone(RtpProfile *prof);
/*clone a profile and its payloads (ie payload type are newly allocated, not reusing payload types of the reference profile) */
RtpProfile * rtp_profile_clone_full(RtpProfile *prof);
ORTP_PUBLIC RtpProfile * rtp_profile_clone_full(RtpProfile *prof);
/* frees the profile and all its PayloadTypes*/
void rtp_profile_destroy(RtpProfile *prof);
ORTP_PUBLIC void rtp_profile_destroy(RtpProfile *prof);
#ifdef __cplusplus
}
......
This diff is collapsed.
......@@ -95,7 +95,7 @@ typedef struct _SessionSet SessionSet;
#define session_set_init(ss) ORTP_FD_ZERO(&(ss)->rtpset)
SessionSet * session_set_new(void);
ORTP_PUBLIC SessionSet * session_set_new(void);
/**
* This macro adds the rtp session to the set.
* @param ss a set (SessionSet object)
......@@ -126,11 +126,11 @@ SessionSet * session_set_new(void);
/**
* Frees a SessionSet.
**/
void session_set_destroy(SessionSet *set);
ORTP_PUBLIC void session_set_destroy(SessionSet *set);
int session_set_select(SessionSet *recvs, SessionSet *sends, SessionSet *errors);
int session_set_timedselect(SessionSet *recvs, SessionSet *sends, SessionSet *errors, struct timeval *timeout);
ORTP_PUBLIC int session_set_select(SessionSet *recvs, SessionSet *sends, SessionSet *errors);
ORTP_PUBLIC int session_set_timedselect(SessionSet *recvs, SessionSet *sends, SessionSet *errors, struct timeval *timeout);
#ifdef __cplusplus
}
......
......@@ -82,62 +82,62 @@ typedef struct _queue
extern "C" {
#endif