Skip to content

Commit

Permalink
Fix signaling cache and GStreamer sample build on Windows (#1935)
Browse files Browse the repository at this point in the history
* fix readFile signaling cache windows

* fix branch name

* enable signaling api functionality tests on windows ci

* try install zlib

* zlib condition cmake

* fix file cachine tests on Windows +Gstreamer sample build

* filter failing signaling tests on Windows

* dummy commit

* strnlen

* cleanup
  • Loading branch information
niyatim23 authored Feb 27, 2024
1 parent 7c65136 commit 3ab921c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ jobs:
shell: powershell
run: |
$env:Path += ';C:\webrtc\open-source\bin;C:\tools\pthreads-w32-2-9-1-release\Pre-built.2\dll\x64;C:\webrtc\build'
& "C:\webrtc\build\tst\webrtc_client_test.exe" --gtest_filter="-DataChannelFunctionalityTest.*:DtlsApiTest.*:IceApiTest.*:IceFunctionalityTest.*:PeerConnectionFunctionalityTest.*:SignalingApiFunctionalityTest.*:TurnConnectionFunctionalityTest.*:RtpFunctionalityTest.marshallUnmarshallH264Data:RtpFunctionalityTest.packingUnpackingVerifySameH264Frame:RtcpFunctionalityTest.onRtcpPacketCompound:RtcpFunctionalityTest.twcc3"
& "C:\webrtc\build\tst\webrtc_client_test.exe" --gtest_filter="-SignalingApiFunctionalityTest.receivingIceConfigOffer_SlowClockSkew:SignalingApiFunctionalityTest.iceServerConfigRefreshConnectedAuthExpiration:SignalingApiFunctionalityTest.receivingIceConfigOffer_FastClockSkew:SignalingApiFunctionalityTest.receivingIceConfigOffer_FastClockSkew_VerifyOffsetRemovedWhenClockFixed:DataChannelFunctionalityTest.*:DtlsApiTest.*:IceApiTest.*:IceFunctionalityTest.*:PeerConnectionFunctionalityTest.*:TurnConnectionFunctionalityTest.*:RtpFunctionalityTest.marshallUnmarshallH264Data:RtpFunctionalityTest.packingUnpackingVerifySameH264Frame:RtcpFunctionalityTest.onRtcpPacketCompound:RtcpFunctionalityTest.twcc3"
# windows-msvc-mbedtls:
# runs-on: windows-2022
# env:
Expand Down
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,9 @@ endif()

if(BUILD_TEST)
# adding ZLIB because aws sdk static link seems to be broken when zlib is needed
find_package(ZLIB REQUIRED)
if(NOT WIN32)
find_package(ZLIB REQUIRED)
endif()
add_subdirectory(tst)
endif()

Expand Down
8 changes: 8 additions & 0 deletions samples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ project(KinesisVideoWebRTCClientSamples LANGUAGES C)

message("OPEN_SRC_INSTALL_PREFIX=${OPEN_SRC_INSTALL_PREFIX}")

if (WIN32)
if(EXISTS "C:\\gstreamer\\1.0\\x86_64\\bin\\pkg-config.exe")
set(PKG_CONFIG_EXECUTABLE "C:\\gstreamer\\1.0\\x86_64\\bin\\pkg-config.exe")
else()
set(PKG_CONFIG_EXECUTABLE "D:\\gstreamer\\1.0\\x86_64\\bin\\pkg-config.exe")
endif()
endif()

find_package(PkgConfig REQUIRED)

pkg_check_modules(GST gstreamer-1.0)
Expand Down
3 changes: 2 additions & 1 deletion src/source/Signaling/FileCache.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ STATUS deserializeSignalingCacheEntries(PCHAR cachedFileContent, UINT64 fileSize
pCurrent = cachedFileContent;
remainingSize = (UINT32) fileSize;
/* detect end of file */
while (remainingSize > MAX_SIGNALING_CACHE_ENTRY_TIMESTAMP_STR_LEN) {
while (STRNLEN(pCurrent, MAX_SERIALIZED_SIGNALING_CACHE_ENTRY_LEN * MAX_SIGNALING_CACHE_ENTRY_COUNT) > 0 &&
remainingSize > MAX_SIGNALING_CACHE_ENTRY_TIMESTAMP_STR_LEN) {
nextLine = STRCHR(pCurrent, '\n');
while ((nextToken = STRCHR(pCurrent, ',')) != NULL && nextToken < nextLine) {
switch (tokenCount % 10) {
Expand Down

0 comments on commit 3ab921c

Please sign in to comment.