From Stephan Huber, "attached you'll find a zip containing some bug-fixes and some refactored + new code.

* ZeroConfDevice does now return FILE_NOT_HANDLED instead of FILE_NOT_FOUND
* present3D supports multiple devices per env-var P3D_DEVICE, separate multiple device with a space

I refactored parts the p3d-plugin, the curl-plugin and parts of Registry and ReaderWriter. Currently the p3d-plugin tries to open all remote files with the help of the curl-plugin.

I added a new method to Registry called getReaderWriterForProtocolAndExtension. which will return a ReaderWriter which is capable in handling the remote file for the given protocol and extension. If no readerwriter is found for the given extension, a list is built of all readerwriters supporting the given protocol and this list is checked for support of wildcards (extension = "*"). If anything matches it get returned.

I added this principle also to the Registry, so now it's possible to register a generic ReaderWriter which can handle all filetypes for a given protocol, similar what curl is doing. All you have to do is to load the plugin at startup. The curl-fallback is still in place.

With these changes it is now possible to reference a movie inside a presentation without a server-address, read the presentation (with curl) and stream the movie with the correct plugin (e.g. QTKit)

"
This commit is contained in:
Robert Osfield
2012-12-07 19:05:47 +00:00
parent e64d5e5eca
commit 22868bce4f
9 changed files with 68 additions and 15 deletions

View File

@@ -41,10 +41,13 @@ bool ReaderWriter::acceptsExtension(const std::string& extension) const
{
// check for an exact match
std::string lowercase_ext = convertToLowerCase(extension);
if (_supportedExtensions.count(lowercase_ext)!=0) return true;
return (_supportedExtensions.count(lowercase_ext)!=0);
}
// if plugin supports wildcard extension then passthrough all types
return (_supportedExtensions.count("*")!=0);
bool ReaderWriter::acceptsProtocol(const std::string& protocol) const
{
std::string lowercase_protocol = convertToLowerCase(protocol);
return (_supportedProtocols.count(lowercase_protocol)!=0);
}
void ReaderWriter::supportsProtocol(const std::string& fmt, const std::string& description)