mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 20:51:58 +00:00
convert rtp flags to arrays
This commit is contained in:
@@ -176,6 +176,8 @@ struct switch_core_session {
|
||||
plc_state_t *plc;
|
||||
uint8_t recur_buffer[SWITCH_RECOMMENDED_BUFFER_SIZE];
|
||||
switch_size_t recur_buffer_len;
|
||||
|
||||
switch_media_handle_t *media_handle;
|
||||
};
|
||||
|
||||
struct switch_media_bug {
|
||||
|
||||
@@ -143,6 +143,7 @@
|
||||
#include "switch_pgsql.h"
|
||||
#include "switch_json.h"
|
||||
#include "switch_limit.h"
|
||||
#include "switch_core_media.h"
|
||||
#include <libteletone.h>
|
||||
|
||||
|
||||
|
||||
@@ -29,13 +29,29 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SWITCH_CORE_H
|
||||
#define SWITCH_CORE_H
|
||||
#ifndef SWITCH_CORE_MEDIA_H
|
||||
#define SWITCH_CORE_MEDIA_H
|
||||
|
||||
#include <switch.h>
|
||||
|
||||
SWITCH_BEGIN_EXTERN_C
|
||||
|
||||
typedef enum {
|
||||
SM_NDLB_ALLOW_BAD_IANANAME = (1 << 0),
|
||||
SM_NDLB_ALLOW_NONDUP_SDP = (1 << 1),
|
||||
SM_NDLB_ALLOW_CRYPTO_IN_AVP = (1 << 2)
|
||||
} switch_core_media_NDLB_t;
|
||||
|
||||
struct switch_media_handle_s;
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_media_handle_create(switch_media_handle_t **smhp, switch_core_session_t *session);
|
||||
SWITCH_DECLARE(switch_media_handle_t *) switch_core_session_get_media_handle(switch_core_session_t *session);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_clear_media_handle(switch_core_session_t *session);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_media_handle_ready(switch_core_session_t *session);
|
||||
SWITCH_DECLARE(void) switch_media_handle_set_ndlb(switch_media_handle_t *smh, switch_core_media_NDLB_t flag);
|
||||
SWITCH_DECLARE(void) switch_media_handle_clear_ndlb(switch_media_handle_t *smh, switch_core_media_NDLB_t flag);
|
||||
SWITCH_DECLARE(int32_t) switch_media_handle_test_ndlb(switch_media_handle_t *smh, switch_core_media_NDLB_t flag);
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
#endif
|
||||
|
||||
@@ -134,7 +134,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_create(switch_rtp_t **new_rtp_session
|
||||
switch_payload_t payload,
|
||||
uint32_t samples_per_interval,
|
||||
uint32_t ms_per_packet,
|
||||
switch_rtp_flag_t flags, char *timer_name, const char **err, switch_memory_pool_t *pool);
|
||||
switch_rtp_flag_t flags[], char *timer_name, const char **err, switch_memory_pool_t *pool);
|
||||
|
||||
|
||||
/*!
|
||||
@@ -159,7 +159,7 @@ SWITCH_DECLARE(switch_rtp_t *) switch_rtp_new(const char *rx_host,
|
||||
switch_payload_t payload,
|
||||
uint32_t samples_per_interval,
|
||||
uint32_t ms_per_packet,
|
||||
switch_rtp_flag_t flags, char *timer_name, const char **err, switch_memory_pool_t *pool);
|
||||
switch_rtp_flag_t flags[], char *timer_name, const char **err, switch_memory_pool_t *pool);
|
||||
|
||||
|
||||
/*!
|
||||
@@ -248,7 +248,9 @@ SWITCH_DECLARE(stfu_instance_t *) switch_rtp_get_jitter_buffer(switch_rtp_t *rtp
|
||||
\param rtp_session the RTP session
|
||||
\param flags the flags to set
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_rtp_set_flag(switch_rtp_t *rtp_session, switch_rtp_flag_t flags);
|
||||
SWITCH_DECLARE(void) switch_rtp_set_flag(switch_rtp_t *rtp_session, switch_rtp_flag_t flag);
|
||||
SWITCH_DECLARE(void) switch_rtp_set_flags(switch_rtp_t *rtp_session, switch_rtp_flag_t flags[SWITCH_RTP_FLAG_INVALID]);
|
||||
SWITCH_DECLARE(void) switch_rtp_clear_flags(switch_rtp_t *rtp_session, switch_rtp_flag_t flags[SWITCH_RTP_FLAG_INVALID]);
|
||||
|
||||
/*!
|
||||
\brief Test an RTP Flag
|
||||
@@ -263,7 +265,7 @@ SWITCH_DECLARE(uint32_t) switch_rtp_test_flag(switch_rtp_t *rtp_session, switch_
|
||||
\param rtp_session the RTP session
|
||||
\param flags the flags to clear
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_rtp_clear_flag(switch_rtp_t *rtp_session, switch_rtp_flag_t flags);
|
||||
SWITCH_DECLARE(void) switch_rtp_clear_flag(switch_rtp_t *rtp_session, switch_rtp_flag_t flag);
|
||||
|
||||
/*!
|
||||
\brief Retrieve the socket from an existing RTP session
|
||||
|
||||
+37
-32
@@ -610,38 +610,39 @@ typedef enum {
|
||||
</pre>
|
||||
*/
|
||||
typedef enum {
|
||||
SWITCH_RTP_FLAG_NOBLOCK = (1 << 0),
|
||||
SWITCH_RTP_FLAG_IO = (1 << 1),
|
||||
SWITCH_RTP_FLAG_USE_TIMER = (1 << 2),
|
||||
SWITCH_RTP_FLAG_RTCP_PASSTHRU = (1 << 3),
|
||||
SWITCH_RTP_FLAG_SECURE_SEND = (1 << 4),
|
||||
SWITCH_RTP_FLAG_SECURE_RECV = (1 << 5),
|
||||
SWITCH_RTP_FLAG_AUTOADJ = (1 << 6),
|
||||
SWITCH_RTP_FLAG_RAW_WRITE = (1 << 7),
|
||||
SWITCH_RTP_FLAG_GOOGLEHACK = (1 << 8),
|
||||
SWITCH_RTP_FLAG_VAD = (1 << 9),
|
||||
SWITCH_RTP_FLAG_BREAK = (1 << 10),
|
||||
SWITCH_RTP_FLAG_UDPTL = (1 << 11),
|
||||
SWITCH_RTP_FLAG_DATAWAIT = (1 << 12),
|
||||
SWITCH_RTP_FLAG_BYTESWAP = (1 << 13),
|
||||
SWITCH_RTP_FLAG_PASS_RFC2833 = (1 << 14),
|
||||
SWITCH_RTP_FLAG_AUTO_CNG = (1 << 15),
|
||||
SWITCH_RTP_FLAG_SECURE_SEND_RESET = (1 << 16),
|
||||
SWITCH_RTP_FLAG_SECURE_RECV_RESET = (1 << 17),
|
||||
SWITCH_RTP_FLAG_PROXY_MEDIA = (1 << 18),
|
||||
SWITCH_RTP_FLAG_SHUTDOWN = (1 << 19),
|
||||
SWITCH_RTP_FLAG_FLUSH = (1 << 20),
|
||||
SWITCH_RTP_FLAG_AUTOFLUSH = (1 << 21),
|
||||
SWITCH_RTP_FLAG_STICKY_FLUSH = (1 << 22),
|
||||
SWITCH_ZRTP_FLAG_SECURE_SEND = (1 << 23),
|
||||
SWITCH_ZRTP_FLAG_SECURE_RECV = (1 << 24),
|
||||
SWITCH_ZRTP_FLAG_SECURE_MITM_SEND = (1 << 25),
|
||||
SWITCH_ZRTP_FLAG_SECURE_MITM_RECV = (1 << 26),
|
||||
SWITCH_RTP_FLAG_DEBUG_RTP_READ = (1 << 27),
|
||||
SWITCH_RTP_FLAG_DEBUG_RTP_WRITE = (1 << 28),
|
||||
SWITCH_RTP_FLAG_VIDEO = (1 << 29),
|
||||
SWITCH_RTP_FLAG_ENABLE_RTCP = (1 << 30)
|
||||
/* don't add any more 31 is the limit! gotta chnge to an array to add more */
|
||||
SWITCH_RTP_FLAG_NOBLOCK = 0,
|
||||
SWITCH_RTP_FLAG_IO,
|
||||
SWITCH_RTP_FLAG_USE_TIMER,
|
||||
SWITCH_RTP_FLAG_RTCP_PASSTHRU,
|
||||
SWITCH_RTP_FLAG_SECURE_SEND,
|
||||
SWITCH_RTP_FLAG_SECURE_RECV,
|
||||
SWITCH_RTP_FLAG_AUTOADJ,
|
||||
SWITCH_RTP_FLAG_RAW_WRITE,
|
||||
SWITCH_RTP_FLAG_GOOGLEHACK,
|
||||
SWITCH_RTP_FLAG_VAD,
|
||||
SWITCH_RTP_FLAG_BREAK,
|
||||
SWITCH_RTP_FLAG_UDPTL,
|
||||
SWITCH_RTP_FLAG_DATAWAIT,
|
||||
SWITCH_RTP_FLAG_BYTESWAP,
|
||||
SWITCH_RTP_FLAG_PASS_RFC2833,
|
||||
SWITCH_RTP_FLAG_AUTO_CNG,
|
||||
SWITCH_RTP_FLAG_SECURE_SEND_RESET,
|
||||
SWITCH_RTP_FLAG_SECURE_RECV_RESET,
|
||||
SWITCH_RTP_FLAG_PROXY_MEDIA,
|
||||
SWITCH_RTP_FLAG_SHUTDOWN,
|
||||
SWITCH_RTP_FLAG_FLUSH,
|
||||
SWITCH_RTP_FLAG_AUTOFLUSH,
|
||||
SWITCH_RTP_FLAG_STICKY_FLUSH,
|
||||
SWITCH_ZRTP_FLAG_SECURE_SEND,
|
||||
SWITCH_ZRTP_FLAG_SECURE_RECV,
|
||||
SWITCH_ZRTP_FLAG_SECURE_MITM_SEND,
|
||||
SWITCH_ZRTP_FLAG_SECURE_MITM_RECV,
|
||||
SWITCH_RTP_FLAG_DEBUG_RTP_READ,
|
||||
SWITCH_RTP_FLAG_DEBUG_RTP_WRITE,
|
||||
SWITCH_RTP_FLAG_VIDEO,
|
||||
SWITCH_RTP_FLAG_ENABLE_RTCP,
|
||||
/* don't add any below this one */
|
||||
SWITCH_RTP_FLAG_INVALID
|
||||
} switch_rtp_flag_enum_t;
|
||||
typedef uint32_t switch_rtp_flag_t;
|
||||
|
||||
@@ -2125,6 +2126,10 @@ struct switch_media_bug;
|
||||
struct switch_ivr_digit_stream_parser;
|
||||
struct sql_queue_manager;
|
||||
|
||||
struct switch_media_handle_s;
|
||||
typedef struct switch_media_handle_s switch_media_handle_t;
|
||||
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
#endif
|
||||
/* For Emacs:
|
||||
|
||||
Reference in New Issue
Block a user