feat: add pipeline-level endOfStream() method#21
Merged
Conversation
Owner
|
Thank's a lot for contribution. Didn't have a time to take a look it yet. Will do ASAP! |
Owner
|
The CI issue is unrelated to the feature. I'm gonna fix it in a separate PR so this branch could be rebased from it. |
Owner
|
The fix should be done here: #22 |
Owner
|
@IrishBAM turns out the fix was easier than anticipated. We've just needed to update node-gyp version. Please rebase from main branch and revert all unrelated CI fix attempts |
Send a GStreamer EOS event directly to the pipeline element, enabling clean stream termination regardless of source type (hardware cameras, network streams, test sources). - Add end_of_stream native method to Pipeline C++ class (state-gated: only sends when PLAYING or PAUSED) - Register endOfStream as enumerable instance property - Add endOfStream(): boolean to TypeScript Pipeline interface - Add integration tests (state dispatch, bus propagation, repeated calls) - Add examples/pipeline-eos.mjs - Update README with API reference and usage example
…ndows) to account for CI and Bun runtime scheduling variance.
6c59d0f to
e5f1082
Compare
repugraf
reviewed
Jun 16, 2026
repugraf
approved these changes
Jun 16, 2026
repugraf
left a comment
Owner
There was a problem hiding this comment.
LGTM.
I'll merge this tomorrow and publish a new npm package version with this feature.
Owner
|
@IrishBAM the feature have been published on npm in version 0.2.8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add pipeline-level
endOfStream()methodSend a GStreamer EOS event directly to the pipeline element, enabling clean stream termination regardless of source type (hardware cameras, network streams, test sources).
Changes
end_of_streammethod to the Pipeline C++ class, state-gated so it only sends when the pipeline is PLAYING or PAUSEDendOfStream(): booleanon the Pipeline interface as an enumerable instance propertyexamples/pipeline-eos.mjsdemonstrating usage@mantalabs/gst-kit, bumped to0.2.8-alpha1API
Returns
truewhen the pipeline is in a state that accepts events (PLAYING/PAUSED),falseotherwise (NULL/READY/stopped).Testing