mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 20:51:58 +00:00
spring cleaning, lose some pointless code
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8310 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -809,10 +809,10 @@ SWITCH_DECLARE(uint32_t) switch_core_session_flush_private_events(switch_core_se
|
||||
\param stream_id which logical media channel to use
|
||||
\return SWITCH_STATUS_SUCCESS a the frame was read
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(_In_ switch_core_session_t *session, switch_frame_t **frame, int timeout, int stream_id);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(_In_ switch_core_session_t *session, switch_frame_t **frame, switch_io_flag_t flags, int stream_id);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_read_video_frame(_In_ switch_core_session_t *session, switch_frame_t **frame, int timeout, int stream_id);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_write_video_frame(_In_ switch_core_session_t *session, switch_frame_t *frame, int timeout, int stream_id);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_read_video_frame(_In_ switch_core_session_t *session, switch_frame_t **frame, switch_io_flag_t flags, int stream_id);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_write_video_frame(_In_ switch_core_session_t *session, switch_frame_t *frame, switch_io_flag_t flags, int stream_id);
|
||||
|
||||
/*!
|
||||
\brief Reset the buffers and resampler on a session
|
||||
@@ -828,7 +828,7 @@ SWITCH_DECLARE(void) switch_core_session_reset(_In_ switch_core_session_t *sessi
|
||||
\param stream_id which logical media channel to use
|
||||
\return SWITCH_STATUS_SUCCESS a the frame was written
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(_In_ switch_core_session_t *session, switch_frame_t *frame, int timeout, int stream_id);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(_In_ switch_core_session_t *session, switch_frame_t *frame, switch_io_flag_t flags, int stream_id);
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_perform_kill_channel(_In_ switch_core_session_t *session,
|
||||
@@ -841,24 +841,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_perform_kill_channel(_In_ sw
|
||||
*/
|
||||
#define switch_core_session_kill_channel(session, sig) switch_core_session_perform_kill_channel(session, __FILE__, __SWITCH_FUNC__, __LINE__, sig)
|
||||
|
||||
/*!
|
||||
\brief Wait for a session to be ready for input
|
||||
\param session session to wait for
|
||||
\param timeout number of milliseconds to wait for data
|
||||
\param stream_id which logical media channel to use
|
||||
\return SWITCH_STATUS_SUCCESS if data is available for read within timeframe specified
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_waitfor_read(_In_ switch_core_session_t *session, int timeout, int stream_id);
|
||||
|
||||
/*!
|
||||
\brief Wait for a session to be ready for output
|
||||
\param session session to wait for
|
||||
\param timeout number of milliseconds to wait for data
|
||||
\param stream_id which logical media channel to use
|
||||
\return SWITCH_STATUS_SUCCESS if the session is available for write within timeframe specified
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_session_waitfor_write(_In_ switch_core_session_t *session, int timeout, int stream_id);
|
||||
|
||||
/*!
|
||||
\brief Send DTMF to a session
|
||||
\param session session to send DTMF to
|
||||
|
||||
@@ -43,8 +43,6 @@ typedef struct switch_io_event_hook_video_read_frame switch_io_event_hook_video_
|
||||
typedef struct switch_io_event_hook_write_frame switch_io_event_hook_write_frame_t;
|
||||
typedef struct switch_io_event_hook_video_write_frame switch_io_event_hook_video_write_frame_t;
|
||||
typedef struct switch_io_event_hook_kill_channel switch_io_event_hook_kill_channel_t;
|
||||
typedef struct switch_io_event_hook_waitfor_read switch_io_event_hook_waitfor_read_t;
|
||||
typedef struct switch_io_event_hook_waitfor_write switch_io_event_hook_waitfor_write_t;
|
||||
typedef struct switch_io_event_hook_send_dtmf switch_io_event_hook_send_dtmf_t;
|
||||
typedef struct switch_io_event_hook_recv_dtmf switch_io_event_hook_recv_dtmf_t;
|
||||
typedef struct switch_io_event_hook_state_change switch_io_event_hook_state_change_t;
|
||||
@@ -53,13 +51,11 @@ typedef switch_status_t (*switch_outgoing_channel_hook_t)
|
||||
(switch_core_session_t *, switch_caller_profile_t *, switch_core_session_t *, switch_originate_flag_t);
|
||||
typedef switch_status_t (*switch_receive_message_hook_t) (switch_core_session_t *, switch_core_session_message_t *);
|
||||
typedef switch_status_t (*switch_receive_event_hook_t) (switch_core_session_t *, switch_event_t *);
|
||||
typedef switch_status_t (*switch_read_frame_hook_t) (switch_core_session_t *, switch_frame_t **, int, switch_io_flag_t, int);
|
||||
typedef switch_status_t (*switch_video_read_frame_hook_t) (switch_core_session_t *, switch_frame_t **, int, switch_io_flag_t, int);
|
||||
typedef switch_status_t (*switch_write_frame_hook_t) (switch_core_session_t *, switch_frame_t *, int, switch_io_flag_t, int);
|
||||
typedef switch_status_t (*switch_video_write_frame_hook_t) (switch_core_session_t *, switch_frame_t *, int, switch_io_flag_t, int);
|
||||
typedef switch_status_t (*switch_read_frame_hook_t) (switch_core_session_t *, switch_frame_t **, switch_io_flag_t, int);
|
||||
typedef switch_status_t (*switch_video_read_frame_hook_t) (switch_core_session_t *, switch_frame_t **, switch_io_flag_t, int);
|
||||
typedef switch_status_t (*switch_write_frame_hook_t) (switch_core_session_t *, switch_frame_t *, switch_io_flag_t, int);
|
||||
typedef switch_status_t (*switch_video_write_frame_hook_t) (switch_core_session_t *, switch_frame_t *, switch_io_flag_t, int);
|
||||
typedef switch_status_t (*switch_kill_channel_hook_t) (switch_core_session_t *, int);
|
||||
typedef switch_status_t (*switch_waitfor_read_hook_t) (switch_core_session_t *, int, int);
|
||||
typedef switch_status_t (*switch_waitfor_write_hook_t) (switch_core_session_t *, int, int);
|
||||
typedef switch_status_t (*switch_send_dtmf_hook_t) (switch_core_session_t *, const switch_dtmf_t *);
|
||||
typedef switch_status_t (*switch_recv_dtmf_hook_t) (switch_core_session_t *, const switch_dtmf_t *);
|
||||
typedef switch_status_t (*switch_state_change_hook_t) (switch_core_session_t *);
|
||||
@@ -120,20 +116,6 @@ struct switch_io_event_hook_kill_channel {
|
||||
struct switch_io_event_hook_kill_channel *next;
|
||||
};
|
||||
|
||||
/*! \brief Node in which to store custom waitfor read channel callback hooks */
|
||||
struct switch_io_event_hook_waitfor_read {
|
||||
/*! the waitfor read channel callback hook */
|
||||
switch_waitfor_read_hook_t waitfor_read;
|
||||
struct switch_io_event_hook_waitfor_read *next;
|
||||
};
|
||||
|
||||
/*! \brief Node in which to store custom waitfor write channel callback hooks */
|
||||
struct switch_io_event_hook_waitfor_write {
|
||||
/*! the waitfor write channel callback hook */
|
||||
switch_waitfor_write_hook_t waitfor_write;
|
||||
struct switch_io_event_hook_waitfor_write *next;
|
||||
};
|
||||
|
||||
/*! \brief Node in which to store custom send dtmf channel callback hooks */
|
||||
struct switch_io_event_hook_send_dtmf {
|
||||
/*! the send dtmf channel callback hook */
|
||||
@@ -179,10 +161,6 @@ struct switch_io_event_hooks {
|
||||
switch_io_event_hook_video_write_frame_t *video_write_frame;
|
||||
/*! a list of kill channel hooks */
|
||||
switch_io_event_hook_kill_channel_t *kill_channel;
|
||||
/*! a list of wait for read hooks */
|
||||
switch_io_event_hook_waitfor_read_t *waitfor_read;
|
||||
/*! a list of wait for write hooks */
|
||||
switch_io_event_hook_waitfor_write_t *waitfor_write;
|
||||
/*! a list of send dtmf hooks */
|
||||
switch_io_event_hook_send_dtmf_t *send_dtmf;
|
||||
/*! a list of recv dtmf hooks */
|
||||
@@ -244,8 +222,6 @@ NEW_HOOK_DECL_ADD_P(write_frame);
|
||||
NEW_HOOK_DECL_ADD_P(video_read_frame);
|
||||
NEW_HOOK_DECL_ADD_P(video_write_frame);
|
||||
NEW_HOOK_DECL_ADD_P(kill_channel);
|
||||
NEW_HOOK_DECL_ADD_P(waitfor_read);
|
||||
NEW_HOOK_DECL_ADD_P(waitfor_write);
|
||||
NEW_HOOK_DECL_ADD_P(send_dtmf);
|
||||
NEW_HOOK_DECL_ADD_P(recv_dtmf);
|
||||
NEW_HOOK_DECL_ADD_P(resurrect_session);
|
||||
@@ -259,8 +235,6 @@ NEW_HOOK_DECL_REM_P(write_frame);
|
||||
NEW_HOOK_DECL_REM_P(video_read_frame);
|
||||
NEW_HOOK_DECL_REM_P(video_write_frame);
|
||||
NEW_HOOK_DECL_REM_P(kill_channel);
|
||||
NEW_HOOK_DECL_REM_P(waitfor_read);
|
||||
NEW_HOOK_DECL_REM_P(waitfor_write);
|
||||
NEW_HOOK_DECL_REM_P(send_dtmf);
|
||||
NEW_HOOK_DECL_REM_P(recv_dtmf);
|
||||
NEW_HOOK_DECL_REM_P(resurrect_session);
|
||||
|
||||
@@ -101,17 +101,15 @@ struct switch_io_event_hooks;
|
||||
|
||||
typedef switch_call_cause_t (*switch_io_outgoing_channel_t)
|
||||
(switch_core_session_t *, switch_caller_profile_t *, switch_core_session_t **, switch_memory_pool_t **, switch_originate_flag_t);
|
||||
typedef switch_status_t (*switch_io_read_frame_t) (switch_core_session_t *, switch_frame_t **, int, switch_io_flag_t, int);
|
||||
typedef switch_status_t (*switch_io_write_frame_t) (switch_core_session_t *, switch_frame_t *, int, switch_io_flag_t, int);
|
||||
typedef switch_status_t (*switch_io_read_frame_t) (switch_core_session_t *, switch_frame_t **, switch_io_flag_t, int);
|
||||
typedef switch_status_t (*switch_io_write_frame_t) (switch_core_session_t *, switch_frame_t *, switch_io_flag_t, int);
|
||||
typedef switch_status_t (*switch_io_kill_channel_t) (switch_core_session_t *, int);
|
||||
typedef switch_status_t (*switch_io_waitfor_read_t) (switch_core_session_t *, int, int);
|
||||
typedef switch_status_t (*switch_io_waitfor_write_t) (switch_core_session_t *, int, int);
|
||||
typedef switch_status_t (*switch_io_send_dtmf_t) (switch_core_session_t *, const switch_dtmf_t *);
|
||||
typedef switch_status_t (*switch_io_receive_message_t) (switch_core_session_t *, switch_core_session_message_t *);
|
||||
typedef switch_status_t (*switch_io_receive_event_t) (switch_core_session_t *, switch_event_t *);
|
||||
typedef switch_status_t (*switch_io_state_change_t) (switch_core_session_t *);
|
||||
typedef switch_status_t (*switch_io_read_video_frame_t) (switch_core_session_t *, switch_frame_t **, int, switch_io_flag_t, int);
|
||||
typedef switch_status_t (*switch_io_write_video_frame_t) (switch_core_session_t *, switch_frame_t *, int, switch_io_flag_t, int);
|
||||
typedef switch_status_t (*switch_io_read_video_frame_t) (switch_core_session_t *, switch_frame_t **, switch_io_flag_t, int);
|
||||
typedef switch_status_t (*switch_io_write_video_frame_t) (switch_core_session_t *, switch_frame_t *, switch_io_flag_t, int);
|
||||
typedef switch_call_cause_t (*switch_io_resurrect_session_t)(switch_core_session_t **, switch_memory_pool_t **, void *);
|
||||
|
||||
typedef enum {
|
||||
@@ -119,8 +117,6 @@ typedef enum {
|
||||
SWITCH_IO_READ_FRAME,
|
||||
SWITCH_IO_WRITE_FRAME,
|
||||
SWITCH_IO_KILL_CHANNEL,
|
||||
SWITCH_IO_WAITFOR_READ,
|
||||
SWITCH_IO_WAITFOR_WRITE,
|
||||
SWITCH_IO_SEND_DTMF,
|
||||
SWITCH_IO_RECEIVE_MESSAGE,
|
||||
SWITCH_IO_RECEIVE_EVENT,
|
||||
@@ -140,10 +136,6 @@ struct switch_io_routines {
|
||||
switch_io_write_frame_t write_frame;
|
||||
/*! send a kill signal to the session's channel */
|
||||
switch_io_kill_channel_t kill_channel;
|
||||
/*! wait for the session's channel to be ready to read audio */
|
||||
switch_io_waitfor_read_t waitfor_read;
|
||||
/*! wait for the session's channel to be ready to write audio */
|
||||
switch_io_waitfor_write_t waitfor_write;
|
||||
/*! send a string of DTMF digits to a session's channel */
|
||||
switch_io_send_dtmf_t send_dtmf;
|
||||
/*! receive a message from another session */
|
||||
|
||||
@@ -296,7 +296,7 @@ SWITCH_DECLARE(void) switch_rtp_set_invald_handler(switch_rtp_t *rtp_session, sw
|
||||
\return the number of bytes read
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_rtp_read(switch_rtp_t *rtp_session, void *data, uint32_t * datalen,
|
||||
switch_payload_t *payload_type, switch_frame_flag_t *flags);
|
||||
switch_payload_t *payload_type, switch_frame_flag_t *flags, switch_io_flag_t io_flags);
|
||||
|
||||
/*!
|
||||
\brief Queue RFC2833 DTMF data into an RTP Session
|
||||
@@ -332,7 +332,7 @@ SWITCH_DECLARE(switch_size_t) switch_rtp_dequeue_dtmf(switch_rtp_t *rtp_session,
|
||||
\return the number of bytes read
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_rtp_zerocopy_read(switch_rtp_t *rtp_session,
|
||||
void **data, uint32_t * datalen, switch_payload_t *payload_type, switch_frame_flag_t *flags);
|
||||
void **data, uint32_t * datalen, switch_payload_t *payload_type, switch_frame_flag_t *flags, switch_io_flag_t io_flags);
|
||||
|
||||
/*!
|
||||
\brief Read data from a given RTP session without copying
|
||||
@@ -340,7 +340,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_zerocopy_read(switch_rtp_t *rtp_sessi
|
||||
\param frame a frame to populate with information
|
||||
\return the number of bytes read
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_rtp_zerocopy_read_frame(switch_rtp_t *rtp_session, switch_frame_t *frame);
|
||||
SWITCH_DECLARE(switch_status_t) switch_rtp_zerocopy_read_frame(switch_rtp_t *rtp_session, switch_frame_t *frame, switch_io_flag_t io_flagsm);
|
||||
|
||||
/*!
|
||||
\brief Enable VAD on an RTP Session
|
||||
|
||||
@@ -943,7 +943,8 @@ typedef enum {
|
||||
} switch_file_flag_t;
|
||||
|
||||
typedef enum {
|
||||
SWITCH_IO_FLAG_NOOP = 0
|
||||
SWITCH_IO_FLAG_NONE = 0,
|
||||
SWITCH_IO_FLAG_NOBLOCK = (1 << 0)
|
||||
} switch_io_flag_t;
|
||||
|
||||
/* make sure this is synced with the EVENT_NAMES array in switch_event.c
|
||||
|
||||
Reference in New Issue
Block a user