Commit c001a62e authored by Sylvain Berfini's avatar Sylvain Berfini 🐮
Browse files

Set correct direction on all media streams

parent 7c3d0b14
......@@ -264,6 +264,13 @@ void MS2AudioStream::render(const OfferAnswerContext &params, CallSession::State
getMediaSessionPrivate().getCurrentParams()->getPrivate()->setUsedAudioCodec(rtp_profile_get_payload(audioProfile, usedPt));
}
if (stream->dir == SalStreamSendOnly)
media_stream_set_direction(&mStream->ms, MediaStreamSendOnly);
else if (stream->dir == SalStreamRecvOnly)
media_stream_set_direction(&mStream->ms, MediaStreamRecvOnly);
else if (stream->dir == SalStreamSendRecv)
media_stream_set_direction(&mStream->ms, MediaStreamSendRecv);
AudioDevice *audioDevice = getMediaSessionPrivate().getCurrentOutputAudioDevice();
MSSndCard *playcard = nullptr;
......
......@@ -262,7 +262,7 @@ void MS2VideoStream::render(const OfferAnswerContext & ctx, CallSession::State t
MS2VideoMixer * videoMixer = getVideoMixer();
getMediaSession().getLog()->video_enabled = true;
video_stream_set_direction(mStream, dir);
media_stream_set_direction(&mStream->ms, dir);
lInfo() << "Device rotation =" << getCCore()->device_rotation;
video_stream_set_device_rotation(mStream, getCCore()->device_rotation);
video_stream_set_freeze_on_error(mStream, !!lp_config_get_int(linphone_core_get_config(getCCore()), "video", "freeze_on_error", 1));
......
......@@ -1322,6 +1322,7 @@ static void accept_call_in_send_only_base(LinphoneCoreManager* pauline, Linphone
LinphoneCall *call;
pol.automatically_accept=1;
pol.automatically_initiate=1;
int dummy=0;
// important: VP8 has really poor performances with the mire camera, at least
// on iOS - so when ever h264 is available, let's use it instead
......@@ -1364,12 +1365,24 @@ static void accept_call_in_send_only_base(LinphoneCoreManager* pauline, Linphone
BC_ASSERT_TRUE(wait_for_list(lcs, &pauline->stat.number_of_LinphoneCallPausedByRemote,1,DEFAULT_WAIT_FOR));
check_media_direction(marie,call,lcs,LinphoneMediaDirectionSendOnly,LinphoneMediaDirectionSendOnly);
float quality = linphone_call_get_current_quality(call);
BC_ASSERT_GREATER(quality, 1.0, float, "%f");
wait_for_until(marie->lc, pauline->lc, &dummy, 1, 3000);
quality = linphone_call_get_current_quality(call);
BC_ASSERT_GREATER(quality, 1.0, float, "%f");
}
call=linphone_core_get_current_call(pauline->lc);
if (call) {
check_media_direction(pauline,call,lcs,LinphoneMediaDirectionRecvOnly,LinphoneMediaDirectionRecvOnly);
float quality = linphone_call_get_current_quality(call);
BC_ASSERT_GREATER(quality, 1.0, float, "%f");
wait_for_until(marie->lc, pauline->lc, &dummy, 1, 3000);
quality = linphone_call_get_current_quality(call);
BC_ASSERT_GREATER(quality, 1.0, float, "%f");
}
}
......
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