winrt-Windows.Media.Transcoding 2.0.0b2__tar.gz → 2.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. {winrt-Windows.Media.Transcoding-2.0.0b2 → winrt_windows_media_transcoding-2.1.0}/PKG-INFO +8 -1
  2. winrt_windows_media_transcoding-2.1.0/all-requirements.txt +8 -0
  3. {winrt-Windows.Media.Transcoding-2.0.0b2 → winrt_windows_media_transcoding-2.1.0}/py.Windows.Media.Transcoding.cpp +146 -154
  4. {winrt-Windows.Media.Transcoding-2.0.0b2 → winrt_windows_media_transcoding-2.1.0}/pyproject.toml +2 -2
  5. winrt_windows_media_transcoding-2.1.0/pywinrt-version.txt +1 -0
  6. {winrt-Windows.Media.Transcoding-2.0.0b2 → winrt_windows_media_transcoding-2.1.0}/requirements.txt +2 -2
  7. winrt_windows_media_transcoding-2.1.0/setup.py +31 -0
  8. {winrt-Windows.Media.Transcoding-2.0.0b2 → winrt_windows_media_transcoding-2.1.0}/winrt/_winrt_windows_media_transcoding.pyi +14 -14
  9. {winrt-Windows.Media.Transcoding-2.0.0b2 → winrt_windows_media_transcoding-2.1.0}/winrt/windows/media/transcoding/__init__.py +1 -1
  10. winrt_windows_media_transcoding-2.1.0/winrt/windows/media/transcoding/py.typed +0 -0
  11. {winrt-Windows.Media.Transcoding-2.0.0b2 → winrt_windows_media_transcoding-2.1.0}/winrt_Windows.Media.Transcoding.egg-info/PKG-INFO +8 -1
  12. {winrt-Windows.Media.Transcoding-2.0.0b2 → winrt_windows_media_transcoding-2.1.0}/winrt_Windows.Media.Transcoding.egg-info/SOURCES.txt +1 -0
  13. winrt_windows_media_transcoding-2.1.0/winrt_Windows.Media.Transcoding.egg-info/requires.txt +9 -0
  14. winrt-Windows.Media.Transcoding-2.0.0b2/all-requirements.txt +0 -8
  15. winrt-Windows.Media.Transcoding-2.0.0b2/pywinrt-version.txt +0 -1
  16. winrt-Windows.Media.Transcoding-2.0.0b2/setup.py +0 -16
  17. winrt-Windows.Media.Transcoding-2.0.0b2/winrt_Windows.Media.Transcoding.egg-info/requires.txt +0 -9
  18. {winrt-Windows.Media.Transcoding-2.0.0b2 → winrt_windows_media_transcoding-2.1.0}/README.md +0 -0
  19. {winrt-Windows.Media.Transcoding-2.0.0b2 → winrt_windows_media_transcoding-2.1.0}/setup.cfg +0 -0
  20. {winrt-Windows.Media.Transcoding-2.0.0b2 → winrt_windows_media_transcoding-2.1.0}/winrt_Windows.Media.Transcoding.egg-info/dependency_links.txt +0 -0
  21. {winrt-Windows.Media.Transcoding-2.0.0b2 → winrt_windows_media_transcoding-2.1.0}/winrt_Windows.Media.Transcoding.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.Media.Transcoding
3
- Version: 2.0.0b2
3
+ Version: 2.1.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -12,7 +12,14 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
13
  Requires-Python: <3.13,>=3.9
14
14
  Description-Content-Type: text/markdown
15
+ Requires-Dist: winrt-runtime==2.1.0
15
16
  Provides-Extra: all
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.1.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Foundation.Collections[all]==2.1.0; extra == "all"
19
+ Requires-Dist: winrt-Windows.Media.Core[all]==2.1.0; extra == "all"
20
+ Requires-Dist: winrt-Windows.Media.MediaProperties[all]==2.1.0; extra == "all"
21
+ Requires-Dist: winrt-Windows.Storage[all]==2.1.0; extra == "all"
22
+ Requires-Dist: winrt-Windows.Storage.Streams[all]==2.1.0; extra == "all"
16
23
 
17
24
  <!-- warning: Please don't edit this file. It was automatically generated. -->
18
25
 
@@ -0,0 +1,8 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
+
3
+ winrt-Windows.Foundation[all]==2.1.0
4
+ winrt-Windows.Foundation.Collections[all]==2.1.0
5
+ winrt-Windows.Media.Core[all]==2.1.0
6
+ winrt-Windows.Media.MediaProperties[all]==2.1.0
7
+ winrt-Windows.Storage[all]==2.1.0
8
+ winrt-Windows.Storage.Streams[all]==2.1.0
@@ -1,8 +1,7 @@
1
- // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
1
+ // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
2
 
