From: Seven Du Date: Wed, 29 Aug 2012 04:59:21 +0000 (+0800) Subject: FS-7502: video eavesdrop X-Git-Tag: v1.6.2~614^2~625 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b23ba52807a8e641d26b2ca3ea1daec2d69a9d10;p=thirdparty%2Ffreeswitch.git FS-7502: video eavesdrop --- diff --git a/src/switch_ivr_async.c b/src/switch_ivr_async.c index a8244076a8..e2705f3614 100644 --- a/src/switch_ivr_async.c +++ b/src/switch_ivr_async.c @@ -1651,7 +1651,17 @@ static switch_bool_t eavesdrop_callback(switch_media_bug_t *bug, void *user_data } } break; + case SWITCH_ABC_TYPE_READ_VIDEO_PING: + if (!bug->ping_frame) break; + if (ep->eavesdropper && switch_core_session_read_lock(ep->eavesdropper) == SWITCH_STATUS_SUCCESS) { + switch_channel_t *channel = switch_core_session_get_channel(ep->eavesdropper); + if (switch_channel_test_flag(channel, CF_VIDEO)) { + switch_core_session_write_video_frame(ep->eavesdropper, bug->ping_frame, SWITCH_IO_FLAG_NONE, 0); + } + switch_core_session_rwunlock(ep->eavesdropper); + } + break; default: break; }