HttpClientElement

This is an element that obtains media data by connecting to another server and downloading it via HTTP protocol. (You can connect several whisperCast-s in a distribution network using this element).

Here are the parameters for configuring such an element:

  • array<HttpClientElementDataSpec> http_data_
    • These are descriptions for the exact location (and how) to download the media from the remote location - see bellow.
  • optional int media_http_max_read_ahead_ms_
    • We try to maintain the http element that reads the media with at most this much time ahead (Default: 4000).
  • optional int media_http_min_read_ahead_ms_
    • We try to keep at least this much buffer of a remote element into memory (Default: 2000).
  • optional int media_http_max_to_sleep_ms_
    • When doing flow control determined by parameters above, if we get to sleep more then this we close the media element (Default: 5000).
  • optional int media_http_connection_grace_period_ms_
    • When doing flow control we do not count towards the flow control of the connection the tags received in this grace period (Default: 1000).
  • optional bool media_http_disable_source_flow_control_
    • Disable flow control altogether (Default: false).
  • optional int media_http_maximum_tag_size_
    • If source starts sending crap (and we accumulate unparsed data bigger than this), we drop the current request and reconnect (assuming problems) (Default: 256 KB).

Now here is the structure of an individual HttpClientElementDataSpec:

  • string name_
    • Name of the media.
  • string host_ip_
    • IP to download from (IPv4) or a host alias defined in the alias file, basically a mapping from a name to an IP.
  • int port_
    • Port to connect to.
  • string path_escaped_
    • URL-escaped path to the remote media.
  • bool should_reopen_
    • Upon termination of the request (from various reasons) shall we attempt reconnect ?
  • string media_type_
    • Expected media type to be received - choice of: 'mp3', 'aac', 'flv' or 'raw'.
  • optional string remote_user_
  • optional string remote_password_
    • In order to basic-authenticate the HTTP request to the remote server you can specify a user and a password for connection (Not the most secure thing, as it will be saved and stored in clear, but reasonable, and easy to use).