Skip to content

Commit 38a51ad

Browse files
authored
kvssink soft start/stop support (merging in #1153) (#1257)
* Clean start/stop copy (#1256) * Starting * Started clean sample * more * Streaming to KVS working * Intermittent streaming working. * Add comments, cleanup * EOS stream message working * Improvements * Revert changes to original sample * more * more * Cleanup kvssink * Cleanup intermittent sample and kvssink * more * Remove rtsp related things * Switch to cv wait for all waits * Address some PR comments * Link with kvspicUtils * kvssink to send eofr upon eos, fix testsrc not stopping issue * Address review comments * Don't require stream name arg * Add sample instructions to README.md * Fix typos in ReadMe, add language to code blocks * Install pkgconfiglite * Address comments * Fix double space typo * nit ReadMe change * Remove no longer used streamingStopped member * Formatting fix * Add sample to CI * Added a duration for CI jobs to use, formatting * Set sample args in the CI, improve logging * Add error handling for gst_element_set_state calls * Fix CI args and logging * Fix argc check * Make clockoverlay element optional * Fix sigint termination * Fix duration timer shutdown * Minor fixes * Fix sigint shutdown * Disable mkv dump check for intermittent sample * Disable it on all platforms
1 parent b99b37e commit 38a51ad

File tree

5 files changed

+428
-35
lines changed

5 files changed

+428
-35
lines changed

.github/workflows/samples.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ jobs:
5858
args: sample.mp4
5959
- name: kvssink_gstreamer_sample
6060
args: sample.mp4
61+
- name: kvssink_intermittent_sample # There is no file source option for this sample (will use gst videotestsrc).
62+
args: testsrc 120 # <gst-videotestsrc> <sample_duration_seconds>
6163
runner:
6264
- id: macos-13
6365
image: macos-13
@@ -174,7 +176,7 @@ jobs:
174176
& $exePath demo-stream-producer-cpp-${{ matrix.runner.id }}-ci-${{ matrix.sample.name }} ${{ matrix.sample.args }} ${{ matrix.sample.metadata_args }}
175177
176178
- name: Verify MKV dump exists (Mac & Linux)
177-
if: runner.os == 'Linux' || runner.os == 'macOS'
179+
if: (runner.os == 'Linux' || runner.os == 'macOS') && matrix.sample.name != 'kvssink_intermittent_sample'
178180
working-directory: ./build/debug_output
179181
run: |
180182
shopt -s nullglob # Ensure globbing works correctly and avoids errors when no files are found
@@ -193,7 +195,7 @@ jobs:
193195
shell: bash
194196

195197
- name: Verify MKV dump exists (Windows)
196-
if: runner.os == 'Windows'
198+
if: runner.os == 'Windows' && matrix.sample.name != 'kvssink_intermittent_sample'
197199
working-directory: D:\producer\build
198200
run: |
199201
$env:Path += ";C:\Program Files\MKVToolNix"
@@ -433,6 +435,8 @@ jobs:
433435
args: sample.mp4
434436
- name: kvssink_gstreamer_sample
435437
args: sample.mp4
438+
- name: kvssink_intermittent_sample # There is no file source option for this sample (will use gst videotestsrc).
439+
args: testsrc 120 # <gst-videotestsrc> <sample_duration_seconds>
436440
image:
437441
- Ubuntu-22.04
438442
- Ubuntu-24.04
@@ -537,6 +541,7 @@ jobs:
537541
fi
538542
539543
- name: Verify MKV dump exists (WSL)
544+
if: matrix.sample.name != 'kvssink_intermittent_sample'
540545
run: |
541546
cd ~/kvs-cpp-repo/build/debug_output
542547
shopt -s nullglob # Ensure globbing works correctly and avoids errors when no files are found

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ if(BUILD_GSTREAMER_PLUGIN)
212212
add_executable(kvssink_gstreamer_sample samples/kvssink_gstreamer_sample.cpp)
213213
target_link_libraries(kvssink_gstreamer_sample ${GST_APP_LIBRARIES} KinesisVideoProducer)
214214

215+
add_executable(kvssink_intermittent_sample samples/kvssink_intermittent_sample.cpp )
216+
target_link_libraries(kvssink_intermittent_sample ${GST_APP_LIBRARIES} KinesisVideoProducer)
217+
215218
add_executable(kvs_gstreamer_sample samples/kvs_gstreamer_sample.cpp)
216219
target_link_libraries(kvs_gstreamer_sample ${GST_APP_LIBRARIES} KinesisVideoProducer kvspic)
217220

0 commit comments

Comments
 (0)