This repository was archived by the owner on Jun 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 240
Expand file tree
/
Copy path__init__.pyi
More file actions
589 lines (560 loc) · 23.9 KB
/
__init__.pyi
File metadata and controls
589 lines (560 loc) · 23.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
from typing import Any, ClassVar, Dict
from typing import overload
import numpy
ASYNC_ENCODE_SUPPORT: NV_ENC_CAPS
BGR: PixelFormat
BIT_DEPTH_MINUS_8: NV_DEC_CAPS
BT_601: ColorSpace
BT_709: ColorSpace
DYNAMIC_QUERY_ENCODER_CAPACITY: NV_ENC_CAPS
EXACT_FRAME: SeekMode
EXPOSED_COUNT: NV_ENC_CAPS
H264: CudaVideoCodec
HEIGHT_MAX: NV_ENC_CAPS
HEIGHT_MIN: NV_ENC_CAPS
HEVC: CudaVideoCodec
HIST_COUNT_BINS: NV_DEC_CAPS
HIST_COUNT_BIT_DEPTH: NV_DEC_CAPS
IS_CODEC_SUPPORTED: NV_DEC_CAPS
IS_HIST_SUPPORTED: NV_DEC_CAPS
JPEG: ColorRange
LEVEL_MAX: NV_ENC_CAPS
LEVEL_MIN: NV_ENC_CAPS
MAX_HEIGHT: NV_DEC_CAPS
MAX_MB_COUNT: NV_DEC_CAPS
MAX_WIDTH: NV_DEC_CAPS
MB_NUM_MAX: NV_ENC_CAPS
MB_PER_SEC_MAX: NV_ENC_CAPS
MIN_HEIGHT: NV_DEC_CAPS
MIN_WIDTH: NV_DEC_CAPS
MPEG: ColorRange
NO_PTS: int
NUM_MAX_BFRAMES: NV_ENC_CAPS
NUM_MAX_LTR_FRAMES: NV_ENC_CAPS
NUM_MAX_TEMPORAL_LAYERS: NV_ENC_CAPS
NV12: PixelFormat
OUTPUT_FORMAT_MASK: NV_DEC_CAPS
P10: PixelFormat
P12: PixelFormat
PREPROC_SUPPORT: NV_ENC_CAPS
PREV_KEY_FRAME: SeekMode
RGB: PixelFormat
RGB_32F: PixelFormat
RGB_32F_PLANAR: PixelFormat
RGB_PLANAR: PixelFormat
SEPARATE_COLOUR_PLANE: NV_ENC_CAPS
SUPPORTED_RATECONTROL_MODES: NV_ENC_CAPS
SUPPORT_10BIT_ENCODE: NV_ENC_CAPS
SUPPORT_ADAPTIVE_TRANSFORM: NV_ENC_CAPS
SUPPORT_ALPHA_LAYER_ENCODING: NV_ENC_CAPS
SUPPORT_BDIRECT_MODE: NV_ENC_CAPS
SUPPORT_BFRAME_REF_MODE: NV_ENC_CAPS
SUPPORT_CABAC: NV_ENC_CAPS
SUPPORT_CONSTRAINED_ENCODING: NV_ENC_CAPS
SUPPORT_CUSTOM_VBV_BUF_SIZE: NV_ENC_CAPS
SUPPORT_DYNAMIC_SLICE_MODE: NV_ENC_CAPS
SUPPORT_DYN_BITRATE_CHANGE: NV_ENC_CAPS
SUPPORT_DYN_FORCE_CONSTQP: NV_ENC_CAPS
SUPPORT_DYN_RCMODE_CHANGE: NV_ENC_CAPS
SUPPORT_DYN_RES_CHANGE: NV_ENC_CAPS
SUPPORT_EMPHASIS_LEVEL_MAP: NV_ENC_CAPS
SUPPORT_FIELD_ENCODING: NV_ENC_CAPS
SUPPORT_FMO: NV_ENC_CAPS
SUPPORT_HIERARCHICAL_BFRAMES: NV_ENC_CAPS
SUPPORT_HIERARCHICAL_PFRAMES: NV_ENC_CAPS
SUPPORT_INTRA_REFRESH: NV_ENC_CAPS
SUPPORT_LOOKAHEAD: NV_ENC_CAPS
SUPPORT_LOSSLESS_ENCODE: NV_ENC_CAPS
SUPPORT_MEONLY_MODE: NV_ENC_CAPS
SUPPORT_MONOCHROME: NV_ENC_CAPS
SUPPORT_MULTIPLE_REF_FRAMES: NV_ENC_CAPS
SUPPORT_QPELMV: NV_ENC_CAPS
SUPPORT_REF_PIC_INVALIDATION: NV_ENC_CAPS
SUPPORT_SAO: NV_ENC_CAPS
SUPPORT_STEREO_MVC: NV_ENC_CAPS
SUPPORT_SUBFRAME_READBACK: NV_ENC_CAPS
SUPPORT_TEMPORAL_AQ: NV_ENC_CAPS
SUPPORT_TEMPORAL_SVC: NV_ENC_CAPS
SUPPORT_WEIGHTED_PREDICTION: NV_ENC_CAPS
SUPPORT_YUV444_ENCODE: NV_ENC_CAPS
UDEF: ColorRange
UNDEFINED: PixelFormat
UNSPEC: ColorSpace
VP9: CudaVideoCodec
WIDTH_MAX: NV_ENC_CAPS
WIDTH_MIN: NV_ENC_CAPS
Y: PixelFormat
YCBCR: PixelFormat
YUV420: PixelFormat
YUV420_10bit: PixelFormat
YUV422: PixelFormat
YUV444: PixelFormat
YUV444_10bit: PixelFormat
class ColorRange:
__members__: ClassVar[dict] = ... # read-only
JPEG: ClassVar[ColorRange] = ...
MPEG: ClassVar[ColorRange] = ...
UDEF: ClassVar[ColorRange] = ...
__entries: ClassVar[dict] = ...
def __init__(self, value: int) -> None: ...
def __eq__(self, other: object) -> bool: ...
def __getstate__(self) -> int: ...
def __hash__(self) -> int: ...
def __index__(self) -> int: ...
def __int__(self) -> int: ...
def __ne__(self, other: object) -> bool: ...
def __setstate__(self, state: int) -> None: ...
@property
def name(self) -> str: ...
@property
def value(self) -> int: ...
class ColorSpace:
__members__: ClassVar[dict] = ... # read-only
BT_601: ClassVar[ColorSpace] = ...
BT_709: ClassVar[ColorSpace] = ...
UNSPEC: ClassVar[ColorSpace] = ...
__entries: ClassVar[dict] = ...
def __init__(self, value: int) -> None: ...
def __eq__(self, other: object) -> bool: ...
def __getstate__(self) -> int: ...
def __hash__(self) -> int: ...
def __index__(self) -> int: ...
def __int__(self) -> int: ...
def __ne__(self, other: object) -> bool: ...
def __setstate__(self, state: int) -> None: ...
@property
def name(self) -> str: ...
@property
def value(self) -> int: ...
class ColorspaceConversionContext:
color_range: ColorRange
color_space: ColorSpace
@overload
def __init__(self) -> None: ...
@overload
def __init__(self, color_space: ColorSpace, color_range: ColorRange) -> None: ...
class CudaBuffer:
def __init__(self, *args, **kwargs) -> None: ...
def Clone(self) -> CudaBuffer: ...
@overload
def CopyFrom(self, other: CudaBuffer, context: int, stream: int) -> None: ...
@overload
def CopyFrom(self, other: CudaBuffer, gpu_id: int) -> None: ...
def GetElemSize(self) -> int: ...
def GetNumElems(self) -> int: ...
def GetRawMemSize(self) -> int: ...
def GpuMem(self) -> int: ...
@classmethod
def Make(cls, elem_size: int, num_elems: int, gpu_id: int) -> CudaBuffer: ...
class CudaVideoCodec:
__members__: ClassVar[dict] = ... # read-only
H264: ClassVar[CudaVideoCodec] = ...
HEVC: ClassVar[CudaVideoCodec] = ...
VP9: ClassVar[CudaVideoCodec] = ...
__entries: ClassVar[dict] = ...
def __init__(self, value: int) -> None: ...
def __eq__(self, other: object) -> bool: ...
def __getstate__(self) -> int: ...
def __hash__(self) -> int: ...
def __index__(self) -> int: ...
def __int__(self) -> int: ...
def __ne__(self, other: object) -> bool: ...
def __setstate__(self, state: int) -> None: ...
@property
def name(self) -> str: ...
@property
def value(self) -> int: ...
class CuvidParserException(Exception): ...
class HwResetException(Exception): ...
class MotionVector:
def __init__(self, *args, **kwargs) -> None: ...
class NV_DEC_CAPS:
__members__: ClassVar[dict] = ... # read-only
BIT_DEPTH_MINUS_8: ClassVar[NV_DEC_CAPS] = ...
HIST_COUNT_BINS: ClassVar[NV_DEC_CAPS] = ...
HIST_COUNT_BIT_DEPTH: ClassVar[NV_DEC_CAPS] = ...
IS_CODEC_SUPPORTED: ClassVar[NV_DEC_CAPS] = ...
IS_HIST_SUPPORTED: ClassVar[NV_DEC_CAPS] = ...
MAX_HEIGHT: ClassVar[NV_DEC_CAPS] = ...
MAX_MB_COUNT: ClassVar[NV_DEC_CAPS] = ...
MAX_WIDTH: ClassVar[NV_DEC_CAPS] = ...
MIN_HEIGHT: ClassVar[NV_DEC_CAPS] = ...
MIN_WIDTH: ClassVar[NV_DEC_CAPS] = ...
OUTPUT_FORMAT_MASK: ClassVar[NV_DEC_CAPS] = ...
__entries: ClassVar[dict] = ...
def __init__(self, value: int) -> None: ...
def __eq__(self, other: object) -> bool: ...
def __getstate__(self) -> int: ...
def __hash__(self) -> int: ...
def __index__(self) -> int: ...
def __int__(self) -> int: ...
def __ne__(self, other: object) -> bool: ...
def __setstate__(self, state: int) -> None: ...
@property
def name(self) -> str: ...
@property
def value(self) -> int: ...
class NV_ENC_CAPS:
__members__: ClassVar[dict] = ... # read-only
ASYNC_ENCODE_SUPPORT: ClassVar[NV_ENC_CAPS] = ...
DYNAMIC_QUERY_ENCODER_CAPACITY: ClassVar[NV_ENC_CAPS] = ...
EXPOSED_COUNT: ClassVar[NV_ENC_CAPS] = ...
HEIGHT_MAX: ClassVar[NV_ENC_CAPS] = ...
HEIGHT_MIN: ClassVar[NV_ENC_CAPS] = ...
LEVEL_MAX: ClassVar[NV_ENC_CAPS] = ...
LEVEL_MIN: ClassVar[NV_ENC_CAPS] = ...
MB_NUM_MAX: ClassVar[NV_ENC_CAPS] = ...
MB_PER_SEC_MAX: ClassVar[NV_ENC_CAPS] = ...
NUM_MAX_BFRAMES: ClassVar[NV_ENC_CAPS] = ...
NUM_MAX_LTR_FRAMES: ClassVar[NV_ENC_CAPS] = ...
NUM_MAX_TEMPORAL_LAYERS: ClassVar[NV_ENC_CAPS] = ...
PREPROC_SUPPORT: ClassVar[NV_ENC_CAPS] = ...
SEPARATE_COLOUR_PLANE: ClassVar[NV_ENC_CAPS] = ...
SUPPORTED_RATECONTROL_MODES: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_10BIT_ENCODE: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_ADAPTIVE_TRANSFORM: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_ALPHA_LAYER_ENCODING: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_BDIRECT_MODE: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_BFRAME_REF_MODE: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_CABAC: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_CONSTRAINED_ENCODING: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_CUSTOM_VBV_BUF_SIZE: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_DYNAMIC_SLICE_MODE: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_DYN_BITRATE_CHANGE: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_DYN_FORCE_CONSTQP: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_DYN_RCMODE_CHANGE: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_DYN_RES_CHANGE: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_EMPHASIS_LEVEL_MAP: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_FIELD_ENCODING: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_FMO: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_HIERARCHICAL_BFRAMES: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_HIERARCHICAL_PFRAMES: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_INTRA_REFRESH: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_LOOKAHEAD: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_LOSSLESS_ENCODE: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_MEONLY_MODE: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_MONOCHROME: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_MULTIPLE_REF_FRAMES: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_QPELMV: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_REF_PIC_INVALIDATION: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_SAO: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_STEREO_MVC: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_SUBFRAME_READBACK: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_TEMPORAL_AQ: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_TEMPORAL_SVC: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_WEIGHTED_PREDICTION: ClassVar[NV_ENC_CAPS] = ...
SUPPORT_YUV444_ENCODE: ClassVar[NV_ENC_CAPS] = ...
WIDTH_MAX: ClassVar[NV_ENC_CAPS] = ...
WIDTH_MIN: ClassVar[NV_ENC_CAPS] = ...
__entries: ClassVar[dict] = ...
def __init__(self, value: int) -> None: ...
def __eq__(self, other: object) -> bool: ...
def __getstate__(self) -> int: ...
def __hash__(self) -> int: ...
def __index__(self) -> int: ...
def __int__(self) -> int: ...
def __ne__(self, other: object) -> bool: ...
def __setstate__(self, state: int) -> None: ...
@property
def name(self) -> str: ...
@property
def value(self) -> int: ...
class PacketData:
bsl: int
dts: int
duration: int
key: int
pos: int
pts: int
def __init__(self) -> None: ...
class PixelFormat:
__members__: ClassVar[dict] = ... # read-only
BGR: ClassVar[PixelFormat] = ...
NV12: ClassVar[PixelFormat] = ...
P10: ClassVar[PixelFormat] = ...
P12: ClassVar[PixelFormat] = ...
RGB: ClassVar[PixelFormat] = ...
RGB_32F: ClassVar[PixelFormat] = ...
RGB_32F_PLANAR: ClassVar[PixelFormat] = ...
RGB_PLANAR: ClassVar[PixelFormat] = ...
UNDEFINED: ClassVar[PixelFormat] = ...
Y: ClassVar[PixelFormat] = ...
YCBCR: ClassVar[PixelFormat] = ...
YUV420: ClassVar[PixelFormat] = ...
YUV420_10bit: ClassVar[PixelFormat] = ...
YUV422: ClassVar[PixelFormat] = ...
YUV444: ClassVar[PixelFormat] = ...
YUV444_10bit: ClassVar[PixelFormat] = ...
__entries: ClassVar[dict] = ...
def __init__(self, value: int) -> None: ...
def __eq__(self, other: object) -> bool: ...
def __getstate__(self) -> int: ...
def __hash__(self) -> int: ...
def __index__(self) -> int: ...
def __int__(self) -> int: ...
def __ne__(self, other: object) -> bool: ...
def __setstate__(self, state: int) -> None: ...
@property
def name(self) -> str: ...
@property
def value(self) -> int: ...
class PyBufferUploader:
@overload
def __init__(self, elem_size: int, num_elems: int, gpu_id: int) -> None: ...
@overload
def __init__(self, elem_size: int, num_elems: int, context: int, stream: int) -> None: ...
def UploadSingleBuffer(self, array: numpy.ndarray[numpy.uint8]) -> CudaBuffer: ...
class PyCudaBufferDownloader:
@overload
def __init__(self, elem_size: int, num_elems: int, gpu_id: int) -> None: ...
@overload
def __init__(self, elem_size: int, num_elems: int, context: int, stream: int) -> None: ...
def DownloadSingleCudaBuffer(self, buffer: CudaBuffer, array: numpy.ndarray[numpy.uint8]) -> bool: ...
class PyFFmpegDemuxer:
@overload
def __init__(self, input: str, opts: Dict[str,str]) -> None: ...
@overload
def __init__(self, input: str) -> None: ...
def AvgFramerate(self) -> float: ...
def Codec(self) -> CudaVideoCodec: ...
def ColorRange(self) -> ColorRange: ...
def ColorSpace(self) -> ColorSpace: ...
@overload
def DemuxSinglePacket(self, packet: numpy.ndarray[numpy.uint8]) -> bool: ...
@overload
def DemuxSinglePacket(self, packet: numpy.ndarray[numpy.uint8], sei: numpy.ndarray[numpy.uint8]) -> bool: ...
def Format(self) -> PixelFormat: ...
def Framerate(self) -> float: ...
def Height(self) -> int: ...
def IsVFR(self) -> bool: ...
def LastPacketData(self, pkt_data: PacketData) -> None: ...
def Numframes(self) -> int: ...
def Seek(self, seek_ctx: SeekContext, pkt: numpy.ndarray[numpy.uint8]) -> bool: ...
def Timebase(self) -> float: ...
def Width(self) -> int: ...
class PyFfmpegDecoder:
def __init__(self, input: str, opts: Dict[str,str], gpu_id: int = ...) -> None: ...
def AvgFramerate(self) -> float: ...
def Codec(self) -> CudaVideoCodec: ...
def ColorRange(self) -> ColorRange: ...
def ColorSpace(self) -> ColorSpace: ...
def DecodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8]) -> bool: ...
def DecodeSingleSurface(self, *args, **kwargs) -> Any: ...
def Format(self) -> PixelFormat: ...
def Framerate(self) -> float: ...
def GetMotionVectors(self) -> numpy.ndarray[MotionVector]: ...
def Height(self) -> int: ...
def Numframes(self) -> int: ...
def Timebase(self) -> float: ...
def Width(self) -> int: ...
class PyFrameUploader:
@overload
def __init__(self, width: int, height: int, format: PixelFormat, gpu_id: int) -> None: ...
@overload
def __init__(self, width: int, height: int, format: PixelFormat, context: int, stream: int) -> None: ...
def Format(self) -> PixelFormat: ...
def UploadSingleFrame(self, *args, **kwargs) -> Any: ...
class PyNvDecoder:
@overload
def __init__(self, width: int, height: int, format: PixelFormat, codec: CudaVideoCodec, gpu_id: int) -> None: ...
@overload
def __init__(self, input: str, gpu_id: int, opts: Dict[str,str]) -> None: ...
@overload
def __init__(self, input: str, gpu_id: int) -> None: ...
@overload
def __init__(self, width: int, height: int, format: PixelFormat, codec: CudaVideoCodec, context: int, stream: int) -> None: ...
@overload
def __init__(self, input: str, context: int, stream: int, opts: Dict[str,str]) -> None: ...
@overload
def __init__(self, input: str, context: int, stream: int) -> None: ...
def AvgFramerate(self) -> float: ...
def Capabilities(self) -> Dict[NV_DEC_CAPS,int]: ...
def ColorRange(self) -> ColorRange: ...
def ColorSpace(self) -> ColorSpace: ...
@overload
def DecodeFrameFromPacket(self, frame: numpy.ndarray[numpy.uint8], packet: numpy.ndarray[numpy.uint8]) -> bool: ...
@overload
def DecodeFrameFromPacket(self, frame: numpy.ndarray[numpy.uint8], enc_packet_data: PacketData, packet: numpy.ndarray[numpy.uint8]) -> bool: ...
@overload
def DecodeFrameFromPacket(self, frame: numpy.ndarray[numpy.uint8], enc_packet_data: PacketData, packet: numpy.ndarray[numpy.uint8], pkt_data: PacketData) -> bool: ...
@overload
def DecodeFrameFromPacket(self, frame: numpy.ndarray[numpy.uint8], packet: numpy.ndarray[numpy.uint8], pkt_data: PacketData) -> bool: ...
@overload
def DecodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8], sei: numpy.ndarray[numpy.uint8], pkt_data: PacketData) -> bool: ...
@overload
def DecodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8], sei: numpy.ndarray[numpy.uint8], seek_context: SeekContext) -> bool: ...
@overload
def DecodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8], sei: numpy.ndarray[numpy.uint8], seek_context: SeekContext, pkt_data: PacketData) -> bool: ...
@overload
def DecodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8]) -> bool: ...
@overload
def DecodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8], pkt_data: PacketData) -> bool: ...
@overload
def DecodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8], seek_context: SeekContext) -> bool: ...
@overload
def DecodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8], seek_context: SeekContext, pkt_data: PacketData) -> bool: ...
def DecodeSingleSurface(self, *args, **kwargs) -> Any: ...
def DecodeSurfaceFromPacket(self, enc_packet_data: PacketData, packet: numpy.ndarray[numpy.uint8], pkt_data: PacketData, bool_nvcv_check: bool) -> object: ...
@overload
def FlushSingleFrame(self, frame: numpy.ndarray[numpy.uint8]) -> bool: ...
@overload
def FlushSingleFrame(self, frame: numpy.ndarray[numpy.uint8], pkt_data: PacketData) -> bool: ...
def FlushSingleSurface(self, *args, **kwargs) -> Any: ...
def Format(self) -> PixelFormat: ...
def Framerate(self) -> float: ...
def Framesize(self) -> int: ...
def Height(self) -> int: ...
def IsVFR(self) -> bool: ...
def LastPacketData(self, pkt_data: PacketData) -> None: ...
def Numframes(self) -> int: ...
def Timebase(self) -> float: ...
def Width(self) -> int: ...
class PyNvEncoder:
@overload
def __init__(self, settings: Dict[str,str], gpu_id: int, format: PixelFormat = ..., verbose: bool = ...) -> None: ...
@overload
def __init__(self, settings: Dict[str,str], context: int, stream: int, format: PixelFormat = ..., verbose: bool = ...) -> None: ...
def Capabilities(self) -> Dict[NV_ENC_CAPS,int]: ...
@overload
def EncodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8], packet: numpy.ndarray[numpy.uint8], sei: numpy.ndarray[numpy.uint8], sync: bool, append: bool) -> bool: ...
@overload
def EncodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8], packet: numpy.ndarray[numpy.uint8], sei: numpy.ndarray[numpy.uint8], sync: bool) -> bool: ...
@overload
def EncodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8], packet: numpy.ndarray[numpy.uint8], sync: bool) -> bool: ...
@overload
def EncodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8], packet: numpy.ndarray[numpy.uint8], sei: numpy.ndarray[numpy.uint8]) -> bool: ...
@overload
def EncodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8], packet: numpy.ndarray[numpy.uint8]) -> bool: ...
@overload
def EncodeSingleSurface(self, nvcvimage: object, packet: numpy.ndarray[numpy.uint8], testbool: bool) -> bool: ...
@overload
def EncodeSingleSurface(self, surface, packet: numpy.ndarray[numpy.uint8], sei: numpy.ndarray[numpy.uint8], sync: bool, append: bool) -> bool: ...
@overload
def EncodeSingleSurface(self, surface, packet: numpy.ndarray[numpy.uint8], sei: numpy.ndarray[numpy.uint8], sync: bool) -> bool: ...
@overload
def EncodeSingleSurface(self, surface, packet: numpy.ndarray[numpy.uint8], sync: bool) -> bool: ...
@overload
def EncodeSingleSurface(self, surface, packet: numpy.ndarray[numpy.uint8], sei: numpy.ndarray[numpy.uint8]) -> bool: ...
@overload
def EncodeSingleSurface(self, surface, packet: numpy.ndarray[numpy.uint8]) -> bool: ...
def Flush(self, packets: numpy.ndarray[numpy.uint8]) -> bool: ...
def FlushSinglePacket(self, packets: numpy.ndarray[numpy.uint8]) -> bool: ...
def Format(self) -> PixelFormat: ...
def GetFrameSizeInBytes(self) -> int: ...
def Height(self) -> int: ...
def Reconfigure(self, settings: Dict[str,str], force_idr: bool = ..., reset_encoder: bool = ..., verbose: bool = ...) -> bool: ...
def Width(self) -> int: ...
class PySurfaceConverter:
@overload
def __init__(self, width: int, height: int, src_format: PixelFormat, dst_format: PixelFormat, gpu_id: int) -> None: ...
@overload
def __init__(self, width: int, height: int, src_format: PixelFormat, dst_format: PixelFormat, context: int, stream: int) -> None: ...
def Execute(self, *args, **kwargs) -> Any: ...
def Format(self) -> PixelFormat: ...
class PySurfaceDownloader:
@overload
def __init__(self, width: int, height: int, format: PixelFormat, gpu_id: int) -> None: ...
@overload
def __init__(self, width: int, height: int, format: PixelFormat, context: int, stream: int) -> None: ...
@overload
def DownloadSingleSurface(self, surface, frame: numpy.ndarray[numpy.uint8]) -> bool: ...
@overload
def DownloadSingleSurface(self, surface, frame: numpy.ndarray[numpy.float32]) -> bool: ...
@overload
def DownloadSingleSurface(self, surface, frame: numpy.ndarray[numpy.uint16]) -> bool: ...
def Format(self) -> PixelFormat: ...
class PySurfaceRemaper:
@overload
def __init__(self, x_map: numpy.ndarray[numpy.float32], y_map: numpy.ndarray[numpy.float32], format: PixelFormat, gpu_id: int) -> None: ...
@overload
def __init__(self, x_map: numpy.ndarray[numpy.float32], y_map: numpy.ndarray[numpy.float32], format: PixelFormat, context: int, stream: int) -> None: ...
def Execute(self, *args, **kwargs) -> Any: ...
def Format(self) -> PixelFormat: ...
class PySurfaceResizer:
@overload
def __init__(self, width: int, height: int, format: PixelFormat, gpu_id: int) -> None: ...
@overload
def __init__(self, width: int, height: int, format: PixelFormat, context: int, stream: int) -> None: ...
def Execute(self, *args, **kwargs) -> Any: ...
def Format(self) -> PixelFormat: ...
class SeekContext:
mode: SeekMode
out_frame_pts: int
seek_frame: int
seek_tssec: float
@overload
def __init__(self, seek_frame: int) -> None: ...
@overload
def __init__(self, seek_frame: int, mode: SeekMode) -> None: ...
@overload
def __init__(self, seek_ts: float) -> None: ...
@overload
def __init__(self, seek_ts: float, mode: SeekMode) -> None: ...
@property
def num_frames_decoded(self) -> int: ...
class SeekMode:
__members__: ClassVar[dict] = ... # read-only
EXACT_FRAME: ClassVar[SeekMode] = ...
PREV_KEY_FRAME: ClassVar[SeekMode] = ...
__entries: ClassVar[dict] = ...
def __init__(self, value: int) -> None: ...
def __eq__(self, other: object) -> bool: ...
def __getstate__(self) -> int: ...
def __hash__(self) -> int: ...
def __index__(self) -> int: ...
def __int__(self) -> int: ...
def __ne__(self, other: object) -> bool: ...
def __setstate__(self, state: int) -> None: ...
@property
def name(self) -> str: ...
@property
def value(self) -> int: ...
class Surface:
def __init__(self, *args, **kwargs) -> None: ...
@overload
def Clone(self) -> Surface: ...
@overload
def Clone(self, gpu_id: int) -> Surface: ...
@overload
def Clone(self, context: int, stream: int) -> Surface: ...
@overload
def CopyFrom(self, other: Surface, gpu_id: int) -> None: ...
@overload
def CopyFrom(self, other: Surface, context: int, stream: int) -> None: ...
@overload
def Crop(self, x: int, y: int, w: int, h: int, gpu_id: int) -> Surface: ...
@overload
def Crop(self, x: int, y: int, w: int, h: int, context: int, stream: int) -> Surface: ...
def Empty(self) -> bool: ...
def Format(self) -> PixelFormat: ...
def Height(self, plane: int = ...) -> int: ...
def HostSize(self) -> int: ...
@overload
@classmethod
def Make(cls, format: PixelFormat, width: int, height: int, gpu_id: int) -> Surface: ...
@overload
@classmethod
def Make(cls, format: PixelFormat, width: int, height: int, context: int) -> Surface: ...
def NumPlanes(self) -> int: ...
def OwnMemory(self) -> bool: ...
def Pitch(self, plane: int = ...) -> int: ...
def PlanePtr(self, plane: int = ...) -> SurfacePlane: ...
def Width(self, plane: int = ...) -> int: ...
class SurfacePlane:
def __init__(self, *args, **kwargs) -> None: ...
def ElemSize(self) -> int: ...
@overload
def Export(self, dst: int, dst_pitch: int, gpu_id: int) -> None: ...
@overload
def Export(self, dst: int, dst_pitch: int, context: int, stream: int) -> None: ...
def GpuMem(self) -> int: ...
def Height(self) -> int: ...
def HostFrameSize(self) -> int: ...
@overload
def Import(self, src: int, src_pitch: int, gpu_id: int) -> None: ...
@overload
def Import(self, src: int, src_pitch: int, context: int, stream: int) -> None: ...
def Pitch(self) -> int: ...
def Width(self) -> int: ...
def GetNumGpus() -> int: ...
def GetNvencParams() -> Dict[str,str]: ...