3
3
  #include "py.Windows.Media.Transcoding.h"
4
4
 
5
-
6
5
  namespace py::cpp::Windows::Media::Transcoding
7
6
  {
8
7
  // ----- MediaTranscoder class --------------------
@@ -50,14 +49,14 @@ namespace py::cpp::Windows::Media::Transcoding
50
49
 
51
50
  if (arg_count == 1)
52
51
  {
53
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"AddAudioEffect", 1))
54
- {
55
- py::set_arg_count_version_error(1);
56
- return nullptr;
57
- }
58
-
59
52
  try
60
53
  {
54
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"AddAudioEffect", 1))
55
+ {
56
+ py::set_arg_count_version_error(1);
57
+ return nullptr;
58
+ }
59
+
61
60
  auto param0 = py::convert_to<winrt::hstring>(args, 0);
62
61
 
63
62
  self->obj.AddAudioEffect(param0);
@@ -71,14 +70,14 @@ namespace py::cpp::Windows::Media::Transcoding
71
70
  }
72
71
  else if (arg_count == 3)
73
72
  {
74
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"AddAudioEffect", 3))
75
- {
76
- py::set_arg_count_version_error(3);
77
- return nullptr;
78
- }
79
-
80
73
  try
81
74
  {
75
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"AddAudioEffect", 3))
76
+ {
77
+ py::set_arg_count_version_error(3);
78
+ return nullptr;
79
+ }
80
+
82
81
  auto param0 = py::convert_to<winrt::hstring>(args, 0);
83
82
  auto param1 = py::convert_to<bool>(args, 1);
84
83
  auto param2 = py::convert_to<winrt::Windows::Foundation::Collections::IPropertySet>(args, 2);
@@ -105,14 +104,14 @@ namespace py::cpp::Windows::Media::Transcoding
105
104
 
106
105
  if (arg_count == 1)
107
106
  {
108
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"AddVideoEffect", 1))
109
- {
110
- py::set_arg_count_version_error(1);
111
- return nullptr;
112
- }
113
-
114
107
  try
115
108
  {
109
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"AddVideoEffect", 1))
110
+ {
111
+ py::set_arg_count_version_error(1);
112
+ return nullptr;
113
+ }
114
+
116
115
  auto param0 = py::convert_to<winrt::hstring>(args, 0);
117
116
 
118
117
  self->obj.AddVideoEffect(param0);
@@ -126,14 +125,14 @@ namespace py::cpp::Windows::Media::Transcoding
126
125
  }
127
126
  else if (arg_count == 3)
128
127
  {
129
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"AddVideoEffect", 3))
130
- {
131
- py::set_arg_count_version_error(3);
132
- return nullptr;
133
- }
134
-
135
128
  try
136
129
  {
130
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"AddVideoEffect", 3))
131
+ {
132
+ py::set_arg_count_version_error(3);
133
+ return nullptr;
134
+ }
135
+
137
136
  auto param0 = py::convert_to<winrt::hstring>(args, 0);
138
137
  auto param1 = py::convert_to<bool>(args, 1);
139
138
  auto param2 = py::convert_to<winrt::Windows::Foundation::Collections::IPropertySet>(args, 2);
@@ -160,14 +159,14 @@ namespace py::cpp::Windows::Media::Transcoding
160
159
 
161
160
  if (arg_count == 0)
162
161
  {
163
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"ClearEffects", 0))
164
- {
165
- py::set_arg_count_version_error(0);
166
- return nullptr;
167
- }
168
-
169
162
  try
170
163
  {
164
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"ClearEffects", 0))
165
+ {
166
+ py::set_arg_count_version_error(0);
167
+ return nullptr;
168
+ }
169
+
171
170
  self->obj.ClearEffects();
172
171
  Py_RETURN_NONE;
173
172
  }
@@ -190,14 +189,14 @@ namespace py::cpp::Windows::Media::Transcoding
190
189
 
191
190
  if (arg_count == 3)
192
191
  {
193
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"PrepareFileTranscodeAsync", 3))
194
- {
195
- py::set_arg_count_version_error(3);
196
- return nullptr;
197
- }
198
-
199
192
  try
200
193
  {
194
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"PrepareFileTranscodeAsync", 3))
195
+ {
196
+ py::set_arg_count_version_error(3);
197
+ return nullptr;
198
+ }
199
+
201
200
  auto param0 = py::convert_to<winrt::Windows::Storage::IStorageFile>(args, 0);
202
201
  auto param1 = py::convert_to<winrt::Windows::Storage::IStorageFile>(args, 1);
