hlsdemux: supply a more useful user-agent
Submitted by Gil Pedersen
The hlsdemux component use the default uri handler to fetch the required resources. When this is HTTP(s) based, it talks to a remote server and exchanges a user-agent that the remote server can use to log the client type and serve specific content to work around known implementation bugs, etc.
A simple "gst-launch playbin uri=xxx" playback on my system reports the user-agent:
GStreamer souphttpsrc libsoup/2.38.1
Compared to CoreMedia based players this is rather uninformative, where a sample agent is:
AppleCoreMedia/22.214.171.124E53 (Macintosh; U; Intel Mac OS X 10_7_4; en_us)
I suggest to construct a slightly more informative user-agent, like:
GStreamer/1.0.0 hlsdemux/0.11.92.1 libsoup/2.38.1
In order to do this reliably (since there is no standardised user-agent get/set interface) I suggest to always try to use the "souphttpsrc" plugin to fetch the required files, and only use the default uri handler when it fails.
I will attach patches with both features,