[vlc-devel] [PATCH 1/3] libvlccore: Add STREAM_GET_HTTP_HEADER control

Marvin Scholz epirat07 at gmail.com
Mon Aug 12 17:45:59 CEST 2019



On 12 Aug 2019, at 15:19, Rémi Denis-Courmont wrote:

> Hi,
>
> I think you're missing the point here. You can't just pass opaque data 
> through filters, and you don't control what header lines get sent or 
> when. This is the block flags discussion all over again. What you're 
> doing just isn't a good fit with the stream abstraction.

I don't see how this is related to block flags, this is stream level 
metadata and the http headers do not change
mid-stream, do they?

>
> Besides, how will this work if the HTTP access does not have a special 
> case for sending the ICY header line in requests??

Yes, of course the access modules would need to set a header to announce 
that the application can handle ICY
metadata, there is no way around that.

I don't see how it makes sense to write a separate access module for icy 
metadata which would need to do HTTP
requests in the end too. The access protocol is http for most servers, 
so we should use the http module.

Of course for the SHOUTcast ICY protocol, thats another story, we would 
need a separate access module for
that, but it seems bad to me to have an two implementations to handle 
icy metadata both in the http access
module and a possible future icy access module.

Another approach would be to keep the oldhttp module forever for that 
use-case and use only that for the
Icy protocol and Icy metadata streams. This has a number of drawbacks 
though:
- It can not handle HTTPS
- It can not handle http2
- We need to keep maintaining two different http modules…

>
> Le 12 août 2019 15:26:27 GMT+03:00, Marvin Scholz 
> <epirat07 at gmail.com> a écrit :
>> On 12 Aug 2019, at 14:00, Rémi Denis-Courmont wrote:
>>
>>> This looks like horrible violation of abstraction and layering. We
>>> already have higher level getters for metadata.
>>>
>>
>> I considered using metadata for this but there were some issues:
>>
>> - How would you ensure HTTP headers never collide with other metadata
>> keys?
>> - How to handle that HTTP headers are case-insensitive? Just 
>> lowercase
>> them?
>>
>> I am happy to rewrite this patchset using stream metadata instead if
>> thats considered a better approach.
>>
>>> Le 12 août 2019 12:56:06 GMT+03:00, Marvin Scholz
>>> <epirat07 at gmail.com> a écrit :
>>>> ---
>>>> include/vlc_stream.h | 1 +
>>>> 1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/include/vlc_stream.h b/include/vlc_stream.h
>>>> index bc6c0d30b7..1b6186baeb 100644
>>>> --- a/include/vlc_stream.h
>>>> +++ b/include/vlc_stream.h
>>>> @@ -168,6 +168,7 @@ enum stream_query_e
>>>> STREAM_GET_CONTENT_TYPE,    /**< arg1= char **         res=can fail
>>>> */
>>>> STREAM_GET_SIGNAL,      /**< arg1=double *pf_quality, arg2=double
>>>> *pf_strength   res=can fail */
>>>>     STREAM_GET_TAGS,        /**< arg1=const block_t ** res=can fail
>>>> */
>>>> +    STREAM_GET_HTTP_HEADER, /**< arg1=const char *header
>> arg2=char
>>>> **  res=can fail */
>>>>
>>>> STREAM_SET_PAUSE_STATE = 0x200, /**< arg1= bool        res=can fail
>>>> */
>>>>     STREAM_SET_TITLE,       /**< arg1= int          res=can fail */
>>>> -- 
>>>> 2.19.1
>>>>
>>>> _______________________________________________
>>>> vlc-devel mailing list
>>>> To unsubscribe or modify your subscription options:
>>>> https://mailman.videolan.org/listinfo/vlc-devel
>>>
>>> -- 
>>> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez
>>> excuser ma 
>>> brièveté._______________________________________________
>>> vlc-devel mailing list
>>> To unsubscribe or modify your subscription options:
>>> https://mailman.videolan.org/listinfo/vlc-devel
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
>
> -- 
> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez 
> excuser ma brièveté._______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list