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

v1.11.0 Release #2018

merged 22 commits into from
Oct 4, 2024

Conversation

disa6302
Copy link
Contributor

@disa6302 disa6302 commented Jun 25, 2024

Issue #, if available:

What was changed?

  • New release removing addConfigToServerList API that was introduced in 1.10.0.

Why was it changed?

  • To avoid enforcing samples to use this API to generate relay candidates.

Additional summary of changes:

Commit Hash Description
4cd8eed Edit to CMakeLists to properly build static version of executable and libs
6bc0d2d 1. Update mbedtls from 2.25.0 to 2.28.5 2. Properly INSTALL threadpool libs 3. Remove checkIceAgentStateMachine and checkTurnConnectionStateMachine APIs (which in where the timerQueueKick calls were being made.
4b5ed47 Update mbedtls to 2.28.8 since it is the latest in the 2.28 LTS track
e40fab5 Fixes build for mips32 on old compilers [was necessary for gcc 5.4 cross toolchain with uclibc], being tracked in GitHub lws repo as well but this is the current workaround that works: warmcat/libwebsockets#3163
ad2922a Propagate the mbedtls found versions to lws cmake (as suggested by lws project itself) necssary when you have a local install as well and that one gets picked up first. Also added cmake command line argument to specify CA CERT PATH (but this didn't work, fixed in next commit below).
38e942c Properly add -DKVS_CA_CERT_PATH argument for cmake so a custom one can be specified (all embedded devices will need this), tested on Ingenic T31

How was it changed?

  • Reverted the commits that introduced this change. Restored unit tests too.

What testing was done for the changes?

  • Ran samples under different config to confirm nothing is broken.
  • Unit test

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

disa6302 and others added 8 commits March 12, 2024 10:29
* Log ice candidate protocol appropriately (#1230)

* Log ice candidate protocol appropriately

* Add develop to travis CI

* Address comments

* Realign branches during transition (#1257)

* create data channel sample (#1203)

* create data channel sample

* moved variables to Samples.h, encapsulated with ENABLE_DATA_CHANNEL directive

* removed unused variables, moved variable declarations to the top of a block

* create data channel sample

* moved variables to Samples.h, encapsulated with ENABLE_DATA_CHANNEL directive

* Cancel the thread once mediaThreadStarted flag is set to false (#1227)

* Initial stale PR template (#1226)

* Update stale issue template

* Testing every minute

* Fix stale issue PR template (#1234)

No code changed. Just a template change. So merging

* Add bug and question label

* Switch stale PR action to daily cadence

* [FIX] When protocol in DCEP header of data channel open command is not empty, there is a check preventing the data channel to be opened. Now protocol length is correctly handled to avoid check failing. (#1228)

Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com>
Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu>
Co-authored-by: ela34 <8700736+ela34@users.noreply.github.com>

* set protocol value following the spec (#1259)

Co-authored-by: liyufang <liyufang@xiaomi.com>

* filter out invalid candidate in sdp (#1260)

Co-authored-by: liyufang <liyufang@xiaomi.com>

* Added targets for cmake clean (#1253)

* added targets for cmake clean

* added new line, updated readme

* added missing new line

* updated readme to include folder details

* updated readme to include folder details

* viewer sample: wrap datachannel callback with `ENABLE_DATA_CHANNEL` (#1261)

* create data channel sample (#1203)

* create data channel sample

* moved variables to Samples.h, encapsulated with ENABLE_DATA_CHANNEL directive

* removed unused variables, moved variable declarations to the top of a block

* create data channel sample

* moved variables to Samples.h, encapsulated with ENABLE_DATA_CHANNEL directive

* Cancel the thread once mediaThreadStarted flag is set to false (#1227)

* Initial stale PR template (#1226)

* Update stale issue template

* Testing every minute

* Fix stale issue PR template (#1234)

No code changed. Just a template change. So merging

* Add bug and question label

* Switch stale PR action to daily cadence

* [FIX] When protocol in DCEP header of data channel open command is not empty, there is a check preventing the data channel to be opened. Now protocol length is correctly handled to avoid check failing. (#1228)

* viewer sample: wrap datachannel callback with `ENABLE_DATA_CHANNEL`

Signed-off-by: zhiqinli@amazon.com <zhiqinli@amazon.com>

Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com>
Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu>
Co-authored-by: ela34 <8700736+ela34@users.noreply.github.com>

* libwebsockets: add patch to fix pipe fd leak issue (#1264)

Signed-off-by: Alex.Li <zhiqinli@amazon.com>

* Fix scripts/pare_status.py for non-status #defines (#1268) (#1274)

Co-authored-by: Kevin Allen <kallen@aurora.tech>

* fix a few bugs

* Revert "fix a few bugs"

This reverts commit 093902432fb24f42ade2857c23eca950e0b41a2f.

* fix some bugs (#1277)

* Fix bugs (#1279)

* fix edge case try to unlock a mutex which is not locked in teh acse the sample config was NULL (#1286)

* cmake: allow user to specify OPEN_SRC_INSTALL_PREFIX (#1293)

Signed-off-by: Alex.Li <zhiqinli@amazon.com>

* Fix inconsistent log priority (#1309)

Patch reduces priority of a few info level log messages to verbose
level to be consistent with other functions in file and rest of
code base.

* Modify protocol loggin design in develop (#1311)

* typo: typo fix (#1317)

Signed-off-by: Alex.Li <zhiqinli@amazon.com>

* Signaling state machine rework (#1323)

* replaced recursive calls to stepSignalingStateMachine with loops

* removed recursive calls to stepSignalingStateMachine

* replaced stepSignalingstatemachine with signalingStateMachineIterator

* removed stepUntil, continueOnReady; removed status from iterator signature; set signalingclient version; added a lock in refreshIceConfiguration

* changed the declaration for i from int to UINT32

* added signaling version; removed unnecessary comment

* removed redeclaration; changed value in an existing macro

* Fix issue with API call failures being treated as success (#1328)

* return proper error, do not reset call result value

* for non retriable failures, set the terminal exit status for state in… (#1320)

* for non retriable failures, set the terminal exit status for state in state machine

* address comments

* adjust tests set retry max to 1

* Update LwsApiCalls.c

trigger travis ci

* Incorporating PIC state machine level retry changes into webrtc signaling state machine (#1326)

* Incorporating PIC state machine level retry changes into webrtc signaling state machine

* Signaling state machine rework (#1323)

* replaced recursive calls to stepSignalingStateMachine with loops

* removed recursive calls to stepSignalingStateMachine

* replaced stepSignalingstatemachine with signalingStateMachineIterator

* removed stepUntil, continueOnReady; removed status from iterator signature; set signalingclient version; added a lock in refreshIceConfiguration

* changed the declaration for i from int to UINT32

* added signaling version; removed unnecessary comment

* removed redeclaration; changed value in an existing macro

* Fix issue with API call failures being treated as success (#1328)

* return proper error, do not reset call result value

* for non retriable failures, set the terminal exit status for state in… (#1320)

* for non retriable failures, set the terminal exit status for state in state machine

* address comments

* adjust tests set retry max to 1

* Update LwsApiCalls.c

trigger travis ci

* Add retry strategy to client info to avoiud changing create signaling channel API signature

* Incorporating PIC state machine level retry changes into webrtc signaling state machine

* Add retry strategy to client info to avoiud changing create signaling channel API signature

* Adding more debug logs in the code

* fix merge conflicts

* PR feedback

Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com>
Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com>

* Revert " Incorporating PIC state machine level retry changes into webrtc signaling state machine (#1326)" (#1339)

This reverts commit 06bffcecd7f60571e29e51eb15fa8e4549638213.

* Incorporating PIC state machine level retry changes into webrtc signaling state machine (#1341)

* Incorporating PIC state machine level retry changes into webrtc signaling state machine

* Add a n optional check for free retry strategy

* Remove unused goto label

* add missing sleep in get token state machine execute API

* update log line

* Update Producer hash

* Adding a high level retry strategy while creating signaling client

* Add Retry count retrieval in hook (#1335)

* Add Retry count retrieval in hook

* Fix compile issue on travis

* Pull in latest changes in retry structures

* Rebasing off develop with successful travis run for retry

* Log git hash (#1345)

* Log git hash

* Update CMakeLists.txt

white space change to trigger travis

Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com>

* Fix retry count to indicate count only after a retry has occured (#1348)

Fix retry count to indicate count only after a retry has occurred

* add support for automatic clock skew detection and correction (#1344)

* add support for automatic clock skew detection and correction

* auto fix clock skew and add tests

* enable test to check clock recovery

* remove stuff left over from debugging, reset logging default to WARN

* remove unused variable

* get rid of verbose logging in unit tests causes static build to fail due to excessive log output

* simplify code get rid of extra call to length because the lws_hdr_copy returns the same value

* handle null stream track in case of recvonly (#1346)

* handle null stream track in case of recvonly

* a test with null stream track for revconly

* Fix a comment

* whitespace change

* State machine preparation is decoupled from the constructor (#1343)

* Merge master into develop (#1352)

* Missing the public API switch in the other samples (#1356)

* Fix Fetch error retry cases (#1359)

* Fix Fetch error retry cases

* update comment

* added implementation and a test to use remote sdp to construct local sdp (#1238)

* added implementation and a test to use remote sdp to construct local sdp

* used same strings in offer and test

* updated tests

* Update stale action workflow (#1381)

* Modify issue triaging management

* test on branch

* Update ga for stale issue to use aws-actions instead of the one publicly available

* Travis to ga (#1347)

* Test github actions

* Clang format

* Change platform

* Add macos gtest

* Ubuntu latest

* Address sanitizer

* Add ubsan, tsan and old gcc build

* Fix macos build

* Allow mac and ubsan to fail

* Fixing clang format

* Testing allow on failure

* Run github actions only on PR and merge

* Test mbedtls

* Rebase on develop and fix clang failure

* Test if travis builds without ga

* Restore travis

* Test mac build and add sample check

* Fix sample check and revert mac to allow fail

* Travis CI to GHA migration phase 1

* Set clang for mbedtls and test msan

* Split files

* Comment out failing tests

* Add codecov

* Travis CI to GHA migration phase 1

* new Chrome v98 produces extra sdp attributes, up the limit so we do n… (#1391)

* new Chrome v98 produces extra sdp attributes, up the limit so we do not reject

* Fix test and change count to unit16 to avoid overflow issues

* fix issue reported by codeql

Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu>

* GitHub actions setup (#1390)

* add additional tests

* fix syntax error

* fix syntax error

* fix syntax error

* fix syntax error

* fix syntax error

* static build and msan without docker

* fix msan

* use dependencies with msan build

* use gcc 9 for mac

* use gcc 4.2 for mac gcc build

* use gcc 4.9 for mac gcc build

* check gcc version; use macos 10.15

* use clang-7 for ubsan

* arm cross compilation

* missed cloning the repository

* use gcc

* remove compiler from env

* fix install deps

* use clang7, macos10.15, ubuntu18.04

* fix windows build

* fix test instruction

* fix static build

* fix static build

* fix static build

* fix static build

* setup docker for static build

* use alpine for the static build

* use alpine for the static build

* install dependencies

* install dependencies

* fix errors in static build

* install dependencies

* enable ipv6

* use gcc for static build

* fix ubsan

* fix ubsan

* collate all working github actions builds

* fix errors

* have static,msan,windows,doxygen in travis

* comment failing builds;fix ci rules

* fix travis comments, os, remove exports

* update log level, mac build-name

* add CC

* update gcc

* update gcc

* check cc and cxx for mac gcc

* Revert "check cc and cxx for mac gcc"

This reverts commit 2db1e0e4b7a9291a389cbae0f3793edd7f88c7ae.

* remove travis statement

* Fix swapped SSL_free() and SSL_CTX_free() (#1401)

* Hangup value included in LWS retry strategy (#1403)

* GitHub actions setup static build (#1405)

* fix static build

* remove static build from travis

* fix warnings in mac builds; setup iam role for sample-check

* Migrate Doxygen to GitHub Actions (#1416)

* add doxygen workflow to ga

* install graphviz

* install ttf-freefont

* specify doxyfile

* use enc key

* use enc key

* use marketplace action to deploy

* use marketplace action to deploy

* use marketplace action to deploy

* check current folder

* check current folder

* check current folder

* check current folder

* check current folder

* check current folder

* check current folder

* fix deployment

* fix deployment

* fix deployment

* fix deployment

* specify doxyfile path

* fix syntax

* fix paths in doxyfile

* fix forked branch ci

* add develop branch

* Fix ResourceEndpoint length check (#1411)

ResourceEndpoint length check mistakenly uses ChannelName max length.

* update cross-compilation builds ga (#1429)

* Addressing error handling concerns for an edge case (#1443)

* Addressing error handling concerns for an edge case

* Clang format

* Removed useless status_success check, changed test to look for correct error value

* sample: fix possible timerQueue deadlock when freeSampleStreamingSession (#1448)

Signed-off-by: zhiqinli@amazon.com <zhiqinli@amazon.com>

* metrics: allow viewer sample to get ice candidate pair stats (#1406)

Signed-off-by: Alex.Li <zhiqinli@amazon.com>

* account for hexidecimal numbers (#1465)

* Fix default data channel ordering mode (#1476)

* Invoke gst_object_unref on allocated elements (#1477)

* Fix typo (#1478)

* Fix typo

* Add unit test

* find gcc version for static build

* revert gtest version update and change alpine version

* fix memory leak issue and abort trap in test

* fix video delay 4s (#1525)

* fix mips compile error (#1532)

* fix mips compile error

* fix mips compile error

* fix mips compile error

* Fix file caching (#1575)

* Fix file caching

* Update test to count entries, remove unnecessary memcpy

* UT uses MEMFREE

* Fix deadlock getIceCandidatePairStatsCallback (#1561)

* sample: fix possible timerQueue deadlock when freeSampleStreamingSession

* minor change (formatting)

* Fix missing SDP m-line problem (#1458)

* use fake transceiver for missing m-line

* use hashtable to track previously seen transceivers

* fix failing tests with updates to seenTransceivers hashtable

* use hashtables for unknown codec rtpmap and payloadtype

* fix firstCodec value in case of only a single codec in m-line

* rename variables

* clang build

* fix mac-gcc build

* add test

* add test for missingAudioTransceiver

* add comments

* add comments

* remove unused variable to fix mac buils

* Fix GHA CI build issues (#1631)

* separate builds and tests

* fix clang format issues

* update libgtest version to 1.12.1

* fix deprecation in libgtest

* update test suite call

* run tests from build

* remove build from tst instruction

* fix san options

* fix windows build

* fix path in windows build

* update bat file for windows

* build openssl on windows

* add openssl path for windows build

* specify path to openssl root folder

* specify path to openssl root folder

* specify path to openssl root folder

* upgrade cmake version

* fix windows build

* update checkoutv2 to v3

* fix checkout and install pthreads

* remove windows build temporarily

* move to v1-node16 for aws credentials

* add sudo clean

* add sudo to both commanda

* use event triggers

* Fix CI for forked branches (#1634)

* use only target

* use only target

* remove branch name

* blank space change to trigger CI

* fix WSAPoll failed when set POLLPRI flag (#1636)

Co-authored-by: weishao <xweimvp@gmail.com>

* Update README.md (#1637)

Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com>

* add paths for fedora (#1638)

Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com>

* Add clarifying comment for fallthrough (#1639)

* Bkneff patch 2 (#1640)

* Update kvsWebRTCClientMasterGstreamerSample.c

Provide an example gstreamer pipeline for Raspberry Pi hardware encoding.  Tested on Raspberry Pi 3

* Clang

---------

Co-authored-by: bkneff <44409173+bkneff@users.noreply.github.com>

* thread cancel memory leak, recreate signaling client & lws_context whenever a significant error has occurred, verbose and debug logging for ice & turn (#1641)

* recreate signaling client & lws_context whenever a significant error has occurred

* clang-format

* recreate signaling client & lws_context whenever a significant error has occurred

* Clang

* adding local and remote null checks

* More verbose and debug logging for ice & turn

* Thread cancel on the media sender thread leads to memory leaks from writeFrame() not freeing all its heap usage

* Clang again

---------

Co-authored-by: James Delaplane <delaplan@amazon.com>

* wrong port/address on debug log (#1642)

Co-authored-by: Alex Zhukov <azhukov@roblox.com>

* Update openssl version (#1643)

* Update openssl version and fix unused param typo

* Pull in producer C openssl update

* fix(project): fix issue--1614 (#1644)

Co-authored-by: niedb <niedb@reolink.com.cn>

* update versions for actions (#1647)

* Seggregaated Audio and Video frame handling, updated Master sample to handle audio and video both (#1646)

Co-authored-by: Vikram(VS) <vssht@amazon.com>

* Mark Datachannel specific code explicitly (#1666)

Co-authored-by: Dmitry Ilyin <dima@doty.ru>

* Fix turn allocation taken long time when credential is incorrect (#1667)

* fix turn allocation use long time sometimes

* update some code style

* fix compile error

* Update IceAgent.c

* fix clang format

* fix prflx update interrupted connectivity check

* fix clang format

---------

Co-authored-by: Gordon <vc60er@163.com>

* Update RtcpPacket.h (#1680)

* Update RtcpPacket.h

* Clang format

* Changed sample frames to have 1 second GOP size, and removed overly verbose log (#1686)

* Jitter buffer overflows (#1677)

* Modified jitterbuffer to include checks for timestamp overflow

* All tests passing, some new tests still need to be added

* More tests and accompanying fixes

* Resolve coverity finding of multiplication causing type overflow

* Change function order

* Clang format

* Mac compile errors fixed

* Commenting out long-running test, adding timestamp overflow test

* Fix port printf in log (#1682)

* Fix port printf in log

* Fix the clang-format

Fix the clang-format use ./scripts/clang-format.sh -d src/

* fix turn permission delay 2s (#1675)

* fix turn permission delay 2s

* Fix the clang-format

Fix the clang-format use ./scripts/clang-format.sh -d src/

* Instruction to build on MacOS M1 (#1689)

* Fix build dependencies off and add version requirements in readme (#1691)

* Unlock mutex in case of error (#1696)

* Unlock in case of error

* fix typos (#1697)

Co-authored-by: Ben Mesander <bmesander@cardinalpeak.com>

* IoT CertificateId as Stream Name. (#1721)

* IoT CertificateId as Stream Name.

* Fix the clang-format use ./scripts/clang-format.sh -d src/

---------

Co-authored-by: Lina Chen <chenln1124@thundersoft.com>

* If local ICE is invalid, return from sending packet. (#1718)

* If local ICE is invalid, return from sending packet.

* Fix the clang-format use ./scripts/clang-format.sh -d src/

---------

Co-authored-by: Lina Chen <chenln1124@thundersoft.com>

* Adds RTSP Source to GStreamer Sample (#1740)

* Adds rtsp source support, modifies source-type determination

* All use cases tested and debugged.

* Clang formatting.

* Clang formatting.

* Updates credentials configuration to fix sample-check error.

* Sample-check fix attempt #2

* Sample-check fix attempt 3

* Sample-check fix attempt 4

* Sample-check fix attempt

* ""

* " "

* " "

* " "

* Update README.md

* Updates sample run instructions structure, adds RTSP source instructions

* Update README.md

* Renames sample file to be same as executable, updates CMakeLists to reflect this.

* Update README.md

Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com>

* Update README.md

* Updates usage statement to new sample executable name

---------

Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com>

* replace stun with sctp (#1743)

* Modify the PR template (#1745)

* modify the PR template

* Use bullets

* Update raspberry pi hardware encode to current gstreamer (#1746)

* Update raspberry pi hardware encode to current gstreamer

* - Provide build instructions for 32-bit raspbian on 64-bit hardware

---------

Co-authored-by: Ben Mesander <bmesander>

* Set a default user agent if not provided (#1739)

* Connection timeout sleep (#1744)

* Remove thread_detach and looping sleep, add thread_join

* Added support for socketpair() and added it to connectionlistener

* Clang formatting

* Fix test that previously expected TID to be invalid

* remove unused variables

* Fixing incorrect typing on comparison

* clang formatting

* strlen -> STRLEN macro

* Off by 1 error in poll rfds

* clang formatting

* Fix comment typo regarding default source in Gst sample (#1750)

* Parse IP address if the hostname conforms to Public ipv4 DNS format (#1759)

* Parse IP address if the hostname conforms to Public ipv4 DNS format

* Unit test for ipIpAddr function

* Include and use threadpool for signaling channel messages (#1761)

* Include and use threadpool for signaling channel messages

* Fix clang and linux gcc compile errors

* Fix pointer cast

* Using SignalingClientInfo to pass information about Threadpool

* edit README.md

* Not necessary to change struct version

* Update struct version again, add fall-through

* clang formatting

* Clang formatting, again

* Fix the Windows build in the CI (#1764)

* modify libwebsockets to work on Windows

* set LWS_WITH_STATIC 1

* resume windows ci

* add rest of the options

* fix syntax in ci.yml

* remove other options

* set cmd vard

* missing space in bat

* add missing = in build_windows.bat

* introduce cmake arguments

* find_package openssl for non-windows builds

* static + shared for rest of the builds

* set static + shared true for shared builds always

* add back ssl and crypto paths

* rename vars in libwebsockets' cmake, rearrange, pthread fix

* static=1 always

* remove ssl and crypto paths

* with_threadpool=1

* correction

* correction 2

* correction 3

* correction 4

* correction 5 static

* install gstreamer on windows

* test mbedtls on windows

* use if(WIN32) with set vars

* 1671

* remove openssl arg from mbedtls build

* fix mbedtls windows later

* Introducing profiling of code sections and APIs (#1755)

* Adds RTSP Source to GStreamer Sample (#1740)

* Adds rtsp source support, modifies source-type determination

* All use cases tested and debugged.

* Clang formatting.

* Clang formatting.

* Updates credentials configuration to fix sample-check error.

* Sample-check fix attempt #2

* Sample-check fix attempt 3

* Sample-check fix attempt 4

* Sample-check fix attempt

* ""

* " "

* " "

* " "

* Update README.md

* Updates sample run instructions structure, adds RTSP source instructions

* Update README.md

* Renames sample file to be same as executable, updates CMakeLists to reflect this.

* Update README.md

Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com>

* Update README.md

* Updates usage statement to new sample executable name

---------

Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com>

* Connection timeout sleep (#1744)

* Remove thread_detach and looping sleep, add thread_join

* Added support for socketpair() and added it to connectionlistener

* Clang formatting

* Fix test that previously expected TID to be invalid

* remove unused variables

* Fixing incorrect typing on comparison

* clang formatting

* strlen -> STRLEN macro

* Off by 1 error in poll rfds

* clang formatting

* Fix comment typo regarding default source in Gst sample (#1750)

* Initial commit

* New structures to track signaling latency in diagnostics

* Make peer connection stats accessible in application

* Fix ice agent profling to store in variables, new APIs for getting ice agent metrics

* Profile create peer connection

* Macro fixes

* More macro fix

---------

Co-authored-by: Stefan Kieszkowski <85728496+stefankiesz@users.noreply.github.com>
Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com>
Co-authored-by: jdelapla <delaplan@amazon.com>

* Fix Windows tests (#1769)

* enable verbose logs

* fix syntax

* without gtest filter

* env path

* cmd.exe /c

* give permissions to file

* move to C: instead of D:

* don't move anything

* add paths to pthread, ssl, crypto, websockets dlls

* cd missing

* uncomment other builds

* comment msan

* filter out tests

* Refactor issue templates (#1770)

* add support for CN region (#1612) (#1777)

Signed-off-by: Alex Li <zhiqinli@amazon.com>
Co-authored-by: Alex.D.Scofield <zhiqinli@amazon.com>

* sample: remove unused pIotCoreThingName (#1720)

Signed-off-by: Alex.Li <zhiqinli@amazon.com>

* Fix refresh permission test by checking more regularly (#1779)

* PR description GHA (#1781)

* Run unit tests which require creds (#1780)

* Run unit tests which require creds

* TSAN supp to get past this and check if other tests pass

* Reenable tsan failure

* Isolate tsan

* Enable all tests

* Add locks around connectionClosed modification

* Update SignalingApiFunctionalityTest.cpp

* Have a different signaling send timeout for windows and non-windows platform

* Change timer for timeout test to be unrealistic to actually force a timeout

* Enable tests with codecov

* Update SignalingApiFunctionalityTest.cpp

fix broken test.  future commit will include code change so arn doesn't take the place of the channel name so the channel end point cache numbers will also be low

* Update SignalingApiTest.cpp

if using temp creds need to use the temp creds file format

---------

Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com>
Co-authored-by: James Delaplane <delaplan@amazon.com>

* Release branch update and readme update (#1785)

* DTLS socket no longer pre-preemptively closed (#1792)

* Fix issue with aggressive nomination viewers causing master to
potentially close the socket negotiating DTLS connection.

Added two tests to confirm this behavior can no longer occur for aggressive
nomination or standard ICE/nomination.

Changed the ICE statemachine Ready and Connected setups. Connected will
only set DataSending pair in an aggressive nomination case, and Ready
will no longer change the DataSending pair if it has already been
assigned (because if it has, DTLS handshaked could be actively
happening on that socket).

This means that in the current ICE state machine design DTLS negotiation
will only occur after nomination, where before it would start earlier
and the client would assume which pair the viewer would nominate.

* clang formatting

* Reset test values in each run

* update transactionId for SrflxCandidateRequest (#1684)

* update transactionId for SrflxCandidateRequest

* Fix the clang-format

* Fix wrong log headers

* Change usrsctp initialization function to not open raw sockets (#1796)

* Create a CMake flag to enable KVS Threadpool (#1806)

* create a cmake flag to enable kvs threadpool and pass it to the SDK

* create a cmake flag to enable kvs threadpool and pass it to the SDK

* missed one spot

* add debug logs to fix tests

* fix tests attempt 1 - initialize min and max for the threadpool

* silly syntax error

* setting min value for threadpool in test fixture

* fix clang format

* fixing client info initializations in other tests

* More initializations for tests

* Add sleep at end of tests to avoid false flags of memory leaks as threads end asynchronously

* add tsan supp

* tsan sup -2

* missing # in details in supp

* more sleeps to allow threadpool to close out all threads

* add suppressions to threadpool

* add suppressions to threadpool push

* race:pthread_mutex_unlock

* add test name instead of threadpool function names

* rename the cmake var to control only signaling threadpool

* try without . in the test name

* use mutex instead of race

* remove mutex:lock

* add back mutex:lock

* deadlock:iceServerConfigRefreshConnectedAuthExpiration

* deadlock:createSignalingSync

* Update producer dependency to include modified threadpool teardown

* Remove previous suppressions

* cleanup + rename

* update git tag

---------

Co-authored-by: James Delaplane <delaplan@amazon.com>

* Threadpool context for WebRTC (#1810)

* Threadpool context for WebRTC

* Disable for windows

* Include directory to shared library for windows

* Remove context object, use envs to allow configuring threadpool

* Include README changes

* Get back threadpool context

This reverts commit 23070567312595da555d1688cf21c335105543f7.

* Move thread sleep to unit tests

* Revert sleep from test to main file

* Remove threadpool usage from signaling

* Rebased off develop

* Add locks around threadpool calls

* Add a=ice-options:trickle to session level of SDP as viewer (#1813)

* Add a=ice-options:trickle to session level of SDP as viewer

* negative test case added

* clang format

* add chk_log_err to confirm what is null in the stack

* WebRTC Client singleton and early STUN DNS resolution (#1812)

* STUN DNS resolution and webrtc client singleton

* Add initializer flag for the main context

* Move lock out of Stun context

* Add semaphore for the singleton access

* Lock on the sempahore before freeing to ensure clean shutdown

* Cleanup  sem acquired bool flag

* Use atomic refcounter

* Clang format issues

* Have initialized check in thread

* Move context initialize setting to top of cleanup

* Remove '$' from ReadMe command

* Fix mbedtls build failure for 22.04 (#1823)

* Fix mbedtls build failure for 22.04

* Fix CI gcc 11 mbedtls

* Dont install gcc4.4

* Use the c flags in mbedtls object

* Move string op error elsewhere

* Fixed an issue where sctpSessionWriteMessage referenced an uninitialized value (#1814)

* Allow using channel names different than the thing name (#1819)

* Allow using channel names different than the thing name

* Reverted the changes related to channel name in the README

* Defaulting channel name to iot thing name

* IAM best practices added for IoT

---------

Co-authored-by: Ozan Cihangir <ozanci@amazon.lu>

* Dtls handshake process optimization (#1824)

* DTLS initialization optimization

* Fix mbedtls build, remove free ICE agent

* Fix breaking change of overwriting sctp packet

* API unit tests, move acquire to before null check

* Unused variable issue in UT

* Change ice server count value (#1826)

* CI modification (#1827)

* CI modification

* Fix label

* Add more clarity

* Handle situation where callback is invoked before hostname is populated (#1829)

* Revert CI for fork (#1831)

* Dtls err handling (#1832)

* Improve DTLS error handling

* Add check for SSL_do_handshake too

* Ice turn sleepless state machine (#1825)

* Starting point for turn state machine

* Add timerqueue kick and checks for ice agent state machine

* Completing turn connection state machine

* improved error logging

* Better error logging around ICE_STATE_FAILED

* Adding lock around step state machine to prevent race conditions with
iceAgentStatus

* Only lock the iterator during stepstate

* Add turn state transition after handling stun packets for turn

* add null check to iceagentrestart

* Use producer-c develop

* Fix data race

* Cleanup commented out code

* remove excessive buffer check in dtls_openssl

* Profile STUN DNS resolution time (#1828)

* Fix regression in stun dns resolve value (#1836)

* DLOGS readme update (#1838)

* add deps (#1837)

* Fix frame indexing in master sample to handle SRTP connection not ready yet (#1833)

* Add fix to kvsWebRTCClientMaster.c

* Change printf-s to DLOG-s

* Add log for frame drop due to srtp not ready yet

* Add missing sample prefix to log lines

* Semicolon

* CLANG

* Remove \n from logs

* " "

* CLANG

* Move lock out of checkStateMachine and instead have it present in from* functions (#1839)

* Update SessionDescription.c (#1842)

* Update SessionDescription.c

Adds trickle ice option to application m-line (data channel).

* Update SessionDescription.c

respect the boolean value for trickle ice so it's consistent across all media level and session level

* clang format

* M1 build (#1849)

* m1 build

* try m clang instead of gcc

* remove ldflags and cpath

* add back

* unlink openssl in m1

* -Wno-nullability-extension

* -Wno-nullability-extension in compile options

* -Wno-nullability-extension in compile options

* try cmake twice

* add wno to libsrtp in cmake_c_flags

* llvm

* llvm@15

* llvm@15 removed tests

* run cmake only once on m1

* run cmake twice with tests

* check the contents of build

* don't run the tests

* remove wno

* gcc

* Update Readme to include Windows build instructions (#1858)

* update windows readme

* update windows readme

* typo

* Sample: Ignore empty session token (#1857)

* Allow empty session token to be set without interfering

* Use getenv macro

* Set session token to empty string in test

* missing null check (#1874)

* Asynchronous get ice config (#1854)

* Asynchronous get ice config

* Fixing mac compile error, addressing comments, correcting spelling error

* clang format

* fixing test util functions to include new APIs

* Unused variables for certain compile time flags breaking mac compile

* fixing more compile errors for mac

* Fix a dead lock, and fix a test with the API changes

* iceAgentRestart does not remove the IceServers since the old design required them to be supplied at object creation. Initialize relay candidates at end of iceAgentRestart.

* Update PIC build in an attempt to fix static build on Mac

* Moving git tag back to develop, since develop has been updated

* remove geticeconfig from standard connect state machine flow

* Async test, and moving geticeserverconfig out of the standard signaling state machine flow

* clang format

* Incorrect state transition

* fixing async test

* Up the sleep time

* change async func for test to handle answer and offer

* change location of creating pointer pointer

* Fixing tests

* Fix gathering to allow reporting relay candidates even after all srflx candidates have been recieved

* unit test, longer sleep on teardown of threadpool

* Fixing tests

* Update samples based off feedback, fix clang compile error in test

* Moved iceUriCount increment, added comments to public API

* fix mac compile error from unused variable for specific ifdef

* Merge release into develop (#1865)

* No more detaching threads in tests (#1889)

* No more detaching threads in tests

* Missed joining in one test

* lock around adding thread to vector

* terminate adding threads flag

* reset bool in tests

* Change on Ice handler after done with test to stop accessing out of scope variables after scope is closed

* unused params

* Time-to-first-frame metrics benchmarking using datachannel (#1846)

* data channel benchmarking message

* fix calculation

* send peerconnection, iceagent, signaling metrics to viewer via dc

* signaling breakdown

* data channel benchmarking message

* fix calculation

* send peerconnection, iceagent, signaling metrics to viewer via dc

* signaling breakdown

* cmake flag, ifdef

* move signaling and offer / answer metrics out of signaling stats

* remove callTime for start and end times in signaling

* remove new lines

* clang format

* fix clang format

* fix macos-gcc-ci

* put cleanup in ifdef

* add cmake flag

* additional builds with cmake flags for mac and ubuntu, max string size for dc, no strlen calc in max string sizes

* fix clang-format

* mac-os-dc-metrics-build-gcc

* increase signaling metrics message size

* address comments: bool, add back calltimes, remove hns

* missed an hns

* dlogp

* fix the build

* remove extra space from ci

* cleanup-1

* clang-format

* fix git_tag from master to fix the ci

* Revert "fix git_tag from master to fix the ci"

This reverts commit 870deb3ddaf7c3676bebd267b0d61a76ad562751.

* move message defs to common

* remove unused var

* remove unused var

* cleanup-3

* cleanup-4

* fix macos build

* Revert "fix macos build"

This reverts commit 041c858ce47adb1a812b24da86d7ac91b824fd8c.

* use double quotes instead of single for char array

* forgot to rename in the string

* fix initialization + readme

* remove offerTime and use offerReceivedTime instead

* move globals to streamingsession

* rename + memset

* fix clang format

* add null check for streaming session

* null check for streaming session and psampleconfigurtion

* add error messages

* clang

* error message

* ubuntu sample check update

* fix sample check

* Update lws version (#1820)

* Update lws version

* Remove patch

* Use old gcc patch

* Old gcc patch update

* Fix windows patching failure

* Add verbose logging for patch failure

* Remove newline in the patch file

* Trying a windows friendly patch file

* Move to another patch file

* Revert "Move to another patch file"

This reverts commit d94a3da44226e10164f03d99a26e7eb699459055.

* Revert "Trying a windows friendly patch file"

This reverts commit a6c7de25bfbf756301b17db888ede803fbfd0a8a.

* Revert "Remove newline in the patch file"

This reverts commit 9e5d47e463271626684b0e0a335d0e2bc00d6e0c.

* Windows patch fix

* Update to 4.3.3

* Reintro gcc patch for lws_map

* Rebase develop

* DTLS API test

* Revert "DTLS API test"

This reverts commit 83f104b2bc53305d35fc7ca3e8bfa9a08ebcc924.

* WINDOW_UPDATE failure on mbedtls, enable an option

* Revert to 4.3.2 to check if mbedtls passes there

* Disable alpn

* codingspirit PR #1869 (#1872)

* fix compiling issue caused by "stringop-overflow" in old gcc

* Add quotes around version number

* Add mbedtls-ubuntu-gcc-4_4-build to CI

* Separate flag setting

* Add else clause for detected compiler


Co-authored-by: zhiqinli

* Create state machines with names (#1894)

* Create state machines with names

* Add turn object in logs

* Add links and enhance formatting (#1895)

* Add links and enhance formatting

* Update README.md

Co-authored-by: Stefan Kieszkowski <85728496+stefankiesz@users.noreply.github.com>

---------

Co-authored-by: Stefan Kieszkowski <85728496+stefankiesz@users.noreply.github.com>

* Turn improvements and profiling (#1896)

* Use timeout value instead of counter for allocation

* Add timeout for get credentials too and change all timeouts to a standard 5 seconds

* Added internal profiling and SM labels

* Add IPv4 check while adding peer

* Nit

* debug string cleanup

* Profile create perm and bind channel only first time and profile per peer

* Add README

* Fix compiler ubused variable warnings

* Fix the problem that the session is not released when handleOffer processing fails (#1668)

* Update Common.c

Fix the problem that the session is not released when handleOffer processing fails

* fix clang format

* add cleanup

* missed the &

* remove pSampleStreamingSession->offerReceiveTime = GETTIME();

* move the bool

---------

Co-authored-by: Kelephant <keviniot@163.com>

* Update issue template (#1898)

* Request more information on the issue template

* Update yaml indenting

* Update bug_report.yml

* Update bug_report.yml

* Update bug_report.yml

* Update bug_report.yml

* Update bug_report.yml

* Add information on sanitizers in CI

* Adjust linebreaks

* Fix packetsDiscarded tracking operation (#1903)

* CMAKE_BUILD_TYPE=Release build (#1897)

* Release build

* Enable build type setting on all dependencies and update README

* Remove SPRINTF usage throughout...

* Fix disable data channel unit test build failure and reduce SDP character array lengths wherever relevant following spec

* Set count to 7 since the structure member sizes are set to count + 1

* remove debug

* Add snprintf checks

* Set file size to 10 kb and increase log rotation to avoid high memalloc

* Remove unused threadpool in signaling (#1907)

* New release cut

* testing release with media storage support (#1783)

* Log ice candidate protocol appropriately (#1230)

* Log ice candidate protocol appropriately

* Add develop to travis CI

* Address comments

* Realign branches during transition (#1257)

* create data channel sample (#1203)

* create data channel sample

* moved variables to Samples.h, encapsulated with ENABLE_DATA_CHANNEL directive

* removed unused variables, moved variable declarations to the top of a block

* create data channel sample

* moved variables to Samples.h, encapsulated with ENABLE_DATA_CHANNEL directive

* Cancel the thread once mediaThreadStarted flag is set to false (#1227)

* Initial stale PR template (#1226)

* Update stale issue template

* Testing every minute

* Fix stale issue PR template (#1234)

No code changed. Just a template change. So merging

* Add bug and question label

* Switch stale PR action to daily cadence

* [FIX] When protocol in DCEP header of data channel open command is not empty, there is a check preventing the data channel to be opened. Now protocol length is correctly handled to avoid check failing. (#1228)

Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com>
Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu>
Co-authored-by: ela34 <8700736+ela34@users.noreply.github.com>

* set protocol value following the spec (#1259)

Co-authored-by: liyufang <liyufang@xiaomi.com>

* filter out invalid candidate in sdp (#1260)

Co-authored-by: liyufang <liyufang@xiaomi.com>

* Added targets for cmake clean (#1253)

* added targets for cmake clean

* added new line, updated readme

* added missing new line

* updated readme to include folder details

* updated readme to include folder details

* viewer sample: wrap datachannel callback with `ENABLE_DATA_CHANNEL` (#1261)

* create data channel sample (#1203)

* create data channel sample

* moved variables to Samples.h, encapsulated with ENABLE_DATA_CHANNEL directive

* removed unused variables, moved variable declarations to the top of a block

* create data channel sample

* moved variables to Samples.h, encapsulated with ENABLE_DATA_CHANNEL directive

* Cancel the thread once mediaThreadStarted flag is set to false (#1227)

* Initial stale PR template (#1226)

* Update stale issue template

* Testing every minute

* Fix stale issue PR template (#1234)

No code changed. Just a template change. So merging

* Add bug and question label

* Switch stale PR action to daily cadence

* [FIX] When protocol in DCEP header of data channel open command is not empty, there is a check preventing the data channel to be opened. Now protocol length is correctly handled to avoid check failing. (#1228)

* viewer sample: wrap datachannel callback with `ENABLE_DATA_CHANNEL`

Signed-off-by: zhiqinli@amazon.com <zhiqinli@amazon.com>

Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com>
Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu>
Co-authored-by: ela34 <8700736+ela34@users.noreply.github.com>

* libwebsockets: add patch to fix pipe fd leak issue (#1264)

Signed-off-by: Alex.Li <zhiqinli@amazon.com>

* Fix scripts/pare_status.py for non-status #defines (#1268) (#1274)

Co-authored-by: Kevin Allen <kallen@aurora.tech>

* fix a few bugs

* Revert "fix a few bugs"

This reverts commit 093902432fb24f42ade2857c23eca950e0b41a2f.

* fix some bugs (#1277)

* Fix bugs (#1279)

* fix edge case try to unlock a mutex which is not locked in teh acse the sample config was NULL (#1286)

* cmake: allow user to specify OPEN_SRC_INSTALL_PREFIX (#1293)

Signed-off-by: Alex.Li <zhiqinli@amazon.com>

* Fix inconsistent log priority (#1309)

Patch reduces priority of a few info level log messages to verbose
level to be consistent with other functions in file and rest of
code base.

* Modify protocol loggin design in develop (#1311)

* typo: typo fix (#1317)

Signed-off-by: Alex.Li <zhiqinli@amazon.com>

* Signaling state machine rework (#1323)

* replaced recursive calls to stepSignalingStateMachine with loops

* removed recursive calls to stepSignalingStateMachine

* replaced stepSignalingstatemachine with signalingStateMachineIterator

* removed stepUntil, continueOnReady; removed status from iterator signature; set signalingclient version; added a lock in refreshIceConfiguration

* changed the declaration for i from int to UINT32

* added signaling version; removed unnecessary comment

* removed redeclaration; changed value in an existing macro

* Fix issue with API call failures being treated as success (#1328)

* return proper error, do not reset call result value

* for non retriable failures, set the terminal exit status for state in… (#1320)

* for non retriable failures, set the terminal exit status for state in state machine

* address comments

* adjust tests set retry max to 1

* Update LwsApiCalls.c

trigger travis ci

* Incorporating PIC state machine level retry changes into webrtc signaling state machine (#1326)

* Incorporating PIC state machine level retry changes into webrtc signaling state machine

* Signaling state machine rework (#1323)

* replaced recursive calls to stepSignalingStateMachine with loops

* removed recursive calls to stepSignalingStateMachine

* replaced stepSignalingstatemachine with signalingStateMachineIterator

* removed stepUntil, continueOnReady; removed status from iterator signature; set signalingclient version; added a lock in refreshIceConfiguration

* changed the declaration for i from int to UINT32

* added signaling version; removed unnecessary comment

* removed redeclaration; changed value in an existing macro

* Fix issue with API call failures being treated as success (#1328)

* return proper error, do not reset call result value

* for non retriable failures, set the terminal exit status for state in… (#1320)

* for non retriable failures, set the terminal exit status for state in state machine

* address comments

* adjust tests set retry max to 1

* Update LwsApiCalls.c

trigger travis ci

* Add retry strategy to client info to avoiud changing create signaling channel API signature

* Incorporating PIC state machine level retry changes into webrtc signaling state machine

* Add retry strategy to client info to avoiud changing create signaling channel API signature

* Adding more debug logs in the code

* fix merge conflicts

* PR feedback

Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com>
Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com>

* Revert " Incorporating PIC state machine level retry changes into webrtc signaling state machine (#1326)" (#1339)

This reverts commit 06bffcecd7f60571e29e51eb15fa8e4549638213.

* Incorporating PIC state machine level retry changes into webrtc signaling state machine (#1341)

* Incorporating PIC state machine level retry changes into webrtc signaling state machine

* Add a n optional check for free retry strategy

* Remove unused goto label

* add missing sleep in get token state machine execute API

* update log line

* Update Producer hash

* Adding a high level retry strategy while creating signaling client

* Add Retry count retrieval in hook (#1335)

* Add Retry count retrieval in hook

* Fix compile issue on travis

* Pull in latest changes in retry structures

* Rebasing off develop with successful travis run for retry

* Log git hash (#1345)

* Log git hash

* Update CMakeLists.txt

white space change to trigger travis

Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com>

* Fix retry count to indicate count only after a retry has occured (#1348)

Fix retry count to indicate count only after a retry has occurred

* add support for automatic clock skew detection and correction (#1344)

* add support for automatic clock skew detection and correction

* auto fix clock skew and add tests

* enable test to check clock recovery

* remove stuff left over from debugging, reset logging default to WARN

* remove unused variable

* get rid of verbose logging in unit tests causes static build to fail due to excessive log output

* simplify code get rid of extra call to length because the lws_hdr_copy returns the same value

* handle null stream track in case of recvonly (#1346)

* handle null stream track in case of recvonly

* a test with null stream track for revconly

* Fix a comment

* whitespace change

* State machine preparation is decoupled from the constructor (#1343)

* Merge master into develop (#1352)

* Missing the public API switch in the other samples (#1356)

* Fix Fetch error retry cases (#1359)

* Fix Fetch error retry cases

* update comment

* added implementation and a test to use remote sdp to construct local sdp (#1238)

* added implementation and a test to use remote sdp to construct local sdp

* used same strings in offer and test

* updated tests

* Update stale action workflow (#1381)

* Modify issue triaging management

* test on branch

* Update ga for stale issue to use aws-actions instead of the one publicly available

* Travis to ga (#1347)

* Test github actions

* Clang format

* Change platform

* Add macos gtest

* Ubuntu latest

* Address sanitizer

* Add ubsan, tsan and old gcc build

* Fix macos build

* Allow mac and ubsan to fail

* Fixing clang format

* Testing allow on failure

* Run github actions only on PR and merge

* Test mbedtls

* Rebase on develop and fix clang failure

* Test if travis builds without ga

* Restore travis

* Test mac build and add sample check

* Fix sample check and revert mac to allow fail

* Travis CI to GHA migration phase 1

* Set clang for mbedtls and test msan

* Split files

* Comment out failing tests

* Add codecov

* Travis CI to GHA migration phase 1

* new Chrome v98 produces extra sdp attributes, up the limit so we do n… (#1391)

* new Chrome v98 produces extra sdp attributes, up the limit so we do not reject

* Fix test and change count to unit16 to avoid overflow issues

* fix issue reported by codeql

Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu>

* GitHub actions setup (#1390)

* add additional tests

* fix syntax error

* fix syntax error

* fix syntax error

* fix syntax error

* fix syntax error

* static build and msan without docker

* fix msan

* use dependencies with msan build

* use gcc 9 for mac

* use gcc 4.2 for mac gcc build

* use gcc 4.9 for mac gcc build

* check gcc version; use macos 10.15

* use clang-7 for ubsan

* arm cross compilation

* missed cloning the repository

* use gcc

* remove compiler from env

* fix install deps

* use clang7, macos10.15, ubuntu18.04

* fix windows build

* fix test instruction

* fix static build

* fix static build

* fix static build

* fix static build

* setup docker for static build

* use alpine for the static build

* use alpine for the static build

* install dependencies

* install dependencies

* fix errors in static build

* install dependencies

* enable ipv6

* use gcc for static build

* fix ubsan

* fix ubsan

* collate all working github actions builds

* fix errors

* have static,msan,windows,doxygen in travis

* comment failing builds;fix ci rules

* fix travis comments, os, remove exports

* update log level, mac build-name

* add CC

* update gcc

* update gcc

* check cc and cxx for mac gcc

* Revert "check cc and cxx for mac gcc"

This reverts commit 2db1e0e4b7a9291a389cbae0f3793edd7f88c7ae.

* remove travis statement

* Fix swapped SSL_free() and SSL_CTX_free() (#1401)

* Hangup value included in LWS retry strategy (#1403)

* GitHub actions setup static build (#1405)

* fix static build

* remove static build from travis

* fix warnings in mac builds; setup iam role for sample-check

* Migrate Doxygen to GitHub Actions (#1416)

* add doxygen workflow to ga

* install graphviz

* install ttf-freefont

* specify doxyfile

* use enc key

* use enc key

* use marketplace action to deploy

* use marketplace action to deploy

* use marketplace action to deploy

* check current folder

* check current folder

* check current folder

* check current folder

* check current folder

* check current folder

* check current folder

* fix deployment

* fix deployment

* fix deployment

* fix deployment

* specify doxyfile path

* fix syntax

* fix paths in doxyfile

* fix forked branch ci

* add develop branch

* Fix ResourceEndpoint length check (#1411)

ResourceEndpoint length check mistakenly uses ChannelName max length.

* update cross-compilation builds ga (#1429)

* Addressing error handling concerns for an edge case (#1443)

* Addressing error handling concerns for an edge case

* Clang format

* Removed useless status_success check, changed test to look for correct error value

* sample: fix possible timerQueue deadlock when freeSampleStreamingSession (#1448)

Signed-off-by: zhiqinli@amazon.com <zhiqinli@amazon.com>

* metrics: allow viewer sample to get ice candidate pair stats (#1406)

Signed-off-by: Alex.Li <zhiqinli@amazon.com>

* account for hexidecimal numbers (#1465)

* Fix default data channel ordering mode (#1476)

* Invoke gst_object_unref on allocated elements (#1477)

* Fix typo (#1478)

* Fix typo

* Add unit test

* find gcc version for static build

* revert gtest version update and change alpine version

* fix memory leak issue and abort trap in test

* fix video delay 4s (#1525)

* fix mips compile error (#1532)

* fix mips compile error

* fix mips compile error

* fix mips compile error

* Fix file caching (#1575)

* Fix file caching

* Update test to count entries, remove unnecessary memcpy

* UT uses MEMFREE

* Fix deadlock getIceCandidatePairStatsCallback (#1561)

* sample: fix possible timerQueue deadlock when freeSampleStreamingSession

* minor change (formatting)

* wrtc stream ingestion support

* clean up

* default to disable data channel for wrtc ingestion

* Fix missing SDP m-line problem (#1458)

* use fake transceiver for missing m-line

* use hashtable to track previously seen transceivers

* fix failing tests with updates to seenTransceivers hashtable

* use hashtables for unknown codec rtpmap and payloadtype

* fix firstCodec value in case of only a single codec in m-line

* rename variables

* clang build

* fix mac-gcc build

* add test

* add test for missingAudioTransceiver

* add comments

* add comments

* remove unused variable to fix mac buils

* wrtc stream ingestion support (#1605)

* update readme (#1608)

* update readme

* update description

* remove gst based storage sample (#1619)

* Fix GHA CI build issues (#1631)

* separate builds and tests

* fix clang format issues

* update libgtest version to 1.12.1

* fix deprecation in libgtest

* update test suite call

* run tests from build

* remove build from tst instruction

* fix san options

* fix windows build

* fix path in windows build

* update bat file for windows

* build openssl on windows

* add openssl path for windows build

* specify path to openssl root folder

* specify path to openssl root folder

* specify path to openssl root folder

* upgrade cmake version

* fix windows build

* update checkoutv2 to v3

* fix checkout and install pthreads

* remove windows build temporarily

* move to v1-node16 for aws credentials

* add sudo clean

* add sudo to both commanda

* use event triggers

* Fix ice candidate issue with GStreamer sample (#1629)

* fix gst sample

* add branch to ci

* fix clang

* fix os versions in ci

* remove unused vars to fix mac-clang build

* remove unused vars to fix mac-gcc build

* separate builds and tests

* separate builds and tests

* change test instruction for ci

* change test instruction for ci

* fix failing builds

* add branch

* Fix CI for forked branches (#1634)

* use only target

* use only target

* remove branch name

* blank space change to trigger CI

* fix WSAPoll failed when set POLLPRI flag (#1636)

Co-authored-by: weishao <xweimvp@gmail.com>

* Update README.md (#1637)

Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com>

* add paths for fedora (#1638)

Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com>

* Add clarifying comment for fallthrough (#1639)

* Bkneff patch 2 (#1640)

* Update kvsWebRTCClientMasterGstreamerSample.c

Provide an example gstreamer pipeline for Raspberry Pi hardware encoding.  Tested on Raspberry Pi 3

* Clang

---------

Co-authored-by: bkneff <44409173+bkneff@users.noreply.github.com>

* thread cancel memory leak, recreate signaling client & lws_context whenever a significant error has occurred, verbose and debug logging for ice & turn (#1641)

* recreate signaling client & lws_context whenever a significant error has occurred

* clang-format

* recreate signaling client & lws_context whenever a significant error has occurred

* Clang

* adding local and remote null checks

* More verbose and debug logging for ice & turn

* Thread cancel on the media sender thread leads to memory leaks from writeFrame() not freeing all its heap usage

* Clang again

---------

Co-authored-by: James Delaplane <delaplan@amazon.com>

* wrong port/address on debug log (#1642)

Co-authored-by: Alex Zhukov <azhukov@roblox.com>

* Update openssl version (#1643)

* Update openssl version and fix unused param typo

* Pull in producer C openssl update

* fix(project): fix issue--1614 (#1644)

Co-authored-by: niedb <niedb@reolink.com.cn>

* update versions for actions (#1647)

* Seggregaated Audio and Video frame handling, updated Master sample to handle audio and video both (#1646)

Co-authored-by: Vikram(VS) <vssht@amazon.com>

* Mark Datachannel specific code explicitly (#1666)

Co-authored-by: Dmitry Ilyin <dima@doty.ru>

* Fix turn allocation taken long time when credential is incorrect (#1667)

* fix turn allocation use long time sometimes

* update some code style

* fix compile error

* Update IceAgent.c

* fix clang format

* fix prflx update interrupted connectivity check

* fix clang format

---------

Co-authored-by: Gordon <vc60er@163.com>

* Update RtcpPacket.h (#1680)

* Update RtcpPacket.h

* Clang format

* Changed sample frames to have 1 second GOP size, and removed overly verbose log (#1686)

* Jitter buffer overflows (#1677)

* Modified jitterbuffer to include checks for timestamp overflow

* All tests passing, some new tests still need to be added

* More tests and accompanying fixes

* Resolve coverity finding of multiplication causing type overflow

* Change function order

* Clang format

* Mac compile errors fixed

* Commenting out long-running test, adding timestamp overflow test

* Fix port printf in log (#1682)

* Fix port printf in log

* Fix the clang-format

Fix the clang-format use ./scripts/clang-format.sh -d src/

* fix turn permission delay 2s (#1675)

* fix turn permission delay 2s

* Fix the clang-format

Fix the clang-format use ./scripts/clang-format.sh -d src/

* Instruction to build on MacOS M1 (#1689)

* Fix build dependencies off and add version requirements in readme (#1691)

* Unlock mutex in case of error (#1696)

* Unlock in case of error

* fix typos (#1697)

Co-authored-by: Ben Mesander <bmesander@cardinalpeak.com>

* IoT CertificateId as Stream Name. (#1721)

* IoT CertificateId as Stream Name.

* Fix the clang-format use ./scripts/clang-format.sh -d src/

---------

Co-authored-by: Lina Chen <chenln1124@thundersoft.com>

* If local ICE is invalid, return from sending packet. (#1718)

* If local ICE is invalid, return from sending packet.

* Fix the clang-format use ./scripts/clang-format.sh -d src/

---------

Co-authored-by: Lina Chen <chenln1124@thundersoft.com>

* Adds RTSP Source to GStreamer Sample (#1740)

* Adds rtsp source support, modifies source-type determination

* All use cases tested and debugged.

* Clang formatting.

* Clang formatting.

* Updates credentials configuration to fix sample-check error.

* Sample-check fix attempt #2

* Sample-check fix attempt 3

* Sample-check fix attempt 4

* Sample-check fix attempt

* ""

* " "

* " "

* " "

* Update README.md

* Updates sample run instructions structure, adds RTSP source instructions

* Update README.md

* Renames sample file to be same as executable, updates CMakeLists to reflect this.

* Update README.md

Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com>

* Update README.md

* Updates usage statement to new sample executable name

---------

Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com>

* replace stun with sctp (#1743)

* Modify the PR template (#1745)

* modify the PR template

* Use bullets

* Update raspberry pi hardware encode to current gstreamer (#1746)

* Update raspberry pi hardware encode to current gstreamer

* - Provide build instructions for 32-bit raspbian on 64-bit hardware

---------

Co-authored-by: Ben Mesander <bmesander>

* Set a default user agent if not provided (#1739)

* Connection timeout sleep (#1744)

* Remove thread_detach and looping sleep, add thread_join

* Added support for socketpair() and added it to connectionlistener

* Clang formatting

* Fix test that previously expected TID to be invalid

* remove unused variables

* Fixing incorrect typing on comparison

* clang formatting

* strlen -> STRLEN macro

* Off by 1 error in poll rfds

* clang formatting

* Do Not Send SCTP Packets when Data Channel is Disabled (#1749)

* no sctp packets when data channel is disabled

* fix clang format

* Fix comment typo regarding default source in Gst sample (#1750)

* Parse IP address if the hostname conforms to Public ipv4 DNS format (#1759)

* Parse IP address if the hostname conforms to Public ipv4 DNS format

* Unit test for ipIpAddr function

* Include and use threadpool for signaling channel messages (#1761)

* Include and use threadpool for signaling channel messages

* Fix clang and linux gcc compile errors

* Fix pointer cast

* Using SignalingClientInfo to pass information about Threadpool

* edit README.md

* Not necessary to change struct version

* Update struct version again, add fall-through

* clang formatting

* Clang formatting, again

* Fix the Windows build in the CI (#1764)

* modify libwebsockets to work on Windows

* set LWS_WITH_STATIC 1

* resume windows ci

* add rest of the options

* fix syntax in ci.yml

* remove other options

* set cmd vard

* missing space in bat

* add missing = in build_windows.bat

* introduce cmake arguments

* find_package openssl for non-windows builds

* static + shared for rest of the builds

* set static + shared true for shared builds always

* add back ssl and crypto paths

* rename vars in libwebsockets' cmake, rearrange, pthread fix

* static=1 always

* remove ssl and crypto paths

* with_threadpool=1

* correction

* correction 2

* correction 3

* correction 4

* correction 5 static

* install gstreamer on windows

* test mbedtls on windows

* use if(WIN32) with set vars

* 1671

* remove openssl arg from mbedtls build

* fix mbedtls windows later

* Introducing profiling of code sections and APIs (#1755)

* Adds RTSP Source to GStreamer Sample (#1740)

* Adds rtsp source support, modifies source-type determination

* All use cases tested and debugged.

* Clang formatting.

* C…
* Viewer fix

* ICE agent update

* new flag

* stopgathering flag set

* Windows fix
* Add H265 and AAC frames (#1962)

* aac and h265 frames

* update readme

* update cmake with h265 and aac

* clang formay

* [Sample] GStreamer media receiver (#1963)

* create the gst receiver

* fix ci

* cmake flag

* clang format, add cmake flag in ci

* install gstreamer on ci

* use macos12

* use defined values

* indent

* clang-format

* readme and commentsa

* clang :(

* install glib to fix ci

* -DCOMPILER_WARNINGS=FALSE to fix the CI

* fix macos version for clang

* address comments and cleanup

* new viewer with gst

* clang-format

* missing null check

* address comments

* -DCOMPILER_WARNINGS=TRUE

* clang-format

* gst_init_check

* fix CI

* fix CI

* [Bug] GStreamer sample (#1972)

* gst-sample-fix

* modify the message

* fix windows

* set to null

* fix pts and eos in sample

* unused var removed

* move null init

* Version check job (#1974)

* Version check job

* Working Version check template

* Retest with dev

* Version lint

* Version lint

* use new frames (#1978)

* Sample TWCC implementation (#1957)

* encoder bitrate change based on twcc

* Change to 5% inc and dec

* modify percentages

* ema based calc

* EMa fix

* Nits

* Readme

* flip

* memset remove

* Readme update, move enable flags to createSampleConfiguration

* Add codecov token

* [Feature] Add H265 support with SDP, RTP payloader-deplayloader (#1965)

* Add RtpH265Payloader.c and RtpH265Payloader.h

* Add support for H265 in PeerConnection/SessionDescription

* Add support for H265 in PeerConnection/PeerConnection

* Add support for H265 in PeerConnection/Rtp

* Add support for H265 in samples/Common.c

* Add support for H265 in samples/kvsWebRTCClientMaster.c

* rtp, sdp fix, flag removed, clang fixed, windows build fixed, new test added

* test fix

* cleanup

* cleanup

* remove #if 0

* clang

* presentation ts fix

* clang-format fix

* PKG_CONFIG_PATH in kvscommon

* missing bracket

* fix all builds

* ci

* cleanup

* fix windows build, rename h265 defs

* remove duplicate line from h264 and h265

* sample changes

* address comments

* clang-format

* gst sample

* cleanup args

* clang-format

* cleanup

* add sdp tests

* address comments

* address commentas

* set default payload type only once

* address comments

* fix height and width

* sdp change

---------

Co-authored-by: Hongli Wang <hongliwo@amazon.com>

* Version bump, fix tests, remove enableIceStats

* Remove AAC related changes

* Remove AAC frames

* Clang format

* fix kvsWebrtcClientMasterGstSample.c name in CMakeLists

---------

Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu>
Co-authored-by: Hongli Wang <hongliwo@amazon.com>
@codecov-commenter
Copy link

codecov-commenter commented Jun 25, 2024

Codecov Report

Attention: Patch coverage is 0% with 155 lines in your changes missing coverage. Please review.

Project coverage is 75.09%. Comparing base (bfa6667) to head (096cafe).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
samples/Common.c 0.00% 155 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2018      +/-   ##
==========================================
+ Coverage   74.81%   75.09%   +0.27%     
==========================================
  Files          46       48       +2     
  Lines       12119    13835    +1716     
==========================================
+ Hits         9067    10389    +1322     
- Misses       3052     3446     +394     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@disa6302 disa6302 marked this pull request as ready for review July 2, 2024 20:51
# This step is necessary because the next set of dependencies have a dependency on
# mbedtls/openssl and the find_package command populates certain cmake variables which
# are needed to pass to the cmake commands for the next set of dependencies
if (USE_OPENSSL)
Copy link
Contributor

Choose a reason for hiding this comment

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

We should be able to remove the existing find_package calls on the crypto libs that start down on line 262 right?

Copy link
Contributor

Choose a reason for hiding this comment

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

No because this is in the if build dependencies section, so this needs to run in both cases and since it's idempotent I kept it there.

Copy link
Contributor

@stefankiesz stefankiesz Sep 9, 2024

Choose a reason for hiding this comment

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

Sounds good, might want to consider breaking up the build_deps case into two blocks to handle the before find_package logic and the after find_package logic.

Copy link
Contributor

@stefankiesz stefankiesz left a comment

Choose a reason for hiding this comment

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

Reviewed the build changes portion of the PR. Will do WebRTC changes next.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/codecov.yml Outdated Show resolved Hide resolved
.github/workflows/codeql-analysis.yml Outdated Show resolved Hide resolved
CMake/Dependencies/libkvsCommonLws-CMakeLists.txt Outdated Show resolved Hide resolved
@@ -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 v1.5.2
GIT_TAG link-mbedtls-properly
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.

@@ -379,7 +399,7 @@ endif()
if(ENABLE_KVS_THREADPOOL)
file(GLOB THREADPOOL_SOURCE_FILES "src/source/Threadpool/*.c")
add_library(kvsWebRtcThreadpool ${LINKAGE} ${THREADPOOL_SOURCE_FILES})
target_link_libraries(kvsWebRtcThreadpool PRIVATE kvspicUtils)
target_link_libraries(kvsWebRtcThreadpool PUBLIC kvspicUtils)
Copy link
Contributor

Choose a reason for hiding this comment

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

All consuming libraries of kvsWebRtcThreadpool (A.K.A. EXTRA_DEPS) already link with kvspicUtils, so seems PRIVATE linking would be more appropriate here since we don not need to expose the consuming libraries to kvspicUtils through kvsWebRtcThreadpool. Is there another reason this change was made?

Copy link
Contributor

Choose a reason for hiding this comment

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

It doesn't work on SoCs without this change for static build.

@stefankiesz stefankiesz mentioned this pull request Sep 6, 2024
CMake/Dependencies/libkvsCommonLws-CMakeLists.txt Outdated Show resolved Hide resolved
@@ -21,7 +21,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.25.0
GIT_TAG v2.28.8

Choose a reason for hiding this comment

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

Latest is 3.6.1. Why 2.28.8?

Copy link
Contributor

Choose a reason for hiding this comment

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

We never tested with the latest major version bump, but 2.28.x is an LTS track so I updated to the latest.

@@ -102,7 +102,13 @@ message(STATUS "Kinesis Video WebRTC Client path is ${KINESIS_VIDEO_WEBRTC_CLIEN
message(STATUS "dependencies install path is ${OPEN_SRC_INSTALL_PREFIX}")

# pass ca cert location to sdk
add_definitions(-DKVS_CA_CERT_PATH="${CMAKE_SOURCE_DIR}/certs/cert.pem")

if(NOT DEFINED KVS_CA_CERT_PATH)

Choose a reason for hiding this comment

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

How was it working, before this addition?

Copy link
Contributor

Choose a reason for hiding this comment

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

Customers could specify an environment variable as well, or they would make the change in the CMakeLists themselves manually, or when you're running from the sample place it was built, the path will be right.

samples/Common.c Outdated
STATUS initializePeerConnection(PSampleConfiguration pSampleConfiguration, PRtcPeerConnection* ppRtcPeerConnection)
{
ENTERS();
STATUS retStatus = STATUS_SUCCESS;
RtcConfiguration configuration;
#ifndef ENABLE_KVS_THREADPOOL
UINT32 i, j, maxTurnServer = 1;
UINT32 i, j, iceConfigCount, uriCount = 0, maxTurnServer = 1;

Choose a reason for hiding this comment

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

nit:
maxTurnServer = 1; Should be a macro or const static

src/source/Ice/TurnConnectionStateMachine.c Outdated Show resolved Hide resolved
@@ -105,6 +105,8 @@ message(STATUS "dependencies install path is ${OPEN_SRC_INSTALL_PREFIX}")

if(NOT DEFINED KVS_CA_CERT_PATH)
add_definitions(-DKVS_CA_CERT_PATH="${CMAKE_SOURCE_DIR}/certs/cert.pem")
else()
add_definitions(-DKVS_CA_CERT_PATH="${KVS_CA_CERT_PATH}")
Copy link
Contributor

Choose a reason for hiding this comment

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

Note for later: Let's see if we can make this a runtime parameter option as well.

@@ -38,6 +38,7 @@ ExternalProject_Add(project_libwebsockets
-DCMAKE_INSTALL_PREFIX=${OPEN_SRC_INSTALL_PREFIX}
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DDISABLE_WERROR=ON
Copy link
Contributor

@sirknightj sirknightj Sep 9, 2024

Choose a reason for hiding this comment

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

Could you share which error we're seeing here?

Can't we also make this one ON only the failing builds (mac), conditional with comment linking to the lws issue in their repo?

Copy link
Contributor

Choose a reason for hiding this comment

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

Added in description, but it's not on mac, this fails on mips gcc older toolchains and I think it's specific with uclibc toolchains (this was required to build in Ingenic T31) with gcc 5.4 uclibc toolchain. Details and link to lws issue has been added to the description.

@@ -1033,6 +1033,8 @@ STATUS checkTurnPeerConnections(PTurnConnection pTurnConnection)
PStunAttributeChannelNumber pStunAttributeChannelNumber = NULL;
UINT32 i = 0;

UNUSED_PARAM(sendStatus);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a check log error for this line?

The value is not being checked below.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree, we should log this.

@@ -365,6 +365,8 @@ INT32 onSctpInboundPacket(struct socket* sock, union sctp_sockstore addr, PVOID
if (data != NULL) {
free(data);
}

if (STATUS_FAILED(retStatus)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a log check error here please?

@@ -1493,6 +1494,9 @@ STATUS joinStorageSessionLws(PSignalingClient pSignalingClient, UINT64 time)
PCHAR pResponseStr;
UINT32 resultLen;

UNUSED_PARAM(pResponseStr);
UNUSED_PARAM(pLwsCallInfo);
UNUSED_PARAM(resultLen);
Copy link
Contributor

Choose a reason for hiding this comment

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

These seem like something we should log. Why else are we having these variables be stored locally?

samples/Common.c Outdated
@@ -416,6 +374,37 @@ STATUS initializePeerConnection(PSampleConfiguration pSampleConfiguration, PRtcP
SNPRINTF(configuration.iceServers[0].urls, MAX_ICE_CONFIG_URI_LEN, KINESIS_VIDEO_STUN_URL, pSampleConfiguration->channelInfo.pRegion,
pKinesisVideoStunUrlPostFix);

if (pSampleConfiguration->useTurn) {
// Set the URIs from the configuration
CHK_STATUS(signalingClientGetIceConfigInfoCount(pSampleConfiguration->signalingClientHandle, &iceConfigCount));
Copy link
Contributor

Choose a reason for hiding this comment

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

iceConfigCount is not used.

CHK_STATUS(createTurnConnection(&pIceAgent->iceServers[iceServerIndex], pIceAgent->timerQueueHandle,
TURN_CONNECTION_DATA_TRANSFER_MODE_SEND_INDIDATION, protocol, &callback, pNewCandidate->pSocketConnection,
pIceAgent->pConnectionListener, &pTurnConnection));
pNewCandidate->pIceAgent = pIceAgent;
pNewCandidate->pTurnConnection = pTurnConnection;

MUTEX_LOCK(pIceAgent->lock);
Copy link
Contributor

@stefankiesz stefankiesz Sep 9, 2024

Choose a reason for hiding this comment

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

Not clear why this mutex lock was moved to after the createTurnConnection call.

@hassanctech hassanctech changed the base branch from master to main September 10, 2024 20:37
unicornss
unicornss previously approved these changes Sep 13, 2024
Copy link
Contributor

@unicornss unicornss left a comment

Choose a reason for hiding this comment

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

Approving the timer-queue changes based on the benchmarking in SoCs

commit/4cd8eed6fa388d6d1d6596e0bd396cd402f08ae0 commit/6bc0d2dc4fd4de585117e3c1c01dbb188f6fbe2e commit/4b5ed4749f4ccc6abdcf07f2c6e7e5808cecd8cd
commit/e40fab5f8c38a34abade9ce6c2c161b60c030fa5
commit/ad2922a492b274845f14366c9af6f4d6db0378d6 commit/38e942c835fba43993859dd857bcecbfa09f26ad

sirknightj
sirknightj previously approved these changes Sep 13, 2024
Copy link
Contributor

@sirknightj sirknightj left a comment

Choose a reason for hiding this comment

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

Approving the commits between
4cd8eed and
38e942c

stefankiesz and others added 2 commits September 17, 2024 16:48
* Add cmake flag for iot creds

* Remove the manual uncomment required line
@sirknightj
Copy link
Contributor

This PR includes bumping MBED TLS, which currently does not build previously on my Macbook (https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-c/tree/master, commit ec75ba1)

Cloning into 'project_libmbedtls'...
HEAD is now at 1c54b5410 Merge pull request #786 from ARMmbed/dev/yanesca/mbedtls-2.25.0r0-pr
CMake Deprecation Warning at CMakeLists.txt:23 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


/work/open-source/libmbedtls/build/src/project_libmbedtls/library/bignum.c:1547:29: error: variable 't' set but not used [-Werror,-Wunused-but-set-variable]
    mbedtls_mpi_uint c = 0, t = 0;
                            ^
1 error generated.
gmake[5]: *** [library/CMakeFiles/mbedcrypto.dir/build.make:174: library/CMakeFiles/mbedcrypto.dir/bignum.c.o] Error 1
gmake[4]: *** [CMakeFiles/Makefile2:166: library/CMakeFiles/mbedcrypto.dir/all] Error 2
gmake[3]: *** [Makefile:136: all] Error 2
gmake[2]: *** [CMakeFiles/project_libmbedtls.dir/build.make:87: build/src/project_libmbedtls-stamp/project_libmbedtls-build] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/project_libmbedtls.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
CMake Error at CMake/Utilities.cmake:75 (message):
  CMake step for libmbedtls failed: 2
Call Stack (most recent call first):
  CMakeLists.txt:163 (build_dependency)

After trying out this PR, it builds successfully.

2024-09-20 08:12:18,351 [INFO] [100%] Built target project_libmbedtls

@sirknightj sirknightj changed the title 1.10.3 1.11 RC Sep 26, 2024
.github/workflows/ci.yml Outdated Show resolved Hide resolved
sirknightj and others added 4 commits October 2, 2024 00:05
…t additional cmake options (#2058)

* Add instructions for using IoT credentials in the samples and documentat additional cmake options

* Address comments in the readme
* Change branch target from master to main

* Remove instances of master in the readme and within the ci jobs

* Change references from master to main

* Adjust print statements to reference main instead of master
@sirknightj sirknightj changed the title 1.11 RC 1.11.0 Release Oct 3, 2024
@sirknightj sirknightj changed the title 1.11.0 Release v1.11.0 Release Oct 3, 2024
Copy link
Contributor

@unicornss unicornss left a comment

Choose a reason for hiding this comment

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

Release based on the performance tests review.

@sirknightj sirknightj merged commit 30f52d1 into main Oct 4, 2024
28 checks passed
@sirknightj sirknightj deleted the 1.10.3 branch October 4, 2024 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants