Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ff6f6e3
Handle NULL `fmtp` payload type string in the log (#2130)
vikramdattu May 14, 2025
7b9254e
Sctp.c: Fix `multi-line comment` compiler error (#2133)
vikramdattu May 14, 2025
15d19f0
Tls_mbedtls: Read the cert with `readFile` before parse (#2113)
vikramdattu May 14, 2025
99de656
Skip hostname parsing for stun servers (#2125)
sirknightj May 16, 2025
6da7514
Fix H265 FMTP issue with kvsWebrtcClientViewer (#2138)
AnasIncense May 16, 2025
59404a2
Adjust the constant used to read the sample frames (#2135)
sirknightj May 21, 2025
cfa96a9
Add logs for socket creation fd (#2124)
sirknightj May 21, 2025
7c52408
Fix undefined sanitizer reports for SDP (#2131)
sirknightj May 27, 2025
4722375
Enhance the ice config parser (#2127)
sirknightj May 28, 2025
b661f40
crypto/mbedtls: Add support for mbedtls 3.x (#2112)
vikramdattu Jun 3, 2025
0a1bbb0
Add tests for getIpAddrStr (#2123)
sirknightj Jun 5, 2025
ff16c69
Refactor Signaling sources to make `Include_i.h` independent of libwe…
vikramdattu Jun 5, 2025
9e07f0c
Miscellaneous build fixes (#2147)
vikramdattu Jun 7, 2025
0854986
Ci: Windows path (#2148)
sirknightj Jun 7, 2025
bafabd9
Bugfix: unused label build error observed (#2153)
vikramdattu Jun 17, 2025
16c40d4
Enhance the signaling message parser (#2150)
sirknightj Jun 17, 2025
3d34274
Read and pass cacert buffer to lws_config instead of path (#2149)
vikramdattu Jun 19, 2025
ce70412
Bugfix: Only operate on `pSenderTranceiver` if it was found (#2155)
vikramdattu Jul 9, 2025
feabd6c
bugfix: wrong stateMachineRetryCount prints (#2160)
vikramdattu Aug 13, 2025
187acf0
Ignore case for the Opus codec mime type (#2165)
sirknightj Sep 15, 2025
a931349
Stuff (#2166)
sirknightj Sep 16, 2025
7ed87b6
Update CMakeLists.txt (#2169)
sirknightj Oct 3, 2025
761de0b
Fix Stats.h typo in documentation (#2173)
njoubert Oct 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
- name: Mac Intel
runner: macos-13
- name: Mac Apple Silicon
runner: macos-15
runner: macos-14
compiler: [ gcc, clang ]
config:
- name: Shared OpenSSL
Expand Down Expand Up @@ -123,10 +123,10 @@ jobs:
export CXX="clang++"
fi
echo "Using CC: $CC and CXX: $CXX"

mkdir -p build
cd build

if [[ "${{ matrix.compiler }}" == "gcc" ]]; then
# Skip building the tests for Mac with GCC
# https://github.com/awslabs/aws-crt-cpp/issues/605
Expand Down Expand Up @@ -246,7 +246,7 @@ jobs:
run: |
mkdir build
cd build
cmake .. -DBUILD_TEST=ON -DENABLE_AWS_SDK_IN_TESTS=OFF -DUSE_OPENSSL=OFF -DUSE_MBEDTLS=ON
cmake .. -DBUILD_TEST=ON -DENABLE_AWS_SDK_IN_TESTS=OFF -DUSE_OPENSSL=OFF -DUSE_MBEDTLS=ON -DBUILD_OLD_MBEDTLS_VERSION=ON
make -j

- name: Configure AWS Credentials
Expand Down Expand Up @@ -350,11 +350,13 @@ jobs:
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Move cloned repo
- name: Move cloned repo to shorter path
shell: powershell
run: |
mkdir C:\webrtc
Move-Item -Path "D:\a\amazon-kinesis-video-streams-webrtc-sdk-c\amazon-kinesis-video-streams-webrtc-sdk-c\*" -Destination "C:\webrtc"
$src = "${env:GITHUB_WORKSPACE}\*"
$dest = "C:\webrtc"
mkdir "$dest"
Move-Item -Path $src -Destination $dest
- name: Install dependencies
shell: powershell
run: |
Expand Down
4 changes: 2 additions & 2 deletions CMake/Dependencies/libkvsCommonLws-CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ExternalProject_Add(libkvsCommonLws-download
GIT_SHALLOW TRUE
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/build
LIST_SEPARATOR |
CMAKE_ARGS
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${OPEN_SRC_INSTALL_PREFIX}
-DCMAKE_PREFIX_PATH=${OPEN_SRC_INSTALL_PREFIX}
-DBUILD_COMMON_LWS=ON
Expand All @@ -22,7 +22,7 @@ ExternalProject_Add(libkvsCommonLws-download
-DUSE_OPENSSL=${USE_OPENSSL}
-DUSE_MBEDTLS=${USE_MBEDTLS}
-DKVS_DEFAULT_STACK_SIZE=${KVS_DEFAULT_STACK_SIZE}
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
-DCMAKE_C_FLAGS=-D_GNU_SOURCE\ ${CMAKE_C_FLAGS}
-DBUILD_STATIC=${BUILD_STATIC}
BUILD_ALWAYS TRUE
TEST_COMMAND ""
Expand Down
10 changes: 8 additions & 2 deletions CMake/Dependencies/libmbedtls-CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ project(libmbedtls-download NONE)

include(ExternalProject)

if (BUILD_OLD_MBEDTLS_VERSION)
SET(MBEDTLS_GIT_TAG "v2.28.8")
else()
SET(MBEDTLS_GIT_TAG "v3.6.3")
endif()

if (BUILD_STATIC_LIBS)
set(BUILD_SHARED 0)
else()
Expand All @@ -21,7 +27,7 @@ message(STATUS "C flags here are ${CMAKE_C_FLAGS}")
ExternalProject_Add(
project_libmbedtls
GIT_REPOSITORY https://github.com/ARMmbed/mbedtls.git
GIT_TAG v2.28.8
GIT_TAG ${MBEDTLS_GIT_TAG}
GIT_PROGRESS TRUE
GIT_SHALLOW TRUE
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/build
Expand All @@ -32,6 +38,6 @@ ExternalProject_Add(
-DCMAKE_MACOSX_RPATH=${CMAKE_MACOSX_RPATH}
-DENABLE_TESTING=OFF
-DENABLE_PROGRAMS=OFF
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
"-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} -Wno-array-bounds"
BUILD_ALWAYS TRUE
TEST_COMMAND "")
7 changes: 2 additions & 5 deletions CMake/Dependencies/libwebsockets-CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ cmake_minimum_required(VERSION 3.6.3)

project(libwebsocket-download NONE)

SET(PATCH_COMMAND git apply --verbose --ignore-whitespace ${CMAKE_CURRENT_LIST_DIR}/libwebsockets-old-gcc-fix-cast-cmakelists.patch)

include(ExternalProject)
if (BUILD_STATIC_LIBS)
set(LWS_WITH_SHARED 0)
Expand All @@ -30,10 +28,9 @@ endif()

ExternalProject_Add(project_libwebsockets
GIT_REPOSITORY https://github.com/warmcat/libwebsockets.git
GIT_TAG v4.3.3
GIT_TAG v4.3.5
GIT_PROGRESS TRUE
GIT_SHALLOW TRUE
PATCH_COMMAND ${PATCH_COMMAND}
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/build
LIST_SEPARATOR |
CMAKE_ARGS
Expand All @@ -58,7 +55,7 @@ ExternalProject_Add(project_libwebsockets
-DLWS_MBEDTLS_LIBRARIES=${LWS_MBEDTLS_LIBRARIES}
-DLWS_MBEDTLS_INCLUDE_DIRS=${LWS_MBEDTLS_INCLUDE_DIRS}
-DLWS_WITH_MINIMAL_EXAMPLES=1
-DLWS_HAVE_PTHREAD_H=1
-DLWS_HAVE_PTHREAD_H=1
-DLWS_WITH_THREADPOOL=${LWS_WITH_THREADPOOL}
-DLWS_WITH_ZLIB=0
-DLWS_HAVE_EVENTFD=0
Expand Down
36 changes: 0 additions & 36 deletions CMake/Dependencies/libwebsockets-leak-pipe-fix.patch

This file was deleted.

32 changes: 0 additions & 32 deletions CMake/Dependencies/libwebsockets-old-gcc-fix-cast-cmakelists.patch

This file was deleted.

20 changes: 18 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include(CheckIncludeFiles)
include(CheckFunctionExists)

# The version MUST be updated before every release
project(KinesisVideoWebRTCClient VERSION 1.12.1 LANGUAGES C)
project(KinesisVideoWebRTCClient VERSION 1.14.0 LANGUAGES C)

# User Flags
option(ADD_MUCLIBC "Add -muclibc c flag" OFF)
Expand All @@ -22,6 +22,7 @@ option(ENABLE_KVS_THREADPOOL "Enable support for KVS thread pool in signaling" O
option(INSTRUMENTED_ALLOCATORS "Enable memory instrumentation" OFF)
option(ENABLE_AWS_SDK_IN_TESTS "Enable support for compiling AWS SDKs for tests" ON)
option(ENABLE_STATS_CALCULATION_CONTROL "Enable support for runtime control of ice agent stat calculations." OFF)
option(BUILD_OLD_MBEDTLS_VERSION "Use MbedTLS version 2.28.8." OFF)

# Developer Flags
option(BUILD_TEST "Build the testing tree." OFF)
Expand Down Expand Up @@ -76,11 +77,25 @@ if(NOT WIN32)
CHECK_INCLUDE_FILES(ifaddrs.h KVSWEBRTC_HAVE_IFADDRS_H)
if(NOT KVSWEBRTC_HAVE_IFADDRS_H)
message(FATAL_ERROR "Platform should support the ifaddrs interface.")
else()
add_definitions(-DHAVE_IFADDRS_H=1)
endif()
CHECK_FUNCTION_EXISTS(getifaddrs KVSWEBRTC_HAVE_GETIFADDRS)
if(NOT KVSWEBRTC_HAVE_GETIFADDRS)
message(FATAL_ERROR "Platform should support getifaddrs API.")
endif()

# Check for poll.h
CHECK_INCLUDE_FILES(poll.h HAVE_POLL_H)
if (HAVE_POLL_H)
add_definitions(-DHAVE_POLL_H=1)
endif()

# Check for socketpair availability
CHECK_FUNCTION_EXISTS(socketpair HAVE_SOCKETPAIR)
if (HAVE_SOCKETPAIR)
add_definitions(-DHAVE_SOCKETPAIR=1)
endif()
endif()

set(CMAKE_MACOSX_RPATH TRUE)
Expand Down Expand Up @@ -182,6 +197,7 @@ if(BUILD_DEPENDENCIES)
elseif(USE_MBEDTLS)
set(BUILD_ARGS -DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DBUILD_OLD_MBEDTLS_VERSION=${BUILD_OLD_MBEDTLS_VERSION}
"-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} -std=c99")
build_dependency(mbedtls ${BUILD_ARGS})
endif()
Expand Down Expand Up @@ -446,7 +462,7 @@ target_link_libraries(
kvsWebrtcSignalingClient
PUBLIC
kvsCommonLws
${LIBWEBSOCKETS_LIBRARIES}
${LIBWEBSOCKETS_LIBRARIES}
PRIVATE kvspicUtils
kvspicState
${CMAKE_THREAD_LIBS_INIT}
Expand Down
3 changes: 2 additions & 1 deletion samples/kvsWebRTCClientMaster.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,11 @@ PVOID sendVideoPackets(PVOID args)
lastFrameTime = startTime;

while (!ATOMIC_LOAD_BOOL(&pSampleConfiguration->appTerminateFlag)) {
fileIndex = fileIndex % NUMBER_OF_H264_FRAME_FILES + 1;
if (pSampleConfiguration->videoCodec == RTC_CODEC_H264_PROFILE_42E01F_LEVEL_ASYMMETRY_ALLOWED_PACKETIZATION_MODE) {
fileIndex = fileIndex % NUMBER_OF_H264_FRAME_FILES + 1;
SNPRINTF(filePath, MAX_PATH_LEN, "./h264SampleFrames/frame-%04d.h264", fileIndex);
} else if (pSampleConfiguration->videoCodec == RTC_CODEC_H265) {
fileIndex = fileIndex % NUMBER_OF_H265_FRAME_FILES + 1;
SNPRINTF(filePath, MAX_PATH_LEN, "./h265SampleFrames/frame-%04d.h265", fileIndex);
}

Expand Down
47 changes: 32 additions & 15 deletions src/include/com/amazonaws/kinesis/video/webrtcclient/Include.h
Original file line number Diff line number Diff line change
Expand Up @@ -449,12 +449,27 @@ extern "C" {
*/
#define MAX_ICE_CONFIG_USER_NAME_LEN 256

/**
* Buffer length for ICE configuration user name, including null terminator.
*
* \sa MAX_ICE_CONFIG_USER_NAME_LEN
*/
#define MAX_ICE_CONFIG_USER_NAME_BUFFER_LEN (MAX_ICE_CONFIG_USER_NAME_LEN + 1)

/**
* Maximum allowed ICE configuration password length
* https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_AWSAcuitySignalingService_IceServer.html#KinesisVideo-Type-AWSAcuitySignalingService_IceServer-Password
*
* \sa https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_signaling_IceServer.html#KinesisVideo-Type-signaling_IceServer-Password
*/
#define MAX_ICE_CONFIG_CREDENTIAL_LEN 256

/**
* Buffer length for ICE configuration password, including null terminator.
*
* \sa MAX_ICE_CONFIG_USER_NAME_LEN
*/
#define MAX_ICE_CONFIG_CREDENTIAL_BUFFER_LEN (MAX_ICE_CONFIG_CREDENTIAL_LEN + 1)

/**
* Maximum allowed signaling URI length
*/
Expand All @@ -473,7 +488,7 @@ extern "C" {
/**
* Maximum allowed code string length
*/
#define MAX_STATUS_CODE_STRING_LEN 256
#define MAX_STATUS_CODE_STRING_LEN 8

/**
* Maximum allowed message description length
Expand Down Expand Up @@ -722,10 +737,12 @@ extern "C" {
/**
* Parameterized string for KVS STUN Server
*/
#define KINESIS_VIDEO_STUN_URL_POSTFIX "amazonaws.com"
#define KINESIS_VIDEO_STUN_URL_POSTFIX_CN "amazonaws.com.cn"
#define KINESIS_VIDEO_STUN_URL "stun:stun.kinesisvideo.%s.%s:443"
#define KINESIS_VIDEO_STUN_URL_WITHOUT_PORT "stun.kinesisvideo.%s.%s"
#define KINESIS_VIDEO_STUN_URL_POSTFIX "amazonaws.com"
#define KINESIS_VIDEO_STUN_URL_POSTFIX_CN "amazonaws.com.cn"
#define KINESIS_VIDEO_STUN_URL_PREFIX "stun."
#define KINESIS_VIDEO_STUN_URL_PREFIX_LENGTH 5
#define KINESIS_VIDEO_STUN_URL "stun:stun.kinesisvideo.%s.%s:443"
#define KINESIS_VIDEO_STUN_URL_WITHOUT_PORT "stun.kinesisvideo.%s.%s"

/**
* Default signaling SSL port
Expand Down Expand Up @@ -1137,9 +1154,9 @@ typedef struct {
* https://www.w3.org/TR/webrtc/#rtciceserver-dictionary
*/
typedef struct {
CHAR urls[MAX_ICE_CONFIG_URI_LEN + 1]; //!< URL of STUN/TURN Server
CHAR username[MAX_ICE_CONFIG_USER_NAME_LEN + 1]; //!< Username to be used with TURN server
CHAR credential[MAX_ICE_CONFIG_CREDENTIAL_LEN + 1]; //!< Password to be used with TURN server
CHAR urls[MAX_ICE_CONFIG_URI_LEN + 1]; //!< URL of STUN/TURN Server
CHAR username[MAX_ICE_CONFIG_USER_NAME_BUFFER_LEN]; //!< Username to be used with TURN server
CHAR credential[MAX_ICE_CONFIG_CREDENTIAL_BUFFER_LEN]; //!< Password to be used with TURN server
} RtcIceServer, *PRtcIceServer;

/**
Expand Down Expand Up @@ -1388,12 +1405,12 @@ typedef struct {
* NOTE:TTL is given in default which is 100ns duration
*/
typedef struct {
UINT32 version; //!< Version of the struct
UINT64 ttl; //!< TTL of the configuration is 100ns
UINT32 uriCount; //!< Number of Ice URI objects
CHAR uris[MAX_ICE_CONFIG_URI_COUNT][MAX_ICE_CONFIG_URI_LEN + 1]; //!< List of Ice server URIs
CHAR userName[MAX_ICE_CONFIG_USER_NAME_LEN + 1]; //!< Username for the server
CHAR password[MAX_ICE_CONFIG_CREDENTIAL_LEN + 1]; //!< Password for the server
UINT32 version; //!< Version of the struct
UINT64 ttl; //!< TTL of the configuration is 100ns
UINT32 uriCount; //!< Number of Ice URI objects
CHAR uris[MAX_ICE_CONFIG_URI_COUNT][MAX_ICE_CONFIG_URI_BUFFER_LEN]; //!< List of Ice server URIs
CHAR userName[MAX_ICE_CONFIG_USER_NAME_BUFFER_LEN]; //!< Username for the server
CHAR password[MAX_ICE_CONFIG_CREDENTIAL_BUFFER_LEN]; //!< Password for the server
} IceConfigInfo, *PIceConfigInfo;

typedef struct {
Expand Down
Loading
Loading