203
202
  auto param2 = py::convert_to<winrt::Windows::Media::MediaProperties::MediaEncodingProfile>(args, 2);
@@ -223,14 +222,14 @@ namespace py::cpp::Windows::Media::Transcoding
223
222
 
224
223
  if (arg_count == 3)
225
224
  {
226
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"PrepareMediaStreamSourceTranscodeAsync", 3))
227
- {
228
- py::set_arg_count_version_error(3);
229
- return nullptr;
230
- }
231
-
232
225
  try
233
226
  {
227
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"PrepareMediaStreamSourceTranscodeAsync", 3))
228
+ {
229
+ py::set_arg_count_version_error(3);
230
+ return nullptr;
231
+ }
232
+
234
233
  auto param0 = py::convert_to<winrt::Windows::Media::Core::IMediaSource>(args, 0);
235
234
  auto param1 = py::convert_to<winrt::Windows::Storage::Streams::IRandomAccessStream>(args, 1);
236
235
  auto param2 = py::convert_to<winrt::Windows::Media::MediaProperties::MediaEncodingProfile>(args, 2);
@@ -256,14 +255,14 @@ namespace py::cpp::Windows::Media::Transcoding
256
255
 
257
256
  if (arg_count == 3)
258
257
  {
259
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"PrepareStreamTranscodeAsync", 3))
260
- {
261
- py::set_arg_count_version_error(3);
262
- return nullptr;
263
- }
264
-
265
258
  try
266
259
  {
260
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"PrepareStreamTranscodeAsync", 3))
261
+ {
262
+ py::set_arg_count_version_error(3);
263
+ return nullptr;
264
+ }
265
+
267
266
  auto param0 = py::convert_to<winrt::Windows::Storage::Streams::IRandomAccessStream>(args, 0);
268
267
  auto param1 = py::convert_to<winrt::Windows::Storage::Streams::IRandomAccessStream>(args, 1);
269
268
  auto param2 = py::convert_to<winrt::Windows::Media::MediaProperties::MediaEncodingProfile>(args, 2);
@@ -285,14 +284,14 @@ namespace py::cpp::Windows::Media::Transcoding
285
284
 
286
285
  static PyObject* MediaTranscoder_get_TrimStopTime(py::wrapper::Windows::Media::Transcoding::MediaTranscoder* self, void* /*unused*/) noexcept
287
286
  {
288
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"TrimStopTime"))
289
- {
290
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
291
- return nullptr;
292
- }
293
-
294
287
  try
295
288
  {
289
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"TrimStopTime"))
290
+ {
291
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
292
+ return nullptr;
293
+ }
294
+
296
295
  return py::convert(self->obj.TrimStopTime());
297
296
  }
298
297
  catch (...)
@@ -304,12 +303,6 @@ namespace py::cpp::Windows::Media::Transcoding
304
303
 
305
304
  static int MediaTranscoder_put_TrimStopTime(py::wrapper::Windows::Media::Transcoding::MediaTranscoder* self, PyObject* arg, void* /*unused*/) noexcept
306
305
  {
307
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"TrimStopTime"))
308
- {
309
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
310
- return -1;
311
- }
312
-
313
306
  if (arg == nullptr)
314
307
  {
315
308
  PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
@@ -318,6 +311,12 @@ namespace py::cpp::Windows::Media::Transcoding
318
311
 
319
312
  try
320
313
  {
314
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"TrimStopTime"))
315
+ {
316
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
317
+ return -1;
318
+ }
319
+
321
320
  auto param0 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(arg);
322
321
 
323
322
  self->obj.TrimStopTime(param0);
@@ -332,14 +331,14 @@ namespace py::cpp::Windows::Media::Transcoding
332
331
 
333
332
  static PyObject* MediaTranscoder_get_TrimStartTime(py::wrapper::Windows::Media::Transcoding::MediaTranscoder* self, void* /*unused*/) noexcept
334
333
  {
335
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"TrimStartTime"))
336
- {
337
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
338
- return nullptr;
339
- }
340
-
341
334
  try
342
335
  {
336
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"TrimStartTime"))
337
+ {
338
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
339
+ return nullptr;
340
+ }
341
+
343
342
  return py::convert(self->obj.TrimStartTime());
344
343
  }
345
344
  catch (...)
@@ -351,12 +350,6 @@ namespace py::cpp::Windows::Media::Transcoding
351
350
 
352
351
  static int MediaTranscoder_put_TrimStartTime(py::wrapper::Windows::Media::Transcoding::MediaTranscoder* self, PyObject* arg, void* /*unused*/) noexcept
353
352
  {
354
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"TrimStartTime"))
355
- {
356
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
357
- return -1;
358
- }
359
-
360
353
  if (arg == nullptr)
