@ -41,6 +41,7 @@ The file ReadMe.txt in a build bundle describes how to install the library on th
16. [Cross Platform Build and Test on Linux for MinGW](#2-16)
16. [Cross Platform Build and Test on Linux for MinGW](#2-16)
17. [Building with C++11 and other compilers](#2-17)
17. [Building with C++11 and other compilers](#2-17)
18. [Static and Shared Libraries](#2-18)
18. [Static and Shared Libraries](#2-18)
19. [Support for bmff files (CR3, HIF, AVIF and HEIC)](#2-19)
3. [License and Support](#3)
3. [License and Support](#3)
1. [License](#3-1)
1. [License](#3-1)
2. [Support](#3-2)
2. [Support](#3-2)
@ -582,13 +583,18 @@ The level of thread safety within Exiv2 varies depending on the type of metadata
Therefore, multi-threaded applications need to ensure that these two XMP functions are serialized, e.g., by calling them from an initialization section which is run before any threads are started. All exiv2 sample applications begin with:
Therefore, multi-threaded applications need to ensure that these two XMP functions are serialized, e.g., by calling them from an initialization section which is run before any threads are started. All exiv2 sample applications begin with:
```cpp
```cpp
#include<exiv2/exiv2.hpp>
int main(int argc, const char* argv[])
int main(int argc, const char* argv[])
{
{
Exiv2::XmpParser::initialize();
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
::atexit(Exiv2::XmpParser::terminate);
#if EXIV2_TEST_VERSION(0,27,4)
Exiv2::enableBMFF(true);
#endif
...
...
}
}
```
```
The use of the _**thread unsafe function**_ Exiv2::enableBMFF(true) is discussed in [2.19 Support for bmff files](#2-19)
[TOC](#TOC)
[TOC](#TOC)
@ -774,6 +780,24 @@ This is discussed: [https://github.com/Exiv2/exiv2/issues/1230](https://github.c
[TOC](#TOC)
[TOC](#TOC)
<divid="2-19">
2.19 Support for bmff files (CR3, HIF, AVIF and HEIC)
**Attention is drawn to the possibility that bmff support may be the subject of patent rights. _Exiv2 shall not be held responsible for identifying any or all such patent rights_.**
Access to the bmff code is guarded in two ways. Firstly, you have to build the library with the cmake option `-DEXIV2_ENABLE_BMFF=On`. Secondly, the application must enable bmff support at run-time by calling the following function.
```cpp
EXIV2API bool enableBMFF(bool enable);
```
It is recommended that you call this function at process start-up as it is not threadsafe. Applications may wish the provide a preference setting to enable bmff support and thereby place the responsibility for the use of this code with the user of the application.
It is recommended that you enclose the call to `enableBMFF()` with the compile time macro EXIV2\_TEST\_VERSION to ensure that your code builds cleanly on earlier versions of Exiv2. A code snippet is provided in [2.14 Thread Safety](#2-14).
[TOC](#TOC)
<divid="3">
<divid="3">
## 3 License and Support
## 3 License and Support
@ -785,7 +809,7 @@ All project resources are accessible from the project website.
### 3.1 License
### 3.1 License
Copyright (C) 2004-2019 Exiv2 authors.
Copyright (C) 2004-2011 Exiv2 authors.
You should have received a copy of the file [COPYING](COPYING) which details the GPLv2 license.
You should have received a copy of the file [COPYING](COPYING) which details the GPLv2 license.
Exiv2 is free software; you can redistribute it and/or modify
Exiv2 is free software; you can redistribute it and/or modify
@ -1093,6 +1117,8 @@ Please note that the platform MinGW/msys2 32 is obsolete and superceded by MinGW