Commit 7aade030 authored by Ghislain MARY's avatar Ghislain MARY

Add LinphoneMediaDirection wrapper.

parent 03c51c98
......@@ -236,5 +236,16 @@ namespace Linphone
ReflexiveConnection = 4,
RelayConnection = 5
};
/// <summary>
/// Indicates for a given media the stream direction.
/// </summary>
public enum class MediaDirection : int
{
Inactive = 0,
SendOnly = 1,
RecvOnly = 2,
SendRecv = 3
};
}
}
\ No newline at end of file
......@@ -103,6 +103,30 @@ Windows::Foundation::Size Linphone::Core::LinphoneCallParams::ReceivedVideoSize:
return size;
}
Linphone::Core::MediaDirection Linphone::Core::LinphoneCallParams::AudioDirection::get()
{
API_LOCK;
return (Linphone::Core::MediaDirection) linphone_call_params_get_audio_direction(this->params);
}
void Linphone::Core::LinphoneCallParams::AudioDirection::set(Linphone::Core::MediaDirection value)
{
API_LOCK;
linphone_call_params_set_audio_direction(this->params, (LinphoneMediaDirection)value);
}
Linphone::Core::MediaDirection Linphone::Core::LinphoneCallParams::VideoDirection::get()
{
API_LOCK;
return (Linphone::Core::MediaDirection) linphone_call_params_get_video_direction(this->params);
}
void Linphone::Core::LinphoneCallParams::VideoDirection::set(Linphone::Core::MediaDirection value)
{
API_LOCK;
linphone_call_params_set_video_direction(this->params, (LinphoneMediaDirection)value);
}
Linphone::Core::LinphoneCallParams::LinphoneCallParams(::LinphoneCallParams *call_params) :
params(call_params)
{
......
......@@ -102,6 +102,24 @@ namespace Linphone
Windows::Foundation::Size get();
}
/// <summary>
/// Set the audio stream direction.
/// </summary>
property MediaDirection AudioDirection
{
MediaDirection get();
void set(MediaDirection value);
}
/// <summary>
/// Set the video stream direction.
/// </summary>
property MediaDirection VideoDirection
{
MediaDirection get();
void set(MediaDirection value);
}
private:
friend class Linphone::Core::Utils;
friend ref class Linphone::Core::LinphoneCore;
......
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