Closed hzeller closed 5 years ago
Thinking about how to do this now.
First, I think it makes sense to move the filter setup into upnp_connmgr
instead of passing it through upnp_renderer
. The filtering is performed in upnp_connmgr
anyway so no need for a middle man.
Second, I'll relocate the filter so that it filters the supported_types linked list instead of the CONNMGR_VAR_SINK_PROTO_INFO string.
Now, after the initial filtering by root type (eg. audio, video, image
) the specific types can be added or removed (e.g. +/-audio/flac
syntax) right before CONNMGR_VAR_SINK_PROTO_INFO is generated.
There might be certain cases where filtering available mime-types might need to be more fine-grained, e.g. including and excluding specific mime-types.
Currently, this is only filtering top-level mime-types, such as
--mime-filter=audio video
, only allowing these two top-level but it would be good to e.g. say something like--mime-filter=audio -audio/flac +video/mpeg
, essentially allowing only audio, except audio/flac and include video/mpeg as the only allowed video-format.(this came up in #135)