[gst-devel] Implementation Notes

Ryan Norton wxprojects at comcast.net
Thu Feb 10 06:45:56 CET 2005


BTW Ronald - thanks for your response, and also for your kiss program which
was quite a good reference...

Just some notes - I encountered the following in my implementation - and I
thought I'd just note what I had to do.  Forgive me if these are obvious :).

1.  The most annoying one - the GstStreamInfo associated with the
video/playbin didn't have an "object" property - i.e. it would crash when I
called GST_PAD_REALIZE on it afterwards... after googling forever, I found
out from an old totem diff that there is a "pad" property that it has that
does the same thing (?), so

my workaround was
                g_object_get (info, "object", &pad, NULL);
turned into
            //Maybe newer gstreamer 0.8+ is supposed to have "object"...?
            //but a lot of old plugins still use "pad"?
            pspec = g_object_class_find_property (
                        G_OBJECT_GET_CLASS (info), "object");

            if (!pspec)
                g_object_get (info, "pad", &pad, NULL);
                g_object_get (info, "object", &pad, NULL);

2.   After setting the playbin to GST_STATE_READY any calls on it afterwards
(changing the state, changing the uri, etc.) would trigger a ton of
assertions until the program crashed.  My workaround was just to create a
new playbin and correspoding video and audio sinks whenever a new file was
loaded...  not the best solution, but it worked :).

3.  When pausing the playbin and seeking immediately in it,querying the
current position always returned the old postion (most of the time the last
position before pause).  Basically what I did was cache the current position
right before pause and everytime it was set afterwards until the playbin was
set back to a play state and return the cached postion from my get position
call until it was played again.

Hopefully this helps somebody :).



More information about the gstreamer-devel mailing list