From 85849c93964161c15cc0cec7e68bb4917ee93bcd Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 21 Sep 2020 13:01:51 +0200 Subject: decoder/plugin: add method protocols() Similar to commit 4e2a551f30c1e1db13933d15c44d9186a2f37959 but for decoder plugins. This is tailored for the FFmpeg decoder plugin which implements some protocols (e.g. RTSP) as demuxer plugin. --- test/run_decoder.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/run_decoder.cxx b/test/run_decoder.cxx index 1147e4faf..a7e275302 100644 --- a/test/run_decoder.cxx +++ b/test/run_decoder.cxx @@ -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) { -- cgit v1.2.3