souphttpsrc

souphttpsrc — Read from an HTTP/HTTPS/WebDAV/Icecast/Shoutcast location.

Synopsis

                    GstSoupHTTPSrc;

Object Hierarchy

  GObject
   +----GstObject
         +----GstElement
               +----GstBaseSrc
                     +----GstPushSrc
                           +----GstSoupHTTPSrc

Implemented Interfaces

GstSoupHTTPSrc implements GstURIHandler.

Properties

  "automatic-redirect"       gboolean              : Read / Write
  "cookies"                  GStrv*                : Read / Write
  "iradio-genre"             gchar*                : Read
  "iradio-mode"              gboolean              : Read / Write
  "iradio-name"              gchar*                : Read
  "iradio-title"             gchar*                : Read
  "iradio-url"               gchar*                : Read
  "location"                 gchar*                : Read / Write
  "proxy"                    gchar*                : Read / Write
  "user-agent"               gchar*                : Read / Write

Description

This plugin reads data from a remote location specified by a URI. Supported protocols are 'http', 'https'.

An HTTP proxy must be specified by its URL. If the "http_proxy" environment variable is set, its value is used. The element-souphttpsrc::proxy property can be used to override the default.

In case the element-souphttpsrc::iradio-mode property is set and the location is an HTTP resource, souphttpsrc will send special Icecast HTTP headers to the server to request additional Icecast meta-information. If the server is not an Icecast server, it will behave as if the element-souphttpsrc::iradio-mode property were not set. If it is, souphttpsrc will output data with a media type of application/x-icy, in which case you will need to use the ICYDemux element as follow-up element to extract the Icecast metadata and to determine the underlying media type.

Example pipeline:

gst-launch -v souphttpsrc location=https://some.server.org/index.html
    ! filesink location=/home/joe/server.html

The above pipeline reads a web page from a server using the HTTPS protocol and writes it to a local file.

Another example pipeline:

gst-launch -v souphttpsrc user-agent="FooPlayer 0.99 beta"
    automatic-redirect=false proxy=http://proxy.intranet.local:8080
    location=http://music.foobar.com/demo.mp3 ! mad ! audioconvert
    ! audioresample ! alsasink

The above pipeline will read and decode and play an mp3 file from a web server using the HTTP protocol. If the server sends redirects, the request fails instead of following the redirect. The specified HTTP proxy server is used. The User-Agent HTTP request header is set to a custom string instead of "GStreamer souphttpsrc."

Yet another example pipeline:

gst-launch -v souphttpsrc location=http://10.11.12.13/mjpeg
    do-timestamp=true ! multipartdemux
    ! image/jpeg,width=640,height=480 ! matroskamux
    ! filesink location=mjpeg.mkv

The above pipeline reads a motion JPEG stream from an IP camera using the HTTP protocol, encoded as mime/multipart image/jpeg parts, and writes a Matroska motion JPEG file. The width and height properties are set in the caps to provide the Matroska multiplexer with the information to set this in the header. Timestamps are set on the buffers as they arrive from the camera. These are used by the mime/multipart demultiplexer to emit timestamps on the JPEG-encoded video frame buffers. This allows the Matroska multiplexer to timestamp the frames in the resulting file.

Synopsis

Element Information

plugin

soup

author

Wouter Cloetens <wouter@mind.be>

class

Source/Network

Element Pads

name

src

direction

source

presence

always

details

ANY

Details

GstSoupHTTPSrc

typedef struct _GstSoupHTTPSrc GstSoupHTTPSrc;

Property Details

The "automatic-redirect" property

  "automatic-redirect"       gboolean              : Read / Write

Automatically follow HTTP redirects (HTTP Status Code 3xx).

Default value: TRUE


The "cookies" property

  "cookies"                  GStrv*                : Read / Write

HTTP request cookies.


The "iradio-genre" property

  "iradio-genre"             gchar*                : Read

Genre of the stream.

Default value: NULL


The "iradio-mode" property

  "iradio-mode"              gboolean              : Read / Write

Enable internet radio mode (extraction of shoutcast/icecast metadata).

Default value: FALSE


The "iradio-name" property

  "iradio-name"              gchar*                : Read

Name of the stream.

Default value: NULL


The "iradio-title" property

  "iradio-title"             gchar*                : Read

Name of currently playing song.

Default value: NULL


The "iradio-url" property

  "iradio-url"               gchar*                : Read

Homepage URL for radio stream.

Default value: NULL


The "location" property

  "location"                 gchar*                : Read / Write

Location to read from.

Default value: ""


The "proxy" property

  "proxy"                    gchar*                : Read / Write

HTTP proxy server URI.

Default value: ""


The "user-agent" property

  "user-agent"               gchar*                : Read / Write

Value of the User-Agent HTTP request header field.

Default value: "GStreamer souphttpsrc "