361
354
  {
362
355
  PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
@@ -365,6 +358,12 @@ namespace py::cpp::Windows::Media::Transcoding
365
358
 
366
359
  try
367
360
  {
361
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"TrimStartTime"))
362
+ {
363
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
364
+ return -1;
365
+ }
366
+
368
367
  auto param0 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(arg);
369
368
 
370
369
  self->obj.TrimStartTime(param0);
@@ -379,14 +378,14 @@ namespace py::cpp::Windows::Media::Transcoding
379
378
 
380
379
  static PyObject* MediaTranscoder_get_HardwareAccelerationEnabled(py::wrapper::Windows::Media::Transcoding::MediaTranscoder* self, void* /*unused*/) noexcept
381
380
  {
382
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"HardwareAccelerationEnabled"))
383
- {
384
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
385
- return nullptr;
386
- }
387
-
388
381
  try
389
382
  {
383
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"HardwareAccelerationEnabled"))
384
+ {
385
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
386
+ return nullptr;
387
+ }
388
+
390
389
  return py::convert(self->obj.HardwareAccelerationEnabled());
391
390
  }
392
391
  catch (...)
@@ -398,12 +397,6 @@ namespace py::cpp::Windows::Media::Transcoding
398
397
 
399
398
  static int MediaTranscoder_put_HardwareAccelerationEnabled(py::wrapper::Windows::Media::Transcoding::MediaTranscoder* self, PyObject* arg, void* /*unused*/) noexcept
400
399
  {
401
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"HardwareAccelerationEnabled"))
402
- {
403
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
404
- return -1;
405
- }
406
-
407
400
  if (arg == nullptr)
408
401
  {
409
402
  PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
@@ -412,6 +405,12 @@ namespace py::cpp::Windows::Media::Transcoding
412
405
 
413
406
  try
414
407
  {
408
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"HardwareAccelerationEnabled"))
409
+ {
410
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
411
+ return -1;
412
+ }
413
+
415
414
  auto param0 = py::convert_to<bool>(arg);
416
415
 
417
416
  self->obj.HardwareAccelerationEnabled(param0);
@@ -426,14 +425,14 @@ namespace py::cpp::Windows::Media::Transcoding
426
425
 
427
426
  static PyObject* MediaTranscoder_get_AlwaysReencode(py::wrapper::Windows::Media::Transcoding::MediaTranscoder* self, void* /*unused*/) noexcept
428
427
  {
429
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"AlwaysReencode"))
430
- {
431
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
432
- return nullptr;
433
- }
434
-
435
428
  try
436
429
  {
430
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"AlwaysReencode"))
431
+ {
432
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
433
+ return nullptr;
434
+ }
435
+
437
436
  return py::convert(self->obj.AlwaysReencode());
438
437
  }
439
438
  catch (...)
@@ -445,12 +444,6 @@ namespace py::cpp::Windows::Media::Transcoding
445
444
 
446
445
  static int MediaTranscoder_put_AlwaysReencode(py::wrapper::Windows::Media::Transcoding::MediaTranscoder* self, PyObject* arg, void* /*unused*/) noexcept
447
446
  {
448
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"AlwaysReencode"))
449
- {
450
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
451
- return -1;
452
- }
453
-
454
447
  if (arg == nullptr)
455
448
  {
456
449
  PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
@@ -459,6 +452,12 @@ namespace py::cpp::Windows::Media::Transcoding
459
452
 
460
453
  try
461
454
  {
455
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"AlwaysReencode"))
456
+ {
457
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
458
+ return -1;
459
+ }
460
+
462
461
  auto param0 = py::convert_to<bool>(arg);
463
462
 
464
463
  self->obj.AlwaysReencode(param0);
@@ -473,14 +472,14 @@ namespace py::cpp::Windows::Media::Transcoding
473
472
 
474
473
  static PyObject* MediaTranscoder_get_VideoProcessingAlgorithm(py::wrapper::Windows::Media::Transcoding::MediaTranscoder* self, void* /*unused*/) noexcept
475
474
  {
476
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"VideoProcessingAlgorithm"))
477
- {
478
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
479
- return nullptr;
480
- }
481
-
482
475
  try
483
476
  {
477
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"VideoProcessingAlgorithm"))
478
+ {
479
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
480
+ return nullptr;
481
+ }
482
+
484
483
  return py::convert(self->obj.VideoProcessingAlgorithm());
485
484
  }
486
485
  catch (...)
@@ -492,12 +491,6 @@ namespace py::cpp::Windows::Media::Transcoding
492
491
 
493
492
  static int MediaTranscoder_put_VideoProcessingAlgorithm(py::wrapper::Windows::Media::Transcoding::MediaTranscoder* self, PyObject* arg, void* /*unused*/) noexcept
