Skip to content

Commit e80186c

Browse files
committed
Remove the need to enable BMFF via API
1 parent 698e790 commit e80186c

38 files changed

+3
-134
lines changed

README.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -730,13 +730,9 @@ int main(int argc, const char* argv[])
730730
{
731731
Exiv2::XmpParser::initialize();
732732
::atexit(Exiv2::XmpParser::terminate);
733-
#ifdef EXV_ENABLE_BMFF
734-
Exiv2::enableBMFF(true);
735-
#endif
736733
...
737734
}
738735
```
739-
The use of the _**thread unsafe function**_ Exiv2::enableBMFF(true) is discussed in [Support for BMFF files (e.g., CR3, HEIF, HEIC, AVIF, and JPEG XL)](#BMFF)
740736
741737
[TOC](#TOC)
742738
<div id="InitAndCleanup">
@@ -752,9 +748,6 @@ The exiv2 command-line program and sample applications call the following at the
752748
```cpp
753749
Exiv2::XmpParser::initialize();
754750
::atexit(Exiv2::XmpParser::terminate);
755-
#ifdef EXV_ENABLE_BMFF
756-
Exiv2::enableBMFF(true);
757-
#endif
758751
```
759752
760753
[TOC](#TOC)
@@ -898,15 +891,7 @@ This is discussed: [https://github.com/Exiv2/exiv2/issues/1230](https://github.c
898891
899892
**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. Exiv2 shall not be held responsible for the legal consequences of the use of this code_.**
900893
901-
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.
902-
903-
```cpp
904-
EXIV2API bool enableBMFF(bool enable);
905-
```
906-
907-
The return value from `enableBMFF()` is true if the library has been build with BMFF support (CMake option -DEXIV2_ENABLE_BMFF=ON).
908-
909-
Applications may wish to 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.
894+
Access to the BMFF code is guarded by the CMake option: `-DEXIV2_ENABLE_BMFF=ON` (enabled by default).
910895
911896
[TOC](#TOC)
912897
<div id="LicenseSupport">

app/exiv2.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,6 @@ int main(int argc, char* const argv[]) {
118118

119119
Exiv2::XmpParser::initialize();
120120
::atexit(Exiv2::XmpParser::terminate);
121-
#ifdef EXV_ENABLE_BMFF
122-
Exiv2::enableBMFF();
123-
#endif
124121

125122
#ifdef EXV_ENABLE_NLS
126123
setlocale(LC_ALL, "");

fuzz/fuzz-read-print-write.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
1010

1111
Exiv2::XmpParser::initialize();
1212
::atexit(Exiv2::XmpParser::terminate);
13-
#ifdef EXV_ENABLE_BMFF
14-
Exiv2::enableBMFF();
15-
#endif
1613

1714
try {
1815
Exiv2::DataBuf data_copy(data, size);

samples/addmoddel.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ int main(int argc, char* const argv[]) {
1010
try {
1111
Exiv2::XmpParser::initialize();
1212
::atexit(Exiv2::XmpParser::terminate);
13-
#ifdef EXV_ENABLE_BMFF
14-
Exiv2::enableBMFF();
15-
#endif
1613

1714
if (argc != 2) {
1815
std::cout << "Usage: " << argv[0] << " file\n";

samples/conntest.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@ void curlcon(const std::string& url, bool useHttp1_0 = false) {
7575
int main(int argc, const char** argv) {
7676
Exiv2::XmpParser::initialize();
7777
::atexit(Exiv2::XmpParser::terminate);
78-
#ifdef EXV_ENABLE_BMFF
79-
Exiv2::enableBMFF();
80-
#endif
8178

8279
if (argc < 2) {
8380
std::cout << "Usage: " << argv[0] << " url {-http1_0}" << std::endl;

samples/convert-test.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ int main(int argc, char* const argv[]) {
99
try {
1010
Exiv2::XmpParser::initialize();
1111
::atexit(Exiv2::XmpParser::terminate);
12-
#ifdef EXV_ENABLE_BMFF
13-
Exiv2::enableBMFF();
14-
#endif
1512

1613
if (argc != 2) {
1714
std::cout << "Usage: " << argv[0] << " file\n";

samples/easyaccess-test.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ int main(int argc, char** argv) {
6464
try {
6565
Exiv2::XmpParser::initialize();
6666
::atexit(Exiv2::XmpParser::terminate);
67-
#ifdef EXV_ENABLE_BMFF
68-
Exiv2::enableBMFF();
69-
#endif
7067

7168
if (argc < 2) {
7269
int count = 0;

samples/exifcomment.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ int main(int argc, char* const argv[]) {
1010
try {
1111
Exiv2::XmpParser::initialize();
1212
::atexit(Exiv2::XmpParser::terminate);
13-
#ifdef EXV_ENABLE_BMFF
14-
Exiv2::enableBMFF();
15-
#endif
1613

1714
if (argc != 2) {
1815
std::cout << "Usage: " << argv[0] << " file\n";

samples/exifdata-test.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ int main(int argc, char* const argv[]) {
1212
try {
1313
Exiv2::XmpParser::initialize();
1414
::atexit(Exiv2::XmpParser::terminate);
15-
#ifdef EXV_ENABLE_BMFF
16-
Exiv2::enableBMFF();
17-
#endif
1815

1916
if (argc != 2) {
2017
std::cout << "Usage: " << argv[0] << " file\n";

samples/exifdata.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,6 @@ std::string formatXML(Exiv2::ExifData& exifData) {
150150
int main(int argc, const char* argv[]) {
151151
Exiv2::XmpParser::initialize();
152152
::atexit(Exiv2::XmpParser::terminate);
153-
#ifdef EXV_ENABLE_BMFF
154-
Exiv2::enableBMFF();
155-
#endif
156153

157154
format_t formats;
158155
formats["wolf"] = wolf;

0 commit comments

Comments
 (0)