Skip to content

Commit

Permalink
update:example
Browse files Browse the repository at this point in the history
update:build workflows/msbuild.yml
  • Loading branch information
xengine-qyt committed Sep 29, 2024
1 parent 28904fd commit af4586e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 19 deletions.
17 changes: 3 additions & 14 deletions .github/workflows/msbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,13 @@ jobs:
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
shell: pwsh

- name: Set code page
run: chcp 65001
shell: pwsh

# 配置 MSBuild 的路径,准备构建 VC++ 项目
- 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 }} /p:AdditionalOptions="/utf-8"
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'
Expand All @@ -95,17 +91,10 @@ jobs:
- name: Conditional Step for x86 Debug
if: matrix.configuration == 'Debug' && matrix.platform == 'x86'
run: |
$VerbosePreference = 'Continue'
Write-Verbose "Running debug build"
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/
cd XEngine_Release
./VSCopy_x86.bat
try {
./XEngine_StreamMediaApp.exe -t
} catch {
Write-Error "Execution failed with error: $_"
}
shell: pwsh
./XEngine_StreamMediaApp.exe -t
shell: pwsh
8 changes: 4 additions & 4 deletions XEngine_APPClient/APPClient_WebRTC/APPClient_WebRTC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,9 @@ int main()
int nMSGLen = 0;
XSOCKET hSocket;
XCHAR tszMSGBuffer[2048] = {};
//LPCXSTR lpszAPIUrl = _X("http://127.0.0.1:5600/rtc/v1/whep/?app=live&stream=livestream");
LPCXSTR lpszAPIUrl = _X("http://127.0.0.1:5600/rtc/v1/whep/?app=live&stream=livestream");
//LPCXSTR lpszAPIUrl = _X("http://app.xyry.org:1985/rtc/v1/whep/?app=live&stream=livestream");
LPCXSTR lpszAPIUrl = _X("http://10.0.3.154:1985/rtc/v1/whep/?app=live&stream=livestream");
//LPCXSTR lpszAPIUrl = _X("http://10.0.3.154:1985/rtc/v1/whep/?app=live&stream=livestream");
LPCXSTR lpszFileCert = _X("");

APPClient_WEBRTC_SDPPacket(lpszAPIUrl, lpszFileCert, tszMSGBuffer, &nMSGLen);
Expand All @@ -374,9 +374,9 @@ int main()
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMSGBuffer);

XClient_UDPSelect_Create(&hSocket);
XClient_UDPSelect_Connect(hSocket, "10.0.3.154", 8000);
//XClient_UDPSelect_Connect(hSocket, "10.0.3.154", 8000);
//XClient_UDPSelect_Connect(hSocket, "43.139.170.67", 8000);
//XClient_UDPSelect_Connect(hSocket, "127.0.0.1", 5604);
XClient_UDPSelect_Connect(hSocket, "127.0.0.1", 5604);

std::thread pSTDThread_Stun(APPClient_WEBRTC_StunSend, hSocket, tszICEUser, tszICEPass);
pSTDThread_Stun.detach();
Expand Down
2 changes: 1 addition & 1 deletion XEngine_Source/XEngine_BuildSwitch.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
// History:
*********************************************************************/
#define _XENGINE_STREAMMEDIA_BUILDSWITCH_SRT 0 //SRT协议编译开关选项
#define _XENGINE_STREAMMEDIA_BUILDSWITCH_RTC 1 //WEBRTC协议编译开关选项
#define _XENGINE_STREAMMEDIA_BUILDSWITCH_RTC 0 //WEBRTC协议编译开关选项

0 comments on commit af4586e

Please sign in to comment.