add tracker api.
This commit is contained in:
parent
cca1d056c9
commit
0653cd774c
@ -23,7 +23,7 @@ set(OpenSSL_LIBRARY_DIRS ${OpenSSL_ROOT}/lib)
|
|||||||
set(OpenSSL_LIBRARIES libssl libcrypto)
|
set(OpenSSL_LIBRARIES libssl libcrypto)
|
||||||
|
|
||||||
|
|
||||||
set(FFMPEG_ROOT ${Libraries_ROOT}/ffmpeg-6.0-full_build-shared)
|
set(FFMPEG_ROOT ${Libraries_ROOT}/ffmpeg-6.1-full_build-shared)
|
||||||
set(FFMPEG_INCLUDE_DIR ${FFMPEG_ROOT}/include)
|
set(FFMPEG_INCLUDE_DIR ${FFMPEG_ROOT}/include)
|
||||||
set(FFMPEG_LIBRARY_DIRS ${FFMPEG_ROOT}/lib)
|
set(FFMPEG_LIBRARY_DIRS ${FFMPEG_ROOT}/lib)
|
||||||
set(FFMPEG_LIBRARIES avcodec avformat avutil)
|
set(FFMPEG_LIBRARIES avcodec avformat avutil)
|
||||||
@ -37,12 +37,14 @@ find_package(LibDataChannel)
|
|||||||
|
|
||||||
add_subdirectory(E:/Projects/Kylin/Universal Universal)
|
add_subdirectory(E:/Projects/Kylin/Universal Universal)
|
||||||
add_subdirectory(E:/Projects/Kylin/HttpProxy HttpProxy)
|
add_subdirectory(E:/Projects/Kylin/HttpProxy HttpProxy)
|
||||||
|
find_package(Boost REQUIRED COMPONENTS json)
|
||||||
|
|
||||||
add_executable(FFmpegPlayer main.cpp
|
add_executable(FFmpegPlayer main.cpp
|
||||||
Demuxer.h Demuxer.cpp
|
Demuxer.h Demuxer.cpp
|
||||||
AudioDecoder.h AudioDecoder.cpp
|
AudioDecoder.h AudioDecoder.cpp
|
||||||
VideoDecoder.h VideoDecoder.cpp
|
VideoDecoder.h VideoDecoder.cpp
|
||||||
WebRTCPublisher.h WebRTCPublisher.cpp
|
WebRTCPublisher.h WebRTCPublisher.cpp
|
||||||
|
Helpers.h Helpers.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(FFmpegPlayer
|
target_include_directories(FFmpegPlayer
|
||||||
@ -61,4 +63,5 @@ target_link_libraries(FFmpegPlayer
|
|||||||
PRIVATE ${FFMPEG_LIBRARIES}
|
PRIVATE ${FFMPEG_LIBRARIES}
|
||||||
PRIVATE ${OpenSSL_LIBRARIES}
|
PRIVATE ${OpenSSL_LIBRARIES}
|
||||||
PRIVATE LibDataChannel::LibDataChannel
|
PRIVATE LibDataChannel::LibDataChannel
|
||||||
|
PRIVATE Boost::json
|
||||||
)
|
)
|
||||||
|
@ -1,419 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE QtCreatorProject>
|
|
||||||
<!-- Written by QtCreator 12.0.1, 2024-01-18T22:20:08. -->
|
|
||||||
<qtcreator>
|
|
||||||
<data>
|
|
||||||
<variable>EnvironmentId</variable>
|
|
||||||
<value type="QByteArray">{11f4a1e9-12b5-4bf9-bf26-e33024189f36}</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
|
||||||
<value type="qlonglong">0</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
|
||||||
<valuemap type="QVariantMap">
|
|
||||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
|
||||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
|
||||||
<value type="QString" key="language">Cpp</value>
|
|
||||||
<valuemap type="QVariantMap" key="value">
|
|
||||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
|
||||||
</valuemap>
|
|
||||||
</valuemap>
|
|
||||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
|
||||||
<value type="QString" key="language">QmlJS</value>
|
|
||||||
<valuemap type="QVariantMap" key="value">
|
|
||||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
|
||||||
</valuemap>
|
|
||||||
</valuemap>
|
|
||||||
<value type="qlonglong" key="EditorConfiguration.CodeStyle.Count">2</value>
|
|
||||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
|
||||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
|
||||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
|
||||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
|
||||||
<value type="int" key="EditorConfiguration.PreferAfterWhitespaceComments">0</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.PreferSingleLineComments">false</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
|
||||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
|
||||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
|
||||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.UseIndenter">false</value>
|
|
||||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">0</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
|
||||||
<value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.tintMarginArea">true</value>
|
|
||||||
</valuemap>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
|
||||||
<valuemap type="QVariantMap">
|
|
||||||
<valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
|
|
||||||
<value type="bool" key="AutoTest.Framework.Boost">true</value>
|
|
||||||
<value type="bool" key="AutoTest.Framework.CTest">false</value>
|
|
||||||
<value type="bool" key="AutoTest.Framework.Catch">true</value>
|
|
||||||
<value type="bool" key="AutoTest.Framework.GTest">true</value>
|
|
||||||
<value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
|
|
||||||
<value type="bool" key="AutoTest.Framework.QtTest">true</value>
|
|
||||||
</valuemap>
|
|
||||||
<valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
|
|
||||||
<value type="int" key="AutoTest.RunAfterBuild">0</value>
|
|
||||||
<value type="bool" key="AutoTest.UseGlobal">true</value>
|
|
||||||
<valuemap type="QVariantMap" key="ClangTools">
|
|
||||||
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
|
|
||||||
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
|
||||||
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
|
|
||||||
<value type="int" key="ClangTools.ParallelJobs">3</value>
|
|
||||||
<value type="bool" key="ClangTools.PreferConfigFile">true</value>
|
|
||||||
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
|
||||||
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
|
||||||
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
|
||||||
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
|
|
||||||
</valuemap>
|
|
||||||
</valuemap>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
|
||||||
<valuemap type="QVariantMap">
|
|
||||||
<value type="QString" key="DeviceType">Desktop</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 6.6.1 MSVC2019 64bit</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 6.6.1 MSVC2019 64bit</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt6.661.win64_msvc2019_64_kit</value>
|
|
||||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
|
||||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
|
||||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
|
||||||
<value type="QString" key="CMake.Build.Type">Debug</value>
|
|
||||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
|
||||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
|
||||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
|
||||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Ninja
|
|
||||||
-DCMAKE_BUILD_TYPE:STRING=Debug
|
|
||||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
|
||||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
|
||||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
|
||||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
|
||||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
|
||||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}</value>
|
|
||||||
<value type="int" key="EnableQmlDebugging">0</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">E:\Projects\FFmpegPlayer-Desktop_Qt_6_6_1_MSVC2019_64bit-Debug</value>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
|
||||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
|
||||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
|
||||||
<value type="QString">all</value>
|
|
||||||
</valuelist>
|
|
||||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
|
||||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
|
||||||
</valuemap>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
|
||||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
|
||||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
|
||||||
<value type="QString">clean</value>
|
|
||||||
</valuelist>
|
|
||||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
|
||||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
|
||||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
|
||||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
|
||||||
</valuemap>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
|
||||||
<value type="QString" key="CMake.Build.Type">Release</value>
|
|
||||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
|
||||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
|
||||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
|
||||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Ninja
|
|
||||||
-DCMAKE_BUILD_TYPE:STRING=Release
|
|
||||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
|
||||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
|
||||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
|
||||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
|
||||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
|
||||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">E:\Projects\FFmpegPlayer-Desktop_Qt_6_6_1_MSVC2019_64bit-Release</value>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
|
||||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
|
||||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
|
||||||
<value type="QString">all</value>
|
|
||||||
</valuelist>
|
|
||||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
|
||||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
|
||||||
</valuemap>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
|
||||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
|
||||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
|
||||||
<value type="QString">clean</value>
|
|
||||||
</valuelist>
|
|
||||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
|
||||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
|
||||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
|
||||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
|
||||||
</valuemap>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
|
||||||
<value type="QString" key="CMake.Build.Type">RelWithDebInfo</value>
|
|
||||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
|
||||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
|
||||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
|
||||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Ninja
|
|
||||||
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
|
|
||||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
|
||||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
|
||||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
|
||||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
|
||||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
|
||||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">E:\Projects\FFmpegPlayer-Desktop_Qt_6_6_1_MSVC2019_64bit-RelWithDebInfo</value>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
|
||||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
|
||||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
|
||||||
<value type="QString">all</value>
|
|
||||||
</valuelist>
|
|
||||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
|
||||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
|
||||||
</valuemap>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
|
||||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
|
||||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
|
||||||
<value type="QString">clean</value>
|
|
||||||
</valuelist>
|
|
||||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
|
||||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
|
||||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
|
||||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release with Debug Information</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
|
||||||
</valuemap>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.3">
|
|
||||||
<value type="QString" key="CMake.Build.Type">RelWithDebInfo</value>
|
|
||||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
|
||||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
|
||||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
|
||||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Ninja
|
|
||||||
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
|
|
||||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
|
||||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
|
||||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
|
||||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
|
||||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
|
||||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}</value>
|
|
||||||
<value type="int" key="EnableQmlDebugging">0</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">E:\Projects\FFmpegPlayer-Desktop_Qt_6_6_1_MSVC2019_64bit-Profile</value>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
|
||||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
|
||||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
|
||||||
<value type="QString">all</value>
|
|
||||||
</valuelist>
|
|
||||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
|
||||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
|
||||||
</valuemap>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
|
||||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
|
||||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
|
||||||
<value type="QString">clean</value>
|
|
||||||
</valuelist>
|
|
||||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
|
||||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
|
||||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
|
||||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
|
||||||
</valuemap>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.4">
|
|
||||||
<value type="QString" key="CMake.Build.Type">MinSizeRel</value>
|
|
||||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
|
||||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
|
||||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
|
||||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Ninja
|
|
||||||
-DCMAKE_BUILD_TYPE:STRING=MinSizeRel
|
|
||||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
|
||||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
|
||||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
|
||||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
|
||||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
|
||||||
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">E:\Projects\FFmpegPlayer-Desktop_Qt_6_6_1_MSVC2019_64bit-MinSizeRel</value>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
|
||||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
|
||||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
|
||||||
<value type="QString">all</value>
|
|
||||||
</valuelist>
|
|
||||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
|
||||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
|
||||||
</valuemap>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
|
||||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
|
||||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
|
||||||
<value type="QString">clean</value>
|
|
||||||
</valuelist>
|
|
||||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
|
||||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
|
||||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
|
||||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Minimum Size Release</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">5</value>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
|
||||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">部署</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">部署</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
|
|
||||||
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
|
||||||
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
|
||||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
|
||||||
<value type="int" key="Analyzer.Valgrind.Callgrind.CostFormat">0</value>
|
|
||||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
|
||||||
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
|
||||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
|
||||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
|
||||||
<value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">FFmpegPlayer</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.FFmpegPlayer</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">FFmpegPlayer</value>
|
|
||||||
<value type="bool" key="ProjectExplorer.RunConfiguration.Customized">false</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
|
||||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">E:/Projects/FFmpegPlayer-Desktop_Qt_6_6_1_MSVC2019_64bit-Debug</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
|
||||||
</valuemap>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
|
||||||
<value type="qlonglong">1</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
|
||||||
<value type="int">22</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>Version</variable>
|
|
||||||
<value type="int">22</value>
|
|
||||||
</data>
|
|
||||||
</qtcreator>
|
|
6
Helpers.cpp
Normal file
6
Helpers.cpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include "Helpers.h"
|
||||||
|
|
||||||
|
ClientTrackData::ClientTrackData(std::shared_ptr<rtc::Track> track, std::shared_ptr<rtc::RtcpSrReporter> sender) {
|
||||||
|
this->track = track;
|
||||||
|
this->sender = sender;
|
||||||
|
}
|
13
Helpers.h
Normal file
13
Helpers.h
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#ifndef HELPERS_H
|
||||||
|
#define HELPERS_H
|
||||||
|
|
||||||
|
#include "rtc/rtc.hpp"
|
||||||
|
|
||||||
|
struct ClientTrackData {
|
||||||
|
std::shared_ptr<rtc::Track> track;
|
||||||
|
std::shared_ptr<rtc::RtcpSrReporter> sender;
|
||||||
|
|
||||||
|
ClientTrackData(std::shared_ptr<rtc::Track> track, std::shared_ptr<rtc::RtcpSrReporter> sender);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // HELPERS_H
|
7
Readme.md
Normal file
7
Readme.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
CANDIDATE="192.168.2.26"
|
||||||
|
docker run --rm -it -p 1935:1935 -p 1985:1985 -p 8080:8080 -p 1990:1990 -p 8088:8088 --env CANDIDATE=192.168.2.26 -p 8000:8000/udp registry.cn-hangzhou.aliyuncs.com/ossrs/srs:5 ./objs/srs -c conf/https.docker.conf
|
||||||
|
```
|
||||||
|
|
@ -11,8 +11,8 @@ WebRTCPublisher::WebRTCPublisher(boost::asio::io_context &ioContext) : m_ioConte
|
|||||||
|
|
||||||
m_peer->onLocalDescription([&, this](rtc::Description sdp) {
|
m_peer->onLocalDescription([&, this](rtc::Description sdp) {
|
||||||
LOG(info) << "Send the SDP to the remote peer: " << std::string(sdp);
|
LOG(info) << "Send the SDP to the remote peer: " << std::string(sdp);
|
||||||
const auto serverIp = "172.16.7.16";
|
const auto serverIp = "192.168.2.26";
|
||||||
const auto serverPort = "443";
|
const auto serverPort = "1990";
|
||||||
const auto streamUrl = "/live/livestream";
|
const auto streamUrl = "/live/livestream";
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
oss << "https://" << serverIp << ":" << serverPort << "/rtc/v1/publish/";
|
oss << "https://" << serverIp << ":" << serverPort << "/rtc/v1/publish/";
|
||||||
@ -58,3 +58,31 @@ WebRTCPublisher::WebRTCPublisher(boost::asio::io_context &ioContext) : m_ioConte
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::shared_ptr<ClientTrackData> WebRTCPublisher::addVideo(const std::shared_ptr<rtc::PeerConnection> pc,
|
||||||
|
const uint8_t payloadType, const uint32_t ssrc,
|
||||||
|
const std::string cname, const std::string msid,
|
||||||
|
const std::function<void()> onOpen) {
|
||||||
|
auto video = rtc::Description::Video(cname);
|
||||||
|
video.addH264Codec(payloadType);
|
||||||
|
video.addSSRC(ssrc, cname, msid, cname);
|
||||||
|
auto track = pc->addTrack(video);
|
||||||
|
// create RTP configuration
|
||||||
|
auto rtpConfig =
|
||||||
|
make_shared<rtc::RtpPacketizationConfig>(ssrc, cname, payloadType, rtc::H264RtpPacketizer::defaultClockRate);
|
||||||
|
// create packetizer
|
||||||
|
auto packetizer = make_shared<rtc::H264RtpPacketizer>(rtc::NalUnit::Separator::Length, rtpConfig);
|
||||||
|
// create H264 handler
|
||||||
|
auto h264Handler = make_shared<rtc::H264PacketizationHandler>(packetizer);
|
||||||
|
// add RTCP SR handler
|
||||||
|
auto srReporter = make_shared<rtc::RtcpSrReporter>(rtpConfig);
|
||||||
|
h264Handler->addToChain(srReporter);
|
||||||
|
// add RTCP NACK handler
|
||||||
|
auto nackResponder = std::make_shared<rtc::RtcpNackResponder>();
|
||||||
|
h264Handler->addToChain(nackResponder);
|
||||||
|
// set handler
|
||||||
|
track->setMediaHandler(h264Handler);
|
||||||
|
track->onOpen(onOpen);
|
||||||
|
auto trackData = make_shared<ClientTrackData>(track, srReporter);
|
||||||
|
return trackData;
|
||||||
|
}
|
||||||
|
@ -1,13 +1,18 @@
|
|||||||
#ifndef WEBRTCPUBLISHER_H
|
#ifndef WEBRTCPUBLISHER_H
|
||||||
#define WEBRTCPUBLISHER_H
|
#define WEBRTCPUBLISHER_H
|
||||||
|
|
||||||
#include "rtc/rtc.hpp"
|
#include "Helpers.h"
|
||||||
#include <boost/asio/io_context.hpp>
|
#include <boost/asio/io_context.hpp>
|
||||||
|
|
||||||
class WebRTCPublisher {
|
class WebRTCPublisher {
|
||||||
public:
|
public:
|
||||||
WebRTCPublisher(boost::asio::io_context &ioContext);
|
WebRTCPublisher(boost::asio::io_context &ioContext);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
std::shared_ptr<ClientTrackData> addVideo(const std::shared_ptr<rtc::PeerConnection> pc, const uint8_t payloadType,
|
||||||
|
const uint32_t ssrc, const std::string cname, const std::string msid,
|
||||||
|
const std::function<void(void)> onOpen);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
boost::asio::io_context &m_ioContext;
|
boost::asio::io_context &m_ioContext;
|
||||||
rtc::Configuration m_configuration;
|
rtc::Configuration m_configuration;
|
||||||
|
20
conf/https.docker.conf
Normal file
20
conf/https.docker.conf
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
http_api {
|
||||||
|
enabled on;
|
||||||
|
listen 1985;
|
||||||
|
https {
|
||||||
|
# Whether enable HTTPS API.
|
||||||
|
# default: off
|
||||||
|
enabled on;
|
||||||
|
# The listen endpoint for HTTPS API.
|
||||||
|
# default: 1990
|
||||||
|
listen 1990;
|
||||||
|
# The SSL private key file, generated by:
|
||||||
|
# openssl genrsa -out server.key 2048
|
||||||
|
# default: ./conf/server.key
|
||||||
|
key ./conf/server.key;
|
||||||
|
# The SSL public cert file, generated by:
|
||||||
|
# openssl req -new -x509 -key server.key -out server.crt -days 3650 -subj "/C=CN/ST=Beijing/L=Beijing/O=Me/OU=Me/CN=ossrs.net"
|
||||||
|
# default: ./conf/server.crt
|
||||||
|
cert ./conf/server.crt;
|
||||||
|
}
|
||||||
|
}
|
22
conf/server.crt
Normal file
22
conf/server.crt
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIDnzCCAoegAwIBAgIUAKUAHXhY3LCqqMJGdIiQS6yA5CMwDQYJKoZIhvcNAQEL
|
||||||
|
BQAwXzELMAkGA1UEBhMCQ04xEDAOBgNVBAgMB0JlaWppbmcxEDAOBgNVBAcMB0Jl
|
||||||
|
aWppbmcxCzAJBgNVBAoMAk1lMQswCQYDVQQLDAJNZTESMBAGA1UEAwwJb3NzcnMu
|
||||||
|
bmV0MB4XDTI0MDExNTE0MjY0MVoXDTM0MDExMjE0MjY0MVowXzELMAkGA1UEBhMC
|
||||||
|
Q04xEDAOBgNVBAgMB0JlaWppbmcxEDAOBgNVBAcMB0JlaWppbmcxCzAJBgNVBAoM
|
||||||
|
Ak1lMQswCQYDVQQLDAJNZTESMBAGA1UEAwwJb3NzcnMubmV0MIIBIjANBgkqhkiG
|
||||||
|
9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvSbK4HYljfTR3jfmJDRXVhpAa8WV8U+BnMO6
|
||||||
|
twWIyb58f166bFFquYCK7yqz1v+0e0vuLxUENJSPQFaEpeV77kutBMTCwrZxSiSA
|
||||||
|
/d4nK76GdddAnpdvkqkdOuIXeTaz+CPtueb2pmzIqdqOjtj+1Ufpx5D0bcJOfH5T
|
||||||
|
ctW315IZ2Ws+Uk+Lg8cuzjFgsSwznPioMN5KCkIY3dwt7sO3Et5X/m+Kq3xZ5j58
|
||||||
|
psyXh8IUknSPNZ7NCEm+atuUoOro5jXl3gcJIVJ7nQPrzdZrs9tMr+pMu8mjQoKe
|
||||||
|
dlKkLFSrzSTiYvHwB7H2+woKizJXUxSQWIToXkVF0WoE0CQLoQIDAQABo1MwUTAd
|
||||||
|
BgNVHQ4EFgQUDRDC5HyZKmzfaIJoFAx9+6hqRfEwHwYDVR0jBBgwFoAUDRDC5HyZ
|
||||||
|
KmzfaIJoFAx9+6hqRfEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOC
|
||||||
|
AQEAnudE/WvDte8uPv4kJ414yrg5w7r5vHZ7Iw9VVdwzf6RBRr8dDx2IUVVDzVY9
|
||||||
|
ulv9v37Bx2s331Riait+CM543qCy/FLoZeHZt5UVw4PjEaFcQyhV3m9xrl0vYi0p
|
||||||
|
80xIE7yRgMXgxM9njZkvVblopFzJBfWi9/5NnjVwhLMaNLBqK2oHEEJO1NUpQ8Jd
|
||||||
|
2x2x8Tqhu9eiW6Xo7+D/SEJT9qSlrtvS/u2FItAgTEcij71Rtm9u6snKDXG3m5j2
|
||||||
|
VFS48nZVDgCUP+uVbMmTG0ACkaYpwZHTK3CCeUHsjqoC8SD2aqwkuTBMt1P4or+z
|
||||||
|
vPI+vzNtkbz8O/V+JTU/FQiQag==
|
||||||
|
-----END CERTIFICATE-----
|
28
conf/server.key
Normal file
28
conf/server.key
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
-----BEGIN PRIVATE KEY-----
|
||||||
|
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC9JsrgdiWN9NHe
|
||||||
|
N+YkNFdWGkBrxZXxT4Gcw7q3BYjJvnx/XrpsUWq5gIrvKrPW/7R7S+4vFQQ0lI9A
|
||||||
|
VoSl5XvuS60ExMLCtnFKJID93icrvoZ110Cel2+SqR064hd5NrP4I+255vambMip
|
||||||
|
2o6O2P7VR+nHkPRtwk58flNy1bfXkhnZaz5ST4uDxy7OMWCxLDOc+Kgw3koKQhjd
|
||||||
|
3C3uw7cS3lf+b4qrfFnmPnymzJeHwhSSdI81ns0ISb5q25Sg6ujmNeXeBwkhUnud
|
||||||
|
A+vN1muz20yv6ky7yaNCgp52UqQsVKvNJOJi8fAHsfb7CgqLMldTFJBYhOheRUXR
|
||||||
|
agTQJAuhAgMBAAECggEABdqS1ROz96TO10t0I+0Cok6QfYNbT7Ee7wtJyqjtN+bl
|
||||||
|
PQcBQomaIaq9Nf/Umi3ug8G0ucRbBY5u0OIyk4ymr1AsTwNQvphZSQbYXv70Z/Ky
|
||||||
|
8Cf+0v+nWVbicapqSP8W3pI8VNxdeBbiFotd/cTQfWjW7t0lGuXcYmcBkbJkeLtq
|
||||||
|
MkA/xSWD1ly6vfjP5pyOHu3A75jDP9JHoCykTdGY3rnE2lrIBPUz9IbF/bLovZCw
|
||||||
|
YubidyER9X1HeBUVKOjmxT/GjI1wP+4CFlqqQRuVDkJ5OFitu6yAt3jgyfc0/B1a
|
||||||
|
godqXnLU7N8VEy0sPW+xpLXw0CKkFapjUjDVhhhcQQKBgQDZcsVcBbAODDJ7BSs0
|
||||||
|
BvZG7fStozlhleas+L/O62mFRrgepd1C6IKkzqpyfRR01vEfyxAxxrNyT7NMJcir
|
||||||
|
j7i2FbgUlxizCDR1+Ahwd9DSWs8dgPry3sMacJBXTPZk/V2Z+iY9NibuFIhUIC/2
|
||||||
|
IWMjl1DsqSRMpDyDTPfleJhoYQKBgQDer7pVMAqyEJDX5+TFI6upXxde1WP0xyMt
|
||||||
|
hFaGgEEy86yB3e+/6Wmiopl6DEJ8ukSVPDycYiGZBr4Tl2XQTzia4wIg5U1VUmpz
|
||||||
|
E/rdVp5NtBBNAnKW03xlwgzwu6cb4F7nllD/EWrlVeiOp597MXT6FkbBIL9oF4ze
|
||||||
|
m2HfS3FrQQKBgAxWDIhJ8lD5tCtygZ7z/ijL+yOWrPyySmHpwsf0Zwoelvd2JXVU
|
||||||
|
R4UeDGFuYyi1wPwywvpv8WI8z0k0o4vIHYyG8uiIIeiWQJOovKHUyk4ExNdBp/r7
|
||||||
|
VEo9tJKfVSMplJPVszGpzs+W7p0HLnFiN4OfZAHpHpwSfTRdu3qTOuJBAoGBALZy
|
||||||
|
5cir/udbeUDcJux6SEgRt/UkAqxnh+PgHIBAjqqvSPRyIN9s3va4H+UGLGdCubRH
|
||||||
|
0SUTpZFaG9uzXGCqt6b3PSQ0mwK/7qVwhkZYlIT3da+SxM3cYnyA29dU+Bp332oB
|
||||||
|
F0WUQK+7jjlrDtiBceUA4WGUch5XxTwRtMOdbUTBAoGBAL5i9/kWDUmvHuG33ZKN
|
||||||
|
EW1ibd/A4WnEHHBsXicAF42DxRiEkiabN9/wPXO69i+MrZljZm+ndLrMIZ7UrNaJ
|
||||||
|
xSU6IjyGQiJYcI+MfdH7s2CUXIrt9M3+BQ/b19Bpz4Z16Z9rqCDGqsHiuDPKntcd
|
||||||
|
1421zg1QGiOTSZqqQNdKOhGx
|
||||||
|
-----END PRIVATE KEY-----
|
4
main.cpp
4
main.cpp
@ -12,8 +12,8 @@ int main(int argc, char *argv[]) {
|
|||||||
auto ioContext = Amass::Singleton<IoContext>::instance<Amass::Construct>();
|
auto ioContext = Amass::Singleton<IoContext>::instance<Amass::Construct>();
|
||||||
std::cout << "hello world." << std::endl;
|
std::cout << "hello world." << std::endl;
|
||||||
constexpr auto path = "E:/Documents/juren-30s.mp4";
|
constexpr auto path = "E:/Documents/juren-30s.mp4";
|
||||||
Demuxer demuxer;
|
// Demuxer demuxer;
|
||||||
demuxer.open(path);
|
// demuxer.open(path);
|
||||||
|
|
||||||
// auto [audioCodec, audioCodecParameter] = demuxer.codecInformation(Stream::Audio);
|
// auto [audioCodec, audioCodecParameter] = demuxer.codecInformation(Stream::Audio);
|
||||||
// auto [videoCodec, videoCodecParameter] = demuxer.codecInformation(Stream::Video);
|
// auto [videoCodec, videoCodecParameter] = demuxer.codecInformation(Stream::Video);
|
||||||
|
Loading…
Reference in New Issue
Block a user