SWITCH_RTP_FLAG_MUTE,
SWITCH_RTP_FLAG_NACK,
SWITCH_RTP_FLAG_TMMBR,
+ SWITCH_RTP_FLAG_GEN_TS_DELTA,
SWITCH_RTP_FLAG_INVALID
} switch_rtp_flag_t;
switch_core_session_rwunlock(isession);
}
+
+ if (want_refresh) {
+ for (imember = conference->members; imember; imember = imember->next) {
+ switch_core_session_t *isession = imember->session;
+
+ if (!isession || switch_core_session_read_lock(isession) != SWITCH_STATUS_SUCCESS) {
+ continue;
+ }
+
+ if (!isession || !switch_channel_test_flag(imember->channel, CF_VIDEO) ) {
+ continue;
+ }
+
+ switch_core_session_request_video_refresh(imember->session);
+ switch_core_session_rwunlock(isession);
+ }
+ }
+
switch_mutex_unlock(conference->member_mutex);
switch_img_free(&tmp_frame.img);
-
- if (want_refresh && floor_holder->session) {
- switch_core_session_request_video_refresh(floor_holder->session);
- }
}
switch_status_t conference_video_thread_callback(switch_core_session_t *session, switch_frame_t *frame, void *user_data)
return SWITCH_STATUS_SUCCESS;
}
+ if (switch_core_session_media_flow(session, SWITCH_MEDIA_TYPE_VIDEO) == SWITCH_MEDIA_FLOW_SENDONLY) {
+ return SWITCH_STATUS_SUCCESS;
+ }
if (switch_thread_rwlock_tryrdlock(member->conference->rwlock) != SWITCH_STATUS_SUCCESS) {
return SWITCH_STATUS_FALSE;
if (imember->video_media_flow == SWITCH_MEDIA_FLOW_SENDONLY) {
conference_utils_member_clear_flag(imember, MFLAG_CAN_BE_SEEN);
+ conference_video_find_floor(imember, SWITCH_FALSE);
} else {
conference_utils_member_set_flag(imember, MFLAG_CAN_BE_SEEN);
+ conference_video_find_floor(imember, SWITCH_TRUE);
+ switch_core_session_request_video_refresh(imember->session);
}
}
flags[SWITCH_RTP_FLAG_BYTESWAP] = 0;
}
+ if ((val = switch_channel_get_variable(session->channel, "rtp_gen_ts_delta")) && switch_true(val)) {
+ flags[SWITCH_RTP_FLAG_GEN_TS_DELTA] = 1;
+ }
+
if (a_engine->rtp_session && switch_channel_test_flag(session->channel, CF_REINVITE)) {
//const char *ip = switch_channel_get_variable(session->channel, SWITCH_LOCAL_MEDIA_IP_VARIABLE);
//const char *port = switch_channel_get_variable(session->channel, SWITCH_LOCAL_MEDIA_PORT_VARIABLE);
}
}
- /* TMP DISABLE DFF */
- if (switch_rtp_test_flag(rtp_session, SWITCH_RTP_FLAG_VIDEO)) {
+
+ if (switch_rtp_test_flag(rtp_session, SWITCH_RTP_FLAG_GEN_TS_DELTA) || switch_rtp_test_flag(rtp_session, SWITCH_RTP_FLAG_VIDEO)) {
/* Normalize the timestamps to our own base by generating a made up starting point then adding the measured deltas to that base
so if the timestamps and ssrc of the source change, it will not break the other end's jitter bufffer / decoder etc *cough* CHROME *cough*
*/
}
if (!rtp_session->ts_norm.last_ssrc || send_msg->header.ssrc != rtp_session->ts_norm.last_ssrc) {
- //#define USE_DELTA
+#define USE_DELTA
#ifdef USE_DELTA
if (rtp_session->ts_norm.last_ssrc) {
rtp_session->ts_norm.delta_ct = 1;
if (ntohl(send_msg->header.ts) != rtp_session->ts_norm.last_frame) {
#ifdef USE_DELTA
int32_t delta = (int32_t) (ntohl(send_msg->header.ts) - rtp_session->ts_norm.last_frame);
- if (delta > 0 && delta < 90000) {
- rtp_session->ts_norm.delta = delta;
- }
- //printf("WTF %d\n", rtp_session->ts_norm.delta);
+
+ rtp_session->ts_norm.delta = delta;
rtp_session->ts_norm.ts += rtp_session->ts_norm.delta;
#else
switch_core_timer_sync(&rtp_session->timer);