Commit 1d970879 authored by Ghislain MARY's avatar Ghislain MARY

Revert "Use foreground video display to a MediaElement."

This reverts commit 9e04331c.
parent 244cd740

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Linphone", "Linphone\Linphone.csproj", "{6122CCBD-FB37-48CE-9C50-0C8A35003AE6}"
ProjectSection(ProjectDependencies) = postProject
{088A6C0F-16FA-4360-93C7-D781244E77FD} = {088A6C0F-16FA-4360-93C7-D781244E77FD}
{2D0E44C4-E51D-4911-B876-345D1E5E5209} = {2D0E44C4-E51D-4911-B876-345D1E5E5209}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MSWinRTVideo", "submodules\mswinrtvid\MSWinRTVideo.vcxproj", "{2D0E44C4-E51D-4911-B876-345D1E5E5209}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LinphoneTasks", "Linphone\Tasks\LinphoneTasks.csproj", "{088A6C0F-16FA-4360-93C7-D781244E77FD}"
EndProject
Global
......@@ -42,6 +45,20 @@ Global
{6122CCBD-FB37-48CE-9C50-0C8A35003AE6}.Release|x86.ActiveCfg = Release|x86
{6122CCBD-FB37-48CE-9C50-0C8A35003AE6}.Release|x86.Build.0 = Release|x86
{6122CCBD-FB37-48CE-9C50-0C8A35003AE6}.Release|x86.Deploy.0 = Release|x86
{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
{088A6C0F-16FA-4360-93C7-D781244E77FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{088A6C0F-16FA-4360-93C7-D781244E77FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{088A6C0F-16FA-4360-93C7-D781244E77FD}.Debug|ARM.ActiveCfg = Debug|ARM
......
......@@ -355,6 +355,10 @@
<PRIResource Include="String\en-US\Resources.resw" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\submodules\mswinrtvid\MSWinRTVideo.vcxproj">
<Project>{2d0e44c4-e51d-4911-b876-345d1e5e5209}</Project>
<Name>MSWinRTVideo</Name>
</ProjectReference>
<ProjectReference Include="Tasks\LinphoneTasks.csproj">
<Project>{088a6c0f-16fa-4360-93c7-d781244e77fd}</Project>
<Name>LinphoneTasks</Name>
......
......@@ -38,4 +38,12 @@
<DeviceCapability Name="microphone" />
<DeviceCapability Name="webcam" />
</Capabilities>
<Extensions>
<Extension Category="windows.activatableClass.inProcessServer">
<InProcessServer>
<Path>MSWinRTVideo.dll</Path>
<ActivatableClass ActivatableClassId="MSWinRTVideo.SchemeHandler" ThreadingModel="both" />
</InProcessServer>
</Extension>
</Extensions>
</Package>
\ No newline at end of file
......@@ -86,12 +86,12 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<MediaElement x:Name="VideoMediaElement" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
<MediaElement x:Name="PreviewMediaElement" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="2" Grid.Row="2" RenderTransformOrigin="0.5,0.5">
<MediaElement.RenderTransform>
<SwapChainPanel x:Name="VideoSwapChainPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
<SwapChainPanel x:Name="PreviewSwapChainPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="2" Grid.Row="2" RenderTransformOrigin="0.5,0.5">
<SwapChainPanel.RenderTransform>
<CompositeTransform x:Name="PreviewRender" ScaleX="-1"/>
</MediaElement.RenderTransform>
</MediaElement>
</SwapChainPanel.RenderTransform>
</SwapChainPanel>
</Grid>
</Grid>
</Grid>
......
......@@ -370,12 +370,20 @@ namespace Linphone.Views
}
}
private MSWinRTVideo.SwapChainPanelSource _videoSource;
private MSWinRTVideo.SwapChainPanelSource _previewSource;
private void StartVideoStream()
{
try
{
LinphoneManager.Instance.Core.NativeVideoWindowId = VideoMediaElement;
LinphoneManager.Instance.Core.NativePreviewWindowId = PreviewMediaElement;
_videoSource = new MSWinRTVideo.SwapChainPanelSource();
_videoSource.Start(VideoSwapChainPanel);
_previewSource = new MSWinRTVideo.SwapChainPanelSource();
_previewSource.Start(PreviewSwapChainPanel);
LinphoneManager.Instance.Core.NativeVideoWindowId = VideoSwapChainPanel.Name;
LinphoneManager.Instance.Core.NativePreviewWindowId = PreviewSwapChainPanel.Name;
}
catch (Exception e)
{
......@@ -387,8 +395,16 @@ namespace Linphone.Views
{
try
{
LinphoneManager.Instance.Core.NativeVideoWindowId = null;
LinphoneManager.Instance.Core.NativePreviewWindowId = null;
if (_videoSource != null)
{
_videoSource.Stop();
_videoSource = null;
}
if (_previewSource != null)
{
_previewSource.Stop();
_previewSource = null;
}
}
catch (Exception e)
{
......
{
"dependencies": {
"LinphoneSDK": "3.10.2.423",
"LinphoneSDK": "3.9.1.826",
"Microsoft.ApplicationInsights": "2.0.1",
"Microsoft.ApplicationInsights.PersistenceChannel": "1.2.3",
"Microsoft.ApplicationInsights.WindowsApps": "1.1.1",
......
......@@ -596,37 +596,37 @@ int Core::MissedCallsCount::get()
return linphone_core_get_missed_calls_count(this->lc);
}
Platform::Object^ Core::NativePreviewWindowId::get()
Platform::String^ Core::NativePreviewWindowId::get()
{
API_LOCK;
void *id = linphone_core_get_native_preview_window_id(this->lc);
if (id == NULL) return nullptr;
RefToPtrProxy<Platform::Object^> *proxy = reinterpret_cast<RefToPtrProxy<Platform::Object^>*>(id);
Platform::Object^ nativeWindowId = (proxy) ? proxy->Ref() : nullptr;
RefToPtrProxy<Platform::String^> *proxy = reinterpret_cast<RefToPtrProxy<Platform::String^>*>(id);
Platform::String^ nativeWindowId = (proxy) ? proxy->Ref() : nullptr;
return nativeWindowId;
}
void Core::NativePreviewWindowId::set(Platform::Object^ value)
void Core::NativePreviewWindowId::set(Platform::String^ value)
{
API_LOCK;
RefToPtrProxy<Platform::Object^> *nativeWindowId = new RefToPtrProxy<Platform::Object^>(value);
RefToPtrProxy<Platform::String^> *nativeWindowId = new RefToPtrProxy<Platform::String^>(value);
linphone_core_set_native_preview_window_id(this->lc, nativeWindowId);
}
Platform::Object^ Core::NativeVideoWindowId::get()
Platform::String^ Core::NativeVideoWindowId::get()
{
API_LOCK;
void *id = linphone_core_get_native_video_window_id(this->lc);
if (id == NULL) return nullptr;
RefToPtrProxy<Platform::Object^> *proxy = reinterpret_cast<RefToPtrProxy<Platform::Object^>*>(id);
Platform::Object^ nativeWindowId = (proxy) ? proxy->Ref() : nullptr;
RefToPtrProxy<Platform::String^> *proxy = reinterpret_cast<RefToPtrProxy<Platform::String^>*>(id);
Platform::String^ nativeWindowId = (proxy) ? proxy->Ref() : nullptr;
return nativeWindowId;
}
void Core::NativeVideoWindowId::set(Platform::Object^ value)
void Core::NativeVideoWindowId::set(Platform::String^ value)
{
API_LOCK;
RefToPtrProxy<Platform::Object^> *nativeWindowId = new RefToPtrProxy<Platform::Object^>(value);
RefToPtrProxy<Platform::String^> *nativeWindowId = new RefToPtrProxy<Platform::String^>(value);
linphone_core_set_native_video_window_id(this->lc, nativeWindowId);
}
......
......@@ -498,21 +498,21 @@ namespace BelledonneCommunications
}
/// <summary>
/// Sets the native preview window id.
/// Sets the native preview window id (a Windows::UI::Xaml::Controls::CaptureElement as a Platform::Object).
/// </summary>
property Platform::Object^ NativePreviewWindowId
property Platform::String^ NativePreviewWindowId
{
Platform::Object^ get();
void set(Platform::Object^ value);
Platform::String^ get();
void set(Platform::String^ value);
}
/// <summary>
/// Sets the native video window id.
/// Sets the native video window id (a Windows::UI::Xaml::Controls::MediaElement as a Platform::Object).
/// </summary>
property Platform::Object^ NativeVideoWindowId
property Platform::String^ NativeVideoWindowId
{
Platform::Object^ get();
void set(Platform::Object^ value);
Platform::String^ get();
void set(Platform::String^ value);
}
/// <summary>
......
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