sdroege / gst-snippets Goto Github PK
View Code? Open in Web Editor NEWSome small GStreamer example applications
License: MIT License
Some small GStreamer example applications
License: MIT License
Thanks so much for this example and your work in general.
Quick question here: I just added some state change debug to the pipeline bus loop:
--- dynamic-tee-vsink.c.old 2023-08-20 21:34:20
+++ dynamic-tee-vsink.c 2023-08-20 21:36:36
@@ -45,6 +45,15 @@
message_cb (GstBus * bus, GstMessage * message, gpointer user_data)
{
switch (GST_MESSAGE_TYPE (message)) {
+ case GST_MESSAGE_STATE_CHANGED:{
+ if (GST_MESSAGE_SRC (message) == GST_OBJECT (pipeline)) {
+ GstState old_state, new_state, pending_state;
+ gst_message_parse_state_changed (message, &old_state, &new_state, &pending_state);
+ g_print ("Pipeline state changed from %s to %s (pending: %s)",
+ gst_element_state_get_name (old_state), gst_element_state_get_name (new_state), gst_element_state_get_name (pending_state));
+ }
+ break;
+ }
case GST_MESSAGE_ERROR:{
GError *err = NULL;
gchar *name, *debug = NULL;
I am surprised to see pipeline state changes while the playback doesn't seem to be paused:
% ./dynamic-tee-vsink somevideo.mp4
Pipeline state changed from NULL to READY (pending: PLAYING)
Pipeline state changed from READY to PAUSED (pending: PLAYING)
Pipeline state changed from PAUSED to PLAYING (pending: VOID_PENDING)
add
added
Pipeline state changed from PAUSED to PAUSED (pending: PAUSED)
Pipeline state changed from PAUSED to PAUSED (pending: PLAYING)
Pipeline state changed from PAUSED to PLAYING (pending: VOID_PENDING)
remove
removed
add
added
Pipeline state changed from PAUSED to PAUSED (pending: PAUSED)
Pipeline state changed from PAUSED to PAUSED (pending: PLAYING)
Pipeline state changed from PAUSED to PLAYING (pending: VOID_PENDING)
remove
removed
Is there any reason the pipeline gets its state changed during the add operations (see the 3 lines after added
), and why are there PAUSED to PAUSED state changes?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.