Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.11.0 Release #2018

Merged
merged 22 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 22 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,22 @@ labels: ["bug", "needs-triage"]
assignees: []
body:
- type: checkboxes
id: confirm
attributes:
label: Please confirm you have already done the following
options:
- label: I have searched the repository for related/existing bug reports
- label: I have all the details the issue requires
validations:
required: true
- type: checkboxes
id: prompt
attributes:
label: Please answer the following prompt
options:
- label: This issue is replicable using the unmodified sample application
validations:
required: false
- type: textarea
id: description
attributes:
Expand All @@ -37,14 +46,20 @@ body:

Please include full errors, uncaught exceptions, stack traces, and relevant VERBOSE logs.
To get relevant VERBOSE logs from the SDK, you can retrieve by running `export AWS_KVS_LOG_LEVEL=1`

If you are reporting a memory leak, please provide sufficient evidence such as a `valgrind` output.
Note that the CI for this repository uses [Google Sanitizers](https://github.com/google/sanitizers) to minimize software issues and vulnerabilities.
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Reproduction Steps
description: |
Provide a self-contained, concise snippet of code that can be used to reproduce the issue.
Provide a self-contained, concise snippet of code that can be used to
reproduce the issue, or the command used to run the unmodified sample application. Please share
which SDK you are using as master and as viewer, and also any timing-related information, if
applicable.
For more complex issues provide a repo with the smallest sample that reproduces the bug.
Avoid including business logic or unrelated code, it makes diagnosis more difficult.
validations:
Expand All @@ -55,6 +70,12 @@ body:
label: WebRTC C SDK version being used
validations:
required: true
- type: input
id: sdk-previous-version
attributes:
label: If it was working in a previous version, which one?
validations:
required: false
- type: input
id: compiler-version
attributes:
Expand Down
18 changes: 0 additions & 18 deletions .github/ISSUE_TEMPLATE/questions-help.md

This file was deleted.

6 changes: 0 additions & 6 deletions .github/build_windows.bat

This file was deleted.

2 changes: 1 addition & 1 deletion .github/build_windows_openssl.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Buil
mkdir build
cd build
cmd.exe /c cmake -G "NMake Makefiles" ..
cmake -G "NMake Makefiles" -DBUILD_TEST=TRUE -DENABLE_AWS_SDK_IN_TESTS=OFF -DEXT_PTHREAD_INCLUDE_DIR="C:/tools/pthreads-w32-2-9-1-release/Pre-built.2/include/" -DEXT_PTHREAD_LIBRARIES="C:/tools/pthreads-w32-2-9-1-release/Pre-built.2/lib/x64/libpthreadGC2.a" ..
cmake -G "NMake Makefiles" -DBUILD_TEST=TRUE -DENABLE_AWS_SDK_IN_TESTS=OFF -DPKG_CONFIG_EXECUTABLE="D:\\gstreamer\\1.0\\x86_64\\bin\\pkg-config.exe" -DEXT_PTHREAD_INCLUDE_DIR="C:/tools/pthreads-w32-2-9-1-release/Pre-built.2/include/" -DEXT_PTHREAD_LIBRARIES="C:/tools/pthreads-w32-2-9-1-release/Pre-built.2/lib/x64/libpthreadGC2.a" ..
nmake
119 changes: 105 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- master
jobs:
clang-format-check:
runs-on: macos-11
runs-on: macos-12
steps:
- name: Clone repository
uses: actions/checkout@v3
Expand All @@ -23,7 +23,7 @@ jobs:
run: |
bash scripts/check-clang.sh
mac-os-build-clang:
runs-on: macos-11
runs-on: macos-12
env:
CC: /usr/bin/clang
CXX: /usr/bin/clang++
Expand All @@ -49,7 +49,7 @@ jobs:
cd build
./tst/webrtc_client_test
mac-os-build-gcc:
runs-on: macos-11
runs-on: macos-12
env:
CC: gcc
CXX: g++
Expand All @@ -74,8 +74,37 @@ jobs:
run: |
cd build
./tst/webrtc_client_test
mac-os-m1-build-clang:
runs-on: macos-13-xlarge
env:
AWS_KVS_LOG_LEVEL: 2
PKG_CONFIG_PATH: /usr/local/opt/pkgconfig
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Install dependencies
run: |
brew install gstreamer glib
- name: Build repository
run: |
brew unlink openssl
mkdir build && cd build
sh -c 'cmake .. -DBUILD_TEST=TRUE -DCMAKE_C_COMPILER=$(brew --prefix llvm@15)/bin/clang -DCMAKE_CXX_COMPILER=$(brew --prefix llvm@15)/bin/clang++'
make
- name: Run tests
run: |
cd build
./tst/webrtc_client_test
static-build-mac:
runs-on: macos-11
runs-on: macos-12
env:
AWS_KVS_LOG_LEVEL: 2
permissions:
Expand Down Expand Up @@ -137,7 +166,7 @@ jobs:
undefined-behavior-sanitizer:
runs-on: ubuntu-20.04
env:
UBSAN_OPTIONS: halt_on_error=1
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
CC: clang
CXX: clang++
AWS_KVS_LOG_LEVEL: 2
Expand Down Expand Up @@ -356,6 +385,39 @@ jobs:
run: |
cd build
timeout --signal=SIGABRT 60m ./tst/webrtc_client_test

mbedtls-ubuntu-gcc-4_4-build:
runs-on: ubuntu-20.04
env:
AWS_KVS_LOG_LEVEL: 2
CC: gcc-4.4
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Install deps
run: |
sudo apt clean && sudo apt update
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ trusty main'
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ trusty universe'
sudo apt-get -q update
sudo apt-get -y install gcc-4.4
sudo apt-get -y install gdb
- name: Build repository
run: |
mkdir build && cd build
cmake .. -DUSE_OPENSSL=OFF -DUSE_MBEDTLS=ON
make

mbedtls-ubuntu-clang:
runs-on: ubuntu-20.04
env:
Expand Down Expand Up @@ -391,27 +453,55 @@ jobs:
timeout --signal=SIGABRT 60m ./tst/webrtc_client_test
sample-check:
if: github.repository == 'awslabs/amazon-kinesis-video-streams-webrtc-sdk-c'
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
env:
AWS_KVS_LOG_LEVEL: 2
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}
role-duration-seconds: 10800
- name: Build repository
run: |
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
mkdir build && cd build
cmake ..
make
cd ..
- name: Sample check
run: |
./scripts/check-sample.sh
sample-check-no-data-channel:
if: github.repository == 'awslabs/amazon-kinesis-video-streams-webrtc-sdk-c'
runs-on: ubuntu-latest
env:
AWS_KVS_LOG_LEVEL: 2
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}
role-duration-seconds: 10800
- name: Build repository
run: |
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
mkdir build && cd build
cmake .. -DENABLE_DATA_CHANNEL=OFF
make
- name: Sample check without data channel
run: |
./scripts/check-sample.sh
ubuntu-os-build:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -466,8 +556,9 @@ jobs:
- name: Install dependencies
shell: powershell
run: |
choco install gstreamer --version=1.16.2
choco install gstreamer-devel --version=1.16.2
choco install pkgconfiglite
choco install gstreamer --version=1.16.3
choco install gstreamer-devel --version=1.16.3
curl.exe -o C:\tools\pthreads-w32-2-9-1-release.zip ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.zip
mkdir C:\tools\pthreads-w32-2-9-1-release\
Expand-Archive -Path C:\tools\pthreads-w32-2-9-1-release.zip -DestinationPath C:\tools\pthreads-w32-2-9-1-release
Expand All @@ -493,8 +584,8 @@ jobs:
- name: Run tests
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\tst\webrtc_client_test.exe" --gtest_filter="-DataChannelFunctionalityTest.*:IceApiTest.*:IceFunctionalityTest.*:PeerConnectionFunctionalityTest.*:SignalingApiFunctionalityTest.*:TurnConnectionFunctionalityTest.*:RtpFunctionalityTest.marshallUnmarshallH264Data:RtpFunctionalityTest.packingUnpackingVerifySameH264Frame:RtcpFunctionalityTest.onRtcpPacketCompound:RtcpFunctionalityTest.twcc3"
$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="-SignalingApiFunctionalityTest.receivingIceConfigOffer_SlowClockSkew:SignalingApiFunctionalityTest.iceServerConfigRefreshConnectedAuthExpiration:SignalingApiFunctionalityTest.receivingIceConfigOffer_FastClockSkew:SignalingApiFunctionalityTest.receivingIceConfigOffer_FastClockSkew_VerifyOffsetRemovedWhenClockFixed:DataChannelFunctionalityTest.*:DtlsApiTest.*:IceApiTest.*:IceFunctionalityTest.*:PeerConnectionFunctionalityTest.*:TurnConnectionFunctionalityTest.*:RtpFunctionalityTest.marshallUnmarshallH264Data:RtpFunctionalityTest.packingUnpackingVerifySameH264Frame:RtpFunctionalityTest.packingUnpackingVerifySameH265Frame:RtcpFunctionalityTest.onRtcpPacketCompound:RtcpFunctionalityTest.twcc3"
# windows-msvc-mbedtls:
# runs-on: windows-2022
# env:
Expand Down Expand Up @@ -576,4 +667,4 @@ jobs:
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
mkdir build && cd build
cmake .. -DBUILD_OPENSSL=TRUE -DBUILD_OPENSSL_PLATFORM=linux-generic32 -DBUILD_LIBSRTP_HOST_PLATFORM=x86_64-unknown-linux-gnu -DBUILD_LIBSRTP_DESTINATION_PLATFORM=arm-unknown-linux-uclibcgnueabi
make
make
1 change: 1 addition & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
runs-on: ubuntu-20.04
env:
AWS_KVS_LOG_LEVEL: 2
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
permissions:
id-token: write
contents: read
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: "CodeQL"
on:
push:
branches: [ develop, master ]

