add external_video_source to media handle and expose switch_core_media_start_video_thread() to start the core video thread for non-rtp based media

This commit is contained in:
Seven Du
2014-11-12 08:39:35 +08:00
parent fada4b893a
commit dd629c1516
2 changed files with 25 additions and 3 deletions

View File

@@ -146,6 +146,15 @@ typedef struct switch_core_media_params_s {
switch_core_media_dtmf_t dtmf_type;
switch_payload_t cng_pt;
/* a core_video_thread will be started automatically
when uses rtp based media,
external_video_source should be set to SWITCH_TRUE and
switch_core_media_start_video_thread()
should be explicitly called to start the video thread
if uses the media handle for non-rtp based media
*/
switch_bool_t external_video_source;
} switch_core_media_params_t;
static inline const char *switch_media_type2str(switch_media_type_t type)
@@ -252,6 +261,7 @@ SWITCH_DECLARE(void) switch_core_media_deinit(void);
SWITCH_DECLARE(void) switch_core_media_set_stats(switch_core_session_t *session);
SWITCH_DECLARE(void) switch_core_session_wake_video_thread(switch_core_session_t *session);
SWITCH_DECLARE(void) switch_core_session_clear_crypto(switch_core_session_t *session);
SWITCH_DECLARE(switch_status_t) switch_core_media_start_video_thread(switch_core_session_t *session);
SWITCH_DECLARE(switch_status_t) switch_core_session_get_payload_code(switch_core_session_t *session,
switch_media_type_t type,