Make examples in /media, /sfu-media, and /streamer work in UWP.

This commit is contained in:
Hanseul Jun
2021-03-23 11:11:27 -07:00
parent e33717e077
commit 6b21637dd5
25 changed files with 174 additions and 4 deletions

View File

@ -1,6 +1,20 @@
cmake_minimum_required(VERSION 3.7)
add_executable(datachannel-media main.cpp)
set(MEDIA_UWP_RESOURCES
uwp/Logo.png
uwp/package.appxManifest
uwp/SmallLogo.png
uwp/SmallLogo44x44.png
uwp/SplashScreen.png
uwp/StoreLogo.png
uwp/Windows_TemporaryKey.pfx
)
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
add_executable(datachannel-media main.cpp ${MEDIA_UWP_RESOURCES})
else()
add_executable(datachannel-media main.cpp)
endif()
set_target_properties(datachannel-media PROPERTIES
CXX_STANDARD 17
OUTPUT_NAME media)

BIN
examples/media/uwp/Logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 909 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

View File

@ -0,0 +1,42 @@
<?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"
xmlns:desktop4="http://schemas.microsoft.com/appx/manifest/desktop/windows10/4"
xmlns:iot2="http://schemas.microsoft.com/appx/manifest/iot/windows10/2"
IgnorableNamespaces="uap mp">
<Identity Name="6597869B-290B-3EC7-AC50-87D2B9B408A2" Publisher="CN=CMake" Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="6597869B-290B-3EC7-AC50-87D2B9B408A2" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<Properties>
<DisplayName>datachannel-media</DisplayName>
<PublisherDisplayName>CMake</PublisherDisplayName>
<Logo>StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application
Id="App"
Executable="media.exe"
EntryPoint="datachannel-media.App"
desktop4:Subsystem="console"
desktop4:SupportsMultipleInstances="true"
iot2:Subsystem="console"
iot2:SupportsMultipleInstances="true">
<uap:VisualElements
DisplayName="datachannel-media"
Description="datachannel-media"
BackgroundColor="#336699"
Square150x150Logo="Logo.png"
Square44x44Logo="SmallLogo44x44.png">
<uap:SplashScreen Image="SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>
</Package>

View File

@ -1,6 +1,20 @@
cmake_minimum_required(VERSION 3.7)
add_executable(datachannel-sfu-media main.cpp)
set(SFU_MEDIA_UWP_RESOURCES
uwp/Logo.png
uwp/package.appxManifest
uwp/SmallLogo.png
uwp/SmallLogo44x44.png
uwp/SplashScreen.png
uwp/StoreLogo.png
uwp/Windows_TemporaryKey.pfx
)
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
add_executable(datachannel-sfu-media main.cpp ${SFU_MEDIA_UWP_RESOURCES})
else()
add_executable(datachannel-sfu-media main.cpp)
endif()
set_target_properties(datachannel-sfu-media PROPERTIES
CXX_STANDARD 17
OUTPUT_NAME sfu-media)

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 909 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

View File

@ -0,0 +1,42 @@
<?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"
xmlns:desktop4="http://schemas.microsoft.com/appx/manifest/desktop/windows10/4"
xmlns:iot2="http://schemas.microsoft.com/appx/manifest/iot/windows10/2"
IgnorableNamespaces="uap mp">
<Identity Name="A2137F64-F4DB-39E1-8A6E-19BF1A64645A" Publisher="CN=CMake" Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="A2137F64-F4DB-39E1-8A6E-19BF1A64645A" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<Properties>
<DisplayName>datachannel-sfu-media</DisplayName>
<PublisherDisplayName>CMake</PublisherDisplayName>
<Logo>StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application
Id="App"
Executable="sfu-media.exe"
EntryPoint="datachannel-sfu-media.App"
desktop4:Subsystem="console"
desktop4:SupportsMultipleInstances="true"
iot2:Subsystem="console"
iot2:SupportsMultipleInstances="true">
<uap:VisualElements
DisplayName="datachannel-sfu-media"
Description="datachannel-sfu-media"
BackgroundColor="#336699"
Square150x150Logo="Logo.png"
Square44x44Logo="SmallLogo44x44.png">
<uap:SplashScreen Image="SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>
</Package>

View File

@ -3,7 +3,7 @@ if(POLICY CMP0079)
cmake_policy(SET CMP0079 NEW)
endif()
add_executable(streamer
set(STREAMER_SOURCES
main.cpp
dispatchqueue.cpp
dispatchqueue.hpp
@ -21,6 +21,22 @@ add_executable(streamer
ArgParser.hpp
)
set(STREAMER_UWP_RESOURCES
uwp/Logo.png
uwp/package.appxManifest
uwp/SmallLogo.png
uwp/SmallLogo44x44.png
uwp/SplashScreen.png
uwp/StoreLogo.png
uwp/Windows_TemporaryKey.pfx
)
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
add_executable(streamer ${STREAMER_SOURCES} ${STREAMER_UWP_RESOURCES})
else()
add_executable(streamer ${STREAMER_SOURCES})
endif()
if(WIN32)
target_compile_definitions(streamer PUBLIC STATIC_GETOPT)
endif()

View File

@ -28,7 +28,7 @@ FileParser::FileParser(string directory, string extension, uint32_t samplesPerSe
}
void FileParser::start() {
sampleTime_us = -sampleDuration_us;
sampleTime_us = -sampleDuration_us;
loadNextSample();
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 909 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

View File

@ -0,0 +1,42 @@
<?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"
xmlns:desktop4="http://schemas.microsoft.com/appx/manifest/desktop/windows10/4"
xmlns:iot2="http://schemas.microsoft.com/appx/manifest/iot/windows10/2"
IgnorableNamespaces="uap mp">
<Identity Name="84B30BB9-5FF7-36A6-9F72-8BA5B2594C7F" Publisher="CN=CMake" Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="84B30BB9-5FF7-36A6-9F72-8BA5B2594C7F" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<Properties>
<DisplayName>streamer</DisplayName>
<PublisherDisplayName>CMake</PublisherDisplayName>
<Logo>StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application
Id="App"
Executable="streamer.exe"
EntryPoint="streamer.App"
desktop4:Subsystem="console"
desktop4:SupportsMultipleInstances="true"
iot2:Subsystem="console"
iot2:SupportsMultipleInstances="true">
<uap:VisualElements
DisplayName="streamer"
Description="streamer"
BackgroundColor="#336699"
Square150x150Logo="Logo.png"
Square44x44Logo="SmallLogo44x44.png">
<uap:SplashScreen Image="SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>
</Package>