souphttpsrc

souphttpsrc — Receive data as a client over the network via HTTP using SOUP

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
  "is-live"                  gboolean              : Read / Write
  "proxy-id"                 gchar*                : Read / Write
  "proxy-pw"                 gchar*                : Read / Write
  "user-id"                  gchar*                : Read / Write
  "user-pw"                  gchar*                : Read / Write
  "extra-headers"            GstStructure*         : Read / Write
  "timeout"                  guint                 : 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. If built with libsoup's GNOME integration features, the GNOME proxy configuration will be used, or failing that, proxy autodetection. The "proxy" property can be used to override the default.

In case the "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 "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 launch line

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.
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."
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.

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 "


The "is-live" property

  "is-live"                  gboolean              : Read / Write

Act like a live source.

Default value: FALSE


The "proxy-id" property

  "proxy-id"                 gchar*                : Read / Write

HTTP proxy URI user id for authentication.

Default value: ""


The "proxy-pw" property

  "proxy-pw"                 gchar*                : Read / Write

HTTP proxy URI user password for authentication.

Default value: ""


The "user-id" property

  "user-id"                  gchar*                : Read / Write

HTTP location URI user id for authentication.

Default value: ""


The "user-pw" property

  "user-pw"                  gchar*                : Read / Write

HTTP location URI user password for authentication.

Default value: ""


The "extra-headers" property

  "extra-headers"            GstStructure*         : Read / Write

Extra headers to append to the HTTP request.


The "timeout" property

  "timeout"                  guint                 : Read / Write

Value in seconds to timeout a blocking I/O (0 = No timeout).

Allowed values: <= 3600

Default value: 0