494
493
  {
495
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"VideoProcessingAlgorithm"))
496
- {
497
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
498
- return -1;
499
- }
500
-
501
494
  if (arg == nullptr)
502
495
  {
503
496
  PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
@@ -506,6 +499,12 @@ namespace py::cpp::Windows::Media::Transcoding
506
499
 
507
500
  try
508
501
  {
502
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Transcoding.MediaTranscoder", L"VideoProcessingAlgorithm"))
503
+ {
504
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
505
+ return -1;
506
+ }
507
+
509
508
  auto param0 = py::convert_to<winrt::Windows::Media::Transcoding::MediaVideoProcessingAlgorithm>(arg);
510
509
 
511
510
  self->obj.VideoProcessingAlgorithm(param0);
@@ -563,23 +562,20 @@ namespace py::cpp::Windows::Media::Transcoding
563
562
  { }
564
563
  };
565
564
 
566
- static PyType_Slot _type_slots_MediaTranscoder[] =
567
- {
565
+ static PyType_Slot _type_slots_MediaTranscoder[] = {
568
566
  { Py_tp_new, reinterpret_cast<void*>(_new_MediaTranscoder) },
569
567
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_MediaTranscoder) },
570
568
  { Py_tp_methods, reinterpret_cast<void*>(_methods_MediaTranscoder) },
571
569
  { Py_tp_getset, reinterpret_cast<void*>(_getset_MediaTranscoder) },
572
- { },
570
+ { }
573
571
  };
574
572
 
575
- static PyType_Spec type_spec_MediaTranscoder =
576
- {
573
+ static PyType_Spec type_spec_MediaTranscoder = {
577
574
  "winrt._winrt_windows_media_transcoding.MediaTranscoder",
578
575
  sizeof(py::wrapper::Windows::Media::Transcoding::MediaTranscoder),
579
576
  0,
580
577
  Py_TPFLAGS_DEFAULT,
581
- _type_slots_MediaTranscoder
582
- };
578
+ _type_slots_MediaTranscoder};
583
579
 
584
580
  // ----- PrepareTranscodeResult class --------------------
585
581
 
@@ -604,14 +600,14 @@ namespace py::cpp::Windows::Media::Transcoding
604
600
 
605
601
  if (arg_count == 0)
606
602
  {
607
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Transcoding.PrepareTranscodeResult", L"TranscodeAsync", 0))
608
- {
609
- py::set_arg_count_version_error(0);
610
- return nullptr;
611
- }
612
-
613
603
  try
614
604
  {
605
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Media.Transcoding.PrepareTranscodeResult", L"TranscodeAsync", 0))
606
+ {
607
+ py::set_arg_count_version_error(0);
608
+ return nullptr;
609
+ }
610
+
615
611
  return py::convert(self->obj.TranscodeAsync());
616
612
  }
617
613
  catch (...)
@@ -629,14 +625,14 @@ namespace py::cpp::Windows::Media::Transcoding
629
625
 
630
626
  static PyObject* PrepareTranscodeResult_get_CanTranscode(py::wrapper::Windows::Media::Transcoding::PrepareTranscodeResult* self, void* /*unused*/) noexcept
631
627
  {
632
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Transcoding.PrepareTranscodeResult", L"CanTranscode"))
633
- {
634
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
635
- return nullptr;
636
- }
637
-
638
628
  try
639
629
  {
630
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Transcoding.PrepareTranscodeResult", L"CanTranscode"))
631
+ {
632
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
633
+ return nullptr;
634
+ }
635
+
640
636
  return py::convert(self->obj.CanTranscode());
641
637
  }
642
638
  catch (...)
@@ -648,14 +644,14 @@ namespace py::cpp::Windows::Media::Transcoding
648
644
 
649
645
  static PyObject* PrepareTranscodeResult_get_FailureReason(py::wrapper::Windows::Media::Transcoding::PrepareTranscodeResult* self, void* /*unused*/) noexcept
650
646
  {
651
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Transcoding.PrepareTranscodeResult", L"FailureReason"))
652
- {
653
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
654
- return nullptr;
655
- }
656
-
657
647
  try
658
648
  {
649
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Media.Transcoding.PrepareTranscodeResult", L"FailureReason"))
650
+ {
651
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
652
+ return nullptr;
653
+ }
654
+
659
655
  return py::convert(self->obj.FailureReason());
660
656
  }
661
657
  catch (...)
@@ -702,39 +698,35 @@ namespace py::cpp::Windows::Media::Transcoding
702
698
  { }
703
699
  };
704
700
 
705
- static PyType_Slot _type_slots_PrepareTranscodeResult[] =
706
- {
701
+ static PyType_Slot _type_slots_PrepareTranscodeResult[] = {
707
702
  { Py_tp_new, reinterpret_cast<void*>(_new_PrepareTranscodeResult) },
708
703
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_PrepareTranscodeResult) },
709
704
  { Py_tp_methods, reinterpret_cast<void*>(_methods_PrepareTranscodeResult) },
710
705
  { Py_tp_getset, reinterpret_cast<void*>(_getset_PrepareTranscodeResult) },
711
- { },
706
+ { }
712
707
  };
713
708
 
714
- static PyType_Spec type_spec_PrepareTranscodeResult =
715
- {
709
+ static PyType_Spec type_spec_PrepareTranscodeResult = {
716
710
  "winrt._winrt_windows_media_transcoding.PrepareTranscodeResult",
717
711
  sizeof(py::wrapper::Windows::Media::Transcoding::PrepareTranscodeResult),
718
712
  0,
719
713
  Py_TPFLAGS_DEFAULT,
720
- _type_slots_PrepareTranscodeResult
721
- };
714
+ _type_slots_PrepareTranscodeResult};
722
715
 
723
716
  // ----- Windows.Media.Transcoding Initialization --------------------
724
- PyDoc_STRVAR(module_doc, "Windows::Media::Transcoding");
725
717
 
718
+ PyDoc_STRVAR(module_doc, "Windows.Media.Transcoding");
726
719
 
727
- static PyModuleDef module_def
728
- = {PyModuleDef_HEAD_INIT,
729
- "_winrt_windows_media_transcoding",
730
- module_doc,
731
- 0,
732
- nullptr,
733
- nullptr,
734
- nullptr,
735
- nullptr,
736
- nullptr};
737
-
720
+ static PyModuleDef module_def = {
721
+ PyModuleDef_HEAD_INIT,
722
+ "_winrt_windows_media_transcoding",
723
+ module_doc,
724
+ 0,
725
+ nullptr,
726
+ nullptr,
727
+ nullptr,
728
+ nullptr,
729
+ nullptr};
738
730
  } // py::cpp::Windows::Media::Transcoding