pull_request:
# The branches below must be a subset of the branches above
branches: [ develop, master ]
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/version-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Check Version Mismatch between PR branch and master.

on:
pull_request:
branches:
- master

jobs:
check-version:
runs-on: ubuntu-latest
steps:
- name: Checkout PR branch
uses: actions/checkout@v4

- name: Get version from PR
id: pr_version
run: |
PR_VERSION=$(grep -Po 'KinesisVideoWebRTCClient VERSION \K[0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt)
echo "PR_VERSION=$PR_VERSION" >> "$GITHUB_ENV"
echo "PR Version: $PR_VERSION"

- name: Checkout master branch
uses: actions/checkout@v4
with:
ref: master

- name: Get version from master
id: master_version
run: |
MASTER_VERSION=$(grep -Po 'KinesisVideoWebRTCClient VERSION \K[0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt)
echo "MASTER_VERSION=$MASTER_VERSION" >> "$GITHUB_ENV"
echo "Master version: $MASTER_VERSION"

- name: Compare versions
run: |
echo "Comparing PR Version: $PR_VERSION with Master Version: $MASTER_VERSION"
if [ "$MASTER_VERSION" == "$PR_VERSION" ]; then
echo "Please update the version in CMakeLists.txt file (project(KinesisVideoWebRTCClient VERSION <ver-string> LANGUAGES C). Any PR getting merged to master requires a version update"
exit 1
else
echo "Version update detected."
fi
4 changes: 2 additions & 2 deletions CMake/Dependencies/libawscpp-CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ include(ExternalProject)

ExternalProject_Add(libawscpp-download
GIT_REPOSITORY https://github.com/aws/aws-sdk-cpp.git
GIT_TAG 1.11.157
GIT_TAG 1.11.217
LIST_SEPARATOR "|"
CMAKE_ARGS -DBUILD_SHARED_LIBS=OFF
-DBUILD_ONLY=kinesisvideo|kinesis-video-webrtc-storage
-DCMAKE_INSTALL_PREFIX=${OPEN_SRC_INSTALL_PREFIX}
BUILD_ALWAYS TRUE
TEST_COMMAND ""
)
)
5 changes: 4 additions & 1 deletion CMake/Dependencies/libkvsCommonLws-CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ include(ExternalProject)

ExternalProject_Add(libkvsCommonLws-download
GIT_REPOSITORY https://github.com/awslabs/amazon-kinesis-video-streams-producer-c.git
GIT_TAG 178109a5dbfc5288ba5cf7fab1dc1afd5e2e182b
GIT_TAG link-mbedtls-properly
stefankiesz marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

target_link_libraries(kvsCommonLws
+           ${PRODUCER_CRYPTO_LIBRARY}
            ${OPENSSL_CRYPTO_LIBRARY}
            ${OPENSSL_SSL_LIBRARY}
            ${LIBWEBSOCKETS_LIBRARIES}

Looking at the cmake 1-line change in this Producer C branch, its seems we should only link the ${OPENSSL_CRYPTO_LIBRARY} ${OPENSSL_SSL_LIBRARY} libraries if not opting for MbedTLS - or better yet only have the PRODUCER_CRYPTO_LIBRARY one which should cover both cases:

set(PRODUCER_CRYPTO_LIBRARY
        OpenSSL::Crypto
        OpenSSL::SSL)
if (USE_MBEDTLS)
    set(CPRODUCER_COMMON_TLS_OPTION KVS_USE_MBEDTLS)
    set(PRODUCER_CRYPTO_LIBRARY
            MbedTLS
            MbedCrypto)
endif()

So I propose the following change:

target_link_libraries(kvsCommonLws
            ${PRODUCER_CRYPTO_LIBRARY}
-           ${OPENSSL_CRYPTO_LIBRARY}
-           ${OPENSSL_SSL_LIBRARY}
            ${LIBWEBSOCKETS_LIBRARIES}

And with a nit variable name change that makes more sense as there are multiple libraries and to be more aligned with how we also named LIBWEBSOCKETS_LIBRARIES:

target_link_libraries(kvsCommonLws
-           ${PRODUCER_CRYPTO_LIBRARY}
+           ${PRODUCER_CRYPTO_LIBRARIES}
            ${LIBWEBSOCKETS_LIBRARIES}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I thought of this as well, I have no idea why it was set up the way it is, however the openssl cmake variables will be blank in this case so it will be ignored by the target link libraries (I verified this). Preference though would be to do as you suggested as the final change.

PREFIX ${CMAKE_CURRENT_BINARY_DIR}/build
LIST_SEPARATOR |
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${OPEN_SRC_INSTALL_PREFIX}
-DCMAKE_PREFIX_PATH=${OPEN_SRC_INSTALL_PREFIX}
-DBUILD_COMMON_LWS=ON
-DBUILD_COMMON_CURL=OFF
-DBUILD_DEPENDENCIES=FALSE
Expand All @@ -18,6 +20,7 @@ ExternalProject_Add(libkvsCommonLws-download
-DUSE_OPENSSL=${USE_OPENSSL}
-DUSE_MBEDTLS=${USE_MBEDTLS}
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
-DBUILD_STATIC=${BUILD_STATIC}
BUILD_ALWAYS TRUE
TEST_COMMAND ""
)
Loading