decoder/plugin: add method protocols()

Similar to commit 4e2a551f30 but for
decoder plugins.  This is tailored for the FFmpeg decoder plugin which
implements some protocols (e.g. RTSP) as demuxer plugin.
This commit is contained in:
Max Kellermann
2020-09-21 13:01:51 +02:00
parent d3c257d97d
commit 85849c9396
6 changed files with 126 additions and 2 deletions

View File

@@ -204,7 +204,12 @@ try {
}
MyDecoderClient client(c.seek_where);
if (plugin->file_decode != nullptr) {
if (plugin->SupportsUri(c.uri)) {
try {
plugin->UriDecode(client, c.uri);
} catch (StopDecoder) {
}
} else if (plugin->file_decode != nullptr) {
try {
plugin->FileDecode(client, FromNarrowPath(c.uri));
} catch (StopDecoder) {