739
731
 
740
732
  PyMODINIT_FUNC PyInit__winrt_windows_media_transcoding(void) noexcept
@@ -1,7 +1,7 @@
1
1
  # WARNING: Please don't edit this file. It was automatically generated.
2
2
 
3
3
  [build-system]
4
- requires = ["setuptools", "setuptools-scm", "winrt-sdk"]
4
+ requires = ["setuptools", "winrt-sdk"]
5
5
  build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
@@ -30,7 +30,7 @@ dependencies = { file = "requirements.txt" }
30
30
  optional-dependencies.all = { file = "all-requirements.txt" }
31
31
 
32
32
  [tool.setuptools.package-data]
33
- winrt = ["*.pyi"]
33
+ "*" = ["*.pyi", "py.typed"]
34
34
 
35
35
  [tool.cibuildwheel]
36
36
  # use local winrt-sdk build dependency
@@ -1,3 +1,3 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
2
 
3
- winrt-runtime==2.0.0-beta.2
3
+ winrt-runtime==2.1.0
@@ -0,0 +1,31 @@
1
+ # WARNING: Please don't edit this file. It was automatically generated.
2
+
3
+ from setuptools import Extension, setup
4
+ from setuptools.command.build_ext import build_ext
5
+ from winrt_sdk import get_include_dirs
6
+
7
+
8
+ class build_ext_ex(build_ext):
9
+ def build_extension(self, ext):
10
+ if self.compiler.compiler_type == "msvc":
11
+ ext.extra_compile_args = ["/std:c++20", "/permissive-"]
12
+ elif self.compiler.compiler_type == "mingw32":
13
+ ext.extra_compile_args = ["-std=c++20", "-D_WIN32_WINNT=_WIN32_WINNT_WIN10"]
14
+ ext.extra_link_args = ["-loleaut32"]
15
+ else:
16
+ raise ValueError(f"Unsupported compiler: {self.compiler.compiler_type}")
17
+
18
+ build_ext.build_extension(self, ext)
19
+
20
+
21
+ setup(
22
+ cmdclass = {'build_ext': build_ext_ex},
23
+ ext_modules=[
24
+ Extension(
25
+ "winrt._winrt_windows_media_transcoding",
26
+ sources=["py.Windows.Media.Transcoding.cpp"],
27
+ include_dirs=get_include_dirs(),
28
+ libraries=["windowsapp"],
29
+ )
30
+ ],
31
+ )
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
2
 
3
3
  import datetime
4
4
  import sys
@@ -9,12 +9,12 @@ from builtins import property as _property
9
9
 
10
10
  import winrt._winrt
11
11
  import winrt.system
12
- import winrt.windows.foundation
13
- import winrt.windows.foundation.collections
14
- import winrt.windows.media.core
15
- import winrt.windows.media.mediaproperties
16
- import winrt.windows.storage
17
- import winrt.windows.storage.streams
12
+ import winrt.windows.foundation as windows_foundation
13
+ import winrt.windows.foundation.collections as windows_foundation_collections
14
+ import winrt.windows.media.core as windows_media_core
15
+ import winrt.windows.media.mediaproperties as windows_media_mediaproperties
16
+ import winrt.windows.storage as windows_storage
17
+ import winrt.windows.storage.streams as windows_storage_streams
18
18
 
19
19
  from winrt.windows.media.transcoding import MediaVideoProcessingAlgorithm, TranscodeFailureReason
20
20
 
@@ -24,19 +24,19 @@ Self = typing.TypeVar('Self')
24
24
  class MediaTranscoder(winrt.system.Object):
25
25
  @staticmethod
26
26
  def _from(obj: winrt.system.Object, /) -> MediaTranscoder: ...
27
- def __new__(cls: typing.Type[MediaTranscoder]) -> MediaTranscoder:...
27
+ def __new__(cls: typing.Type[MediaTranscoder]) -> MediaTranscoder: ...
28
28
  @typing.overload
29
29
  def add_audio_effect(self, activatable_class_id: str, /) -> None: ...
30
30
  @typing.overload
31
- def add_audio_effect(self, activatable_class_id: str, effect_required: bool, configuration: typing.Optional[winrt.windows.foundation.collections.IPropertySet], /) -> None: ...
31
+ def add_audio_effect(self, activatable_class_id: str, effect_required: bool, configuration: typing.Optional[windows_foundation_collections.IPropertySet], /) -> None: ...
32
32
  @typing.overload
33
33
  def add_video_effect(self, activatable_class_id: str, /) -> None: ...
34
34
  @typing.overload
35
- def add_video_effect(self, activatable_class_id: str, effect_required: bool, configuration: typing.Optional[winrt.windows.foundation.collections.IPropertySet], /) -> None: ...
35
+ def add_video_effect(self, activatable_class_id: str, effect_required: bool, configuration: typing.Optional[windows_foundation_collections.IPropertySet], /) -> None: ...
36
36
  def clear_effects(self) -> None: ...
37
- def prepare_file_transcode_async(self, source: typing.Optional[winrt.windows.storage.IStorageFile], destination: typing.Optional[winrt.windows.storage.IStorageFile], profile: typing.Optional[winrt.windows.media.mediaproperties.MediaEncodingProfile], /) -> winrt.windows.foundation.IAsyncOperation[PrepareTranscodeResult]: ...
38
- def prepare_media_stream_source_transcode_async(self, source: typing.Optional[winrt.windows.media.core.IMediaSource], destination: typing.Optional[winrt.windows.storage.streams.IRandomAccessStream], profile: typing.Optional[winrt.windows.media.mediaproperties.MediaEncodingProfile], /) -> winrt.windows.foundation.IAsyncOperation[PrepareTranscodeResult]: ...
39
- def prepare_stream_transcode_async(self, source: typing.Optional[winrt.windows.storage.streams.IRandomAccessStream], destination: typing.Optional[winrt.windows.storage.streams.IRandomAccessStream], profile: typing.Optional[winrt.windows.media.mediaproperties.MediaEncodingProfile], /) -> winrt.windows.foundation.IAsyncOperation[PrepareTranscodeResult]: ...
37
+ def prepare_file_transcode_async(self, source: typing.Optional[windows_storage.IStorageFile], destination: typing.Optional[windows_storage.IStorageFile], profile: typing.Optional[windows_media_mediaproperties.MediaEncodingProfile], /) -> windows_foundation.IAsyncOperation[PrepareTranscodeResult]: ...
38
+ def prepare_media_stream_source_transcode_async(self, source: typing.Optional[windows_media_core.IMediaSource], destination: typing.Optional[windows_storage_streams.IRandomAccessStream], profile: typing.Optional[windows_media_mediaproperties.MediaEncodingProfile], /) -> windows_foundation.IAsyncOperation[PrepareTranscodeResult]: ...
39
+ def prepare_stream_transcode_async(self, source: typing.Optional[windows_storage_streams.IRandomAccessStream], destination: typing.Optional[windows_storage_streams.IRandomAccessStream], profile: typing.Optional[windows_media_mediaproperties.MediaEncodingProfile], /) -> windows_foundation.IAsyncOperation[PrepareTranscodeResult]: ...
40
40
  @_property
