| 1 |
/* |
| 2 |
* Copyright (C) 2025 Mohamad Al-Jaf |
| 3 |
* |
| 4 |
* This library is free software; you can redistribute it and/or |
| 5 |
* modify it under the terms of the GNU Lesser General Public |
| 6 |
* License as published by the Free Software Foundation; either |
| 7 |
* version 2.1 of the License, or (at your option) any later version. |
| 8 |
* |
| 9 |
* This library is distributed in the hope that it will be useful, |
| 10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 |
* Lesser General Public License for more details. |
| 13 |
* |
| 14 |
* You should have received a copy of the GNU Lesser General Public |
| 15 |
* License along with this library; if not, write to the Free Software |
| 16 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA |
| 17 |
*/ |
| 18 |
|
| 19 |
#ifdef __WIDL__ |
| 20 |
#pragma winrt ns_prefix |
| 21 |
#endif |
| 22 |
|
| 23 |
import "inspectable.idl"; |
| 24 |
import "asyncinfo.idl"; |
| 25 |
import "eventtoken.idl"; |
| 26 |
import "windowscontracts.idl"; |
| 27 |
import "windows.foundation.idl"; |
| 28 |
import "windows.media.core.idl"; |
| 29 |
import "windows.storage.idl"; |
| 30 |
import "windows.storage.streams.idl"; |
| 31 |
|
| 32 |
namespace Windows.Media.MediaProperties { |
| 33 |
interface IAudioEncodingProperties; |
| 34 |
interface IAudioEncodingProperties2; |
| 35 |
interface IAudioEncodingProperties3; |
| 36 |
interface IAudioEncodingPropertiesStatics; |
| 37 |
interface IAudioEncodingPropertiesStatics2; |
| 38 |
interface IAudioEncodingPropertiesWithFormatUserData; |
| 39 |
interface IContainerEncodingProperties; |
| 40 |
interface IContainerEncodingProperties2; |
| 41 |
interface IMediaEncodingProfile; |
| 42 |
interface IMediaEncodingProfile2; |
| 43 |
interface IMediaEncodingProfile3; |
| 44 |
interface IMediaEncodingProfileStatics; |
| 45 |
interface IMediaEncodingProfileStatics2; |
| 46 |
interface IMediaEncodingProfileStatics3; |
| 47 |
interface IMediaEncodingProperties; |
| 48 |
interface IMediaRatio; |
| 49 |
interface IVideoEncodingProperties; |
| 50 |
interface IVideoEncodingProperties2; |
| 51 |
interface IVideoEncodingProperties3; |
| 52 |
interface IVideoEncodingProperties4; |
| 53 |
interface IVideoEncodingProperties5; |
| 54 |
interface IVideoEncodingPropertiesStatics; |
| 55 |
interface IVideoEncodingPropertiesStatics2; |
| 56 |
|
| 57 |
runtimeclass AudioEncodingProperties; |
| 58 |
runtimeclass ContainerEncodingProperties; |
| 59 |
runtimeclass MediaEncodingProfile; |
| 60 |
runtimeclass MediaPropertySet; |
| 61 |
runtimeclass MediaRatio; |
| 62 |
runtimeclass VideoEncodingProperties; |
| 63 |
|
| 64 |
declare { |
| 65 |
interface Windows.Foundation.Collections.IKeyValuePair<GUID, IInspectable *>; |
| 66 |
interface Windows.Foundation.Collections.IIterable<Windows.Foundation.Collections.IKeyValuePair<GUID, IInspectable *> *>; |
| 67 |
interface Windows.Foundation.Collections.IIterator<Windows.Foundation.Collections.IKeyValuePair<GUID, IInspectable *> *>; |
| 68 |
interface Windows.Foundation.Collections.IMap<GUID, IInspectable *>; |
| 69 |
interface Windows.Foundation.Collections.IMapView<GUID, IInspectable *>; |
| 70 |
} |
| 71 |
|
| 72 |
[ |
| 73 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 74 |
exclusiveto(Windows.Media.MediaProperties.AudioEncodingProperties), |
| 75 |
uuid(62bc7a16-005c-4b3b-8a0b-0a090e9687f3) |
| 76 |
] |
| 77 |
interface IAudioEncodingProperties : IInspectable |
| 78 |
requires Windows.Media.MediaProperties.IMediaEncodingProperties |
| 79 |
{ |
| 80 |
[propput] HRESULT Bitrate([in] UINT32 value); |
| 81 |
[propget] HRESULT Bitrate([out, retval] UINT32 *value); |
| 82 |
[propput] HRESULT ChannelCount([in] UINT32 value); |
| 83 |
[propget] HRESULT ChannelCount([out, retval] UINT32 *value); |
| 84 |
[propput] HRESULT SampleRate([in] UINT32 value); |
| 85 |
[propget] HRESULT SampleRate([out, retval] UINT32 *value); |
| 86 |
[propput] HRESULT BitsPerSample([in] UINT32 value); |
| 87 |
[propget] HRESULT BitsPerSample([out, retval] UINT32 *value); |
| 88 |
} |
| 89 |
|
| 90 |
[ |
| 91 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 92 |
exclusiveto(Windows.Media.MediaProperties.ContainerEncodingProperties), |
| 93 |
uuid(59ac2a57-b32a-479e-8a61-4b7f2e9e7ea0) |
| 94 |
] |
| 95 |
interface IContainerEncodingProperties : IInspectable |
| 96 |
requires Windows.Media.MediaProperties.IMediaEncodingProperties |
| 97 |
{ |
| 98 |
} |
| 99 |
|
| 100 |
[ |
| 101 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 102 |
exclusiveto(Windows.Media.MediaProperties.MediaEncodingProfile), |
| 103 |
uuid(e7dbf5a8-1db9-4783-876b-3dfe12acfdb3) |
| 104 |
] |
| 105 |
interface IMediaEncodingProfile : IInspectable |
| 106 |
{ |
| 107 |
[propput] HRESULT Audio([in] Windows.Media.MediaProperties.AudioEncodingProperties *value); |
| 108 |
[propget] HRESULT Audio([out, retval] Windows.Media.MediaProperties.AudioEncodingProperties **value); |
| 109 |
[propput] HRESULT Video([in] Windows.Media.MediaProperties.VideoEncodingProperties *value); |
| 110 |
[propget] HRESULT Video([out, retval] Windows.Media.MediaProperties.VideoEncodingProperties **value); |
| 111 |
[propput] HRESULT Container([in] Windows.Media.MediaProperties.ContainerEncodingProperties *value); |
| 112 |
[propget] HRESULT Container([out, retval] Windows.Media.MediaProperties.ContainerEncodingProperties **value); |
| 113 |
} |
| 114 |
|
| 115 |
[ |
| 116 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 117 |
uuid(b4002af6-acd4-4e5a-a24b-5d7498a8b8c4) |
| 118 |
] |
| 119 |
interface IMediaEncodingProperties : IInspectable |
| 120 |
{ |
| 121 |
[propget] HRESULT Properties([out, retval] Windows.Media.MediaProperties.MediaPropertySet **value); |
| 122 |
[propget] HRESULT Type([out, retval] HSTRING *value); |
| 123 |
[propput] HRESULT Subtype([in] HSTRING value); |
| 124 |
[propget] HRESULT Subtype([out, retval] HSTRING *value); |
| 125 |
} |
| 126 |
|
| 127 |
[ |
| 128 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 129 |
exclusiveto(Windows.Media.MediaProperties.AudioEncodingProperties), |
| 130 |
uuid(98f10d79-13ea-49ff-be70-2673db69702c) |
| 131 |
] |
| 132 |
interface IAudioEncodingPropertiesWithFormatUserData : IInspectable |
| 133 |
{ |
| 134 |
HRESULT SetFormatUserData([in] UINT32 __value_size, [in, size_is(__value_size)] BYTE *value); |
| 135 |
HRESULT GetFormatUserData([out] UINT32 * __value_size, [out, size_is(, *__value_size)] BYTE **value); |
| 136 |
} |
| 137 |
|
| 138 |
[ |
| 139 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 140 |
exclusiveto(Windows.Media.MediaProperties.MediaRatio), |
| 141 |
uuid(d2d0fee5-8929-401d-ac78-7d357e378163) |
| 142 |
] |
| 143 |
interface IMediaRatio : IInspectable |
| 144 |
{ |
| 145 |
[propput] HRESULT Numerator([in] UINT32 value); |
| 146 |
[propget] HRESULT Numerator([out, retval] UINT32 *value); |
| 147 |
[propput] HRESULT Denominator([in] UINT32 value); |
| 148 |
[propget] HRESULT Denominator([out, retval] UINT32 *value); |
| 149 |
} |
| 150 |
|
| 151 |
[ |
| 152 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 153 |
exclusiveto(Windows.Media.MediaProperties.VideoEncodingProperties), |
| 154 |
uuid(76ee6c9a-37c2-4f2a-880a-1282bbb4373d) |
| 155 |
] |
| 156 |
interface IVideoEncodingProperties : IInspectable |
| 157 |
requires Windows.Media.MediaProperties.IMediaEncodingProperties |
| 158 |
{ |
| 159 |
[propput] HRESULT Bitrate([in] UINT32 value); |
| 160 |
[propget] HRESULT Bitrate([out, retval] UINT32 *value); |
| 161 |
[propput] HRESULT Width([in] UINT32 value); |
| 162 |
[propget] HRESULT Width([out, retval] UINT32 *value); |
| 163 |
[propput] HRESULT Height([in] UINT32 value); |
| 164 |
[propget] HRESULT Height([out, retval] UINT32 *value); |
| 165 |
[propget] HRESULT FrameRate([out, retval] Windows.Media.MediaProperties.MediaRatio **value); |
| 166 |
[propget] HRESULT PixelAspectRatio([out, retval] Windows.Media.MediaProperties.MediaRatio **value); |
| 167 |
} |
| 168 |
|
| 169 |
[ |
| 170 |
activatable(Windows.Foundation.UniversalApiContract, 1.0), |
| 171 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 172 |
marshaling_behavior(agile), |
| 173 |
/* static(Windows.Media.MediaProperties.IAudioEncodingPropertiesStatics, Windows.Foundation.UniversalApiContract, 1.0), */ |
| 174 |
/* static(Windows.Media.MediaProperties.IAudioEncodingPropertiesStatics2, Windows.Foundation.UniversalApiContract, 4.0), */ |
| 175 |
threading(both) |
| 176 |
] |
| 177 |
runtimeclass AudioEncodingProperties |
| 178 |
{ |
| 179 |
[default] interface Windows.Media.MediaProperties.IAudioEncodingProperties; |
| 180 |
interface Windows.Media.MediaProperties.IMediaEncodingProperties; |
| 181 |
[contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Media.MediaProperties.IAudioEncodingPropertiesWithFormatUserData; |
| 182 |
/* [contract(Windows.Foundation.UniversalApiContract, 4.0)] interface Windows.Media.MediaProperties.IAudioEncodingProperties2; */ |
| 183 |
/* [contract(Windows.Foundation.UniversalApiContract, 6.0)] interface Windows.Media.MediaProperties.IAudioEncodingProperties3; */ |
| 184 |
} |
| 185 |
|
| 186 |
[ |
| 187 |
activatable(Windows.Foundation.UniversalApiContract, 1.0), |
| 188 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 189 |
marshaling_behavior(agile), |
| 190 |
threading(both) |
| 191 |
] |
| 192 |
runtimeclass ContainerEncodingProperties |
| 193 |
{ |
| 194 |
[default] interface Windows.Media.MediaProperties.IContainerEncodingProperties; |
| 195 |
interface Windows.Media.MediaProperties.IMediaEncodingProperties; |
| 196 |
/* [contract(Windows.Foundation.UniversalApiContract, 6.0)] interface Windows.Media.MediaProperties.IContainerEncodingProperties2; */ |
| 197 |
} |
| 198 |
|
| 199 |
[ |
| 200 |
activatable(Windows.Foundation.UniversalApiContract, 1.0), |
| 201 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 202 |
marshaling_behavior(agile), |
| 203 |
/* static(Windows.Media.MediaProperties.IMediaEncodingProfileStatics, Windows.Foundation.UniversalApiContract, 1.0), */ |
| 204 |
/* static(Windows.Media.MediaProperties.IMediaEncodingProfileStatics2, Windows.Foundation.UniversalApiContract, 1.0), */ |
| 205 |
/* static(Windows.Media.MediaProperties.IMediaEncodingProfileStatics3, Windows.Foundation.UniversalApiContract, 4.0), */ |
| 206 |
threading(mta) |
| 207 |
] |
| 208 |
runtimeclass MediaEncodingProfile |
| 209 |
{ |
| 210 |
[default] interface Windows.Media.MediaProperties.IMediaEncodingProfile; |
| 211 |
/* [contract(Windows.Foundation.UniversalApiContract, 5.0)] interface Windows.Media.MediaProperties.IMediaEncodingProfile2; */ |
| 212 |
/* [contract(Windows.Foundation.UniversalApiContract, 6.0)] interface Windows.Media.MediaProperties.IMediaEncodingProfile3; */ |
| 213 |
} |
| 214 |
|
| 215 |
[ |
| 216 |
activatable(Windows.Foundation.UniversalApiContract, 1.0), |
| 217 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 218 |
marshaling_behavior(agile), |
| 219 |
threading(both) |
| 220 |
] |
| 221 |
runtimeclass MediaPropertySet |
| 222 |
{ |
| 223 |
[default] interface Windows.Foundation.Collections.IMap<GUID, IInspectable *>; |
| 224 |
interface Windows.Foundation.Collections.IIterable<Windows.Foundation.Collections.IKeyValuePair<GUID, IInspectable *> *>; |
| 225 |
} |
| 226 |
|
| 227 |
[ |
| 228 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 229 |
marshaling_behavior(agile), |
| 230 |
threading(both) |
| 231 |
] |
| 232 |
runtimeclass MediaRatio |
| 233 |
{ |
| 234 |
[default] interface Windows.Media.MediaProperties.IMediaRatio; |
| 235 |
} |
| 236 |
|
| 237 |
[ |
| 238 |
activatable(Windows.Foundation.UniversalApiContract, 1.0), |
| 239 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 240 |
marshaling_behavior(agile), |
| 241 |
/* static(Windows.Media.MediaProperties.IVideoEncodingPropertiesStatics, Windows.Foundation.UniversalApiContract, 1.0), */ |
| 242 |
/* static(Windows.Media.MediaProperties.IVideoEncodingPropertiesStatics2, Windows.Foundation.UniversalApiContract, 4.0), */ |
| 243 |
threading(both) |
| 244 |
] |
| 245 |
runtimeclass VideoEncodingProperties |
| 246 |
{ |
| 247 |
[default] interface Windows.Media.MediaProperties.IVideoEncodingProperties; |
| 248 |
interface Windows.Media.MediaProperties.IMediaEncodingProperties; |
| 249 |
/* [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Media.MediaProperties.IVideoEncodingProperties2; */ |
| 250 |
/* [contract(Windows.Foundation.UniversalApiContract, 3.0)] interface Windows.Media.MediaProperties.IVideoEncodingProperties3; */ |
| 251 |
/* [contract(Windows.Foundation.UniversalApiContract, 4.0)] interface Windows.Media.MediaProperties.IVideoEncodingProperties4; */ |
| 252 |
/* [contract(Windows.Foundation.UniversalApiContract, 6.0)] interface Windows.Media.MediaProperties.IVideoEncodingProperties5; */ |
| 253 |
} |
| 254 |
} |