GithubHelp home page GithubHelp logo

gst-snippets's People

Contributors

sdroege avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gst-snippets's Issues

Spurious pipeline state changes with dynamic-tee-vsink.c

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.