digiKam
heif_api_structs.h
Go to the documentation of this file.
1 /*
2  * HEIF codec.
3  * Copyright (c) 2017 struktur AG, Dirk Farin <farin@struktur.de>
4  *
5  * This file is part of libheif.
6  *
7  * libheif is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU Lesser General Public License as
9  * published by the Free Software Foundation, either version 3 of
10  * the License, or (at your option) any later version.
11  *
12  * libheif is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with libheif. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef HEIF_API_STRUCTS_H
22 #define HEIF_API_STRUCTS_H
23 
24 #include "heif_image.h"
25 #include "heif_context.h"
26 
27 #include <memory>
28 
30 {
31  std::shared_ptr<heif::HeifContext::Image> image;
32 
33  // store reference to keep the context alive while we are using the handle (issue #147)
34  std::shared_ptr<heif::HeifContext> context;
35 };
36 
37 
38 struct heif_image
39 {
40  std::shared_ptr<heif::HeifPixelImage> image;
41 };
42 
43 
45 {
46  std::shared_ptr<heif::HeifContext> context;
47 };
48 
49 
51 {
52  heif_encoder(std::shared_ptr<heif::HeifContext> context,
53  const struct heif_encoder_plugin* plugin);
55 
56  struct heif_error alloc();
57  void release();
58 
59 
60  //std::shared_ptr<heif::HeifContext> context;
61  const struct heif_encoder_plugin* plugin;
62  void* encoder = nullptr;
63 };
64 
65 
66 #endif
Definition: heif_api_structs.h:45
std::shared_ptr< heif::HeifContext > context
Definition: heif_api_structs.h:46
Definition: heif_plugin.h:120
Definition: heif_api_structs.h:51
const struct heif_encoder_plugin * plugin
Definition: heif_api_structs.h:61
void * encoder
Definition: heif_api_structs.h:62
heif_encoder(std::shared_ptr< heif::HeifContext > context, const struct heif_encoder_plugin *plugin)
void release()
struct heif_error alloc()
Definition: heif.h:264
Definition: heif_api_structs.h:30
std::shared_ptr< heif::HeifContext::Image > image
Definition: heif_api_structs.h:31
std::shared_ptr< heif::HeifContext > context
Definition: heif_api_structs.h:34
Definition: heif_api_structs.h:39
std::shared_ptr< heif::HeifPixelImage > image
Definition: heif_api_structs.h:40