Skip to content

Commit e18bff7

Browse files
committed
Initial commit
0 parents  commit e18bff7

File tree

299 files changed

+47068
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

299 files changed

+47068
-0
lines changed

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Gitignore for Streaming SDK
2+
# Build results
3+
build/*
4+
out/*
5+
bin/*
6+
7+
8+
# User-specific files
9+
*.rsuser
10+
*.suo
11+
*.user
12+
*.userosscache
13+
*.sln.docstates
14+
*.log
15+
16+
# Android Studio generated files
17+
*.idea
18+
19+
# Visual Studio cache/options directory
20+
.vs/
21+
.vscode/

.gitmodules

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[submodule "mbedtls"]
2+
path = mbedtls
3+
url = https://github.com/Mbed-TLS/mbedtls.git
4+
[submodule "amf"]
5+
path = amf
6+
url = https://github.com/GPUOpen-LibrariesAndSDKs/AMF.git
7+
ignore = untracked

CMakeLists.txt

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
cmake_minimum_required(VERSION 3.15)
2+
3+
# Define the project name
4+
project(StreamingSDK)
5+
6+
# Specify the C++ standard
7+
set(CMAKE_CXX_STANDARD 20)
8+
set(CMAKE_CXX_STANDARD_REQUIRED True)
9+
10+
if(MSVC)
11+
# Set common compile flags for MSVC
12+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /permissive- /W4 /std:c++latest /WX /FC /DUNICODE /D_UNICODE /nologo")
13+
14+
# Ensure runtime library settings and flags are consistent across the entire project when using MSVC
15+
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd /ZI /JMC /sdl")
16+
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT /Zi /Oi /GL /Gy")
17+
18+
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
19+
20+
# Set global link and lib options for Debug and Release configurations
21+
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /DEBUG /NOLOGO")
22+
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DEBUG /NOLOGO")
23+
set(CMAKE_STATIC_LINKER_FLAGS_DEBUG "${CMAKE_STATIC_LINKER_FLAGS_DEBUG} /NOLOGO")
24+
25+
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG /INCREMENTAL:NO /OPT:REF /OPT:ICF /NOLOGO")
26+
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG /INCREMENTAL:NO /OPT:REF /OPT:ICF /NOLOGO")
27+
set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} /LTCG /NOLOGO")
28+
29+
#elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
30+
# # compiler error checking flags for linux
31+
#-Wno-register \
32+
#-Werror \
33+
#-Wall \
34+
#-Wextra \
35+
#-Wno-unknown-pragmas \
36+
#-Wno-reorder \
37+
#-Wno-unused \
38+
#-Wno-switch \
39+
#-Wno-sign-compare \
40+
#-Wno-missing-field-initializers \
41+
#-Wno-nonnull \
42+
#-Wno-overloaded-virtual \
43+
endif()
44+
45+
if(WIN32)
46+
set(PROGRAM_FILES_X86 "$ENV{ProgramFiles\(x86\)}")
47+
set(WINDOWS_SDK_VERSION "10.0.26100.0")
48+
set(WINDOWS_SDK_INCLUDE_BASE "${PROGRAM_FILES_X86}/Windows Kits/10/Include/${WINDOWS_SDK_VERSION}")
49+
set(WINDOWS_SDK_INCLUDE
50+
"${WINDOWS_SDK_INCLUDE_BASE}/ucrt"
51+
"${WINDOWS_SDK_INCLUDE_BASE}/um"
52+
"${WINDOWS_SDK_INCLUDE_BASE}/shared"
53+
"${WINDOWS_SDK_INCLUDE_BASE}/winrt"
54+
"${WINDOWS_SDK_INCLUDE_BASE}/cppwinrt"
55+
"${WINDOWS_SDK_INCLUDE_BASE}/um"
56+
)
57+
set(WINDOWS_SDK_BIN "${PROGRAM_FILES_X86}/Windows Kits/10/bin/${WINDOWS_SDK_VERSION}/x64")
58+
set(OCL_ROOT "$ENV{OCL_ROOT}")
59+
set(VK_SDK_PATH "$ENV{VK_SDK_PATH}")
60+
include_directories(${WINDOWS_SDK_INCLUDE} $ENV{VK_SDK_PATH}/include)
61+
include_directories(${OCL_ROOT}/include)
62+
endif()
63+
64+
65+
# Set output directories for all build configurations
66+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_SOURCE_DIR}/bin/Debug")
67+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_SOURCE_DIR}/bin/Debug")
68+
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${CMAKE_SOURCE_DIR}/bin/Debug")
69+
70+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_SOURCE_DIR}/bin/Release")
71+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_SOURCE_DIR}/bin/Release")
72+
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${CMAKE_SOURCE_DIR}/bin/Release")
73+
74+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_SOURCE_DIR}/bin/RelWithDebInfo")
75+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_SOURCE_DIR}/bin/RelWithDebInfo")
76+
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_SOURCE_DIR}/bin/RelWithDebInfo")
77+
78+
# Solution configurations
79+
set(CMAKE_CONFIGURATION_TYPES "Debug;Release;RelWithDebInfo" CACHE STRING "" FORCE)
80+
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
81+
82+
set(SOURCE_FILES "")
83+
set(HEADER_FILES "")
84+
85+
# Add subdirectories for each project
86+
set(SUBFOLDER_NET sdk/net)
87+
set(SUBFOLDER_UTIL sdk/util)
88+
set(SUBFOLDER_TRANSPORT_COMMON sdk/transports/transport-common)
89+
set(SUBFOLDER_TRANSPORT_AMD sdk/transports/transport-amd)
90+
set(SUBFOLDER_VIDEO sdk/video)
91+
set(SUBFOLDER_AUDIO sdk/audio)
92+
set(SUBFOLDER_CONTROLLERS sdk/controllers)
93+
94+
add_subdirectory(amf-helper-libs/amf-public)
95+
add_subdirectory(amf-helper-libs/amf-component-ffmpeg64)
96+
add_subdirectory(${SUBFOLDER_NET})
97+
add_subdirectory(${SUBFOLDER_UTIL})
98+
add_subdirectory(${SUBFOLDER_TRANSPORT_COMMON})
99+
add_subdirectory(${SUBFOLDER_TRANSPORT_AMD})
100+
add_subdirectory(${SUBFOLDER_VIDEO})
101+
add_subdirectory(${SUBFOLDER_AUDIO})
102+
add_subdirectory(${SUBFOLDER_CONTROLLERS})
103+
add_subdirectory(mbedtls-custom)
104+
add_subdirectory(samples/SimpleStreamingClient)
105+
add_subdirectory(samples/RemoteDesktopServer)
106+
107+
# Add the library
108+
add_library(ssdk STATIC ${SOURCE_FILES} ${HEADER_FILES})
109+
110+
# Include directories
111+
target_include_directories(ssdk PRIVATE
112+
./
113+
sdk
114+
amf
115+
amf/amf
116+
mbedtls/include
117+
)
118+
119+
# Compile definitions
120+
target_compile_definitions(ssdk PRIVATE
121+
$<$<CONFIG:Debug>:_DEBUG;_LIB>
122+
$<$<CONFIG:Release>:NDEBUG;_LIB>
123+
)
124+
125+
# Project dependencies
126+
add_dependencies(SimpleStreamingClient ssdk amf-public amf-component-ffmpeg64 mbedtls-custom)
127+
add_dependencies(RemoteDesktopServer ssdk amf-public amf-component-ffmpeg64 mbedtls-custom)
128+
129+
# Optionally, group targets into folders in the solution
130+
set_target_properties(ssdk PROPERTIES FOLDER "libs")
131+
set_target_properties(mbedtls-custom PROPERTIES FOLDER "libs")
132+
set_target_properties(SimpleStreamingClient PROPERTIES FOLDER "samples")
133+
set_target_properties(RemoteDesktopServer PROPERTIES FOLDER "samples")

CMakeSettings.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "x64-Debug",
5+
"generator": "Visual Studio 16 2019 Win64",
6+
"configurationType": "Debug",
7+
"inheritEnvironments": [ "msvc_x64_x64" ],
8+
"buildRoot": "${projectDir}\\out\\build\\${name}",
9+
"installRoot": "${projectDir}\\out\\install\\${name}",
10+
"cmakeCommandArgs": "-DCMAKE_VERBOSE_MAKEFILE=ON",
11+
"buildCommandArgs": "",
12+
"ctestCommandArgs": "",
13+
"intelliSenseMode": "windows-msvc-x64"
14+
},
15+
{
16+
"name": "x64-Release",
17+
"generator": "Visual Studio 16 2019 Win64",
18+
"configurationType": "Release",
19+
"buildRoot": "${projectDir}\\out\\build\\${name}",
20+
"installRoot": "${projectDir}\\out\\install\\${name}",
21+
"cmakeCommandArgs": "-DCMAKE_VERBOSE_MAKEFILE=ON",
22+
"buildCommandArgs": "",
23+
"ctestCommandArgs": "",
24+
"inheritEnvironments": [ "msvc_x64_x64" ],
25+
"intelliSenseMode": "windows-msvc-x64"
26+
},
27+
{
28+
"name": "x64-RelWithDebInfo",
29+
"generator": "Visual Studio 16 2019 Win64",
30+
"configurationType": "RelWithDebInfo",
31+
"buildRoot": "${projectDir}\\out\\build\\${name}",
32+
"installRoot": "${projectDir}\\out\\install\\${name}",
33+
"cmakeCommandArgs": "-DCMAKE_VERBOSE_MAKEFILE=ON",
34+
"buildCommandArgs": "",
35+
"ctestCommandArgs": "",
36+
"inheritEnvironments": [ "msvc_x64_x64" ],
37+
"intelliSenseMode": "windows-msvc-x64"
38+
}
39+
]
40+
}

CMakeSettingsVS2019.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "x64-Debug",
5+
"generator": "Visual Studio 16 2019 Win64",
6+
"configurationType": "Debug",
7+
"inheritEnvironments": [ "msvc_x64_x64" ],
8+
"buildRoot": "${projectDir}\\out\\build\\${name}",
9+
"installRoot": "${projectDir}\\out\\install\\${name}",
10+
"cmakeCommandArgs": "-DCMAKE_VERBOSE_MAKEFILE=ON",
11+
"buildCommandArgs": "",
12+
"ctestCommandArgs": "",
13+
"intelliSenseMode": "windows-msvc-x64"
14+
},
15+
{
16+
"name": "x64-Release",
17+
"generator": "Visual Studio 16 2019 Win64",
18+
"configurationType": "Release",
19+
"buildRoot": "${projectDir}\\out\\build\\${name}",
20+
"installRoot": "${projectDir}\\out\\install\\${name}",
21+
"cmakeCommandArgs": "-DCMAKE_VERBOSE_MAKEFILE=ON",
22+
"buildCommandArgs": "",
23+
"ctestCommandArgs": "",
24+
"inheritEnvironments": [ "msvc_x64_x64" ],
25+
"intelliSenseMode": "windows-msvc-x64"
26+
},
27+
{
28+
"name": "x64-RelWithDebInfo",
29+
"generator": "Visual Studio 16 2019 Win64",
30+
"configurationType": "RelWithDebInfo",
31+
"buildRoot": "${projectDir}\\out\\build\\${name}",
32+
"installRoot": "${projectDir}\\out\\install\\${name}",
33+
"cmakeCommandArgs": "-DCMAKE_VERBOSE_MAKEFILE=ON",
34+
"buildCommandArgs": "",
35+
"ctestCommandArgs": "",
36+
"inheritEnvironments": [ "msvc_x64_x64" ],
37+
"intelliSenseMode": "windows-msvc-x64"
38+
}
39+
]
40+
}

CMakeSettingsVS2022.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "x64-Debug",
5+
"generator": "Visual Studio 17 2022 Win64",
6+
"configurationType": "Debug",
7+
"inheritEnvironments": [ "msvc_x64_x64" ],
8+
"buildRoot": "${projectDir}\\out\\build\\${name}",
9+
"installRoot": "${projectDir}\\out\\install\\${name}",
10+
"cmakeCommandArgs": "-DCMAKE_VERBOSE_MAKEFILE=ON",
11+
"buildCommandArgs": "",
12+
"ctestCommandArgs": "",
13+
"intelliSenseMode": "windows-msvc-x64"
14+
},
15+
{
16+
"name": "x64-Release",
17+
"generator": "Visual Studio 17 2022 Win64",
18+
"configurationType": "Release",
19+
"buildRoot": "${projectDir}\\out\\build\\${name}",
20+
"installRoot": "${projectDir}\\out\\install\\${name}",
21+
"cmakeCommandArgs": "-DCMAKE_VERBOSE_MAKEFILE=ON",
22+
"buildCommandArgs": "",
23+
"ctestCommandArgs": "",
24+
"inheritEnvironments": [ "msvc_x64_x64" ],
25+
"intelliSenseMode": "windows-msvc-x64"
26+
},
27+
{
28+
"name": "x64-RelWithDebInfo",
29+
"generator": "Visual Studio 17 2022 Win64",
30+
"configurationType": "RelWithDebInfo",
31+
"buildRoot": "${projectDir}\\out\\build\\${name}",
32+
"installRoot": "${projectDir}\\out\\install\\${name}",
33+
"cmakeCommandArgs": "-DCMAKE_VERBOSE_MAKEFILE=ON",
34+
"buildCommandArgs": "",
35+
"ctestCommandArgs": "",
36+
"inheritEnvironments": [ "msvc_x64_x64" ],
37+
"intelliSenseMode": "windows-msvc-x64"
38+
}
39+
]
40+
}

LICENSE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Notice Regarding Standards. AMD does not provide a license or sublicense to any Intellectual Property Rights relating to any standards, including but not limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and MP3 (collectively, the "Media Technologies"). For clarity, you will pay any royalties due for such third party technologies, which may include the Media Technologies that are owed as a result of AMD providing the Software to you.
2+
3+
# MIT License
4+
5+
6+
Copyright Advanced Micro Devices, Inc. All rights reserved.
7+
8+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
11+
12+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Streaming SDK
2+
3+
Streaming SDK is a C++ library that provides building blocks and samples for low latency streaming applications, such as Cloud Game Streaming, Virtual Desktop Interface (VDI),
4+
Virtual and Augmented Reality, etc. using AMD Radeon graphics. It allows you to build a complete streaming solution including video and audio capture, video and audio encoder/decoder/pre-post-processing pipelines, a robust and secure network stack, or use some of its components, while implementing the rest yourself.
5+
6+
## Changelog:
7+
- Initial revision
8+
9+
## Dependencies:
10+
Streaming SDK depends on a number of other components from AMD and third parties:
11+
- [Advanced Media Framework (AMF SDK)](https://github.com/GPUOpen-LibrariesAndSDKs/AMF) for video encoding/decoding/processing
12+
- [MbedTLS](https://github.com/Mbed-TLS/mbedtls) for encryption
13+
- [Ffmpeg](https://github.com/FFmpeg/FFmpeg) for audio encoding/decoding/resampling
14+
15+
## License:
16+
Streaming SDK is distributed in open source under the [MIT license](LICENSE.md)
17+
18+
## Documentation:
19+
Comprehensive documentation is provided by the [Streaming SDK Wiki](wiki/)
20+

amf

Submodule amf added at 8f5a645

0 commit comments

Comments
 (0)