Commit 9c6064cc authored by Ghislain MARY's avatar Ghislain MARY

Add mswinrtvid to the Linphone solution + implement window id properties in the C++/CX wrapper.

parent 349f8fee
......@@ -57,7 +57,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webrtc", "submodules\mswebr
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmsbcg729", "submodules\bcg729\build\windows10\libmsbcg729\libmsbcg729.vcxproj", "{ACF5EA95-D647-4D0C-8F97-2CD9AAE8A2E0}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Native", "Native\Native.vcxproj", "{D30CBFE0-BEFF-4925-9BAD-9380F9BFCF90}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Linphone.Native", "Native\Native.vcxproj", "{D30CBFE0-BEFF-4925-9BAD-9380F9BFCF90}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmswinrtvid", "submodules\mswinrtvid\windows10\libmswinrtvid\libmswinrtvid.vcxproj", "{2D0E44C4-E51D-4911-B876-345D1E5E5209}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
......@@ -469,6 +471,20 @@ Global
{D30CBFE0-BEFF-4925-9BAD-9380F9BFCF90}.Release|x64.Build.0 = Release|x64
{D30CBFE0-BEFF-4925-9BAD-9380F9BFCF90}.Release|x86.ActiveCfg = Release|Win32
{D30CBFE0-BEFF-4925-9BAD-9380F9BFCF90}.Release|x86.Build.0 = Release|Win32
{2D0E44C4-E51D-4911-B876-345D1E5E5209}.Debug|Any CPU.ActiveCfg = Debug|Win32
{2D0E44C4-E51D-4911-B876-345D1E5E5209}.Debug|ARM.ActiveCfg = Debug|ARM
{2D0E44C4-E51D-4911-B876-345D1E5E5209}.Debug|ARM.Build.0 = Debug|ARM
{2D0E44C4-E51D-4911-B876-345D1E5E5209}.Debug|x64.ActiveCfg = Debug|x64
{2D0E44C4-E51D-4911-B876-345D1E5E5209}.Debug|x64.Build.0 = Debug|x64
{2D0E44C4-E51D-4911-B876-345D1E5E5209}.Debug|x86.ActiveCfg = Debug|Win32
{2D0E44C4-E51D-4911-B876-345D1E5E5209}.Debug|x86.Build.0 = Debug|Win32
{2D0E44C4-E51D-4911-B876-345D1E5E5209}.Release|Any CPU.ActiveCfg = Release|Win32
{2D0E44C4-E51D-4911-B876-345D1E5E5209}.Release|ARM.ActiveCfg = Release|ARM
{2D0E44C4-E51D-4911-B876-345D1E5E5209}.Release|ARM.Build.0 = Release|ARM
{2D0E44C4-E51D-4911-B876-345D1E5E5209}.Release|x64.ActiveCfg = Release|x64
{2D0E44C4-E51D-4911-B876-345D1E5E5209}.Release|x64.Build.0 = Release|x64
{2D0E44C4-E51D-4911-B876-345D1E5E5209}.Release|x86.ActiveCfg = Release|Win32
{2D0E44C4-E51D-4911-B876-345D1E5E5209}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
......@@ -127,6 +127,23 @@ Platform::Boolean Linphone::Native::Call::IsInConference::get()
return (linphone_call_is_in_conference(this->call) == TRUE);
}
Platform::Object^ Linphone::Native::Call::NativeVideoWindowId::get()
{
API_LOCK;
void *id = linphone_call_get_native_video_window_id(this->call);
if (id == NULL) return nullptr;
Linphone::Native::RefToPtrProxy<Platform::Object^> *proxy = reinterpret_cast<Linphone::Native::RefToPtrProxy<Platform::Object^>*>(id);
Platform::Object^ nativeWindowId = (proxy) ? proxy->Ref() : nullptr;
return nativeWindowId;
}
void Linphone::Native::Call::NativeVideoWindowId::set(Platform::Object^ value)
{
API_LOCK;
Linphone::Native::RefToPtrProxy<Platform::Object^> *nativeWindowId = new Linphone::Native::RefToPtrProxy<Platform::Object^>(value);
linphone_call_set_native_video_window_id(this->call, nativeWindowId);
}
float Linphone::Native::Call::PlayVolume::get()
{
API_LOCK;
......
......@@ -161,6 +161,15 @@ namespace Linphone
Platform::Boolean get();
}
/// <summary>
/// Sets the native video window id (a Windows::UI::Xaml::Controls::MediaElement as a Platform::Object).
/// </summary>
property Platform::Object^ NativeVideoWindowId
{
Platform::Object^ get();
void set(Platform::Object^ value);
}
/// <summary>
/// Gets the measured sound volume played locally (received from remote).
/// It is expressed in dbm0.
......
......@@ -623,6 +623,40 @@ int Linphone::Native::Core::MissedCallsCount::get()
return linphone_core_get_missed_calls_count(this->lc);
}
Platform::Object^ Linphone::Native::Core::NativePreviewWindowId::get()
{
API_LOCK;
void *id = linphone_core_get_native_preview_window_id(this->lc);
if (id == NULL) return nullptr;
Linphone::Native::RefToPtrProxy<Platform::Object^> *proxy = reinterpret_cast<Linphone::Native::RefToPtrProxy<Platform::Object^>*>(id);
Platform::Object^ nativeWindowId = (proxy) ? proxy->Ref() : nullptr;
return nativeWindowId;
}
void Linphone::Native::Core::NativePreviewWindowId::set(Platform::Object^ value)
{
API_LOCK;
Linphone::Native::RefToPtrProxy<Platform::Object^> *nativeWindowId = new Linphone::Native::RefToPtrProxy<Platform::Object^>(value);
linphone_core_set_native_preview_window_id(this->lc, nativeWindowId);
}
Platform::Object^ Linphone::Native::Core::NativeVideoWindowId::get()
{
API_LOCK;
void *id = linphone_core_get_native_video_window_id(this->lc);
if (id == NULL) return nullptr;
Linphone::Native::RefToPtrProxy<Platform::Object^> *proxy = reinterpret_cast<Linphone::Native::RefToPtrProxy<Platform::Object^>*>(id);
Platform::Object^ nativeWindowId = (proxy) ? proxy->Ref() : nullptr;
return nativeWindowId;
}
void Linphone::Native::Core::NativeVideoWindowId::set(Platform::Object^ value)
{
API_LOCK;
Linphone::Native::RefToPtrProxy<Platform::Object^> *nativeWindowId = new Linphone::Native::RefToPtrProxy<Platform::Object^>(value);
linphone_core_set_native_video_window_id(this->lc, nativeWindowId);
}
float Linphone::Native::Core::PlaybackGainDb::get()
{
API_LOCK;
......@@ -1487,10 +1521,6 @@ void Linphone::Native::Core::Init()
this->lc = linphone_core_new_with_config(vtable, config ? config->config : NULL, proxy);
linphone_core_set_ring(this->lc, nullptr);
#if 0
RefToPtrProxy<Mediastreamer2::WP8Video::IVideoRenderer^> *renderer = new RefToPtrProxy<Mediastreamer2::WP8Video::IVideoRenderer^>(Globals::Instance->VideoRenderer);
linphone_core_set_native_video_window_id(this->lc, (unsigned long)renderer);
#endif
}
Linphone::Native::Core::~Core()
......
......@@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "CoreListener.h"
#include "Utils.h"
// Do not treat doxygen documentation as XML
#pragma warning(push)
#pragma warning(disable : 4635)
......@@ -502,6 +503,24 @@ namespace Linphone
int get();
}
/// <summary>
/// Sets the native preview window id (a Windows::UI::Xaml::Controls::CaptureElement as a Platform::Object).
/// </summary>
property Platform::Object^ NativePreviewWindowId
{
Platform::Object^ get();
void set(Platform::Object^ value);
}
/// <summary>
/// Sets the native video window id (a Windows::UI::Xaml::Controls::MediaElement as a Platform::Object).
/// </summary>
property Platform::Object^ NativeVideoWindowId
{
Platform::Object^ get();
void set(Platform::Object^ value);
}
/// <summary>
/// Allow to control play level before entering the sound card in dB.
/// </summary>
......@@ -1032,14 +1051,6 @@ namespace Linphone
/// Status is notified to CoreListener::EcCalibrationStatus.
/// </summary>
void StartEchoCalibration();
/// <summary>
/// Gets the native video window id.
/// </summary>
property int NativeVideoWindowId
{
int get();
}
#endif
private:
......
......@@ -100,6 +100,9 @@
<ProjectReference Include="..\submodules\mswebrtc\build\windows10\libmswebrtc\libmswebrtc.vcxproj">
<Project>{878cf9d3-9761-479e-a715-a1de9f99cb78}</Project>
</ProjectReference>
<ProjectReference Include="..\submodules\mswinrtvid\windows10\libmswinrtvid\libmswinrtvid.vcxproj">
<Project>{2d0e44c4-e51d-4911-b876-345d1e5e5209}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{d30cbfe0-beff-4925-9bad-9380f9bfcf90}</ProjectGuid>
......
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