Commit 016e04c8 authored by Mickaël Turnel's avatar Mickaël Turnel
Browse files

Add _WIN32_WCE when deactivating video estimations until a better solution

parent 279e03c5
...@@ -80,7 +80,7 @@ static void on_congestion_state_changed(const OrtpEventData *evd, void *user_poi ...@@ -80,7 +80,7 @@ static void on_congestion_state_changed(const OrtpEventData *evd, void *user_poi
MSBandwidthController *obj = ms->bandwidth_controller; MSBandwidthController *obj = ms->bandwidth_controller;
float controlled_stream_bandwidth_requested; float controlled_stream_bandwidth_requested;
RtpSession *session; RtpSession *session;
#ifndef _WIN32 #if !defined(_WIN32) && !defined(_WIN32_WCE)
OrtpVideoBandwidthEstimatorParams video_bandwidth_estimator_params = {0}; OrtpVideoBandwidthEstimatorParams video_bandwidth_estimator_params = {0};
#endif #endif
...@@ -102,7 +102,7 @@ static void on_congestion_state_changed(const OrtpEventData *evd, void *user_poi ...@@ -102,7 +102,7 @@ static void on_congestion_state_changed(const OrtpEventData *evd, void *user_poi
ms_message("MSBandwidthController: congestion detected - sending tmmbr for stream [%p][%s] for target [%f] kbit/s", ms_message("MSBandwidthController: congestion detected - sending tmmbr for stream [%p][%s] for target [%f] kbit/s",
obj->controlled_stream, ms_format_type_to_string(obj->controlled_stream->type), controlled_stream_bandwidth_requested*1e-3); obj->controlled_stream, ms_format_type_to_string(obj->controlled_stream->type), controlled_stream_bandwidth_requested*1e-3);
} }
#ifndef _WIN32 #if !defined(_WIN32) && !defined(_WIN32_WCE)
video_bandwidth_estimator_params.enabled = FALSE; video_bandwidth_estimator_params.enabled = FALSE;
#endif #endif
}else{ }else{
...@@ -115,13 +115,13 @@ static void on_congestion_state_changed(const OrtpEventData *evd, void *user_poi ...@@ -115,13 +115,13 @@ static void on_congestion_state_changed(const OrtpEventData *evd, void *user_poi
} }
/*we shall reset the jitter buffers, so that they recover faster their diverged states*/ /*we shall reset the jitter buffers, so that they recover faster their diverged states*/
resync_jitter_buffers(obj); resync_jitter_buffers(obj);
#ifndef _WIN32 #if !defined(_WIN32) && !defined(_WIN32_WCE)
video_bandwidth_estimator_params.enabled = TRUE; video_bandwidth_estimator_params.enabled = TRUE;
#endif #endif
} }
rtp_session_send_rtcp_fb_tmmbr(session, (uint64_t)controlled_stream_bandwidth_requested); rtp_session_send_rtcp_fb_tmmbr(session, (uint64_t)controlled_stream_bandwidth_requested);
obj->remote_video_bandwidth_available_estimated = 0; obj->remote_video_bandwidth_available_estimated = 0;
#ifndef _WIN32 #if !defined(_WIN32) && !defined(_WIN32_WCE)
rtp_session_enable_video_bandwidth_estimator(obj->controlled_stream->sessions.rtp_session, &video_bandwidth_estimator_params); rtp_session_enable_video_bandwidth_estimator(obj->controlled_stream->sessions.rtp_session, &video_bandwidth_estimator_params);
#endif #endif
} }
...@@ -156,7 +156,7 @@ static void on_video_bandwidth_estimation_available(const OrtpEventData *evd, vo ...@@ -156,7 +156,7 @@ static void on_video_bandwidth_estimation_available(const OrtpEventData *evd, vo
static void elect_controlled_stream(MSBandwidthController *obj){ static void elect_controlled_stream(MSBandwidthController *obj){
bctbx_list_t *elem; bctbx_list_t *elem;
bool_t done = FALSE; bool_t done = FALSE;
#ifndef _WIN32 #if !defined(_WIN32) && !defined(_WIN32_WCE)
OrtpVideoBandwidthEstimatorParams params = {0}; OrtpVideoBandwidthEstimatorParams params = {0};
#endif #endif
MediaStream *old_controlled_stream = obj->controlled_stream; MediaStream *old_controlled_stream = obj->controlled_stream;
...@@ -171,7 +171,7 @@ static void elect_controlled_stream(MSBandwidthController *obj){ ...@@ -171,7 +171,7 @@ static void elect_controlled_stream(MSBandwidthController *obj){
case MSVideo: case MSVideo:
obj->controlled_stream = ms; obj->controlled_stream = ms;
done = TRUE; done = TRUE;
#ifndef _WIN32 #if !defined(_WIN32) && !defined(_WIN32_WCE)
ortp_ev_dispatcher_connect(media_stream_get_event_dispatcher(ms), ORTP_EVENT_NEW_VIDEO_BANDWIDTH_ESTIMATION_AVAILABLE, 0, ortp_ev_dispatcher_connect(media_stream_get_event_dispatcher(ms), ORTP_EVENT_NEW_VIDEO_BANDWIDTH_ESTIMATION_AVAILABLE, 0,
on_video_bandwidth_estimation_available, ms); on_video_bandwidth_estimation_available, ms);
params.enabled = TRUE; params.enabled = TRUE;
...@@ -205,7 +205,7 @@ void ms_bandwidth_controller_remove_stream(MSBandwidthController *obj, struct _M ...@@ -205,7 +205,7 @@ void ms_bandwidth_controller_remove_stream(MSBandwidthController *obj, struct _M
ortp_ev_dispatcher_disconnect(media_stream_get_event_dispatcher(stream), ORTP_EVENT_CONGESTION_STATE_CHANGED, 0, ortp_ev_dispatcher_disconnect(media_stream_get_event_dispatcher(stream), ORTP_EVENT_CONGESTION_STATE_CHANGED, 0,
on_congestion_state_changed); on_congestion_state_changed);
rtp_session_enable_congestion_detection(stream->sessions.rtp_session, FALSE); rtp_session_enable_congestion_detection(stream->sessions.rtp_session, FALSE);
#ifndef _WIN32 #if !defined(_WIN32) && !defined(_WIN32_WCE)
ortp_ev_dispatcher_disconnect(media_stream_get_event_dispatcher(stream), ORTP_EVENT_NEW_VIDEO_BANDWIDTH_ESTIMATION_AVAILABLE, 0, ortp_ev_dispatcher_disconnect(media_stream_get_event_dispatcher(stream), ORTP_EVENT_NEW_VIDEO_BANDWIDTH_ESTIMATION_AVAILABLE, 0,
on_video_bandwidth_estimation_available); on_video_bandwidth_estimation_available);
params.enabled = FALSE; params.enabled = FALSE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment