开发者

How do you ask gstreamer if a file can be played?

开发者 https://www.devze.com 2022-12-15 23:32 出处:网络
I\'m trying to write a simple command line audio player using the Python Gstreamer bindings. Is there a function in the gstreamer API that determines in advance whether or not a particular file (URI)

I'm trying to write a simple command line audio player using the Python Gstreamer bindings. Is there a function in the gstreamer API that determines in advance whether or not a particular file (URI) can be decoded and played by the currently in开发者_如何学JAVAstalled set of codecs?


I guess you can try to play it and see if that raises any error - in fact, there's no way to know the set of codecs necessary without opening the file. Some distributions even have hooks in place that ask the user to download the right codec when you start playing something.

0

精彩评论

暂无评论...
验证码 换一张
取 消