diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
new file mode 100644
index 0000000..265c9b2
--- /dev/null
+++ b/.github/workflows/codeql.yml
@@ -0,0 +1,65 @@
+name: CodeQL Advanced
+
+on:
+ push:
+ branches:
+ - 'develop'
+ paths:
+ - 'XEngine_Source/**'
+ - 'XEngine_Release/**'
+ - '.github/**'
+
+jobs:
+ analyze:
+ runs-on: ubuntu-24.04
+ permissions:
+ security-events: write
+ packages: read
+ actions: read
+ contents: read
+
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - language: c-cpp
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ with:
+ ref: 'develop'
+
+ - name: Checkout dependency repository (xengine)
+ uses: actions/checkout@v4
+ with:
+ repository: libxengine/libxengine
+ path: libxengine
+
+ - name: sub module checkout (opensource)
+ run: |
+ git submodule init
+ git submodule update
+
+ - name: Set up Dependency Environment
+ run: |
+ cd libxengine
+ chmod +x ./XEngine_LINEnv.sh
+ sudo ./XEngine_LINEnv.sh -i 3
+
+ - name: install library
+ run: sudo apt install libsrt-gnutls-dev libsrtp2-dev -y
+
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v3
+ with:
+ languages: ${{ matrix.language }}
+
+ - name: make
+ run: |
+ cd XEngine_Source
+ make
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v3
+ with:
+ category: "/language:${{ matrix.language }}"
diff --git a/.github/workflows/cppcheck.yml b/.github/workflows/cppcheck.yml
new file mode 100644
index 0000000..279b03f
--- /dev/null
+++ b/.github/workflows/cppcheck.yml
@@ -0,0 +1,35 @@
+name: cpp check workflows
+
+on:
+ push:
+ branches:
+ - 'develop'
+ paths:
+ - 'XEngine_Source/**'
+ - 'XEngine_Release/**'
+ - '.github/**'
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout main repository code
+ uses: actions/checkout@v4
+ with:
+ ref: 'develop'
+
+ - name: Create static_analysis directory
+ run: mkdir -p static_analysis
+
+ - name: Run Cppcheck
+ run: |
+ sudo apt-get install -y cppcheck
+ cppcheck --enable=all --language=c++ --std=c++20 ./XEngine_Source/ --output-file=static_analysis/log.xml --xml
+ continue-on-error: true
+
+ - name: Upload Cppcheck Results
+ uses: actions/upload-artifact@v4
+ with:
+ name: cppcheck_results
+ path: static_analysis/log.xml
\ No newline at end of file
diff --git a/.github/workflows/issue-translator.yml b/.github/workflows/issue-translator.yml
new file mode 100644
index 0000000..d9fdac8
--- /dev/null
+++ b/.github/workflows/issue-translator.yml
@@ -0,0 +1,15 @@
+name: Issue Translator
+on:
+ issue_comment:
+ types: [created]
+ issues:
+ types: [opened]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: usthe/issues-translate-action@v2.7
+ with:
+ IS_MODIFY_TITLE: false
+ CUSTOM_BOT_NOTE: Bot detected the issue body's language is not English, translate it automatically.
\ No newline at end of file
diff --git a/.github/workflows/linuxbuild.yml b/.github/workflows/linuxbuild.yml
deleted file mode 100644
index 4bbb673..0000000
--- a/.github/workflows/linuxbuild.yml
+++ /dev/null
@@ -1,67 +0,0 @@
-name: ubuntu build workflows
-
-on:
- push:
- branches: [ "develop" ]
- pull_request:
- branches: [ "develop" ]
-
-permissions:
- contents: read
-
-jobs:
- build:
- strategy:
- # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
- fail-fast: false
- matrix:
- include:
- - os: ubuntu-22.04
- #- os: ubuntu-24.04
- runs-on: ${{ matrix.os }}
-
- steps:
- # 检出您的主仓库代码
- - name: Checkout main repository code
- uses: actions/checkout@v4
- with:
- ref: 'develop'
-
- # 检出依赖的xengine仓库到指定的xengine目录
- - name: Checkout dependency repository (xengine)
- uses: actions/checkout@v4
- with:
- repository: libxengine/libxengine
- path: libxengine
-
- - name: sub module checkout (opensource)
- run: |
- git submodule init
- git submodule update
-
- - name: install library
- run: sudo apt install libsrt-gnutls-dev libsrtp2-dev -y
-
- # 设置依赖库的环境变量
- - name: Set up Dependency Environment Variables
- run: |
- cd libxengine
- chmod 777 *
- sudo ./XEngine_LINEnv.sh -i 3
- cd ..
- #编译
- - name: make
- run: |
- cd XEngine_Source
- make
- make FLAGS=InstallAll
- make FLAGS=CleanAll
-
- make RELEASE=1
- make FLAGS=InstallAll
- make FLAGS=CleanAll
- cd ..
- - name: test
- run: |
- cd XEngine_Release
- ./XEngine_StreamMediaApp -t
\ No newline at end of file
diff --git a/.github/workflows/macbuild.yml b/.github/workflows/macbuild.yml
index 58b266f..1a36dc8 100644
--- a/.github/workflows/macbuild.yml
+++ b/.github/workflows/macbuild.yml
@@ -2,10 +2,13 @@ name: macos build workflows
on:
push:
- branches: [ "develop" ]
- pull_request:
- branches: [ "develop" ]
-
+ branches:
+ - 'develop'
+ paths:
+ - 'XEngine_Source/**'
+ - 'XEngine_Release/**'
+ - '.github/**'
+
permissions:
contents: read
@@ -15,6 +18,7 @@ jobs:
matrix:
include:
- os: macos-13
+ - os: macos-14
runs-on: ${{ matrix.os }}
steps:
@@ -23,7 +27,6 @@ jobs:
with:
ref: 'develop'
- # 检出依赖的xengine仓库到指定的xengine目录
- name: Checkout dependency repository (xengine)
uses: actions/checkout@v4
with:
@@ -41,14 +44,29 @@ jobs:
- name: install library
run: brew install srt srtp
- # 设置依赖库的环境变量
- - name: Set up Dependency Environment Variables
+ - name: Set up Dependency x86_64 Environment
+ if: matrix.os == 'macos-13'
run: |
cd libxengine
chmod 777 *
./XEngine_LINEnv.sh -i 3
- cd ..
- #编译
+ - name: Set up Dependency Arm64 Environment
+ if: matrix.os == 'macos-14'
+ run: |
+ cd libxengine
+ chmod 777 *
+ ./XEngine_LINEnv.sh -i 0
+
+ latest_tag=$(git ls-remote --tags --sort="v:refname" https://github.com/libxengine/libxengine.git | awk '{print $2}' | sed 's/refs\/tags\///' | tail -n 1)
+ wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_Mac_Arm64.zip
+ unzip ./XEngine_Mac_Arm64.zip -d ./XEngine_Mac_Arm64
+ cd XEngine_Mac_Arm64
+
+ sudo mkdir -p /usr/local/include
+ sudo mkdir -p /usr/local/lib
+ sudo cp -rf ./XEngine_Include /usr/local/include
+ sudo find ./XEngine_Mac -name "*.dylib" -exec cp {} /usr/local/lib \;
+
- name: make debug
run: |
cd XEngine_Source
@@ -61,6 +79,24 @@ jobs:
make PLATFORM=mac RELEASE=1
make PLATFORM=mac FLAGS=InstallAll
make PLATFORM=mac FLAGS=CleanAll
- - name: test
+
+ - name: test (srt bug on macos-arm64,not run)
+ if: matrix.os == 'macos-13'
run: |
cd XEngine_Release
+ ./XEngine_StreamMediaApp -t
+
+ - name: Upload folder as artifact with mac x64
+ if: matrix.os == 'macos-13'
+ uses: actions/upload-artifact@v4
+ with:
+ name: XEngine_StreamMediaApp-x86_64-Mac
+ path: XEngine_Release/
+ retention-days: 3
+ - name: Upload folder as artifact with mac arm
+ if: matrix.os == 'macos-14'
+ uses: actions/upload-artifact@v4
+ with:
+ name: XEngine_StreamMediaApp-Arm64-Mac
+ path: XEngine_Release/
+ retention-days: 3
\ No newline at end of file
diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml
index 8c5ba4f..713c01b 100644
--- a/.github/workflows/msbuild.yml
+++ b/.github/workflows/msbuild.yml
@@ -2,32 +2,32 @@ name: windows build workflows
on:
push:
- branches: [ "develop" ]
- pull_request:
- branches: [ "develop" ]
-
+ branches:
+ - 'develop'
+ paths:
+ - 'XEngine_Source/**'
+ - 'XEngine_Release/**'
+ - '.github/**'
+
permissions:
contents: read
jobs:
build:
strategy:
- # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
fail-fast: false
matrix:
configuration: [Debug ,Release]
platform: [x86 ,x64]
- runs-on: windows-latest # 最新的 Windows 环境
+ runs-on: windows-latest
steps:
- # 检出您的主仓库代码
- name: Checkout main repository code
uses: actions/checkout@v4
with:
ref: 'develop'
- # 检出依赖的xengine仓库到指定的xengine目录
- name: Checkout dependency repository (xengine)
uses: actions/checkout@v4
with:
@@ -63,21 +63,33 @@ jobs:
./vcpkg.exe integrate install
shell: pwsh
- # 设置依赖库的环境变量
- - name: Set up Dependency Environment Variables
+ - name: Set up Dependency x86_64 Environment
+ if: matrix.platform == 'x64'
run: |
echo "XENGINE_INCLUDE=${{ github.workspace }}/libxengine" | Out-File -FilePath $env:GITHUB_ENV -Append
- echo "XENGINE_LIB32=${{ github.workspace }}/libxengine/XEngine_Windows/x86" | Out-File -FilePath $env:GITHUB_ENV -Append
- echo "XENGINE_LIB64=${{ github.workspace }}/libxengine/XEngine_Windows/x64" | Out-File -FilePath $env:GITHUB_ENV -Append
+ echo "XENGINE_LIB64=${{ github.workspace }}/libxengine/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
shell: pwsh
-
- # 配置 MSBuild 的路径,准备构建 VC++ 项目
+ - name: Set up Dependency x86_32 Environment
+ if: matrix.platform == 'x86'
+ run: |
+ $response = Invoke-RestMethod -Uri "https://api.github.com/repos/libxengine/libxengine/releases/latest" -Headers @{"Accept"="application/vnd.github.v3+json"}
+ $latest_tag = $response.tag_name
+ Write-Host "Latest Tag: $latest_tag"
+
+ $url = "https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_Windows_x86-32.zip"
+ Invoke-WebRequest -Uri $url -OutFile "XEngine_Windows_x86-32.zip"
+ Expand-Archive -Path ./XEngine_Windows_x86-32.zip -DestinationPath ./XEngine_Windows -Force
+
+ echo "XENGINE_INCLUDE=${{ github.workspace }}/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
+ echo "XENGINE_LIB32=${{ github.workspace }}/XEngine_Windows/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
+ shell: pwsh
+
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- #编译
+
- name: Build Solution
run: msbuild XEngine_Source/XEngine.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }}
- #测试
+
- name: Conditional Step for x86 Release
if: matrix.configuration == 'Release' && matrix.platform == 'x86'
run: |
@@ -86,13 +98,30 @@ jobs:
cp -r XEngine_Source/VSCopy_x86.bat XEngine_Release/
cd XEngine_Release
.\VSCopy_x86.bat
+ # ./XEngine_StreamMediaApp -t
shell: pwsh
- - name: Conditional Step for x86 Debug
- if: matrix.configuration == 'Debug' && matrix.platform == 'x86'
+ - name: Conditional Step for x64 Release
+ if: matrix.configuration == 'Release' && matrix.platform == 'x64'
run: |
- cp -r XEngine_Source/Debug/*.dll XEngine_Release/
- cp -r XEngine_Source/Debug/*.exe XEngine_Release/
- cp -r XEngine_Source/VSCopy_x86.bat XEngine_Release/
+ cp -r XEngine_Source/x64/Release/*.dll XEngine_Release/
+ cp -r XEngine_Source/x64/Release/*.exe XEngine_Release/
+ cp -r XEngine_Source/VSCopy_x64.bat XEngine_Release/
cd XEngine_Release
- .\VSCopy_x86.bat
- shell: pwsh
\ No newline at end of file
+ .\VSCopy_x64.bat
+ shell: pwsh
+
+ - name: Upload folder as artifact with x86
+ if: matrix.configuration == 'Release' && matrix.platform == 'x86'
+ uses: actions/upload-artifact@v4
+ with:
+ name: XEngine_StreamMediaApp-x86_32-Windows
+ path: XEngine_Release/
+ retention-days: 3
+
+ - name: Upload folder as artifact with x64
+ if: matrix.configuration == 'Release' && matrix.platform == 'x64'
+ uses: actions/upload-artifact@v4
+ with:
+ name: XEngine_StreamMediaApp-x86_64-Windows
+ path: XEngine_Release/
+ retention-days: 3
\ No newline at end of file
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..0c200df
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,88 @@
+name: release packet
+
+on:
+ push:
+ branches:
+ - master
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+
+ - name: Download ubuntubuild
+ uses: dawidd6/action-download-artifact@v6
+ with:
+ workflow: ubuntubuild.yml
+ workflow_conclusion: success
+ check_artifacts: false
+ skip_unpack: true
+ if_no_artifact_found: fail
+ path: ./XRelease/
+ - name: Download macbuild
+ uses: dawidd6/action-download-artifact@v6
+ with:
+ workflow: macbuild.yml
+ workflow_conclusion: success
+ check_artifacts: false
+ skip_unpack: true
+ if_no_artifact_found: fail
+ path: ./XRelease/
+ - name: Download msbuild
+ uses: dawidd6/action-download-artifact@v6
+ with:
+ workflow: msbuild.yml
+ workflow_conclusion: success
+ check_artifacts: false
+ skip_unpack: true
+ if_no_artifact_found: fail
+ path: ./XRelease/
+
+ - name: Display structure of downloaded files
+ run: ls -al ./XRelease/
+
+ - name: Get current version and increment X
+ id: versioning
+ run: |
+ latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)
+ echo "Latest tag: $latest_tag"
+ # 提取 X 的值并递增
+ major=$(echo $latest_tag | cut -d '.' -f 1)
+ minor=$(echo $latest_tag | cut -d '.' -f 2)
+ patch=$(echo $latest_tag | cut -d '.' -f 3)
+ build=$(echo $latest_tag | cut -d '.' -f 4)
+
+ new_minor=$((minor + 1))
+ new_version="$major.$new_minor.$patch.$build"
+ echo "New version: $new_version"
+ echo "new_tag=$new_version" >> $GITHUB_OUTPUT
+ echo "prev_tag=$latest_tag" >> $GITHUB_OUTPUT
+
+ - name: Create and push new tag
+ run: |
+ git tag ${{ steps.versioning.outputs.new_tag }}
+ git push origin ${{ steps.versioning.outputs.new_tag }}
+
+ - name: Generate release notes
+ run: |
+ logs=$(git log ${{ steps.versioning.outputs.prev_tag }}..${{ steps.versioning.outputs.new_tag }} --pretty=format:"* %h - %s - %an" --no-merges)
+ release_notes=$(echo "$logs" | sed 's/ qyt$/ @xengine-qyt/')
+ echo "$release_notes"
+ echo "$release_notes" > release_notes.txt
+
+ - name: Release
+ uses: softprops/action-gh-release@v2
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ draft: false
+ prerelease: false
+ tag_name: ${{ steps.versioning.outputs.new_tag }}
+ name: XEngine_StreamMedia ${{ steps.versioning.outputs.new_tag }}
+ body_path: release_notes.txt
+ files: ./XRelease/*.zip
diff --git a/.github/workflows/ubuntubuild.yml b/.github/workflows/ubuntubuild.yml
new file mode 100644
index 0000000..8fd36e1
--- /dev/null
+++ b/.github/workflows/ubuntubuild.yml
@@ -0,0 +1,99 @@
+name: ubuntu build workflows
+
+on:
+ push:
+ branches:
+ - 'develop'
+ paths:
+ - 'XEngine_Source/**'
+ - 'XEngine_Release/**'
+ - '.github/**'
+
+permissions:
+ contents: read
+
+jobs:
+ build:
+ strategy:
+ # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
+ fail-fast: false
+ matrix:
+ include:
+ - os: ubuntu-22.04
+ - os: ubuntu-24.04
+ runs-on: ${{ matrix.os }}
+
+ steps:
+ # 检出您的主仓库代码
+ - name: Checkout main repository code
+ uses: actions/checkout@v4
+ with:
+ ref: 'develop'
+
+ # 检出依赖的xengine仓库到指定的xengine目录
+ - name: Checkout dependency repository (xengine)
+ uses: actions/checkout@v4
+ with:
+ repository: libxengine/libxengine
+ path: libxengine
+
+ - name: sub module checkout (opensource)
+ run: |
+ git submodule init
+ git submodule update
+
+ - name: install library
+ run: sudo apt install libsrt-gnutls-dev libsrtp2-dev -y
+
+ - name: Set up Dependency ubuntu24.04 Environment
+ if: matrix.os == 'ubuntu-24.04'
+ run: |
+ cd libxengine
+ chmod 777 *
+ sudo ./XEngine_LINEnv.sh -i 3
+ - name: Set up Dependency ubuntu22.04 Environment
+ if: matrix.os == 'ubuntu-22.04'
+ run: |
+ cd libxengine
+ chmod 777 *
+ sudo ./XEngine_LINEnv.sh -i 0
+
+ latest_tag=$(curl -s https://api.github.com/repos/libxengine/libxengine/releases/latest | jq -r .tag_name)
+ wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_UBuntu_22.04_x86-64.zip
+ unzip ./XEngine_UBuntu_22.04_x86-64.zip -d ./XEngine_UBuntu_22.04_x86-64
+ cd XEngine_UBuntu_22.04_x86-64
+
+ sudo cp -rf ./XEngine_Include /usr/local/include
+ sudo find ./XEngine_Linux -name "*.so" -exec cp {} /usr/local/lib \;
+ sudo ldconfig
+
+ - name: make
+ run: |
+ cd XEngine_Source
+ make
+ make FLAGS=InstallAll
+ make FLAGS=CleanAll
+
+ make RELEASE=1
+ make FLAGS=InstallAll
+ make FLAGS=CleanAll
+ cd ..
+ - name: test
+ run: |
+ cd XEngine_Release
+ ./XEngine_StreamMediaApp -t
+
+ - name: Upload folder as artifact with ubuntu22.04
+ if: matrix.os == 'ubuntu-22.04'
+ uses: actions/upload-artifact@v4
+ with:
+ name: XEngine_StreamMediaApp-x86_64-Ubuntu-22.04
+ path: XEngine_Release/
+ retention-days: 3
+ - name: Upload folder as artifact with ubuntu24.04
+ if: matrix.os == 'ubuntu-24.04'
+ uses: actions/upload-artifact@v4
+ with:
+ name: XEngine_StreamMediaApp-x86_64-Ubuntu-24.04
+ path: XEngine_Release/
+ retention-days: 3
\ No newline at end of file
diff --git a/CHANGELOG b/CHANGELOG
index 305c36c..14d18b2 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,25 @@
+XEngine_StreamMedia V2.10.0.1001
+
+增加:windows coredump支持
+更新:匹配XEngineV9版本支持
+更新:CI支持更多发布类型
+更新:依赖库
+更新:升级编译器版本
+优化:获取报告次数
+修改:vs2022的ansi字符集改为unicode字符集
+修正:其他语言系统乱码问题
+修正:编译选项的问题
+
+added:windows core-dump support
+update:match xengine v9.x support
+update:workflows more release support
+update:depend library
+update:compiler version to c++20 and c17
+improved:get report count
+modify:character-set to unicode from ansi on vs
+fixed:Garbled characters on other language system
+fixed:problem that build flags
+=======================================================
XEngine_StreamMedia V2.9.0.1001
增加:音频编解码器和重采样支持
diff --git a/README.en.md b/README.en.md
index ce0562e..73c9294 100644
--- a/README.en.md
+++ b/README.en.md
@@ -22,6 +22,11 @@ feature:
6. Support HTTP API Management interface
7. Support HTTP HOOK(planning)
8. Support for the transfer of all streaming media protocols
+9. Support visual FILTER filter processing (planning)
+10. Support video AI effect processing (planning)
+11. Support text language transcription (planning)
+12. Support recording (planning)
+13. Support audio and video recoding (planning)
Publish Stream:
@@ -51,11 +56,11 @@ Play Stream:
#### XEngine environment
you have to install xengine before complie,You can refer to its Readme document
-GITEE:https://gitee.com/xyry/libxengine
-GITHUB:https://github.com/libxengine/xengine
+GITEE:https://gitee.com/libxengine/libxengine
+GITHUB:https://github.com/libxengine/libxengine
#### fast to deployment
-git clone https://gitee.com/xyry/libxengine.git or git clone https://github.com/libxengine/xengine.git
+git clone https://gitee.com/libxengine/libxengine.git or git clone https://github.com/libxengine/libxengine.git
window Exection XEngine_WINEnv.bat
Linux Exection:sudo ./XEngine_LINEnv.sh -i 3
Macos Exection:./XEngine_LINEnv.sh -i 3
@@ -73,7 +78,7 @@ install srt library after Configure Xengine to Completed
ubuntu:sudo apt install libsrt-gnutls-dev libsrtp2-dev
Linux use Makefile complie
-UBUNTU22.04 x64 or RockyLinux 9 x64
+UBUNTU22.04 or above
##### Compile Command
execute command in XEngine_Source path
diff --git a/README.md b/README.md
index 6fa245c..d4f7c82 100644
--- a/README.md
+++ b/README.md
@@ -25,6 +25,11 @@ c c++ streammedia server
6. 支持HTTP API管理接口
7. 支持HTTP HOOK(planning)
8. 支持全流媒体协议互转
+9. 支持视FILTER滤镜处理(planning)
+10. 支持视频AI效果处理(planning)
+11. 支持文本语言转录(planning)
+12. 支持录像(planning)
+13. 支持音视频重编解码(planning)
推流协议:
@@ -55,12 +60,12 @@ c c++ streammedia server
#### XEngine环境
在编译之前必须安装XEngine,可以参考其Readme文档
-GITEE:https://gitee.com/xyry/libxengine
-GITHUB:https://github.com/libxengine/xengine
+GITEE:https://gitee.com/libxengine/libxengine
+GITHUB:https://github.com/libxengine/libxengine
#### 快速部署
-git clone https://gitee.com/xyry/libxengine.git 或者 git clone https://github.com/libxengine/xengine.git
+git clone https://gitee.com/libxengine/libxengine.git 或者 git clone https://github.com/libxengine/libxengine.git
window执行XEngine_WINEnv.bat 脚本
Linux执行:sudo ./XEngine_LINEnv.sh -i 3
macos执行:./XEngine_LINEnv.sh -i 3
@@ -82,7 +87,7 @@ vcpkg.exe install libsrt:x86-windows libsrt:x64-windows libsrtp:x86-windows libs
ubuntu:sudo apt install libsrt-gnutls-dev libsrtp2-dev
Linux使用Makefile编译
-UBUNTU22.04 或者 RockyLinux 9 x64均可
+UBUNTU22.04或者以上版本
###### 编译命令
diff --git a/XEngine_APPClient/APPClient_FLVPull/APPClient_FLVPull.vcxproj b/XEngine_APPClient/APPClient_FLVPull/APPClient_FLVPull.vcxproj
index 3b1c823..6205988 100644
--- a/XEngine_APPClient/APPClient_FLVPull/APPClient_FLVPull.vcxproj
+++ b/XEngine_APPClient/APPClient_FLVPull/APPClient_FLVPull.vcxproj
@@ -74,6 +74,10 @@
$(XEngine_Include);$(IncludePath)
$(XEngine_Lib32);$(LibraryPath)
+
+ $(XEngine_Include);$(IncludePath)
+ $(XEngine_Lib64);$(LibraryPath)
+
Level3
@@ -106,7 +110,7 @@
Level3
true
- _DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ _DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
true
diff --git a/XEngine_APPClient/APPClient_JT1078/APPClient_JT1078.cpp b/XEngine_APPClient/APPClient_JT1078/APPClient_JT1078.cpp
index 810fb8b..466700c 100644
--- a/XEngine_APPClient/APPClient_JT1078/APPClient_JT1078.cpp
+++ b/XEngine_APPClient/APPClient_JT1078/APPClient_JT1078.cpp
@@ -2,8 +2,9 @@
#include
#include
#pragma comment(lib,"XEngine_BaseLib/XEngine_BaseLib")
-#pragma comment(lib,"XEngine_Core/XEngine_OPenSsl")
+#pragma comment(lib,"XEngine_Core/XEngine_Cryption")
#pragma comment(lib,"XEngine_Client/XClient_Socket")
+#pragma comment(lib,"XEngine_AVCodec/XEngine_AVFrame")
#pragma comment(lib,"XEngine_AVCodec/XEngine_AVHelp")
#pragma comment(lib,"Ws2_32")
#endif
@@ -13,12 +14,14 @@
#include
#include
#include
-#include
-#include
+#include
+#include
#include
#include
#include
#include
+#include
+#include
#include
#include
#include "../../XEngine_Source/XEngine_UserProtocol.h"
@@ -26,13 +29,13 @@ using namespace std;
//需要优先配置XEngine
//WINDOWS使用VS2022 x86 或者 x64 debug 编译
-//g++ -std=c++17 -Wall -g APPClient_JT1078.cpp -o APPClient_JT1078.exe -lXEngine_BaseLib -lXEngine_OPenSsl -lXClient_Socket -lXEngine_AVHelp
+//g++ -std=c++17 -Wall -g APPClient_JT1078.cpp -o APPClient_JT1078.exe -lXEngine_BaseLib -lXEngine_Cryption -lXClient_Socket -lXEngine_AVFrame -lXEngine_AVHelp
void XEngine_Device_StrtoBCD(LPCXSTR lpszPhoneCode, XBYTE* ptszBCD)
{
for (int i = 0, nPos = 0; i < 6; i++)
{
- OPenSsl_Codec_2BytesToBCD(&lpszPhoneCode[nPos], ptszBCD[i]);
+ Cryption_Codec_2BytesToBCD(&lpszPhoneCode[nPos], ptszBCD[i]);
nPos += 2;
}
}
@@ -63,7 +66,7 @@ int main()
int nSeq = 0;
XNETHANDLE xhToken = 0;
- AVHelp_Parse_FrameInit(&xhToken, ENUM_XENGINE_AVCODEC_VIDEO_TYPE_H264);
+ AVFrame_Frame_ParseInit(&xhToken, ENUM_XENGINE_AVCODEC_VIDEO_TYPE_H264);
while (true)
{
@@ -81,8 +84,8 @@ int main()
}
}
int nListCount = 0;
- AVHELP_FRAMEDATA** ppSt_Frame;
- AVHelp_Parse_FrameGet(xhToken, tszRVBuffer, nRet, &ppSt_Frame, &nListCount);
+ AVFRAME_PARSEDATA** ppSt_Frame;
+ AVFrame_Frame_ParseGet(xhToken, tszRVBuffer, nRet, &ppSt_Frame, &nListCount);
for (int i = 0; i < nListCount; i++)
{
bool bFirst = true;
@@ -147,7 +150,7 @@ int main()
st_RTPPacket.wSerial = htons(nSeq++);
XEngine_Device_StrtoBCD(lpszPhone, st_RTPPacket.bySIMNumber);
- BaseLib_OperatorTime_SetXTPTime(&st_RTPPacket.ullTimestamp);
+ BaseLib_Time_SetXTPTime(&st_RTPPacket.ullTimestamp);
int nPos = 0;
XCHAR tszMsgBuffer[2048];
@@ -168,12 +171,12 @@ int main()
nUseCount += nCpyCount;
nMsgCount -= nCpyCount;
}
- BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ppSt_Frame[i]->ptszMsgBuffer);
+ BaseLib_Memory_FreeCStyle((XPPMEM)&ppSt_Frame[i]->ptszMsgBuffer);
}
- BaseLib_OperatorMemory_Free((XPPPMEM)&ppSt_Frame, nListCount);
+ BaseLib_Memory_Free((XPPPMEM)&ppSt_Frame, nListCount);
std::this_thread::sleep_for(std::chrono::milliseconds(40));
}
- AVHelp_Parse_FrameClose(xhToken);
+ AVFrame_Frame_ParseClose(xhToken);
WSACleanup();
return 0;
diff --git a/XEngine_APPClient/APPClient_JT1078/APPClient_JT1078.vcxproj b/XEngine_APPClient/APPClient_JT1078/APPClient_JT1078.vcxproj
index 5de1fbf..d0d1bac 100644
--- a/XEngine_APPClient/APPClient_JT1078/APPClient_JT1078.vcxproj
+++ b/XEngine_APPClient/APPClient_JT1078/APPClient_JT1078.vcxproj
@@ -74,6 +74,10 @@
$(XEngine_Include);$(IncludePath)
$(XEngine_Lib32);$(LibraryPath)
+
+ $(XEngine_Include);$(IncludePath)
+ $(XEngine_Lib64);$(LibraryPath)
+
Level3
@@ -106,7 +110,7 @@
Level3
true
- _DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ _DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
true
diff --git a/XEngine_APPClient/APPClient_SRTPull/APPClient_SRTPull.vcxproj b/XEngine_APPClient/APPClient_SRTPull/APPClient_SRTPull.vcxproj
index c75e44c..9c3af8b 100644
--- a/XEngine_APPClient/APPClient_SRTPull/APPClient_SRTPull.vcxproj
+++ b/XEngine_APPClient/APPClient_SRTPull/APPClient_SRTPull.vcxproj
@@ -74,6 +74,10 @@
$(XEngine_Include);$(IncludePath)
$(XEngine_Lib32);$(LibraryPath)
+
+ $(XEngine_Include);$(IncludePath)
+ $(XEngine_Lib64);$(LibraryPath)
+
Level3
@@ -106,7 +110,7 @@
Level3
true
- _DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ _DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
true
diff --git a/XEngine_APPClient/APPClient_WebRTC/APPClient_WebRTC.cpp b/XEngine_APPClient/APPClient_WebRTC/APPClient_WebRTC.cpp
index 188a8d6..0aa5abd 100644
--- a/XEngine_APPClient/APPClient_WebRTC/APPClient_WebRTC.cpp
+++ b/XEngine_APPClient/APPClient_WebRTC/APPClient_WebRTC.cpp
@@ -5,8 +5,8 @@
#include
#include
#pragma comment(lib,"XEngine_BaseLib/XEngine_BaseLib")
+#pragma comment(lib,"XEngine_Core/XEngine_Cryption")
#pragma comment(lib,"XEngine_Client/XClient_Socket")
-#pragma comment(lib,"XEngine_Client/XClient_OPenSsl")
#pragma comment(lib,"XEngine_Client/XClient_APIHelp")
#pragma comment(lib,"XEngine_StreamMedia/StreamMedia_SDPProtocol")
#pragma comment(lib,"XEngine_StreamMedia/StreamMedia_RTPProtocol")
@@ -25,12 +25,12 @@
#include
#include
#include
+#include
+#include
#include
#include
#include
#include
-#include
-#include
#include
#include
#include
@@ -69,7 +69,7 @@ bool APPClient_WEBRTC_SDPPacket(LPCXSTR lpszAPIUrl, LPCXSTR lpszFileCert, XCHAR*
int nAVCount = 1;
XCHAR** pptszAVList;
- BaseLib_OperatorMemory_Malloc((XPPPMEM)&pptszAVList, nAVCount, 64);/*
+ BaseLib_Memory_Malloc((XPPPMEM)&pptszAVList, nAVCount, 64);/*
_xstprintf(pptszAVList[0], _X("111"));
SDPProtocol_Packet_AddMedia(xhToken, _X("audio"), _X("UDP/TLS/RTP/SAVPF"), &pptszAVList, nAVCount, 0, 9);
@@ -156,8 +156,8 @@ bool APPClient_WEBRTC_SDPParse(LPCXSTR lpszMSGBuffer, int nMSGLen, XCHAR* ptszIC
XCHAR tszAlgorithmVlu[MAX_PATH] = {};
SDPProtocol_Parse_AttrFinger(&ppSt_ListAttr, nAttrCount, tszAlgorithmKey, tszAlgorithmVlu);
- BaseLib_OperatorMemory_Free((XPPPMEM)&ppSt_AVMedia, nListCount);
- BaseLib_OperatorMemory_Free((XPPPMEM)&ppSt_ListAttr, nAttrCount);
+ BaseLib_Memory_Free((XPPPMEM)&ppSt_AVMedia, nListCount);
+ BaseLib_Memory_Free((XPPPMEM)&ppSt_ListAttr, nAttrCount);
SDPProtocol_Parse_Destory(xhParse);
return true;
}
@@ -171,12 +171,12 @@ bool APPClient_WEBRTC_StunSend(XSOCKET hSocket, LPCXSTR lpszICEUser, LPCXSTR lps
XCHAR tszRandomStr[10] = {};
_xstprintf(tszICEUser, _X("%s:nzWE"), lpszICEUser);
- BaseLib_OperatorHandle_CreateStr(tszRandomStr, 8, 0, 2);
+ BaseLib_Handle_CreateStr(tszRandomStr, 8, 0, 2);
NatProtocol_StunNat_BuildAttr(tszTmpBuffer, &nMSGLen, RFCCOMPONENTS_NATCLIENT_PROTOCOL_STUN_ATTR_USERNAME, tszICEUser, 13);
NatProtocol_StunNat_BuildAttr(tszTmpBuffer + nMSGLen, &nMSGLen, RFCCOMPONENTS_NATCLIENT_PROTOCOL_STUN_ATTR_ICE_CONTROLLING, tszRandomStr, 8);
NatProtocol_StunNat_BuildPriority(tszTmpBuffer + nMSGLen, &nMSGLen);
- BaseLib_OperatorHandle_CreateStr(tszTokenStr, 12, 0, 2);
+ BaseLib_Handle_CreateStr(tszTokenStr, 12, 0, 2);
NatProtocol_StunNat_Packet(tszMSGBuffer, &nMSGLen, tszTokenStr, RFCCOMPONENTS_NATCLIENT_PROTOCOL_STUN_CLASS_REQUEST, RFCCOMPONENTS_NATCLIENT_PROTOCOL_STUN_ATTR_MAPPED_ADDRESS, tszTmpBuffer, true, lpszICEPass, true);
while (true)
@@ -238,7 +238,7 @@ bool APPClient_WEBRTC_Dlts(XSOCKET hSocket)
LPCXSTR lpszCertFile = _X("D:\\XEngine_StreamMedia\\XEngine_APPClient\\Debug\\certificate.crt");
LPCXSTR lpszPrivateFile = _X("D:\\XEngine_StreamMedia\\XEngine_APPClient\\Debug\\private.key");
- XHANDLE xhSsl = XClient_OPenSsl_InitEx(ENUM_XCLIENT_SSL_TYPE_DTL_VERSION, false, lpszCertFile, NULL, lpszPrivateFile);
+ XHANDLE xhSsl = Cryption_Client_InitEx(XENGINE_CRYPTION_PROTOCOL_DTL, false, lpszCertFile, NULL, lpszPrivateFile);
if (NULL == xhSsl)
{
return false;
@@ -246,14 +246,13 @@ bool APPClient_WEBRTC_Dlts(XSOCKET hSocket)
RTPProtocol_Parse_Init(1);
RTPProtocol_Parse_Insert(lpszRTPClient);
- XClient_OPenSsl_ConfigEx(xhSsl);
+ Cryption_Client_ConfigEx(xhSsl);
- XCLIENT_SSLCERT_SRVINFO st_SslInfo = {};
SRTPCORE_CLIENTINFO st_SRTPInfo = {};
- XClient_OPenSsl_ConnectEx(xhSsl, hSocket, &st_SslInfo);
+ Cryption_Client_ConnectEx(xhSsl, hSocket);
XBYTE byKEYBuffer[128] = {};
- XClient_OPenSsl_GetKeyEx(xhSsl, byKEYBuffer);
+ Cryption_Client_GetKeyEx(xhSsl, byKEYBuffer);
for (int i = 0; i < 60; i++)
{
printf("0x%02X, ", byKEYBuffer[i]);
@@ -343,7 +342,7 @@ bool APPClient_WEBRTC_Dlts(XSOCKET hSocket)
free(ptszRTPBuffer);
ptszRTPBuffer = NULL;
fclose(pSt_264File);
- XClient_OPenSsl_CloseEx(xhSsl);
+ Cryption_Client_CloseEx(xhSsl);
RTPProtocol_Parse_Destory();
return true;
}
@@ -371,7 +370,7 @@ int main()
XCHAR tszICEUser[128] = {};
XCHAR tszICEPass[128] = {};
APPClient_WEBRTC_SDPParse(ptszMSGBuffer, nMSGLen, tszICEUser, tszICEPass);
- BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMSGBuffer);
+ BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMSGBuffer);
XClient_UDPSelect_Create(&hSocket);
//XClient_UDPSelect_Connect(hSocket, "10.0.3.154", 8000);
diff --git a/XEngine_APPClient/APPClient_WebRTC/APPClient_WebRTC.vcxproj b/XEngine_APPClient/APPClient_WebRTC/APPClient_WebRTC.vcxproj
index 6e683d7..fa0b593 100644
--- a/XEngine_APPClient/APPClient_WebRTC/APPClient_WebRTC.vcxproj
+++ b/XEngine_APPClient/APPClient_WebRTC/APPClient_WebRTC.vcxproj
@@ -74,6 +74,10 @@
$(XEngine_Include);$(IncludePath)
$(XEngine_Lib32);$(LibraryPath)
+
+ $(XEngine_Include);$(IncludePath)
+ $(XEngine_Lib64);$(LibraryPath)
+
Level3
@@ -106,7 +110,7 @@
Level3
true
- _DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ _DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
true
diff --git a/XEngine_APPClient/APPClient_XStream/APPClient_XStream.cpp b/XEngine_APPClient/APPClient_XStream/APPClient_XStream.cpp
index adc84a4..e4fbcfb 100644
--- a/XEngine_APPClient/APPClient_XStream/APPClient_XStream.cpp
+++ b/XEngine_APPClient/APPClient_XStream/APPClient_XStream.cpp
@@ -35,7 +35,7 @@ XNETHANDLE xhVideo = 0;
__int64u nTimeVideo = 0;
FILE* pSt_File = NULL;
-void CALLBACK XEngine_AVCollect_CBVideo(uint8_t* punStringY, int nYLen, uint8_t* punStringU, int nULen, uint8_t* punStringV, int nVLen, AVCOLLECT_TIMEINFO* pSt_TimeInfo, XPVOID lParam)
+void CALLBACK XEngine_AVCollect_CBVideo(uint8_t* ptszAVBuffer, int nAVLen, AVCOLLECT_TIMEINFO* pSt_TimeInfo, XPVOID lParam)
{
XCHAR* ptszMsgBuffer = (XCHAR*)malloc(XENGINE_MEMORY_SIZE_MAX);
XENGINE_PROTOCOLHDR st_ProtocolHdr;
@@ -54,24 +54,24 @@ void CALLBACK XEngine_AVCollect_CBVideo(uint8_t* punStringY, int nYLen, uint8_t*
int nListCount = 0;
AVCODEC_VIDEO_MSGBUFFER** ppSt_MSGBuffer;
- VideoCodec_Stream_EnCodec(xhVideo, punStringY, punStringU, punStringV, nYLen, nULen, nVLen, &ppSt_MSGBuffer, &nListCount);
+ VideoCodec_Stream_EnCodec(xhVideo, ptszAVBuffer, nAVLen, &ppSt_MSGBuffer, &nListCount);
for (int i = 0; i < nListCount; i++)
{
nTimeVideo += (1000 / 24);
st_ProtocolData.byAVType = 0;
st_ProtocolData.nTimeStamp = nTimeVideo;
st_ProtocolData.byFrameType = ppSt_MSGBuffer[i]->st_VideoInfo.nFrameType;
- st_ProtocolHdr.unPacketSize = sizeof(XENGINE_PROTOCOL_AVDATA) + ppSt_MSGBuffer[i]->nYLen;
+ st_ProtocolHdr.unPacketSize = sizeof(XENGINE_PROTOCOL_AVDATA) + ppSt_MSGBuffer[i]->nAVLen;
memcpy(ptszMsgBuffer, &st_ProtocolHdr, sizeof(XENGINE_PROTOCOLHDR));
memcpy(ptszMsgBuffer + sizeof(XENGINE_PROTOCOLHDR), &st_ProtocolData, sizeof(XENGINE_PROTOCOL_AVDATA));
- memcpy(ptszMsgBuffer + sizeof(XENGINE_PROTOCOLHDR) + sizeof(XENGINE_PROTOCOL_AVDATA), ppSt_MSGBuffer[i]->ptszYBuffer, ppSt_MSGBuffer[i]->nYLen);
- XClient_TCPSelect_SendMsg(hSocket, ptszMsgBuffer, sizeof(XENGINE_PROTOCOLHDR) + sizeof(XENGINE_PROTOCOL_AVDATA) + ppSt_MSGBuffer[i]->nYLen);
- BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ppSt_MSGBuffer[i]->ptszYBuffer);
+ memcpy(ptszMsgBuffer + sizeof(XENGINE_PROTOCOLHDR) + sizeof(XENGINE_PROTOCOL_AVDATA), ppSt_MSGBuffer[i]->ptszAVBuffer, ppSt_MSGBuffer[i]->nAVLen);
+ XClient_TCPSelect_SendMsg(hSocket, ptszMsgBuffer, sizeof(XENGINE_PROTOCOLHDR) + sizeof(XENGINE_PROTOCOL_AVDATA) + ppSt_MSGBuffer[i]->nAVLen);
+ BaseLib_Memory_FreeCStyle((XPPMEM)&ppSt_MSGBuffer[i]->ptszAVBuffer);
- printf("Time:%llu Size:%d Type:%d\n", nTimeVideo, ppSt_MSGBuffer[i]->nYLen, ppSt_MSGBuffer[i]->st_VideoInfo.nFrameType);
+ printf("Time:%llu Size:%d Type:%d\n", nTimeVideo, ppSt_MSGBuffer[i]->nAVLen, ppSt_MSGBuffer[i]->st_VideoInfo.nFrameType);
}
- BaseLib_OperatorMemory_Free((XPPPMEM)&ppSt_MSGBuffer, nListCount);
+ BaseLib_Memory_Free((XPPPMEM)&ppSt_MSGBuffer, nListCount);
free(ptszMsgBuffer);
ptszMsgBuffer = NULL;
}
@@ -147,7 +147,7 @@ int XStream_Push()
_xtprintf("%d\n", st_ProtocolHdr.wReserve);
if (nLen > 0)
{
- BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
+ BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
}
AVCollect_Video_Start(xhScreen);
diff --git a/XEngine_APPClient/APPClient_XStream/APPClient_XStream.vcxproj b/XEngine_APPClient/APPClient_XStream/APPClient_XStream.vcxproj
index d963d51..5d1a998 100644
--- a/XEngine_APPClient/APPClient_XStream/APPClient_XStream.vcxproj
+++ b/XEngine_APPClient/APPClient_XStream/APPClient_XStream.vcxproj
@@ -74,6 +74,10 @@
$(XEngine_Include);$(IncludePath)
$(XEngine_Lib32);$(LibraryPath)
+
+ $(XEngine_Include);$(IncludePath)
+ $(XEngine_Lib64);$(LibraryPath)
+
Level3
@@ -106,7 +110,7 @@
Level3
true
- _DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ _DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
true
diff --git a/XEngine_APPClient/VSCopy-x64.bat b/XEngine_APPClient/VSCopy-x64.bat
new file mode 100644
index 0000000..e3f1174
--- /dev/null
+++ b/XEngine_APPClient/VSCopy-x64.bat
@@ -0,0 +1,22 @@
+copy /y "%XEngine_Lib64%\XEngine_BaseLib\XEngine_BaseLib.dll" "./"
+
+copy /y "%XEngine_Lib64%\XEngine_Core\XEngine_Cryption.dll" "./"
+
+copy /y "%XEngine_Lib64%\XEngine_Client\XClient_Socket.dll" "./"
+copy /y "%XEngine_Lib64%\XEngine_Client\XClient_APIHelp.dll" "./"
+
+copy /y "%XEngine_Lib64%\XEngine_AVCodec\XEngine_AVHelp.dll" "./"
+copy /y "%XEngine_Lib64%\XEngine_AVCodec\XEngine_AVCollect.dll" "./"
+copy /y "%XEngine_Lib64%\XEngine_AVCodec\XEngine_VideoCodec.dll" "./"
+copy /y "%XEngine_Lib64%\XEngine_AVCodec\XEngine_AVFrame.dll" "./"
+
+copy /y "%XEngine_Lib64%\XEngine_StreamMedia\StreamMedia_SDPProtocol.dll" "./"
+
+copy /y "%XEngine_Lib64%\XEngine_AVCodec\avcodec-60.dll" "./"
+copy /y "%XEngine_Lib64%\XEngine_AVCodec\avdevice-60.dll" "./"
+copy /y "%XEngine_Lib64%\XEngine_AVCodec\avfilter-9.dll" "./"
+copy /y "%XEngine_Lib64%\XEngine_AVCodec\avformat-60.dll" "./"
+copy /y "%XEngine_Lib64%\XEngine_AVCodec\avutil-58.dll" "./"
+copy /y "%XEngine_Lib64%\XEngine_AVCodec\postproc-57.dll" "./"
+copy /y "%XEngine_Lib64%\XEngine_AVCodec\swresample-4.dll" "./"
+copy /y "%XEngine_Lib64%\XEngine_AVCodec\swscale-7.dll" "./"
\ No newline at end of file
diff --git a/XEngine_APPClient/VSCopy-x86.bat b/XEngine_APPClient/VSCopy-x86.bat
index 222fd64..a99b4ee 100644
--- a/XEngine_APPClient/VSCopy-x86.bat
+++ b/XEngine_APPClient/VSCopy-x86.bat
@@ -1,10 +1,14 @@
copy /y "%XEngine_Lib32%\XEngine_BaseLib\XEngine_BaseLib.dll" "./"
-copy /y "%XEngine_Lib32%\XEngine_Core\XEngine_OPenSsl.dll" "./"
+
+copy /y "%XEngine_Lib32%\XEngine_Core\XEngine_Cryption.dll" "./"
+
copy /y "%XEngine_Lib32%\XEngine_Client\XClient_Socket.dll" "./"
copy /y "%XEngine_Lib32%\XEngine_Client\XClient_APIHelp.dll" "./"
+
copy /y "%XEngine_Lib32%\XEngine_AVCodec\XEngine_AVHelp.dll" "./"
copy /y "%XEngine_Lib32%\XEngine_AVCodec\XEngine_AVCollect.dll" "./"
copy /y "%XEngine_Lib32%\XEngine_AVCodec\XEngine_VideoCodec.dll" "./"
+copy /y "%XEngine_Lib32%\XEngine_AVCodec\XEngine_AVFrame.dll" "./"
copy /y "%XEngine_Lib32%\XEngine_StreamMedia\StreamMedia_SDPProtocol.dll" "./"
diff --git a/XEngine_Docment/Docment_en.docx b/XEngine_Docment/Docment_en.docx
index ffed1dc..39e43be 100644
Binary files a/XEngine_Docment/Docment_en.docx and b/XEngine_Docment/Docment_en.docx differ
diff --git a/XEngine_Docment/Docment_zh.docx b/XEngine_Docment/Docment_zh.docx
index 38cc0a7..0d74d20 100644
Binary files a/XEngine_Docment/Docment_zh.docx and b/XEngine_Docment/Docment_zh.docx differ
diff --git a/XEngine_Release/XEngine_Config/XEngine_Version.json b/XEngine_Release/XEngine_Config/XEngine_Version.json
index 6d6777d..ba0fcd2 100644
--- a/XEngine_Release/XEngine_Config/XEngine_Version.json
+++ b/XEngine_Release/XEngine_Config/XEngine_Version.json
@@ -1,6 +1,7 @@
{
"XVer": [
- "V2.9.0.1001 Build20240625",
+ "V2.10.0.1001 Build20250124",
+ "V2.9.0.1001 Build20241011",
"V2.8.0.1001 Build20240531",
"V2.7.0.1001 Build20240415",
"V2.6.0.1001 Build20240201",
diff --git a/XEngine_Source/VSCopy_Debug.bat b/XEngine_Source/VSCopy_Debug.bat
index 9eecb72..bee8dc5 100644
--- a/XEngine_Source/VSCopy_Debug.bat
+++ b/XEngine_Source/VSCopy_Debug.bat
@@ -1,7 +1,7 @@
copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_BaseLib.dll" "./"
copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_BaseSafe.dll" "./"
copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_Algorithm.dll" "./"
-copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_Core.dll" "./"
+copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_Cryption.dll" "./"
copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_ManagePool.dll" "./"
copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_OPenSsl.dll" "./"
@@ -9,6 +9,8 @@ copy /y "D:\XEngine\XEngine_SourceCode\Debug\XClient_Stream.dll" "./"
copy /y "D:\XEngine\XEngine_SourceCode\Debug\XClient_APIHelp.dll" "./"
copy /y "D:\XEngine\XEngine_SourceCode\Debug\NetHelp_XSocket.dll" "./"
+copy /y "D:\XEngine\XEngine_SourceCode\Debug\NetHelp_APIHelp.dll" "./"
+copy /y "D:\XEngine\XEngine_SourceCode\Debug\NetHelp_APIAddr.dll" "./"
copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_SystemApi.dll" "./"
copy /y "D:\XEngine\XEngine_SourceCode\Debug\HelpComponents_Packets.dll" "./"
diff --git a/XEngine_Source/VSCopy_x64.bat b/XEngine_Source/VSCopy_x64.bat
index f0394bb..1a3a932 100644
--- a/XEngine_Source/VSCopy_x64.bat
+++ b/XEngine_Source/VSCopy_x64.bat
@@ -3,12 +3,14 @@ copy /y "%XEngine_Lib64%\XEngine_BaseLib\XEngine_BaseSafe.dll" "./"
copy /y "%XEngine_Lib64%\XEngine_BaseLib\XEngine_Algorithm.dll" "./"
copy /y "%XEngine_Lib64%\XEngine_Core\XEngine_Core.dll" "./"
copy /y "%XEngine_Lib64%\XEngine_Core\XEngine_ManagePool.dll" "./"
-copy /y "%XEngine_Lib64%\XEngine_Core\XEngine_OPenSsl.dll" "./"
+copy /y "%XEngine_Lib64%\XEngine_Core\XEngine_Cryption.dll" "./"
copy /y "%XEngine_Lib64%\XEngine_Client\XClient_Stream.dll" "./"
copy /y "%XEngine_Lib64%\XEngine_Client\XClient_APIHelp.dll" "./"
copy /y "%XEngine_Lib64%\XEngine_NetHelp\NetHelp_XSocket.dll" "./"
+copy /y "%XEngine_Lib64%\XEngine_NetHelp\NetHelp_APIHelp.dll" "./"
+copy /y "%XEngine_Lib64%\XEngine_NetHelp\NetHelp_APIAddr.dll" "./"
copy /y "%XEngine_Lib64%\XEngine_SystemSdk\XEngine_SystemApi.dll" "./"
copy /y "%XEngine_Lib64%\XEngine_HelpComponents\HelpComponents_Packets.dll" "./"
diff --git a/XEngine_Source/VSCopy_x86.bat b/XEngine_Source/VSCopy_x86.bat
index ea91ca7..55e617d 100644
--- a/XEngine_Source/VSCopy_x86.bat
+++ b/XEngine_Source/VSCopy_x86.bat
@@ -3,12 +3,14 @@ copy /y "%XEngine_Lib32%\XEngine_BaseLib\XEngine_BaseSafe.dll" "./"
copy /y "%XEngine_Lib32%\XEngine_BaseLib\XEngine_Algorithm.dll" "./"
copy /y "%XEngine_Lib32%\XEngine_Core\XEngine_Core.dll" "./"
copy /y "%XEngine_Lib32%\XEngine_Core\XEngine_ManagePool.dll" "./"
-copy /y "%XEngine_Lib32%\XEngine_Core\XEngine_OPenSsl.dll" "./"
+copy /y "%XEngine_Lib32%\XEngine_Core\XEngine_Cryption.dll" "./"
copy /y "%XEngine_Lib32%\XEngine_Client\XClient_Stream.dll" "./"
copy /y "%XEngine_Lib32%\XEngine_Client\XClient_APIHelp.dll" "./"
copy /y "%XEngine_Lib32%\XEngine_NetHelp\NetHelp_XSocket.dll" "./"
+copy /y "%XEngine_Lib32%\XEngine_NetHelp\NetHelp_APIHelp.dll" "./"
+copy /y "%XEngine_Lib32%\XEngine_NetHelp\NetHelp_APIAddr.dll" "./"
copy /y "%XEngine_Lib32%\XEngine_SystemSdk\XEngine_SystemApi.dll" "./"
copy /y "%XEngine_Lib32%\XEngine_HelpComponents\HelpComponents_Packets.dll" "./"
diff --git a/XEngine_Source/XEngine_Depend b/XEngine_Source/XEngine_Depend
index d1d1ee7..d022f0c 160000
--- a/XEngine_Source/XEngine_Depend
+++ b/XEngine_Source/XEngine_Depend
@@ -1 +1 @@
-Subproject commit d1d1ee7952a0a93a1beb183a8dee281d9231ff3d
+Subproject commit d022f0c7d2298275d663543afd33e18243c5f25d
diff --git a/XEngine_Source/XEngine_ModuleConfigure/Makefile b/XEngine_Source/XEngine_ModuleConfigure/Makefile
index 9c885c3..55722b1 100644
--- a/XEngine_Source/XEngine_ModuleConfigure/Makefile
+++ b/XEngine_Source/XEngine_ModuleConfigure/Makefile
@@ -1,4 +1,4 @@
-CC = g++ -Wall -std=c++17 -fPIC
+CC = g++ -Wall -std=c++20 -fPIC
PLATFORM = linux
PLATVER =
PLATDIR =
diff --git a/XEngine_Source/XEngine_ModuleConfigure/XEngine_ModuleConfigure.vcxproj b/XEngine_Source/XEngine_ModuleConfigure/XEngine_ModuleConfigure.vcxproj
index 553a3bb..dcb4d51 100644
--- a/XEngine_Source/XEngine_ModuleConfigure/XEngine_ModuleConfigure.vcxproj
+++ b/XEngine_Source/XEngine_ModuleConfigure/XEngine_ModuleConfigure.vcxproj
@@ -30,27 +30,27 @@
DynamicLibrary
true
v143
- MultiByte
+ Unicode
DynamicLibrary
false
v143
true
- MultiByte
+ Unicode
DynamicLibrary
true
v143
- MultiByte
+ Unicode
DynamicLibrary
false
v143
true
- MultiByte
+ Unicode
@@ -98,6 +98,8 @@
Use
pch.h
4819
+ stdcpp20
+ stdc17
Windows
@@ -118,6 +120,9 @@
pch.h
MultiThreadedDLL
4819
+ /utf-8 %(AdditionalOptions)
+ stdcpp20
+ stdc17
Windows
@@ -137,6 +142,8 @@
Use
pch.h
4819
+ stdcpp20
+ stdc17
Windows
@@ -157,6 +164,9 @@
pch.h
MultiThreadedDLL
4819
+ /utf-8 %(AdditionalOptions)
+ stdcpp20
+ stdc17
Windows
diff --git a/XEngine_Source/XEngine_ModuleHelp/Makefile b/XEngine_Source/XEngine_ModuleHelp/Makefile
index 297eb20..10a5555 100644
--- a/XEngine_Source/XEngine_ModuleHelp/Makefile
+++ b/XEngine_Source/XEngine_ModuleHelp/Makefile
@@ -1,4 +1,4 @@
-CC = g++ -Wall -std=c++17 -fPIC
+CC = g++ -Wall -std=c++20 -fPIC
PLATFORM = linux
PLATVER =
PLATDIR =
@@ -8,7 +8,7 @@ RELEASE = 0
UNICODE = 0
LOADHDR = -I ./
LOADSO =
-LIB = -lXEngine_BaseLib -lXEngine_OPenSsl
+LIB = -lXEngine_BaseLib -lXEngine_Cryption -lNetHelp_APIAddr
LIBEX =
OBJECTS = ModuleHelp_JT1078.o ModuleHelp_SrtCore.o ModuleHelp_Rtsp.o ModuleHelp_Rtmp.o ModuleHelp_SRTPCore.o pch.o
@@ -62,6 +62,8 @@ else ifeq ($(PLATFORM),mac)
PLATVER = -D __MACOS__
PLATDIR = XEngine_Mac
FILEEXT = dylib
+ LOADHDR += -I /opt/homebrew/opt/srt/include -I /opt/homebrew/opt/srtp/include
+ LOADSO += -L /opt/homebrew/opt/srt/lib -L /opt/homebrew/opt/srtp/lib
LIBFLAG = -dynamiclib
LIBEX = -lpthread -ldl
LOADBIN = -Wl,-rpath,@loader_path/./
diff --git a/XEngine_Source/XEngine_ModuleHelp/ModuleHelp_JT1078/ModuleHelp_JT1078.cpp b/XEngine_Source/XEngine_ModuleHelp/ModuleHelp_JT1078/ModuleHelp_JT1078.cpp
index 83acfb5..29f2022 100644
--- a/XEngine_Source/XEngine_ModuleHelp/ModuleHelp_JT1078/ModuleHelp_JT1078.cpp
+++ b/XEngine_Source/XEngine_ModuleHelp/ModuleHelp_JT1078/ModuleHelp_JT1078.cpp
@@ -46,7 +46,7 @@ bool CModuleHelp_JT1078::ModuleHelp_JT1078_BCDToString(XBYTE bySIMNumber[6], XCH
}
for (int i = 0, nPos = 0; i < 6; i++)
{
- OPenSsl_Codec_BCDTo2Bytes(bySIMNumber[i], &ptszMsgBuffer[nPos]);
+ Cryption_Codec_BCDTo2Bytes(bySIMNumber[i], &ptszMsgBuffer[nPos]);
nPos += 2;
}
return true;
@@ -81,7 +81,7 @@ bool CModuleHelp_JT1078::ModuleHelp_JT1078_StringToBCD(LPCXSTR lpszMsgBuffer, XB
}
for (int i = 0, nPos = 0; i < 6; i++)
{
- OPenSsl_Codec_2BytesToBCD(&lpszMsgBuffer[i], pbySIMNumber[nPos]);
+ Cryption_Codec_2BytesToBCD(&lpszMsgBuffer[i], pbySIMNumber[nPos]);
nPos += 2;
}
return true;
diff --git a/XEngine_Source/XEngine_ModuleHelp/ModuleHelp_Rtsp/ModuleHelp_Rtsp.cpp b/XEngine_Source/XEngine_ModuleHelp/ModuleHelp_Rtsp/ModuleHelp_Rtsp.cpp
index dd86d30..90f8acb 100644
--- a/XEngine_Source/XEngine_ModuleHelp/ModuleHelp_Rtsp/ModuleHelp_Rtsp.cpp
+++ b/XEngine_Source/XEngine_ModuleHelp/ModuleHelp_Rtsp/ModuleHelp_Rtsp.cpp
@@ -459,7 +459,7 @@ bool CModuleHelp_Rtsp::ModuleHelp_Rtsp_GetRTPAddr(LPCXSTR lpszClientID, XCHAR* p
XCHAR tszIPAddr[128] = {};
_tcsxcpy(tszIPAddr, lpszClientID);
- BaseLib_OperatorIPAddr_SegAddr(tszIPAddr, &nPort);
+ APIAddr_IPAddr_SegAddr(tszIPAddr, &nPort);
if (bVideo)
{
_xstprintf(ptszADDRStr, _X("%s:%d"), tszIPAddr, stl_MapIterator->second.nVideoRTPPort);
@@ -506,7 +506,7 @@ bool CModuleHelp_Rtsp::ModuleHelp_Rtsp_GetRTCPAddr(LPCXSTR lpszClientID, XCHAR*
}
int nPort = 0;
XCHAR tszIPAddr[128] = {};
- BaseLib_OperatorIPAddr_SegAddr(tszIPAddr, &nPort);
+ APIAddr_IPAddr_SegAddr(tszIPAddr, &nPort);
if (bVideo)
{
_xstprintf(ptszADDRStr, _X("%s:%d"), tszIPAddr, stl_MapIterator->second.nVideoRTCPPort);
diff --git a/XEngine_Source/XEngine_ModuleHelp/ModuleHelp_Srt/ModuleHelp_SrtCore.cpp b/XEngine_Source/XEngine_ModuleHelp/ModuleHelp_Srt/ModuleHelp_SrtCore.cpp
index 2891aaf..5517f1a 100644
--- a/XEngine_Source/XEngine_ModuleHelp/ModuleHelp_Srt/ModuleHelp_SrtCore.cpp
+++ b/XEngine_Source/XEngine_ModuleHelp/ModuleHelp_Srt/ModuleHelp_SrtCore.cpp
@@ -295,8 +295,8 @@ bool CModuleHelp_SrtCore::ModuleHelp_SrtCore_GetStreamID(XSOCKET hSocket, XCHAR*
memset(tszSMSAddr, '\0', sizeof(tszSMSAddr));
memset(tszSMSMode, '\0', sizeof(tszSMSMode));
- BaseLib_OperatorString_GetKeyValue(stl_MapIterator->second.tszStreamBuffer + 4, _X(","), tszSMSAddr, tszSMSMode);
- BaseLib_OperatorString_GetKeyValue(tszSMSAddr, _X("="), tszTmpStr, ptszSMSAddr);
+ BaseLib_String_GetKeyValue(stl_MapIterator->second.tszStreamBuffer + 4, _X(","), tszSMSAddr, tszSMSMode);
+ BaseLib_String_GetKeyValue(tszSMSAddr, _X("="), tszTmpStr, ptszSMSAddr);
if (NULL != _tcsxstr(tszSMSMode, _X("publish")))
{
diff --git a/XEngine_Source/XEngine_ModuleHelp/XEngine_ModuleHelp.vcxproj b/XEngine_Source/XEngine_ModuleHelp/XEngine_ModuleHelp.vcxproj
index e681220..3a7ef3d 100644
--- a/XEngine_Source/XEngine_ModuleHelp/XEngine_ModuleHelp.vcxproj
+++ b/XEngine_Source/XEngine_ModuleHelp/XEngine_ModuleHelp.vcxproj
@@ -30,27 +30,27 @@
DynamicLibrary
true
v143
- MultiByte
+ Unicode
DynamicLibrary
false
v143
true
- MultiByte
+ Unicode
DynamicLibrary
true
v143
- MultiByte
+ Unicode
DynamicLibrary
false
v143
true
- MultiByte
+ Unicode
@@ -104,6 +104,8 @@
true
Use
pch.h
+ stdcpp20
+ stdc17
Windows
@@ -123,6 +125,9 @@
Use
pch.h
MultiThreadedDLL
+ /utf-8 %(AdditionalOptions)
+ stdcpp20
+ stdc17
Windows
@@ -141,6 +146,8 @@
true
Use
pch.h
+ stdcpp20
+ stdc17
Windows
@@ -159,6 +166,9 @@
true
Use
pch.h
+ /utf-8 %(AdditionalOptions)
+ stdcpp20
+ stdc17
Windows
diff --git a/XEngine_Source/XEngine_ModuleHelp/pch.h b/XEngine_Source/XEngine_ModuleHelp/pch.h
index 08e5415..d4dd629 100644
--- a/XEngine_Source/XEngine_ModuleHelp/pch.h
+++ b/XEngine_Source/XEngine_ModuleHelp/pch.h
@@ -37,8 +37,10 @@ using namespace std;
#include
#include
#include
-#include
-#include
+#include
+#include
+#include
+#include
#include "../XEngine_UserProtocol.h"
#include "ModuleHelp_Define.h"
#include "ModuleHelp_Error.h"
@@ -58,6 +60,7 @@ extern XLONG ModuleHelp_dwErrorCode;
#ifdef _MSC_BUILD
#pragma comment(lib,"XEngine_BaseLib/XEngine_BaseLib")
-#pragma comment(lib,"XEngine_Core/XEngine_OPenSsl")
+#pragma comment(lib,"XEngine_Core/XEngine_Cryption")
+#pragma comment(lib,"XEngine_NetHelp/NetHelp_APIAddr")
#pragma comment(lib,"Ws2_32")
#endif
\ No newline at end of file
diff --git a/XEngine_Source/XEngine_ModuleProtocol/Makefile b/XEngine_Source/XEngine_ModuleProtocol/Makefile
index b698e62..2d5ca9e 100644
--- a/XEngine_Source/XEngine_ModuleProtocol/Makefile
+++ b/XEngine_Source/XEngine_ModuleProtocol/Makefile
@@ -1,4 +1,4 @@
-CC = g++ -Wall -std=c++17 -fPIC
+CC = g++ -Wall -std=c++20 -fPIC
PLATFORM = linux
PLATVER =
PLATDIR =
diff --git a/XEngine_Source/XEngine_ModuleProtocol/XEngine_ModuleProtocol.vcxproj b/XEngine_Source/XEngine_ModuleProtocol/XEngine_ModuleProtocol.vcxproj
index dc40a93..f9b13fe 100644
--- a/XEngine_Source/XEngine_ModuleProtocol/XEngine_ModuleProtocol.vcxproj
+++ b/XEngine_Source/XEngine_ModuleProtocol/XEngine_ModuleProtocol.vcxproj
@@ -30,27 +30,27 @@
DynamicLibrary
true
v143
- MultiByte
+ Unicode
DynamicLibrary
false
v143
true
- MultiByte
+ Unicode
DynamicLibrary
true
v143
- MultiByte
+ Unicode
DynamicLibrary
false
v143
true
- MultiByte
+ Unicode
@@ -98,6 +98,8 @@
true
Use
pch.h
+ stdcpp20
+ stdc17
Windows
@@ -116,6 +118,9 @@
true
Use
pch.h
+ /utf-8 %(AdditionalOptions)
+ stdcpp20
+ stdc17
Windows
@@ -134,6 +139,8 @@
true
Use
pch.h
+ stdcpp20
+ stdc17
Windows
@@ -152,6 +159,9 @@
true
Use
pch.h
+ /utf-8 %(AdditionalOptions)
+ stdcpp20
+ stdc17
Windows
diff --git a/XEngine_Source/XEngine_ModuleQueue/Makefile b/XEngine_Source/XEngine_ModuleQueue/Makefile
index 06d7ebb..458cc7a 100644
--- a/XEngine_Source/XEngine_ModuleQueue/Makefile
+++ b/XEngine_Source/XEngine_ModuleQueue/Makefile
@@ -1,4 +1,4 @@
-CC = g++ -Wall -std=c++17 -fPIC
+CC = g++ -Wall -std=c++20 -fPIC
PLATFORM = linux
PLATVER =
PLATDIR =
diff --git a/XEngine_Source/XEngine_ModuleQueue/XEngine_ModuleQueue.vcxproj b/XEngine_Source/XEngine_ModuleQueue/XEngine_ModuleQueue.vcxproj
index 6c5b202..88d660d 100644
--- a/XEngine_Source/XEngine_ModuleQueue/XEngine_ModuleQueue.vcxproj
+++ b/XEngine_Source/XEngine_ModuleQueue/XEngine_ModuleQueue.vcxproj
@@ -90,6 +90,8 @@
true
Use
pch.h
+ stdcpp20
+ stdc17
Windows
@@ -108,6 +110,9 @@
true
Use
pch.h
+ /utf-8 %(AdditionalOptions)
+ stdcpp20
+ stdc17
Windows
@@ -126,6 +131,8 @@
true
Use
pch.h
+ stdcpp20
+ stdc17
Windows
@@ -144,6 +151,9 @@
true
Use
pch.h
+ /utf-8 %(AdditionalOptions)
+ stdcpp20
+ stdc17
Windows
diff --git a/XEngine_Source/XEngine_ModuleSession/Makefile b/XEngine_Source/XEngine_ModuleSession/Makefile
index 401c67c..dd87837 100644
--- a/XEngine_Source/XEngine_ModuleSession/Makefile
+++ b/XEngine_Source/XEngine_ModuleSession/Makefile
@@ -1,4 +1,4 @@
-CC = g++ -Wall -std=c++17 -fPIC
+CC = g++ -Wall -std=c++20 -fPIC
PLATFORM = linux
PLATVER =
PLATDIR =
diff --git a/XEngine_Source/XEngine_ModuleSession/ModuleSession_PullStream/ModuleSession_PullStream.cpp b/XEngine_Source/XEngine_ModuleSession/ModuleSession_PullStream/ModuleSession_PullStream.cpp
index a411830..eaf495c 100644
--- a/XEngine_Source/XEngine_ModuleSession/ModuleSession_PullStream/ModuleSession_PullStream.cpp
+++ b/XEngine_Source/XEngine_ModuleSession/ModuleSession_PullStream/ModuleSession_PullStream.cpp
@@ -291,7 +291,7 @@ bool CModuleSession_PullStream::ModuleSession_PullStream_GetList(STREAMMEDIA_PUL
st_Locker.lock_shared();
*pInt_ListCount = stl_MapClient.size();
- BaseLib_OperatorMemory_Malloc((XPPPMEM)pppSt_PullList, stl_MapClient.size(), sizeof(STREAMMEDIA_PULLLISTINFO));
+ BaseLib_Memory_Malloc((XPPPMEM)pppSt_PullList, stl_MapClient.size(), sizeof(STREAMMEDIA_PULLLISTINFO));
auto stl_MapIterator = stl_MapClient.begin();
for (int i = 0; stl_MapIterator != stl_MapClient.end(); stl_MapIterator++, i++)
diff --git a/XEngine_Source/XEngine_ModuleSession/ModuleSession_PushStream/ModuleSession_PushStream.cpp b/XEngine_Source/XEngine_ModuleSession/ModuleSession_PushStream/ModuleSession_PushStream.cpp
index 0f5d97a..a5a1f5f 100644
--- a/XEngine_Source/XEngine_ModuleSession/ModuleSession_PushStream/ModuleSession_PushStream.cpp
+++ b/XEngine_Source/XEngine_ModuleSession/ModuleSession_PushStream/ModuleSession_PushStream.cpp
@@ -339,7 +339,7 @@ bool CModuleSession_PushStream::ModuleSession_PushStream_GetInfo(STREAMMEDIA_PUB
st_Locker.lock_shared();
*pInt_ListCount = stl_MapPushStream.size();
- BaseLib_OperatorMemory_Malloc((XPPPMEM)pppSt_ProtocolStream, stl_MapPushStream.size(), sizeof(STREAMMEDIA_PUBLISHINFO));
+ BaseLib_Memory_Malloc((XPPPMEM)pppSt_ProtocolStream, stl_MapPushStream.size(), sizeof(STREAMMEDIA_PUBLISHINFO));
unordered_map::iterator stl_MapIterator = stl_MapPushStream.begin();
for (int i = 0; stl_MapIterator != stl_MapPushStream.end(); stl_MapIterator++, i++)
@@ -550,7 +550,7 @@ bool CModuleSession_PushStream::ModuleSession_PushStream_HLSInsert(LPCXSTR lpszC
XCHAR tszFilePath[MAX_PATH] = {};
XCHAR tszFileName[MAX_PATH] = {};
//获得文件名和路径
- BaseLib_OperatorString_GetFileAndPath(lpszTSFile, tszFilePath, tszFileName);
+ BaseLib_String_GetFileAndPath(lpszTSFile, tszFilePath, tszFileName);
SystemApi_File_CreateMutilFolder(tszFilePath);
_tcsxcpy(stl_MapIterator->second->st_HLSFile.tszFileName, lpszTSFile);
diff --git a/XEngine_Source/XEngine_ModuleSession/XEngine_ModuleSession.vcxproj b/XEngine_Source/XEngine_ModuleSession/XEngine_ModuleSession.vcxproj
index 90e95f4..a54ebd3 100644
--- a/XEngine_Source/XEngine_ModuleSession/XEngine_ModuleSession.vcxproj
+++ b/XEngine_Source/XEngine_ModuleSession/XEngine_ModuleSession.vcxproj
@@ -30,27 +30,27 @@
DynamicLibrary
true
v143
- MultiByte
+ Unicode
DynamicLibrary
false
v143
true
- MultiByte
+ Unicode
DynamicLibrary
true
v143
- MultiByte
+ Unicode
DynamicLibrary
false
v143
true
- MultiByte
+ Unicode
@@ -98,6 +98,8 @@
true
Use
pch.h
+ stdcpp20
+ stdc17
Windows
@@ -116,6 +118,9 @@
true
Use
pch.h
+ /utf-8 %(AdditionalOptions)
+ stdcpp20
+ stdc17
Windows
@@ -134,6 +139,8 @@
true
Use
pch.h
+ stdcpp20
+ stdc17
Windows
@@ -152,6 +159,9 @@
true
Use
pch.h
+ /utf-8 %(AdditionalOptions)
+ stdcpp20
+ stdc17
Windows
diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/Makefile b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/Makefile
index 6fa6d5f..f8c9fe9 100644
--- a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/Makefile
+++ b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/Makefile
@@ -1,4 +1,4 @@
-CC = g++ -Wall -std=c++17 -Wno-format-overflow
+CC = g++ -Wall -std=c++20
PLATFORM = linux
PLATVER =
PLATDIR =
@@ -8,10 +8,10 @@ LOADHDR = -I ./
LOADSO = -L ../../XEngine_ModuleConfigure -L ../../XEngine_ModuleProtocol -L ../../XEngine_ModuleSession -L ../../XEngine_ModuleHelp -L ../../XEngine_ModuleQueue \
-L ../../XEngine_Depend/XEngine_Module/jsoncpp -L ../../XEngine_Depend/XEngine_Module/XEngine_InfoReport
LIB = -lXEngine_BaseLib -lXEngine_Algorithm \
- -lXEngine_Core -lXEngine_ManagePool -lXEngine_OPenSsl \
+ -lXEngine_Core -lXEngine_ManagePool -lXEngine_Cryption \
-lXClient_Stream \
-lHelpComponents_XLog -lHelpComponents_Packets \
- -lNetHelp_APIHelp -lNetHelp_XSocket \
+ -lNetHelp_APIHelp -lNetHelp_XSocket -lNetHelp_APIAddr \
-lRfcComponents_HttpProtocol -lRfcComponents_NatProtocol \
-lXEngine_AVHelp -lXEngine_AudioCodec \
-lStreamMedia_FLVProtocol -lStreamMedia_RTMPProtocol -lStreamMedia_SDPProtocol -lStreamMedia_HLSProtocol -lStreamMedia_RTSPProtocol -lStreamMedia_RTPProtocol -lStreamMedia_RTCPProtocol \
@@ -50,8 +50,9 @@ ifeq ($(PLATFORM),linux)
PLATVER = -D __UBUNTU__
PLATDIR = XEngine_Linux/Ubuntu
endif
+ CC += -Wno-format-overflow
LIBEX = -lpthread -lrt -ldl
- LOADBIN = -Wl,-rpath=./,--disable-new-dtags
+ LOADBIN = -Wl,-rpath=./:/usr/local/ffmpeg-xengine/lib,--disable-new-dtags
else ifeq ($(PLATFORM),mac)
CC += -Wno-deprecated-declarations
PLATVER = -D __MACOS__
diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_HTTPApi/StreamMedia_HTTPApi.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_HTTPApi/StreamMedia_HTTPApi.cpp
index 935f6e3..36ab3aa 100644
--- a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_HTTPApi/StreamMedia_HTTPApi.cpp
+++ b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_HTTPApi/StreamMedia_HTTPApi.cpp
@@ -32,7 +32,7 @@ bool HTTPApi_Management_Task(LPCXSTR lpszClientAddr, XCHAR*** ppptszListHdr, int
st_HDRParam.nHttpCode = 200; //HTTP CODE码
st_HDRParam.bIsClose = true; //收到回复后就关闭
- BaseLib_OperatorString_GetKeyValue((*ppptszListHdr)[0], "=", tszKeyBuffer, tszVluBuffer);
+ BaseLib_String_GetKeyValue((*ppptszListHdr)[0], "=", tszKeyBuffer, tszVluBuffer);
if (0 == _tcsxnicmp(lpszAPIPublish, tszVluBuffer, _tcsxlen(lpszAPIPublish)))
{
@@ -40,7 +40,7 @@ bool HTTPApi_Management_Task(LPCXSTR lpszClientAddr, XCHAR*** ppptszListHdr, int
memset(tszKeyBuffer, '\0', sizeof(tszKeyBuffer));
memset(tszVluBuffer, '\0', sizeof(tszVluBuffer));
- BaseLib_OperatorString_GetKeyValue((*ppptszListHdr)[1], "=", tszKeyBuffer, tszVluBuffer);
+ BaseLib_String_GetKeyValue((*ppptszListHdr)[1], "=", tszKeyBuffer, tszVluBuffer);
if (0 == _tcsxnicmp(lpszAPIGet, tszVluBuffer, _tcsxlen(lpszAPIGet)))
{
int nListCount = 0;
@@ -50,7 +50,7 @@ bool HTTPApi_Management_Task(LPCXSTR lpszClientAddr, XCHAR*** ppptszListHdr, int
HttpProtocol_Server_SendMsgEx(xhHttpPacket, tszSDBuffer, &nSDLen, &st_HDRParam, tszRVBuffer, nRVLen);
XEngine_Network_Send(lpszClientAddr, tszSDBuffer, nSDLen, ENUM_XENGINE_STREAMMEDIA_CLIENT_TYPE_HTTP);
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("HTTP接口:%s,请求获取发布流信息成功,个数:%d"), lpszClientAddr, nListCount);
- BaseLib_OperatorMemory_Free((XPPPMEM)&ppSt_ProtocolStream, nListCount);
+ BaseLib_Memory_Free((XPPPMEM)&ppSt_ProtocolStream, nListCount);
}
}
else if (0 == _tcsxnicmp(lpszAPIPull, tszVluBuffer, _tcsxlen(lpszAPIPull)))
@@ -59,7 +59,7 @@ bool HTTPApi_Management_Task(LPCXSTR lpszClientAddr, XCHAR*** ppptszListHdr, int
memset(tszKeyBuffer, '\0', sizeof(tszKeyBuffer));
memset(tszVluBuffer, '\0', sizeof(tszVluBuffer));
- BaseLib_OperatorString_GetKeyValue((*ppptszListHdr)[1], "=", tszKeyBuffer, tszVluBuffer);
+ BaseLib_String_GetKeyValue((*ppptszListHdr)[1], "=", tszKeyBuffer, tszVluBuffer);
if (0 == _tcsxnicmp(lpszAPIGet, tszVluBuffer, _tcsxlen(lpszAPIGet)))
{
int nListCount = 0;
@@ -69,7 +69,7 @@ bool HTTPApi_Management_Task(LPCXSTR lpszClientAddr, XCHAR*** ppptszListHdr, int
HttpProtocol_Server_SendMsgEx(xhHttpPacket, tszSDBuffer, &nSDLen, &st_HDRParam, tszRVBuffer, nRVLen);
XEngine_Network_Send(lpszClientAddr, tszSDBuffer, nSDLen, ENUM_XENGINE_STREAMMEDIA_CLIENT_TYPE_HTTP);
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("HTTP接口:%s,请求获取订阅流信息成功,个数:%d"), lpszClientAddr, nListCount);
- BaseLib_OperatorMemory_Free((XPPPMEM)&ppSt_PullList, nListCount);
+ BaseLib_Memory_Free((XPPPMEM)&ppSt_PullList, nListCount);
}
}
return true;
diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PullStream/PullStream_ClientGet.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PullStream/PullStream_ClientGet.cpp
index 5270cc0..3f7fa06 100644
--- a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PullStream/PullStream_ClientGet.cpp
+++ b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PullStream/PullStream_ClientGet.cpp
@@ -31,7 +31,7 @@ bool PullStream_ClientGet_Handle(LPCXSTR lpszClientAddr, XCHAR*** ppptszListHdr,
st_HDRParam.nHttpCode = 200; //HTTP CODE码
st_HDRParam.bIsClose = true; //收到回复后就关闭
- BaseLib_OperatorString_GetKeyValue((*ppptszListHdr)[0], "=", tszKeyBuffer, tszVluBuffer);
+ BaseLib_String_GetKeyValue((*ppptszListHdr)[0], "=", tszKeyBuffer, tszVluBuffer);
if (0 == _tcsxnicmp(lpszStreamPlay, tszVluBuffer, _tcsxlen(lpszStreamPlay)))
{
@@ -44,7 +44,7 @@ bool PullStream_ClientGet_Handle(LPCXSTR lpszClientAddr, XCHAR*** ppptszListHdr,
memset(tszKeyBuffer, '\0', sizeof(tszKeyBuffer));
memset(tszVluBuffer, '\0', sizeof(tszVluBuffer));
- BaseLib_OperatorString_GetKeyValue((*ppptszListHdr)[1], "=", tszKeyBuffer, tszSMSAddr);
+ BaseLib_String_GetKeyValue((*ppptszListHdr)[1], "=", tszKeyBuffer, tszSMSAddr);
if (!ModuleSession_PushStream_FindStream(tszSMSAddr, tszPushAddr))
{
@@ -55,7 +55,7 @@ bool PullStream_ClientGet_Handle(LPCXSTR lpszClientAddr, XCHAR*** ppptszListHdr,
return false;
}
memset(tszVluBuffer, '\0', sizeof(tszVluBuffer));
- BaseLib_OperatorString_GetKeyValue((*ppptszListHdr)[2], "=", tszKeyBuffer, tszVluBuffer);
+ BaseLib_String_GetKeyValue((*ppptszListHdr)[2], "=", tszKeyBuffer, tszVluBuffer);
ENUM_XENGINE_STREAMMEDIA_CLIENT_TYPE enStreamType;
if (0 == _tcsxnicmp(tszVluBuffer, "flv", 3))
@@ -72,7 +72,7 @@ bool PullStream_ClientGet_Handle(LPCXSTR lpszClientAddr, XCHAR*** ppptszListHdr,
"Access-Control-Allow-Origin: *\r\n"
"Access-Control-Allow-Credentials: true\r\n"
"Transfer-Encoding: chunked\r\n\r\n"
- "%x\r\n"), BaseLib_OperatorVer_XTypeStr(), nRVLen);
+ "%x\r\n"), BaseLib_Version_XTypeStr(), nRVLen);
memcpy(tszSDBuffer + nSDLen, tszRVBuffer, nRVLen);
nSDLen += nRVLen;
memcpy(tszSDBuffer + nSDLen, _X("\r\n"), 2);
@@ -139,7 +139,7 @@ bool PullStream_ClientGet_Handle(LPCXSTR lpszClientAddr, XCHAR*** ppptszListHdr,
"Access-Control-Allow-Origin: *\r\n"
"Access-Control-Allow-Credentials: true\r\n"
"Transfer-Encoding: chunked\r\n\r\n"
- "%x\r\n"), BaseLib_OperatorVer_XTypeStr(), nRVLen);
+ "%x\r\n"), BaseLib_Version_XTypeStr(), nRVLen);
memcpy(tszSDBuffer + nSDLen, &st_AVInfo, nRVLen);
nSDLen += nRVLen;
memcpy(tszSDBuffer + nSDLen, _X("\r\n"), 2);
@@ -160,7 +160,7 @@ bool PullStream_ClientGet_Handle(LPCXSTR lpszClientAddr, XCHAR*** ppptszListHdr,
"Server: XEngine/%s\r\n"
"Access-Control-Allow-Origin: *\r\n"
"Access-Control-Allow-Credentials: true\r\n"
- "Transfer-Encoding: chunked\r\n\r\n"), BaseLib_OperatorVer_XTypeStr());
+ "Transfer-Encoding: chunked\r\n\r\n"), BaseLib_Version_XTypeStr());
XEngine_Network_Send(lpszClientAddr, tszSDBuffer, nSDLen, ENUM_XENGINE_STREAMMEDIA_CLIENT_TYPE_HTTP);
ModuleSession_PullStream_Insert(lpszClientAddr, tszSMSAddr, tszPushAddr, enStreamType);
diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PullStream/PullStream_ClientRtsp.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PullStream/PullStream_ClientRtsp.cpp
index 5ae54f6..8ef6a3e 100644
--- a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PullStream/PullStream_ClientRtsp.cpp
+++ b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PullStream/PullStream_ClientRtsp.cpp
@@ -39,7 +39,7 @@ bool PullStream_ClientRtsp_RTCPProcess(LPCXSTR lpszClientAddr, XSOCKET hSocket,
nPos -= sizeof(uint32_t);
}
RTCPProtocol_Parse_Sdeser(lpszMsgBuffer + nPos, nMsgLen - nPos, &st_RTCPHdr, &ppSt_ListSdeser, &nListCount);
- BaseLib_OperatorMemory_Free((XPPPMEM)&ppSt_ListSdeser, nListCount);
+ BaseLib_Memory_Free((XPPPMEM)&ppSt_ListSdeser, nListCount);
}
/*
int nSDLen = 0;
@@ -51,7 +51,7 @@ bool PullStream_ClientRtsp_RTCPProcess(LPCXSTR lpszClientAddr, XSOCKET hSocket,
nListCount = 1;
STREAMMEDIA_RTCPPROTOCOL_SDESINFO** ppSt_SDESList;
- BaseLib_OperatorMemory_Malloc((XPPPMEM)&ppSt_SDESList, nListCount, sizeof(STREAMMEDIA_RTCPPROTOCOL_SDESINFO));
+ BaseLib_Memory_Malloc((XPPPMEM)&ppSt_SDESList, nListCount, sizeof(STREAMMEDIA_RTCPPROTOCOL_SDESINFO));
memset(tszMSGBuffer, '\0', sizeof(tszMSGBuffer));
ppSt_SDESList[0]->enSDESType = ENUM_STREAMMEDIA_RTCPPROTOCOL_SDES_TYPE_CNAME;
@@ -60,7 +60,7 @@ bool PullStream_ClientRtsp_RTCPProcess(LPCXSTR lpszClientAddr, XSOCKET hSocket,
_tcsxcpy(ppSt_SDESList[0]->tszMSGBuffer, XENGINE_NAME_STR);
RTCPProtocol_Packet_Sdeser(tszMSGBuffer, &nSDLen, &ppSt_SDESList, nListCount);
NetCore_UDPXCore_SendEx(xhVRTCPSocket, lpszClientAddr, tszMSGBuffer, nSDLen);
- BaseLib_OperatorMemory_Free((XPPPMEM)&ppSt_SDESList, nListCount);*/
+ BaseLib_Memory_Free((XPPPMEM)&ppSt_SDESList, nListCount);*/
}
return true;
}
@@ -87,7 +87,7 @@ bool PullStream_ClientRtsp_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LP
memset(tszPushAddr, '\0', sizeof(tszPushAddr));
memset(tszSMSAddr, '\0', sizeof(tszSMSAddr));
- BaseLib_OperatorString_GetKeyValue((*ppptszParamList)[1], "=", tszKeyStr, tszSMSAddr);
+ BaseLib_String_GetKeyValue((*ppptszParamList)[1], "=", tszKeyStr, tszSMSAddr);
if (!ModuleSession_PushStream_FindStream(tszSMSAddr, tszPushAddr))
{
st_RTSPResponse.nCode = 404;
@@ -119,7 +119,7 @@ bool PullStream_ClientRtsp_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LP
memset(tszSMSAddr, '\0', sizeof(tszSMSAddr));
memset(&st_AVInfo, '\0', sizeof(XENGINE_PROTOCOL_AVINFO));
- BaseLib_OperatorString_GetKeyValue((*ppptszParamList)[1], "=", tszKeyStr, tszSMSAddr);
+ BaseLib_String_GetKeyValue((*ppptszParamList)[1], "=", tszKeyStr, tszSMSAddr);
if (!ModuleSession_PushStream_FindStream(tszSMSAddr, tszPushAddr))
{
st_RTSPResponse.nCode = 404;
@@ -145,7 +145,7 @@ bool PullStream_ClientRtsp_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LP
SDPProtocol_Packet_Control(xhSDPToken, -1);
//配置视频属性
XCHAR** pptszAVList;
- BaseLib_OperatorMemory_Malloc((XPPPMEM)&pptszAVList, 1, 64);
+ BaseLib_Memory_Malloc((XPPPMEM)&pptszAVList, 1, 64);
_tcsxcpy(pptszAVList[0], "96");
SDPProtocol_Packet_AddMedia(xhSDPToken, _X("video"), _X("RTP/AVP"), &pptszAVList, 1);
@@ -159,8 +159,8 @@ bool PullStream_ClientRtsp_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LP
st_SDPMediaVideo.st_FmtpVideo.tszLeaveId[1] = tszSPSBuffer[1];
st_SDPMediaVideo.st_FmtpVideo.tszLeaveId[2] = tszSPSBuffer[2];
- OPenSsl_Codec_Base64((LPCXSTR)tszSPSBuffer, st_SDPMediaVideo.st_FmtpVideo.tszSPSBase, &nSPSLen, true);
- OPenSsl_Codec_Base64((LPCXSTR)tszPPSBuffer, st_SDPMediaVideo.st_FmtpVideo.tszPPSBase, &nPPSLen, true);
+ Cryption_Codec_Base64((LPCXSTR)tszSPSBuffer, st_SDPMediaVideo.st_FmtpVideo.tszSPSBase, &nSPSLen, true);
+ Cryption_Codec_Base64((LPCXSTR)tszPPSBuffer, st_SDPMediaVideo.st_FmtpVideo.tszPPSBase, &nPPSLen, true);
st_SDPMediaVideo.nTrackID = 0;
st_SDPMediaVideo.st_RTPMap.nSampleRate = 90000;
@@ -193,7 +193,7 @@ bool PullStream_ClientRtsp_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LP
SDPProtocol_Packet_Destory(xhSDPToken);
ModuleHelp_Rtsp_CreateClient(lpszClientAddr, 0, 1);
//创建SESSION
- BaseLib_OperatorHandle_CreateStr(st_RTSPResponse.tszSession, 12);
+ BaseLib_Handle_CreateStr(st_RTSPResponse.tszSession, 12);
ModuleHelp_Rtsp_SetSession(lpszClientAddr, st_RTSPResponse.tszSession);
st_RTSPResponse.nPLen = nRVLen;
@@ -231,7 +231,7 @@ bool PullStream_ClientRtsp_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LP
st_RTSPResponse.st_TransportInfo.st_ServerPorts.nRTPPort = st_ServiceConfig.st_XPull.st_PullRtsp.nARTPPort;
st_RTSPResponse.st_TransportInfo.st_ServerPorts.nRTCPPort = st_ServiceConfig.st_XPull.st_PullRtsp.nARTCPPort;
}
- BaseLib_OperatorHandle_CreateStr(st_RTSPResponse.st_TransportInfo.tszSSRCStr, 8, 1);
+ BaseLib_Handle_CreateStr(st_RTSPResponse.st_TransportInfo.tszSSRCStr, 8, 1);
ModuleHelp_Rtsp_SetSsrc(lpszClientAddr, st_RTSPResponse.st_TransportInfo.tszSSRCStr, bVideo);
RTSPProtocol_REPPacket_Response(tszSDBuffer, &nSDLen, &st_RTSPResponse);
@@ -249,7 +249,7 @@ bool PullStream_ClientRtsp_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LP
memset(tszSMSAddr, '\0', sizeof(tszSMSAddr));
memset(&st_AVInfo, '\0', sizeof(XENGINE_PROTOCOL_AVINFO));
- BaseLib_OperatorString_GetKeyValue((*ppptszParamList)[1], "=", tszKeyStr, tszSMSAddr);
+ BaseLib_String_GetKeyValue((*ppptszParamList)[1], "=", tszKeyStr, tszSMSAddr);
if (!ModuleSession_PushStream_FindStream(tszSMSAddr, tszPushAddr))
{
@@ -265,7 +265,7 @@ bool PullStream_ClientRtsp_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LP
_tcsxcpy(st_RTSPResponse.tszSession, st_RTSPRequest.tszSession);
st_RTSPResponse.nRTPCount = 2;
- BaseLib_OperatorMemory_Malloc((XPPPMEM)&st_RTSPResponse.ppSt_RTPInfo, 2, sizeof(RTSPPROTOCOL_RTPINFO));
+ BaseLib_Memory_Malloc((XPPPMEM)&st_RTSPResponse.ppSt_RTPInfo, 2, sizeof(RTSPPROTOCOL_RTPINFO));
XCHAR tszSSRCVideo[128] = {};
XCHAR tszSSRCAudio[128] = {};
diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PullStream/PullStream_ClientWebRtc.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PullStream/PullStream_ClientWebRtc.cpp
index 3ecc807..fe137ac 100644
--- a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PullStream/PullStream_ClientWebRtc.cpp
+++ b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PullStream/PullStream_ClientWebRtc.cpp
@@ -44,7 +44,7 @@ bool PullStream_ClientProtocol_Handle(LPCXSTR lpszClientAddr, XSOCKET hSocket, L
}
else
{
- bool bRet = OPenSsl_Server_AcceptMemoryEx(xhRTCSsl, hSocket, lpszClientAddr, tszSDBuffer, &nSDLen, lpszMsgBuffer, nMsgLen);
+ bool bRet = Cryption_Server_AcceptMemoryEx(xhRTCSsl, hSocket, lpszClientAddr, tszSDBuffer, &nSDLen, lpszMsgBuffer, nMsgLen);
if (nSDLen > 0)
{
XEngine_Network_Send(lpszClientAddr, tszSDBuffer, nSDLen, ENUM_XENGINE_STREAMMEDIA_CLIENT_TYPE_PUSH_RTC);
@@ -53,7 +53,7 @@ bool PullStream_ClientProtocol_Handle(LPCXSTR lpszClientAddr, XSOCKET hSocket, L
if (bRet)
{
XBYTE tszKEYBuffer[MAX_PATH] = {};
- OPenSsl_Server_GetKeyEx(xhRTCSsl, lpszClientAddr, tszKEYBuffer);
+ Cryption_Server_GetKeyEx(xhRTCSsl, lpszClientAddr, tszKEYBuffer);
ModuleHelp_SRTPCore_Create(tszKEYBuffer);
XCHAR tszSMSName[128] = {};
@@ -98,12 +98,12 @@ bool PullStream_ClientProtocol_Handle(LPCXSTR lpszClientAddr, XSOCKET hSocket, L
break;
}
}
- BaseLib_OperatorMemory_Free((XPPPMEM)&ppSt_ListAttr, nAttrCount);
+ BaseLib_Memory_Free((XPPPMEM)&ppSt_ListAttr, nAttrCount);
int nPort = 0;
XCHAR tszIPPort[128] = {};
_tcsxcpy(tszIPPort, lpszClientAddr);
- BaseLib_OperatorIPAddr_SegAddr(tszIPPort, &nPort);
+ APIAddr_IPAddr_SegAddr(tszIPPort, &nPort);
NatProtocol_StunNat_BuildAttr(tszRVBuffer, &nRVLen, RFCCOMPONENTS_NATCLIENT_PROTOCOL_STUN_ATTR_USERNAME, tszUserStr, _tcsxlen(tszUserStr));
NatProtocol_StunNat_BuildMapAddress(tszRVBuffer + nRVLen, &nRVLen, tszIPPort, nPort, true);
@@ -139,7 +139,7 @@ bool PullStream_ClientProtocol_Handle(LPCXSTR lpszClientAddr, XSOCKET hSocket, L
int nListCount = 0;
RTCPPROTOCOL_RTCPRECVER** ppSt_ListRecvInfo;
RTCPProtocol_Parse_Recver(tszRVBuffer + nPos, nRVLen - nPos, &st_RTCPHdr, &ppSt_ListRecvInfo, &nListCount);
- BaseLib_OperatorMemory_Free((XPPPMEM)&ppSt_ListRecvInfo, nListCount);
+ BaseLib_Memory_Free((XPPPMEM)&ppSt_ListRecvInfo, nListCount);
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("RTC客户端:%s,请求的RTCP协议处理成功,请求处理的协议:%d"), lpszClientAddr, st_RTCPHdr.byPT);
}
else
@@ -158,7 +158,7 @@ bool PullStream_ClientProtocol_Handle(LPCXSTR lpszClientAddr, XSOCKET hSocket, L
bool PullStream_ClientWebRtc_SDKPacket(XNETHANDLE xhPacket, LPCXSTR lpszClientID, bool bVideo, int nAVIndex, STREAMMEDIA_SDPPROTOCOL_MEDIAINFO* pSt_SDPMediaInfo, XENGINE_PROTOCOL_AVINFO *pSt_AVInfo)
{
XCHAR** pptszAVList;
- BaseLib_OperatorMemory_Malloc((XPPPMEM)&pptszAVList, 1, MAX_PATH);
+ BaseLib_Memory_Malloc((XPPPMEM)&pptszAVList, 1, MAX_PATH);
if (bVideo)
{
@@ -179,7 +179,7 @@ bool PullStream_ClientWebRtc_SDKPacket(XNETHANDLE xhPacket, LPCXSTR lpszClientID
XBYTE tszDigestStr[MAX_PATH] = {};
XCHAR tszDigestHex[MAX_PATH] = {};
int nPos = _xstprintf(tszDigestHex, _X("sha-256 "));
- OPenSsl_Api_Digest(st_ServiceConfig.st_XPull.st_PullWebRtc.tszDerStr, tszDigestStr, &nDLen, true, XENGINE_OPENSSL_API_DIGEST_SHA256);
+ Cryption_Api_Digest(st_ServiceConfig.st_XPull.st_PullWebRtc.tszDerStr, tszDigestStr, &nDLen, true, ENUM_XENGINE_CRYPTION_DIGEST_SHA256);
for (int i = 0; i < nDLen; i++)
{
int nRet = _xstprintf(tszDigestHex + nPos, _X("%02X"), tszDigestStr[i]);
@@ -198,7 +198,7 @@ bool PullStream_ClientWebRtc_SDKPacket(XNETHANDLE xhPacket, LPCXSTR lpszClientID
XCHAR tszSSrcStr[128] = {};
_xstprintf(tszSSrcStr, _X("2124085007"));
- //BaseLib_OperatorHandle_CreateStr(tszSSrcStr, 8, 1);
+ //BaseLib_Handle_CreateStr(tszSSrcStr, 8, 1);
SDPProtocol_Packet_CName(xhPacket, _ttxoll(tszSSrcStr), _X("79a9722580589zr5"), _X("video-666q08to"));
ModuleSession_PullStream_RTCSSrcSet(lpszClientID, tszSSrcStr, _X("79a9722580589zr5"), _X("video-666q08to"));
RTPProtocol_Packet_Insert(tszSSrcStr, ENUM_STREAMMEDIA_RTPPROTOCOL_PAYLOAD_TYPE_H264);
@@ -213,14 +213,14 @@ bool PullStream_ClientWebRtc_SDKPacket(XNETHANDLE xhPacket, LPCXSTR lpszClientID
XCHAR tszSSrcStr[128] = {};
_xstprintf(tszSSrcStr, _X("2124085006"));
- //BaseLib_OperatorHandle_CreateStr(tszSSrcStr, 8, 1);
+ //BaseLib_Handle_CreateStr(tszSSrcStr, 8, 1);
SDPProtocol_Packet_CName(xhPacket, _ttxoll(tszSSrcStr), _X("79a9722580589zr5"), _X("audio-23z8fj2g"));
ModuleSession_PullStream_RTCSSrcSet(lpszClientID, tszSSrcStr, _X("79a9722580589zr5"), _X("audio-23z8fj2g"), false);
RTPProtocol_Packet_Insert(tszSSrcStr, ENUM_STREAMMEDIA_RTPPROTOCOL_PAYLOAD_TYPE_AAC);
RTPProtocol_Packet_SetPType(tszSSrcStr, nAVIndex);
}
SDPProtocol_Packet_OptionalCandidate(xhPacket, st_ServiceConfig.tszIPAddr, st_ServiceConfig.nRTCPort);
- BaseLib_OperatorMemory_Free((XPPPMEM)&pptszAVList, 1);
+ BaseLib_Memory_Free((XPPPMEM)&pptszAVList, 1);
return true;
}
bool PullStream_ClientWebRtc_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer, int nMsgLen)
@@ -237,9 +237,9 @@ bool PullStream_ClientWebRtc_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam,
st_HDRParam.bIsClose = true; //收到回复后就关闭
XCHAR tszSMSAddr[128] = {};
- BaseLib_OperatorString_GetStartEnd(pSt_HTTPParam->tszHttpUri, tszSMSAddr, _X("app="), _X("&"));
+ BaseLib_String_GetStartEnd(pSt_HTTPParam->tszHttpUri, tszSMSAddr, _X("app="), _X("&"));
_tcsxcat(tszSMSAddr, _X("/"));
- BaseLib_OperatorString_GetStartEnd(pSt_HTTPParam->tszHttpUri, tszSMSAddr + _tcsxlen(tszSMSAddr), _X("stream="), NULL);
+ BaseLib_String_GetStartEnd(pSt_HTTPParam->tszHttpUri, tszSMSAddr + _tcsxlen(tszSMSAddr), _X("stream="), NULL);
//查找流是否存在
XCHAR tszPushAddr[128] = {};
XENGINE_PROTOCOL_AVINFO st_AVInfo = {};
@@ -323,7 +323,7 @@ bool PullStream_ClientWebRtc_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam,
}
SDPProtocol_Parse_Destory(xhParse);
- BaseLib_OperatorMemory_Free((XPPPMEM)&ppSt_ListAttr, nListCount);
+ BaseLib_Memory_Free((XPPPMEM)&ppSt_ListAttr, nListCount);
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("WEBRTC:%s,请求的SDP信息属性解析完毕,总共解析了:%d 个属性"), lpszClientAddr, nListCount);
SDPProtocol_Packet_Create(&xhPacket);
@@ -346,7 +346,7 @@ bool PullStream_ClientWebRtc_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam,
XCHAR tszHDRStr[MAX_PATH] = {};
XCHAR tszUserStr[MAX_PATH] = {};
- BaseLib_OperatorHandle_CreateStr(tszTokenStr, 10);
+ BaseLib_Handle_CreateStr(tszTokenStr, 10);
_xstprintf(tszUserStr, _X("%s:%s"), st_ServiceConfig.st_XPull.st_PullWebRtc.tszICEUser, tszICEUser);
_xstprintf(tszHDRStr, _X("Location: /rtc/v1/whip/?action=delete&token=%s&app=live&stream=livestream.flv&session=%s\r\n"), tszTokenStr, tszUserStr);
diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PushStream/PushStream_JT1078Task.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PushStream/PushStream_JT1078Task.cpp
index 9e9d1f2..11dfa7b 100644
--- a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PushStream/PushStream_JT1078Task.cpp
+++ b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PushStream/PushStream_JT1078Task.cpp
@@ -37,11 +37,11 @@ XHTHREAD CALLBACK PushStream_JT1078Task_Thread(XPVOID lParam)
if (HelpComponents_PKTCustom_GetMemoryEx(xhJT1078Pkt, ppSt_PacketClient[i]->hSocket, &ptszMsgBuffer, &nMsgLen, tszHdrBuffer, &nHDRLen))
{
PushStream_JT1078Task_Handle(ppSt_PacketClient[i]->hSocket, ptszMsgBuffer, nMsgLen, tszHdrBuffer, nHDRLen);
- BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
+ BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
}
}
}
- BaseLib_OperatorMemory_Free((XPPPMEM)&ppSt_PacketClient, nListCount);
+ BaseLib_Memory_Free((XPPPMEM)&ppSt_PacketClient, nListCount);
}
return 0;
}
@@ -109,7 +109,7 @@ bool PushStream_JT1078Task_Handle(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer,
if (nMLen > 0)
{
XEngine_AVPacket_AVHdr(lpszClientAddr, ptszMsgBuffer, nMLen, 1, ENUM_XENGINE_STREAMMEDIA_CLIENT_TYPE_PUSH_JT1078);
- BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
+ BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
}
}
}
diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PushStream/PushStream_RTMPTask.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PushStream/PushStream_RTMPTask.cpp
index 489b210..71ab898 100644
--- a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PushStream/PushStream_RTMPTask.cpp
+++ b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PushStream/PushStream_RTMPTask.cpp
@@ -40,11 +40,11 @@ XHTHREAD CALLBACK PushStream_RTMPTask_Thread(XPVOID lParam)
//在另外一个函数里面处理数据
PushStream_RTMPTask_Handle(&st_RTMPHdr, ppSst_ListAddr[i]->tszClientAddr, ptszMsgBuffer, nMsgLen);
//释放内存
- BaseLib_OperatorMemory_FreeCStyle((VOID**)&ptszMsgBuffer);
+ BaseLib_Memory_FreeCStyle((VOID**)&ptszMsgBuffer);
}
}
}
- BaseLib_OperatorMemory_Free((XPPPMEM)&ppSst_ListAddr, nListCount);
+ BaseLib_Memory_Free((XPPPMEM)&ppSst_ListAddr, nListCount);
}
return 0;
}
@@ -124,62 +124,62 @@ bool PushStream_RTMPTask_Handle(XENGINE_RTMPHDR* pSt_RTMPHdr, LPCXSTR lpszClient
st_AVInfo.st_AudioInfo.bEnable = true;
if (0 == _tcsxnicmp("duration", st_RTMPData.ppSt_CMDProperty[i]->tszKeyBuffer, _tcsxlen(st_RTMPData.ppSt_CMDProperty[i]->tszKeyBuffer)))
{
- BaseLib_OperatorEndain_ToR64Hex(st_RTMPData.ppSt_CMDProperty[i]->st_CMDOBJect.tszMsgBuffer, (__int64u*)&dlValue, true);
+ APIHelp_Endain_ToR64Hex(st_RTMPData.ppSt_CMDProperty[i]->st_CMDOBJect.tszMsgBuffer, (__int64u*)&dlValue, true);
st_AVInfo.dlTime = dlValue;
}
else if (0 == _tcsxnicmp("fileSize", st_RTMPData.ppSt_CMDProperty[i]->tszKeyBuffer, _tcsxlen(st_RTMPData.ppSt_CMDProperty[i]->tszKeyBuffer)))
{
- BaseLib_OperatorEndain_ToR64Hex(st_RTMPData.ppSt_CMDProperty[i]->st_CMDOBJect.tszMsgBuffer, (__int64u*)&dlValue, true);
+ APIHelp_Endain_ToR64Hex(st_RTMPData.ppSt_CMDProperty[i]->st_CMDOBJect.tszMsgBuffer, (__int64u*)&dlValue, true);
st_AVInfo.nSize = (__int64x)dlValue;
}
else if (0 == _tcsxnicmp("width", st_RTMPData.ppSt_CMDProperty[i]->tszKeyBuffer, _tcsxlen(st_RTMPData.ppSt_CMDProperty[i]->tszKeyBuffer)))
{
- BaseLib_OperatorEndain_ToR64Hex(st_RTMPData.ppSt_CMDProperty[i]->st_CMDOBJect.tszMsgBuffer, (__int64u*)&dlValue, true);
+ APIHelp_Endain_ToR64Hex(st_RTMPData.ppSt_CMDProperty[i]->st_CMDOBJect.tszMsgBuffer, (__int64u*)&dlValue, true);
st_AVInfo.st_VideoInfo.nWidth = (int)dlValue;
}
else if (0 == _tcsxnicmp("height", st_RTMPData.ppSt_CMDProperty[i]->tszKeyBuffer, _tcsxlen(st_RTMPData.ppSt_CMDProperty[i]->tszKeyBuffer)))
{
- BaseLib_OperatorEndain_ToR64Hex(st_RTMPData.ppSt_CMDProperty[i]->st_CMDOBJect.tszMsgBuffer, (__int64u*)&dlValue, true);
+ APIHelp_Endain_ToR64Hex(st_RTMPData.ppSt_CMDProperty[i]->st_CMDOBJect.tszMsgBuffer, (__int64u*)&dlValue, true);
st_AVInfo.st_VideoInfo.nHeight = (int)dlValue;
}
else if (0 == _tcsxnicmp("videocodecid", st_RTMPData.ppSt_CMDProperty[i]->tszKeyBuffer, _tcsxlen(st_RTMPData.ppSt_CMDProperty[i]->tszKeyBuffer)))
{
- BaseLib_OperatorEndain_ToR64Hex(st_RTMPData.ppSt_CMDProperty[i]->st_CMDOBJect.tszMsgBuffer, (__int64u*)&dlValue, true);
+ APIHelp_Endain_ToR64Hex(st_RTMPData.ppSt_CMDProperty[i]->st_CMDOBJect.tszMsgBuffer, (__int64u*)&dlValue, true);
st_AVInfo.st_VideoInfo.enAVCodec = (int)dlValue;
}
else if (0 == _tcsxnicmp("videodatarate", st_RTMPData.ppSt_CMDProperty[i]->tszKeyBuffer, _tcsxlen(st_RTMPData.ppSt_CMDProperty[i]->tszKeyBuffer)))
{
- BaseLib_OperatorEndain_ToR64Hex(st_RTMPData.ppSt_CMDProperty[i]->st_CMDOBJect.tszMsgBuffer, (__int64u*)&dlValue, true);
+ APIHelp_Endain_ToR64Hex(st_RTMPData.ppSt_CMDProperty[i]->st_CMDOBJect.tszMsgBuffer, (__int64u*)&dlValue, true);
st_AVInfo.st_VideoInfo.nBitRate = (__int64x)dlValue;
}
else if (0 == _tcsxnicmp("framerate", st_RTMPData.ppSt_CMDProperty[i]->tszKeyBuffer, _tcsxlen(st_RTMPData.ppSt_CMDProperty[i]->tszKeyBuffer)))
{
- BaseLib_OperatorEndain_ToR64Hex(st_RTMPData.ppSt_CMDProperty[i]->st_CMDOBJect.tszMsgBuffer, (__int64u*)&dlValue, true);
+ APIHelp_Endain_ToR64Hex(st_RTMPData.ppSt_CMDProperty[i]->st_CMDOBJect.tszMsgBuffer, (__int64u*)&dlValue, true);
st_AVInfo.st_VideoInfo.nFrameRate = (int)dlValue;
}
else if (0 == _tcsxnicmp("audiocodecid", st_RTMPData.ppSt_CMDProperty[i]->tszKeyBuffer, _tcsxlen(st_RTMPData.ppSt_CMDProperty[i]->tszKeyBuffer)))
{
- BaseLib_OperatorEndain_ToR64Hex(st_RTMPData.ppSt_CMDProperty[i]->st_CMDOBJect.tszMsgBuffer, (__int64u*)&dlValue, true);
+ APIHelp_Endain_ToR64Hex(st_RTMPData.ppSt_CMDProperty[i]->st_CMDOBJect.tszMsgBuffer, (__int64u*)&dlValue, true);
st_AVInfo.st_AudioInfo.enAVCodec = (int)dlValue;
}
else if (0 == _tcsxnicmp("audiodatarate", st_RTMPData.ppSt_CMDProperty[i]->tszKeyBuffer, _tcsxlen(st_RTMPData.ppSt_CMDProperty[i]->tszKeyBuffer)))
{
- BaseLib_OperatorEndain_ToR64Hex(st_RTMPData.ppSt_CMDProperty[i]->st_CMDOBJect.tszMsgBuffer, (__int64u*)&dlValue, true);
+ APIHelp_Endain_ToR64Hex(st_RTMPData.ppSt_CMDProperty[i]->st_CMDOBJect.tszMsgBuffer, (__int64u*)&dlValue, true);
st_AVInfo.st_AudioInfo.nBitRate = (__int64x)dlValue;
}
else if (0 == _tcsxnicmp("audiosamplerate", st_RTMPData.ppSt_CMDProperty[i]->tszKeyBuffer, _tcsxlen(st_RTMPData.ppSt_CMDProperty[i]->tszKeyBuffer)))
{
- BaseLib_OperatorEndain_ToR64Hex(st_RTMPData.ppSt_CMDProperty[i]->st_CMDOBJect.tszMsgBuffer, (__int64u*)&dlValue, true);
+ APIHelp_Endain_ToR64Hex(st_RTMPData.ppSt_CMDProperty[i]->st_CMDOBJect.tszMsgBuffer, (__int64u*)&dlValue, true);
st_AVInfo.st_AudioInfo.nSampleRate = (int)dlValue;
}
else if (0 == _tcsxnicmp("audiosamplesize", st_RTMPData.ppSt_CMDProperty[i]->tszKeyBuffer, _tcsxlen(st_RTMPData.ppSt_CMDProperty[i]->tszKeyBuffer)))
{
- BaseLib_OperatorEndain_ToR64Hex(st_RTMPData.ppSt_CMDProperty[i]->st_CMDOBJect.tszMsgBuffer, (__int64u*)&dlValue, true);
+ APIHelp_Endain_ToR64Hex(st_RTMPData.ppSt_CMDProperty[i]->st_CMDOBJect.tszMsgBuffer, (__int64u*)&dlValue, true);
st_AVInfo.st_AudioInfo.nSampleFmt = (int)dlValue;
}
else if (0 == _tcsxnicmp("audiochannels", st_RTMPData.ppSt_CMDProperty[i]->tszKeyBuffer, _tcsxlen(st_RTMPData.ppSt_CMDProperty[i]->tszKeyBuffer)))
{
- BaseLib_OperatorEndain_ToR64Hex(st_RTMPData.ppSt_CMDProperty[i]->st_CMDOBJect.tszMsgBuffer, (__int64u*)&dlValue, true);
+ APIHelp_Endain_ToR64Hex(st_RTMPData.ppSt_CMDProperty[i]->st_CMDOBJect.tszMsgBuffer, (__int64u*)&dlValue, true);
st_AVInfo.st_AudioInfo.nChannel = (int)dlValue;
}
//XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("RTMP推流端:%s,请求数据协议解析成功,数据列表个数:%d,索引:%d,名称:%s"), lpszClientAddr, st_RTMPData.nCount, i, st_RTMPData.ppSt_CMDProperty[i]->tszKeyBuffer);
@@ -187,7 +187,7 @@ bool PushStream_RTMPTask_Handle(XENGINE_RTMPHDR* pSt_RTMPHdr, LPCXSTR lpszClient
_tcsxcpy(st_AVInfo.tszPktName, "Lavf59.27.100");
XEngine_AVPacket_AVSetTime(lpszClientAddr, st_AVInfo.st_VideoInfo.nFrameRate, st_AVInfo.st_AudioInfo.nSampleRate);
ModuleSession_PushStream_SetAVInfo(lpszClientAddr, &st_AVInfo);
- BaseLib_OperatorMemory_Free((XPPPMEM)&st_RTMPData.ppSt_CMDProperty, st_RTMPData.nCount);
+ BaseLib_Memory_Free((XPPPMEM)&st_RTMPData.ppSt_CMDProperty, st_RTMPData.nCount);
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("RTMP推流端:%s,请求数据协议解析成功,数据列表个数:%d"), lpszClientAddr, st_RTMPData.nCount);
}
else if (XENGINE_STREAMMEDIA_RTMP_MSGTYPE_COMMAND == pSt_RTMPHdr->byTypeID)
@@ -215,11 +215,11 @@ bool PushStream_RTMPTask_Handle(XENGINE_RTMPHDR* pSt_RTMPHdr, LPCXSTR lpszClient
memset(tszSMSAddr, '\0', sizeof(tszSMSAddr));
_xstprintf(tszSMSAddr, _X("%s/%s"), st_RTMPCommand.ppSt_CMDObject[1]->tszMsgBuffer, st_RTMPCommand.ppSt_CMDObject[0]->tszMsgBuffer);
- BaseLib_OperatorMemory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDProperty, st_RTMPCommand.nProCount);
- BaseLib_OperatorMemory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDObject, st_RTMPCommand.nObCount);
+ BaseLib_Memory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDProperty, st_RTMPCommand.nProCount);
+ BaseLib_Memory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDObject, st_RTMPCommand.nObCount);
st_RTMPCommand.nObCount = 0;
st_RTMPCommand.nProCount = 2;
- BaseLib_OperatorMemory_Malloc((XPPPMEM)&st_RTMPCommand.ppSt_CMDProperty, st_RTMPCommand.nProCount, sizeof(XENGINE_RTMPCMDPROPERTY));
+ BaseLib_Memory_Malloc((XPPPMEM)&st_RTMPCommand.ppSt_CMDProperty, st_RTMPCommand.nProCount, sizeof(XENGINE_RTMPCMDPROPERTY));
st_RTMPCommand.nCMDId = 0;
strcpy(st_RTMPCommand.tszCMDName, XENGINE_STREAMMEDIA_RTMP_COMMAND_ONPUBLISH);
@@ -241,14 +241,14 @@ bool PushStream_RTMPTask_Handle(XENGINE_RTMPHDR* pSt_RTMPHdr, LPCXSTR lpszClient
ModuleSession_PushStream_Create(lpszClientAddr, tszSMSAddr, ENUM_XENGINE_STREAMMEDIA_CLIENT_TYPE_PUSH_RTMP);
XEngine_AVPacket_AVCreate(lpszClientAddr);
//释放内存
- BaseLib_OperatorMemory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDProperty, st_RTMPCommand.nProCount);
- BaseLib_OperatorMemory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDObject, st_RTMPCommand.nObCount);
+ BaseLib_Memory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDProperty, st_RTMPCommand.nProCount);
+ BaseLib_Memory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDObject, st_RTMPCommand.nObCount);
memset(st_RTMPCommand.tszCMDName, '\0', sizeof(st_RTMPCommand.tszCMDName));
st_RTMPCommand.nProCount = 0;
st_RTMPCommand.nObCount = 0;
//准备返回数据
st_RTMPCommand.nProCount = 4;
- BaseLib_OperatorMemory_Malloc((XPPPMEM)&st_RTMPCommand.ppSt_CMDProperty, st_RTMPCommand.nProCount, sizeof(XENGINE_RTMPCMDPROPERTY));
+ BaseLib_Memory_Malloc((XPPPMEM)&st_RTMPCommand.ppSt_CMDProperty, st_RTMPCommand.nProCount, sizeof(XENGINE_RTMPCMDPROPERTY));
strcpy(st_RTMPCommand.tszCMDName, XENGINE_STREAMMEDIA_RTMP_COMMAND_ONSTATUS);
@@ -277,11 +277,11 @@ bool PushStream_RTMPTask_Handle(XENGINE_RTMPHDR* pSt_RTMPHdr, LPCXSTR lpszClient
}
else if (0 == _tcsxnicmp(XENGINE_STREAMMEDIA_RTMP_COMMAND_CREATE, st_RTMPCommand.tszCMDName, strlen(XENGINE_STREAMMEDIA_RTMP_COMMAND_CREATE)))
{
- BaseLib_OperatorMemory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDProperty, st_RTMPCommand.nProCount);
- BaseLib_OperatorMemory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDObject, st_RTMPCommand.nObCount);
+ BaseLib_Memory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDProperty, st_RTMPCommand.nProCount);
+ BaseLib_Memory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDObject, st_RTMPCommand.nObCount);
st_RTMPCommand.nObCount = 1;
- BaseLib_OperatorMemory_Malloc((XPPPMEM)&st_RTMPCommand.ppSt_CMDObject, st_RTMPCommand.nObCount, sizeof(XENGINE_RTMPCMDOBJECT));
+ BaseLib_Memory_Malloc((XPPPMEM)&st_RTMPCommand.ppSt_CMDObject, st_RTMPCommand.nObCount, sizeof(XENGINE_RTMPCMDOBJECT));
strcpy(st_RTMPCommand.tszCMDName, XENGINE_STREAMMEDIA_RTMP_COMMAND_RESULT);
@@ -295,8 +295,8 @@ bool PushStream_RTMPTask_Handle(XENGINE_RTMPHDR* pSt_RTMPHdr, LPCXSTR lpszClient
}
else if (0 == _tcsxnicmp(XENGINE_STREAMMEDIA_RTMP_COMMAND_UNPUBLISH, st_RTMPCommand.tszCMDName, strlen(XENGINE_STREAMMEDIA_RTMP_COMMAND_UNPUBLISH)))
{
- BaseLib_OperatorMemory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDProperty, st_RTMPCommand.nProCount);
- BaseLib_OperatorMemory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDObject, st_RTMPCommand.nObCount);
+ BaseLib_Memory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDProperty, st_RTMPCommand.nProCount);
+ BaseLib_Memory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDObject, st_RTMPCommand.nObCount);
st_RTMPCommand.nProCount = 0;
st_RTMPCommand.nObCount = 0;
RTMPProtocol_Help_PKTCommand(ptszSDBuffer, &nSDLen, 5, &st_RTMPCommand);
@@ -312,8 +312,8 @@ bool PushStream_RTMPTask_Handle(XENGINE_RTMPHDR* pSt_RTMPHdr, LPCXSTR lpszClient
}
}
- BaseLib_OperatorMemory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDProperty, st_RTMPCommand.nProCount);
- BaseLib_OperatorMemory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDObject, st_RTMPCommand.nObCount);
+ BaseLib_Memory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDProperty, st_RTMPCommand.nProCount);
+ BaseLib_Memory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDObject, st_RTMPCommand.nObCount);
st_RTMPCommand.nProCount = 0;
st_RTMPCommand.nObCount = 0;
memset(st_RTMPCommand.tszCMDName, '\0', sizeof(st_RTMPCommand.tszCMDName));
@@ -344,8 +344,8 @@ bool PushStream_RTMPTask_Handle(XENGINE_RTMPHDR* pSt_RTMPHdr, LPCXSTR lpszClient
ModuleHelp_Rtmp_GetSession(lpszClientAddr, tszLiveName);
_xstprintf(tszSMSAddr, _X("%s/%s"), tszLiveName, st_RTMPCommand.ppSt_CMDObject[0]->tszMsgBuffer);
- BaseLib_OperatorMemory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDProperty, st_RTMPCommand.nProCount);
- BaseLib_OperatorMemory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDObject, st_RTMPCommand.nObCount);
+ BaseLib_Memory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDProperty, st_RTMPCommand.nProCount);
+ BaseLib_Memory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDObject, st_RTMPCommand.nObCount);
memset(st_RTMPCommand.tszCMDName, '\0', sizeof(st_RTMPCommand.tszCMDName));
st_RTMPCommand.nProCount = 0;
st_RTMPCommand.nObCount = 0;
@@ -360,7 +360,7 @@ bool PushStream_RTMPTask_Handle(XENGINE_RTMPHDR* pSt_RTMPHdr, LPCXSTR lpszClient
XEngine_Network_Send(lpszClientAddr, ptszSDBuffer, nSDLen, ENUM_XENGINE_STREAMMEDIA_CLIENT_TYPE_PUSH_RTMP);
//状态,有没有这个流
st_RTMPCommand.nProCount = 3;
- BaseLib_OperatorMemory_Malloc((XPPPMEM)&st_RTMPCommand.ppSt_CMDProperty, st_RTMPCommand.nProCount, sizeof(XENGINE_RTMPCMDPROPERTY));
+ BaseLib_Memory_Malloc((XPPPMEM)&st_RTMPCommand.ppSt_CMDProperty, st_RTMPCommand.nProCount, sizeof(XENGINE_RTMPCMDPROPERTY));
strcpy(st_RTMPCommand.tszCMDName, XENGINE_STREAMMEDIA_RTMP_COMMAND_ONSTATUS);
@@ -414,8 +414,8 @@ bool PushStream_RTMPTask_Handle(XENGINE_RTMPHDR* pSt_RTMPHdr, LPCXSTR lpszClient
}
else
{
- BaseLib_OperatorMemory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDProperty, st_RTMPCommand.nProCount);
- BaseLib_OperatorMemory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDObject, st_RTMPCommand.nObCount);
+ BaseLib_Memory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDProperty, st_RTMPCommand.nProCount);
+ BaseLib_Memory_Free((XPPPMEM)&st_RTMPCommand.ppSt_CMDObject, st_RTMPCommand.nObCount);
memset(st_RTMPCommand.tszCMDName, '\0', sizeof(st_RTMPCommand.tszCMDName));
st_RTMPCommand.nProCount = 0;
st_RTMPCommand.nObCount = 0;
diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PushStream/PushStream_SrtTask.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PushStream/PushStream_SrtTask.cpp
index 121be4a..d235a30 100644
--- a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PushStream/PushStream_SrtTask.cpp
+++ b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PushStream/PushStream_SrtTask.cpp
@@ -91,7 +91,7 @@ XHTHREAD CALLBACK PushStream_SRTTask_Thread(XPVOID lParam)
}
}
}
- BaseLib_OperatorMemory_Free((XPPPMEM)&ppSst_ListAddr, nListCount);
+ BaseLib_Memory_Free((XPPPMEM)&ppSst_ListAddr, nListCount);
}
free(ptszMsgBuffer);
ptszMsgBuffer = NULL;
diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PushStream/PushStream_XStreamTask.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PushStream/PushStream_XStreamTask.cpp
index ff689e9..4f170ea 100644
--- a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PushStream/PushStream_XStreamTask.cpp
+++ b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/StreamMedia_PushStream/PushStream_XStreamTask.cpp
@@ -41,11 +41,11 @@ XHTHREAD CALLBACK PushStream_XStreamTask_Thread(XPVOID lParam)
//在另外一个函数里面处理数据
PushStream_XStreamTask_Handle(&st_ProtocolHdr, ppSst_ListAddr[i]->tszClientAddr, ptszMsgBuffer, nMsgLen);
//释放内存
- BaseLib_OperatorMemory_FreeCStyle((VOID**)&ptszMsgBuffer);
+ BaseLib_Memory_FreeCStyle((VOID**)&ptszMsgBuffer);
}
}
}
- BaseLib_OperatorMemory_Free((XPPPMEM)&ppSst_ListAddr, nListCount);
+ BaseLib_Memory_Free((XPPPMEM)&ppSst_ListAddr, nListCount);
}
return 0;
}
diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_AVPacket.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_AVPacket.cpp
index a59b8b2..9dce294 100644
--- a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_AVPacket.cpp
+++ b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_AVPacket.cpp
@@ -459,7 +459,7 @@ bool XEngine_AVPacket_AVFrame(XCHAR* ptszSDBuffer, int* pInt_SDLen, XCHAR* ptszR
ModuleSession_PushStream_HLSGetFile(lpszClientAddr, tszHLSFile);
ModuleSession_PushStream_HLSClose(lpszClientAddr, &xhSubFile);
- BaseLib_OperatorString_GetSeparatorStr(tszHLSFile, _X("/"), tszFile, 2, false);
+ BaseLib_String_GetSeparatorStr(tszHLSFile, _X("/"), tszFile, 2, false);
HLSProtocol_M3u8Packet_AddFile(xhHLSFile, xhSubFile, tszFile, double(nCalValue), false);
//打开新的
#ifdef _MSC_BUILD
@@ -545,7 +545,7 @@ bool XEngine_AVPacket_AVFrame(XCHAR* ptszSDBuffer, int* pInt_SDLen, XCHAR* ptszR
NetCore_UDPXCore_SendEx(xhARTPSocket, tszADDRStr, ppSt_RTPPacket[i]->tszMsgBuffer, ppSt_RTPPacket[i]->nMsgLen);
}
}
- BaseLib_OperatorMemory_Free((XPPPMEM)&ppSt_RTPPacket, nPacketCount);
+ BaseLib_Memory_Free((XPPPMEM)&ppSt_RTPPacket, nPacketCount);
}
}
}
@@ -586,7 +586,7 @@ bool XEngine_AVPacket_AVFrame(XCHAR* ptszSDBuffer, int* pInt_SDLen, XCHAR* ptszR
}
*/
}
- BaseLib_OperatorMemory_Free((XPPPMEM)&ppSt_RTPPacket, nPacketCount);
+ BaseLib_Memory_Free((XPPPMEM)&ppSt_RTPPacket, nPacketCount);
}
}
}
diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_Hdr.h b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_Hdr.h
index 5c77f7f..326061b 100644
--- a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_Hdr.h
+++ b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_Hdr.h
@@ -5,12 +5,14 @@
#include
#include
#include
+#include
#include
#include
#include
#ifdef _MSC_BUILD
#include
#include
+#include
#else
#include
#include
@@ -27,10 +29,14 @@ using namespace std;
#include
#include
#include
-#include
-#include
+#include
+#include
#include
#include
+#include
+#include
+#include
+#include
#include
#include
#include
@@ -177,8 +183,10 @@ extern FILE* pSt_AFile;
#pragma comment(lib,"XEngine_BaseLib/XEngine_BaseLib.lib")
#pragma comment(lib,"XEngine_Core/XEngine_Core.lib")
#pragma comment(lib,"XEngine_Core/XEngine_ManagePool.lib")
-#pragma comment(lib,"XEngine_Core/XEngine_OPenSsl.lib")
+#pragma comment(lib,"XEngine_Core/XEngine_Cryption.lib")
#pragma comment(lib,"XEngine_NetHelp/NetHelp_XSocket.lib")
+#pragma comment(lib,"XEngine_NetHelp/NetHelp_APIHelp.lib")
+#pragma comment(lib,"XEngine_NetHelp/NetHelp_APIAddr.lib")
#pragma comment(lib,"XEngine_HelpComponents/HelpComponents_XLog.lib")
#pragma comment(lib,"XEngine_HelpComponents/HelpComponents_Packets")
#pragma comment(lib,"XEngine_RfcComponents/RfcComponents_HttpProtocol.lib")
@@ -194,4 +202,5 @@ extern FILE* pSt_AFile;
#pragma comment(lib,"XEngine_AVCodec/XEngine_AudioCodec.lib")
#pragma comment(lib,"XEngine_SystemSdk/XEngine_SystemApi.lib")
#pragma comment(lib,"Ws2_32.lib")
+#pragma comment(lib,"Dbghelp.lib")
#endif
\ No newline at end of file
diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_HttpTask.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_HttpTask.cpp
index 9bb0e4c..936b328 100644
--- a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_HttpTask.cpp
+++ b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_HttpTask.cpp
@@ -46,12 +46,12 @@ XHTHREAD CALLBACK XEngine_HTTPTask_Thread(XPVOID lParam)
//在另外一个函数里面处理数据
XEngine_HTTPTask_Handle(&st_HTTPReqparam, ppSst_ListAddr[i]->tszClientAddr, ptszMsgBuffer, nMsgLen, &pptszListHdr, nHCount);
//释放内存
- BaseLib_OperatorMemory_FreeCStyle((VOID**)&ptszMsgBuffer);
- BaseLib_OperatorMemory_Free((XPPPMEM)&pptszListHdr, nHCount);
+ BaseLib_Memory_FreeCStyle((VOID**)&ptszMsgBuffer);
+ BaseLib_Memory_Free((XPPPMEM)&pptszListHdr, nHCount);
}
}
}
- BaseLib_OperatorMemory_Free((XPPPMEM)&ppSst_ListAddr, nListCount);
+ BaseLib_Memory_Free((XPPPMEM)&ppSst_ListAddr, nListCount);
}
return 0;
}
@@ -86,7 +86,7 @@ bool XEngine_HTTPTask_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LPCXSTR
ModuleProtocol_Packet_Comm(tszRVBuffer, &nRVLen, NULL, 400, "Bad Request,parament is incorrent");
HttpProtocol_Server_SendMsgEx(xhHttpPacket, tszSDBuffer, &nSDLen, &st_HDRParam, tszRVBuffer, nRVLen);
XEngine_Network_Send(lpszClientAddr, tszSDBuffer, nSDLen, ENUM_XENGINE_STREAMMEDIA_CLIENT_TYPE_HTTP);
- BaseLib_OperatorMemory_Free((XPPPMEM)&pptszList, nListCount);
+ BaseLib_Memory_Free((XPPPMEM)&pptszList, nListCount);
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("HTTP客户端:%s,发送的URL请求参数不正确:%s"), lpszClientAddr, pSt_HTTPParam->tszHttpUri);
return false;
}
@@ -105,7 +105,7 @@ bool XEngine_HTTPTask_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LPCXSTR
ModuleProtocol_Packet_Comm(tszRVBuffer, &nRVLen, NULL, 400, "Bad Request,parament is incorrent");
HttpProtocol_Server_SendMsgEx(xhHttpPacket, tszSDBuffer, &nSDLen, &st_HDRParam, tszRVBuffer, nRVLen);
XEngine_Network_Send(lpszClientAddr, tszSDBuffer, nSDLen, ENUM_XENGINE_STREAMMEDIA_CLIENT_TYPE_HTTP);
- BaseLib_OperatorMemory_Free((XPPPMEM)&pptszList, nListCount);
+ BaseLib_Memory_Free((XPPPMEM)&pptszList, nListCount);
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("HTTP客户端:%s,发送的URL请求参数不正确:%s"), lpszClientAddr, pSt_HTTPParam->tszHttpUri);
return false;
}
@@ -120,7 +120,7 @@ bool XEngine_HTTPTask_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LPCXSTR
else if (0 == _tcsxnicmp(lpszMethodGet, pSt_HTTPParam->tszHttpMethod, _tcsxlen(lpszMethodGet)))
{
//获得函数名
- BaseLib_OperatorString_GetKeyValue(pptszList[0], "=", tszKey, tszValue);
+ BaseLib_String_GetKeyValue(pptszList[0], "=", tszKey, tszValue);
//获得函数名
//http://app.xyry.org:5501/api?function=forward&url=http://app.xyry.org
@@ -145,7 +145,7 @@ bool XEngine_HTTPTask_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LPCXSTR
"Access-Control-Allow-Credentials: false\r\n"
"Access-Control-Request-Private-Network: true\r\n"
"Content-Length: 0\r\n"
- "Server: %s/V%s\r\n\r\n"), XENGINE_NAME_STR, BaseLib_OperatorVer_XNumberStr());
+ "Server: %s/V%s\r\n\r\n"), XENGINE_NAME_STR, BaseLib_Version_XNumberStr());
XEngine_Network_Send(lpszClientAddr, tszSDBuffer, nSDLen, ENUM_XENGINE_STREAMMEDIA_CLIENT_TYPE_HTTP);
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("HTTP接口:%s,请求OPTION方法成功"), lpszClientAddr);
@@ -155,6 +155,6 @@ bool XEngine_HTTPTask_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LPCXSTR
//可能是RTSP
PullStream_ClientRtsp_Handle(pSt_HTTPParam, lpszClientAddr, lpszMsgBuffer, nMsgLen, &pptszList, nListCount, ppptszHDRList, nHDRCount);
}
- BaseLib_OperatorMemory_Free((XPPPMEM)&pptszList, nListCount);
+ BaseLib_Memory_Free((XPPPMEM)&pptszList, nListCount);
return true;
}
\ No newline at end of file
diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_Network.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_Network.cpp
index 1195024..5321ec9 100644
--- a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_Network.cpp
+++ b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_Network.cpp
@@ -333,7 +333,7 @@ bool XEngine_Network_Send(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer, int nMs
int nPort = 0;
XCHAR tszIPPort[128] = {};
_tcsxcpy(tszIPPort, lpszClientAddr);
- BaseLib_OperatorIPAddr_SegAddr(tszIPPort, &nPort);
+ APIAddr_IPAddr_SegAddr(tszIPPort, &nPort);
if (!NetCore_UDPSelect_Send(xhRTCSocket, lpszMsgBuffer, nMsgLen, tszIPPort, nPort))
{
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("RTC服务端:%s,发送数据失败,大小:%d,错误:%lX"), lpszClientAddr, nMsgLen, NetCore_GetLastError());
diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_StreamMediaApp.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_StreamMediaApp.cpp
index 834b257..f28e027 100644
--- a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_StreamMediaApp.cpp
+++ b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_StreamMediaApp.cpp
@@ -71,7 +71,7 @@ void ServiceApp_Stop(int signo)
if (st_ServiceConfig.st_XPull.st_PullWebRtc.bEnable)
{
NetCore_UDPSelect_Stop(xhRTCSocket);
- OPenSsl_Server_StopEx(xhRTCSsl);
+ Cryption_Server_StopEx(xhRTCSsl);
}
//销毁心跳
SocketOpt_HeartBeat_DestoryEx(xhHttpHeart);
@@ -141,12 +141,47 @@ static int ServiceApp_Deamon()
#endif
return 0;
}
+#ifdef _MSC_BUILD
+LONG WINAPI Coredump_ExceptionFilter(EXCEPTION_POINTERS* pExceptionPointers)
+{
+ static int i = 0;
+ XCHAR tszFileStr[MAX_PATH] = {};
+ XCHAR tszTimeStr[128] = {};
+ BaseLib_Time_TimeToStr(tszTimeStr);
+ _xstprintf(tszFileStr, _X("./XEngine_Coredump/dumpfile_%s_%d.dmp"), tszTimeStr, i++);
+
+ XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_FATAL, _X("主程序:软件崩溃,写入dump:%s"), tszFileStr);
+
+ HANDLE hDumpFile = CreateFileA(tszFileStr, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+ if (INVALID_HANDLE_VALUE != hDumpFile)
+ {
+ MINIDUMP_EXCEPTION_INFORMATION st_DumpInfo = {};
+ st_DumpInfo.ExceptionPointers = pExceptionPointers;
+ st_DumpInfo.ThreadId = GetCurrentThreadId();
+ st_DumpInfo.ClientPointers = TRUE;
+
+ // 写入 dump 文件
+ MiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), hDumpFile, MiniDumpNormal, &st_DumpInfo, NULL, NULL);
+ CloseHandle(hDumpFile);
+ }
+ return EXCEPTION_EXECUTE_HANDLER;
+}
+#endif
int main(int argc, char** argv)
{
#ifdef _MSC_BUILD
WSADATA st_WSAData;
WSAStartup(MAKEWORD(2, 2), &st_WSAData);
+
+ SetUnhandledExceptionFilter(Coredump_ExceptionFilter);
+#ifndef _DEBUG
+ if (setlocale(LC_ALL, ".UTF8") == NULL)
+ {
+ fprintf(stderr, "Error setting locale.\n");
+ return 1;
+ }
+#endif
#endif
bIsRun = true;
int nRet = 0;
@@ -230,7 +265,7 @@ int main(int argc, char** argv)
NetCore_TCPXCore_RegisterCallBackEx(xhHttpSocket, Network_Callback_HttpLogin, Network_Callback_HttpRecv, Network_Callback_HttpLeave);
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,注册HTTP网络事件成功"));
//HTTP任务池
- BaseLib_OperatorMemory_Malloc((XPPPMEM)&ppSt_ListHTTPParam, st_ServiceConfig.st_XMax.nHTTPThread, sizeof(THREADPOOL_PARAMENT));
+ BaseLib_Memory_Malloc((XPPPMEM)&ppSt_ListHTTPParam, st_ServiceConfig.st_XMax.nHTTPThread, sizeof(THREADPOOL_PARAMENT));
for (int i = 0; i < st_ServiceConfig.st_XMax.nHTTPThread; i++)
{
int* pInt_Pos = new int;
@@ -289,7 +324,7 @@ int main(int argc, char** argv)
NetCore_TCPXCore_RegisterCallBackEx(xhXStreamSocket, Network_Callback_XStreamLogin, Network_Callback_XStreamRecv, Network_Callback_XStreamLeave);
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,注册XStream推流网络事件成功"));
//启动任务池
- BaseLib_OperatorMemory_Malloc((XPPPMEM)&ppSt_ListCenterParam, st_ServiceConfig.st_XMax.nXStreamThread, sizeof(THREADPOOL_PARAMENT));
+ BaseLib_Memory_Malloc((XPPPMEM)&ppSt_ListCenterParam, st_ServiceConfig.st_XMax.nXStreamThread, sizeof(THREADPOOL_PARAMENT));
for (int i = 0; i < st_ServiceConfig.st_XMax.nXStreamThread; i++)
{
int* pInt_Pos = new int;
@@ -344,7 +379,7 @@ int main(int argc, char** argv)
NetCore_TCPXCore_RegisterCallBackEx(xhRTMPSocket, Network_Callback_RTMPLogin, Network_Callback_RTMPRecv, Network_Callback_RTMPLeave);
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,注册RTMP端网络服务事件成功!"));
- BaseLib_OperatorMemory_Malloc((XPPPMEM)&ppSt_ListRTMPParam, st_ServiceConfig.st_XMax.nRTMPThread, sizeof(THREADPOOL_PARAMENT));
+ BaseLib_Memory_Malloc((XPPPMEM)&ppSt_ListRTMPParam, st_ServiceConfig.st_XMax.nRTMPThread, sizeof(THREADPOOL_PARAMENT));
for (int i = 0; i < st_ServiceConfig.st_XMax.nRTMPThread; i++)
{
int* pInt_Pos = new int;
@@ -404,7 +439,7 @@ int main(int argc, char** argv)
NetCore_TCPXCore_RegisterCallBackEx(xhJT1078Socket, Network_Callback_JT1078Login, Network_Callback_JT1078Recv, Network_Callback_JT1078Leave);
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,注册JT1078网络服务事件成功!"));
- BaseLib_OperatorMemory_Malloc((XPPPMEM)&ppSt_ListJT1078Param, st_ServiceConfig.st_XMax.nJT1078Thread, sizeof(THREADPOOL_PARAMENT));
+ BaseLib_Memory_Malloc((XPPPMEM)&ppSt_ListJT1078Param, st_ServiceConfig.st_XMax.nJT1078Thread, sizeof(THREADPOOL_PARAMENT));
for (int i = 0; i < st_ServiceConfig.st_XMax.nJT1078Thread; i++)
{
int* pInt_Pos = new int;
@@ -447,7 +482,7 @@ int main(int argc, char** argv)
}
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,初始化SRT端流包管理器成功,最大线程:%d"), st_ServiceConfig.st_XMax.nSRTThread);
- BaseLib_OperatorMemory_Malloc((XPPPMEM)&ppSt_ListSRTParam, st_ServiceConfig.st_XMax.nSRTThread, sizeof(THREADPOOL_PARAMENT));
+ BaseLib_Memory_Malloc((XPPPMEM)&ppSt_ListSRTParam, st_ServiceConfig.st_XMax.nSRTThread, sizeof(THREADPOOL_PARAMENT));
for (int i = 0; i < st_ServiceConfig.st_XMax.nSRTThread; i++)
{
int* pInt_Pos = new int;
@@ -529,13 +564,13 @@ int main(int argc, char** argv)
if (st_ServiceConfig.st_XPull.st_PullWebRtc.bEnable)
{
- xhRTCSsl = OPenSsl_Server_InitEx(st_ServiceConfig.st_XPull.st_PullWebRtc.tszCertStr, NULL, st_ServiceConfig.st_XPull.st_PullWebRtc.tszKeyStr, false, false, XENGINE_OPENSSL_PROTOCOL_DTL_SERVER);
+ xhRTCSsl = Cryption_Server_InitEx(st_ServiceConfig.st_XPull.st_PullWebRtc.tszCertStr, NULL, st_ServiceConfig.st_XPull.st_PullWebRtc.tszKeyStr, false, false, XENGINE_CRYPTION_PROTOCOL_DTL);
if (NULL == xhRTCSsl)
{
- XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,启动WEBRTC-DTLS安全网络,错误:%lX"), OPenSsl_GetLastError());
+ XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,启动WEBRTC-DTLS安全网络,错误:%lX"), Cryption_GetLastError());
goto XENGINE_SERVICEAPP_EXIT;
}
- OPenSsl_Server_ConfigEx(xhRTCSsl);
+ Cryption_Server_ConfigEx(xhRTCSsl);
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,加载RTC证书成功:%s,%s"), st_ServiceConfig.st_XPull.st_PullWebRtc.tszCertStr, st_ServiceConfig.st_XPull.st_PullWebRtc.tszKeyStr);
xhRTCSocket = NetCore_UDPSelect_Start(st_ServiceConfig.nRTCPort);
@@ -579,17 +614,10 @@ int main(int argc, char** argv)
//发送信息报告
if (st_ServiceConfig.st_XReport.bEnable && !bIsTest)
{
+ __int64x nTimeCount = 0;
if (InfoReport_APIMachine_Send(st_ServiceConfig.st_XReport.tszAPIUrl, st_ServiceConfig.st_XReport.tszServiceName))
{
- __int64x nTimeCount = 0;
- if (InfoReport_APIMachine_GetTime(st_ServiceConfig.st_XReport.tszAPIUrl, st_ServiceConfig.st_XReport.tszServiceName, &nTimeCount))
- {
- XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,启动信息报告给API服务器:%s 成功,报告次数:%lld"), st_ServiceConfig.st_XReport.tszAPIUrl, nTimeCount);
- }
- else
- {
- XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,启动信息报告给API服务器:%s 成功,获取报告次数失败,错误:%lX"), st_ServiceConfig.st_XReport.tszAPIUrl, InfoReport_GetLastError());
- }
+ XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,启动信息报告给API服务器:%s 成功,报告次数:%lld"), st_ServiceConfig.st_XReport.tszAPIUrl, nTimeCount);
}
else
{
@@ -602,7 +630,7 @@ int main(int argc, char** argv)
}
- XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("所有服务成功启动,服务运行中,XEngine版本:%s,服务版本:%s,发行次数;%d。。。"), BaseLib_OperatorVer_XNumberStr(), st_ServiceConfig.st_XVer.pStl_ListVer->front().c_str(), st_ServiceConfig.st_XVer.pStl_ListVer->size());
+ XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("所有服务成功启动,服务运行中,XEngine版本:%s,服务版本:%s,发行次数;%d。。。"), BaseLib_Version_XNumberStr(), st_ServiceConfig.st_XVer.pStl_ListVer->front().c_str(), st_ServiceConfig.st_XVer.pStl_ListVer->size());
while (true)
{
@@ -642,7 +670,7 @@ int main(int argc, char** argv)
if (st_ServiceConfig.st_XPull.st_PullWebRtc.bEnable)
{
NetCore_UDPSelect_Stop(xhRTCSocket);
- OPenSsl_Server_StopEx(xhRTCSsl);
+ Cryption_Server_StopEx(xhRTCSsl);
}
//销毁心跳
SocketOpt_HeartBeat_DestoryEx(xhHttpHeart);
diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_StreamMediaApp.vcxproj b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_StreamMediaApp.vcxproj
index 41be8ab..67d6625 100644
--- a/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_StreamMediaApp.vcxproj
+++ b/XEngine_Source/XEngine_ServiceApp/XEngine_StreamMediaApp/XEngine_StreamMediaApp.vcxproj
@@ -95,6 +95,8 @@
true
WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
true
+ stdcpp20
+ stdc17
Console
@@ -109,6 +111,9 @@
true
WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
true
+ /utf-8 %(AdditionalOptions)
+ stdcpp20
+ stdc17
Console
@@ -123,6 +128,8 @@
true
_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
true
+ stdcpp20
+ stdc17
Console
@@ -137,6 +144,9 @@
true
NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
true
+ /utf-8 %(AdditionalOptions)
+ stdcpp20
+ stdc17
Console