Hello,
I want my application to tell me if a certain file or uri is playable by gstreamer (meaning the system has the appropriate codecs and can create a full pipeline). Something like "bool isPlayable(const char* uri)". Is there a quick way to do this with gstreamer? Sort of like a gst_test_pipeline function? Thanks! Making the world a better place one message at a time. Check out the i'm Talkathon. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi,
I dont know exaclty if exists a "isPlayable" method, but I know that is possible to browse all the available plugins using the GSTRegistry, them, check all available mimetypes. You can save this mimetypes and compare with your uri. Look at the GMediaRenderer project, it checks the mimetypes in the initialization of the application. After you have a list of the supported mimetypes, you can use a typefind in you URI and compare with your list. Something like you run the gst-inspect and the gst-typefind in the file, and compare the results. []s On Mon, Jul 14, 2008 at 8:35 PM, Ash <[hidden email]> wrote:
-- Danilo Freire Laboratório de Sistemas Embarcados e Computação Pervasiva Centro de Engenharia Elétrica e Informática - CEEI Universidade Federal de Campina Grande - UFCG ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
On Tue, Jul 15, 2008 at 2:04 PM, Danilo Freire <[hidden email]> wrote:
> Hi, > > I dont know exaclty if exists a "isPlayable" method, but I know that is > possible to browse all the available plugins using the GSTRegistry, them, > check all available mimetypes. You can save this mimetypes and compare with > your uri. > > Look at the GMediaRenderer project, it checks the mimetypes in the > initialization of the application. > > After you have a list of the supported mimetypes, you can use a typefind in > you URI and compare with your list. Of course, that doesn't actually tell you anything about whether gstreamer can play the file - it's very common for a user to have a demuxer appropriate for some format, but no decoder available. The recommended way is to set up a simple test pipeline - with a source, decodebin, and fakesinks - and set the pipeline to PAUSED. If it gets to PAUSED, the file is playable. You should have a timeout, so that if it doesn't preroll OR error out, you'll be able to stop the pipeline and decide that it's not playable. Mike ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |