Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
linphone-windows10
Commits
094d4137
Commit
094d4137
authored
Feb 09, 2016
by
Ghislain MARY
Browse files
Update MS2Tester.
parent
49995fe8
Changes
17
Hide whitespace changes
Inline
Side-by-side
testers/MS2Tester/App.xaml
View file @
094d4137
...
...
@@ -11,6 +11,7 @@
<model:UnitTestCaseStateToSymbolConverter x:Key="UnitTestCaseStateToSymbol"/>
<model:UnitTestCaseStateToSymbolColorConverter x:Key="UnitTestCaseStateToSymbolColor"/>
<model:OutputTraceLevelToColorConverter x:Key="OutputTraceLevelToColor"/>
<model:MultiplyConverter x:Key="Multiply"/>
</ResourceDictionary>
</Application.Resources>
</Application>
testers/MS2Tester/Assets/Logo.png
deleted
100644 → 0
View file @
49995fe8
11.5 KB
testers/MS2Tester/Assets/SmallLogo.png
deleted
100644 → 0
View file @
49995fe8
2.11 KB
testers/MS2Tester/Assets/SplashScreen.png
deleted
100644 → 0
View file @
49995fe8
29.2 KB
testers/MS2Tester/Assets/SplashScreen.scale-200.png
0 → 100644
View file @
094d4137
121 KB
testers/MS2Tester/Assets/Square150x150Logo.scale-200.png
0 → 100644
View file @
094d4137
54.8 KB
testers/MS2Tester/Assets/Square44x44Logo.scale-200.png
0 → 100644
View file @
094d4137
7.88 KB
testers/MS2Tester/Assets/StoreLogo.png
deleted
100644 → 0
View file @
49995fe8
2.62 KB
testers/MS2Tester/Assets/StoreLogo.scale-200.png
0 → 100644
View file @
094d4137
9.6 KB
testers/MS2Tester/Assets/WideLogo.png
deleted
100644 → 0
View file @
49995fe8
21 KB
testers/MS2Tester/DataModel/UnitTestDataSource.cs
View file @
094d4137
...
...
@@ -248,4 +248,29 @@ namespace MS2Tester.DataModel
throw
new
NotImplementedException
();
}
}
public
sealed
class
MultiplyConverter
:
IValueConverter
{
object
IValueConverter
.
Convert
(
object
value
,
Type
targetType
,
object
parameter
,
string
language
)
{
if
(!
value
.
GetType
().
Equals
(
typeof
(
Double
)))
{
throw
new
ArgumentException
(
"Only Double is supported"
);
}
if
(
targetType
.
Equals
(
typeof
(
Double
)))
{
Double
result
=
(
Double
)
value
*
(
Double
)
Convert
.
ToDouble
(
parameter
);
return
result
;
}
else
{
throw
new
ArgumentException
(
string
.
Format
(
"Unsupported format {0}"
,
targetType
.
FullName
));
}
}
object
IValueConverter
.
ConvertBack
(
object
value
,
Type
targetType
,
object
parameter
,
string
language
)
{
throw
new
NotImplementedException
();
}
}
}
testers/MS2Tester/MS2Tester.csproj
View file @
094d4137
...
...
@@ -14,6 +14,7 @@
<TargetPlatformVersion>
10.0.10586.0
</TargetPlatformVersion>
<TargetPlatformMinVersion>
10.0.10240.0
</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>
14
</MinimumVisualStudioVersion>
<EnableDotNetNativeCompatibleProfile>
true
</EnableDotNetNativeCompatibleProfile>
<FileAlignment>
512
</FileAlignment>
<ProjectTypeGuids>
{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
</ProjectTypeGuids>
<PackageCertificateKeyFile>
MS2Tester_TemporaryKey.pfx
</PackageCertificateKeyFile>
...
...
@@ -95,6 +96,8 @@
<Compile
Include=
"App.xaml.cs"
>
<DependentUpon>
App.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"Helpers\AppServiceHelper.cs"
/>
<Compile
Include=
"Helpers\MS2TesterHelper.cs"
/>
<Compile
Include=
"MainPage.xaml.cs"
>
<DependentUpon>
MainPage.xaml
</DependentUpon>
</Compile>
...
...
@@ -111,63 +114,28 @@
<None
Include=
"MS2Tester_TemporaryKey.pfx"
/>
</ItemGroup>
<ItemGroup>
<Content
Include=
"Assets\StoreLogo.png"
/>
<Content
Include=
"Assets\WideLogo.png"
/>
<Content
Include=
"Assets\SplashScreen.scale-200.png"
/>
<Content
Include=
"Assets\Square150x150Logo.scale-200.png"
/>
<Content
Include=
"Assets\Square44x44Logo.scale-200.png"
/>
<Content
Include=
"Assets\StoreLogo.scale-200.png"
/>
<Content
Include=
"Properties\Default.rd.xml"
/>
<Content
Include=
"Assets\Images\nowebcamCIF.jpg"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</Content>
<Content
Include=
"Assets\Logo.png"
/>
<Content
Include=
"Assets\SmallLogo.png"
/>
<Content
Include=
"Assets\Sounds\arpeggio_8000_mono.wav"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</Content>
<Content
Include=
"Assets\Sounds\bird_44100_stereo.wav"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</Content>
<Content
Include=
"Assets\Sounds\chimes_48000_stereo.wav"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</Content>
<Content
Include=
"Assets\Sounds\hello16000-1s.wav"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</Content>
<Content
Include=
"Assets\Sounds\hello16000.wav"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</Content>
<Content
Include=
"Assets\Sounds\hello8000-1s.wav"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</Content>
<Content
Include=
"Assets\Sounds\hello8000.wav"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</Content>
<Content
Include=
"Assets\Sounds\hello_opus.mka"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</Content>
<Content
Include=
"Assets\Sounds\hello_pcmu.mka"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</Content>
<Content
Include=
"Assets\Sounds\laserrocket_16000_mono.wav"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</Content>
<Content
Include=
"Assets\Sounds\nylon_48000_mono.wav"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</Content>
<Content
Include=
"Assets\Sounds\owl_44100_mono.wav"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</Content>
<Content
Include=
"Assets\Sounds\piano_8000_stereo.wav"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</Content>
<Content
Include=
"Assets\Sounds\punch_16000_stereo.wav"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</Content>
<Content
Include=
"Assets\Sounds\sintel_trailer_opus_h264.mkv"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</Content>
<Content
Include=
"Assets\Sounds\sintel_trailer_pcmu_h264.mkv"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</Content>
<Content
Include=
"Assets\SplashScreen.png"
/>
<Content
Include=
"Assets\Images\nowebcamCIF.jpg"
/>
<Content
Include=
"Assets\Sounds\arpeggio_8000_mono.wav"
/>
<Content
Include=
"Assets\Sounds\bird_44100_stereo.wav"
/>
<Content
Include=
"Assets\Sounds\chimes_48000_stereo.wav"
/>
<Content
Include=
"Assets\Sounds\hello16000-1s.wav"
/>
<Content
Include=
"Assets\Sounds\hello16000.wav"
/>
<Content
Include=
"Assets\Sounds\hello8000-1s.wav"
/>
<Content
Include=
"Assets\Sounds\hello8000.wav"
/>
<Content
Include=
"Assets\Sounds\hello_opus.mka"
/>
<Content
Include=
"Assets\Sounds\hello_pcmu.mka"
/>
<Content
Include=
"Assets\Sounds\laserrocket_16000_mono.wav"
/>
<Content
Include=
"Assets\Sounds\nylon_48000_mono.wav"
/>
<Content
Include=
"Assets\Sounds\owl_44100_mono.wav"
/>
<Content
Include=
"Assets\Sounds\piano_8000_stereo.wav"
/>
<Content
Include=
"Assets\Sounds\punch_16000_stereo.wav"
/>
<Content
Include=
"Assets\Sounds\sintel_trailer_opus_h264.mkv"
/>
<Content
Include=
"Assets\Sounds\sintel_trailer_pcmu_h264.mkv"
/>
</ItemGroup>
<ItemGroup>
<ApplicationDefinition
Include=
"App.xaml"
>
...
...
@@ -183,6 +151,25 @@
<Generator>
MSBuild:Compile
</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<ProjectReference
Include=
"..\..\submodules\mswinrtvid\MSWinRTVideo.vcxproj"
>
<Project>
{2d0e44c4-e51d-4911-b876-345d1e5e5209}
</Project>
<Name>
MSWinRTVideo
</Name>
</ProjectReference>
<ProjectReference
Include=
"MS2TesterHost\MS2TesterHost.vcxproj"
>
<Project>
{8a1a89b3-f2db-4428-a571-f0dff2e1eec1}
</Project>
<Name>
MS2TesterHost
</Name>
</ProjectReference>
<ProjectReference
Include=
"MS2TesterTasks\MS2TesterTasks.csproj"
>
<Project>
{1ba81d48-5fc4-47fc-8a08-524c4b2859dd}
</Project>
<Name>
MS2TesterTasks
</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<SDKReference
Include=
"WindowsMobile, Version=10.0.10240.0"
>
<Name>
Windows Mobile Extensions for the UWP
</Name>
</SDKReference>
</ItemGroup>
<PropertyGroup
Condition=
" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '14.0' "
>
<VisualStudioVersion>
14.0
</VisualStudioVersion>
</PropertyGroup>
...
...
testers/MS2Tester/MS2Tester.sln
View file @
094d4137
...
...
@@ -5,16 +5,25 @@ VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MS2Tester", "MS2Tester.csproj", "{F9611E8F-6700-4E34-8CD4-47A54981183E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MS2TesterHost", "MS2TesterHost\MS2TesterHost.vcxproj", "{8A1A89B3-F2DB-4428-A571-F0DFF2E1EEC1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MS2TesterTasks", "MS2TesterTasks\MS2TesterTasks.csproj", "{1BA81D48-5FC4-47FC-8A08-524C4B2859DD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MSWinRTVideo", "..\..\submodules\mswinrtvid\MSWinRTVideo.vcxproj", "{2D0E44C4-E51D-4911-B876-345D1E5E5209}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F9611E8F-6700-4E34-8CD4-47A54981183E}.Debug|Any CPU.ActiveCfg = Debug|x86
{F9611E8F-6700-4E34-8CD4-47A54981183E}.Debug|ARM.ActiveCfg = Debug|ARM
{F9611E8F-6700-4E34-8CD4-47A54981183E}.Debug|ARM.Build.0 = Debug|ARM
{F9611E8F-6700-4E34-8CD4-47A54981183E}.Debug|ARM.Deploy.0 = Debug|ARM
...
...
@@ -24,6 +33,7 @@ Global
{F9611E8F-6700-4E34-8CD4-47A54981183E}.Debug|x86.ActiveCfg = Debug|x86
{F9611E8F-6700-4E34-8CD4-47A54981183E}.Debug|x86.Build.0 = Debug|x86
{F9611E8F-6700-4E34-8CD4-47A54981183E}.Debug|x86.Deploy.0 = Debug|x86
{F9611E8F-6700-4E34-8CD4-47A54981183E}.Release|Any CPU.ActiveCfg = Release|x86
{F9611E8F-6700-4E34-8CD4-47A54981183E}.Release|ARM.ActiveCfg = Release|ARM
{F9611E8F-6700-4E34-8CD4-47A54981183E}.Release|ARM.Build.0 = Release|ARM
{F9611E8F-6700-4E34-8CD4-47A54981183E}.Release|ARM.Deploy.0 = Release|ARM
...
...
@@ -33,6 +43,55 @@ Global
{F9611E8F-6700-4E34-8CD4-47A54981183E}.Release|x86.ActiveCfg = Release|x86
{F9611E8F-6700-4E34-8CD4-47A54981183E}.Release|x86.Build.0 = Release|x86
{F9611E8F-6700-4E34-8CD4-47A54981183E}.Release|x86.Deploy.0 = Release|x86
{8A1A89B3-F2DB-4428-A571-F0DFF2E1EEC1}.Debug|Any CPU.ActiveCfg = Debug|Win32
{8A1A89B3-F2DB-4428-A571-F0DFF2E1EEC1}.Debug|ARM.ActiveCfg = Debug|ARM
{8A1A89B3-F2DB-4428-A571-F0DFF2E1EEC1}.Debug|ARM.Build.0 = Debug|ARM
{8A1A89B3-F2DB-4428-A571-F0DFF2E1EEC1}.Debug|ARM.Deploy.0 = Debug|ARM
{8A1A89B3-F2DB-4428-A571-F0DFF2E1EEC1}.Debug|x64.ActiveCfg = Debug|x64
{8A1A89B3-F2DB-4428-A571-F0DFF2E1EEC1}.Debug|x64.Build.0 = Debug|x64
{8A1A89B3-F2DB-4428-A571-F0DFF2E1EEC1}.Debug|x86.ActiveCfg = Debug|Win32
{8A1A89B3-F2DB-4428-A571-F0DFF2E1EEC1}.Debug|x86.Build.0 = Debug|Win32
{8A1A89B3-F2DB-4428-A571-F0DFF2E1EEC1}.Debug|x86.Deploy.0 = Debug|Win32
{8A1A89B3-F2DB-4428-A571-F0DFF2E1EEC1}.Release|Any CPU.ActiveCfg = Release|Win32
{8A1A89B3-F2DB-4428-A571-F0DFF2E1EEC1}.Release|ARM.ActiveCfg = Release|ARM
{8A1A89B3-F2DB-4428-A571-F0DFF2E1EEC1}.Release|ARM.Build.0 = Release|ARM
{8A1A89B3-F2DB-4428-A571-F0DFF2E1EEC1}.Release|ARM.Deploy.0 = Release|ARM
{8A1A89B3-F2DB-4428-A571-F0DFF2E1EEC1}.Release|x64.ActiveCfg = Release|x64
{8A1A89B3-F2DB-4428-A571-F0DFF2E1EEC1}.Release|x64.Build.0 = Release|x64
{8A1A89B3-F2DB-4428-A571-F0DFF2E1EEC1}.Release|x64.Deploy.0 = Release|x64
{8A1A89B3-F2DB-4428-A571-F0DFF2E1EEC1}.Release|x86.ActiveCfg = Release|Win32
{8A1A89B3-F2DB-4428-A571-F0DFF2E1EEC1}.Release|x86.Build.0 = Release|Win32
{8A1A89B3-F2DB-4428-A571-F0DFF2E1EEC1}.Release|x86.Deploy.0 = Release|Win32
{1BA81D48-5FC4-47FC-8A08-524C4B2859DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1BA81D48-5FC4-47FC-8A08-524C4B2859DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1BA81D48-5FC4-47FC-8A08-524C4B2859DD}.Debug|ARM.ActiveCfg = Debug|ARM
{1BA81D48-5FC4-47FC-8A08-524C4B2859DD}.Debug|ARM.Build.0 = Debug|ARM
{1BA81D48-5FC4-47FC-8A08-524C4B2859DD}.Debug|x64.ActiveCfg = Debug|x64
{1BA81D48-5FC4-47FC-8A08-524C4B2859DD}.Debug|x64.Build.0 = Debug|x64
{1BA81D48-5FC4-47FC-8A08-524C4B2859DD}.Debug|x86.ActiveCfg = Debug|x86
{1BA81D48-5FC4-47FC-8A08-524C4B2859DD}.Debug|x86.Build.0 = Debug|x86
{1BA81D48-5FC4-47FC-8A08-524C4B2859DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1BA81D48-5FC4-47FC-8A08-524C4B2859DD}.Release|Any CPU.Build.0 = Release|Any CPU
{1BA81D48-5FC4-47FC-8A08-524C4B2859DD}.Release|ARM.ActiveCfg = Release|ARM
{1BA81D48-5FC4-47FC-8A08-524C4B2859DD}.Release|ARM.Build.0 = Release|ARM
{1BA81D48-5FC4-47FC-8A08-524C4B2859DD}.Release|x64.ActiveCfg = Release|x64
{1BA81D48-5FC4-47FC-8A08-524C4B2859DD}.Release|x64.Build.0 = Release|x64
{1BA81D48-5FC4-47FC-8A08-524C4B2859DD}.Release|x86.ActiveCfg = Release|x86
{1BA81D48-5FC4-47FC-8A08-524C4B2859DD}.Release|x86.Build.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
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
...
...
testers/MS2Tester/Package.appxmanifest
View file @
094d4137
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns=
"http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp=
"http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap=
"http://schemas.microsoft.com/appx/manifest/uap/windows10"
IgnorableNamespaces=
"uap mp"
>
<Identity
Name=
"BelledonneCommunications.MS2Tester"
Publisher=
"CN=belledonne communications, O=belledonne communications, L=Grenoble, C=FR"
Version=
"1.0.0.0"
/>
<mp:PhoneIdentity
PhoneProductId=
"ac26f86f-e117-46d1-b061-f531edef0ef0"
PhonePublisherId=
"00000000-0000-0000-0000-000000000000"
/>
<Package
xmlns=
"http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp=
"http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap=
"http://schemas.microsoft.com/appx/manifest/uap/windows10"
IgnorableNamespaces=
"uap mp"
>
<Identity
Name=
"BelledonneCommunications.MS2Tester"
Publisher=
"CN=belledonne communications, O=belledonne communications, L=Grenoble, C=FR"
Version=
"1.0.0.0"
/>
<mp:PhoneIdentity
PhoneProductId=
"95abc830-0c12-41c0-ab5c-2992525992c4"
PhonePublisherId=
"00000000-0000-0000-0000-000000000000"
/>
<Properties>
<DisplayName>
MS2Tester
</DisplayName>
<PublisherDisplayName>
Belledonne Communications
</PublisherDisplayName>
<Logo>
Assets\StoreLogo.png
</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily
Name=
"Windows.Universal"
MinVersion=
"10.0.
0
.0"
MaxVersionTested=
"10.0.
0
.0"
/>
<TargetDeviceFamily
Name=
"Windows.Universal"
MinVersion=
"10.0.
10069
.0"
MaxVersionTested=
"10.0.
10069
.0"
/>
</Dependencies>
<Resources>
<Resource
Language=
"x-generate"
/>
<Resource
Language=
"x-generate"
/>
</Resources>
<Applications>
<Application
Id=
"App"
Executable=
"$targetnametoken$.exe"
EntryPoint=
"MS2Tester.App"
>
<uap:VisualElements
DisplayName=
"MS2Tester"
Square150x150Logo=
"Assets\Logo.png"
Square44x44Logo=
"Assets\SmallLogo.png"
Description=
"MS2Tester"
BackgroundColor=
"#ffffff"
>
<uap:DefaultTile
Wide310x150Logo=
"Assets\WideLogo.png"
/>
<Application
Id=
"App"
Executable=
"$targetnametoken$.exe"
EntryPoint=
"MS2Tester.App"
>
<uap:VisualElements
DisplayName=
"MS2Tester"
Square150x150Logo=
"Assets\Square150x150Logo.png"
Square44x44Logo=
"Assets\Square44x44Logo.png"
Description=
"MS2Tester"
BackgroundColor=
"#ffffff"
>
<uap:DefaultTile>
<uap:ShowNameOnTiles>
<uap:ShowOn
Tile=
"square150x150Logo"
/>
</uap:ShowNameOnTiles>
</uap:DefaultTile>
<uap:SplashScreen
Image=
"Assets\SplashScreen.png"
/>
</uap:VisualElements>
<Extensions>
<uap:Extension
Category=
"windows.voipCall"
></uap:Extension>
<Extension
Category=
"windows.backgroundTasks"
EntryPoint=
"MS2TesterTasks.PhoneCallTask"
>
<BackgroundTasks
ServerName=
"MS2TesterHost"
>
<Task
Type=
"systemEvent"
/>
</BackgroundTasks>
</Extension>
<uap:Extension
Category=
"windows.appService"
EntryPoint=
"MS2TesterTasks.AppService"
>
<uap:AppService
Name=
"MS2TesterTasks.AppService"
ServerName=
"MS2TesterHost"
/>
</uap:Extension>
<uap:Extension
Category=
"windows.protocol"
>
<uap:Protocol
Name=
"ms2-tester"
/>
</uap:Extension>
</Extensions>
</Application>
</Applications>
<Capabilities>
<Capability
Name=
"internetClient"
/>
<Capability
Name=
"internetClientServer"
/>
<uap:Capability
Name=
"voipCall"
/>
<DeviceCapability
Name=
"microphone"
/>
<DeviceCapability
Name=
"webcam"
/>
</Capabilities>
<Extensions>
<Extension
Category=
"windows.activatableClass.outOfProcessServer"
>
<OutOfProcessServer
ServerName=
"MS2TesterHost"
>
<Path>
MS2TesterHost.exe
</Path>
<Instancing>
singleInstance
</Instancing>
<ActivatableClass
ActivatableClassId=
"MS2TesterHost.Dummy"
/>
</OutOfProcessServer>
</Extension>
<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
testers/MS2Tester/VideoPage.xaml
View file @
094d4137
...
...
@@ -38,9 +38,7 @@
<ComboBox x:Name="CameraComboBox" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="8"/>
<TextBlock x:Name="CodecLabel" Grid.Row="1" Grid.Column="0" Text="Codec:" VerticalAlignment="Center" Margin="8"/>
<ComboBox x:Name="CodecComboBox" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="8">
<ComboBoxItem Content="H263"/>
<ComboBoxItem Content="H264"/>
<ComboBoxItem Content="MPEG4"/>
<ComboBoxItem Content="VP8" IsSelected="True"/>
</ComboBox>
<TextBlock x:Name="VideoSizeLabel" Grid.Row="2" Grid.Column="0" Text="Video size:" VerticalAlignment="Center" Margin="8"/>
...
...
@@ -67,14 +65,24 @@
<Button x:Name="ChangeCameraButton" Content="Change camera" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="8" Click="ChangeCameraButton_Click" IsEnabled="{Binding ElementName=VideoToggleButton, Path=IsChecked}"/>
</StackPanel>
</Grid>
<Grid Grid.Row="1" MaxHeight="320">
<Grid x:Name="VideoGrid" Grid.Row="1" HorizontalAlignment="Center" Background="Black">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<CaptureElement x:Name="LocalVideo" Stretch="Uniform" Grid.Column="0"/>
<MediaElement x:Name="RemoteVideo" Stretch="Uniform" MediaFailed="RemoteVideo_MediaFailed" MediaEnded="RemoteVideo_MediaEnded" MediaOpened="RemoteVideo_MediaOpened" PartialMediaFailureDetected="RemoteVideo_PartialMediaFailureDetected" RateChanged="RemoteVideo_RateChanged" SizeChanged="RemoteVideo_SizeChanged" CurrentStateChanged="RemoteVideo_CurrentStateChanged" Grid.Column="1"/>
<SwapChainPanel x:Name="VideoSwapChainPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
<SwapChainPanel x:Name="PreviewSwapChainPanel" Width="160" Height="120" Grid.Column="2" Grid.Row="2" RenderTransformOrigin="0.5,0.5">
<SwapChainPanel.RenderTransform>
<CompositeTransform ScaleX="-1"/>
</SwapChainPanel.RenderTransform>
</SwapChainPanel>
</Grid>
</Grid>
</ScrollViewer>
...
...
testers/MS2Tester/VideoPage.xaml.cs
View file @
094d4137
...
...
@@ -3,6 +3,8 @@ using System.Collections.Generic;
using
System.IO
;
using
System.Linq
;
using
System.Runtime.InteropServices.WindowsRuntime
;
using
System.Threading.Tasks
;
using
Windows.ApplicationModel.Calls
;
using
Windows.Devices.Sensors
;
using
Windows.Foundation
;
using
Windows.Foundation.Collections
;
...
...
@@ -16,6 +18,9 @@ using Windows.UI.Xaml.Input;
using
Windows.UI.Xaml.Media
;
using
Windows.UI.Xaml.Navigation
;
using
BelledonneCommunications.Mediastreamer2.Tester
;
using
ms2_tester.Helpers
;
using
MS2TesterTasks
;
using
System.Diagnostics
;
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
...
...
@@ -29,16 +34,7 @@ namespace MS2Tester
public
VideoPage
()
{
this
.
InitializeComponent
();
NativeTester
.
Instance
.
initVideo
();
bool
isSelected
=
true
;
foreach
(
String
device
in
NativeTester
.
Instance
.
VideoDevices
)
{
ComboBoxItem
item
=
new
ComboBoxItem
();
item
.
Content
=
device
;
item
.
IsSelected
=
isSelected
;
isSelected
=
false
;
CameraComboBox
.
Items
.
Add
(
item
);
}
InitVideoPage
();
}
override
protected
void
OnNavigatedTo
(
Windows
.
UI
.
Xaml
.
Navigation
.
NavigationEventArgs
e
)
...
...
@@ -54,6 +50,12 @@ namespace MS2Tester
orientationSensor
.
OrientationChanged
+=
OrientationSensor_OrientationChanged
;
}
Window
.
Current
.
SizeChanged
+=
Current_SizeChanged
;
this
.
Loaded
+=
VideoPage_Loaded
;
}
private
void
VideoPage_Loaded
(
object
sender
,
RoutedEventArgs
e
)
{
AdaptVideoSize
();
}
protected
override
void
OnNavigatedFrom
(
NavigationEventArgs
e
)
...
...
@@ -78,79 +80,244 @@ namespace MS2Tester
private
async
void
Current_SizeChanged
(
object
sender
,
Windows
.
UI
.
Core
.
WindowSizeChangedEventArgs
e
)
{
AdaptVideoSize
();
displayOrientation
=
ApplicationView
.
GetForCurrentView
().
Orientation
;
await
Dispatcher
.
RunAsync
(
Windows
.
UI
.
Core
.
CoreDispatcherPriority
.
Normal
,
()
=>
SetVideoOrientation
());
}
private
void
BackButton_Click
(
object
sender
,
RoutedEventArgs
e
)
{
NativeTester
.
Instance
.
u
ninitVideo
();
U
ninitVideo
();
((
Frame
)
Window
.
Current
.
Content
).
GoBack
();
}
private
void
RemoteVideo_MediaFail
ed
(
object
sender
,
Exception
RoutedEventArgs
e
)
private
void
VideoToggleButton_Check
ed
(
object
sender
,
RoutedEventArgs
e
)
{
System
.
Diagnostics
.
Debug
.
WriteLine
(
"RemoteVideo_MediaFailed"
);
ToggleButton
b
=
sender
as
ToggleButton
;
if
(
b
.
IsChecked
==
true
)
{
String
camera
=
(
CameraComboBox
.
SelectedItem
as
ComboBoxItem
).
Content
as
String
;
String
codec
=
(
CodecComboBox
.
SelectedItem
as
ComboBoxItem
).
Content
as
String
;
String
videoSize
=
(
VideoSizeComboBox
.
SelectedItem
as
ComboBoxItem
).
Content
as
String
;
UInt32
frameRate
=
25
;
UInt32
.
TryParse
((
FramerateComboBox
.
SelectedItem
as
ComboBoxItem
).
Content
as
String
,
out
frameRate
);
UInt32
bitRate
=
1500
;
UInt32
.
TryParse
(
BitrateTextBox
.
Text
,
out
bitRate
);
StartVideoStream
(
camera
,
codec
,
videoSize
,
frameRate
,
bitRate
);
}
else
{
if
(
_videoSource
!=
null
)
{
_videoSource
.
Stop
();
_videoSource
=
null
;
}
if
(
_previewSource
!=
null
)
{
_previewSource
.
Stop
();
_previewSource
=
null
;
}
StopVideoStream
();
}
}
private
void
RemoteVideo_MediaEnded
(
object
sender
,
RoutedEventArgs
e
)
private
async
void
InitVideoPage
(
)
{
System
.
Diagnostics
.
Debug
.
WriteLine
(
"RemoteVideo_MediaEnded"
);
// Perform the video capture & display in a background task. Set to false to run in foreground.
MS2TesterHelper
.
RunInBackground
=
true
;
await
InitVideo
();
await
FillCameraComboBox
();
}
private
async
Task
FillCameraComboBox
()
{
bool
isSelected
=
true
;
List
<
String
>
videoDevices
=
await
GetVideoDevices
();
foreach
(
String
device
in
videoDevices
)
{
ComboBoxItem
item
=
new
ComboBoxItem
();
item
.
Content
=
device
;
item
.
IsSelected
=
isSelected
;
isSelected
=
false
;
CameraComboBox
.
Items
.
Add
(
item
);
}
}
private
async
Task
InitVideo
()
{
try
{
OperationResult
result
=
await
MS2TesterHelper
.
InitVideo
();
if
(
result
==
OperationResult
.
Succeeded
)
{
Debug
.
WriteLine
(
"InitVideo: success"
);
}
else
{
Debug
.
WriteLine
(
"InitVideo: failure"
);
}
}
catch
(
Exception
e
)
{
Debug
.
WriteLine
(
String
.
Format
(
"InitVideo: Exception {0}"
,
e
.
Message
));
}
}
private
async
void
UninitVideo
()
{
try
{
OperationResult
result
=
await
MS2TesterHelper
.
UninitVideo
();
if
(
result
==
OperationResult
.
Succeeded
)
{
Debug
.
WriteLine
(
"UninitVideo: success"
);
}
else
{
Debug
.
WriteLine
(
"UninitVideo: failure"
);
}
}
catch
(
Exception
e
)
{
Debug
.
WriteLine
(
String
.
Format
(
"UninitVideo: Exception {0}"
,
e
.
Message
));
}
}
private
void
RemoteVideo_MediaOpened
(
object
sender
,
RoutedEventArgs
e
)
private
async
Task
<
List
<
String
>>
GetVideoDevices
(
)
{
System
.
Diagnostics
.
Debug
.
WriteLine
(
"RemoteVideo_MediaOpened"
);
List
<
String
>
result
=
null
;
try
{
result
=
await
MS2TesterHelper
.
GetVideoDevices
();
if
(
result
!=
null
)
{
Debug
.
WriteLine
(
"GetVideoDevices: success"
);
}
else
{
Debug
.
WriteLine
(
"GetVideoDevices: failure"
);
}
}
catch
(
Exception
e
)
{
Debug
.
WriteLine
(
String
.
Format
(
"GetVideoDevices: Exception {0}"
,
e
.
Message
));
}
return
result
;
}
private
void
RemoteVideo_PartialMediaFailureDetected
(
MediaElement
sen
de
r
,
PartialMediaFailureDetectedEventArgs
args
)
private
async
void
StartVideoStream
(
String
camera
,
String
co
de
c
,
String
videoSize
,
UInt32
frameRate
,
UInt32
bitRate
)
{
System
.
Diagnostics
.
Debug
.
WriteLine
(
"RemoteVideo_PartialMediaFailureDetected"
);
try
{
_videoSource
=
new
MSWinRTVideo
.
SwapChainPanelSource
();
_videoSource
.
Start
(
VideoSwapChainPanel
);
_previewSource
=
new
MSWinRTVideo
.
SwapChainPanelSource
();
_previewSource
.
Start
(
PreviewSwapChainPanel
);
var
vcc
=
VoipCallCoordinator
.
GetDefault
();
var
entryPoint
=
typeof
(
PhoneCallTask
).
FullName
;
var
status
=
await
vcc
.
ReserveCallResourcesAsync
(
entryPoint
);
var
capabilities
=
VoipPhoneCallMedia
.
Audio
|
VoipPhoneCallMedia
.
Video
;
call
=
vcc
.
RequestNewOutgoingCall
(
"FooContext"
,
"FooContact"
,
"MS2Tester"
,
capabilities
);
call
.
NotifyCallActive
();