mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 05:02:10 +00:00
FS-7500: add ability to insert a custom callback to the core video thread
the callback will be called on each loop on read video frame, or
the callback function call run it's own loop to take over the core
loop so it can read video from session by itself.
the callback function can -
return SWITCH_STATUS_SUCCESS to wait another loop
return SWITCH_STATUS_CONTINUE to continue use the default behaviour
return anything else will break the core video loop and end the
core thread
This commit is contained in:
@@ -103,6 +103,7 @@ typedef enum {
|
||||
SSF_MEDIA_BUG_TAP_ONLY = (1 << 10)
|
||||
} switch_session_flag_t;
|
||||
|
||||
typedef switch_status_t (switch_core_video_thread_callback_func_t) (switch_core_session_t *session, switch_frame_t *frame, void *user_data);
|
||||
|
||||
struct switch_core_session {
|
||||
switch_memory_pool_t *pool;
|
||||
@@ -189,6 +190,8 @@ struct switch_core_session {
|
||||
|
||||
switch_media_handle_t *media_handle;
|
||||
uint32_t decoder_errors;
|
||||
switch_core_video_thread_callback_func_t *_video_thread_callback;
|
||||
void *_video_thread_user_data;
|
||||
};
|
||||
|
||||
struct switch_media_bug {
|
||||
|
||||
Reference in New Issue
Block a user