souphttpsrc

souphttpsrc

Properties

gboolean automatic-redirect Read / Write
GStrv cookies Read / Write
gboolean iradio-mode Read / Write
gchar * location Read / Write
gchar * proxy Read / Write
gchar * user-agent Read / Write
gboolean is-live Read / Write
gchar * proxy-id Read / Write
gchar * proxy-pw Read / Write
gchar * user-id Read / Write
gchar * user-pw Read / Write
GstStructure * extra-headers Read / Write
guint timeout Read / Write
gboolean compress Read / Write
SoupLoggerLogLevel http-log-level Read / Write
gboolean keep-alive Read / Write
gint retries Read / Write
gchar * ssl-ca-file Read / Write
gboolean ssl-strict Read / Write
gboolean ssl-use-system-ca-file Read / Write
GTlsDatabase * tls-database Read / Write
gchar * method Read / Write
GTlsInteraction * tls-interaction Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GstObject
            ╰── GstElement
                ╰── GstBaseSrc
                    ╰── GstPushSrc
                        ╰── GstSoupHTTPSrc

Implemented Interfaces

GstSoupHTTPSrc implements GstURIHandler.

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

1
2
gst-launch-1.0 -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.
1
2
3
4
gst-launch-1.0 -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."
1
2
3
4
gst-launch-1.0 -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

Functions

Types and Values

struct GstSoupHTTPSrc

struct GstSoupHTTPSrc;

Property Details

The “automatic-redirect” property

  “automatic-redirect”       gboolean

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

Flags: Read / Write

Default value: TRUE


The “cookies” property

  “cookies”                  GStrv

HTTP request cookies.

Flags: Read / Write


The “iradio-mode” property

  “iradio-mode”              gboolean

Enable internet radio mode (ask server to send shoutcast/icecast metadata interleaved with the actual stream data).

Flags: Read / Write

Default value: TRUE


The “location” property

  “location”                 gchar *

Location to read from.

Flags: Read / Write

Default value: ""


The “proxy” property

  “proxy”                    gchar *

HTTP proxy server URI.

Flags: Read / Write

Default value: ""


The “user-agent” property

  “user-agent”               gchar *

Value of the User-Agent HTTP request header field.

Flags: Read / Write

Default value: "GStreamer souphttpsrc "


The “is-live” property

  “is-live”                  gboolean

Act like a live source.

Flags: Read / Write

Default value: FALSE


The “proxy-id” property

  “proxy-id”                 gchar *

HTTP proxy URI user id for authentication.

Flags: Read / Write

Default value: ""


The “proxy-pw” property

  “proxy-pw”                 gchar *

HTTP proxy URI user password for authentication.

Flags: Read / Write

Default value: ""


The “user-id” property

  “user-id”                  gchar *

HTTP location URI user id for authentication.

Flags: Read / Write

Default value: ""


The “user-pw” property

  “user-pw”                  gchar *

HTTP location URI user password for authentication.

Flags: Read / Write

Default value: ""


The “extra-headers” property

  “extra-headers”            GstStructure *

Extra headers to append to the HTTP request.

Flags: Read / Write


The “timeout” property

  “timeout”                  guint

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

Flags: Read / Write

Allowed values: <= 3600

Default value: 15


The “compress” property

  “compress”                 gboolean

Allow compressed content encodings.

Flags: Read / Write

Default value: FALSE


The “http-log-level” property

  “http-log-level”           SoupLoggerLogLevel

Set log level for soup's HTTP session log.

Flags: Read / Write

Default value: SOUP_LOGGER_LOG_HEADERS


The “keep-alive” property

  “keep-alive”               gboolean

Use HTTP persistent connections.

Flags: Read / Write

Default value: FALSE


The “retries” property

  “retries”                  gint

Maximum number of retries until giving up (-1=infinite).

Flags: Read / Write

Allowed values: >= G_MAXULONG

Default value: 3


The “ssl-ca-file” property

  “ssl-ca-file”              gchar *

Location of a SSL anchor CA file to use.

Flags: Read / Write

Default value: NULL


The “ssl-strict” property

  “ssl-strict”               gboolean

Strict SSL certificate checking.

Flags: Read / Write

Default value: TRUE


The “ssl-use-system-ca-file” property

  “ssl-use-system-ca-file”   gboolean

Use system CA file.

Flags: Read / Write

Default value: TRUE


The “tls-database” property

  “tls-database”             GTlsDatabase *

TLS database with anchor certificate authorities used to validate the server certificate.

Flags: Read / Write


The “method” property

  “method”                   gchar *

The HTTP method to use (GET, HEAD, OPTIONS, etc).

Flags: Read / Write

Default value: NULL


The “tls-interaction” property

  “tls-interaction”          GTlsInteraction *

A GTlsInteraction object to be used when the connection or certificate database need to interact with the user.

Flags: Read / Write