Commit 17592f52 authored by Julien Wadel's avatar Julien Wadel
Browse files

Fix crash and black screen on video session.

1 merge request!3Fix crash and black screen on video session.
Showing with 35 additions and 10 deletions
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.1321
# Visual Studio Version 16
VisualStudioVersion = 16.0.31424.327
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Linphone", "Linphone\Linphone.csproj", "{6122CCBD-FB37-48CE-9C50-0C8A35003AE6}"
ProjectSection(ProjectDependencies) = postProject
......@@ -28,8 +28,8 @@ Global
{6122CCBD-FB37-48CE-9C50-0C8A35003AE6}.Debug|x64.ActiveCfg = Debug|x64
{6122CCBD-FB37-48CE-9C50-0C8A35003AE6}.Debug|x64.Build.0 = Debug|x64
{6122CCBD-FB37-48CE-9C50-0C8A35003AE6}.Debug|x64.Deploy.0 = Debug|x64
{6122CCBD-FB37-48CE-9C50-0C8A35003AE6}.Debug|x86.ActiveCfg = Release|x64
{6122CCBD-FB37-48CE-9C50-0C8A35003AE6}.Debug|x86.Build.0 = Release|x64
{6122CCBD-FB37-48CE-9C50-0C8A35003AE6}.Debug|x86.ActiveCfg = Debug|x86
{6122CCBD-FB37-48CE-9C50-0C8A35003AE6}.Debug|x86.Build.0 = Debug|x86
{6122CCBD-FB37-48CE-9C50-0C8A35003AE6}.Release|Any CPU.ActiveCfg = Release|x64
{6122CCBD-FB37-48CE-9C50-0C8A35003AE6}.Release|ARM.ActiveCfg = Release|x64
{6122CCBD-FB37-48CE-9C50-0C8A35003AE6}.Release|x64.ActiveCfg = Release|x64
......
......@@ -8,10 +8,10 @@
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Styles/Styles.xaml"></ResourceDictionary>
<ResourceDictionary Source="ms-appx:///Styles/Styles.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Light" Source="Styles/Light.xaml"></ResourceDictionary>
<ResourceDictionary x:Key="Light" Source="ms-appx:///Styles/Light.xaml"></ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>
</Application.Resources>
......
......@@ -84,7 +84,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS;CODE_ANALYSIS;CODE_ANALYSIS</DefineConstants>
<DefineConstants>TRACE;DEBUG;NETFX_CORE;CODE_ANALYSIS;CODE_ANALYSIS;CODE_ANALYSIS;CODE_ANALYSIS;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
......@@ -386,7 +386,7 @@
<Version>2.1.13</Version>
</PackageReference>
<PackageReference Include="LinphoneSDK">
<Version>4.5.0-alpha.316</Version>
<Version>*</Version>
</PackageReference>
<PackageReference Include="Microsoft.ApplicationInsights">
<Version>2.16.0</Version>
......
......@@ -61,6 +61,8 @@ namespace Linphone.Model {
}
public static void StopVideoStream()
{
LinphoneManager.Instance.Core.NativePreviewWindowId = null;
LinphoneManager.Instance.Core.NativeVideoWindowId = null;
}
private PushNotificationChannel channel;
......@@ -550,8 +552,9 @@ namespace Linphone.Model {
CreateAudioDeviceInputNodeResult resultNode = await audioGraph.CreateDeviceInputNodeAsync(Windows.Media.Capture.MediaCategory.Media);
AudioDeviceInputNode deviceInputNode = resultNode.DeviceInputNode;
deviceInputNode.Dispose();
if(deviceInputNode != null)
deviceInputNode.Dispose();
if(audioGraph != null)
audioGraph.Dispose();
}
......
......@@ -73,6 +73,19 @@
x:Name="GSM"
x:Uid="GSMCodec">
</ToggleSwitch>
<ToggleSwitch
Grid.Row="8"
x:Name="AMRWB"
x:Uid="AMRWBCodec">
</ToggleSwitch>
<ToggleSwitch
Grid.Row="9"
x:Name="AMRNB"
x:Uid="AMRNBCodec">
</ToggleSwitch>
</Grid>
</ScrollViewer.Content>
</ScrollViewer>
......
......@@ -48,6 +48,9 @@ namespace Linphone.Views {
//G729.IsEnabled = Customs.EnableG729;
GSM.IsOn = _settings.GSM;
OPUS.IsOn = _settings.OPUS;
AMRWB.IsOn = _settings.AMRWB;
AMRNB.IsOn = _settings.AMRNB;
}
/// <summary>
......@@ -77,6 +80,8 @@ namespace Linphone.Views {
_settings.G729 = ToBool(G729.IsOn);
_settings.GSM = ToBool(GSM.IsOn);
_settings.OPUS = ToBool(OPUS.IsOn);
_settings.AMRWB = ToBool(AMRWB.IsOn);
_settings.AMRNB = ToBool(AMRNB.IsOn);
_settings.Save();
}
......
......@@ -60,7 +60,10 @@ namespace Linphone.Views {
Loaded += OnPageLoaded;
if (LinphoneManager.Instance.IsVideoAvailable) {
VideoGrid.Visibility = Visibility.Collapsed;
StartVideoStream();// Initialize to avoid create new windows.
}
else
StopVideoStream();
if (LinphoneManager.Instance.Core.CurrentCall.State == CallState.StreamsRunning)
Status.Text = "00:00:00";
......@@ -120,6 +123,7 @@ private async void buttons_VideoClick(object sender, bool isVideoOn) {
return;
CallParams param = LinphoneManager.Instance.Core.CreateCallParams(call);
param.VideoEnabled = isVideoOn;
param.VideoDirection = MediaDirection.SendRecv;
call.Update(param);
if(isVideoOn)
StartVideoStream();
......
Supports Markdown
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