[gst-devel] Change File Locations for Container Formats that Have Headers
wmiller at sdr.com
Tue Jul 13 14:19:42 CEST 2010
Thanks a million Edward. I still don't really understand the debug output, but a little of it went a long way. And in particular, thanks for telling me how to get it to work with a pipeline in a program.
HINT IF YOU MISSED IT: Put the GST_DEBUG settings in an environment variable.
unset GST_DEBUG # to turn debug off
Just adding two more cents worth: I got to using gst_parse_launh() because I never could get request pads to work. The example in the book is good, but it skipped two important points. So for future warriors:
1. Put the code (inline or call) that links the request pad right in line with the pipeline building process, before changing the state to "PLAYING".
I never could quite figure out whether it had to come before or after the pipeline was moved to GST_STATE_PLAYING and whether or not the request pads were present before some signal was issued.
2. You're going to want to use the same caps over and over. Go ahead and codify a GstCaps and pass it around. Fill in as many of the fields as you can so there is no question of incompleteness.
And in this particular case, the filesink goes to ASYNC until new data arrives. Don't gst_element_get_state( fildsink, NULL, NULL, -1 ).
Finally, a thought. I code in mangled C++ using mostly C syntax for "G" functions in the methods and using friend functions for the callbacks. The nature of the friend function beast is that the friend needs a pointer to its class. For that reason, I keep most of my element, caps, etc vars as class members, public if possible, so that I pass "this" to the friend functions as the third gpointer arg. (FWIW, I always call the pointer in the functions "that" just so it's obvious what's up). This way there are no global variables that can interfere with other code and I still get great access.
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Change-File-Locations-for-Container-Formats-that-Have-Headers-tp2283747p2287327.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gstreamer-devel