1
- // Copyright (c) Team CharLS.
1
+ // SPDX-FileCopyrightText: © 2018 Team CharLS
2
2
// SPDX-License-Identifier: BSD-3-Clause
3
3
4
4
module;
5
5
6
- #include " macros.hpp"
7
6
#include " intellisense.hpp"
8
7
9
8
module jpegls_bitmap_decoder;
10
9
11
10
import std;
12
- import <win.hpp>;
13
11
import winrt;
14
12
import charls;
13
+ import <win.hpp>;
15
14
16
15
import class_factory;
17
16
import guids;
18
17
import util;
19
18
import hresults;
20
19
import jpegls_bitmap_frame_decode;
20
+ import " macros.hpp" ;
21
21
22
22
using charls::jpegls_category;
23
23
using charls::jpegls_decoder;
24
24
using charls::jpegls_error;
25
- using std::int64_t ;
26
25
using std::array;
27
26
using std::error_code;
27
+ using std::int64_t ;
28
28
using std::scoped_lock;
29
+ using std::uint32_t ;
29
30
using winrt::check_hresult;
30
31
using winrt::com_ptr;
31
32
using winrt::make;
32
- using winrt::to_hresult;
33
+
33
34
34
35
namespace {
35
36
@@ -84,8 +85,8 @@ struct jpegls_bitmap_decoder : winrt::implements<jpegls_bitmap_decoder, IWICBitm
84
85
return to_hresult ();
85
86
}
86
87
87
- HRESULT __stdcall Initialize (_In_ IStream* stream,
88
- [[maybe_unused]] const WICDecodeOptions cache_options) noexcept override
88
+ HRESULT __stdcall Initialize (_In_ IStream* stream, [[maybe_unused]]
89
+ const WICDecodeOptions cache_options) noexcept override
89
90
try
90
91
{
91
92
TRACE (" {} jpegls_bitmap_decoder::Initialize, stream={}, cache_options={}\n " , fmt::ptr (this ), fmt::ptr (stream),
@@ -133,16 +134,17 @@ struct jpegls_bitmap_decoder : winrt::implements<jpegls_bitmap_decoder, IWICBitm
133
134
return to_hresult ();
134
135
}
135
136
136
- HRESULT __stdcall CopyPalette ([[maybe_unused]] _In_ IWICPalette* palette) noexcept override
137
+ HRESULT __stdcall CopyPalette ([[maybe_unused]]
138
+ _In_ IWICPalette* palette) noexcept override
137
139
{
138
140
TRACE (" {} jpegls_bitmap_decoder::CopyPalette, palette={}\n " , fmt::ptr (this ), fmt::ptr (palette));
139
141
140
142
// Palettes are for JPEG-LS on frame level.
141
143
return wincodec::error_palette_unavailable;
142
144
}
143
145
144
- HRESULT __stdcall GetMetadataQueryReader (
145
- [[maybe_unused]] _Outptr_ IWICMetadataQueryReader** metadata_query_reader) noexcept override
146
+ HRESULT __stdcall GetMetadataQueryReader ([[maybe_unused]]
147
+ _Outptr_ IWICMetadataQueryReader** metadata_query_reader) noexcept override
146
148
{
147
149
TRACE (" {} jpegls_bitmap_decoder::GetMetadataQueryReader, metadata_query_reader=%p\n " , fmt::ptr (this ),
148
150
fmt::ptr (metadata_query_reader));
@@ -151,7 +153,8 @@ struct jpegls_bitmap_decoder : winrt::implements<jpegls_bitmap_decoder, IWICBitm
151
153
return wincodec::error_unsupported_operation;
152
154
}
153
155
154
- HRESULT __stdcall GetPreview ([[maybe_unused]] _Outptr_ IWICBitmapSource** bitmap_source) noexcept override
156
+ HRESULT __stdcall GetPreview ([[maybe_unused]]
157
+ _Outptr_ IWICBitmapSource** bitmap_source) noexcept override
155
158
{
156
159
TRACE (" {} jpegls_bitmap_decoder::GetPreview, bitmap_source={}\n " , fmt::ptr (this ), fmt::ptr (bitmap_source));
157
160
@@ -161,7 +164,8 @@ struct jpegls_bitmap_decoder : winrt::implements<jpegls_bitmap_decoder, IWICBitm
161
164
162
165
HRESULT __stdcall GetColorContexts ([[maybe_unused]] const uint32_t count,
163
166
[[maybe_unused]] IWICColorContext** color_contexts,
164
- [[maybe_unused]] uint32_t * actual_count) noexcept override
167
+ [[maybe_unused]]
168
+ uint32_t * actual_count) noexcept override
165
169
{
166
170
TRACE (" {} jpegls_bitmap_decoder::GetColorContexts, count={}, color_contexts={}, actual_count={}\n " , fmt::ptr (this ),
167
171
count, fmt::ptr (color_contexts), fmt::ptr (actual_count));
@@ -170,7 +174,8 @@ struct jpegls_bitmap_decoder : winrt::implements<jpegls_bitmap_decoder, IWICBitm
170
174
return wincodec::error_unsupported_operation;
171
175
}
172
176
173
- HRESULT __stdcall GetThumbnail ([[maybe_unused]] _Outptr_ IWICBitmapSource** thumbnail) noexcept override
177
+ HRESULT __stdcall GetThumbnail ([[maybe_unused]]
178
+ _Outptr_ IWICBitmapSource** thumbnail) noexcept override
174
179
{
175
180
TRACE (" {} jpegls_bitmap_decoder::GetThumbnail, thumbnail={}\n " , fmt::ptr (this ), fmt::ptr (thumbnail));
176
181
0 commit comments