curlhttpsrc: GStreamer Bad Plugins 1.0 Plugins Reference Manual

## curlhttpsrc curlhttpsrc |

## Properties

gboolean | automatic-redirect | Read / Write
gboolean | compress | Read / Write
GStrv | cookies | Read / Write
GstStructure * | extra-headers | Read / Write
GstCurlHttpVersionType | http-version | Read / Write
gboolean | keep-alive | Read / Write
gchar * | location | Read / Write
guint | max-connection-time | Read / Write
guint | max-connections | Read / Write
guint | max-connections-per-proxy | Read / Write
guint | max-connections-per-server | Read / Write
gint | max-redirect | Read / Write
gchar * | proxy | Read / Write
gchar * | proxy-id | Read / Write
gchar * | proxy-pw | Read / Write
gint | retries | Read / Write
gchar * | ssl-ca-file | Read / Write
gboolean | ssl-strict | Read / Write
gint | timeout | Read / Write
gchar * | user-agent | Read / Write
gchar * | user-id | Read / Write
gchar * | user-pw | Read / Write

## Types and Values

struct | GstCurlHttpSrc

## Object Hierarchy

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

## Implemented Interfaces

GstCurlHttpSrc implements GstURIHandler.

## Description

This plugin reads data from a remote location specified by a URI, when the protocol is 'http' or 'https'.

It is based on the cURL project (http://curl.haxx.se/) and is specifically designed to be also used with nghttp2 (http://nghttp2.org) to enable HTTP/2 support for GStreamer. Your libcurl library MUST be compiled against nghttp2 for HTTP/2 support for this functionality. HTTPS support is dependent on cURL being built with SSL support (OpenSSL/PolarSSL/NSS/GnuTLS).

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

### Example launch line

    1
    gst-launch-1.0 curlhttpsrc location=http://127.0.1.1/index.html ! fakesink dump=1

The above pipeline reads a web page from the local machine using HTTP and dumps it to stdout.

    1
    gst-launch-1.0 playbin uri=http://rdmedia.bbc.co.uk/dash/testmpds/multiperiod/bbb.php

The above pipeline will start up a DASH streaming session from the given MPD file. This requires GStreamer to have been built with dashdemux from gst-plugins-bad.

## Synopsis

### Element Information

plugin | curl
author | Sam Hurst <samuelh@rd.bbc.co.uk>
class | Source/Network

### Element Pads

name | src
direction | source
presence | always
details | ANY

## Functions

## Types and Values

### struct GstCurlHttpSrc

    struct GstCurlHttpSrc;

## Property Details

### The `“automatic-redirect”` property

      “automatic-redirect”       gboolean

Allow HTTP Redirections (HTTP Status Code 300 series).

Flags: Read / Write

Default value: TRUE

### The `“compress”` property

      “compress”                 gboolean

Allow compressed content encodings.

Flags: Read / Write

Default value: FALSE

### The `“cookies”` property

      “cookies”                  GStrv

List of HTTP Cookies.

Flags: Read / Write

### The `“extra-headers”` property

      “extra-headers”            GstStructure *

Extra headers to append to the HTTP request.

Flags: Read / Write

### The `“http-version”` property

      “http-version”             GstCurlHttpVersionType

The preferred HTTP protocol version.

Flags: Read / Write

Default value: HTTP Version 2.0

### The `“keep-alive”` property

      “keep-alive”               gboolean

Toggle keep-alive for connection reuse.

Flags: Read / Write

Default value: TRUE

### The `“location”` property

      “location”                 gchar *

URI of resource to read.

Flags: Read / Write

Default value: NULL

### The `“max-connection-time”` property

      “max-connection-time”      guint

Maximum amount of time to keep-alive HTTP connections.

Flags: Read / Write

Allowed values: [2,60]

Default value: 30

### The `“max-connections”` property

      “max-connections”          guint

Maximum number of concurrent connections allowed for HTTP/1.x.

Flags: Read / Write

Allowed values: [1,255]

Default value: 255

### The `“max-connections-per-proxy”` property

      “max-connections-per-proxy” guint

Maximum number of concurrent connections allowed per proxy for HTTP/1.x.

Flags: Read / Write

Allowed values: [1,60]

Default value: 30

### The `“max-connections-per-server”` property

      “max-connections-per-server” guint

Maximum number of connections allowed per server for HTTP/1.x.

Flags: Read / Write

Allowed values: [1,60]

Default value: 5

### The `“max-redirect”` property

      “max-redirect”             gint

Maximum number of permitted redirections. -1 is unlimited.

Flags: Read / Write

Allowed values: [G_MAXULONG,255]

Default value: -1

### The `“proxy”` property

      “proxy”                    gchar *

URI of HTTP proxy server.

Flags: Read / Write

Default value: NULL

### The `“proxy-id”` property

      “proxy-id”                 gchar *

HTTP proxy URI user id for authentication.

Flags: Read / Write

Default value: NULL

### The `“proxy-pw”` property

      “proxy-pw”                 gchar *

HTTP proxy URI password for authentication.

Flags: Read / Write

Default value: NULL

### The `“retries”` property

      “retries”                  gint

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

Flags: Read / Write

Allowed values: [G_MAXULONG,9999]

Default value: -1

### The `“ssl-ca-file”` property

      “ssl-ca-file”              gchar *

Location of an SSL CA file to use for checking SSL certificates.

Flags: Read / Write

Default value: NULL

### The `“ssl-strict”` property

      “ssl-strict”               gboolean

Strict SSL certificate checking.

Flags: Read / Write

Default value: TRUE

### The `“timeout”` property

      “timeout”                  gint

Value in seconds before timeout a blocking request (0 = no timeout).

Flags: Read / Write

Allowed values: [0,3600]

Default value: 0

### The `“user-agent”` property

      “user-agent”               gchar *

URI of resource requested.

Flags: Read / Write

Default value: "GStreamer curlhttpsrc libcurl/<curl-version>"

### The `“user-id”` property

      “user-id”                  gchar *

HTTP location URI user id for authentication.

Flags: Read / Write

Default value: NULL

### The `“user-pw”` property

      “user-pw”                  gchar *

HTTP location URI password for authentication.

Flags: Read / Write

Default value: NULL