-
Notifications
You must be signed in to change notification settings - Fork 335
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
fix(kvs/sink_gstreamer_sample): Use videotestsrc and add additional debug logging #1047
Conversation
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## develop #1047 +/- ##
===========================================
- Coverage 16.56% 16.33% -0.24%
===========================================
Files 51 51
Lines 6778 6844 +66
===========================================
- Hits 1123 1118 -5
- Misses 5655 5726 +71
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having gstreamer_life_source_init
return 1 to indicate failure is fine. However I traced the code and found that this function is called inside gstreamer_init
which is in turn called usually in main and in most cases it is called without checking the return value. Can we please correct all of those as well so we do not have silent failures.
gstreamer_init(argc, argv, &data); |
gstreamer_init(argc, argv, &data); |
Added. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
* Update for develop (#740) * Minor syntax fix .. is required for fetching files from parent dir ... without .. it throws error * Update README and travis.yml to acknowledge develop * Fix typo in readme * add free missing (#746) Co-authored-by: David D <david.desbiens@tentaq.com> * Update readme (#744) * Fix typo in readme * Update Readme Debug section: add solution to cmake error "could not find JNI" Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> * Add instruction to set offline mode (#741) Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> Co-authored-by: Ketul shah <ketulshah1993@gmail.com> Co-authored-by: Jeremy Gunawan <jggunawa@amazon.com> Co-authored-by: waikup83 <waikup@hotmail.com> Co-authored-by: David D <david.desbiens@tentaq.com> Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu> * updated cmake verison from 2.8 to 3.6.3 * Fix bug that leads to losing initial frames * Update to top of producer C commit * Untie stream-name and thing-name (#785) * untie stream-name and thing-name * fixup spacing Co-authored-by: tom schuring <tschuring@mtdata.com.au> * update docs for iot-thing-name usage * Expose file logging jni develop (#770) * expose addFileLoggerPlatformCallbacksProvider in Java with JNI * updated addFileLoggerPlatformCallbacksProvider to parse file path * added a callback from JNI to a Java function for logging * updated logPrintFunc calback * missed client_handle initialization in constructor * added comments * white space change to trigger travis * GitHub actions setup (#815) * github actions setup; disable travis for develop * fix syntax error: * fix syntax error * fix linux builds * fix linux builds * fix linux builds * add missing packages * add keys to env vars * check env vars * check env vars * fix builds * fix builds on ga * test mac clang on ga * test mac clang on ga * test mac clang on ga * test mac clang on ga * test mac clang on ga * unsetting the token * unsetting the token * test macos clang * test macos clang * stop travis builds on each push * use oidc * fix windows build * fix test instruction * comment failing builds on travis and ga * update gcc and macos versions * update cmake * update cmake * use latest os, update log levels, uncomment travis * update failing build * update failing build * trigger travis * trigger travis * Revert "trigger travis" This reverts commit d511f15. * update msvc path, add windows to ga, remove from travis * trigger travis * trigger travis w/o passing builds * add cpath and ldflags for mac build * Revert "add cpath and ldflags for mac build" This reverts commit fafad7b. * test ubsan build * fix cmake instruction for mac-gcc * remove travis file * remove travis checks * Fix OIDC for GitHub Actions (#824) * use oidc right before tests * run ga builds for branch * fix test path * update branches * set creds expiration time * Add ARM build to GA, log4cplus host name fix for cross compilation (#831) * setup arm cross compilation * update the package list * fix in * specify host in log4cplus * specify host in log4cplus * specify host in log4cplus * run all builds with new host config in log4cplus * build with gstreamer and dependencies * build with gstreamer and dependencies * build with gstreamer and dependencies and openssl * build with gstreamer and openssl * specify build and host * specify build and host * specify build host and target * specify same build and host * specify build and host in all cmake files * use a different compiler * use a different compiler * echo compiler * set CC and CXX correctly * set CC and CXX correctly * set openssl platform * set openssl platform * set openssl platform * expose host name for log4cplus * change log4cplus host name * fix cmake syntax error * fix cmke log4plus condition * fix cmake log4plus condition * fix cmake log4plus condition * change var name cmake * change var name in ci * update cmake instruction in ci * check conditions for log4cplus in cmake * check conditions for log4cplus in cmake * use set instead of option in cmake * check messages * fix ci cmake instruction * fix ci cmake instruction * add definition * use env var * use env var * use build args * update readme * remove host-name from qemu arm build * update readme for cross-compile instructions * add aarch64; move log config file * remove qemu * fix config file path (#835) * expose streaming flags in java with jni (#849) * expose streaming flags in java with jni * fix indentation * Elaborated on how to work with IoT credentials. (#851) It is not a straight-forward process to enable KVS and IoT credentials. It is required to read and follow through https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/how-iot.html. * Add storePressurePolicy call to JNI (#859) * add store pressure policy * update ci to add update * set flag in pClientInfo (#863) * Allow using CPP SDK as a dependency (#905) * Allow using CPP SDK as a dependency * Update README * Fix static build (#910) * Add static build to CI * gstkvssink should have static linkage in a static build * log4cplus should be a static lib in a static build * Don't force full static link * Update libkvscproducer-CMakeLists.txt Update Producer C Commit hash Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> * create new sample that uses kvssink and increase timeout for CI tests (#917) * Fix GHA CI (#944) * fix failing builds + upgrade gtest to 1.12 * install missing package * change os and gcc versions * exclude windows build * use event triggers * Fix CI for forked branches (#946) * fix ci for fork * blank space change to trigger CI * Add support for milliseconds in the file upload sample (#947) * Minor syntax fix .. is required for fetching files from parent dir ... without .. it throws error * Fix typo in readme * add free missing (#746) Co-authored-by: David D <david.desbiens@tentaq.com> * Update readme (#744) * Fix typo in readme * Update Readme Debug section: add solution to cmake error "could not find JNI" Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> * Add instruction to set offline mode (#741) Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> * Update README and travis.yml to acknowledge develop (#739) Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> * Gstreamer RTSP Docs Update (#712) Hoping this help others avoid hours of frustration. As noted in the helpful but well hidden issue comment #193 (comment), the Gstreamer examples for RTSP do not run at all. I'm no Gstreamer expert but using `h264parse` works perfectly, while `video/x-h264, format=avc,alignment=au` just causes the pipeline to hang. * free missing property (#767) Co-authored-by: David D <david.desbiens@tentaq.com> * Update gstkvssink.cpp * Added millisecond support to kvs_gstreamer_file_upload_sample + gstkvssink --------- Co-authored-by: Ketul shah <ketulshah1993@gmail.com> Co-authored-by: waikup83 <waikup@hotmail.com> Co-authored-by: David D <david.desbiens@tentaq.com> Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu> Co-authored-by: jdelapla <delaplan@amazon.com> Co-authored-by: Anton Vattay <3martini@gmail.com> Co-authored-by: bkneff <bkneff@amazon.com> * Add gstreamer debug instructions for mac (#948) Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu> * Pass parameter by reference to avoid copy constructor (#949) * pass parameter by reference to avoid copy constructor * nit style --------- Co-authored-by: James Delaplane <delaplan@amazon.com> * Update openssl version (#950) * Replace pull_request_target with pull_request (#955) * replace pull_request_target with pull_request; update versions for codeql * add develop to codeql * Kvssink canary producer cpp (#984) * Cmake changes after release 3.3.1 * Added fragment ack handler, reverting changes related to edge * Added gsignal element for fragment ack * Fixed cmake dependency for canarydemos * Reverted c++ versrion to 11 * Commented out g signal in fragment act handler * Re-Added the g signal * Kvs sink initialized to avoid bad memory access * Intialized custom objet kvssink * Moved part of cloud watch metrics and logs * Resolved constructor issue * Added remaining functions for cloud watch logs * Reverted changes for cloudwatch shift * Reverted Cmake changes * Reverted remaining changes * Added stream metric signal * G signal changes * G signal parameter changes * Removed persisted ack check * Changed return type in g signal * Added custome object for put frame * Metric struct update * Intialized custome object metrics * Added check for key frame * Added client metrics element * Name changed * Added first frame emit * First frame changes * Reverted first frame changes * Left change * Added g signal emit on first successfull frame * Fixed compile error * Startup latency test_1 * Added first frame check * Resolved comments on PR 984 * Resolved comments on PR 984-remaining * Resolved comments in PR 984_03-16 * resolved comment in PR-276_03-21 * Uncomment windows (#990) * Signals in develop (#957) * Signals in develop * Add signals and static analysis fixes * Signals in develop * Add better logging * Pull in new producer C commit * Update gstkvssink.cpp * use get metric property * Use log and throw and catch --------- Co-authored-by: NikunjSarda <sardanik@amazon.com> * Timeouts setup (#992) * Adding timeouts configurability * Add jni for new timeouts and create stream flag * Revert log4cplus version and cxx standard * Revert versions * Revert C++ version to 11 * fix warnings (#994) * Disable caching by default (#995) * Update CMakeLists.txt (#997) * Update CMakeLists.txt when building shared the kvs_gstreamer_sample.cpp example fails LINKING fix #930 * Additional CI Build --------- Co-authored-by: tro <throos@amazon.de> * fix timestamp bug (#999) * Enable caching by default (#1020) * Invoke stopSync in NULL state transition (#1023) * Add EOS specific handling * New logging * New logging 1 * New logging 2 * New logging 4 * New logging 5 * New logging 5 * Check with bool * listen on NULL state transition * Version user agent string from kvssink (#1033) * Use permalinks in buffering.md (#1038) * fix ci * resolve missed git conflicts * remove duplicate decl * update producer c * Auth segfault fix (#1046) * Auth segfault fix * Added unit tests * Update raspberry-pi.md (#1048) * Update raspberry-pi.md * Update raspberry-pi.md --------- Co-authored-by: Josh McMenemy <josh.mcmenemy@gmail.com> * fix(kvs/sink_gstreamer_sample): Use videotestsrc and add additional debug logging (#1047) * Switch from autovideosrc to videotestsrc and add additional debug logging * Add null check for ksvideosrc and adjust comments * Revise logging again * Exit early if one of the elements cant be created, log which one * Check return value of gstreamer_init * Update commit to use release 1.5.0 of producer SDK --------- Co-authored-by: jdelapla <delaplan@amazon.com> Co-authored-by: Ketul shah <ketulshah1993@gmail.com> Co-authored-by: Jeremy Gunawan <jggunawa@amazon.com> Co-authored-by: waikup83 <waikup@hotmail.com> Co-authored-by: David D <david.desbiens@tentaq.com> Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu> Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com> Co-authored-by: clogwog <tomschuring@gmail.com> Co-authored-by: tom schuring <tschuring@mtdata.com.au> Co-authored-by: Byong-Wu Chong <69205204+byongwu@users.noreply.github.com> Co-authored-by: Greg Breen <greg@footyforecaster.com> Co-authored-by: Benjamin Kim <114961775+benwkim@users.noreply.github.com> Co-authored-by: Anton Vattay <3martini@gmail.com> Co-authored-by: bkneff <bkneff@amazon.com> Co-authored-by: NikunjSarda <sardanik@amazon.com> Co-authored-by: Jeremy Gunawan <sirknightj@gmail.com> Co-authored-by: tro <throos@amazon.de> Co-authored-by: Yuma Mihira <yuma-m@users.noreply.github.com> Co-authored-by: Josh McMenemy <josh.mcmenemy@gmail.com>
Issue #, if available
When running the sample on a mac in live_source mode (
./kvs_gstreamer_sample demo-stream
), we would get "Elements could not be linked." error. We tested this on both m1 mac, and intel mac, each usingGStreamer Core Library version 1.22.5
and encountered this error both times.What was changed, and how was it changed?
videotestsrc
instead ofautovideosrc
kvssink_gstreamer_sample
, as these samples are very similar.kvssink_gstreamer_sample
:gracefully
.Why was it changed?
data->h264_stream_supported
istrue
, therefore, this pipeline was getting created.autovideosrc
has ANY pads, so, when data.h264_stream_supported being determined, the intersection will always returntrue
.autovideosrc
's pads do not accurately reflect the available elements on the device, as that is determined during the application runtime. Both this if statement and this if statement returntrue
withautovideosrc
.autovideosrc
,videotestsrc
oravfvideosrc
outputvideo/x-h264
, therefore it cannot be directly linked toh264parse
.gst-launch-1.0 <src element> ! capsfilter name=filter caps="video/x-h264" ! fakesink
and seeing "WARNING: erroneous pipeline: could not link <src element> to filter
". The application should be choosing to construct the top pipeline with the encoder element, rather than the bottom pipeline.autovideosrc
tovideotestsrc
, the correct caps are advertised, and the sample application (usinggst_caps_can_intersect
) is able to choose the correct pipeline to construct.Testing
./kvs_gstreamer_sample demo-stream
and./kvssink_gstreamer_sample demo-stream
and verified playback in the AWS management console.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.