[Bug 744261] curl: add curlhttpsrc

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Jan 25 07:36:37 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=744261

--- Comment #8 from Nitesh Laller <nitesh.lr at samsung.com> ---
(In reply to Sebastian Dröge (slomo) from comment #7)
> (In reply to Nitesh Laller from comment #5)
> >
> > I think idea of GstBaseHttpSrc is useful
> 
> What common code / functionality do you think can be put into the base
> class? I was thinking of an interface for HTTP sources before, but if actual
> functionality can also be shared that would of course be even better.

Hi Sebastian,

As you know there are various third party libraries which provide interfaces
for handling http requests and they all have their own type of implementations
for handling such requests.
Interfaces are different, way of implementation is different, So keeping those
in mind currently I have following points which can be put in http base class.

Functional Changes:
1) http header response parsing could be done in http base class as it almost
same for all http based plugins.
If in case third party library is already providing such parsing then client
plugin can ignore default parsing , if not then anyone can use it.
On the basis of header response parsing various parts of http plugin can be put
in common place like , get_size check, Is_seekable check. 

Coding related changes could be: 
1) Common properties can be included in base class example:
PROP_LOCATION, PROP_USER_ID,  PROP_USER_PW,  PROP_PROXYURI,  PROP_PROXY_ID, 
PROP_PROXY_PW,  PROP_COOKIES,  PROP_USER_AGENT,  PROP_EXTRA_HEADERS, 
PROP_COMPRESS,  PROP_AUTOMATIC_REDIRECT,  PROP_MAXREDIRECT  PROP_KEEP_ALIVE, 
PROP_TIMEOUT,  PROP_SSL_STRICT,  PROP_SSL_CA_FILE,  PROP_RETRIES, 
PROP_HTTPVERSION,  PROP_IS_LIVE  
All variables related to above properties will come under base class structures
and client can use these variables.

2) “get_size” implementation will come inside base http class because header is
already parsed in base http class.
3) "is_seekable” will come inside base http class, because on the basis of size
of content this decision can be taken. Size of content comes in header response
of request.
4) "open_session" function pointer can be provided in base class as compared to
“start” function
5) Similarly "close_session" function pointer can be provided in base class (
as "open_session" and "close_session" give more sense related to http sessions)
6) "query" function can be handled in http base class to handle common queries
like GST_QUERY_URI 
7) Additionally change_state function can be handled in base class. Third party
related resource allocation and de-allocation changes can be called using
additional class function pointers.

So currently I have these changes in mind and these changes can reduce the
common code which every http based plugin need to include.

If you have additional ideas for how more functionality and code can be made
common for base class then please share, it would be highly helpful.

Thanks,
Nitesh Laller

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list