![]() |
![]() |
![]() |
GStreamer Good Plugins 0.10 Plugins Reference Manual | ![]() |
---|---|---|---|---|
GObject +----GstObject +----GstElement +----GstBaseSrc +----GstPushSrc +----GstSoupHTTPSrc
"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
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.
"automatic-redirect"
property"automatic-redirect" gboolean : Read / Write
Automatically follow HTTP redirects (HTTP Status Code 3xx).
Default value: TRUE
"iradio-mode"
property"iradio-mode" gboolean : Read / Write
Enable internet radio mode (extraction of shoutcast/icecast metadata).
Default value: FALSE
"iradio-title"
property"iradio-title" gchar* : Read
Name of currently playing song.
Default value: NULL
"iradio-url"
property"iradio-url" gchar* : Read
Homepage URL for radio stream.
Default value: NULL
"user-agent"
property"user-agent" gchar* : Read / Write
Value of the User-Agent HTTP request header field.
Default value: "GStreamer souphttpsrc "