Skip to content

Commit 30f52d1

Browse files
disa6302jdelaplaniyatim23ela34northteam
authored
v1.11.0 Release (#2018)
* Release 1.10.0 (#1910) * 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. …
1 parent 8248241 commit 30f52d1

File tree

1,585 files changed

+5144
-1251
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,585 files changed

+5144
-1251
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

+22-1
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,22 @@ labels: ["bug", "needs-triage"]
66
assignees: []
77
body:
88
- type: checkboxes
9+
id: confirm
910
attributes:
1011
label: Please confirm you have already done the following
1112
options:
1213
- label: I have searched the repository for related/existing bug reports
1314
- label: I have all the details the issue requires
1415
validations:
1516
required: true
17+
- type: checkboxes
18+
id: prompt
19+
attributes:
20+
label: Please answer the following prompt
21+
options:
22+
- label: This issue is replicable using the unmodified sample application
23+
validations:
24+
required: false
1625
- type: textarea
1726
id: description
1827
attributes:
@@ -37,14 +46,20 @@ body:
3746
3847
Please include full errors, uncaught exceptions, stack traces, and relevant VERBOSE logs.
3948
To get relevant VERBOSE logs from the SDK, you can retrieve by running `export AWS_KVS_LOG_LEVEL=1`
49+
50+
If you are reporting a memory leak, please provide sufficient evidence such as a `valgrind` output.
51+
Note that the CI for this repository uses [Google Sanitizers](https://github.com/google/sanitizers) to minimize software issues and vulnerabilities.
4052
validations:
4153
required: true
4254
- type: textarea
4355
id: reproduction
4456
attributes:
4557
label: Reproduction Steps
4658
description: |
47-
Provide a self-contained, concise snippet of code that can be used to reproduce the issue.
59+
Provide a self-contained, concise snippet of code that can be used to
60+
reproduce the issue, or the command used to run the unmodified sample application. Please share
61+
which SDK you are using as master and as viewer, and also any timing-related information, if
62+
applicable.
4863
For more complex issues provide a repo with the smallest sample that reproduces the bug.
4964
Avoid including business logic or unrelated code, it makes diagnosis more difficult.
5065
validations:
@@ -55,6 +70,12 @@ body:
5570
label: WebRTC C SDK version being used
5671
validations:
5772
required: true
73+
- type: input
74+
id: sdk-previous-version
75+
attributes:
76+
label: If it was working in a previous version, which one?
77+
validations:
78+
required: false
5879
- type: input
5980
id: compiler-version
6081
attributes:

.github/ISSUE_TEMPLATE/questions-help.md

-18
This file was deleted.

.github/build_windows.bat

-6
This file was deleted.

.github/build_windows_openssl.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Buil
22
mkdir build
33
cd build
44
cmd.exe /c cmake -G "NMake Makefiles" ..
5-
cmake -G "NMake Makefiles" -DBUILD_TEST=TRUE -DENABLE_AWS_SDK_IN_TESTS=OFF -DEXT_PTHREAD_INCLUDE_DIR="C:/tools/pthreads-w32-2-9-1-release/Pre-built.2/include/" -DEXT_PTHREAD_LIBRARIES="C:/tools/pthreads-w32-2-9-1-release/Pre-built.2/lib/x64/libpthreadGC2.a" ..
5+
cmake -G "NMake Makefiles" -DBUILD_TEST=TRUE -DENABLE_AWS_SDK_IN_TESTS=OFF -DPKG_CONFIG_EXECUTABLE="D:\\gstreamer\\1.0\\x86_64\\bin\\pkg-config.exe" -DEXT_PTHREAD_INCLUDE_DIR="C:/tools/pthreads-w32-2-9-1-release/Pre-built.2/include/" -DEXT_PTHREAD_LIBRARIES="C:/tools/pthreads-w32-2-9-1-release/Pre-built.2/lib/x64/libpthreadGC2.a" ..
66
nmake

.github/workflows/ci.yml

+107-16
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ on:
44
push:
55
branches:
66
- develop
7-
- master
7+
- main
88
pull_request:
99
branches:
1010
- develop
11-
- master
11+
- main
1212
jobs:
1313
clang-format-check:
14-
runs-on: macos-11
14+
runs-on: macos-12
1515
steps:
1616
- name: Clone repository
1717
uses: actions/checkout@v3
@@ -23,7 +23,7 @@ jobs:
2323
run: |
2424
bash scripts/check-clang.sh
2525
mac-os-build-clang:
26-
runs-on: macos-11
26+
runs-on: macos-12
2727
env:
2828
CC: /usr/bin/clang
2929
CXX: /usr/bin/clang++
@@ -49,7 +49,7 @@ jobs:
4949
cd build
5050
./tst/webrtc_client_test
5151
mac-os-build-gcc:
52-
runs-on: macos-11
52+
runs-on: macos-12
5353
env:
5454
CC: gcc
5555
CXX: g++
@@ -74,8 +74,37 @@ jobs:
7474
run: |
7575
cd build
7676
./tst/webrtc_client_test
77+
mac-os-m1-build-clang:
78+
runs-on: macos-13-xlarge
79+
env:
80+
AWS_KVS_LOG_LEVEL: 2
81+
PKG_CONFIG_PATH: /usr/local/opt/pkgconfig
82+
permissions:
83+
id-token: write
84+
contents: read
85+
steps:
86+
- name: Clone repository
87+
uses: actions/checkout@v3
88+
- name: Configure AWS Credentials
89+
uses: aws-actions/configure-aws-credentials@v2
90+
with:
91+
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
92+
aws-region: ${{ secrets.AWS_REGION }}
93+
- name: Install dependencies
94+
run: |
95+
brew install gstreamer glib
96+
- name: Build repository
97+
run: |
98+
brew unlink openssl
99+
mkdir build && cd build
100+
sh -c 'cmake .. -DBUILD_TEST=TRUE -DCMAKE_C_COMPILER=$(brew --prefix llvm@15)/bin/clang -DCMAKE_CXX_COMPILER=$(brew --prefix llvm@15)/bin/clang++'
101+
make
102+
- name: Run tests
103+
run: |
104+
cd build
105+
./tst/webrtc_client_test
77106
static-build-mac:
78-
runs-on: macos-11
107+
runs-on: macos-12
79108
env:
80109
AWS_KVS_LOG_LEVEL: 2
81110
permissions:
@@ -137,7 +166,7 @@ jobs:
137166
undefined-behavior-sanitizer:
138167
runs-on: ubuntu-20.04
139168
env:
140-
UBSAN_OPTIONS: halt_on_error=1
169+
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
141170
CC: clang
142171
CXX: clang++
143172
AWS_KVS_LOG_LEVEL: 2
@@ -356,6 +385,39 @@ jobs:
356385
run: |
357386
cd build
358387
timeout --signal=SIGABRT 60m ./tst/webrtc_client_test
388+
389+
mbedtls-ubuntu-gcc-4_4-build:
390+
runs-on: ubuntu-20.04
391+
env:
392+
AWS_KVS_LOG_LEVEL: 2
393+
CC: gcc-4.4
394+
permissions:
395+
id-token: write
396+
contents: read
397+
steps:
398+
- name: Clone repository
399+
uses: actions/checkout@v3
400+
- name: Configure AWS Credentials
401+
uses: aws-actions/configure-aws-credentials@v2
402+
with:
403+
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
404+
aws-region: ${{ secrets.AWS_REGION }}
405+
- name: Install deps
406+
run: |
407+
sudo apt clean && sudo apt update
408+
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
409+
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
410+
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ trusty main'
411+
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ trusty universe'
412+
sudo apt-get -q update
413+
sudo apt-get -y install gcc-4.4
414+
sudo apt-get -y install gdb
415+
- name: Build repository
416+
run: |
417+
mkdir build && cd build
418+
cmake .. -DUSE_OPENSSL=OFF -DUSE_MBEDTLS=ON
419+
make
420+
359421
mbedtls-ubuntu-clang:
360422
runs-on: ubuntu-20.04
361423
env:
@@ -391,27 +453,55 @@ jobs:
391453
timeout --signal=SIGABRT 60m ./tst/webrtc_client_test
392454
sample-check:
393455
if: github.repository == 'awslabs/amazon-kinesis-video-streams-webrtc-sdk-c'
394-
runs-on: ubuntu-20.04
456+
runs-on: ubuntu-latest
395457
env:
396458
AWS_KVS_LOG_LEVEL: 2
397459
permissions:
398460
id-token: write
399461
contents: read
400462
steps:
401463
- name: Clone repository
402-
uses: actions/checkout@v3
464+
uses: actions/checkout@v4
403465
- name: Configure AWS Credentials
404-
uses: aws-actions/configure-aws-credentials@v2
466+
uses: aws-actions/configure-aws-credentials@v4
405467
with:
406468
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
407469
aws-region: ${{ secrets.AWS_REGION }}
470+
role-duration-seconds: 10800
408471
- name: Build repository
409472
run: |
410473
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
411474
mkdir build && cd build
412475
cmake ..
413476
make
414-
cd ..
477+
- name: Sample check
478+
run: |
479+
./scripts/check-sample.sh
480+
sample-check-no-data-channel:
481+
if: github.repository == 'awslabs/amazon-kinesis-video-streams-webrtc-sdk-c'
482+
runs-on: ubuntu-latest
483+
env:
484+
AWS_KVS_LOG_LEVEL: 2
485+
permissions:
486+
id-token: write
487+
contents: read
488+
steps:
489+
- name: Clone repository
490+
uses: actions/checkout@v4
491+
- name: Configure AWS Credentials
492+
uses: aws-actions/configure-aws-credentials@v4
493+
with:
494+
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
495+
aws-region: ${{ secrets.AWS_REGION }}
496+
role-duration-seconds: 10800
497+
- name: Build repository
498+
run: |
499+
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
500+
mkdir build && cd build
501+
cmake .. -DENABLE_DATA_CHANNEL=OFF
502+
make
503+
- name: Sample check without data channel
504+
run: |
415505
./scripts/check-sample.sh
416506
ubuntu-os-build:
417507
runs-on: ubuntu-20.04
@@ -466,8 +556,9 @@ jobs:
466556
- name: Install dependencies
467557
shell: powershell
468558
run: |
469-
choco install gstreamer --version=1.16.2
470-
choco install gstreamer-devel --version=1.16.2
559+
choco install pkgconfiglite
560+
choco install gstreamer --version=1.16.3
561+
choco install gstreamer-devel --version=1.16.3
471562
curl.exe -o C:\tools\pthreads-w32-2-9-1-release.zip ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.zip
472563
mkdir C:\tools\pthreads-w32-2-9-1-release\
473564
Expand-Archive -Path C:\tools\pthreads-w32-2-9-1-release.zip -DestinationPath C:\tools\pthreads-w32-2-9-1-release
@@ -493,8 +584,8 @@ jobs:
493584
- name: Run tests
494585
shell: powershell
495586
run: |
496-
$env:Path += ';C:\webrtc\open-source\bin;C:\tools\pthreads-w32-2-9-1-release\Pre-built.2\dll\x64'
497-
& "C:\webrtc\build\tst\webrtc_client_test.exe" --gtest_filter="-DataChannelFunctionalityTest.*:IceApiTest.*:IceFunctionalityTest.*:PeerConnectionFunctionalityTest.*:SignalingApiFunctionalityTest.*:TurnConnectionFunctionalityTest.*:RtpFunctionalityTest.marshallUnmarshallH264Data:RtpFunctionalityTest.packingUnpackingVerifySameH264Frame:RtcpFunctionalityTest.onRtcpPacketCompound:RtcpFunctionalityTest.twcc3"
587+
$env:Path += ';C:\webrtc\open-source\bin;C:\tools\pthreads-w32-2-9-1-release\Pre-built.2\dll\x64;C:\webrtc\build'
588+
& "C:\webrtc\build\tst\webrtc_client_test.exe" --gtest_filter="-SignalingApiFunctionalityTest.receivingIceConfigOffer_SlowClockSkew:SignalingApiFunctionalityTest.iceServerConfigRefreshConnectedAuthExpiration:SignalingApiFunctionalityTest.receivingIceConfigOffer_FastClockSkew:SignalingApiFunctionalityTest.receivingIceConfigOffer_FastClockSkew_VerifyOffsetRemovedWhenClockFixed:DataChannelFunctionalityTest.*:DtlsApiTest.*:IceApiTest.*:IceFunctionalityTest.*:PeerConnectionFunctionalityTest.*:TurnConnectionFunctionalityTest.*:RtpFunctionalityTest.marshallUnmarshallH264Data:RtpFunctionalityTest.packingUnpackingVerifySameH264Frame:RtpFunctionalityTest.packingUnpackingVerifySameH265Frame:RtcpFunctionalityTest.onRtcpPacketCompound:RtcpFunctionalityTest.twcc3"
498589
# windows-msvc-mbedtls:
499590
# runs-on: windows-2022
500591
# env:
@@ -576,4 +667,4 @@ jobs:
576667
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
577668
mkdir build && cd build
578669
cmake .. -DBUILD_OPENSSL=TRUE -DBUILD_OPENSSL_PLATFORM=linux-generic32 -DBUILD_LIBSRTP_HOST_PLATFORM=x86_64-unknown-linux-gnu -DBUILD_LIBSRTP_DESTINATION_PLATFORM=arm-unknown-linux-uclibcgnueabi
579-
make
670+
make

.github/workflows/codecov.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@ on:
33
push:
44
branches:
55
- develop
6-
- master
6+
- main
77
pull_request:
88
branches:
99
- develop
10-
- master
10+
- main
1111
jobs:
1212
linux-gcc-codecov:
1313
runs-on: ubuntu-20.04
1414
env:
1515
AWS_KVS_LOG_LEVEL: 2
16+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
1617
permissions:
1718
id-token: write
1819
contents: read
@@ -42,4 +43,4 @@ jobs:
4243
- name: Code coverage
4344
run: |
4445
for test_file in $(find CMakeFiles/kvsWebrtcClient.dir CMakeFiles/kvsWebrtcSignalingClient.dir -name '*.gcno'); do gcov $test_file; done
45-
bash <(curl -s https://codecov.io/bash)
46+
bash <(curl -s https://codecov.io/bash)

.github/workflows/codeql-analysis.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ name: "CodeQL"
22

33
on:
44
push:
5-
branches: [ develop, master ]
5+
branches: [ develop, main ]
6+
67
pull_request:
78
# The branches below must be a subset of the branches above
8-
branches: [ develop, master ]
9+
branches: [ develop, main ]
910

1011
jobs:
1112
analyze:

.github/workflows/doxygen-gh-pages.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Doxygen GitHub Pages Deploy Action WebRTC C SDK
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
- develop
88

99
jobs:
@@ -12,18 +12,17 @@ jobs:
1212
steps:
1313
- name: Checkout repository
1414
uses: actions/checkout@v3
15-
15+
1616
- name: Install requirements
1717
run: sudo apt-get install doxygen graphviz -y
1818
shell: bash
1919

2020
- name: Generate Doxygen Documentation
2121
run: doxygen Doxyfile
2222
shell: bash
23-
23+
2424
- name: Deploy
2525
uses: JamesIves/github-pages-deploy-action@v4.2.5
2626
with:
2727
folder: doc/html
2828
branch: gh-pages
29-

.github/workflows/pr-desc-lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
pull_request:
55
branches:
66
- develop
7-
- master
7+
- main
88
types:
99
- opened
1010
- synchronize

0 commit comments

Comments
 (0)