souphttpsrc

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

 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 ! mpgaudioparse
     ! mpg123audiodec ! audioconvert ! audioresample ! autoaudiosink

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

Hierarchy

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

Factory details

Authors: – Wouter Cloetens

Classification:Source/Network

Rank – primary

Plugin – gstsoup

Package – GStreamer Good Plug-ins git

Pad Templates

src

ANY

Presencealways

Directionsrc


Properties

automatic-redirect

“automatic-redirect” gboolean

Automatically follow HTTP redirects (HTTP Status Code 3xx)

Flags : Read / Write

Default value : true


blocksize

“blocksize” guint

Size in bytes to read per buffer (-1 = default)

Flags : Read / Write

Default value : 4096


compress

“compress” gboolean

Allow compressed content encodings

Flags : Read / Write

Default value : false


cookies

“cookies” GStrv *

HTTP request cookies

Flags : Read / Write


do-timestamp

“do-timestamp” gboolean

Apply current stream time to buffers

Flags : Read / Write

Default value : false


extra-headers

“extra-headers” GstStructure *

Extra headers to append to the HTTP request

Flags : Read / Write


http-log-level

“http-log-level” Soup-logger-log-level

Set log level for soup's HTTP session log

Flags : Read / Write

Default value : headers (2)


iradio-mode

“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


is-live

“is-live” gboolean

Act like a live source

Flags : Read / Write

Default value : false


keep-alive

“keep-alive” gboolean

Use HTTP persistent connections

Flags : Read / Write

Default value : true


location

“location” gchararray

Location to read from

Flags : Read / Write

Default value : NULL


method

“method” gchararray

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

Flags : Read / Write

Default value : NULL


name

“name” gchararray

The name of the object

Flags : Read / Write / Construct

Default value : NULL


num-buffers

“num-buffers” gint

Number of buffers to output before sending EOS (-1 = unlimited)

Flags : Read / Write

Default value : -1


parent

“parent” GstObject *

The parent of the object

Flags : Read / Write


proxy

“proxy” gchararray

HTTP proxy server URI

Flags : Read / Write


proxy-id

“proxy-id” gchararray

HTTP proxy URI user id for authentication

Flags : Read / Write

Default value : NULL


proxy-pw

“proxy-pw” gchararray

HTTP proxy URI user password for authentication

Flags : Read / Write

Default value : NULL


retries

“retries” gint

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

Flags : Read / Write

Default value : 3


ssl-ca-file

“ssl-ca-file” gchararray

Location of a SSL anchor CA file to use

Flags : Read / Write

Default value : NULL


ssl-strict

“ssl-strict” gboolean

Strict SSL certificate checking

Flags : Read / Write

Default value : true


ssl-use-system-ca-file

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

Use system CA file

Flags : Read / Write

Default value : true


timeout

“timeout” guint

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

Flags : Read / Write

Default value : 15


tls-database

“tls-database” GTlsDatabase *

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

Flags : Read / Write


tls-interaction

“tls-interaction” GTlsInteraction *

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

Flags : Read / Write


typefind

“typefind” gboolean

Run typefind before negotiating (deprecated, non-functional)

Flags : Read / Write

Default value : false


user-agent

“user-agent” gchararray

Value of the User-Agent HTTP request header field

Flags : Read / Write

Default value : GStreamer souphttpsrc 1.17.0.1


user-id

“user-id” gchararray

HTTP location URI user id for authentication

Flags : Read / Write

Default value : NULL


user-pw

“user-pw” gchararray

HTTP location URI user password for authentication

Flags : Read / Write

Default value : NULL


Named constants

Soup-logger-log-level

Members

none (0) – SOUP_LOGGER_LOG_NONE
minimal (1) – SOUP_LOGGER_LOG_MINIMAL
headers (2) – SOUP_LOGGER_LOG_HEADERS
body (3) – SOUP_LOGGER_LOG_BODY

The results of the search are