/src/libheif/libheif/image-items/avc.h
Line | Count | Source |
1 | | /* |
2 | | * HEIF AVC codec. |
3 | | * Copyright (c) 2023 Brad Hards <bradh@frogmouth.net> |
4 | | * Copyright (c) 2025 Dirk Farin <dirk.farin@gmail.com> |
5 | | * |
6 | | * This file is part of libheif. |
7 | | * |
8 | | * libheif is free software: you can redistribute it and/or modify |
9 | | * it under the terms of the GNU Lesser General Public License as |
10 | | * published by the Free Software Foundation, either version 3 of |
11 | | * the License, or (at your option) any later version. |
12 | | * |
13 | | * libheif is distributed in the hope that it will be useful, |
14 | | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | | * GNU Lesser General Public License for more details. |
17 | | * |
18 | | * You should have received a copy of the GNU Lesser General Public License |
19 | | * along with libheif. If not, see <http://www.gnu.org/licenses/>. |
20 | | */ |
21 | | |
22 | | #ifndef HEIF_AVC_H |
23 | | #define HEIF_AVC_H |
24 | | |
25 | | #include "box.h" |
26 | | #include "error.h" |
27 | | #include <cstdint> |
28 | | #include <vector> |
29 | | #include <string> |
30 | | #include <memory> |
31 | | #include "image_item.h" |
32 | | |
33 | | |
34 | | class ImageItem_AVC : public ImageItem |
35 | | { |
36 | | public: |
37 | | ImageItem_AVC(HeifContext* ctx, heif_item_id id); |
38 | | |
39 | | ImageItem_AVC(HeifContext* ctx); |
40 | | |
41 | 88 | uint32_t get_infe_type() const override { return fourcc("avc1"); } |
42 | | |
43 | 0 | const char* get_auxC_alpha_channel_type() const override { return "urn:mpeg:mpegB:cicp:systems:auxiliary:alpha"; } |
44 | | |
45 | 0 | heif_compression_format get_compression_format() const override { return heif_compression_AVC; } |
46 | | |
47 | | Error initialize_decoder() override; |
48 | | |
49 | | void set_decoder_input_data() override; |
50 | | |
51 | 0 | heif_brand2 get_compatible_brand() const override { return heif_brand2_avci; } |
52 | | |
53 | | protected: |
54 | | Result<std::shared_ptr<Decoder>> get_decoder() const override; |
55 | | |
56 | | std::shared_ptr<Encoder> get_encoder() const override; |
57 | | |
58 | | public: |
59 | | std::shared_ptr<class Decoder_AVC> m_decoder; |
60 | | std::shared_ptr<class Encoder_AVC> m_encoder; |
61 | | }; |
62 | | |
63 | | #endif |