void
-dcp::init (optional<boost::filesystem::path> tags_directory)
+dcp::init (optional<boost::filesystem::path> given_resources_directory)
{
if (xmlSecInit() < 0) {
throw MiscError ("could not initialise xmlsec");
asdcp_smpte_dict = &ASDCP::DefaultSMPTEDict();
- if (!tags_directory) {
- tags_directory = resources_directory() / "tags";
- }
-
- load_language_tag_lists (*tags_directory);
+ load_language_tag_lists (given_resources_directory.get_value_or(resources_directory()) / "tags");
}
/** Set up various bits that the library needs. Should be called once
* by client applications.
*
- * @param tags_directory Path to a copy of the tags directory from the source code;
- * if none is specified libdcp will look for a tags directory in the environment
- * variable LIBDCP_RESOURCES or based on where the current executable is.
+ * @param resources_directory Path to a directory containing the tags and xsd
+ * directories from the source code; if none is specified libdcp will look
+ * in the directory given by LIBDCP_RESOURCES or based on where the current
+ * executable is.
*/
-extern void init (boost::optional<boost::filesystem::path> tags_directory = boost::optional<boost::filesystem::path>());
+extern void init (boost::optional<boost::filesystem::path> resources_directory = boost::optional<boost::filesystem::path>());
/** Decode a base64 string. The base64 decode routine in KM_util.cpp
* gives different values to both this and the command-line base64