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
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;
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);
+<<<<<<< HEAD
SWITCH_DECLARE(switch_status_t) switch_core_media_start_video_thread(switch_core_session_t *session);
+=======
+SWITCH_DECLARE(switch_status_t) start_core_video_thread(switch_core_session_t *session);
+>>>>>>> allow using the video thread externally - e.g. non rtp based video
SWITCH_DECLARE(switch_status_t) switch_core_session_get_payload_code(switch_core_session_t *session,
switch_media_type_t type,
}
-static switch_status_t start_video_thread(switch_core_session_t *session)
+SWITCH_DECLARE(switch_status_t) switch_core_media_start_video_thread(switch_core_session_t *session)
{
switch_threadattr_t *thd_attr = NULL;
switch_memory_pool_t *pool = switch_core_session_get_pool(session);
return SWITCH_STATUS_SUCCESS;
}
-SWITCH_DECLARE(switch_status_t) switch_core_media_start_video_thread(switch_core_session_t *session)
-{
- return start_video_thread(session);
-}
-
//?
#define RA_PTR_LEN 512
SWITCH_DECLARE(switch_status_t) switch_core_media_proxy_remote_addr(switch_core_session_t *session, const char *sdp_str)
!switch_channel_test_flag(session->channel, CF_WEBRTC)) {
/* Reactivate the NAT buster flag. */
switch_rtp_set_flag(v_engine->rtp_session, SWITCH_RTP_FLAG_AUTOADJ);
- start_video_thread(session);
+ switch_core_media_start_video_thread(session);
}
if (switch_media_handle_test_media_flag(smh, SCMF_AUTOFIX_TIMING)) {
v_engine->cur_payload_map->remote_sdp_port, v_engine->cur_payload_map->agreed_pt);
- start_video_thread(session);
+ switch_core_media_start_video_thread(session);
switch_rtp_set_default_payload(v_engine->rtp_session, v_engine->cur_payload_map->agreed_pt);
}
}
!((val = switch_channel_get_variable(session->channel, "disable_rtp_auto_adjust")) && switch_true(val))) {
/* Reactivate the NAT buster flag. */
switch_rtp_set_flag(v_engine->rtp_session, SWITCH_RTP_FLAG_AUTOADJ);
- start_video_thread(session);
+ switch_core_media_start_video_thread(session);
}
}
switch_rtp_set_payload_map(v_engine->rtp_session, &v_engine->payload_map);
- start_video_thread(session);
+ switch_core_media_start_video_thread(session);
switch_channel_set_flag(session->channel, CF_VIDEO);
if ((ssrc = switch_channel_get_variable(session->channel, "rtp_use_video_ssrc"))) {