mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-05 02:02:01 +00:00
FS-8053 #resolve [When WebRTC's SDP contains a=sendonly for video, the client will still receive the video stream]
This commit is contained in:
parent
0777568241
commit
de3b0a0957
@ -1264,6 +1264,10 @@ void conference_video_write_canvas_image_to_codec_group(conference_obj_t *confer
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (imember->video_flow == SWITCH_MEDIA_FLOW_RECVONLY) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (!imember->session || !switch_channel_test_flag(imember->channel, CF_VIDEO) ||
|
if (!imember->session || !switch_channel_test_flag(imember->channel, CF_VIDEO) ||
|
||||||
switch_core_session_read_lock(imember->session) != SWITCH_STATUS_SUCCESS) {
|
switch_core_session_read_lock(imember->session) != SWITCH_STATUS_SUCCESS) {
|
||||||
continue;
|
continue;
|
||||||
@ -2588,6 +2592,10 @@ void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread_t *thr
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (imember->video_flow == SWITCH_MEDIA_FLOW_RECVONLY) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (need_refresh) {
|
if (need_refresh) {
|
||||||
switch_core_session_request_video_refresh(imember->session);
|
switch_core_session_request_video_refresh(imember->session);
|
||||||
}
|
}
|
||||||
@ -2922,6 +2930,10 @@ void *SWITCH_THREAD_FUNC conference_video_super_muxing_thread_run(switch_thread_
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (imember->video_flow == SWITCH_MEDIA_FLOW_RECVONLY) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (!imember->session || !switch_channel_test_flag(imember->channel, CF_VIDEO) ||
|
if (!imember->session || !switch_channel_test_flag(imember->channel, CF_VIDEO) ||
|
||||||
switch_core_session_read_lock(imember->session) != SWITCH_STATUS_SUCCESS) {
|
switch_core_session_read_lock(imember->session) != SWITCH_STATUS_SUCCESS) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -10440,6 +10440,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_encoded_video_frame(sw
|
|||||||
switch_io_event_hook_video_write_frame_t *ptr;
|
switch_io_event_hook_video_write_frame_t *ptr;
|
||||||
switch_status_t status = SWITCH_STATUS_FALSE;
|
switch_status_t status = SWITCH_STATUS_FALSE;
|
||||||
|
|
||||||
|
if (switch_core_session_media_flow(session, SWITCH_MEDIA_TYPE_VIDEO) == SWITCH_MEDIA_FLOW_RECVONLY) {
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Writing video to RECVONLY session\n");
|
||||||
|
return SWITCH_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
if (session->endpoint_interface->io_routines->write_video_frame) {
|
if (session->endpoint_interface->io_routines->write_video_frame) {
|
||||||
if ((status = session->endpoint_interface->io_routines->write_video_frame(session, frame, flags, stream_id)) == SWITCH_STATUS_SUCCESS) {
|
if ((status = session->endpoint_interface->io_routines->write_video_frame(session, frame, flags, stream_id)) == SWITCH_STATUS_SUCCESS) {
|
||||||
for (ptr = session->event_hooks.video_write_frame; ptr; ptr = ptr->next) {
|
for (ptr = session->event_hooks.video_write_frame; ptr; ptr = ptr->next) {
|
||||||
@ -10506,6 +10511,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_video_frame(switch_cor
|
|||||||
return SWITCH_STATUS_FALSE;
|
return SWITCH_STATUS_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (switch_core_session_media_flow(session, SWITCH_MEDIA_TYPE_VIDEO) == SWITCH_MEDIA_FLOW_RECVONLY) {
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Writing video to RECVONLY session\n");
|
||||||
|
return SWITCH_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
if (switch_channel_test_flag(session->channel, CF_VIDEO_PAUSE_WRITE)) {
|
if (switch_channel_test_flag(session->channel, CF_VIDEO_PAUSE_WRITE)) {
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user