Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

Media Bugs
[Core Library]


Functions

void switch_core_session_enable_heartbeat (switch_core_session_t *session, uint32_t seconds)
void switch_core_session_disable_heartbeat (switch_core_session_t *session)
switch_status_t switch_core_media_bug_add (_In_ switch_core_session_t *session, _In_ switch_media_bug_callback_t callback, _In_opt_ void *user_data, _In_ time_t stop_time, _In_ switch_media_bug_flag_t flags, _Out_ switch_media_bug_t **new_bug)
 Add a media bug to the session.
void * switch_core_media_bug_get_user_data (_In_ switch_media_bug_t *bug)
 Obtain private data from a media bug.
switch_frame_tswitch_core_media_bug_get_write_replace_frame (_In_ switch_media_bug_t *bug)
 Obtain a replace frame from a media bug.
void switch_core_media_bug_set_write_replace_frame (_In_ switch_media_bug_t *bug, _In_ switch_frame_t *frame)
 Set a return replace frame.
switch_frame_tswitch_core_media_bug_get_read_replace_frame (_In_ switch_media_bug_t *bug)
 Obtain a replace frame from a media bug.
switch_core_session_tswitch_core_media_bug_get_session (_In_ switch_media_bug_t *bug)
 Obtain the session from a media bug.
uint32_t switch_core_media_bug_test_flag (_In_ switch_media_bug_t *bug, _In_ uint32_t flag)
void switch_core_media_bug_set_read_replace_frame (_In_ switch_media_bug_t *bug, _In_ switch_frame_t *frame)
 Set a return replace frame.
switch_status_t switch_core_media_bug_remove (_In_ switch_core_session_t *session, _Inout_ switch_media_bug_t **bug)
 Remove a media bug from the session.
switch_status_t switch_core_media_bug_close (_Inout_ switch_media_bug_t **bug)
 Close and destroy a media bug.
switch_status_t switch_core_media_bug_remove_all (_In_ switch_core_session_t *session)
 Remove all media bugs from the session.
switch_status_t switch_core_media_bug_read (_In_ switch_media_bug_t *bug, _In_ switch_frame_t *frame)
 Read a frame from the bug.


Function Documentation

switch_status_t switch_core_media_bug_add _In_ switch_core_session_t session,
_In_ switch_media_bug_callback_t  callback,
_In_opt_ void *  user_data,
_In_ time_t  stop_time,
_In_ switch_media_bug_flag_t  flags,
_Out_ switch_media_bug_t **  new_bug
 

Add a media bug to the session.

Parameters:
session the session to add the bug to
callback a callback for events
user_data arbitrary user data
stop_time absolute time at which the bug is automatically removed
flags flags to choose the stream
new_bug pointer to assign new bug to
Returns:
SWITCH_STATUS_SUCCESS if the operation was a success

switch_status_t switch_core_media_bug_close _Inout_ switch_media_bug_t **  bug  ) 
 

Close and destroy a media bug.

Parameters:
bug bug to remove
Returns:
SWITCH_STATUS_SUCCESS if the operation was a success

switch_frame_t* switch_core_media_bug_get_read_replace_frame _In_ switch_media_bug_t bug  ) 
 

Obtain a replace frame from a media bug.

Parameters:
bug the bug to get the data from

switch_core_session_t* switch_core_media_bug_get_session _In_ switch_media_bug_t bug  ) 
 

Obtain the session from a media bug.

Parameters:
bug the bug to get the data from

void* switch_core_media_bug_get_user_data _In_ switch_media_bug_t bug  ) 
 

Obtain private data from a media bug.

Parameters:
bug the bug to get the data from
Returns:
the private data

switch_frame_t* switch_core_media_bug_get_write_replace_frame _In_ switch_media_bug_t bug  ) 
 

Obtain a replace frame from a media bug.

Parameters:
bug the bug to get the data from

switch_status_t switch_core_media_bug_read _In_ switch_media_bug_t bug,
_In_ switch_frame_t frame
 

Read a frame from the bug.

Parameters:
bug the bug to read from
frame the frame to write the data to
Returns:
the amount of data

switch_status_t switch_core_media_bug_remove _In_ switch_core_session_t session,
_Inout_ switch_media_bug_t **  bug
 

Remove a media bug from the session.

Parameters:
session the session to remove the bug from
bug bug to remove
Returns:
SWITCH_STATUS_SUCCESS if the operation was a success

switch_status_t switch_core_media_bug_remove_all _In_ switch_core_session_t session  ) 
 

Remove all media bugs from the session.

Parameters:
session the session to remove the bugs from
Returns:
SWITCH_STATUS_SUCCESS if the operation was a success

void switch_core_media_bug_set_read_replace_frame _In_ switch_media_bug_t bug,
_In_ switch_frame_t frame
 

Set a return replace frame.

Parameters:
bug the bug to set the frame on
frame the frame to set

void switch_core_media_bug_set_write_replace_frame _In_ switch_media_bug_t bug,
_In_ switch_frame_t frame
 

Set a return replace frame.

Parameters:
bug the bug to set the frame on
frame the frame to set

uint32_t switch_core_media_bug_test_flag _In_ switch_media_bug_t bug,
_In_ uint32_t  flag
 

void switch_core_session_disable_heartbeat switch_core_session_t session  ) 
 

00798 {
00799         switch_assert(session != NULL);
00800         session->read_frame_count = 0;
00801         session->track_duration = 0;
00802 }

void switch_core_session_enable_heartbeat switch_core_session_t session,
uint32_t  seconds
 

00784 {
00785         switch_assert(session != NULL);
00786 
00787         if (seconds < 10) {
00788                 seconds = 60;
00789         }
00790 
00791         switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "%s setting session heartbeat to %u second(s).\n", 
00792                                           switch_channel_get_name(session->channel), seconds);
00793         session->track_duration = seconds;
00794         session->read_frame_count = 0;
00795 }

Here is the call graph for this function:


Generated on Fri Oct 10 11:24:32 2008 for FreeSWITCH by  doxygen 1.3.9.1