GNOME Bugzilla – Bug 439091
Play video file convenience function
Last modified: 2007-05-17 11:36:20 UTC
I'm a bit dumb. When I want to play a video file I'd like GStreamer to do all the heavy lifting for me. This patch proposes a gst_play_video_file(char * uri) function which returns a GstElement configured to play the specified uri. I'm nowhere a Gstreamer guru at this stage, so the code compiles but probably does not work. What I want to know is of such a function is reasonable in the Gstreamer API.
Created attachment 88326 [details] [review] Proposed video play convenience function
Created attachment 88327 [details] [review] diff -up version of the patch
This looks a lot like bug #424157. I don't really see the point of this convenience function. It doesn't really do any heavy lifting at all, and the little that it does isn't really entirely right. In order to meaningfully interact with a returned playbin element you still need to know a lot of GStreamer stuff anyway (how to use the bus, handle messages, state changes, buffering, querying, etc.). I think it makes a lot more sense to put something like this in a separate helper library that then also includes a GtkWidget or QtWidget or whatever, because getting the xoverlay stuff right is the really hard part IMHO, and handling for that can't be in the core. Very few applications that want to play video will be fine with having the video play in a randomly-placed newly-created X window that just pops up somewhere on your desktop and that the application has no control over. Creating a playbin element and setting an URI on it is unlikely to pose a problem for most developers IMHO. *** This bug has been marked as a duplicate of 424157 ***