41
41
  def trim_stop_time(self) -> datetime.timedelta: ...
42
42
  @trim_stop_time.setter
@@ -62,7 +62,7 @@ class MediaTranscoder(winrt.system.Object):
62
62
  class PrepareTranscodeResult(winrt.system.Object):
63
63
  @staticmethod
64
64
  def _from(obj: winrt.system.Object, /) -> PrepareTranscodeResult: ...
65
- def transcode_async(self) -> winrt.windows.foundation.IAsyncActionWithProgress[winrt.system.Double]: ...
65
+ def transcode_async(self) -> windows_foundation.IAsyncActionWithProgress[winrt.system.Double]: ...
66
66
  @_property
67
67
  def can_transcode(self) -> bool: ...
68
68
  @_property
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
2
 
3
3
  import enum
4
4
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.Media.Transcoding
3
- Version: 2.0.0b2
3
+ Version: 2.1.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -12,7 +12,14 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
13
  Requires-Python: <3.13,>=3.9
14
14
  Description-Content-Type: text/markdown
15
+ Requires-Dist: winrt-runtime==2.1.0
15
16
  Provides-Extra: all
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.1.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Foundation.Collections[all]==2.1.0; extra == "all"
19
+ Requires-Dist: winrt-Windows.Media.Core[all]==2.1.0; extra == "all"
20
+ Requires-Dist: winrt-Windows.Media.MediaProperties[all]==2.1.0; extra == "all"
21
+ Requires-Dist: winrt-Windows.Storage[all]==2.1.0; extra == "all"
22
+ Requires-Dist: winrt-Windows.Storage.Streams[all]==2.1.0; extra == "all"
16
23
 
17
24
  <!-- warning: Please don't edit this file. It was automatically generated. -->
18
25
 
@@ -7,6 +7,7 @@ requirements.txt
7
7
  setup.py
8
8
  winrt/_winrt_windows_media_transcoding.pyi
9
9
  winrt/windows/media/transcoding/__init__.py
10
+ winrt/windows/media/transcoding/py.typed
10
11
  winrt_Windows.Media.Transcoding.egg-info/PKG-INFO
11
12
  winrt_Windows.Media.Transcoding.egg-info/SOURCES.txt
12
13
  winrt_Windows.Media.Transcoding.egg-info/dependency_links.txt
@@ -0,0 +1,9 @@
1
+ winrt-runtime==2.1.0
2
+
3
+ [all]
4
+ winrt-Windows.Foundation[all]==2.1.0
5
+ winrt-Windows.Foundation.Collections[all]==2.1.0
6
+ winrt-Windows.Media.Core[all]==2.1.0
7
+ winrt-Windows.Media.MediaProperties[all]==2.1.0
8
+ winrt-Windows.Storage[all]==2.1.0
9
+ winrt-Windows.Storage.Streams[all]==2.1.0
@@ -1,8 +0,0 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
2
-
3
- winrt-Windows.Foundation[all]==2.0.0-beta.2
4
- winrt-Windows.Foundation.Collections[all]==2.0.0-beta.2
5
- winrt-Windows.Media.Core[all]==2.0.0-beta.2
6
- winrt-Windows.Media.MediaProperties[all]==2.0.0-beta.2
7
- winrt-Windows.Storage[all]==2.0.0-beta.2
8
- winrt-Windows.Storage.Streams[all]==2.0.0-beta.2
@@ -1 +0,0 @@
1
- 2.0.0-beta.2
@@ -1,16 +0,0 @@
1
- # WARNING: Please don't edit this file. It was automatically generated.
2
-
3
- from setuptools import Extension, setup
4
- from winrt_sdk import get_include_dirs
5
-
6
- setup(
7
- ext_modules=[
8
- Extension(
9
- "winrt._winrt_windows_media_transcoding",
10
- sources=["py.Windows.Media.Transcoding.cpp"],
11
- include_dirs=get_include_dirs(),
12
- extra_compile_args=["/std:c++20", "/permissive-"],
13
- libraries=["windowsapp"],
14
- )
15
- ],
16
- )
@@ -1,9 +0,0 @@
1
- winrt-runtime==2.0.0-beta.2
2
-
3
- [all]
4
- winrt-Windows.Foundation[all]==2.0.0-beta.2
5
- winrt-Windows.Foundation.Collections[all]==2.0.0-beta.2
6
- winrt-Windows.Media.Core[all]==2.0.0-beta.2
7
- winrt-Windows.Media.MediaProperties[all]==2.0.0-beta.2
8
- winrt-Windows.Storage[all]==2.0.0-beta.2
9
- winrt-Windows.Storage.Streams[all]==2.0.0-beta.2