Getting the mime-type of content returned by httpsoupsrc?

Tim Müller tim at centricular.com
Tue May 6 09:54:46 PDT 2014


On Tue, 2014-05-06 at 12:25 -0400, Stirling Westrup wrote:

Hi,

> I'm working on a program that can handle a number of different input
> formats, and I am wondering how to handle the remote fetching of URLs.
> 
> If someone hands me a location of http://www.foo.com/content
> 
> I can't know for sure if I'll get back a web page, a jpeg, an .mp3 or
> what. In each case I'll need a different pipeline, of course.
> 
> Now GStreamer has a typefind system for this kind of issue, but I'm
> not sure how to hook it to httpsoupsrc.  The 'typefind' property of
> that element doesn't seem to do anything that I can detect, and I'm
> not sure how one otherwise sets up a typefinder. So far I've just
> relied on decodebin.

You could just put a 'typefind' element after the source, and then
connect to the 'have-type' signal (to plug further elements), which is
what decodebin does.

Regards
 -Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com



More information about the gstreamer-devel mailing list