New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support per-stream proxies in HLS streams (attempt 3) #9398
Conversation
This conversion also has the side-effect of stripping the proxy configuration.
Formatting the CURL as a string, then parsing it back to a CURL is redundant, and has the effect of stripping any additional CURL object metadata.
Nothing attempts to override this method, and having it be overridable serves no clear purpose.
Since v3.0, FFmpeg has supported the http_proxy option for the HTTP protocol. Previously, CDVDDemuxFFmpeg would pass Kodi httpproxy CURL protocol option through as a HTTP header, which the server would (hopefully) ignore. With this change, if Kodi is built with an older version of FFmpeg, FFmpeg will simply ignore the option - which is an improvement over sending spurious HTTP headers.
I appreciate your contribution but we may find us in the 100th round if you don't start to listen. Please drop that unneeded CProxy class. It does nothing but carry those 5 properties. |
@FernetMenta I'm trying to listen as best I can, but I have had some some problems interpreting your responses. I have found them somewhat terse and lacking in sufficient detail for me to correctly determine how to modify my patch-set. If you take a look at my previous pull requests you will see that I have spent quite a long time studying the code and so far this is the best patch-set I've been able to produce, though with some guidance, I'm sure it can be improved further. So if you wouldn't mind, can you spell out the details?
So in the current state, it is necessary to copy proxy information around several "hops" through the lower levels of the HTTP request processes. Having to add multiple sets of member variables, getter methods and setter methods for each of the five variables will quickly add a large amount of ugly boiler-plate code in a half-dozen classes. Therefore, I chose to keep the However, if there is a way of the lower level classes getting direct access to |
@fritsch @basrieter - do you have comments about this? |
try to clear you mind from constraints probably set by incorrect code.
That reduces the change from 250 loc to < 50 |
|
|
This has been superceded by #9412 |
This branch supercedes #9240 and #8680, providing another attempt to add the ability for plugins to provide per-stream proxy configuration, including support for proxies with HLS.
The flow of URL information from plugins to HTTP requests for HLS streams is as follows:
To enable per-stream proxy configuration, the five config values (proxy protocol, host, port, user-name and password) must follow the same path-ways.
The proxy configs are carried from the plugin to
CFileItem
via the existingCListItem::SetProperty
mechanism. Thereafter, the configs are carried fromCFileItem
toCCurlFile
and toCDVDDemuxFFmpeg
viaCProxy
objects.The
CProxy
class provided here has been simplified since #9640. All the proxy url parsing, and formatting, archiving and serialization methods have been removed, so that theCProxy
is now just a simple data structure.The class is still necessary, because without it, a large amount of boiler-plate code would be needed to pass the five proxy config values among the classes/methods in the call-flow beyond
CFileItem
.CProxy
provides simple package in which the information can be passed around.Furthermore, this pull request differs from #9640 in that it doesn't add a
CProxy
member to theCURL
class. Instead it passesCProxy
object side-by-side with URLs inCPlayListM3U::GetBestBandwidthStream
and within theCFile
family.