/src/libheif/libheif/sequences/track_visual.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * HEIF image base codec. |
3 | | * Copyright (c) 2025 Dirk Farin <dirk.farin@gmail.com> |
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 LIBHEIF_TRACK_VISUAL_H |
22 | | #define LIBHEIF_TRACK_VISUAL_H |
23 | | |
24 | | #include "track.h" |
25 | | #include <string> |
26 | | #include <memory> |
27 | | #include <vector> |
28 | | |
29 | | |
30 | | class Track_Visual : public Track { |
31 | | public: |
32 | | //Track(HeifContext* ctx); |
33 | | |
34 | | Track_Visual(HeifContext* ctx, uint32_t track_id, uint16_t width, uint16_t height, |
35 | | const TrackOptions* options, uint32_t handler_type); |
36 | | |
37 | | Track_Visual(HeifContext* ctx, const std::shared_ptr<Box_trak>&); // when reading the file |
38 | | |
39 | | ~Track_Visual() override = default; |
40 | | |
41 | 0 | uint16_t get_width() const { return m_width; } |
42 | | |
43 | 0 | uint16_t get_height() const { return m_height; } |
44 | | |
45 | | Result<std::shared_ptr<HeifPixelImage>> decode_next_image_sample(const struct heif_decoding_options& options); |
46 | | |
47 | | Error encode_image(std::shared_ptr<HeifPixelImage> image, |
48 | | struct heif_encoder* encoder, |
49 | | const struct heif_encoding_options& options, |
50 | | heif_image_input_class image_class); |
51 | | |
52 | | heif_brand2 get_compatible_brand() const; |
53 | | |
54 | | private: |
55 | | uint16_t m_width = 0; |
56 | | uint16_t m_height = 0; |
57 | | }; |
58 | | |
59 | | |
60 | | |
61 | | #endif //LIBHEIF_TRACK_VISUAL_H |