[gst-devel] HTTPServerSink
Michael Smith
msmith at xiph.org
Tue Apr 29 19:16:29 CEST 2008
On Tue, Apr 29, 2008 at 2:51 AM, Simon Hargreaves <simon at cellcast.tv> wrote:
> I've done a modified version of the tcpserversink plugin to supply an
> HTTP header based on a parameter switch, currently you have to manually
> select either an octet stream, video/mpeg or audio/mpeg header. Is there
> a way to easily pick up the incoming media mime type from the sink
> object so it can be automatically sent with the http header when headers
> are turned on?
Simon,
The 'caps' that get set on the sink's sinkpad describe the media type,
using gstreamer's caps system (these look a lot like mime-types, and
in many cases there's a one-to-one mapping, but there are cases where
that's not correct - they're not actually mime-types in general).
So you can just set up a setcaps function on the sinkpad to find out
when the sink caps are set, and determine the media-type there.
Mike
More information about the gstreamer-devel
mailing list