Debian Codegraph @

gi-types/gstvideo-1.0.d.ts

raw symbols SCIP
1 /// <reference path="./gstbase-1.0.d.ts" />
2 /// <reference path="./gst-1.0.d.ts" />
3 /// <reference path="./gobject-2.0.d.ts" />
4 /// <reference path="./glib-2.0.d.ts" />
5 /// <reference path="./gmodule-2.0.d.ts" />
6
7 /**
8 * Type Definitions for Gjs (https://gjs.guide/)
9 *
10 * These type definitions are automatically generated, do not edit them by hand.
11 * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
12 *
13 * The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
14 */
15
16 declare module 'gi://GstVideo?version=1.0' {
17 // Module dependencies
18 import type GstBase from 'gi://GstBase?version=1.0';
19 import type Gst from 'gi://Gst?version=1.0';
20 import type GObject from 'gi://GObject?version=2.0';
21 import type GLib from 'gi://GLib?version=2.0';
22 import type GModule from 'gi://GModule?version=2.0';
23
24 export namespace GstVideo {
25 /**
26 * GstVideo-1.0
27 */
28
29 /**
30 * Location of a `GstAncillaryMeta`.
31 */
32
33 /**
34 * Location of a `GstAncillaryMeta`.
35 */
36 export namespace AncillaryMetaField {
37 export const $gtype: GObject.GType<AncillaryMetaField>;
38 }
39
40 enum AncillaryMetaField {
41 /**
42 * Progressive or no field specified (default)
43 */
44 PROGRESSIVE,
45 /**
46 * Interlaced first field
47 */
48 INTERLACED_FIRST,
49 /**
50 * Interlaced second field
51 */
52 INTERLACED_SECOND,
53 }
54 /**
55 * An enumeration indicating whether an element implements color balancing
56 * operations in software or in dedicated hardware. In general, dedicated
57 * hardware implementations (such as those provided by xvimagesink) are
58 * preferred.
59 */
60
61 /**
62 * An enumeration indicating whether an element implements color balancing
63 * operations in software or in dedicated hardware. In general, dedicated
64 * hardware implementations (such as those provided by xvimagesink) are
65 * preferred.
66 */
67 export namespace ColorBalanceType {
68 export const $gtype: GObject.GType<ColorBalanceType>;
69 }
70
71 enum ColorBalanceType {
72 /**
73 * Color balance is implemented with dedicated
74 * hardware.
75 */
76 HARDWARE,
77 /**
78 * Color balance is implemented via software
79 * processing.
80 */
81 SOFTWARE,
82 }
83 /**
84 * A set of commands that may be issued to an element providing the
85 * #GstNavigation interface. The available commands can be queried via
86 * the gst_navigation_query_new_commands() query.
87 *
88 * For convenience in handling DVD navigation, the MENU commands are aliased as:
89 * GST_NAVIGATION_COMMAND_DVD_MENU = `GST_NAVIGATION_COMMAND_MENU1`
90 * GST_NAVIGATION_COMMAND_DVD_TITLE_MENU = `GST_NAVIGATION_COMMAND_MENU2`
91 * GST_NAVIGATION_COMMAND_DVD_ROOT_MENU = `GST_NAVIGATION_COMMAND_MENU3`
92 * GST_NAVIGATION_COMMAND_DVD_SUBPICTURE_MENU = `GST_NAVIGATION_COMMAND_MENU4`
93 * GST_NAVIGATION_COMMAND_DVD_AUDIO_MENU = `GST_NAVIGATION_COMMAND_MENU5`
94 * GST_NAVIGATION_COMMAND_DVD_ANGLE_MENU = `GST_NAVIGATION_COMMAND_MENU6`
95 * GST_NAVIGATION_COMMAND_DVD_CHAPTER_MENU = `GST_NAVIGATION_COMMAND_MENU7`
96 */
97
98 /**
99 * A set of commands that may be issued to an element providing the
100 * #GstNavigation interface. The available commands can be queried via
101 * the gst_navigation_query_new_commands() query.
102 *
103 * For convenience in handling DVD navigation, the MENU commands are aliased as:
104 * GST_NAVIGATION_COMMAND_DVD_MENU = `GST_NAVIGATION_COMMAND_MENU1`
105 * GST_NAVIGATION_COMMAND_DVD_TITLE_MENU = `GST_NAVIGATION_COMMAND_MENU2`
106 * GST_NAVIGATION_COMMAND_DVD_ROOT_MENU = `GST_NAVIGATION_COMMAND_MENU3`
107 * GST_NAVIGATION_COMMAND_DVD_SUBPICTURE_MENU = `GST_NAVIGATION_COMMAND_MENU4`
108 * GST_NAVIGATION_COMMAND_DVD_AUDIO_MENU = `GST_NAVIGATION_COMMAND_MENU5`
109 * GST_NAVIGATION_COMMAND_DVD_ANGLE_MENU = `GST_NAVIGATION_COMMAND_MENU6`
110 * GST_NAVIGATION_COMMAND_DVD_CHAPTER_MENU = `GST_NAVIGATION_COMMAND_MENU7`
111 */
112 export namespace NavigationCommand {
113 export const $gtype: GObject.GType<NavigationCommand>;
114 }
115
116 enum NavigationCommand {
117 /**
118 * An invalid command entry
119 */
120 INVALID,
121 /**
122 * Execute navigation menu command 1. For DVD,
123 * this enters the DVD root menu, or exits back to the title from the menu.
124 */
125 MENU1,
126 /**
127 * Execute navigation menu command 2. For DVD,
128 * this jumps to the DVD title menu.
129 */
130 MENU2,
131 /**
132 * Execute navigation menu command 3. For DVD,
133 * this jumps into the DVD root menu.
134 */
135 MENU3,
136 /**
137 * Execute navigation menu command 4. For DVD,
138 * this jumps to the Subpicture menu.
139 */
140 MENU4,
141 /**
142 * Execute navigation menu command 5. For DVD,
143 * the jumps to the audio menu.
144 */
145 MENU5,
146 /**
147 * Execute navigation menu command 6. For DVD,
148 * this jumps to the angles menu.
149 */
150 MENU6,
151 /**
152 * Execute navigation menu command 7. For DVD,
153 * this jumps to the chapter menu.
154 */
155 MENU7,
156 /**
157 * Select the next button to the left in a menu,
158 * if such a button exists.
159 */
160 LEFT,
161 /**
162 * Select the next button to the right in a menu,
163 * if such a button exists.
164 */
165 RIGHT,
166 /**
167 * Select the button above the current one in a
168 * menu, if such a button exists.
169 */
170 UP,
171 /**
172 * Select the button below the current one in a
173 * menu, if such a button exists.
174 */
175 DOWN,
176 /**
177 * Activate (click) the currently selected
178 * button in a menu, if such a button exists.
179 */
180 ACTIVATE,
181 /**
182 * Switch to the previous angle in a
183 * multiangle feature.
184 */
185 PREV_ANGLE,
186 /**
187 * Switch to the next angle in a multiangle
188 * feature.
189 */
190 NEXT_ANGLE,
191 }
192 /**
193 * Enum values for the various events that an element implementing the
194 * GstNavigation interface might send up the pipeline. Touch events have been
195 * inspired by the libinput API, and have the same meaning here.
196 */
197
198 /**
199 * Enum values for the various events that an element implementing the
200 * GstNavigation interface might send up the pipeline. Touch events have been
201 * inspired by the libinput API, and have the same meaning here.
202 */
203 export namespace NavigationEventType {
204 export const $gtype: GObject.GType<NavigationEventType>;
205 }
206
207 enum NavigationEventType {
208 /**
209 * Returned from
210 * gst_navigation_event_get_type() when the passed event is not a navigation event.
211 */
212 INVALID,
213 /**
214 * A key press event. Use
215 * gst_navigation_event_parse_key_event() to extract the details from the event.
216 */
217 KEY_PRESS,
218 /**
219 * A key release event. Use
220 * gst_navigation_event_parse_key_event() to extract the details from the event.
221 */
222 KEY_RELEASE,
223 /**
224 * A mouse button press event. Use
225 * gst_navigation_event_parse_mouse_button_event() to extract the details from the
226 * event.
227 */
228 MOUSE_BUTTON_PRESS,
229 /**
230 * A mouse button release event. Use
231 * gst_navigation_event_parse_mouse_button_event() to extract the details from the
232 * event.
233 */
234 MOUSE_BUTTON_RELEASE,
235 /**
236 * A mouse movement event. Use
237 * gst_navigation_event_parse_mouse_move_event() to extract the details from the
238 * event.
239 */
240 MOUSE_MOVE,
241 /**
242 * A navigation command event. Use
243 * gst_navigation_event_parse_command() to extract the details from the event.
244 */
245 COMMAND,
246 /**
247 * A mouse scroll event. Use gst_navigation_event_parse_mouse_scroll_event()
248 * to extract the details from the event.
249 */
250 MOUSE_SCROLL,
251 /**
252 * An event describing a new touch point, which will be assigned an identifier
253 * that is unique to it for the duration of its movement on the screen.
254 * Use gst_navigation_event_parse_touch_event() to extract the details
255 * from the event.
256 */
257 TOUCH_DOWN,
258 /**
259 * An event describing the movement of an active touch point across
260 * the screen. Use gst_navigation_event_parse_touch_event() to extract
261 * the details from the event.
262 */
263 TOUCH_MOTION,
264 /**
265 * An event describing a removed touch point. After this event,
266 * its identifier may be reused for any new touch points.
267 * Use gst_navigation_event_parse_touch_up_event() to extract the details
268 * from the event.
269 */
270 TOUCH_UP,
271 /**
272 * An event signaling the end of a sequence of simultaneous touch events.
273 */
274 TOUCH_FRAME,
275 /**
276 * An event cancelling all currently active touch points.
277 */
278 TOUCH_CANCEL,
279 }
280 /**
281 * A set of notifications that may be received on the bus when navigation
282 * related status changes.
283 */
284
285 /**
286 * A set of notifications that may be received on the bus when navigation
287 * related status changes.
288 */
289 export namespace NavigationMessageType {
290 export const $gtype: GObject.GType<NavigationMessageType>;
291 }
292
293 enum NavigationMessageType {
294 /**
295 * Returned from
296 * gst_navigation_message_get_type() when the passed message is not a
297 * navigation message.
298 */
299 INVALID,
300 /**
301 * Sent when the mouse moves over or leaves a
302 * clickable region of the output, such as a DVD menu button.
303 */
304 MOUSE_OVER,
305 /**
306 * Sent when the set of available commands
307 * changes and should re-queried by interested applications.
308 */
309 COMMANDS_CHANGED,
310 /**
311 * Sent when display angles in a multi-angle
312 * feature (such as a multiangle DVD) change - either angles have appeared or
313 * disappeared.
314 */
315 ANGLES_CHANGED,
316 /**
317 * Sent when a navigation event was not handled
318 * by any element in the pipeline (Since: 1.6)
319 */
320 EVENT,
321 }
322 /**
323 * Types of navigation interface queries.
324 */
325
326 /**
327 * Types of navigation interface queries.
328 */
329 export namespace NavigationQueryType {
330 export const $gtype: GObject.GType<NavigationQueryType>;
331 }
332
333 enum NavigationQueryType {
334 /**
335 * invalid query
336 */
337 INVALID,
338 /**
339 * command query
340 */
341 COMMANDS,
342 /**
343 * viewing angle query
344 */
345 ANGLES,
346 }
347 /**
348 * Enumeration of the different standards that may apply to AFD data:
349 *
350 * 0) ETSI/DVB:
351 * https://www.etsi.org/deliver/etsi_ts/101100_101199/101154/02.01.01_60/ts_101154v020101p.pdf
352 *
353 * 1) ATSC A/53:
354 * https://www.atsc.org/wp-content/uploads/2015/03/a_53-Part-4-2009.pdf
355 *
356 * 2) SMPTE ST2016-1:
357 */
358
359 /**
360 * Enumeration of the different standards that may apply to AFD data:
361 *
362 * 0) ETSI/DVB:
363 * https://www.etsi.org/deliver/etsi_ts/101100_101199/101154/02.01.01_60/ts_101154v020101p.pdf
364 *
365 * 1) ATSC A/53:
366 * https://www.atsc.org/wp-content/uploads/2015/03/a_53-Part-4-2009.pdf
367 *
368 * 2) SMPTE ST2016-1:
369 */
370 export namespace VideoAFDSpec {
371 export const $gtype: GObject.GType<VideoAFDSpec>;
372 }
373
374 enum VideoAFDSpec {
375 /**
376 * AFD value is from DVB/ETSI standard
377 */
378 DVB_ETSI,
379 /**
380 * AFD value is from ATSC A/53 standard
381 */
382 ATSC_A53,
383 SMPTE_ST2016_1,
384 }
385 /**
386 * Enumeration of the various values for Active Format Description (AFD)
387 *
388 * AFD should be included in video user data whenever the rectangular
389 * picture area containing useful information does not extend to the full height or width of the coded
390 * frame. AFD data may also be included in user data when the rectangular picture area containing
391 * useful information extends to the full height and width of the coded frame.
392 *
393 * For details, see Table 6.14 Active Format in:
394 *
395 * ATSC Digital Television Standard:
396 * Part 4 – MPEG-2 Video System Characteristics
397 *
398 * https://www.atsc.org/wp-content/uploads/2015/03/a_53-Part-4-2009.pdf
399 *
400 * and Active Format Description in Complete list of AFD codes
401 *
402 * https://en.wikipedia.org/wiki/Active_Format_Description#Complete_list_of_AFD_codes
403 *
404 * and SMPTE ST2016-1
405 *
406 * Notes:
407 *
408 * 1) AFD 0 is undefined for ATSC and SMPTE ST2016-1, indicating that AFD data is not available:
409 * If Bar Data is not present, AFD '0000' indicates that exact information
410 * is not available and the active image should be assumed to be the same as the coded frame. AFD '0000'.
411 * AFD '0000' accompanied by Bar Data signals that the active image’s aspect ratio is narrower than 16:9,
412 * but is not 4:3 or 14:9. As the exact aspect ratio cannot be conveyed by AFD alone, wherever possible,
413 * AFD ‘0000’ should be accompanied by Bar Data to define the exact vertical or horizontal extent
414 * of the active image.
415 * 2) AFD 0 is reserved for DVB/ETSI
416 * 3) values 1, 5, 6, 7, and 12 are reserved for both ATSC and DVB/ETSI
417 * 4) values 2 and 3 are not recommended for ATSC, but are valid for DVB/ETSI
418 */
419
420 /**
421 * Enumeration of the various values for Active Format Description (AFD)
422 *
423 * AFD should be included in video user data whenever the rectangular
424 * picture area containing useful information does not extend to the full height or width of the coded
425 * frame. AFD data may also be included in user data when the rectangular picture area containing
426 * useful information extends to the full height and width of the coded frame.
427 *
428 * For details, see Table 6.14 Active Format in:
429 *
430 * ATSC Digital Television Standard:
431 * Part 4 – MPEG-2 Video System Characteristics
432 *
433 * https://www.atsc.org/wp-content/uploads/2015/03/a_53-Part-4-2009.pdf
434 *
435 * and Active Format Description in Complete list of AFD codes
436 *
437 * https://en.wikipedia.org/wiki/Active_Format_Description#Complete_list_of_AFD_codes
438 *
439 * and SMPTE ST2016-1
440 *
441 * Notes:
442 *
443 * 1) AFD 0 is undefined for ATSC and SMPTE ST2016-1, indicating that AFD data is not available:
444 * If Bar Data is not present, AFD '0000' indicates that exact information
445 * is not available and the active image should be assumed to be the same as the coded frame. AFD '0000'.
446 * AFD '0000' accompanied by Bar Data signals that the active image’s aspect ratio is narrower than 16:9,
447 * but is not 4:3 or 14:9. As the exact aspect ratio cannot be conveyed by AFD alone, wherever possible,
448 * AFD ‘0000’ should be accompanied by Bar Data to define the exact vertical or horizontal extent
449 * of the active image.
450 * 2) AFD 0 is reserved for DVB/ETSI
451 * 3) values 1, 5, 6, 7, and 12 are reserved for both ATSC and DVB/ETSI
452 * 4) values 2 and 3 are not recommended for ATSC, but are valid for DVB/ETSI
453 */
454 export namespace VideoAFDValue {
455 export const $gtype: GObject.GType<VideoAFDValue>;
456 }
457
458 enum VideoAFDValue {
459 /**
460 * Unavailable (see note 0 below).
461 */
462 UNAVAILABLE,
463 /**
464 * For 4:3 coded frame, letterbox 16:9 image,
465 * at top of the coded frame. For 16:9 coded frame, full frame 16:9 image,
466 * the same as the coded frame.
467 */
468 '16_9_TOP_ALIGNED',
469 /**
470 * For 4:3 coded frame, letterbox 14:9 image,
471 * at top of the coded frame. For 16:9 coded frame, pillarbox 14:9 image,
472 * horizontally centered in the coded frame.
473 */
474 '14_9_TOP_ALIGNED',
475 /**
476 * For 4:3 coded frame, letterbox image with an aspect ratio
477 * greater than 16:9, vertically centered in the coded frame. For 16:9 coded frame,
478 * letterbox image with an aspect ratio greater than 16:9.
479 */
480 GREATER_THAN_16_9,
481 /**
482 * For 4:3 coded frame, full frame 4:3 image,
483 * the same as the coded frame. For 16:9 coded frame, full frame 16:9 image, the same as
484 * the coded frame.
485 */
486 '4_3_FULL_16_9_FULL',
487 /**
488 * For 4:3 coded frame, full frame 4:3 image, the same as
489 * the coded frame. For 16:9 coded frame, pillarbox 4:3 image, horizontally centered in the
490 * coded frame.
491 */
492 '4_3_FULL_4_3_PILLAR',
493 /**
494 * For 4:3 coded frame, letterbox 16:9 image, vertically centered in
495 * the coded frame with all image areas protected. For 16:9 coded frame, full frame 16:9 image,
496 * with all image areas protected.
497 */
498 '16_9_LETTER_16_9_FULL',
499 /**
500 * For 4:3 coded frame, letterbox 14:9 image, vertically centered in
501 * the coded frame. For 16:9 coded frame, pillarbox 14:9 image, horizontally centered in the
502 * coded frame.
503 */
504 '14_9_LETTER_14_9_PILLAR',
505 /**
506 * For 4:3 coded frame, full frame 4:3 image, with alternative 14:9
507 * center. For 16:9 coded frame, pillarbox 4:3 image, with alternative 14:9 center.
508 */
509 '4_3_FULL_14_9_CENTER',
510 /**
511 * For 4:3 coded frame, letterbox 16:9 image, with alternative 14:9
512 * center. For 16:9 coded frame, full frame 16:9 image, with alternative 14:9 center.
513 */
514 '16_9_LETTER_14_9_CENTER',
515 /**
516 * For 4:3 coded frame, letterbox 16:9 image, with alternative 4:3
517 * center. For 16:9 coded frame, full frame 16:9 image, with alternative 4:3 center.
518 */
519 '16_9_LETTER_4_3_CENTER',
520 }
521 /**
522 * Different alpha modes.
523 */
524
525 /**
526 * Different alpha modes.
527 */
528 export namespace VideoAlphaMode {
529 export const $gtype: GObject.GType<VideoAlphaMode>;
530 }
531
532 enum VideoAlphaMode {
533 /**
534 * When input and output have alpha, it will be copied.
535 * When the input has no alpha, alpha will be set to
536 * #GST_VIDEO_CONVERTER_OPT_ALPHA_VALUE
537 */
538 COPY,
539 /**
540 * set all alpha to
541 * #GST_VIDEO_CONVERTER_OPT_ALPHA_VALUE
542 */
543 SET,
544 /**
545 * multiply all alpha with
546 * #GST_VIDEO_CONVERTER_OPT_ALPHA_VALUE.
547 * When the input format has no alpha but the output format has, the
548 * alpha value will be set to #GST_VIDEO_CONVERTER_OPT_ALPHA_VALUE
549 */
550 MULT,
551 }
552
553 export namespace VideoAncillaryDID {
554 export const $gtype: GObject.GType<VideoAncillaryDID>;
555 }
556
557 enum VideoAncillaryDID {
558 UNDEFINED,
559 DELETION,
560 HANC_3G_AUDIO_DATA_FIRST,
561 HANC_3G_AUDIO_DATA_LAST,
562 HANC_HDTV_AUDIO_DATA_FIRST,
563 HANC_HDTV_AUDIO_DATA_LAST,
564 HANC_SDTV_AUDIO_DATA_1_FIRST,
565 HANC_SDTV_AUDIO_DATA_1_LAST,
566 CAMERA_POSITION,
567 HANC_ERROR_DETECTION,
568 HANC_SDTV_AUDIO_DATA_2_FIRST,
569 HANC_SDTV_AUDIO_DATA_2_LAST,
570 }
571 /**
572 * Some know types of Ancillary Data identifiers.
573 */
574
575 /**
576 * Some know types of Ancillary Data identifiers.
577 */
578 export namespace VideoAncillaryDID16 {
579 export const $gtype: GObject.GType<VideoAncillaryDID16>;
580 }
581
582 enum VideoAncillaryDID16 {
583 /**
584 * CEA 708 Ancillary data according to SMPTE 334
585 */
586 S334_EIA_708,
587 /**
588 * CEA 608 Ancillary data according to SMPTE 334
589 */
590 S334_EIA_608,
591 /**
592 * AFD/Bar Ancillary data according to SMPTE 2016-3 (Since: 1.18)
593 */
594 S2016_3_AFD_BAR,
595 }
596 /**
597 * The various known types of Closed Caption (CC).
598 */
599
600 /**
601 * The various known types of Closed Caption (CC).
602 */
603 export namespace VideoCaptionType {
604 export const $gtype: GObject.GType<VideoCaptionType>;
605 }
606
607 enum VideoCaptionType {
608 /**
609 * Unknown type of CC
610 */
611 UNKNOWN,
612 /**
613 * CEA-608 as byte pairs. Note that
614 * this format is not recommended since is does not specify to
615 * which field the caption comes from and therefore assumes
616 * it comes from the first field (and that there is no information
617 * on the second field). Use `GST_VIDEO_CAPTION_TYPE_CEA7`08_RAW
618 * if you wish to store CEA-608 from two fields and prefix each byte pair
619 * with 0xFC for the first field and 0xFD for the second field.
620 */
621 CEA608_RAW,
622 /**
623 * CEA-608 as byte triplets as defined
624 * in SMPTE S334-1 Annex A. The second and third byte of the byte triplet
625 * is the raw CEA608 data, the first byte is a bitfield: The top/7th bit is
626 * 0 for the second field, 1 for the first field, bit 6 and 5 are 0 and
627 * bits 4 to 0 are a 5 bit unsigned integer that represents the line
628 * offset relative to the base-line of the original image format (line 9
629 * for 525-line field 1, line 272 for 525-line field 2, line 5 for
630 * 625-line field 1 and line 318 for 625-line field 2).
631 */
632 CEA608_S334_1A,
633 /**
634 * CEA-708 as cc_data byte triplets. They
635 * can also contain 608-in-708 and the first byte of each triplet has to
636 * be inspected for detecting the type.
637 */
638 CEA708_RAW,
639 /**
640 * CEA-708 (and optionally CEA-608) in
641 * a CDP (Caption Distribution Packet) defined by SMPTE S-334-2.
642 * Contains the whole CDP (starting with 0x9669).
643 */
644 CEA708_CDP,
645 }
646 /**
647 * Different subsampling and upsampling methods
648 */
649
650 /**
651 * Different subsampling and upsampling methods
652 */
653 export namespace VideoChromaMethod {
654 export const $gtype: GObject.GType<VideoChromaMethod>;
655 }
656
657 enum VideoChromaMethod {
658 /**
659 * Duplicates the chroma samples when
660 * upsampling and drops when subsampling
661 */
662 NEAREST,
663 /**
664 * Uses linear interpolation to reconstruct
665 * missing chroma and averaging to subsample
666 */
667 LINEAR,
668 }
669 /**
670 * Different chroma downsampling and upsampling modes
671 */
672
673 /**
674 * Different chroma downsampling and upsampling modes
675 */
676 export namespace VideoChromaMode {
677 export const $gtype: GObject.GType<VideoChromaMode>;
678 }
679
680 enum VideoChromaMode {
681 /**
682 * do full chroma up and down sampling
683 */
684 FULL,
685 /**
686 * only perform chroma upsampling
687 */
688 UPSAMPLE_ONLY,
689 /**
690 * only perform chroma downsampling
691 */
692 DOWNSAMPLE_ONLY,
693 /**
694 * disable chroma resampling
695 */
696 NONE,
697 }
698 /**
699 * The color matrix is used to convert between Y'PbPr and
700 * non-linear RGB (R'G'B')
701 */
702
703 /**
704 * The color matrix is used to convert between Y'PbPr and
705 * non-linear RGB (R'G'B')
706 */
707 export namespace VideoColorMatrix {
708 export const $gtype: GObject.GType<VideoColorMatrix>;
709 }
710
711 enum VideoColorMatrix {
712 /**
713 * unknown matrix
714 */
715 UNKNOWN,
716 /**
717 * identity matrix. Order of coefficients is
718 * actually GBR, also IEC 61966-2-1 (sRGB)
719 */
720 RGB,
721 /**
722 * FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
723 */
724 FCC,
725 /**
726 * ITU-R BT.709 color matrix, also ITU-R BT1361
727 * / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
728 */
729 BT709,
730 /**
731 * ITU-R BT.601 color matrix, also SMPTE170M / ITU-R BT1358 525 / ITU-R BT1700 NTSC
732 */
733 BT601,
734 /**
735 * SMPTE 240M color matrix
736 */
737 SMPTE240M,
738 /**
739 * ITU-R BT.2020 color matrix. Since: 1.6
740 */
741 BT2020,
742 }
743 /**
744 * The color primaries define the how to transform linear RGB values to and from
745 * the CIE XYZ colorspace.
746 */
747
748 /**
749 * The color primaries define the how to transform linear RGB values to and from
750 * the CIE XYZ colorspace.
751 */
752 export namespace VideoColorPrimaries {
753 export const $gtype: GObject.GType<VideoColorPrimaries>;
754 }
755
756 enum VideoColorPrimaries {
757 /**
758 * unknown color primaries
759 */
760 UNKNOWN,
761 /**
762 * BT709 primaries, also ITU-R BT1361 / IEC
763 * 61966-2-4 / SMPTE RP177 Annex B
764 */
765 BT709,
766 /**
767 * BT470M primaries, also FCC Title 47 Code
768 * of Federal Regulations 73.682 (a)(20)
769 */
770 BT470M,
771 /**
772 * BT470BG primaries, also ITU-R BT601-6
773 * 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
774 */
775 BT470BG,
776 /**
777 * SMPTE170M primaries, also ITU-R
778 * BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
779 */
780 SMPTE170M,
781 /**
782 * SMPTE240M primaries
783 */
784 SMPTE240M,
785 /**
786 * Generic film (colour filters using
787 * Illuminant C)
788 */
789 FILM,
790 /**
791 * ITU-R BT2020 primaries. Since: 1.6
792 */
793 BT2020,
794 /**
795 * Adobe RGB primaries. Since: 1.8
796 */
797 ADOBERGB,
798 /**
799 * SMPTE ST 428 primaries (CIE 1931
800 * XYZ). Since: 1.16
801 */
802 SMPTEST428,
803 /**
804 * SMPTE RP 431 primaries (ST 431-2
805 * (2011) / DCI P3). Since: 1.16
806 */
807 SMPTERP431,
808 /**
809 * SMPTE EG 432 primaries (ST 432-1
810 * (2010) / P3 D65). Since: 1.16
811 */
812 SMPTEEG432,
813 /**
814 * EBU 3213 primaries (JEDEC P22
815 * phosphors). Since: 1.16
816 */
817 EBU3213,
818 }
819 /**
820 * Possible color range values. These constants are defined for 8 bit color
821 * values and can be scaled for other bit depths.
822 */
823
824 /**
825 * Possible color range values. These constants are defined for 8 bit color
826 * values and can be scaled for other bit depths.
827 */
828 export namespace VideoColorRange {
829 export const $gtype: GObject.GType<VideoColorRange>;
830 }
831
832 enum VideoColorRange {
833 /**
834 * unknown range
835 */
836 UNKNOWN,
837 /**
838 * [0..255] for 8 bit components
839 */
840 '0_255',
841 /**
842 * [16..235] for 8 bit components. Chroma has
843 * [16..240] range.
844 */
845 '16_235',
846 }
847 /**
848 * Different dithering methods to use.
849 */
850
851 /**
852 * Different dithering methods to use.
853 */
854 export namespace VideoDitherMethod {
855 export const $gtype: GObject.GType<VideoDitherMethod>;
856 }
857
858 enum VideoDitherMethod {
859 /**
860 * no dithering
861 */
862 NONE,
863 /**
864 * propagate rounding errors downwards
865 */
866 VERTERR,
867 /**
868 * Dither with floyd-steinberg error diffusion
869 */
870 FLOYD_STEINBERG,
871 /**
872 * Dither with Sierra Lite error diffusion
873 */
874 SIERRA_LITE,
875 /**
876 * ordered dither using a bayer pattern
877 */
878 BAYER,
879 }
880 /**
881 * Field order of interlaced content. This is only valid for
882 * interlace-mode=interleaved and not interlace-mode=mixed. In the case of
883 * mixed or GST_VIDEO_FIELD_ORDER_UNKOWN, the field order is signalled via
884 * buffer flags.
885 */
886
887 /**
888 * Field order of interlaced content. This is only valid for
889 * interlace-mode=interleaved and not interlace-mode=mixed. In the case of
890 * mixed or GST_VIDEO_FIELD_ORDER_UNKOWN, the field order is signalled via
891 * buffer flags.
892 */
893 export namespace VideoFieldOrder {
894 export const $gtype: GObject.GType<VideoFieldOrder>;
895 }
896
897 enum VideoFieldOrder {
898 /**
899 * unknown field order for interlaced content.
900 * The actual field order is signalled via buffer flags.
901 */
902 UNKNOWN,
903 /**
904 * top field is first
905 */
906 TOP_FIELD_FIRST,
907 /**
908 * bottom field is first
909 */
910 BOTTOM_FIELD_FIRST,
911 }
912 /**
913 * Enum value describing the most common video formats.
914 *
915 * See the [GStreamer raw video format design document](https://gstreamer.freedesktop.org/documentation/additional/design/mediatype-video-raw.html#formats)
916 * for details about the layout and packing of these formats in memory.
917 */
918
919 /**
920 * Enum value describing the most common video formats.
921 *
922 * See the [GStreamer raw video format design document](https://gstreamer.freedesktop.org/documentation/additional/design/mediatype-video-raw.html#formats)
923 * for details about the layout and packing of these formats in memory.
924 */
925 export namespace VideoFormat {
926 export const $gtype: GObject.GType<VideoFormat>;
927 }
928
929 enum VideoFormat {
930 /**
931 * Unknown or unset video format id
932 */
933 UNKNOWN,
934 /**
935 * Encoded video format. Only ever use that in caps for
936 * special video formats in combination with non-system
937 * memory GstCapsFeatures where it does not make sense
938 * to specify a real video format.
939 */
940 ENCODED,
941 /**
942 * planar 4:2:0 YUV
943 */
944 I420,
945 /**
946 * planar 4:2:0 YVU (like I420 but UV planes swapped)
947 */
948 YV12,
949 /**
950 * packed 4:2:2 YUV (Y0-U0-Y1-V0 Y2-U2-Y3-V2 Y4 ...)
951 */
952 YUY2,
953 /**
954 * packed 4:2:2 YUV (U0-Y0-V0-Y1 U2-Y2-V2-Y3 U4 ...)
955 */
956 UYVY,
957 /**
958 * packed 4:4:4 YUV with alpha channel (A0-Y0-U0-V0 ...)
959 */
960 AYUV,
961 /**
962 * sparse rgb packed into 32 bit, space last
963 */
964 RGBX,
965 /**
966 * sparse reverse rgb packed into 32 bit, space last
967 */
968 BGRX,
969 /**
970 * sparse rgb packed into 32 bit, space first
971 */
972 XRGB,
973 /**
974 * sparse reverse rgb packed into 32 bit, space first
975 */
976 XBGR,
977 /**
978 * rgb with alpha channel last
979 */
980 RGBA,
981 /**
982 * reverse rgb with alpha channel last
983 */
984 BGRA,
985 /**
986 * rgb with alpha channel first
987 */
988 ARGB,
989 /**
990 * reverse rgb with alpha channel first
991 */
992 ABGR,
993 /**
994 * RGB packed into 24 bits without padding (`R-G-B-R-G-B`)
995 */
996 RGB,
997 /**
998 * reverse RGB packed into 24 bits without padding (`B-G-R-B-G-R`)
999 */
1000 BGR,
1001 /**
1002 * planar 4:1:1 YUV
1003 */
1004 Y41B,
1005 /**
1006 * planar 4:2:2 YUV
1007 */
1008 Y42B,
1009 /**
1010 * packed 4:2:2 YUV (Y0-V0-Y1-U0 Y2-V2-Y3-U2 Y4 ...)
1011 */
1012 YVYU,
1013 /**
1014 * planar 4:4:4 YUV
1015 */
1016 Y444,
1017 /**
1018 * packed 4:2:2 10-bit YUV, complex format
1019 */
1020 V210,
1021 /**
1022 * packed 4:2:2 16-bit YUV, Y0-U0-Y1-V1 order
1023 */
1024 V216,
1025 /**
1026 * planar 4:2:0 YUV with interleaved UV plane
1027 */
1028 NV12,
1029 /**
1030 * planar 4:2:0 YUV with interleaved VU plane
1031 */
1032 NV21,
1033 /**
1034 * 8-bit grayscale
1035 */
1036 GRAY8,
1037 /**
1038 * 16-bit grayscale, most significant byte first
1039 */
1040 GRAY16_BE,
1041 /**
1042 * 16-bit grayscale, least significant byte first
1043 */
1044 GRAY16_LE,
1045 /**
1046 * packed 4:4:4 YUV (Y-U-V ...)
1047 */
1048 V308,
1049 /**
1050 * rgb 5-6-5 bits per component
1051 */
1052 RGB16,
1053 /**
1054 * reverse rgb 5-6-5 bits per component
1055 */
1056 BGR16,
1057 /**
1058 * rgb 5-5-5 bits per component
1059 */
1060 RGB15,
1061 /**
1062 * reverse rgb 5-5-5 bits per component
1063 */
1064 BGR15,
1065 /**
1066 * packed 10-bit 4:2:2 YUV (U0-Y0-V0-Y1 U2-Y2-V2-Y3 U4 ...)
1067 */
1068 UYVP,
1069 /**
1070 * planar 4:4:2:0 AYUV
1071 */
1072 A420,
1073 /**
1074 * 8-bit paletted RGB
1075 */
1076 RGB8P,
1077 /**
1078 * planar 4:1:0 YUV
1079 */
1080 YUV9,
1081 /**
1082 * planar 4:1:0 YUV (like YUV9 but UV planes swapped)
1083 */
1084 YVU9,
1085 /**
1086 * packed 4:1:1 YUV (Cb-Y0-Y1-Cr-Y2-Y3 ...)
1087 */
1088 IYU1,
1089 /**
1090 * rgb with alpha channel first, 16 bits (native endianness) per channel
1091 */
1092 ARGB64,
1093 /**
1094 * packed 4:4:4 YUV with alpha channel, 16 bits (native endianness) per channel (A0-Y0-U0-V0 ...)
1095 */
1096 AYUV64,
1097 /**
1098 * packed 4:4:4 RGB, 10 bits per channel
1099 */
1100 R210,
1101 /**
1102 * planar 4:2:0 YUV, 10 bits per channel
1103 */
1104 I420_10BE,
1105 /**
1106 * planar 4:2:0 YUV, 10 bits per channel
1107 */
1108 I420_10LE,
1109 /**
1110 * planar 4:2:2 YUV, 10 bits per channel
1111 */
1112 I422_10BE,
1113 /**
1114 * planar 4:2:2 YUV, 10 bits per channel
1115 */
1116 I422_10LE,
1117 /**
1118 * planar 4:4:4 YUV, 10 bits per channel (Since: 1.2)
1119 */
1120 Y444_10BE,
1121 /**
1122 * planar 4:4:4 YUV, 10 bits per channel (Since: 1.2)
1123 */
1124 Y444_10LE,
1125 /**
1126 * planar 4:4:4 RGB, 8 bits per channel (Since: 1.2)
1127 */
1128 GBR,
1129 /**
1130 * planar 4:4:4 RGB, 10 bits per channel (Since: 1.2)
1131 */
1132 GBR_10BE,
1133 /**
1134 * planar 4:4:4 RGB, 10 bits per channel (Since: 1.2)
1135 */
1136 GBR_10LE,
1137 /**
1138 * planar 4:2:2 YUV with interleaved UV plane (Since: 1.2)
1139 */
1140 NV16,
1141 /**
1142 * planar 4:4:4 YUV with interleaved UV plane (Since: 1.2)
1143 */
1144 NV24,
1145 /**
1146 * NV12 with 64x32 tiling in zigzag pattern (Since: 1.4)
1147 */
1148 NV12_64Z32,
1149 /**
1150 * planar 4:4:2:0 YUV, 10 bits per channel (Since: 1.6)
1151 */
1152 A420_10BE,
1153 /**
1154 * planar 4:4:2:0 YUV, 10 bits per channel (Since: 1.6)
1155 */
1156 A420_10LE,
1157 /**
1158 * planar 4:4:2:2 YUV, 10 bits per channel (Since: 1.6)
1159 */
1160 A422_10BE,
1161 /**
1162 * planar 4:4:2:2 YUV, 10 bits per channel (Since: 1.6)
1163 */
1164 A422_10LE,
1165 /**
1166 * planar 4:4:4:4 YUV, 10 bits per channel (Since: 1.6)
1167 */
1168 A444_10BE,
1169 /**
1170 * planar 4:4:4:4 YUV, 10 bits per channel (Since: 1.6)
1171 */
1172 A444_10LE,
1173 /**
1174 * planar 4:2:2 YUV with interleaved VU plane (Since: 1.6)
1175 */
1176 NV61,
1177 /**
1178 * planar 4:2:0 YUV with interleaved UV plane, 10 bits per channel (Since: 1.10)
1179 */
1180 P010_10BE,
1181 /**
1182 * planar 4:2:0 YUV with interleaved UV plane, 10 bits per channel (Since: 1.10)
1183 */
1184 P010_10LE,
1185 /**
1186 * packed 4:4:4 YUV (U-Y-V ...) (Since: 1.10)
1187 */
1188 IYU2,
1189 /**
1190 * packed 4:2:2 YUV (V0-Y0-U0-Y1 V2-Y2-U2-Y3 V4 ...)
1191 */
1192 VYUY,
1193 /**
1194 * planar 4:4:4:4 ARGB, 8 bits per channel (Since: 1.12)
1195 */
1196 GBRA,
1197 /**
1198 * planar 4:4:4:4 ARGB, 10 bits per channel (Since: 1.12)
1199 */
1200 GBRA_10BE,
1201 /**
1202 * planar 4:4:4:4 ARGB, 10 bits per channel (Since: 1.12)
1203 */
1204 GBRA_10LE,
1205 /**
1206 * planar 4:4:4 RGB, 12 bits per channel (Since: 1.12)
1207 */
1208 GBR_12BE,
1209 /**
1210 * planar 4:4:4 RGB, 12 bits per channel (Since: 1.12)
1211 */
1212 GBR_12LE,
1213 /**
1214 * planar 4:4:4:4 ARGB, 12 bits per channel (Since: 1.12)
1215 */
1216 GBRA_12BE,
1217 /**
1218 * planar 4:4:4:4 ARGB, 12 bits per channel (Since: 1.12)
1219 */
1220 GBRA_12LE,
1221 /**
1222 * planar 4:2:0 YUV, 12 bits per channel (Since: 1.12)
1223 */
1224 I420_12BE,
1225 /**
1226 * planar 4:2:0 YUV, 12 bits per channel (Since: 1.12)
1227 */
1228 I420_12LE,
1229 /**
1230 * planar 4:2:2 YUV, 12 bits per channel (Since: 1.12)
1231 */
1232 I422_12BE,
1233 /**
1234 * planar 4:2:2 YUV, 12 bits per channel (Since: 1.12)
1235 */
1236 I422_12LE,
1237 /**
1238 * planar 4:4:4 YUV, 12 bits per channel (Since: 1.12)
1239 */
1240 Y444_12BE,
1241 /**
1242 * planar 4:4:4 YUV, 12 bits per channel (Since: 1.12)
1243 */
1244 Y444_12LE,
1245 /**
1246 * 10-bit grayscale, packed into 32bit words (2 bits padding) (Since: 1.14)
1247 */
1248 GRAY10_LE32,
1249 /**
1250 * 10-bit variant of `GST_VIDEO_FORMAT_NV1`2, packed into 32bit words (MSB 2 bits padding) (Since: 1.14)
1251 */
1252 NV12_10LE32,
1253 /**
1254 * 10-bit variant of `GST_VIDEO_FORMAT_NV1`6, packed into 32bit words (MSB 2 bits padding) (Since: 1.14)
1255 */
1256 NV16_10LE32,
1257 /**
1258 * Fully packed variant of NV12_10LE32 (Since: 1.16)
1259 */
1260 NV12_10LE40,
1261 /**
1262 * packed 4:2:2 YUV, 10 bits per channel (Since: 1.16)
1263 */
1264 Y210,
1265 /**
1266 * packed 4:4:4 YUV, 10 bits per channel(A-V-Y-U...) (Since: 1.16)
1267 */
1268 Y410,
1269 /**
1270 * packed 4:4:4 YUV with alpha channel (V0-U0-Y0-A0...) (Since: 1.16)
1271 */
1272 VUYA,
1273 /**
1274 * packed 4:4:4 RGB with alpha channel(B-G-R-A), 10 bits for R/G/B channel and MSB 2 bits for alpha channel (Since: 1.16)
1275 */
1276 BGR10A2_LE,
1277 /**
1278 * packed 4:4:4 RGB with alpha channel(R-G-B-A), 10 bits for R/G/B channel and MSB 2 bits for alpha channel (Since: 1.18)
1279 */
1280 RGB10A2_LE,
1281 /**
1282 * planar 4:4:4 YUV, 16 bits per channel (Since: 1.18)
1283 */
1284 Y444_16BE,
1285 /**
1286 * planar 4:4:4 YUV, 16 bits per channel (Since: 1.18)
1287 */
1288 Y444_16LE,
1289 /**
1290 * planar 4:2:0 YUV with interleaved UV plane, 16 bits per channel (Since: 1.18)
1291 */
1292 P016_BE,
1293 /**
1294 * planar 4:2:0 YUV with interleaved UV plane, 16 bits per channel (Since: 1.18)
1295 */
1296 P016_LE,
1297 /**
1298 * planar 4:2:0 YUV with interleaved UV plane, 12 bits per channel (Since: 1.18)
1299 */
1300 P012_BE,
1301 /**
1302 * planar 4:2:0 YUV with interleaved UV plane, 12 bits per channel (Since: 1.18)
1303 */
1304 P012_LE,
1305 /**
1306 * packed 4:2:2 YUV, 12 bits per channel (Y-U-Y-V) (Since: 1.18)
1307 */
1308 Y212_BE,
1309 /**
1310 * packed 4:2:2 YUV, 12 bits per channel (Y-U-Y-V) (Since: 1.18)
1311 */
1312 Y212_LE,
1313 /**
1314 * packed 4:4:4:4 YUV, 12 bits per channel(U-Y-V-A...) (Since: 1.18)
1315 */
1316 Y412_BE,
1317 /**
1318 * packed 4:4:4:4 YUV, 12 bits per channel(U-Y-V-A...) (Since: 1.18)
1319 */
1320 Y412_LE,
1321 /**
1322 * NV12 with 4x4 tiles in linear order.
1323 */
1324 NV12_4L4,
1325 /**
1326 * NV12 with 32x32 tiles in linear order.
1327 */
1328 NV12_32L32,
1329 /**
1330 * Planar 4:4:4 RGB, R-G-B order
1331 */
1332 RGBP,
1333 /**
1334 * Planar 4:4:4 RGB, B-G-R order
1335 */
1336 BGRP,
1337 /**
1338 * Planar 4:2:0 YUV with interleaved UV plane with alpha as
1339 * 3rd plane.
1340 */
1341 AV12,
1342 /**
1343 * RGB with alpha channel first, 16 bits (little endian)
1344 * per channel.
1345 */
1346 ARGB64_LE,
1347 /**
1348 * RGB with alpha channel first, 16 bits (big endian)
1349 * per channel.
1350 */
1351 ARGB64_BE,
1352 /**
1353 * RGB with alpha channel last, 16 bits (little endian)
1354 * per channel.
1355 */
1356 RGBA64_LE,
1357 /**
1358 * RGB with alpha channel last, 16 bits (big endian)
1359 * per channel.
1360 */
1361 RGBA64_BE,
1362 /**
1363 * Reverse RGB with alpha channel last, 16 bits (little endian)
1364 * per channel.
1365 */
1366 BGRA64_LE,
1367 /**
1368 * Reverse RGB with alpha channel last, 16 bits (big endian)
1369 * per channel.
1370 */
1371 BGRA64_BE,
1372 /**
1373 * Reverse RGB with alpha channel first, 16 bits (little endian)
1374 * per channel.
1375 */
1376 ABGR64_LE,
1377 /**
1378 * Reverse RGB with alpha channel first, 16 bits (big endian)
1379 * per channel.
1380 */
1381 ABGR64_BE,
1382 /**
1383 * NV12 with 16x32 Y tiles and 16x16 UV tiles.
1384 */
1385 NV12_16L32S,
1386 /**
1387 * NV12 with 8x128 tiles in linear order.
1388 */
1389 NV12_8L128,
1390 /**
1391 * NV12 10bit big endian with 8x128 tiles in linear order.
1392 */
1393 NV12_10BE_8L128,
1394 /**
1395 * `GST_VIDEO_FORMAT_NV1`2_10LE40 with 4x4 pixels tiles (5 bytes
1396 * per tile row). This format is produced by Verisilicon/Hantro decoders.
1397 */
1398 NV12_10LE40_4L4,
1399 /**
1400 * `GST_VIDEO_FORMAT_DMA_DRM` represent the DMA DRM special format. It's
1401 * only used with memory:DMABuf #GstCapsFeatures, where an extra
1402 * parameter (drm-format) is required to define the image format and
1403 * its memory layout.
1404 */
1405 DMA_DRM,
1406 /**
1407 * Mediatek 10bit NV12 little endian with 16x32 tiles in linear order, tile 2
1408 * bits.
1409 */
1410 MT2110T,
1411 /**
1412 * Mediatek 10bit NV12 little endian with 16x32 tiles in linear order, raster
1413 * 2 bits.
1414 */
1415 MT2110R,
1416 /**
1417 * planar 4:4:2:2 YUV, 8 bits per channel
1418 */
1419 A422,
1420 /**
1421 * planar 4:4:4:4 YUV, 8 bits per channel
1422 */
1423 A444,
1424 /**
1425 * planar 4:4:4:4 YUV, 12 bits per channel
1426 */
1427 A444_12LE,
1428 /**
1429 * planar 4:4:4:4 YUV, 12 bits per channel
1430 */
1431 A444_12BE,
1432 /**
1433 * planar 4:4:2:2 YUV, 12 bits per channel
1434 */
1435 A422_12LE,
1436 /**
1437 * planar 4:4:2:2 YUV, 12 bits per channel
1438 */
1439 A422_12BE,
1440 /**
1441 * planar 4:4:2:0 YUV, 12 bits per channel
1442 */
1443 A420_12LE,
1444 /**
1445 * planar 4:4:2:0 YUV, 12 bits per channel
1446 */
1447 A420_12BE,
1448 /**
1449 * planar 4:4:4:4 YUV, 16 bits per channel
1450 */
1451 A444_16LE,
1452 /**
1453 * planar 4:4:4:4 YUV, 16 bits per channel
1454 */
1455 A444_16BE,
1456 /**
1457 * planar 4:4:2:2 YUV, 16 bits per channel
1458 */
1459 A422_16LE,
1460 /**
1461 * planar 4:4:2:2 YUV, 16 bits per channel
1462 */
1463 A422_16BE,
1464 /**
1465 * planar 4:4:2:0 YUV, 16 bits per channel
1466 */
1467 A420_16LE,
1468 /**
1469 * planar 4:4:2:0 YUV, 16 bits per channel
1470 */
1471 A420_16BE,
1472 /**
1473 * planar 4:4:4 RGB, 16 bits per channel
1474 */
1475 GBR_16LE,
1476 /**
1477 * planar 4:4:4 RGB, 16 bits per channel
1478 */
1479 GBR_16BE,
1480 /**
1481 * packed RGB with alpha, 8 bits per channel
1482 */
1483 RBGA,
1484 }
1485 /**
1486 * The orientation of the GL texture.
1487 */
1488
1489 /**
1490 * The orientation of the GL texture.
1491 */
1492 export namespace VideoGLTextureOrientation {
1493 export const $gtype: GObject.GType<VideoGLTextureOrientation>;
1494 }
1495
1496 enum VideoGLTextureOrientation {
1497 /**
1498 * Top line first in memory, left row first
1499 */
1500 NORMAL_Y_NORMAL,
1501 /**
1502 * Bottom line first in memory, left row first
1503 */
1504 NORMAL_Y_FLIP,
1505 /**
1506 * Top line first in memory, right row first
1507 */
1508 FLIP_Y_NORMAL,
1509 /**
1510 * Bottom line first in memory, right row first
1511 */
1512 FLIP_Y_FLIP,
1513 }
1514 /**
1515 * The GL texture type.
1516 */
1517
1518 /**
1519 * The GL texture type.
1520 */
1521 export namespace VideoGLTextureType {
1522 export const $gtype: GObject.GType<VideoGLTextureType>;
1523 }
1524
1525 enum VideoGLTextureType {
1526 /**
1527 * Luminance texture, GL_LUMINANCE
1528 */
1529 LUMINANCE,
1530 /**
1531 * Luminance-alpha texture, GL_LUMINANCE_ALPHA
1532 */
1533 LUMINANCE_ALPHA,
1534 /**
1535 * RGB 565 texture, GL_RGB
1536 */
1537 RGB16,
1538 /**
1539 * RGB texture, GL_RGB
1540 */
1541 RGB,
1542 /**
1543 * RGBA texture, GL_RGBA
1544 */
1545 RGBA,
1546 /**
1547 * R texture, GL_RED_EXT
1548 */
1549 R,
1550 /**
1551 * RG texture, GL_RG_EXT
1552 */
1553 RG,
1554 }
1555
1556 export namespace VideoGammaMode {
1557 export const $gtype: GObject.GType<VideoGammaMode>;
1558 }
1559
1560 enum VideoGammaMode {
1561 /**
1562 * disable gamma handling
1563 */
1564 NONE,
1565 /**
1566 * convert between input and output gamma
1567 * Different gamma conversion modes
1568 */
1569 REMAP,
1570 }
1571 /**
1572 * The possible values of the #GstVideoInterlaceMode describing the interlace
1573 * mode of the stream.
1574 */
1575
1576 /**
1577 * The possible values of the #GstVideoInterlaceMode describing the interlace
1578 * mode of the stream.
1579 */
1580 export namespace VideoInterlaceMode {
1581 export const $gtype: GObject.GType<VideoInterlaceMode>;
1582 }
1583
1584 enum VideoInterlaceMode {
1585 /**
1586 * all frames are progressive
1587 */
1588 PROGRESSIVE,
1589 /**
1590 * 2 fields are interleaved in one video
1591 * frame. Extra buffer flags describe the field order.
1592 */
1593 INTERLEAVED,
1594 /**
1595 * frames contains both interlaced and
1596 * progressive video, the buffer flags describe the frame and fields.
1597 */
1598 MIXED,
1599 /**
1600 * 2 fields are stored in one buffer, use the
1601 * frame ID to get access to the required field. For multiview (the
1602 * 'views' property > 1) the fields of view N can be found at frame ID
1603 * (N * 2) and (N * 2) + 1.
1604 * Each field has only half the amount of lines as noted in the
1605 * height property. This mode requires multiple GstVideoMeta metadata
1606 * to describe the fields.
1607 */
1608 FIELDS,
1609 /**
1610 * 1 field is stored in one buffer,
1611 * `GST_VIDEO_BUFFER_FLAG_TF` or `GST_VIDEO_BUFFER_FLAG_BF` indicates if
1612 * the buffer is carrying the top or bottom field, respectively. The top and
1613 * bottom buffers must alternate in the pipeline, with this mode
1614 * (Since: 1.16).
1615 */
1616 ALTERNATE,
1617 }
1618 /**
1619 * Different color matrix conversion modes
1620 */
1621
1622 /**
1623 * Different color matrix conversion modes
1624 */
1625 export namespace VideoMatrixMode {
1626 export const $gtype: GObject.GType<VideoMatrixMode>;
1627 }
1628
1629 enum VideoMatrixMode {
1630 /**
1631 * do conversion between color matrices
1632 */
1633 FULL,
1634 /**
1635 * use the input color matrix to convert
1636 * to and from R'G'B
1637 */
1638 INPUT_ONLY,
1639 /**
1640 * use the output color matrix to convert
1641 * to and from R'G'B
1642 */
1643 OUTPUT_ONLY,
1644 /**
1645 * disable color matrix conversion.
1646 */
1647 NONE,
1648 }
1649 /**
1650 * #GstVideoMultiviewFramePacking represents the subset of #GstVideoMultiviewMode
1651 * values that can be applied to any video frame without needing extra metadata.
1652 * It can be used by elements that provide a property to override the
1653 * multiview interpretation of a video stream when the video doesn't contain
1654 * any markers.
1655 *
1656 * This enum is used (for example) on playbin, to re-interpret a played
1657 * video stream as a stereoscopic video. The individual enum values are
1658 * equivalent to and have the same value as the matching #GstVideoMultiviewMode.
1659 */
1660
1661 /**
1662 * #GstVideoMultiviewFramePacking represents the subset of #GstVideoMultiviewMode
1663 * values that can be applied to any video frame without needing extra metadata.
1664 * It can be used by elements that provide a property to override the
1665 * multiview interpretation of a video stream when the video doesn't contain
1666 * any markers.
1667 *
1668 * This enum is used (for example) on playbin, to re-interpret a played
1669 * video stream as a stereoscopic video. The individual enum values are
1670 * equivalent to and have the same value as the matching #GstVideoMultiviewMode.
1671 */
1672 export namespace VideoMultiviewFramePacking {
1673 export const $gtype: GObject.GType<VideoMultiviewFramePacking>;
1674 }
1675
1676 enum VideoMultiviewFramePacking {
1677 /**
1678 * A special value indicating
1679 * no frame packing info.
1680 */
1681 NONE,
1682 /**
1683 * All frames are monoscopic.
1684 */
1685 MONO,
1686 /**
1687 * All frames represent a left-eye view.
1688 */
1689 LEFT,
1690 /**
1691 * All frames represent a right-eye view.
1692 */
1693 RIGHT,
1694 /**
1695 * Left and right eye views are
1696 * provided in the left and right half of the frame respectively.
1697 */
1698 SIDE_BY_SIDE,
1699 /**
1700 * Left and right eye
1701 * views are provided in the left and right half of the frame, but
1702 * have been sampled using quincunx method, with half-pixel offset
1703 * between the 2 views.
1704 */
1705 SIDE_BY_SIDE_QUINCUNX,
1706 /**
1707 * Alternating vertical
1708 * columns of pixels represent the left and right eye view respectively.
1709 */
1710 COLUMN_INTERLEAVED,
1711 /**
1712 * Alternating horizontal
1713 * rows of pixels represent the left and right eye view respectively.
1714 */
1715 ROW_INTERLEAVED,
1716 /**
1717 * The top half of the frame
1718 * contains the left eye, and the bottom half the right eye.
1719 */
1720 TOP_BOTTOM,
1721 /**
1722 * Pixels are arranged with
1723 * alternating pixels representing left and right eye views in a
1724 * checkerboard fashion.
1725 */
1726 CHECKERBOARD,
1727 }
1728 /**
1729 * All possible stereoscopic 3D and multiview representations.
1730 * In conjunction with #GstVideoMultiviewFlags, describes how
1731 * multiview content is being transported in the stream.
1732 */
1733
1734 /**
1735 * All possible stereoscopic 3D and multiview representations.
1736 * In conjunction with #GstVideoMultiviewFlags, describes how
1737 * multiview content is being transported in the stream.
1738 */
1739 export namespace VideoMultiviewMode {
1740 export const $gtype: GObject.GType<VideoMultiviewMode>;
1741 }
1742
1743 enum VideoMultiviewMode {
1744 /**
1745 * A special value indicating
1746 * no multiview information. Used in GstVideoInfo and other places to
1747 * indicate that no specific multiview handling has been requested or
1748 * provided. This value is never carried on caps.
1749 */
1750 NONE,
1751 /**
1752 * All frames are monoscopic.
1753 */
1754 MONO,
1755 /**
1756 * All frames represent a left-eye view.
1757 */
1758 LEFT,
1759 /**
1760 * All frames represent a right-eye view.
1761 */
1762 RIGHT,
1763 /**
1764 * Left and right eye views are
1765 * provided in the left and right half of the frame respectively.
1766 */
1767 SIDE_BY_SIDE,
1768 /**
1769 * Left and right eye
1770 * views are provided in the left and right half of the frame, but
1771 * have been sampled using quincunx method, with half-pixel offset
1772 * between the 2 views.
1773 */
1774 SIDE_BY_SIDE_QUINCUNX,
1775 /**
1776 * Alternating vertical
1777 * columns of pixels represent the left and right eye view respectively.
1778 */
1779 COLUMN_INTERLEAVED,
1780 /**
1781 * Alternating horizontal
1782 * rows of pixels represent the left and right eye view respectively.
1783 */
1784 ROW_INTERLEAVED,
1785 /**
1786 * The top half of the frame
1787 * contains the left eye, and the bottom half the right eye.
1788 */
1789 TOP_BOTTOM,
1790 /**
1791 * Pixels are arranged with
1792 * alternating pixels representing left and right eye views in a
1793 * checkerboard fashion.
1794 */
1795 CHECKERBOARD,
1796 /**
1797 * Left and right eye views
1798 * are provided in separate frames alternately.
1799 */
1800 FRAME_BY_FRAME,
1801 /**
1802 * Multiple
1803 * independent views are provided in separate frames in sequence.
1804 * This method only applies to raw video buffers at the moment.
1805 * Specific view identification is via the `GstVideoMultiviewMeta`
1806 * and #GstVideoMeta(s) on raw video buffers.
1807 */
1808 MULTIVIEW_FRAME_BY_FRAME,
1809 /**
1810 * Multiple views are
1811 * provided as separate #GstMemory framebuffers attached to each
1812 * #GstBuffer, described by the `GstVideoMultiviewMeta`
1813 * and #GstVideoMeta(s)
1814 */
1815 SEPARATED,
1816 }
1817 /**
1818 * The different video orientation methods.
1819 */
1820 /**
1821 * The different video orientation methods.
1822 */
1823 class VideoOrientationMethod {
1824 static $gtype: GObject.GType<VideoOrientationMethod>;
1825
1826 // Static fields
1827
1828 /**
1829 * Identity (no rotation)
1830 */
1831 static IDENTITY: number;
1832 /**
1833 * Rotate clockwise 90 degrees
1834 */
1835 static '90R': number;
1836 /**
1837 * Rotate 180 degrees
1838 */
1839 static '180': number;
1840 /**
1841 * Rotate counter-clockwise 90 degrees
1842 */
1843 static '90L': number;
1844 /**
1845 * Flip horizontally
1846 */
1847 static HORIZ: number;
1848 /**
1849 * Flip vertically
1850 */
1851 static VERT: number;
1852 /**
1853 * Flip across upper left/lower right diagonal
1854 */
1855 static UL_LR: number;
1856 /**
1857 * Flip across upper right/lower left diagonal
1858 */
1859 static UR_LL: number;
1860 /**
1861 * Select flip method based on image-orientation tag
1862 */
1863 static AUTO: number;
1864 /**
1865 * Current status depends on plugin internal setup
1866 */
1867 static CUSTOM: number;
1868
1869 // Constructors
1870
1871 _init(...args: any[]): void;
1872 }
1873
1874 /**
1875 * Different primaries conversion modes
1876 */
1877
1878 /**
1879 * Different primaries conversion modes
1880 */
1881 export namespace VideoPrimariesMode {
1882 export const $gtype: GObject.GType<VideoPrimariesMode>;
1883 }
1884
1885 enum VideoPrimariesMode {
1886 /**
1887 * disable conversion between primaries
1888 */
1889 NONE,
1890 /**
1891 * do conversion between primaries only
1892 * when it can be merged with color matrix conversion.
1893 */
1894 MERGE_ONLY,
1895 /**
1896 * fast conversion between primaries
1897 */
1898 FAST,
1899 }
1900 /**
1901 * Different subsampling and upsampling methods
1902 */
1903
1904 /**
1905 * Different subsampling and upsampling methods
1906 */
1907 export namespace VideoResamplerMethod {
1908 export const $gtype: GObject.GType<VideoResamplerMethod>;
1909 }
1910
1911 enum VideoResamplerMethod {
1912 /**
1913 * Duplicates the samples when
1914 * upsampling and drops when downsampling
1915 */
1916 NEAREST,
1917 /**
1918 * Uses linear interpolation to reconstruct
1919 * missing samples and averaging to downsample
1920 */
1921 LINEAR,
1922 /**
1923 * Uses cubic interpolation
1924 */
1925 CUBIC,
1926 /**
1927 * Uses sinc interpolation
1928 */
1929 SINC,
1930 /**
1931 * Uses lanczos interpolation
1932 */
1933 LANCZOS,
1934 }
1935 /**
1936 * Enum value describing the available tiling modes.
1937 */
1938
1939 /**
1940 * Enum value describing the available tiling modes.
1941 */
1942 export namespace VideoTileMode {
1943 export const $gtype: GObject.GType<VideoTileMode>;
1944 }
1945
1946 enum VideoTileMode {
1947 /**
1948 * Unknown or unset tile mode
1949 */
1950 UNKNOWN,
1951 /**
1952 * Every four adjacent blocks - two
1953 * horizontally and two vertically are grouped together and are located
1954 * in memory in Z or flipped Z order. In case of odd rows, the last row
1955 * of blocks is arranged in linear order.
1956 */
1957 ZFLIPZ_2X2,
1958 /**
1959 * Tiles are in row order.
1960 */
1961 LINEAR,
1962 }
1963 /**
1964 * Enum value describing the most common tiling types.
1965 */
1966
1967 /**
1968 * Enum value describing the most common tiling types.
1969 */
1970 export namespace VideoTileType {
1971 export const $gtype: GObject.GType<VideoTileType>;
1972 }
1973
1974 enum VideoTileType {
1975 /**
1976 * Tiles are indexed. Use
1977 * gst_video_tile_get_index () to retrieve the tile at the requested
1978 * coordinates.
1979 */
1980 INDEXED,
1981 }
1982 /**
1983 * The video transfer function defines the formula for converting between
1984 * non-linear RGB (R'G'B') and linear RGB
1985 */
1986
1987 /**
1988 * The video transfer function defines the formula for converting between
1989 * non-linear RGB (R'G'B') and linear RGB
1990 */
1991 export namespace VideoTransferFunction {
1992 export const $gtype: GObject.GType<VideoTransferFunction>;
1993 }
1994
1995 enum VideoTransferFunction {
1996 /**
1997 * unknown transfer function
1998 */
1999 UNKNOWN,
2000 /**
2001 * linear RGB, gamma 1.0 curve
2002 */
2003 GAMMA10,
2004 /**
2005 * Gamma 1.8 curve
2006 */
2007 GAMMA18,
2008 /**
2009 * Gamma 2.0 curve
2010 */
2011 GAMMA20,
2012 /**
2013 * Gamma 2.2 curve
2014 */
2015 GAMMA22,
2016 /**
2017 * Gamma 2.2 curve with a linear segment in the lower
2018 * range, also ITU-R BT470M / ITU-R BT1700 625 PAL &
2019 * SECAM / ITU-R BT1361
2020 */
2021 BT709,
2022 /**
2023 * Gamma 2.2 curve with a linear segment in the
2024 * lower range
2025 */
2026 SMPTE240M,
2027 /**
2028 * Gamma 2.4 curve with a linear segment in the lower
2029 * range. IEC 61966-2-1 (sRGB or sYCC)
2030 */
2031 SRGB,
2032 /**
2033 * Gamma 2.8 curve, also ITU-R BT470BG
2034 */
2035 GAMMA28,
2036 /**
2037 * Logarithmic transfer characteristic
2038 * 100:1 range
2039 */
2040 LOG100,
2041 /**
2042 * Logarithmic transfer characteristic
2043 * 316.22777:1 range (100 * sqrt(10) : 1)
2044 */
2045 LOG316,
2046 /**
2047 * Gamma 2.2 curve with a linear segment in the lower
2048 * range. Used for BT.2020 with 12 bits per
2049 * component. Since: 1.6
2050 */
2051 BT2020_12,
2052 /**
2053 * Gamma 2.19921875. Since: 1.8
2054 */
2055 ADOBERGB,
2056 /**
2057 * Rec. ITU-R BT.2020-2 with 10 bits per component.
2058 * (functionally the same as the values
2059 * GST_VIDEO_TRANSFER_BT709 and GST_VIDEO_TRANSFER_BT601).
2060 * Since: 1.18
2061 */
2062 BT2020_10,
2063 /**
2064 * SMPTE ST 2084 for 10, 12, 14, and 16-bit systems.
2065 * Known as perceptual quantization (PQ)
2066 * Since: 1.18
2067 */
2068 SMPTE2084,
2069 /**
2070 * Association of Radio Industries and Businesses (ARIB)
2071 * STD-B67 and Rec. ITU-R BT.2100-1 hybrid loggamma (HLG) system
2072 * Since: 1.18
2073 */
2074 ARIB_STD_B67,
2075 /**
2076 * also known as SMPTE170M / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC
2077 */
2078 BT601,
2079 }
2080 /**
2081 * Return values for #GstVideoVBIParser
2082 */
2083
2084 /**
2085 * Return values for #GstVideoVBIParser
2086 */
2087 export namespace VideoVBIParserResult {
2088 export const $gtype: GObject.GType<VideoVBIParserResult>;
2089 }
2090
2091 enum VideoVBIParserResult {
2092 /**
2093 * No line were provided, or no more Ancillary data was found.
2094 */
2095 DONE,
2096 /**
2097 * A #GstVideoAncillary was found.
2098 */
2099 OK,
2100 /**
2101 * An error occurred
2102 */
2103 ERROR,
2104 }
2105 const BUFFER_POOL_OPTION_VIDEO_AFFINE_TRANSFORMATION_META: string;
2106 /**
2107 * A bufferpool option to enable extra padding. When a bufferpool supports this
2108 * option, gst_buffer_pool_config_set_video_alignment() can be called.
2109 *
2110 * When this option is enabled on the bufferpool,
2111 * #GST_BUFFER_POOL_OPTION_VIDEO_META should also be enabled.
2112 */
2113 const BUFFER_POOL_OPTION_VIDEO_ALIGNMENT: string;
2114 /**
2115 * An option that can be activated on a bufferpool to request gl texture upload
2116 * meta on buffers from the pool.
2117 *
2118 * When this option is enabled on the bufferpool,
2119 * `GST_BUFFER_POOL_OPTION_VIDEO_META` should also be enabled.
2120 */
2121 const BUFFER_POOL_OPTION_VIDEO_GL_TEXTURE_UPLOAD_META: string;
2122 /**
2123 * An option that can be activated on bufferpool to request video metadata
2124 * on buffers from the pool.
2125 */
2126 const BUFFER_POOL_OPTION_VIDEO_META: string;
2127 /**
2128 * Name of the caps feature indicating that the stream is interlaced.
2129 *
2130 * Currently it is only used for video with 'interlace-mode=alternate'
2131 * to ensure backwards compatibility for this new mode.
2132 * In this mode each buffer carries a single field of interlaced video.
2133 * `GST_VIDEO_BUFFER_FLAG_TOP_FIELD` and `GST_VIDEO_BUFFER_FLAG_BOTTOM_FIELD`
2134 * indicate whether the buffer carries a top or bottom field. The order of
2135 * buffers/fields in the stream and the timestamps on the buffers indicate the
2136 * temporal order of the fields.
2137 * Top and bottom fields are expected to alternate in this mode.
2138 * The frame rate in the caps still signals the frame rate, so the notional field
2139 * rate will be twice the frame rate from the caps
2140 * (see `GST_VIDEO_INFO_FIELD_RATE_N)`.
2141 */
2142 const CAPS_FEATURE_FORMAT_INTERLACED: string;
2143 const CAPS_FEATURE_META_GST_VIDEO_AFFINE_TRANSFORMATION_META: string;
2144 const CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META: string;
2145 const CAPS_FEATURE_META_GST_VIDEO_META: string;
2146 const CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION: string;
2147 /**
2148 * This metadata stays relevant as long as video colorspace is unchanged.
2149 */
2150 const META_TAG_VIDEO_COLORSPACE_STR: string;
2151 /**
2152 * This metadata stays relevant as long as video orientation is unchanged.
2153 */
2154 const META_TAG_VIDEO_ORIENTATION_STR: string;
2155 /**
2156 * This metadata stays relevant as long as video size is unchanged.
2157 */
2158 const META_TAG_VIDEO_SIZE_STR: string;
2159 /**
2160 * This metadata is relevant for video streams.
2161 */
2162 const META_TAG_VIDEO_STR: string;
2163 const VIDEO_COLORIMETRY_BT2020: string;
2164 const VIDEO_COLORIMETRY_BT2020_10: string;
2165 const VIDEO_COLORIMETRY_BT2100_HLG: string;
2166 const VIDEO_COLORIMETRY_BT2100_PQ: string;
2167 const VIDEO_COLORIMETRY_BT601: string;
2168 const VIDEO_COLORIMETRY_BT709: string;
2169 const VIDEO_COLORIMETRY_SMPTE240M: string;
2170 const VIDEO_COLORIMETRY_SRGB: string;
2171 const VIDEO_COMP_A: number;
2172 const VIDEO_COMP_B: number;
2173 const VIDEO_COMP_G: number;
2174 const VIDEO_COMP_INDEX: number;
2175 const VIDEO_COMP_PALETTE: number;
2176 const VIDEO_COMP_R: number;
2177 const VIDEO_COMP_U: number;
2178 const VIDEO_COMP_V: number;
2179 const VIDEO_COMP_Y: number;
2180 /**
2181 * #GstVideoAlphaMode, the alpha mode to use.
2182 * Default is #GST_VIDEO_ALPHA_MODE_COPY.
2183 */
2184 const VIDEO_CONVERTER_OPT_ALPHA_MODE: string;
2185 /**
2186 * #G_TYPE_DOUBLE, the alpha color value to use.
2187 * Default to 1.0
2188 */
2189 const VIDEO_CONVERTER_OPT_ALPHA_VALUE: string;
2190 /**
2191 * #G_TYPE_BOOLEAN, whether gst_video_converter_frame() will return immediately
2192 * without waiting for the conversion to complete. A subsequent
2193 * gst_video_converter_frame_finish() must be performed to ensure completion of the
2194 * conversion before subsequent use. Default %FALSE
2195 */
2196 const VIDEO_CONVERTER_OPT_ASYNC_TASKS: string;
2197 /**
2198 * #G_TYPE_UINT, the border color to use if #GST_VIDEO_CONVERTER_OPT_FILL_BORDER
2199 * is set to %TRUE. The color is in ARGB format.
2200 * Default 0xff000000
2201 */
2202 const VIDEO_CONVERTER_OPT_BORDER_ARGB: string;
2203 /**
2204 * #GstVideoChromaMode, set the chroma resample mode subsampled
2205 * formats. Default is #GST_VIDEO_CHROMA_MODE_FULL.
2206 */
2207 const VIDEO_CONVERTER_OPT_CHROMA_MODE: string;
2208 /**
2209 * #GstVideoChromaMethod, The resampler method to use for
2210 * chroma resampling. Other options for the resampler can be used, see
2211 * the #GstVideoResampler. Default is #GST_VIDEO_RESAMPLER_METHOD_LINEAR
2212 */
2213 const VIDEO_CONVERTER_OPT_CHROMA_RESAMPLER_METHOD: string;
2214 /**
2215 * #G_TYPE_INT, height in the destination frame, default destination height
2216 */
2217 const VIDEO_CONVERTER_OPT_DEST_HEIGHT: string;
2218 /**
2219 * #G_TYPE_INT, width in the destination frame, default destination width
2220 */
2221 const VIDEO_CONVERTER_OPT_DEST_WIDTH: string;
2222 /**
2223 * #G_TYPE_INT, x position in the destination frame, default 0
2224 */
2225 const VIDEO_CONVERTER_OPT_DEST_X: string;
2226 /**
2227 * #G_TYPE_INT, y position in the destination frame, default 0
2228 */
2229 const VIDEO_CONVERTER_OPT_DEST_Y: string;
2230 /**
2231 * #GstVideoDitherMethod, The dither method to use when
2232 * changing bit depth.
2233 * Default is #GST_VIDEO_DITHER_BAYER.
2234 */
2235 const VIDEO_CONVERTER_OPT_DITHER_METHOD: string;
2236 /**
2237 * #G_TYPE_UINT, The quantization amount to dither to. Components will be
2238 * quantized to multiples of this value.
2239 * Default is 1
2240 */
2241 const VIDEO_CONVERTER_OPT_DITHER_QUANTIZATION: string;
2242 /**
2243 * #G_TYPE_BOOLEAN, if the destination rectangle does not fill the complete
2244 * destination image, render a border with
2245 * #GST_VIDEO_CONVERTER_OPT_BORDER_ARGB. Otherwise the unusded pixels in the
2246 * destination are untouched. Default %TRUE.
2247 */
2248 const VIDEO_CONVERTER_OPT_FILL_BORDER: string;
2249 /**
2250 * #GstVideoGammaMode, set the gamma mode.
2251 * Default is #GST_VIDEO_GAMMA_MODE_NONE.
2252 */
2253 const VIDEO_CONVERTER_OPT_GAMMA_MODE: string;
2254 /**
2255 * #GstVideoMatrixMode, set the color matrix conversion mode for
2256 * converting between Y'PbPr and non-linear RGB (R'G'B').
2257 * Default is #GST_VIDEO_MATRIX_MODE_FULL.
2258 */
2259 const VIDEO_CONVERTER_OPT_MATRIX_MODE: string;
2260 /**
2261 * #GstVideoPrimariesMode, set the primaries conversion mode.
2262 * Default is #GST_VIDEO_PRIMARIES_MODE_NONE.
2263 */
2264 const VIDEO_CONVERTER_OPT_PRIMARIES_MODE: string;
2265 /**
2266 * #GstVideoResamplerMethod, The resampler method to use for
2267 * resampling. Other options for the resampler can be used, see
2268 * the #GstVideoResampler. Default is #GST_VIDEO_RESAMPLER_METHOD_CUBIC
2269 */
2270 const VIDEO_CONVERTER_OPT_RESAMPLER_METHOD: string;
2271 /**
2272 * #G_TYPE_UINT, The number of taps for the resampler.
2273 * Default is 0: let the resampler choose a good value.
2274 */
2275 const VIDEO_CONVERTER_OPT_RESAMPLER_TAPS: string;
2276 /**
2277 * #G_TYPE_INT, source height to convert, default source height
2278 */
2279 const VIDEO_CONVERTER_OPT_SRC_HEIGHT: string;
2280 /**
2281 * #G_TYPE_INT, source width to convert, default source width
2282 */
2283 const VIDEO_CONVERTER_OPT_SRC_WIDTH: string;
2284 /**
2285 * #G_TYPE_INT, source x position to start conversion, default 0
2286 */
2287 const VIDEO_CONVERTER_OPT_SRC_X: string;
2288 /**
2289 * #G_TYPE_INT, source y position to start conversion, default 0
2290 */
2291 const VIDEO_CONVERTER_OPT_SRC_Y: string;
2292 /**
2293 * #G_TYPE_UINT, maximum number of threads to use. Default 1, 0 for the number
2294 * of cores.
2295 */
2296 const VIDEO_CONVERTER_OPT_THREADS: string;
2297 /**
2298 * Default maximum number of errors tolerated before signaling error.
2299 */
2300 const VIDEO_DECODER_MAX_ERRORS: number;
2301 /**
2302 * The name of the templates for the sink pad.
2303 */
2304 const VIDEO_DECODER_SINK_NAME: string;
2305 /**
2306 * The name of the templates for the source pad.
2307 */
2308 const VIDEO_DECODER_SRC_NAME: string;
2309 /**
2310 * Generic caps string for video wit DMABuf(GST_CAPS_FEATURE_MEMORY_DMABUF)
2311 * feature, for use in pad templates. As drm-format is supposed to be defined
2312 * at run-time it's not predefined here.
2313 */
2314 const VIDEO_DMA_DRM_CAPS_MAKE: string;
2315 /**
2316 * The name of the templates for the sink pad.
2317 */
2318 const VIDEO_ENCODER_SINK_NAME: string;
2319 /**
2320 * The name of the templates for the source pad.
2321 */
2322 const VIDEO_ENCODER_SRC_NAME: string;
2323 /**
2324 * List of all video formats, for use in template caps strings.
2325 *
2326 * Formats are sorted by decreasing "quality", using these criteria by priority:
2327 * - number of components
2328 * - depth
2329 * - subsampling factor of the width
2330 * - subsampling factor of the height
2331 * - number of planes
2332 * - native endianness preferred
2333 * - pixel stride
2334 * - poffset
2335 * - prefer non-complex formats
2336 * - prefer YUV formats over RGB ones
2337 * - prefer I420 over YV12
2338 * - format name
2339 */
2340 const VIDEO_FORMATS_ALL: string;
2341 /**
2342 * Declare all video formats as a string.
2343 *
2344 * Formats are sorted by decreasing "quality", using these criteria by priority:
2345 * - number of components
2346 * - depth
2347 * - subsampling factor of the width
2348 * - subsampling factor of the height
2349 * - number of planes
2350 * - native endianness preferred
2351 * - pixel stride
2352 * - poffset
2353 * - prefer non-complex formats
2354 * - prefer YUV formats over RGB ones
2355 * - prefer I420 over YV12
2356 * - format name
2357 */
2358 const VIDEO_FORMATS_ALL_STR: string;
2359 /**
2360 * This is similar to %GST_VIDEO_FORMATS_ALL but includes formats like DMA_DRM
2361 * that do not have a software converter. This should be used for passthrough
2362 * template caps.
2363 */
2364 const VIDEO_FORMATS_ANY: string;
2365 /**
2366 * This is similar to %GST_VIDEO_FORMATS_ALL_STR but includes formats like
2367 * DMA_DRM for which no software converter exists. This should be used for
2368 * passthrough template caps.
2369 */
2370 const VIDEO_FORMATS_ANY_STR: string;
2371 const VIDEO_FPS_RANGE: string;
2372 const VIDEO_MAX_COMPONENTS: number;
2373 const VIDEO_MAX_PLANES: number;
2374 /**
2375 * G_TYPE_DOUBLE, B parameter of the cubic filter. The B
2376 * parameter controls the bluriness. Values between 0.0 and
2377 * 2.0 are accepted. 1/3 is the default.
2378 *
2379 * Below are some values of popular filters:
2380 * B C
2381 * Hermite 0.0 0.0
2382 * Spline 1.0 0.0
2383 * Catmull-Rom 0.0 1/2
2384 * Mitchell 1/3 1/3
2385 * Robidoux 0.3782 0.3109
2386 * Robidoux
2387 * Sharp 0.2620 0.3690
2388 * Robidoux
2389 * Soft 0.6796 0.1602
2390 */
2391 const VIDEO_RESAMPLER_OPT_CUBIC_B: string;
2392 /**
2393 * G_TYPE_DOUBLE, C parameter of the cubic filter. The C
2394 * parameter controls the Keys alpha value. Values between 0.0 and
2395 * 2.0 are accepted. 1/3 is the default.
2396 *
2397 * See #GST_VIDEO_RESAMPLER_OPT_CUBIC_B for some more common values
2398 */
2399 const VIDEO_RESAMPLER_OPT_CUBIC_C: string;
2400 /**
2401 * G_TYPE_DOUBLE, specifies the size of filter envelope for
2402 * `GST_VIDEO_RESAMPLER_METHOD_LANCZOS`. values are clamped between
2403 * 1.0 and 5.0. 2.0 is the default.
2404 */
2405 const VIDEO_RESAMPLER_OPT_ENVELOPE: string;
2406 /**
2407 * G_TYPE_INT, limits the maximum number of taps to use.
2408 * 16 is the default.
2409 */
2410 const VIDEO_RESAMPLER_OPT_MAX_TAPS: string;
2411 /**
2412 * G_TYPE_DOUBLE, specifies sharpening of the filter for
2413 * `GST_VIDEO_RESAMPLER_METHOD_LANCZOS`. values are clamped between
2414 * 0.0 and 1.0. 0.0 is the default.
2415 */
2416 const VIDEO_RESAMPLER_OPT_SHARPEN: string;
2417 /**
2418 * G_TYPE_DOUBLE, specifies sharpness of the filter for
2419 * `GST_VIDEO_RESAMPLER_METHOD_LANCZOS`. values are clamped between
2420 * 0.5 and 1.5. 1.0 is the default.
2421 */
2422 const VIDEO_RESAMPLER_OPT_SHARPNESS: string;
2423 /**
2424 * #GstVideoDitherMethod, The dither method to use for propagating
2425 * quatization errors.
2426 */
2427 const VIDEO_SCALER_OPT_DITHER_METHOD: string;
2428 const VIDEO_SIZE_RANGE: string;
2429 const VIDEO_TILE_TYPE_MASK: number;
2430 const VIDEO_TILE_TYPE_SHIFT: number;
2431 const VIDEO_TILE_X_TILES_MASK: number;
2432 const VIDEO_TILE_Y_TILES_SHIFT: number;
2433 function ancillary_meta_api_get_type(): GObject.GType;
2434 function ancillary_meta_get_info(): Gst.MetaInfo;
2435 /**
2436 * Adds a new #GstAncillaryMeta to the `buffer`. The caller is responsible for setting the appropriate
2437 * fields.
2438 * @param buffer A #GstBuffer
2439 * @returns A new #GstAncillaryMeta, or %NULL if an error happened.
2440 */
2441 function buffer_add_ancillary_meta(buffer: Gst.Buffer): AncillaryMeta;
2442 /**
2443 * Attaches #GstVideoAFDMeta metadata to `buffer` with the given
2444 * parameters.
2445 * @param buffer a #GstBuffer
2446 * @param field 0 for progressive or field 1 and 1 for field 2
2447 * @param spec #GstVideoAFDSpec that applies to AFD value
2448 * @param afd #GstVideoAFDValue AFD enumeration
2449 * @returns the #GstVideoAFDMeta on @buffer.
2450 */
2451 function buffer_add_video_afd_meta(
2452 buffer: Gst.Buffer,
2453 field: number,
2454 spec: VideoAFDSpec | null,
2455 afd: VideoAFDValue | null,
2456 ): VideoAFDMeta;
2457 /**
2458 * Attaches GstVideoAffineTransformationMeta metadata to `buffer` with
2459 * the given parameters.
2460 * @param buffer a #GstBuffer
2461 * @returns the #GstVideoAffineTransformationMeta on @buffer.
2462 */
2463 function buffer_add_video_affine_transformation_meta(buffer: Gst.Buffer): VideoAffineTransformationMeta;
2464 /**
2465 * Attaches #GstVideoBarMeta metadata to `buffer` with the given
2466 * parameters.
2467 * @param buffer a #GstBuffer
2468 * @param field 0 for progressive or field 1 and 1 for field 2
2469 * @param is_letterbox if true then bar data specifies letterbox, otherwise pillarbox
2470 * @param bar_data1 If @is_letterbox is true, then the value specifies the last line of a horizontal letterbox bar area at top of reconstructed frame. Otherwise, it specifies the last horizontal luminance sample of a vertical pillarbox bar area at the left side of the reconstructed frame
2471 * @param bar_data2 If @is_letterbox is true, then the value specifies the first line of a horizontal letterbox bar area at bottom of reconstructed frame. Otherwise, it specifies the first horizontal luminance sample of a vertical pillarbox bar area at the right side of the reconstructed frame.
2472 * @returns the #GstVideoBarMeta on @buffer. See Table 6.11 Bar Data Syntax https://www.atsc.org/wp-content/uploads/2015/03/a_53-Part-4-2009.pdf
2473 */
2474 function buffer_add_video_bar_meta(
2475 buffer: Gst.Buffer,
2476 field: number,
2477 is_letterbox: boolean,
2478 bar_data1: number,
2479 bar_data2: number,
2480 ): VideoBarMeta;
2481 /**
2482 * Attaches #GstVideoCaptionMeta metadata to `buffer` with the given
2483 * parameters.
2484 * @param buffer a #GstBuffer
2485 * @param caption_type The type of Closed Caption to add
2486 * @param data The Closed Caption data
2487 * @returns the #GstVideoCaptionMeta on @buffer.
2488 */
2489 function buffer_add_video_caption_meta(
2490 buffer: Gst.Buffer,
2491 caption_type: VideoCaptionType | null,
2492 data: Uint8Array | string,
2493 ): VideoCaptionMeta;
2494 /**
2495 * Attaches a #GstVideoCodecAlphaMeta metadata to `buffer` with
2496 * the given alpha buffer.
2497 * @param buffer a #GstBuffer
2498 * @param alpha_buffer a #GstBuffer
2499 * @returns the #GstVideoCodecAlphaMeta on @buffer.
2500 */
2501 function buffer_add_video_codec_alpha_meta(buffer: Gst.Buffer, alpha_buffer: Gst.Buffer): VideoCodecAlphaMeta;
2502 /**
2503 * Attaches GstVideoGLTextureUploadMeta metadata to `buffer` with the given
2504 * parameters.
2505 * @param buffer a #GstBuffer
2506 * @param texture_orientation the #GstVideoGLTextureOrientation
2507 * @param n_textures the number of textures
2508 * @param texture_type array of #GstVideoGLTextureType
2509 * @param upload the function to upload the buffer to a specific texture ID
2510 * @param user_data_copy function to copy @user_data
2511 * @param user_data_free function to free @user_data
2512 * @returns the #GstVideoGLTextureUploadMeta on @buffer.
2513 */
2514 function buffer_add_video_gl_texture_upload_meta(
2515 buffer: Gst.Buffer,
2516 texture_orientation: VideoGLTextureOrientation | null,
2517 n_textures: number,
2518 texture_type: VideoGLTextureType | null,
2519 upload: VideoGLTextureUpload,
2520 user_data_copy: GObject.BoxedCopyFunc,
2521 user_data_free: GObject.BoxedFreeFunc,
2522 ): VideoGLTextureUploadMeta;
2523 /**
2524 * Attaches GstVideoMeta metadata to `buffer` with the given parameters and the
2525 * default offsets and strides for `format` and `width` x `height`.
2526 *
2527 * This function calculates the default offsets and strides and then calls
2528 * gst_buffer_add_video_meta_full() with them.
2529 * @param buffer a #GstBuffer
2530 * @param flags #GstVideoFrameFlags
2531 * @param format a #GstVideoFormat
2532 * @param width the width
2533 * @param height the height
2534 * @returns the #GstVideoMeta on @buffer.
2535 */
2536 function buffer_add_video_meta(
2537 buffer: Gst.Buffer,
2538 flags: VideoFrameFlags | null,
2539 format: VideoFormat | null,
2540 width: number,
2541 height: number,
2542 ): VideoMeta;
2543 /**
2544 * Attaches GstVideoMeta metadata to `buffer` with the given parameters.
2545 * @param buffer a #GstBuffer
2546 * @param flags #GstVideoFrameFlags
2547 * @param format a #GstVideoFormat
2548 * @param width the width
2549 * @param height the height
2550 * @param n_planes number of planes
2551 * @param offset offset of each plane
2552 * @param stride stride of each plane
2553 * @returns the #GstVideoMeta on @buffer.
2554 */
2555 function buffer_add_video_meta_full(
2556 buffer: Gst.Buffer,
2557 flags: VideoFrameFlags | null,
2558 format: VideoFormat | null,
2559 width: number,
2560 height: number,
2561 n_planes: number,
2562 offset: number[],
2563 stride: number[],
2564 ): VideoMeta;
2565 /**
2566 * Sets an overlay composition on a buffer. The buffer will obtain its own
2567 * reference to the composition, meaning this function does not take ownership
2568 * of `comp`.
2569 * @param buf a #GstBuffer
2570 * @param comp a #GstVideoOverlayComposition
2571 * @returns a #GstVideoOverlayCompositionMeta
2572 */
2573 function buffer_add_video_overlay_composition_meta(
2574 buf: Gst.Buffer,
2575 comp?: VideoOverlayComposition | null,
2576 ): VideoOverlayCompositionMeta;
2577 /**
2578 * Attaches #GstVideoRegionOfInterestMeta metadata to `buffer` with the given
2579 * parameters.
2580 * @param buffer a #GstBuffer
2581 * @param roi_type Type of the region of interest (e.g. "face")
2582 * @param x X position
2583 * @param y Y position
2584 * @param w width
2585 * @param h height
2586 * @returns the #GstVideoRegionOfInterestMeta on @buffer.
2587 */
2588 function buffer_add_video_region_of_interest_meta(
2589 buffer: Gst.Buffer,
2590 roi_type: string,
2591 x: number,
2592 y: number,
2593 w: number,
2594 h: number,
2595 ): VideoRegionOfInterestMeta;
2596 /**
2597 * Attaches #GstVideoRegionOfInterestMeta metadata to `buffer` with the given
2598 * parameters.
2599 * @param buffer a #GstBuffer
2600 * @param roi_type Type of the region of interest (e.g. "face")
2601 * @param x X position
2602 * @param y Y position
2603 * @param w width
2604 * @param h height
2605 * @returns the #GstVideoRegionOfInterestMeta on @buffer.
2606 */
2607 function buffer_add_video_region_of_interest_meta_id(
2608 buffer: Gst.Buffer,
2609 roi_type: GLib.Quark,
2610 x: number,
2611 y: number,
2612 w: number,
2613 h: number,
2614 ): VideoRegionOfInterestMeta;
2615 /**
2616 * Attaches #GstVideoSEIUserDataUnregisteredMeta metadata to `buffer` with the given
2617 * parameters.
2618 * @param buffer a #GstBuffer
2619 * @param uuid User Data Unregistered UUID
2620 * @param data SEI User Data Unregistered buffer
2621 * @param size size of the data buffer
2622 * @returns the #GstVideoSEIUserDataUnregisteredMeta on @buffer.
2623 */
2624 function buffer_add_video_sei_user_data_unregistered_meta(
2625 buffer: Gst.Buffer,
2626 uuid: number,
2627 data: number | null,
2628 size: number,
2629 ): VideoSEIUserDataUnregisteredMeta;
2630 /**
2631 * Attaches #GstVideoTimeCodeMeta metadata to `buffer` with the given
2632 * parameters.
2633 * @param buffer a #GstBuffer
2634 * @param tc a #GstVideoTimeCode
2635 * @returns the #GstVideoTimeCodeMeta on @buffer, or (since 1.16) %NULL if the timecode was invalid.
2636 */
2637 function buffer_add_video_time_code_meta(buffer: Gst.Buffer, tc: VideoTimeCode): VideoTimeCodeMeta | null;
2638 /**
2639 * Attaches #GstVideoTimeCodeMeta metadata to `buffer` with the given
2640 * parameters.
2641 * @param buffer a #GstBuffer
2642 * @param fps_n framerate numerator
2643 * @param fps_d framerate denominator
2644 * @param latest_daily_jam a #GDateTime for the latest daily jam
2645 * @param flags a #GstVideoTimeCodeFlags
2646 * @param hours hours since the daily jam
2647 * @param minutes minutes since the daily jam
2648 * @param seconds seconds since the daily jam
2649 * @param frames frames since the daily jam
2650 * @param field_count fields since the daily jam
2651 * @returns the #GstVideoTimeCodeMeta on @buffer, or (since 1.16) %NULL if the timecode was invalid.
2652 */
2653 function buffer_add_video_time_code_meta_full(
2654 buffer: Gst.Buffer,
2655 fps_n: number,
2656 fps_d: number,
2657 latest_daily_jam: GLib.DateTime,
2658 flags: VideoTimeCodeFlags | null,
2659 hours: number,
2660 minutes: number,
2661 seconds: number,
2662 frames: number,
2663 field_count: number,
2664 ): VideoTimeCodeMeta | null;
2665 /**
2666 * Find the #GstVideoMeta on `buffer` with the lowest `id`.
2667 *
2668 * Buffers can contain multiple #GstVideoMeta metadata items when dealing with
2669 * multiview buffers.
2670 * @param buffer a #GstBuffer
2671 * @returns the #GstVideoMeta with lowest id (usually 0) or %NULL when there is no such metadata on @buffer.
2672 */
2673 function buffer_get_video_meta(buffer: Gst.Buffer): VideoMeta | null;
2674 /**
2675 * Find the #GstVideoMeta on `buffer` with the given `id`.
2676 *
2677 * Buffers can contain multiple #GstVideoMeta metadata items when dealing with
2678 * multiview buffers.
2679 * @param buffer a #GstBuffer
2680 * @param id a metadata id
2681 * @returns the #GstVideoMeta with @id or %NULL when there is no such metadata on @buffer.
2682 */
2683 function buffer_get_video_meta_id(buffer: Gst.Buffer, id: number): VideoMeta | null;
2684 /**
2685 * Find the #GstVideoRegionOfInterestMeta on `buffer` with the given `id`.
2686 *
2687 * Buffers can contain multiple #GstVideoRegionOfInterestMeta metadata items if
2688 * multiple regions of interests are marked on a frame.
2689 * @param buffer a #GstBuffer
2690 * @param id a metadata id
2691 * @returns the #GstVideoRegionOfInterestMeta with @id or %NULL when there is no such metadata on @buffer.
2692 */
2693 function buffer_get_video_region_of_interest_meta_id(
2694 buffer: Gst.Buffer,
2695 id: number,
2696 ): VideoRegionOfInterestMeta | null;
2697 /**
2698 * Get the video alignment from the bufferpool configuration `config` in
2699 * in `align`
2700 * @param config a #GstStructure
2701 * @param align a #GstVideoAlignment
2702 * @returns %TRUE if @config could be parsed correctly.
2703 */
2704 function buffer_pool_config_get_video_alignment(config: Gst.Structure, align: VideoAlignment): boolean;
2705 /**
2706 * Set the video alignment in `align` to the bufferpool configuration
2707 * `config`
2708 * @param config a #GstStructure
2709 * @param align a #GstVideoAlignment
2710 */
2711 function buffer_pool_config_set_video_alignment(config: Gst.Structure, align: VideoAlignment): void;
2712 /**
2713 * Convenience function to check if the given message is a
2714 * "prepare-window-handle" message from a #GstVideoOverlay.
2715 * @param msg a #GstMessage
2716 * @returns whether @msg is a "prepare-window-handle" message
2717 */
2718 function is_video_overlay_prepare_window_handle_message(msg: Gst.Message): boolean;
2719 /**
2720 * Try to retrieve x and y coordinates of a #GstNavigation event.
2721 * @param event The #GstEvent to inspect.
2722 * @returns A boolean indicating success.
2723 */
2724 function navigation_event_get_coordinates(event: Gst.Event): [boolean, number, number];
2725 /**
2726 * Inspect a #GstEvent and return the #GstNavigationEventType of the event, or
2727 * #GST_NAVIGATION_EVENT_INVALID if the event is not a #GstNavigation event.
2728 * @param event A #GstEvent to inspect.
2729 */
2730 function navigation_event_get_type(event: Gst.Event): NavigationEventType;
2731 /**
2732 * Create a new navigation event given navigation command..
2733 * @param command The navigation command to use.
2734 * @returns a new #GstEvent
2735 */
2736 function navigation_event_new_command(command: NavigationCommand | null): Gst.Event;
2737 /**
2738 * Create a new navigation event for the given key press.
2739 * @param key A string identifying the key press.
2740 * @param state a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt).
2741 * @returns a new #GstEvent
2742 */
2743 function navigation_event_new_key_press(key: string, state: NavigationModifierType | null): Gst.Event;
2744 /**
2745 * Create a new navigation event for the given key release.
2746 * @param key A string identifying the released key.
2747 * @param state a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt).
2748 * @returns a new #GstEvent
2749 */
2750 function navigation_event_new_key_release(key: string, state: NavigationModifierType | null): Gst.Event;
2751 /**
2752 * Create a new navigation event for the given key mouse button press.
2753 * @param button The number of the pressed mouse button.
2754 * @param x The x coordinate of the mouse cursor.
2755 * @param y The y coordinate of the mouse cursor.
2756 * @param state a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt).
2757 * @returns a new #GstEvent
2758 */
2759 function navigation_event_new_mouse_button_press(
2760 button: number,
2761 x: number,
2762 y: number,
2763 state: NavigationModifierType | null,
2764 ): Gst.Event;
2765 /**
2766 * Create a new navigation event for the given key mouse button release.
2767 * @param button The number of the released mouse button.
2768 * @param x The x coordinate of the mouse cursor.
2769 * @param y The y coordinate of the mouse cursor.
2770 * @param state a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt).
2771 * @returns a new #GstEvent
2772 */
2773 function navigation_event_new_mouse_button_release(
2774 button: number,
2775 x: number,
2776 y: number,
2777 state: NavigationModifierType | null,
2778 ): Gst.Event;
2779 /**
2780 * Create a new navigation event for the new mouse location.
2781 * @param x The x coordinate of the mouse cursor.
2782 * @param y The y coordinate of the mouse cursor.
2783 * @param state a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt).
2784 * @returns a new #GstEvent
2785 */
2786 function navigation_event_new_mouse_move(x: number, y: number, state: NavigationModifierType | null): Gst.Event;
2787 /**
2788 * Create a new navigation event for the mouse scroll.
2789 * @param x The x coordinate of the mouse cursor.
2790 * @param y The y coordinate of the mouse cursor.
2791 * @param delta_x The x component of the scroll movement.
2792 * @param delta_y The y component of the scroll movement.
2793 * @param state a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt).
2794 * @returns a new #GstEvent
2795 */
2796 function navigation_event_new_mouse_scroll(
2797 x: number,
2798 y: number,
2799 delta_x: number,
2800 delta_y: number,
2801 state: NavigationModifierType | null,
2802 ): Gst.Event;
2803 /**
2804 * Create a new navigation event signalling that all currently active touch
2805 * points are cancelled and should be discarded. For example, under Wayland
2806 * this event might be sent when a swipe passes the threshold to be recognized
2807 * as a gesture by the compositor.
2808 * @param state a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt).
2809 * @returns a new #GstEvent
2810 */
2811 function navigation_event_new_touch_cancel(state: NavigationModifierType | null): Gst.Event;
2812 /**
2813 * Create a new navigation event for an added touch point.
2814 * @param identifier A number uniquely identifying this touch point. It must stay unique to this touch point at least until an up event is sent for the same identifier, or all touch points are cancelled.
2815 * @param x The x coordinate of the new touch point.
2816 * @param y The y coordinate of the new touch point.
2817 * @param pressure Pressure data of the touch point, from 0.0 to 1.0, or NaN if no data is available.
2818 * @param state a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt).
2819 * @returns a new #GstEvent
2820 */
2821 function navigation_event_new_touch_down(
2822 identifier: number,
2823 x: number,
2824 y: number,
2825 pressure: number,
2826 state: NavigationModifierType | null,
2827 ): Gst.Event;
2828 /**
2829 * Create a new navigation event signalling the end of a touch frame. Touch
2830 * frames signal that all previous down, motion and up events not followed by
2831 * another touch frame event already should be considered simultaneous.
2832 * @param state a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt).
2833 * @returns a new #GstEvent
2834 */
2835 function navigation_event_new_touch_frame(state: NavigationModifierType | null): Gst.Event;
2836 /**
2837 * Create a new navigation event for a moved touch point.
2838 * @param identifier A number uniquely identifying this touch point. It must correlate to exactly one previous touch_start event.
2839 * @param x The x coordinate of the touch point.
2840 * @param y The y coordinate of the touch point.
2841 * @param pressure Pressure data of the touch point, from 0.0 to 1.0, or NaN if no data is available.
2842 * @param state a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt).
2843 * @returns a new #GstEvent
2844 */
2845 function navigation_event_new_touch_motion(
2846 identifier: number,
2847 x: number,
2848 y: number,
2849 pressure: number,
2850 state: NavigationModifierType | null,
2851 ): Gst.Event;
2852 /**
2853 * Create a new navigation event for a removed touch point.
2854 * @param identifier A number uniquely identifying this touch point. It must correlate to exactly one previous down event, but can be reused after sending this event.
2855 * @param x The x coordinate of the touch point.
2856 * @param y The y coordinate of the touch point.
2857 * @param state a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt).
2858 * @returns a new #GstEvent
2859 */
2860 function navigation_event_new_touch_up(
2861 identifier: number,
2862 x: number,
2863 y: number,
2864 state: NavigationModifierType | null,
2865 ): Gst.Event;
2866 /**
2867 * Inspect a #GstNavigation command event and retrieve the enum value of the
2868 * associated command.
2869 * @param event A #GstEvent to inspect.
2870 * @returns TRUE if the navigation command could be extracted, otherwise FALSE.
2871 */
2872 function navigation_event_parse_command(event: Gst.Event): [boolean, NavigationCommand | null];
2873 /**
2874 * Note: Modifier keys (as defined in #GstNavigationModifierType)
2875 * [press](GST_NAVIGATION_EVENT_KEY_PRESS) and
2876 * [release](GST_NAVIGATION_KEY_PRESS) events are generated even if those states are
2877 * present on all other related events
2878 * @param event A #GstEvent to inspect.
2879 */
2880 function navigation_event_parse_key_event(event: Gst.Event): [boolean, string];
2881 function navigation_event_parse_modifier_state(event: Gst.Event, state: NavigationModifierType | null): boolean;
2882 /**
2883 * Retrieve the details of either a #GstNavigation mouse button press event or
2884 * a mouse button release event. Determine which type the event is using
2885 * gst_navigation_event_get_type() to retrieve the #GstNavigationEventType.
2886 * @param event A #GstEvent to inspect.
2887 * @returns TRUE if the button number and both coordinates could be extracted, otherwise FALSE.
2888 */
2889 function navigation_event_parse_mouse_button_event(event: Gst.Event): [boolean, number, number, number];
2890 /**
2891 * Inspect a #GstNavigation mouse movement event and extract the coordinates
2892 * of the event.
2893 * @param event A #GstEvent to inspect.
2894 * @returns TRUE if both coordinates could be extracted, otherwise FALSE.
2895 */
2896 function navigation_event_parse_mouse_move_event(event: Gst.Event): [boolean, number, number];
2897 /**
2898 * Inspect a #GstNavigation mouse scroll event and extract the coordinates
2899 * of the event.
2900 * @param event A #GstEvent to inspect.
2901 * @returns TRUE if all coordinates could be extracted, otherwise FALSE.
2902 */
2903 function navigation_event_parse_mouse_scroll_event(event: Gst.Event): [boolean, number, number, number, number];
2904 /**
2905 * Retrieve the details of a #GstNavigation touch-down or touch-motion event.
2906 * Determine which type the event is using gst_navigation_event_get_type()
2907 * to retrieve the #GstNavigationEventType.
2908 * @param event A #GstEvent to inspect.
2909 * @returns TRUE if all details could be extracted, otherwise FALSE.
2910 */
2911 function navigation_event_parse_touch_event(event: Gst.Event): [boolean, number, number, number, number];
2912 /**
2913 * Retrieve the details of a #GstNavigation touch-up event.
2914 * @param event A #GstEvent to inspect.
2915 * @returns TRUE if all details could be extracted, otherwise FALSE.
2916 */
2917 function navigation_event_parse_touch_up_event(event: Gst.Event): [boolean, number, number, number];
2918 /**
2919 * Try to set x and y coordinates on a #GstNavigation event. The event must
2920 * be writable.
2921 * @param event The #GstEvent to modify.
2922 * @param x The x coordinate to set.
2923 * @param y The y coordinate to set.
2924 * @returns A boolean indicating success.
2925 */
2926 function navigation_event_set_coordinates(event: Gst.Event, x: number, y: number): boolean;
2927 /**
2928 * Check a bus message to see if it is a #GstNavigation event, and return
2929 * the #GstNavigationMessageType identifying the type of the message if so.
2930 * @param message A #GstMessage to inspect.
2931 * @returns The type of the #GstMessage, or #GST_NAVIGATION_MESSAGE_INVALID if the message is not a #GstNavigation notification.
2932 */
2933 function navigation_message_get_type(message: Gst.Message): NavigationMessageType;
2934 /**
2935 * Creates a new #GstNavigation message with type
2936 * #GST_NAVIGATION_MESSAGE_ANGLES_CHANGED for notifying an application
2937 * that the current angle, or current number of angles available in a
2938 * multiangle video has changed.
2939 * @param src A #GstObject to set as source of the new message.
2940 * @param cur_angle The currently selected angle.
2941 * @param n_angles The number of viewing angles now available.
2942 * @returns The new #GstMessage.
2943 */
2944 function navigation_message_new_angles_changed(
2945 src: Gst.Object,
2946 cur_angle: number,
2947 n_angles: number,
2948 ): Gst.Message;
2949 /**
2950 * Creates a new #GstNavigation message with type
2951 * #GST_NAVIGATION_MESSAGE_COMMANDS_CHANGED
2952 * @param src A #GstObject to set as source of the new message.
2953 * @returns The new #GstMessage.
2954 */
2955 function navigation_message_new_commands_changed(src: Gst.Object): Gst.Message;
2956 /**
2957 * Creates a new #GstNavigation message with type
2958 * #GST_NAVIGATION_MESSAGE_EVENT.
2959 * @param src A #GstObject to set as source of the new message.
2960 * @param event A navigation #GstEvent
2961 * @returns The new #GstMessage.
2962 */
2963 function navigation_message_new_event(src: Gst.Object, event: Gst.Event): Gst.Message;
2964 /**
2965 * Creates a new #GstNavigation message with type
2966 * #GST_NAVIGATION_MESSAGE_MOUSE_OVER.
2967 * @param src A #GstObject to set as source of the new message.
2968 * @param active %TRUE if the mouse has entered a clickable area of the display. %FALSE if it over a non-clickable area.
2969 * @returns The new #GstMessage.
2970 */
2971 function navigation_message_new_mouse_over(src: Gst.Object, active: boolean): Gst.Message;
2972 /**
2973 * Parse a #GstNavigation message of type GST_NAVIGATION_MESSAGE_ANGLES_CHANGED
2974 * and extract the `cur_angle` and `n_angles` parameters.
2975 * @param message A #GstMessage to inspect.
2976 * @returns %TRUE if the message could be successfully parsed. %FALSE if not.
2977 */
2978 function navigation_message_parse_angles_changed(message: Gst.Message): [boolean, number, number];
2979 /**
2980 * Parse a #GstNavigation message of type #GST_NAVIGATION_MESSAGE_EVENT
2981 * and extract contained #GstEvent. The caller must unref the `event` when done
2982 * with it.
2983 * @param message A #GstMessage to inspect.
2984 * @returns %TRUE if the message could be successfully parsed. %FALSE if not.
2985 */
2986 function navigation_message_parse_event(message: Gst.Message): [boolean, Gst.Event | null];
2987 /**
2988 * Parse a #GstNavigation message of type #GST_NAVIGATION_MESSAGE_MOUSE_OVER
2989 * and extract the active/inactive flag. If the mouse over event is marked
2990 * active, it indicates that the mouse is over a clickable area.
2991 * @param message A #GstMessage to inspect.
2992 * @returns %TRUE if the message could be successfully parsed. %FALSE if not.
2993 */
2994 function navigation_message_parse_mouse_over(message: Gst.Message): [boolean, boolean];
2995 /**
2996 * Inspect a #GstQuery and return the #GstNavigationQueryType associated with
2997 * it if it is a #GstNavigation query.
2998 * @param query The query to inspect
2999 * @returns The #GstNavigationQueryType of the query, or #GST_NAVIGATION_QUERY_INVALID
3000 */
3001 function navigation_query_get_type(query: Gst.Query): NavigationQueryType;
3002 /**
3003 * Create a new #GstNavigation angles query. When executed, it will
3004 * query the pipeline for the set of currently available angles, which may be
3005 * greater than one in a multiangle video.
3006 * @returns The new query.
3007 */
3008 function navigation_query_new_angles(): Gst.Query;
3009 /**
3010 * Create a new #GstNavigation commands query. When executed, it will
3011 * query the pipeline for the set of currently available commands.
3012 * @returns The new query.
3013 */
3014 function navigation_query_new_commands(): Gst.Query;
3015 /**
3016 * Parse the current angle number in the #GstNavigation angles `query` into the
3017 * #guint pointed to by the `cur_angle` variable, and the number of available
3018 * angles into the #guint pointed to by the `n_angles` variable.
3019 * @param query a #GstQuery
3020 * @returns %TRUE if the query could be successfully parsed. %FALSE if not.
3021 */
3022 function navigation_query_parse_angles(query: Gst.Query): [boolean, number, number];
3023 /**
3024 * Parse the number of commands in the #GstNavigation commands `query`.
3025 * @param query a #GstQuery
3026 * @returns %TRUE if the query could be successfully parsed. %FALSE if not.
3027 */
3028 function navigation_query_parse_commands_length(query: Gst.Query): [boolean, number];
3029 /**
3030 * Parse the #GstNavigation command query and retrieve the `nth` command from
3031 * it into `cmd`. If the list contains less elements than `nth,` `cmd` will be
3032 * set to #GST_NAVIGATION_COMMAND_INVALID.
3033 * @param query a #GstQuery
3034 * @param nth the nth command to retrieve.
3035 * @returns %TRUE if the query could be successfully parsed. %FALSE if not.
3036 */
3037 function navigation_query_parse_commands_nth(
3038 query: Gst.Query,
3039 nth: number,
3040 ): [boolean, NavigationCommand | null];
3041 /**
3042 * Set the #GstNavigation angles query result field in `query`.
3043 * @param query a #GstQuery
3044 * @param cur_angle the current viewing angle to set.
3045 * @param n_angles the number of viewing angles to set.
3046 */
3047 function navigation_query_set_angles(query: Gst.Query, cur_angle: number, n_angles: number): void;
3048 /**
3049 * Set the #GstNavigation command query result fields in `query`. The number
3050 * of commands passed must be equal to `n_commands`.
3051 * @param query a #GstQuery
3052 * @param cmds An array containing @n_cmds @GstNavigationCommand values.
3053 */
3054 function navigation_query_set_commandsv(query: Gst.Query, cmds: NavigationCommand[] | null): void;
3055 function video_afd_meta_api_get_type(): GObject.GType;
3056 function video_afd_meta_get_info(): Gst.MetaInfo;
3057 function video_affine_transformation_meta_api_get_type(): GObject.GType;
3058 function video_affine_transformation_meta_get_info(): Gst.MetaInfo;
3059 function video_bar_meta_api_get_type(): GObject.GType;
3060 function video_bar_meta_get_info(): Gst.MetaInfo;
3061 /**
3062 * Lets you blend the `src` image into the `dest` image
3063 * @param dest The #GstVideoFrame where to blend @src in
3064 * @param src the #GstVideoFrame that we want to blend into
3065 * @param x The x offset in pixel where the @src image should be blended
3066 * @param y the y offset in pixel where the @src image should be blended
3067 * @param global_alpha the global_alpha each per-pixel alpha value is multiplied with
3068 */
3069 function video_blend(dest: VideoFrame, src: VideoFrame, x: number, y: number, global_alpha: number): boolean;
3070 /**
3071 * Scales a buffer containing RGBA (or AYUV) video. This is an internal
3072 * helper function which is used to scale subtitle overlays, and may be
3073 * deprecated in the near future. Use #GstVideoScaler to scale video buffers
3074 * instead.
3075 * @param src the #GstVideoInfo describing the video data in @src_buffer
3076 * @param src_buffer the source buffer containing video pixels to scale
3077 * @param dest_height the height in pixels to scale the video data in @src_buffer to
3078 * @param dest_width the width in pixels to scale the video data in @src_buffer to
3079 */
3080 function video_blend_scale_linear_RGBA(
3081 src: VideoInfo,
3082 src_buffer: Gst.Buffer,
3083 dest_height: number,
3084 dest_width: number,
3085 ): [VideoInfo, Gst.Buffer];
3086 /**
3087 * Given the Pixel Aspect Ratio and size of an input video frame, and the
3088 * pixel aspect ratio of the intended display device, calculates the actual
3089 * display ratio the video will be rendered with.
3090 * @param video_width Width of the video frame in pixels
3091 * @param video_height Height of the video frame in pixels
3092 * @param video_par_n Numerator of the pixel aspect ratio of the input video.
3093 * @param video_par_d Denominator of the pixel aspect ratio of the input video.
3094 * @param display_par_n Numerator of the pixel aspect ratio of the display device
3095 * @param display_par_d Denominator of the pixel aspect ratio of the display device
3096 * @returns A boolean indicating success and a calculated Display Ratio in the dar_n and dar_d parameters. The return value is FALSE in the case of integer overflow or other error.
3097 */
3098 function video_calculate_display_ratio(
3099 video_width: number,
3100 video_height: number,
3101 video_par_n: number,
3102 video_par_d: number,
3103 display_par_n: number,
3104 display_par_d: number,
3105 ): [boolean, number, number];
3106 function video_caption_meta_api_get_type(): GObject.GType;
3107 function video_caption_meta_get_info(): Gst.MetaInfo;
3108 /**
3109 * Parses fixed Closed Caption #GstCaps and returns the corresponding caption
3110 * type, or %GST_VIDEO_CAPTION_TYPE_UNKNOWN.
3111 * @param caps Fixed #GstCaps to parse
3112 * @returns #GstVideoCaptionType.
3113 */
3114 function video_caption_type_from_caps(caps: Gst.Caps): VideoCaptionType;
3115 /**
3116 * Creates new caps corresponding to `type`.
3117 * @param type #GstVideoCaptionType
3118 * @returns new #GstCaps
3119 */
3120 function video_caption_type_to_caps(type: VideoCaptionType | null): Gst.Caps;
3121 /**
3122 * Takes `src` rectangle and position it at the center of `dst` rectangle with or
3123 * without `scaling`. It handles clipping if the `src` rectangle is bigger than
3124 * the `dst` one and `scaling` is set to FALSE.
3125 * @param src a pointer to #GstVideoRectangle describing the source area
3126 * @param dst a pointer to #GstVideoRectangle describing the destination area
3127 * @param scaling a #gboolean indicating if scaling should be applied or not
3128 */
3129 function video_center_rect(src: VideoRectangle, dst: VideoRectangle, scaling: boolean): VideoRectangle;
3130 /**
3131 * Convert `s` to a #GstVideoChromaSite
3132 * @param s a chromasite string
3133 * @returns a #GstVideoChromaSite or %GST_VIDEO_CHROMA_SITE_UNKNOWN when @s does not contain a valid chroma description.
3134 */
3135 function video_chroma_from_string(s: string): VideoChromaSite;
3136 /**
3137 * Perform resampling of `width` chroma pixels in `lines`.
3138 * @param resample a #GstVideoChromaResample
3139 * @param lines pixel lines
3140 * @param width the number of pixels on one line
3141 */
3142 function video_chroma_resample(resample: VideoChromaResample, lines: any | null, width: number): void;
3143 /**
3144 * Convert `s` to a #GstVideoChromaSite
3145 * @param s a chromasite string
3146 * @returns a #GstVideoChromaSite or %GST_VIDEO_CHROMA_SITE_UNKNOWN when @s does not contain a valid chroma-site description.
3147 */
3148 function video_chroma_site_from_string(s: string): VideoChromaSite;
3149 /**
3150 * Converts `site` to its string representation.
3151 * @param site a #GstVideoChromaSite
3152 * @returns a string representation of @site or %NULL if @site contains undefined value or is equal to %GST_VIDEO_CHROMA_SITE_UNKNOWN
3153 */
3154 function video_chroma_site_to_string(site: VideoChromaSite | null): string | null;
3155 /**
3156 * Converts `site` to its string representation.
3157 * @param site a #GstVideoChromaSite
3158 * @returns a string describing @site.
3159 */
3160 function video_chroma_to_string(site: VideoChromaSite | null): string;
3161 function video_codec_alpha_meta_api_get_type(): GObject.GType;
3162 function video_codec_alpha_meta_get_info(): Gst.MetaInfo;
3163 /**
3164 * Converts the `value` to the #GstVideoColorMatrix
3165 * The matrix coefficients (MatrixCoefficients) value is
3166 * defined by "ISO/IEC 23001-8 Section 7.3 Table 4"
3167 * and "ITU-T H.273 Table 4".
3168 * "H.264 Table E-5" and "H.265 Table E.5" share the identical values.
3169 * @param value a ITU-T H.273 matrix coefficients value
3170 * @returns the matched #GstVideoColorMatrix
3171 */
3172 function video_color_matrix_from_iso(value: number): VideoColorMatrix;
3173 /**
3174 * Get the coefficients used to convert between Y'PbPr and R'G'B' using `matrix`.
3175 *
3176 * When:
3177 *
3178 *
3179 * ```
3180 * 0.0 <= [Y',R',G',B'] <= 1.0)
3181 * (-0.5 <= [Pb,Pr] <= 0.5)
3182 * ```
3183 *
3184 *
3185 * the general conversion is given by:
3186 *
3187 *
3188 * ```
3189 * Y' = Kr*R' + (1-Kr-Kb)*G' + Kb*B'
3190 * Pb = (B'-Y')/(2*(1-Kb))
3191 * Pr = (R'-Y')/(2*(1-Kr))
3192 * ```
3193 *
3194 *
3195 * and the other way around:
3196 *
3197 *
3198 * ```
3199 * R' = Y' + Cr*2*(1-Kr)
3200 * G' = Y' - Cb*2*(1-Kb)*Kb/(1-Kr-Kb) - Cr*2*(1-Kr)*Kr/(1-Kr-Kb)
3201 * B' = Y' + Cb*2*(1-Kb)
3202 * ```
3203 *
3204 * @param matrix a #GstVideoColorMatrix
3205 * @returns TRUE if @matrix was a YUV color format and @Kr and @Kb contain valid values.
3206 */
3207 function video_color_matrix_get_Kr_Kb(matrix: VideoColorMatrix | null): [boolean, number, number];
3208 /**
3209 * Converts #GstVideoColorMatrix to the "matrix coefficients"
3210 * (MatrixCoefficients) value defined by "ISO/IEC 23001-8 Section 7.3 Table 4"
3211 * and "ITU-T H.273 Table 4".
3212 * "H.264 Table E-5" and "H.265 Table E.5" share the identical values.
3213 * @param matrix a #GstVideoColorMatrix
3214 * @returns The value of ISO/IEC 23001-8 matrix coefficients.
3215 */
3216 function video_color_matrix_to_iso(matrix: VideoColorMatrix | null): number;
3217 /**
3218 * Converts the `value` to the #GstVideoColorPrimaries
3219 * The colour primaries (ColourPrimaries) value is
3220 * defined by "ISO/IEC 23001-8 Section 7.1 Table 2" and "ITU-T H.273 Table 2".
3221 * "H.264 Table E-3" and "H.265 Table E.3" share the identical values.
3222 * @param value a ITU-T H.273 colour primaries value
3223 * @returns the matched #GstVideoColorPrimaries
3224 */
3225 function video_color_primaries_from_iso(value: number): VideoColorPrimaries;
3226 /**
3227 * Get information about the chromaticity coordinates of `primaries`.
3228 * @param primaries a #GstVideoColorPrimaries
3229 * @returns a #GstVideoColorPrimariesInfo for @primaries.
3230 */
3231 function video_color_primaries_get_info(primaries: VideoColorPrimaries | null): VideoColorPrimariesInfo;
3232 /**
3233 * Checks whether `primaries` and `other` are functionally equivalent
3234 * @param primaries a #GstVideoColorPrimaries
3235 * @param other another #GstVideoColorPrimaries
3236 * @returns TRUE if @primaries and @other can be considered equivalent.
3237 */
3238 function video_color_primaries_is_equivalent(
3239 primaries: VideoColorPrimaries | null,
3240 other: VideoColorPrimaries | null,
3241 ): boolean;
3242 /**
3243 * Converts #GstVideoColorPrimaries to the "colour primaries" (ColourPrimaries)
3244 * value defined by "ISO/IEC 23001-8 Section 7.1 Table 2"
3245 * and "ITU-T H.273 Table 2".
3246 * "H.264 Table E-3" and "H.265 Table E.3" share the identical values.
3247 * @param primaries a #GstVideoColorPrimaries
3248 * @returns The value of ISO/IEC 23001-8 colour primaries.
3249 */
3250 function video_color_primaries_to_iso(primaries: VideoColorPrimaries | null): number;
3251 /**
3252 * Compute the offset and scale values for each component of `info`. For each
3253 * component, (c[i] - offset[i]) / scale[i] will scale the component c[i] to the
3254 * range [0.0 .. 1.0].
3255 *
3256 * The reverse operation (c[i] * scale[i]) + offset[i] can be used to convert
3257 * the component values in range [0.0 .. 1.0] back to their representation in
3258 * `info` and `range`.
3259 * @param range a #GstVideoColorRange
3260 * @param info a #GstVideoFormatInfo
3261 */
3262 function video_color_range_offsets(range: VideoColorRange | null, info: VideoFormatInfo): [number[], number[]];
3263 function video_color_transfer_decode(func: VideoTransferFunction | null, val: number): number;
3264 function video_color_transfer_encode(func: VideoTransferFunction | null, val: number): number;
3265 /**
3266 * Converts a raw video buffer into the specified output caps.
3267 *
3268 * The output caps can be any raw video formats or any image formats (jpeg, png, ...).
3269 *
3270 * The width, height and pixel-aspect-ratio can also be specified in the output caps.
3271 * @param sample a #GstSample
3272 * @param to_caps the #GstCaps to convert to
3273 * @param timeout the maximum amount of time allowed for the processing.
3274 * @returns The converted #GstSample, or %NULL if an error happened (in which case @err will point to the #GError).
3275 */
3276 function video_convert_sample(sample: Gst.Sample, to_caps: Gst.Caps, timeout: Gst.ClockTime): Gst.Sample | null;
3277 /**
3278 * Converts a raw video buffer into the specified output caps.
3279 *
3280 * The output caps can be any raw video formats or any image formats (jpeg, png, ...).
3281 *
3282 * The width, height and pixel-aspect-ratio can also be specified in the output caps.
3283 *
3284 * `callback` will be called after conversion, when an error occurred or if conversion didn't
3285 * finish after `timeout`. `callback` will always be called from the thread default
3286 * %GMainContext, see g_main_context_get_thread_default(). If GLib before 2.22 is used,
3287 * this will always be the global default main context.
3288 *
3289 * `destroy_notify` will be called after the callback was called and `user_data` is not needed
3290 * anymore.
3291 * @param sample a #GstSample
3292 * @param to_caps the #GstCaps to convert to
3293 * @param timeout the maximum amount of time allowed for the processing.
3294 * @param callback %GstVideoConvertSampleCallback that will be called after conversion.
3295 */
3296 function video_convert_sample_async(
3297 sample: Gst.Sample,
3298 to_caps: Gst.Caps,
3299 timeout: Gst.ClockTime,
3300 callback: VideoConvertSampleCallback,
3301 ): void;
3302 function video_crop_meta_api_get_type(): GObject.GType;
3303 function video_crop_meta_get_info(): Gst.MetaInfo;
3304 /**
3305 * Converting the video format into dma drm fourcc. If no
3306 * matching fourcc found, then DRM_FORMAT_INVALID is returned.
3307 * @param format a #GstVideoFormat
3308 * @returns the DRM_FORMAT_* corresponding to the @format.
3309 */
3310 function video_dma_drm_fourcc_from_format(format: VideoFormat | null): number;
3311 /**
3312 * Convert the `format_str` string into the drm fourcc value. The `modifier` is
3313 * also parsed if we want. Please note that the `format_str` should follow the
3314 * fourcc:modifier kind style, such as NV12:0x0100000000000002
3315 * @param format_str a drm format string
3316 * @returns The drm fourcc value or DRM_FORMAT_INVALID if @format_str is invalid.
3317 */
3318 function video_dma_drm_fourcc_from_string(format_str: string): [number, number];
3319 /**
3320 * Converting a dma drm fourcc into the video format. If no matching
3321 * video format found, then GST_VIDEO_FORMAT_UNKNOWN is returned.
3322 * @param fourcc the dma drm value.
3323 * @returns the GST_VIDEO_FORMAT_* corresponding to the @fourcc.
3324 */
3325 function video_dma_drm_fourcc_to_format(fourcc: number): VideoFormat;
3326 /**
3327 * Returns a string containing drm kind format, such as
3328 * NV12:0x0100000000000002, or NULL otherwise.
3329 * @param fourcc a drm fourcc value.
3330 * @param modifier the associated modifier value.
3331 * @returns the drm kind string composed of to @fourcc and @modifier.
3332 */
3333 function video_dma_drm_fourcc_to_string(fourcc: number, modifier: number): string | null;
3334 /**
3335 * Checks if an event is a force key unit event. Returns true for both upstream
3336 * and downstream force key unit events.
3337 * @param event A #GstEvent to check
3338 * @returns %TRUE if the event is a valid force key unit event
3339 */
3340 function video_event_is_force_key_unit(event: Gst.Event): boolean;
3341 /**
3342 * Creates a new downstream force key unit event. A downstream force key unit
3343 * event can be sent down the pipeline to request downstream elements to produce
3344 * a key unit. A downstream force key unit event must also be sent when handling
3345 * an upstream force key unit event to notify downstream that the latter has been
3346 * handled.
3347 *
3348 * To parse an event created by gst_video_event_new_downstream_force_key_unit() use
3349 * gst_video_event_parse_downstream_force_key_unit().
3350 * @param timestamp the timestamp of the buffer that starts a new key unit
3351 * @param stream_time the stream_time of the buffer that starts a new key unit
3352 * @param running_time the running_time of the buffer that starts a new key unit
3353 * @param all_headers %TRUE to produce headers when starting a new key unit
3354 * @param count integer that can be used to number key units
3355 * @returns The new GstEvent
3356 */
3357 function video_event_new_downstream_force_key_unit(
3358 timestamp: Gst.ClockTime,
3359 stream_time: Gst.ClockTime,
3360 running_time: Gst.ClockTime,
3361 all_headers: boolean,
3362 count: number,
3363 ): Gst.Event;
3364 /**
3365 * Creates a new Still Frame event. If `in_still` is %TRUE, then the event
3366 * represents the start of a still frame sequence. If it is %FALSE, then
3367 * the event ends a still frame sequence.
3368 *
3369 * To parse an event created by gst_video_event_new_still_frame() use
3370 * gst_video_event_parse_still_frame().
3371 * @param in_still boolean value for the still-frame state of the event.
3372 * @returns The new GstEvent
3373 */
3374 function video_event_new_still_frame(in_still: boolean): Gst.Event;
3375 /**
3376 * Creates a new upstream force key unit event. An upstream force key unit event
3377 * can be sent to request upstream elements to produce a key unit.
3378 *
3379 * `running_time` can be set to request a new key unit at a specific
3380 * running_time. If set to GST_CLOCK_TIME_NONE, upstream elements will produce a
3381 * new key unit as soon as possible.
3382 *
3383 * To parse an event created by gst_video_event_new_downstream_force_key_unit() use
3384 * gst_video_event_parse_downstream_force_key_unit().
3385 * @param running_time the running_time at which a new key unit should be produced
3386 * @param all_headers %TRUE to produce headers when starting a new key unit
3387 * @param count integer that can be used to number key units
3388 * @returns The new GstEvent
3389 */
3390 function video_event_new_upstream_force_key_unit(
3391 running_time: Gst.ClockTime,
3392 all_headers: boolean,
3393 count: number,
3394 ): Gst.Event;
3395 /**
3396 * Get timestamp, stream-time, running-time, all-headers and count in the force
3397 * key unit event. See gst_video_event_new_downstream_force_key_unit() for a
3398 * full description of the downstream force key unit event.
3399 *
3400 * `running_time` will be adjusted for any pad offsets of pads it was passing through.
3401 * @param event A #GstEvent to parse
3402 * @returns %TRUE if the event is a valid downstream force key unit event.
3403 */
3404 function video_event_parse_downstream_force_key_unit(
3405 event: Gst.Event,
3406 ): [boolean, Gst.ClockTime, Gst.ClockTime, Gst.ClockTime, boolean, number];
3407 /**
3408 * Parse a #GstEvent, identify if it is a Still Frame event, and
3409 * return the still-frame state from the event if it is.
3410 * If the event represents the start of a still frame, the in_still
3411 * variable will be set to TRUE, otherwise FALSE. It is OK to pass NULL for the
3412 * in_still variable order to just check whether the event is a valid still-frame
3413 * event.
3414 *
3415 * Create a still frame event using gst_video_event_new_still_frame()
3416 * @param event A #GstEvent to parse
3417 * @returns %TRUE if the event is a valid still-frame event. %FALSE if not
3418 */
3419 function video_event_parse_still_frame(event: Gst.Event): [boolean, boolean];
3420 /**
3421 * Get running-time, all-headers and count in the force key unit event. See
3422 * gst_video_event_new_upstream_force_key_unit() for a full description of the
3423 * upstream force key unit event.
3424 *
3425 * Create an upstream force key unit event using gst_video_event_new_upstream_force_key_unit()
3426 *
3427 * `running_time` will be adjusted for any pad offsets of pads it was passing through.
3428 * @param event A #GstEvent to parse
3429 * @returns %TRUE if the event is a valid upstream force-key-unit event. %FALSE if not
3430 */
3431 function video_event_parse_upstream_force_key_unit(event: Gst.Event): [boolean, Gst.ClockTime, boolean, number];
3432 /**
3433 * Convert `order` to a #GstVideoFieldOrder
3434 * @param order a field order
3435 * @returns the #GstVideoFieldOrder of @order or #GST_VIDEO_FIELD_ORDER_UNKNOWN when @order is not a valid string representation for a #GstVideoFieldOrder.
3436 */
3437 function video_field_order_from_string(order: string): VideoFieldOrder;
3438 /**
3439 * Convert `order` to its string representation.
3440 * @param order a #GstVideoFieldOrder
3441 * @returns @order as a string.
3442 */
3443 function video_field_order_to_string(order: VideoFieldOrder | null): string;
3444 /**
3445 * Converts a FOURCC value into the corresponding #GstVideoFormat.
3446 * If the FOURCC cannot be represented by #GstVideoFormat,
3447 * #GST_VIDEO_FORMAT_UNKNOWN is returned.
3448 * @param fourcc a FOURCC value representing raw YUV video
3449 * @returns the #GstVideoFormat describing the FOURCC value
3450 */
3451 function video_format_from_fourcc(fourcc: number): VideoFormat;
3452 /**
3453 * Find the #GstVideoFormat for the given parameters.
3454 * @param depth the amount of bits used for a pixel
3455 * @param bpp the amount of bits used to store a pixel. This value is bigger than @depth
3456 * @param endianness the endianness of the masks, #G_LITTLE_ENDIAN or #G_BIG_ENDIAN
3457 * @param red_mask the red mask
3458 * @param green_mask the green mask
3459 * @param blue_mask the blue mask
3460 * @param alpha_mask the alpha mask, or 0 if no alpha mask
3461 * @returns a #GstVideoFormat or GST_VIDEO_FORMAT_UNKNOWN when the parameters to not specify a known format.
3462 */
3463 function video_format_from_masks(
3464 depth: number,
3465 bpp: number,
3466 endianness: number,
3467 red_mask: number,
3468 green_mask: number,
3469 blue_mask: number,
3470 alpha_mask: number,
3471 ): VideoFormat;
3472 /**
3473 * Convert the `format` string to its #GstVideoFormat.
3474 * @param format a format string
3475 * @returns the #GstVideoFormat for @format or GST_VIDEO_FORMAT_UNKNOWN when the string is not a known format.
3476 */
3477 function video_format_from_string(format: string): VideoFormat;
3478 /**
3479 * Get the #GstVideoFormatInfo for `format`
3480 * @param format a #GstVideoFormat
3481 * @returns The #GstVideoFormatInfo for @format.
3482 */
3483 function video_format_get_info(format: VideoFormat | null): VideoFormatInfo;
3484 /**
3485 * Get the default palette of `format`. This the palette used in the pack
3486 * function for paletted formats.
3487 * @param format a #GstVideoFormat
3488 * @returns the default palette of @format or %NULL when @format does not have a palette.
3489 */
3490 function video_format_get_palette(format: VideoFormat | null): [any | null, number];
3491 /**
3492 * Converts a #GstVideoFormat value into the corresponding FOURCC. Only
3493 * a few YUV formats have corresponding FOURCC values. If `format` has
3494 * no corresponding FOURCC value, 0 is returned.
3495 * @param format a #GstVideoFormat video format
3496 * @returns the FOURCC corresponding to @format
3497 */
3498 function video_format_to_fourcc(format: VideoFormat | null): number;
3499 /**
3500 * Returns a string containing a descriptive name for
3501 * the #GstVideoFormat if there is one, or NULL otherwise.
3502 * @param format a #GstVideoFormat video format
3503 * @returns the name corresponding to @format
3504 */
3505 function video_format_to_string(format: VideoFormat | null): string;
3506 /**
3507 * Return all the raw video formats supported by GStreamer including
3508 * special opaque formats such as %GST_VIDEO_FORMAT_DMA_DRM for which
3509 * no software conversion exists. This should be use for passthrough
3510 * template cpas.
3511 * @returns an array of #GstVideoFormat
3512 */
3513 function video_formats_any(): VideoFormat[];
3514 /**
3515 * Return all the raw video formats supported by GStreamer.
3516 * @returns an array of #GstVideoFormat
3517 */
3518 function video_formats_raw(): VideoFormat[];
3519 /**
3520 * Use `info` and `buffer` to fill in the values of `frame`. `frame` is usually
3521 * allocated on the stack, and you will pass the address to the #GstVideoFrame
3522 * structure allocated on the stack; gst_video_frame_map() will then fill in
3523 * the structures with the various video-specific information you need to access
3524 * the pixels of the video buffer. You can then use accessor macros such as
3525 * GST_VIDEO_FRAME_COMP_DATA(), GST_VIDEO_FRAME_PLANE_DATA(),
3526 * GST_VIDEO_FRAME_COMP_STRIDE(), GST_VIDEO_FRAME_PLANE_STRIDE() etc.
3527 * to get to the pixels.
3528 *
3529 *
3530 * ```c
3531 * GstVideoFrame vframe;
3532 * ...
3533 * // set RGB pixels to black one at a time
3534 * if (gst_video_frame_map (&vframe, video_info, video_buffer, GST_MAP_WRITE)) {
3535 * guint8 *pixels = GST_VIDEO_FRAME_PLANE_DATA (vframe, 0);
3536 * guint stride = GST_VIDEO_FRAME_PLANE_STRIDE (vframe, 0);
3537 * guint pixel_stride = GST_VIDEO_FRAME_COMP_PSTRIDE (vframe, 0);
3538 *
3539 * for (h = 0; h < height; ++h) {
3540 * for (w = 0; w < width; ++w) {
3541 * guint8 *pixel = pixels + h * stride + w * pixel_stride;
3542 *
3543 * memset (pixel, 0, pixel_stride);
3544 * }
3545 * }
3546 *
3547 * gst_video_frame_unmap (&vframe);
3548 * }
3549 * ...
3550 * ```
3551 *
3552 *
3553 * All video planes of `buffer` will be mapped and the pointers will be set in
3554 * `frame->`data.
3555 *
3556 * The purpose of this function is to make it easy for you to get to the video
3557 * pixels in a generic way, without you having to worry too much about details
3558 * such as whether the video data is allocated in one contiguous memory chunk
3559 * or multiple memory chunks (e.g. one for each plane); or if custom strides
3560 * and custom plane offsets are used or not (as signalled by GstVideoMeta on
3561 * each buffer). This function will just fill the #GstVideoFrame structure
3562 * with the right values and if you use the accessor macros everything will
3563 * just work and you can access the data easily. It also maps the underlying
3564 * memory chunks for you.
3565 * @param info a #GstVideoInfo
3566 * @param buffer the buffer to map
3567 * @param flags #GstMapFlags
3568 * @returns %TRUE on success.
3569 */
3570 function video_frame_map(
3571 info: VideoInfo,
3572 buffer: Gst.Buffer,
3573 flags: Gst.MapFlags | null,
3574 ): [boolean, VideoFrame];
3575 /**
3576 * Use `info` and `buffer` to fill in the values of `frame` with the video frame
3577 * information of frame `id`.
3578 *
3579 * When `id` is -1, the default frame is mapped. When `id` != -1, this function
3580 * will return %FALSE when there is no GstVideoMeta with that id.
3581 *
3582 * All video planes of `buffer` will be mapped and the pointers will be set in
3583 * `frame->`data.
3584 * @param info a #GstVideoInfo
3585 * @param buffer the buffer to map
3586 * @param id the frame id to map
3587 * @param flags #GstMapFlags
3588 * @returns %TRUE on success.
3589 */
3590 function video_frame_map_id(
3591 info: VideoInfo,
3592 buffer: Gst.Buffer,
3593 id: number,
3594 flags: Gst.MapFlags | null,
3595 ): [boolean, VideoFrame];
3596 function video_gl_texture_upload_meta_api_get_type(): GObject.GType;
3597 function video_gl_texture_upload_meta_get_info(): Gst.MetaInfo;
3598 /**
3599 * Given the nominal duration of one video frame,
3600 * this function will check some standard framerates for
3601 * a close match (within 0.1%) and return one if possible,
3602 *
3603 * It will calculate an arbitrary framerate if no close
3604 * match was found, and return %FALSE.
3605 *
3606 * It returns %FALSE if a duration of 0 is passed.
3607 * @param duration Nominal duration of one frame
3608 * @returns %TRUE if a close "standard" framerate was recognised, and %FALSE otherwise.
3609 */
3610 function video_guess_framerate(duration: Gst.ClockTime): [boolean, number, number];
3611 /**
3612 * Parse `caps` and update `info`. Please note that the `caps` should be
3613 * a dma drm caps. The gst_video_is_dma_drm_caps() can be used to verify
3614 * it before calling this function.
3615 * @param caps a #GstCaps
3616 * @returns TRUE if @caps could be parsed
3617 */
3618 function video_info_dma_drm_from_caps(caps: Gst.Caps): [boolean, VideoInfoDmaDrm];
3619 /**
3620 * Fills `drm_info` if `info'`s format has a valid drm format and `modifier` is also
3621 * valid
3622 * @param info a #GstVideoInfo
3623 * @param modifier the associated modifier value.
3624 * @returns %TRUE if @drm_info is filled correctly.
3625 */
3626 function video_info_dma_drm_from_video_info(info: VideoInfo, modifier: number): [boolean, VideoInfoDmaDrm];
3627 /**
3628 * Initialize `drm_info` with default values.
3629 */
3630 function video_info_dma_drm_init(): VideoInfoDmaDrm;
3631 /**
3632 * Parse `caps` and update `info`.
3633 * @param caps a #GstCaps
3634 * @returns TRUE if @caps could be parsed
3635 */
3636 function video_info_from_caps(caps: Gst.Caps): [boolean, VideoInfo];
3637 /**
3638 * Initialize `info` with default values.
3639 */
3640 function video_info_init(): VideoInfo;
3641 /**
3642 * Convert `mode` to a #GstVideoInterlaceMode
3643 * @param mode a mode
3644 * @returns the #GstVideoInterlaceMode of @mode or #GST_VIDEO_INTERLACE_MODE_PROGRESSIVE when @mode is not a valid string representation for a #GstVideoInterlaceMode.
3645 */
3646 function video_interlace_mode_from_string(mode: string): VideoInterlaceMode;
3647 /**
3648 * Convert `mode` to its string representation.
3649 * @param mode a #GstVideoInterlaceMode
3650 * @returns @mode as a string.
3651 */
3652 function video_interlace_mode_to_string(mode: VideoInterlaceMode | null): string;
3653 /**
3654 * Given a frame's dimensions and pixel aspect ratio, this function will
3655 * calculate the frame's aspect ratio and compare it against a set of
3656 * common well-known "standard" aspect ratios.
3657 * @param width Width of the video frame
3658 * @param height Height of the video frame
3659 * @param par_n Pixel aspect ratio numerator
3660 * @param par_d Pixel aspect ratio denominator
3661 * @returns %TRUE if a known "standard" aspect ratio was recognised, and %FALSE otherwise.
3662 */
3663 function video_is_common_aspect_ratio(width: number, height: number, par_n: number, par_d: number): boolean;
3664 /**
3665 * Check whether the `caps` is a dma drm kind caps. Please note that
3666 * the caps should be fixed.
3667 * @param caps a #GstCaps
3668 * @returns %TRUE if the caps is a dma drm caps.
3669 */
3670 function video_is_dma_drm_caps(caps: Gst.Caps): boolean;
3671 /**
3672 * Return a generic raw video caps for formats defined in `formats`.
3673 * If `formats` is %NULL returns a caps for all the supported raw video formats,
3674 * see gst_video_formats_raw().
3675 * @param formats an array of raw #GstVideoFormat, or %NULL
3676 * @returns a video @GstCaps
3677 */
3678 function video_make_raw_caps(formats?: VideoFormat[] | null): Gst.Caps;
3679 /**
3680 * Return a generic raw video caps for formats defined in `formats` with features
3681 * `features`.
3682 * If `formats` is %NULL returns a caps for all the supported video formats,
3683 * see gst_video_formats_raw().
3684 * @param formats an array of raw #GstVideoFormat, or %NULL
3685 * @param features the #GstCapsFeatures to set on the caps
3686 * @returns a video @GstCaps
3687 */
3688 function video_make_raw_caps_with_features(
3689 formats?: VideoFormat[] | null,
3690 features?: Gst.CapsFeatures | null,
3691 ): Gst.Caps;
3692 /**
3693 * Extract #GstVideoMasteringDisplayInfo from `mastering`
3694 * @param mastering a #GstStructure representing #GstVideoMasteringDisplayInfo
3695 * @returns %TRUE if @minfo was filled with @mastering
3696 */
3697 function video_mastering_display_info_from_string(mastering: string): [boolean, VideoMasteringDisplayInfo];
3698 function video_meta_api_get_type(): GObject.GType;
3699 function video_meta_get_info(): Gst.MetaInfo;
3700 /**
3701 * Get the #GQuark for the "gst-video-scale" metadata transform operation.
3702 * @returns a #GQuark
3703 */
3704 function video_meta_transform_scale_get_quark(): GLib.Quark;
3705 function video_multiview_get_doubled_height_modes(): unknown;
3706 function video_multiview_get_doubled_size_modes(): unknown;
3707 function video_multiview_get_doubled_width_modes(): unknown;
3708 function video_multiview_get_mono_modes(): unknown;
3709 function video_multiview_get_unpacked_modes(): unknown;
3710 function video_multiview_guess_half_aspect(
3711 mv_mode: VideoMultiviewMode | null,
3712 width: number,
3713 height: number,
3714 par_n: number,
3715 par_d: number,
3716 ): boolean;
3717 function video_multiview_mode_from_caps_string(caps_mview_mode: string): VideoMultiviewMode;
3718 /**
3719 * Given a #GstVideoMultiviewMode returns the multiview-mode caps string
3720 * for insertion into a caps structure
3721 * @param mview_mode A #GstVideoMultiviewMode value
3722 * @returns The caps string representation of the mode, or NULL if invalid.
3723 */
3724 function video_multiview_mode_to_caps_string(mview_mode: VideoMultiviewMode | null): string | null;
3725 /**
3726 * Utility function that transforms the width/height/PAR
3727 * and multiview mode and flags of a #GstVideoInfo into
3728 * the requested mode.
3729 * @param info A #GstVideoInfo structure to operate on
3730 * @param out_mview_mode A #GstVideoMultiviewMode value
3731 * @param out_mview_flags A set of #GstVideoMultiviewFlags
3732 */
3733 function video_multiview_video_info_change_mode(
3734 info: VideoInfo,
3735 out_mview_mode: VideoMultiviewMode | null,
3736 out_mview_flags: VideoMultiviewFlags | null,
3737 ): void;
3738 /**
3739 * Parses the "image-orientation" tag and transforms it into the
3740 * #GstVideoOrientationMethod enum.
3741 * @param taglist A #GstTagList
3742 * @returns TRUE if there was a valid "image-orientation" tag in the taglist.
3743 */
3744 function video_orientation_from_tag(taglist: Gst.TagList): [boolean, VideoOrientationMethod];
3745 function video_overlay_composition_meta_api_get_type(): GObject.GType;
3746 function video_overlay_composition_meta_get_info(): Gst.MetaInfo;
3747 /**
3748 * This helper shall be used by classes implementing the #GstVideoOverlay
3749 * interface that want the render rectangle to be controllable using
3750 * properties. This helper will install "render-rectangle" property into the
3751 * class.
3752 * @param oclass The class on which the properties will be installed
3753 * @param last_prop_id The first free property ID to use
3754 */
3755 function video_overlay_install_properties(oclass: typeof GObject.Object, last_prop_id: number): void;
3756 /**
3757 * This helper shall be used by classes implementing the #GstVideoOverlay
3758 * interface that want the render rectangle to be controllable using
3759 * properties. This helper will parse and set the render rectangle calling
3760 * gst_video_overlay_set_render_rectangle().
3761 * @param object The instance on which the property is set
3762 * @param last_prop_id The highest property ID.
3763 * @param property_id The property ID
3764 * @param value The #GValue to be set
3765 * @returns %TRUE if the @property_id matches the GstVideoOverlay property
3766 */
3767 function video_overlay_set_property(
3768 object: GObject.Object,
3769 last_prop_id: number,
3770 property_id: number,
3771 value: GObject.Value | any,
3772 ): boolean;
3773 function video_region_of_interest_meta_api_get_type(): GObject.GType;
3774 function video_region_of_interest_meta_get_info(): Gst.MetaInfo;
3775 function video_sei_user_data_unregistered_meta_api_get_type(): GObject.GType;
3776 function video_sei_user_data_unregistered_meta_get_info(): Gst.MetaInfo;
3777 /**
3778 * Parses and returns the Precision Time Stamp (ST 0604) from the SEI User Data Unregistered buffer
3779 * @param user_data a #GstVideoSEIUserDataUnregisteredMeta
3780 * @returns True if data is a Precision Time Stamp and it was parsed correctly
3781 */
3782 function video_sei_user_data_unregistered_parse_precision_time_stamp(
3783 user_data: VideoSEIUserDataUnregisteredMeta,
3784 ): [boolean, number, number];
3785 /**
3786 * Get the tile index of the tile at coordinates `x` and `y` in the tiled
3787 * image of `x_tiles` by `y_tiles`.
3788 *
3789 * Use this method when `mode` is of type %GST_VIDEO_TILE_TYPE_INDEXED.
3790 * @param mode a #GstVideoTileMode
3791 * @param x x coordinate
3792 * @param y y coordinate
3793 * @param x_tiles number of horizintal tiles
3794 * @param y_tiles number of vertical tiles
3795 * @returns the index of the tile at @x and @y in the tiled image of @x_tiles by @y_tiles.
3796 */
3797 function video_tile_get_index(
3798 mode: VideoTileMode | null,
3799 x: number,
3800 y: number,
3801 x_tiles: number,
3802 y_tiles: number,
3803 ): number;
3804 function video_time_code_meta_api_get_type(): GObject.GType;
3805 function video_time_code_meta_get_info(): Gst.MetaInfo;
3806 /**
3807 * Convert `val` to its gamma decoded value. This is the inverse operation of
3808 * gst_video_color_transfer_encode().
3809 *
3810 * For a non-linear value L' in the range [0..1], conversion to the linear
3811 * L is in general performed with a power function like:
3812 *
3813 *
3814 * ```
3815 * L = L' ^ gamma
3816 * ```
3817 *
3818 *
3819 * Depending on `func,` different formulas might be applied. Some formulas
3820 * encode a linear segment in the lower range.
3821 * @param func a #GstVideoTransferFunction
3822 * @param val a value
3823 * @returns the gamma decoded value of @val
3824 */
3825 function video_transfer_function_decode(func: VideoTransferFunction | null, val: number): number;
3826 /**
3827 * Convert `val` to its gamma encoded value.
3828 *
3829 * For a linear value L in the range [0..1], conversion to the non-linear
3830 * (gamma encoded) L' is in general performed with a power function like:
3831 *
3832 *
3833 * ```
3834 * L' = L ^ (1 / gamma)
3835 * ```
3836 *
3837 *
3838 * Depending on `func,` different formulas might be applied. Some formulas
3839 * encode a linear segment in the lower range.
3840 * @param func a #GstVideoTransferFunction
3841 * @param val a value
3842 * @returns the gamma encoded value of @val
3843 */
3844 function video_transfer_function_encode(func: VideoTransferFunction | null, val: number): number;
3845 /**
3846 * Converts the `value` to the #GstVideoTransferFunction
3847 * The transfer characteristics (TransferCharacteristics) value is
3848 * defined by "ISO/IEC 23001-8 Section 7.2 Table 3"
3849 * and "ITU-T H.273 Table 3".
3850 * "H.264 Table E-4" and "H.265 Table E.4" share the identical values.
3851 * @param value a ITU-T H.273 transfer characteristics value
3852 * @returns the matched #GstVideoTransferFunction
3853 */
3854 function video_transfer_function_from_iso(value: number): VideoTransferFunction;
3855 /**
3856 * Returns whether `from_func` and `to_func` are equivalent. There are cases
3857 * (e.g. BT601, BT709, and BT2020_10) where several functions are functionally
3858 * identical. In these cases, when doing conversion, we should consider them
3859 * as equivalent. Also, BT2020_12 is the same as the aforementioned three for
3860 * less than 12 bits per pixel.
3861 * @param from_func #GstVideoTransferFunction to convert from
3862 * @param from_bpp bits per pixel to convert from
3863 * @param to_func #GstVideoTransferFunction to convert into
3864 * @param to_bpp bits per pixel to convert into
3865 * @returns TRUE if @from_func and @to_func can be considered equivalent.
3866 */
3867 function video_transfer_function_is_equivalent(
3868 from_func: VideoTransferFunction | null,
3869 from_bpp: number,
3870 to_func: VideoTransferFunction | null,
3871 to_bpp: number,
3872 ): boolean;
3873 /**
3874 * Converts #GstVideoTransferFunction to the "transfer characteristics"
3875 * (TransferCharacteristics) value defined by "ISO/IEC 23001-8 Section 7.2 Table 3"
3876 * and "ITU-T H.273 Table 3".
3877 * "H.264 Table E-4" and "H.265 Table E.4" share the identical values.
3878 * @param func a #GstVideoTransferFunction
3879 * @returns The value of ISO/IEC 23001-8 transfer characteristics.
3880 */
3881 function video_transfer_function_to_iso(func: VideoTransferFunction | null): number;
3882 interface VideoAffineTransformationGetMatrix {
3883 (meta: VideoAffineTransformationMeta, matrix: number): boolean;
3884 }
3885 interface VideoConvertSampleCallback {
3886 (sample: Gst.Sample, error: GLib.Error): void;
3887 }
3888 interface VideoFormatPack {
3889 (
3890 info: VideoFormatInfo,
3891 flags: VideoPackFlags,
3892 src: any | null,
3893 sstride: number,
3894 data: any | null,
3895 stride: number,
3896 chroma_site: VideoChromaSite,
3897 y: number,
3898 width: number,
3899 ): void;
3900 }
3901 interface VideoFormatUnpack {
3902 (
3903 info: VideoFormatInfo,
3904 flags: VideoPackFlags,
3905 dest: any | null,
3906 data: any | null,
3907 stride: number,
3908 x: number,
3909 y: number,
3910 width: number,
3911 ): void;
3912 }
3913 interface VideoGLTextureUpload {
3914 (meta: VideoGLTextureUploadMeta, texture_id: number): boolean;
3915 }
3916 /**
3917 * Flags to indicate the state of modifier keys and mouse buttons
3918 * in events.
3919 *
3920 * Typical modifier keys are Shift, Control, Meta, Super, Hyper, Alt, Compose,
3921 * Apple, CapsLock or ShiftLock.
3922 */
3923
3924 /**
3925 * Flags to indicate the state of modifier keys and mouse buttons
3926 * in events.
3927 *
3928 * Typical modifier keys are Shift, Control, Meta, Super, Hyper, Alt, Compose,
3929 * Apple, CapsLock or ShiftLock.
3930 */
3931 export namespace NavigationModifierType {
3932 export const $gtype: GObject.GType<NavigationModifierType>;
3933 }
3934
3935 enum NavigationModifierType {
3936 NONE,
3937 /**
3938 * the Shift key.
3939 */
3940 SHIFT_MASK,
3941 LOCK_MASK,
3942 /**
3943 * the Control key.
3944 */
3945 CONTROL_MASK,
3946 /**
3947 * the third modifier key
3948 */
3949 MOD1_MASK,
3950 /**
3951 * the fourth modifier key
3952 */
3953 MOD2_MASK,
3954 /**
3955 * the fifth modifier key
3956 */
3957 MOD3_MASK,
3958 /**
3959 * the sixth modifier key
3960 */
3961 MOD4_MASK,
3962 /**
3963 * the seventh modifier key
3964 */
3965 MOD5_MASK,
3966 /**
3967 * the first mouse button (usually the left button).
3968 */
3969 BUTTON1_MASK,
3970 /**
3971 * the second mouse button (usually the right button).
3972 */
3973 BUTTON2_MASK,
3974 /**
3975 * the third mouse button (usually the mouse wheel button or middle button).
3976 */
3977 BUTTON3_MASK,
3978 /**
3979 * the fourth mouse button (typically the "Back" button).
3980 */
3981 BUTTON4_MASK,
3982 /**
3983 * the fifth mouse button (typically the "forward" button).
3984 */
3985 BUTTON5_MASK,
3986 /**
3987 * the Super modifier
3988 */
3989 SUPER_MASK,
3990 /**
3991 * the Hyper modifier
3992 */
3993 HYPER_MASK,
3994 /**
3995 * the Meta modifier
3996 */
3997 META_MASK,
3998 /**
3999 * A mask covering all entries in #GdkModifierType.
4000 */
4001 MASK,
4002 }
4003 /**
4004 * Additional video buffer flags. These flags can potentially be used on any
4005 * buffers carrying closed caption data, or video data - even encoded data.
4006 *
4007 * Note that these are only valid for #GstCaps of type: video/... and caption/...
4008 * They can conflict with other extended buffer flags.
4009 */
4010
4011 /**
4012 * Additional video buffer flags. These flags can potentially be used on any
4013 * buffers carrying closed caption data, or video data - even encoded data.
4014 *
4015 * Note that these are only valid for #GstCaps of type: video/... and caption/...
4016 * They can conflict with other extended buffer flags.
4017 */
4018 export namespace VideoBufferFlags {
4019 export const $gtype: GObject.GType<VideoBufferFlags>;
4020 }
4021
4022 enum VideoBufferFlags {
4023 /**
4024 * If the #GstBuffer is interlaced. In mixed
4025 * interlace-mode, this flags specifies if the frame is
4026 * interlaced or progressive.
4027 */
4028 INTERLACED,
4029 /**
4030 * If the #GstBuffer is interlaced, then the first field
4031 * in the video frame is the top field. If unset, the
4032 * bottom field is first.
4033 */
4034 TFF,
4035 /**
4036 * If the #GstBuffer is interlaced, then the first field
4037 * (as defined by the %GST_VIDEO_BUFFER_FLAG_TFF flag setting)
4038 * is repeated.
4039 */
4040 RFF,
4041 /**
4042 * If the #GstBuffer is interlaced, then only the
4043 * first field (as defined by the %GST_VIDEO_BUFFER_FLAG_TFF
4044 * flag setting) is to be displayed (Since: 1.16).
4045 */
4046 ONEFIELD,
4047 /**
4048 * The #GstBuffer contains one or more specific views,
4049 * such as left or right eye view. This flags is set on
4050 * any buffer that contains non-mono content - even for
4051 * streams that contain only a single viewpoint. In mixed
4052 * mono / non-mono streams, the absence of the flag marks
4053 * mono buffers.
4054 */
4055 MULTIPLE_VIEW,
4056 /**
4057 * When conveying stereo/multiview content with
4058 * frame-by-frame methods, this flag marks the first buffer
4059 * in a bundle of frames that belong together.
4060 */
4061 FIRST_IN_BUNDLE,
4062 /**
4063 * The video frame has the top field only. This is the
4064 * same as GST_VIDEO_BUFFER_FLAG_TFF |
4065 * GST_VIDEO_BUFFER_FLAG_ONEFIELD (Since: 1.16).
4066 * Use GST_VIDEO_BUFFER_IS_TOP_FIELD() to check for this flag.
4067 */
4068 TOP_FIELD,
4069 /**
4070 * The video frame has the bottom field only. This is
4071 * the same as GST_VIDEO_BUFFER_FLAG_ONEFIELD
4072 * (GST_VIDEO_BUFFER_FLAG_TFF flag unset) (Since: 1.16).
4073 * Use GST_VIDEO_BUFFER_IS_BOTTOM_FIELD() to check for this flag.
4074 */
4075 BOTTOM_FIELD,
4076 /**
4077 * The #GstBuffer contains the end of a video field or frame
4078 * boundary such as the last subframe or packet (Since: 1.18).
4079 */
4080 MARKER,
4081 /**
4082 * Offset to define more flags
4083 */
4084 LAST,
4085 }
4086 /**
4087 * Extra flags that influence the result from gst_video_chroma_resample_new().
4088 */
4089
4090 /**
4091 * Extra flags that influence the result from gst_video_chroma_resample_new().
4092 */
4093 export namespace VideoChromaFlags {
4094 export const $gtype: GObject.GType<VideoChromaFlags>;
4095 }
4096
4097 enum VideoChromaFlags {
4098 /**
4099 * no flags
4100 */
4101 NONE,
4102 /**
4103 * the input is interlaced
4104 */
4105 INTERLACED,
4106 }
4107 /**
4108 * Various Chroma sitings.
4109 */
4110
4111 /**
4112 * Various Chroma sitings.
4113 */
4114 export namespace VideoChromaSite {
4115 export const $gtype: GObject.GType<VideoChromaSite>;
4116 }
4117
4118 enum VideoChromaSite {
4119 /**
4120 * unknown cositing
4121 */
4122 UNKNOWN,
4123 /**
4124 * no cositing
4125 */
4126 NONE,
4127 /**
4128 * chroma is horizontally cosited
4129 */
4130 H_COSITED,
4131 /**
4132 * chroma is vertically cosited
4133 */
4134 V_COSITED,
4135 /**
4136 * choma samples are sited on alternate lines
4137 */
4138 ALT_LINE,
4139 /**
4140 * chroma samples cosited with luma samples
4141 */
4142 COSITED,
4143 /**
4144 * jpeg style cositing, also for mpeg1 and mjpeg
4145 */
4146 JPEG,
4147 /**
4148 * mpeg2 style cositing
4149 */
4150 MPEG2,
4151 /**
4152 * DV style cositing
4153 */
4154 DV,
4155 }
4156 /**
4157 * Flags for #GstVideoCodecFrame
4158 */
4159
4160 /**
4161 * Flags for #GstVideoCodecFrame
4162 */
4163 export namespace VideoCodecFrameFlags {
4164 export const $gtype: GObject.GType<VideoCodecFrameFlags>;
4165 }
4166
4167 enum VideoCodecFrameFlags {
4168 /**
4169 * is the frame only meant to be decoded
4170 */
4171 DECODE_ONLY,
4172 /**
4173 * is the frame a synchronization point (keyframe)
4174 */
4175 SYNC_POINT,
4176 /**
4177 * should the output frame be made a keyframe
4178 */
4179 FORCE_KEYFRAME,
4180 /**
4181 * should the encoder output stream headers
4182 */
4183 FORCE_KEYFRAME_HEADERS,
4184 /**
4185 * The buffer data is corrupted.
4186 */
4187 CORRUPTED,
4188 }
4189 /**
4190 * Flags to be used in combination with gst_video_decoder_request_sync_point().
4191 * See the function documentation for more details.
4192 */
4193
4194 /**
4195 * Flags to be used in combination with gst_video_decoder_request_sync_point().
4196 * See the function documentation for more details.
4197 */
4198 export namespace VideoDecoderRequestSyncPointFlags {
4199 export const $gtype: GObject.GType<VideoDecoderRequestSyncPointFlags>;
4200 }
4201
4202 enum VideoDecoderRequestSyncPointFlags {
4203 /**
4204 * discard all following
4205 * input until the next sync point.
4206 */
4207 DISCARD_INPUT,
4208 /**
4209 * discard all following
4210 * output until the next sync point.
4211 */
4212 CORRUPT_OUTPUT,
4213 }
4214 /**
4215 * Extra flags that influence the result from gst_video_chroma_resample_new().
4216 */
4217
4218 /**
4219 * Extra flags that influence the result from gst_video_chroma_resample_new().
4220 */
4221 export namespace VideoDitherFlags {
4222 export const $gtype: GObject.GType<VideoDitherFlags>;
4223 }
4224
4225 enum VideoDitherFlags {
4226 /**
4227 * no flags
4228 */
4229 NONE,
4230 /**
4231 * the input is interlaced
4232 */
4233 INTERLACED,
4234 /**
4235 * quantize values in addition to adding dither.
4236 */
4237 QUANTIZE,
4238 }
4239 /**
4240 * Extra video flags
4241 */
4242
4243 /**
4244 * Extra video flags
4245 */
4246 export namespace VideoFlags {
4247 export const $gtype: GObject.GType<VideoFlags>;
4248 }
4249
4250 enum VideoFlags {
4251 /**
4252 * no flags
4253 */
4254 NONE,
4255 /**
4256 * a variable fps is selected, fps_n and fps_d
4257 * denote the maximum fps of the video
4258 */
4259 VARIABLE_FPS,
4260 /**
4261 * Each color has been scaled by the alpha
4262 * value.
4263 */
4264 PREMULTIPLIED_ALPHA,
4265 }
4266 /**
4267 * The different video flags that a format info can have.
4268 */
4269
4270 /**
4271 * The different video flags that a format info can have.
4272 */
4273 export namespace VideoFormatFlags {
4274 export const $gtype: GObject.GType<VideoFormatFlags>;
4275 }
4276
4277 enum VideoFormatFlags {
4278 /**
4279 * The video format is YUV, components are numbered
4280 * 0=Y, 1=U, 2=V.
4281 */
4282 YUV,
4283 /**
4284 * The video format is RGB, components are numbered
4285 * 0=R, 1=G, 2=B.
4286 */
4287 RGB,
4288 /**
4289 * The video is gray, there is one gray component
4290 * with index 0.
4291 */
4292 GRAY,
4293 /**
4294 * The video format has an alpha components with
4295 * the number 3.
4296 */
4297 ALPHA,
4298 /**
4299 * The video format has data stored in little
4300 * endianness.
4301 */
4302 LE,
4303 /**
4304 * The video format has a palette. The palette
4305 * is stored in the second plane and indexes are stored in the first plane.
4306 */
4307 PALETTE,
4308 /**
4309 * The video format has a complex layout that
4310 * can't be described with the usual information in the #GstVideoFormatInfo.
4311 */
4312 COMPLEX,
4313 /**
4314 * This format can be used in a
4315 * #GstVideoFormatUnpack and #GstVideoFormatPack function.
4316 */
4317 UNPACK,
4318 /**
4319 * The format is tiled, there is tiling information
4320 * in the last plane.
4321 */
4322 TILED,
4323 /**
4324 * The tile size varies per plane according to the subsampling.
4325 */
4326 SUBTILES,
4327 }
4328 /**
4329 * Extra video frame flags
4330 */
4331
4332 /**
4333 * Extra video frame flags
4334 */
4335 export namespace VideoFrameFlags {
4336 export const $gtype: GObject.GType<VideoFrameFlags>;
4337 }
4338
4339 enum VideoFrameFlags {
4340 /**
4341 * no flags
4342 */
4343 NONE,
4344 /**
4345 * The video frame is interlaced. In mixed
4346 * interlace-mode, this flag specifies if the frame is interlaced or
4347 * progressive.
4348 */
4349 INTERLACED,
4350 /**
4351 * The video frame has the top field first
4352 */
4353 TFF,
4354 /**
4355 * The video frame has the repeat flag
4356 */
4357 RFF,
4358 /**
4359 * The video frame has one field
4360 */
4361 ONEFIELD,
4362 /**
4363 * The video contains one or
4364 * more non-mono views
4365 */
4366 MULTIPLE_VIEW,
4367 /**
4368 * The video frame is the first
4369 * in a set of corresponding views provided as sequential frames.
4370 */
4371 FIRST_IN_BUNDLE,
4372 /**
4373 * The video frame has the top field only. This
4374 * is the same as GST_VIDEO_FRAME_FLAG_TFF | GST_VIDEO_FRAME_FLAG_ONEFIELD
4375 * (Since: 1.16).
4376 */
4377 TOP_FIELD,
4378 /**
4379 * The video frame has the bottom field
4380 * only. This is the same as GST_VIDEO_FRAME_FLAG_ONEFIELD
4381 * (GST_VIDEO_FRAME_FLAG_TFF flag unset) (Since: 1.16).
4382 */
4383 BOTTOM_FIELD,
4384 }
4385 /**
4386 * Additional mapping flags for gst_video_frame_map().
4387 */
4388
4389 /**
4390 * Additional mapping flags for gst_video_frame_map().
4391 */
4392 export namespace VideoFrameMapFlags {
4393 export const $gtype: GObject.GType<VideoFrameMapFlags>;
4394 }
4395
4396 enum VideoFrameMapFlags {
4397 /**
4398 * Don't take another reference of the buffer and store it in
4399 * the GstVideoFrame. This makes sure that the buffer stays
4400 * writable while the frame is mapped, but requires that the
4401 * buffer reference stays valid until the frame is unmapped again.
4402 */
4403 NO_REF,
4404 /**
4405 * Offset to define more flags
4406 */
4407 LAST,
4408 }
4409 /**
4410 * GstVideoMultiviewFlags are used to indicate extra properties of a
4411 * stereo/multiview stream beyond the frame layout and buffer mapping
4412 * that is conveyed in the #GstVideoMultiviewMode.
4413 */
4414
4415 /**
4416 * GstVideoMultiviewFlags are used to indicate extra properties of a
4417 * stereo/multiview stream beyond the frame layout and buffer mapping
4418 * that is conveyed in the #GstVideoMultiviewMode.
4419 */
4420 export namespace VideoMultiviewFlags {
4421 export const $gtype: GObject.GType<VideoMultiviewFlags>;
4422 }
4423
4424 enum VideoMultiviewFlags {
4425 /**
4426 * No flags
4427 */
4428 NONE,
4429 /**
4430 * For stereo streams, the
4431 * normal arrangement of left and right views is reversed.
4432 */
4433 RIGHT_VIEW_FIRST,
4434 /**
4435 * The left view is vertically
4436 * mirrored.
4437 */
4438 LEFT_FLIPPED,
4439 /**
4440 * The left view is horizontally
4441 * mirrored.
4442 */
4443 LEFT_FLOPPED,
4444 /**
4445 * The right view is
4446 * vertically mirrored.
4447 */
4448 RIGHT_FLIPPED,
4449 /**
4450 * The right view is
4451 * horizontally mirrored.
4452 */
4453 RIGHT_FLOPPED,
4454 /**
4455 * For frame-packed
4456 * multiview modes, indicates that the individual
4457 * views have been encoded with half the true width or height
4458 * and should be scaled back up for display. This flag
4459 * is used for overriding input layout interpretation
4460 * by adjusting pixel-aspect-ratio.
4461 * For side-by-side, column interleaved or checkerboard packings, the
4462 * pixel width will be doubled. For row interleaved and top-bottom
4463 * encodings, pixel height will be doubled.
4464 */
4465 HALF_ASPECT,
4466 /**
4467 * The video stream contains both
4468 * mono and multiview portions, signalled on each buffer by the
4469 * absence or presence of the `GST_VIDEO_BUFFER_FLAG_MULTIPLE_VIEW`
4470 * buffer flag.
4471 */
4472 MIXED_MONO,
4473 }
4474 /**
4475 * Overlay format flags.
4476 */
4477
4478 /**
4479 * Overlay format flags.
4480 */
4481 export namespace VideoOverlayFormatFlags {
4482 export const $gtype: GObject.GType<VideoOverlayFormatFlags>;
4483 }
4484
4485 enum VideoOverlayFormatFlags {
4486 /**
4487 * no flags
4488 */
4489 NONE,
4490 /**
4491 * RGB are premultiplied by A/255.
4492 */
4493 PREMULTIPLIED_ALPHA,
4494 /**
4495 * a global-alpha value != 1 is set.
4496 */
4497 GLOBAL_ALPHA,
4498 }
4499 /**
4500 * The different flags that can be used when packing and unpacking.
4501 */
4502
4503 /**
4504 * The different flags that can be used when packing and unpacking.
4505 */
4506 export namespace VideoPackFlags {
4507 export const $gtype: GObject.GType<VideoPackFlags>;
4508 }
4509
4510 enum VideoPackFlags {
4511 /**
4512 * No flag
4513 */
4514 NONE,
4515 /**
4516 * When the source has a smaller depth
4517 * than the target format, set the least significant bits of the target
4518 * to 0. This is likely slightly faster but less accurate. When this flag
4519 * is not specified, the most significant bits of the source are duplicated
4520 * in the least significant bits of the destination.
4521 */
4522 TRUNCATE_RANGE,
4523 /**
4524 * The source is interlaced. The unpacked
4525 * format will be interlaced as well with each line containing
4526 * information from alternating fields. (Since: 1.2)
4527 */
4528 INTERLACED,
4529 }
4530 /**
4531 * Different resampler flags.
4532 */
4533
4534 /**
4535 * Different resampler flags.
4536 */
4537 export namespace VideoResamplerFlags {
4538 export const $gtype: GObject.GType<VideoResamplerFlags>;
4539 }
4540
4541 enum VideoResamplerFlags {
4542 /**
4543 * no flags
4544 */
4545 NONE,
4546 /**
4547 * when no taps are given, half the
4548 * number of calculated taps. This can be used when making scalers
4549 * for the different fields of an interlaced picture. Since: 1.10
4550 */
4551 HALF_TAPS,
4552 }
4553 /**
4554 * Different scale flags.
4555 */
4556
4557 /**
4558 * Different scale flags.
4559 */
4560 export namespace VideoScalerFlags {
4561 export const $gtype: GObject.GType<VideoScalerFlags>;
4562 }
4563
4564 enum VideoScalerFlags {
4565 /**
4566 * no flags
4567 */
4568 NONE,
4569 /**
4570 * Set up a scaler for interlaced content
4571 */
4572 INTERLACED,
4573 }
4574 /**
4575 * Flags related to the time code information.
4576 * For drop frame, only 30000/1001 and 60000/1001 frame rates are supported.
4577 */
4578
4579 /**
4580 * Flags related to the time code information.
4581 * For drop frame, only 30000/1001 and 60000/1001 frame rates are supported.
4582 */
4583 export namespace VideoTimeCodeFlags {
4584 export const $gtype: GObject.GType<VideoTimeCodeFlags>;
4585 }
4586
4587 enum VideoTimeCodeFlags {
4588 /**
4589 * No flags
4590 */
4591 NONE,
4592 /**
4593 * Whether we have drop frame rate
4594 */
4595 DROP_FRAME,
4596 /**
4597 * Whether we have interlaced video
4598 */
4599 INTERLACED,
4600 }
4601 namespace ColorBalanceChannel {
4602 // Signal callback interfaces
4603
4604 interface ValueChanged {
4605 (value: number): void;
4606 }
4607
4608 // Constructor properties interface
4609
4610 interface ConstructorProps extends GObject.Object.ConstructorProps {}
4611 }
4612
4613 /**
4614 * The #GstColorBalanceChannel object represents a parameter
4615 * for modifying the color balance implemented by an element providing the
4616 * #GstColorBalance interface. For example, Hue or Saturation.
4617 */
4618 class ColorBalanceChannel extends GObject.Object {
4619 static $gtype: GObject.GType<ColorBalanceChannel>;
4620
4621 // Fields
4622
4623 label: string;
4624 min_value: number;
4625 max_value: number;
4626
4627 // Constructors
4628
4629 constructor(properties?: Partial<ColorBalanceChannel.ConstructorProps>, ...args: any[]);
4630
4631 _init(...args: any[]): void;
4632
4633 // Signals
4634
4635 connect(id: string, callback: (...args: any[]) => any): number;
4636 connect_after(id: string, callback: (...args: any[]) => any): number;
4637 emit(id: string, ...args: any[]): void;
4638 connect(signal: 'value-changed', callback: (_source: this, value: number) => void): number;
4639 connect_after(signal: 'value-changed', callback: (_source: this, value: number) => void): number;
4640 emit(signal: 'value-changed', value: number): void;
4641
4642 // Virtual methods
4643
4644 /**
4645 * default handler for value changed notification
4646 * @param value
4647 */
4648 vfunc_value_changed(value: number): void;
4649 }
4650
4651 namespace VideoAggregator {
4652 // Constructor properties interface
4653
4654 interface ConstructorProps extends GstBase.Aggregator.ConstructorProps {
4655 force_live: boolean;
4656 forceLive: boolean;
4657 }
4658 }
4659
4660 /**
4661 * VideoAggregator can accept AYUV, ARGB and BGRA video streams. For each of the requested
4662 * sink pads it will compare the incoming geometry and framerate to define the
4663 * output parameters. Indeed output video frames will have the geometry of the
4664 * biggest incoming video stream and the framerate of the fastest incoming one.
4665 *
4666 * VideoAggregator will do colorspace conversion.
4667 *
4668 * Zorder for each input stream can be configured on the
4669 * #GstVideoAggregatorPad.
4670 */
4671 abstract class VideoAggregator extends GstBase.Aggregator {
4672 static $gtype: GObject.GType<VideoAggregator>;
4673
4674 // Properties
4675
4676 /**
4677 * Causes the element to aggregate on a timeout even when no live source is
4678 * connected to its sinks. See #GstAggregator:min-upstream-latency for a
4679 * companion property: in the vast majority of cases where you plan to plug in
4680 * live sources with a non-zero latency, you should set it to a non-zero value.
4681 */
4682 get force_live(): boolean;
4683 /**
4684 * Causes the element to aggregate on a timeout even when no live source is
4685 * connected to its sinks. See #GstAggregator:min-upstream-latency for a
4686 * companion property: in the vast majority of cases where you plan to plug in
4687 * live sources with a non-zero latency, you should set it to a non-zero value.
4688 */
4689 get forceLive(): boolean;
4690
4691 // Fields
4692
4693 aggregator: GstBase.Aggregator;
4694
4695 // Constructors
4696
4697 constructor(properties?: Partial<VideoAggregator.ConstructorProps>, ...args: any[]);
4698
4699 _init(...args: any[]): void;
4700
4701 // Virtual methods
4702
4703 /**
4704 * Lets subclasses aggregate frames that are ready. Subclasses
4705 * should iterate the GstElement.sinkpads and use the already
4706 * mapped #GstVideoFrame from gst_video_aggregator_pad_get_prepared_frame()
4707 * or directly use the #GstBuffer from gst_video_aggregator_pad_get_current_buffer()
4708 * if it needs to map the buffer in a special way. The result of the
4709 * aggregation should land in `outbuffer`.
4710 * @param outbuffer
4711 */
4712 vfunc_aggregate_frames(outbuffer: Gst.Buffer): Gst.FlowReturn;
4713 /**
4714 * Optional.
4715 * Lets subclasses provide a #GstBuffer to be used as `outbuffer` of
4716 * the #aggregate_frames vmethod.
4717 * @param outbuffer
4718 */
4719 vfunc_create_output_buffer(outbuffer: Gst.Buffer): Gst.FlowReturn;
4720 vfunc_find_best_format(downstream_caps: Gst.Caps, best_info: VideoInfo): boolean;
4721 /**
4722 * Optional.
4723 * Lets subclasses update the #GstCaps representing
4724 * the src pad caps before usage. Return %NULL to indicate failure.
4725 * @param caps
4726 */
4727 vfunc_update_caps(caps: Gst.Caps): Gst.Caps;
4728
4729 // Methods
4730
4731 /**
4732 * The returned #GstTaskPool is used internally for performing parallel
4733 * video format conversions/scaling/etc during the
4734 * #GstVideoAggregatorPadClass::prepare_frame_start() process.
4735 * Subclasses can add their own operation to perform using the returned
4736 * #GstTaskPool during #GstVideoAggregatorClass::aggregate_frames().
4737 * @returns the #GstTaskPool that can be used by subclasses for performing concurrent operations
4738 */
4739 get_execution_task_pool(): Gst.TaskPool;
4740 }
4741
4742 namespace VideoAggregatorConvertPad {
4743 // Constructor properties interface
4744
4745 interface ConstructorProps extends VideoAggregatorPad.ConstructorProps {
4746 converter_config: Gst.Structure;
4747 converterConfig: Gst.Structure;
4748 }
4749 }
4750
4751 /**
4752 * An implementation of GstPad that can be used with #GstVideoAggregator.
4753 *
4754 * See #GstVideoAggregator for more details.
4755 */
4756 class VideoAggregatorConvertPad extends VideoAggregatorPad {
4757 static $gtype: GObject.GType<VideoAggregatorConvertPad>;
4758
4759 // Properties
4760
4761 get converter_config(): Gst.Structure;
4762 set converter_config(val: Gst.Structure);
4763 get converterConfig(): Gst.Structure;
4764 set converterConfig(val: Gst.Structure);
4765
4766 // Constructors
4767
4768 constructor(properties?: Partial<VideoAggregatorConvertPad.ConstructorProps>, ...args: any[]);
4769
4770 _init(...args: any[]): void;
4771
4772 // Virtual methods
4773
4774 vfunc_create_conversion_info(agg: VideoAggregator, conversion_info: VideoInfo): void;
4775
4776 // Methods
4777
4778 /**
4779 * Requests the pad to check and update the converter before the next usage to
4780 * update for any changes that have happened.
4781 */
4782 update_conversion_info(): void;
4783 }
4784
4785 namespace VideoAggregatorPad {
4786 // Constructor properties interface
4787
4788 interface ConstructorProps extends GstBase.AggregatorPad.ConstructorProps {
4789 max_last_buffer_repeat: number;
4790 maxLastBufferRepeat: number;
4791 repeat_after_eos: boolean;
4792 repeatAfterEos: boolean;
4793 zorder: number;
4794 }
4795 }
4796
4797 class VideoAggregatorPad extends GstBase.AggregatorPad {
4798 static $gtype: GObject.GType<VideoAggregatorPad>;
4799
4800 // Properties
4801
4802 get max_last_buffer_repeat(): number;
4803 set max_last_buffer_repeat(val: number);
4804 get maxLastBufferRepeat(): number;
4805 set maxLastBufferRepeat(val: number);
4806 get repeat_after_eos(): boolean;
4807 set repeat_after_eos(val: boolean);
4808 get repeatAfterEos(): boolean;
4809 set repeatAfterEos(val: boolean);
4810 get zorder(): number;
4811 set zorder(val: number);
4812
4813 // Constructors
4814
4815 constructor(properties?: Partial<VideoAggregatorPad.ConstructorProps>, ...args: any[]);
4816
4817 _init(...args: any[]): void;
4818
4819 // Virtual methods
4820
4821 /**
4822 * clean the frame previously prepared in prepare_frame
4823 * @param videoaggregator
4824 * @param prepared_frame
4825 */
4826 vfunc_clean_frame(videoaggregator: VideoAggregator, prepared_frame: VideoFrame): void;
4827 /**
4828 * Prepare the frame from the pad buffer and sets it to prepared_frame.
4829 * Implementations should always return TRUE. Returning FALSE will cease
4830 * iteration over subsequent pads.
4831 * @param videoaggregator
4832 * @param buffer
4833 * @param prepared_frame
4834 */
4835 vfunc_prepare_frame(
4836 videoaggregator: VideoAggregator,
4837 buffer: Gst.Buffer,
4838 prepared_frame: VideoFrame,
4839 ): boolean;
4840 /**
4841 * Finish preparing `prepared_frame`.
4842 *
4843 * If overriden, `prepare_frame_start` must also be overriden.
4844 * @param videoaggregator the parent #GstVideoAggregator
4845 * @param prepared_frame the #GstVideoFrame to prepare into
4846 */
4847 vfunc_prepare_frame_finish(videoaggregator: VideoAggregator, prepared_frame: VideoFrame): void;
4848 /**
4849 * Begin preparing the frame from the pad buffer and sets it to prepared_frame.
4850 *
4851 * If overriden, `prepare_frame_finish` must also be overriden.
4852 * @param videoaggregator the parent #GstVideoAggregator
4853 * @param buffer the input #GstBuffer to prepare
4854 * @param prepared_frame the #GstVideoFrame to prepare into
4855 */
4856 vfunc_prepare_frame_start(
4857 videoaggregator: VideoAggregator,
4858 buffer: Gst.Buffer,
4859 prepared_frame: VideoFrame,
4860 ): void;
4861 /**
4862 * Called when either the input or output formats
4863 * have changed.
4864 */
4865 vfunc_update_conversion_info(): void;
4866
4867 // Methods
4868
4869 /**
4870 * Returns the currently queued buffer that is going to be used
4871 * for the current output frame.
4872 *
4873 * This must only be called from the #GstVideoAggregatorClass::aggregate_frames virtual method,
4874 * or from the #GstVideoAggregatorPadClass::prepare_frame virtual method of the aggregator pads.
4875 *
4876 * The return value is only valid until #GstVideoAggregatorClass::aggregate_frames or #GstVideoAggregatorPadClass::prepare_frame
4877 * returns.
4878 * @returns The currently queued buffer
4879 */
4880 get_current_buffer(): Gst.Buffer;
4881 /**
4882 * Returns the currently prepared video frame that has to be aggregated into
4883 * the current output frame.
4884 *
4885 * This must only be called from the #GstVideoAggregatorClass::aggregate_frames virtual method,
4886 * or from the #GstVideoAggregatorPadClass::prepare_frame virtual method of the aggregator pads.
4887 *
4888 * The return value is only valid until #GstVideoAggregatorClass::aggregate_frames or #GstVideoAggregatorPadClass::prepare_frame
4889 * returns.
4890 * @returns The currently prepared video frame
4891 */
4892 get_prepared_frame(): VideoFrame;
4893 /**
4894 * Checks if the pad currently has a buffer queued that is going to be used
4895 * for the current output frame.
4896 *
4897 * This must only be called from the #GstVideoAggregatorClass::aggregate_frames virtual method,
4898 * or from the #GstVideoAggregatorPadClass::prepare_frame virtual method of the aggregator pads.
4899 * @returns %TRUE if the pad has currently a buffer queued
4900 */
4901 has_current_buffer(): boolean;
4902 /**
4903 * Allows selecting that this pad requires an output format with alpha
4904 * @param needs_alpha %TRUE if this pad requires alpha output
4905 */
4906 set_needs_alpha(needs_alpha: boolean): void;
4907 }
4908
4909 namespace VideoAggregatorParallelConvertPad {
4910 // Constructor properties interface
4911
4912 interface ConstructorProps extends VideoAggregatorConvertPad.ConstructorProps {}
4913 }
4914
4915 /**
4916 * An implementation of GstPad that can be used with #GstVideoAggregator.
4917 *
4918 * See #GstVideoAggregator for more details.
4919 */
4920 class VideoAggregatorParallelConvertPad extends VideoAggregatorConvertPad {
4921 static $gtype: GObject.GType<VideoAggregatorParallelConvertPad>;
4922
4923 // Constructors
4924
4925 constructor(properties?: Partial<VideoAggregatorParallelConvertPad.ConstructorProps>, ...args: any[]);
4926
4927 _init(...args: any[]): void;
4928 }
4929
4930 namespace VideoBufferPool {
4931 // Constructor properties interface
4932
4933 interface ConstructorProps extends Gst.BufferPool.ConstructorProps {}
4934 }
4935
4936 class VideoBufferPool extends Gst.BufferPool {
4937 static $gtype: GObject.GType<VideoBufferPool>;
4938
4939 // Fields
4940
4941 bufferpool: Gst.BufferPool;
4942
4943 // Constructors
4944
4945 constructor(properties?: Partial<VideoBufferPool.ConstructorProps>, ...args: any[]);
4946
4947 _init(...args: any[]): void;
4948
4949 static ['new'](): VideoBufferPool;
4950 }
4951
4952 namespace VideoDecoder {
4953 // Constructor properties interface
4954
4955 interface ConstructorProps extends Gst.Element.ConstructorProps {
4956 automatic_request_sync_point_flags: VideoDecoderRequestSyncPointFlags;
4957 automaticRequestSyncPointFlags: VideoDecoderRequestSyncPointFlags;
4958 automatic_request_sync_points: boolean;
4959 automaticRequestSyncPoints: boolean;
4960 discard_corrupted_frames: boolean;
4961 discardCorruptedFrames: boolean;
4962 max_errors: number;
4963 maxErrors: number;
4964 min_force_key_unit_interval: number;
4965 minForceKeyUnitInterval: number;
4966 qos: boolean;
4967 }
4968 }
4969
4970 /**
4971 * This base class is for video decoders turning encoded data into raw video
4972 * frames.
4973 *
4974 * The GstVideoDecoder base class and derived subclasses should cooperate as
4975 * follows:
4976 *
4977 * ## Configuration
4978 *
4979 * * Initially, GstVideoDecoder calls `start` when the decoder element
4980 * is activated, which allows the subclass to perform any global setup.
4981 *
4982 * * GstVideoDecoder calls `set_format` to inform the subclass of caps
4983 * describing input video data that it is about to receive, including
4984 * possibly configuration data.
4985 * While unlikely, it might be called more than once, if changing input
4986 * parameters require reconfiguration.
4987 *
4988 * * Incoming data buffers are processed as needed, described in Data
4989 * Processing below.
4990 *
4991 * * GstVideoDecoder calls `stop` at end of all processing.
4992 *
4993 * ## Data processing
4994 *
4995 * * The base class gathers input data, and optionally allows subclass
4996 * to parse this into subsequently manageable chunks, typically
4997 * corresponding to and referred to as 'frames'.
4998 *
4999 * * Each input frame is provided in turn to the subclass' `handle_frame`
5000 * callback.
5001 * * When the subclass enables the subframe mode with `gst_video_decoder_set_subframe_mode`,
5002 * the base class will provide to the subclass the same input frame with
5003 * different input buffers to the subclass `handle_frame`
5004 * callback. During this call, the subclass needs to take
5005 * ownership of the input_buffer as `GstVideoCodecFrame`.input_buffer
5006 * will have been changed before the next subframe buffer is received.
5007 * The subclass will call `gst_video_decoder_have_last_subframe`
5008 * when a new input frame can be created by the base class.
5009 * Every subframe will share the same `GstVideoCodecFrame`.output_buffer
5010 * to write the decoding result. The subclass is responsible to protect
5011 * its access.
5012 *
5013 * * If codec processing results in decoded data, the subclass should call
5014 * `gst_video_decoder_finish_frame` to have decoded data pushed
5015 * downstream. In subframe mode
5016 * the subclass should call `gst_video_decoder_finish_subframe` until the
5017 * last subframe where it should call `gst_video_decoder_finish_frame`.
5018 * The subclass can detect the last subframe using GST_VIDEO_BUFFER_FLAG_MARKER
5019 * on buffers or using its own logic to collect the subframes.
5020 * In case of decoding failure, the subclass must call
5021 * `gst_video_decoder_drop_frame` or `gst_video_decoder_drop_subframe,`
5022 * to allow the base class to do timestamp and offset tracking, and possibly
5023 * to requeue the frame for a later attempt in the case of reverse playback.
5024 *
5025 * ## Shutdown phase
5026 *
5027 * * The GstVideoDecoder class calls `stop` to inform the subclass that data
5028 * parsing will be stopped.
5029 *
5030 * ## Additional Notes
5031 *
5032 * * Seeking/Flushing
5033 *
5034 * * When the pipeline is seeked or otherwise flushed, the subclass is
5035 * informed via a call to its `reset` callback, with the hard parameter
5036 * set to true. This indicates the subclass should drop any internal data
5037 * queues and timestamps and prepare for a fresh set of buffers to arrive
5038 * for parsing and decoding.
5039 *
5040 * * End Of Stream
5041 *
5042 * * At end-of-stream, the subclass `parse` function may be called some final
5043 * times with the at_eos parameter set to true, indicating that the element
5044 * should not expect any more data to be arriving, and it should parse and
5045 * remaining frames and call gst_video_decoder_have_frame() if possible.
5046 *
5047 * The subclass is responsible for providing pad template caps for
5048 * source and sink pads. The pads need to be named "sink" and "src". It also
5049 * needs to provide information about the output caps, when they are known.
5050 * This may be when the base class calls the subclass' `set_format` function,
5051 * though it might be during decoding, before calling
5052 * `gst_video_decoder_finish_frame`. This is done via
5053 * `gst_video_decoder_set_output_state`
5054 *
5055 * The subclass is also responsible for providing (presentation) timestamps
5056 * (likely based on corresponding input ones). If that is not applicable
5057 * or possible, the base class provides limited framerate based interpolation.
5058 *
5059 * Similarly, the base class provides some limited (legacy) seeking support
5060 * if specifically requested by the subclass, as full-fledged support
5061 * should rather be left to upstream demuxer, parser or alike. This simple
5062 * approach caters for seeking and duration reporting using estimated input
5063 * bitrates. To enable it, a subclass should call
5064 * `gst_video_decoder_set_estimate_rate` to enable handling of incoming
5065 * byte-streams.
5066 *
5067 * The base class provides some support for reverse playback, in particular
5068 * in case incoming data is not packetized or upstream does not provide
5069 * fragments on keyframe boundaries. However, the subclass should then be
5070 * prepared for the parsing and frame processing stage to occur separately
5071 * (in normal forward processing, the latter immediately follows the former),
5072 * The subclass also needs to ensure the parsing stage properly marks
5073 * keyframes, unless it knows the upstream elements will do so properly for
5074 * incoming data.
5075 *
5076 * The bare minimum that a functional subclass needs to implement is:
5077 *
5078 * * Provide pad templates
5079 * * Inform the base class of output caps via
5080 * `gst_video_decoder_set_output_state`
5081 *
5082 * * Parse input data, if it is not considered packetized from upstream
5083 * Data will be provided to `parse` which should invoke
5084 * `gst_video_decoder_add_to_frame` and `gst_video_decoder_have_frame` to
5085 * separate the data belonging to each video frame.
5086 *
5087 * * Accept data in `handle_frame` and provide decoded results to
5088 * `gst_video_decoder_finish_frame,` or call `gst_video_decoder_drop_frame`.
5089 */
5090 abstract class VideoDecoder extends Gst.Element {
5091 static $gtype: GObject.GType<VideoDecoder>;
5092
5093 // Properties
5094
5095 /**
5096 * GstVideoDecoderRequestSyncPointFlags to use for the automatically
5097 * requested sync points if `automatic-request-sync-points` is enabled.
5098 */
5099 get automatic_request_sync_point_flags(): VideoDecoderRequestSyncPointFlags;
5100 set automatic_request_sync_point_flags(val: VideoDecoderRequestSyncPointFlags);
5101 /**
5102 * GstVideoDecoderRequestSyncPointFlags to use for the automatically
5103 * requested sync points if `automatic-request-sync-points` is enabled.
5104 */
5105 get automaticRequestSyncPointFlags(): VideoDecoderRequestSyncPointFlags;
5106 set automaticRequestSyncPointFlags(val: VideoDecoderRequestSyncPointFlags);
5107 /**
5108 * If set to %TRUE the decoder will automatically request sync points when
5109 * it seems like a good idea, e.g. if the first frames are not key frames or
5110 * if packet loss was reported by upstream.
5111 */
5112 get automatic_request_sync_points(): boolean;
5113 set automatic_request_sync_points(val: boolean);
5114 /**
5115 * If set to %TRUE the decoder will automatically request sync points when
5116 * it seems like a good idea, e.g. if the first frames are not key frames or
5117 * if packet loss was reported by upstream.
5118 */
5119 get automaticRequestSyncPoints(): boolean;
5120 set automaticRequestSyncPoints(val: boolean);
5121 /**
5122 * If set to %TRUE the decoder will discard frames that are marked as
5123 * corrupted instead of outputting them.
5124 */
5125 get discard_corrupted_frames(): boolean;
5126 set discard_corrupted_frames(val: boolean);
5127 /**
5128 * If set to %TRUE the decoder will discard frames that are marked as
5129 * corrupted instead of outputting them.
5130 */
5131 get discardCorruptedFrames(): boolean;
5132 set discardCorruptedFrames(val: boolean);
5133 /**
5134 * Maximum number of tolerated consecutive decode errors. See
5135 * gst_video_decoder_set_max_errors() for more details.
5136 */
5137 get max_errors(): number;
5138 set max_errors(val: number);
5139 /**
5140 * Maximum number of tolerated consecutive decode errors. See
5141 * gst_video_decoder_set_max_errors() for more details.
5142 */
5143 get maxErrors(): number;
5144 set maxErrors(val: number);
5145 /**
5146 * Minimum interval between force-key-unit events sent upstream by the
5147 * decoder. Setting this to 0 will cause every event to be handled, setting
5148 * this to %GST_CLOCK_TIME_NONE will cause every event to be ignored.
5149 *
5150 * See gst_video_event_new_upstream_force_key_unit() for more details about
5151 * force-key-unit events.
5152 */
5153 get min_force_key_unit_interval(): number;
5154 set min_force_key_unit_interval(val: number);
5155 /**
5156 * Minimum interval between force-key-unit events sent upstream by the
5157 * decoder. Setting this to 0 will cause every event to be handled, setting
5158 * this to %GST_CLOCK_TIME_NONE will cause every event to be ignored.
5159 *
5160 * See gst_video_event_new_upstream_force_key_unit() for more details about
5161 * force-key-unit events.
5162 */
5163 get minForceKeyUnitInterval(): number;
5164 set minForceKeyUnitInterval(val: number);
5165 /**
5166 * If set to %TRUE the decoder will handle QoS events received
5167 * from downstream elements.
5168 * This includes dropping output frames which are detected as late
5169 * using the metrics reported by those events.
5170 */
5171 get qos(): boolean;
5172 set qos(val: boolean);
5173
5174 // Constructors
5175
5176 constructor(properties?: Partial<VideoDecoder.ConstructorProps>, ...args: any[]);
5177
5178 _init(...args: any[]): void;
5179
5180 // Virtual methods
5181
5182 /**
5183 * Optional.
5184 * Called when the element changes to GST_STATE_NULL.
5185 * Allows closing external resources.
5186 */
5187 vfunc_close(): boolean;
5188 /**
5189 * Optional.
5190 * Setup the allocation parameters for allocating output
5191 * buffers. The passed in query contains the result of the
5192 * downstream allocation query.
5193 * Subclasses should chain up to the parent implementation to
5194 * invoke the default handler.
5195 * @param query
5196 */
5197 vfunc_decide_allocation(query: Gst.Query): boolean;
5198 /**
5199 * Optional.
5200 * Called to request subclass to decode any data it can at this
5201 * point, but that more data may arrive after. (e.g. at segment end).
5202 * Sub-classes should be prepared to handle new data afterward,
5203 * or seamless segment processing will break. Since: 1.6
5204 */
5205 vfunc_drain(): Gst.FlowReturn;
5206 /**
5207 * Optional.
5208 * Called to request subclass to dispatch any pending remaining
5209 * data at EOS. Sub-classes can refuse to decode new data after.
5210 */
5211 vfunc_finish(): Gst.FlowReturn;
5212 /**
5213 * Optional.
5214 * Flush all remaining data from the decoder without
5215 * pushing it downstream. Since: 1.2
5216 */
5217 vfunc_flush(): boolean;
5218 /**
5219 * Optional.
5220 * Allows for a custom sink getcaps implementation.
5221 * If not implemented, default returns
5222 * gst_video_decoder_proxy_getcaps
5223 * applied to sink template caps.
5224 * @param filter
5225 */
5226 vfunc_getcaps(filter: Gst.Caps): Gst.Caps;
5227 vfunc_handle_frame(frame: VideoCodecFrame): Gst.FlowReturn;
5228 vfunc_handle_missing_data(timestamp: Gst.ClockTime, duration: Gst.ClockTime): boolean;
5229 /**
5230 * Negotiate with downstream elements to currently configured #GstVideoCodecState.
5231 * Unmark GST_PAD_FLAG_NEED_RECONFIGURE in any case. But mark it again if
5232 * negotiate fails.
5233 */
5234 vfunc_negotiate(): boolean;
5235 /**
5236 * Optional.
5237 * Called when the element changes to GST_STATE_READY.
5238 * Allows opening external resources.
5239 */
5240 vfunc_open(): boolean;
5241 /**
5242 * Required for non-packetized input.
5243 * Allows chopping incoming data into manageable units (frames)
5244 * for subsequent decoding.
5245 * @param frame
5246 * @param adapter
5247 * @param at_eos
5248 */
5249 vfunc_parse(frame: VideoCodecFrame, adapter: GstBase.Adapter, at_eos: boolean): Gst.FlowReturn;
5250 /**
5251 * Optional.
5252 * Propose buffer allocation parameters for upstream elements.
5253 * Subclasses should chain up to the parent implementation to
5254 * invoke the default handler.
5255 * @param query
5256 */
5257 vfunc_propose_allocation(query: Gst.Query): boolean;
5258 /**
5259 * Optional.
5260 * Allows subclass (decoder) to perform post-seek semantics reset.
5261 * Deprecated.
5262 * @param hard
5263 */
5264 vfunc_reset(hard: boolean): boolean;
5265 /**
5266 * Notifies subclass of incoming data format (caps).
5267 * @param state
5268 */
5269 vfunc_set_format(state: VideoCodecState): boolean;
5270 /**
5271 * Optional.
5272 * Event handler on the sink pad. This function should return
5273 * TRUE if the event was handled and should be discarded
5274 * (i.e. not unref'ed).
5275 * Subclasses should chain up to the parent implementation to
5276 * invoke the default handler.
5277 * @param event
5278 */
5279 vfunc_sink_event(event: Gst.Event): boolean;
5280 /**
5281 * Optional.
5282 * Query handler on the sink pad. This function should
5283 * return TRUE if the query could be performed. Subclasses
5284 * should chain up to the parent implementation to invoke the
5285 * default handler. Since: 1.4
5286 * @param query
5287 */
5288 vfunc_sink_query(query: Gst.Query): boolean;
5289 /**
5290 * Optional.
5291 * Event handler on the source pad. This function should return
5292 * TRUE if the event was handled and should be discarded
5293 * (i.e. not unref'ed).
5294 * Subclasses should chain up to the parent implementation to
5295 * invoke the default handler.
5296 * @param event
5297 */
5298 vfunc_src_event(event: Gst.Event): boolean;
5299 /**
5300 * Optional.
5301 * Query handler on the source pad. This function should
5302 * return TRUE if the query could be performed. Subclasses
5303 * should chain up to the parent implementation to invoke the
5304 * default handler. Since: 1.4
5305 * @param query
5306 */
5307 vfunc_src_query(query: Gst.Query): boolean;
5308 /**
5309 * Optional.
5310 * Called when the element starts processing.
5311 * Allows opening external resources.
5312 */
5313 vfunc_start(): boolean;
5314 /**
5315 * Optional.
5316 * Called when the element stops processing.
5317 * Allows closing external resources.
5318 */
5319 vfunc_stop(): boolean;
5320 /**
5321 * Optional. Transform the metadata on the input buffer to the
5322 * output buffer. By default this method is copies all meta without
5323 * tags and meta with only the "video" tag. subclasses can
5324 * implement this method and return %TRUE if the metadata is to be
5325 * copied. Since: 1.6
5326 * @param frame
5327 * @param meta
5328 */
5329 vfunc_transform_meta(frame: VideoCodecFrame, meta: Gst.Meta): boolean;
5330
5331 // Methods
5332
5333 /**
5334 * Removes next `n_bytes` of input data and adds it to currently parsed frame.
5335 * @param n_bytes the number of bytes to add
5336 */
5337 add_to_frame(n_bytes: number): void;
5338 /**
5339 * Helper function that allocates a buffer to hold a video frame for `decoder'`s
5340 * current #GstVideoCodecState.
5341 *
5342 * You should use gst_video_decoder_allocate_output_frame() instead of this
5343 * function, if possible at all.
5344 * @returns allocated buffer, or NULL if no buffer could be allocated (e.g. when downstream is flushing or shutting down)
5345 */
5346 allocate_output_buffer(): Gst.Buffer | null;
5347 /**
5348 * Helper function that allocates a buffer to hold a video frame for `decoder'`s
5349 * current #GstVideoCodecState. Subclass should already have configured video
5350 * state and set src pad caps.
5351 *
5352 * The buffer allocated here is owned by the frame and you should only
5353 * keep references to the frame, not the buffer.
5354 * @param frame a #GstVideoCodecFrame
5355 * @returns %GST_FLOW_OK if an output buffer could be allocated
5356 */
5357 allocate_output_frame(frame: VideoCodecFrame): Gst.FlowReturn;
5358 /**
5359 * Same as #gst_video_decoder_allocate_output_frame except it allows passing
5360 * #GstBufferPoolAcquireParams to the sub call gst_buffer_pool_acquire_buffer.
5361 * @param frame a #GstVideoCodecFrame
5362 * @param params a #GstBufferPoolAcquireParams
5363 * @returns %GST_FLOW_OK if an output buffer could be allocated
5364 */
5365 allocate_output_frame_with_params(
5366 frame: VideoCodecFrame,
5367 params: Gst.BufferPoolAcquireParams,
5368 ): Gst.FlowReturn;
5369 /**
5370 * Similar to gst_video_decoder_finish_frame(), but drops `frame` in any
5371 * case and posts a QoS message with the frame's details on the bus.
5372 * In any case, the frame is considered finished and released.
5373 * @param frame the #GstVideoCodecFrame to drop
5374 * @returns a #GstFlowReturn, usually GST_FLOW_OK.
5375 */
5376 drop_frame(frame: VideoCodecFrame): Gst.FlowReturn;
5377 /**
5378 * Drops input data.
5379 * The frame is not considered finished until the whole frame
5380 * is finished or dropped by the subclass.
5381 * @param frame the #GstVideoCodecFrame
5382 * @returns a #GstFlowReturn, usually GST_FLOW_OK.
5383 */
5384 drop_subframe(frame: VideoCodecFrame): Gst.FlowReturn;
5385 /**
5386 * `frame` should have a valid decoded data buffer, whose metadata fields
5387 * are then appropriately set according to frame data and pushed downstream.
5388 * If no output data is provided, `frame` is considered skipped.
5389 * In any case, the frame is considered finished and released.
5390 *
5391 * After calling this function the output buffer of the frame is to be
5392 * considered read-only. This function will also change the metadata
5393 * of the buffer.
5394 * @param frame a decoded #GstVideoCodecFrame
5395 * @returns a #GstFlowReturn resulting from sending data downstream
5396 */
5397 finish_frame(frame: VideoCodecFrame): Gst.FlowReturn;
5398 /**
5399 * Indicate that a subframe has been finished to be decoded
5400 * by the subclass. This method should be called for all subframes
5401 * except the last subframe where `gst_video_decoder_finish_frame`
5402 * should be called instead.
5403 * @param frame the #GstVideoCodecFrame
5404 * @returns a #GstFlowReturn, usually GST_FLOW_OK.
5405 */
5406 finish_subframe(frame: VideoCodecFrame): Gst.FlowReturn;
5407 /**
5408 * Lets #GstVideoDecoder sub-classes to know the memory `allocator`
5409 * used by the base class and its `params`.
5410 *
5411 * Unref the `allocator` after use it.
5412 */
5413 get_allocator(): [Gst.Allocator | null, Gst.AllocationParams | null];
5414 get_buffer_pool(): Gst.BufferPool | null;
5415 get_estimate_rate(): number;
5416 /**
5417 * Get a pending unfinished #GstVideoCodecFrame
5418 * @param frame_number system_frame_number of a frame
5419 * @returns pending unfinished #GstVideoCodecFrame identified by @frame_number.
5420 */
5421 get_frame(frame_number: number): VideoCodecFrame | null;
5422 /**
5423 * Get all pending unfinished #GstVideoCodecFrame
5424 * @returns pending unfinished #GstVideoCodecFrame.
5425 */
5426 get_frames(): VideoCodecFrame[];
5427 /**
5428 * Queries the number of the last subframe received by
5429 * the decoder baseclass in the `frame`.
5430 * @param frame the #GstVideoCodecFrame to update
5431 * @returns the current subframe index received in subframe mode, 1 otherwise.
5432 */
5433 get_input_subframe_index(frame: VideoCodecFrame): number;
5434 /**
5435 * Query the configured decoder latency. Results will be returned via
5436 * `min_latency` and `max_latency`.
5437 */
5438 get_latency(): [Gst.ClockTime | null, Gst.ClockTime | null];
5439 /**
5440 * Determines maximum possible decoding time for `frame` that will
5441 * allow it to decode and arrive in time (as determined by QoS events).
5442 * In particular, a negative result means decoding in time is no longer possible
5443 * and should therefore occur as soon/skippy as possible.
5444 * @param frame a #GstVideoCodecFrame
5445 * @returns max decoding time.
5446 */
5447 get_max_decode_time(frame: VideoCodecFrame): Gst.ClockTimeDiff;
5448 get_max_errors(): number;
5449 /**
5450 * Queries decoder required format handling.
5451 * @returns %TRUE if required format handling is enabled.
5452 */
5453 get_needs_format(): boolean;
5454 /**
5455 * Queries if the decoder requires a sync point before it starts outputting
5456 * data in the beginning.
5457 * @returns %TRUE if a sync point is required in the beginning.
5458 */
5459 get_needs_sync_point(): boolean;
5460 /**
5461 * Get the oldest pending unfinished #GstVideoCodecFrame
5462 * @returns oldest pending unfinished #GstVideoCodecFrame.
5463 */
5464 get_oldest_frame(): VideoCodecFrame | null;
5465 /**
5466 * Get the #GstVideoCodecState currently describing the output stream.
5467 * @returns #GstVideoCodecState describing format of video data.
5468 */
5469 get_output_state(): VideoCodecState | null;
5470 /**
5471 * Queries whether input data is considered packetized or not by the
5472 * base class.
5473 * @returns TRUE if input data is considered packetized.
5474 */
5475 get_packetized(): boolean;
5476 /**
5477 * Returns the number of bytes previously added to the current frame
5478 * by calling gst_video_decoder_add_to_frame().
5479 * @returns The number of bytes pending for the current frame
5480 */
5481 get_pending_frame_size(): number;
5482 /**
5483 * Queries the number of subframes in the frame processed by
5484 * the decoder baseclass.
5485 * @param frame the #GstVideoCodecFrame to update
5486 * @returns the current subframe processed received in subframe mode.
5487 */
5488 get_processed_subframe_index(frame: VideoCodecFrame): number;
5489 get_qos_proportion(): number;
5490 /**
5491 * Queries whether input data is considered as subframes or not by the
5492 * base class. If FALSE, each input buffer will be considered as a full
5493 * frame.
5494 * @returns TRUE if input data is considered as sub frames.
5495 */
5496 get_subframe_mode(): boolean;
5497 /**
5498 * Gathers all data collected for currently parsed frame, gathers corresponding
5499 * metadata and passes it along for further processing, i.e. `handle_frame`.
5500 * @returns a #GstFlowReturn
5501 */
5502 have_frame(): Gst.FlowReturn;
5503 /**
5504 * Indicates that the last subframe has been processed by the decoder
5505 * in `frame`. This will release the current frame in video decoder
5506 * allowing to receive new frames from upstream elements. This method
5507 * must be called in the subclass `handle_frame` callback.
5508 * @param frame the #GstVideoCodecFrame to update
5509 * @returns a #GstFlowReturn, usually GST_FLOW_OK.
5510 */
5511 have_last_subframe(frame: VideoCodecFrame): Gst.FlowReturn;
5512 /**
5513 * Sets the audio decoder tags and how they should be merged with any
5514 * upstream stream tags. This will override any tags previously-set
5515 * with gst_audio_decoder_merge_tags().
5516 *
5517 * Note that this is provided for convenience, and the subclass is
5518 * not required to use this and can still do tag handling on its own.
5519 *
5520 * MT safe.
5521 * @param tags a #GstTagList to merge, or NULL to unset previously-set tags
5522 * @param mode the #GstTagMergeMode to use, usually #GST_TAG_MERGE_REPLACE
5523 */
5524 merge_tags(tags: Gst.TagList | null, mode: Gst.TagMergeMode | null): void;
5525 /**
5526 * Negotiate with downstream elements to currently configured #GstVideoCodecState.
5527 * Unmark GST_PAD_FLAG_NEED_RECONFIGURE in any case. But mark it again if
5528 * negotiate fails.
5529 * @returns %TRUE if the negotiation succeeded, else %FALSE.
5530 */
5531 negotiate(): boolean;
5532 /**
5533 * Returns caps that express `caps` (or sink template caps if `caps` == NULL)
5534 * restricted to resolution/format/... combinations supported by downstream
5535 * elements.
5536 * @param caps initial caps
5537 * @param filter filter caps
5538 * @returns a #GstCaps owned by caller
5539 */
5540 proxy_getcaps(caps?: Gst.Caps | null, filter?: Gst.Caps | null): Gst.Caps;
5541 /**
5542 * Similar to gst_video_decoder_drop_frame(), but simply releases `frame`
5543 * without any processing other than removing it from list of pending frames,
5544 * after which it is considered finished and released.
5545 * @param frame the #GstVideoCodecFrame to release
5546 */
5547 release_frame(frame: VideoCodecFrame): void;
5548 /**
5549 * Allows the #GstVideoDecoder subclass to request from the base class that
5550 * a new sync should be requested from upstream, and that `frame` was the frame
5551 * when the subclass noticed that a new sync point is required. A reason for
5552 * the subclass to do this could be missing reference frames, for example.
5553 *
5554 * The base class will then request a new sync point from upstream as long as
5555 * the time that passed since the last one is exceeding
5556 * #GstVideoDecoder:min-force-key-unit-interval.
5557 *
5558 * The subclass can signal via `flags` how the frames until the next sync point
5559 * should be handled:
5560 *
5561 * * If %GST_VIDEO_DECODER_REQUEST_SYNC_POINT_DISCARD_INPUT is selected then
5562 * all following input frames until the next sync point are discarded.
5563 * This can be useful if the lack of a sync point will prevent all further
5564 * decoding and the decoder implementation is not very robust in handling
5565 * missing references frames.
5566 * * If %GST_VIDEO_DECODER_REQUEST_SYNC_POINT_CORRUPT_OUTPUT is selected
5567 * then all output frames following `frame` are marked as corrupted via
5568 * %GST_BUFFER_FLAG_CORRUPTED. Corrupted frames can be automatically
5569 * dropped by the base class, see #GstVideoDecoder:discard-corrupted-frames.
5570 * Subclasses can manually mark frames as corrupted via %GST_VIDEO_CODEC_FRAME_FLAG_CORRUPTED
5571 * before calling gst_video_decoder_finish_frame().
5572 * @param frame a #GstVideoCodecFrame
5573 * @param flags #GstVideoDecoderRequestSyncPointFlags
5574 */
5575 request_sync_point(frame: VideoCodecFrame, flags: VideoDecoderRequestSyncPointFlags | null): void;
5576 /**
5577 * Allows baseclass to perform byte to time estimated conversion.
5578 * @param enabled whether to enable byte to time conversion
5579 */
5580 set_estimate_rate(enabled: boolean): void;
5581 /**
5582 * Same as #gst_video_decoder_set_output_state() but also allows you to also set
5583 * the interlacing mode.
5584 * @param fmt a #GstVideoFormat
5585 * @param interlace_mode A #GstVideoInterlaceMode
5586 * @param width The width in pixels
5587 * @param height The height in pixels
5588 * @param reference An optional reference #GstVideoCodecState
5589 * @returns the newly configured output state.
5590 */
5591 set_interlaced_output_state(
5592 fmt: VideoFormat | null,
5593 interlace_mode: VideoInterlaceMode | null,
5594 width: number,
5595 height: number,
5596 reference?: VideoCodecState | null,
5597 ): VideoCodecState | null;
5598 /**
5599 * Lets #GstVideoDecoder sub-classes tell the baseclass what the decoder latency
5600 * is. If the provided values changed from previously provided ones, this will
5601 * also post a LATENCY message on the bus so the pipeline can reconfigure its
5602 * global latency.
5603 * @param min_latency minimum latency
5604 * @param max_latency maximum latency
5605 */
5606 set_latency(min_latency: Gst.ClockTime, max_latency: Gst.ClockTime): void;
5607 /**
5608 * Sets numbers of tolerated decoder errors, where a tolerated one is then only
5609 * warned about, but more than tolerated will lead to fatal error. You can set
5610 * -1 for never returning fatal errors. Default is set to
5611 * GST_VIDEO_DECODER_MAX_ERRORS.
5612 *
5613 * The '-1' option was added in 1.4
5614 * @param num max tolerated errors
5615 */
5616 set_max_errors(num: number): void;
5617 /**
5618 * Configures decoder format needs. If enabled, subclass needs to be
5619 * negotiated with format caps before it can process any data. It will then
5620 * never be handed any data before it has been configured.
5621 * Otherwise, it might be handed data without having been configured and
5622 * is then expected being able to do so either by default
5623 * or based on the input data.
5624 * @param enabled new state
5625 */
5626 set_needs_format(enabled: boolean): void;
5627 /**
5628 * Configures whether the decoder requires a sync point before it starts
5629 * outputting data in the beginning. If enabled, the base class will discard
5630 * all non-sync point frames in the beginning and after a flush and does not
5631 * pass it to the subclass.
5632 *
5633 * If the first frame is not a sync point, the base class will request a sync
5634 * point via the force-key-unit event.
5635 * @param enabled new state
5636 */
5637 set_needs_sync_point(enabled: boolean): void;
5638 /**
5639 * Creates a new #GstVideoCodecState with the specified `fmt,` `width` and `height`
5640 * as the output state for the decoder.
5641 * Any previously set output state on `decoder` will be replaced by the newly
5642 * created one.
5643 *
5644 * If the subclass wishes to copy over existing fields (like pixel aspec ratio,
5645 * or framerate) from an existing #GstVideoCodecState, it can be provided as a
5646 * `reference`.
5647 *
5648 * If the subclass wishes to override some fields from the output state (like
5649 * pixel-aspect-ratio or framerate) it can do so on the returned #GstVideoCodecState.
5650 *
5651 * The new output state will only take effect (set on pads and buffers) starting
5652 * from the next call to #gst_video_decoder_finish_frame().
5653 * @param fmt a #GstVideoFormat
5654 * @param width The width in pixels
5655 * @param height The height in pixels
5656 * @param reference An optional reference #GstVideoCodecState
5657 * @returns the newly configured output state.
5658 */
5659 set_output_state(
5660 fmt: VideoFormat | null,
5661 width: number,
5662 height: number,
5663 reference?: VideoCodecState | null,
5664 ): VideoCodecState | null;
5665 /**
5666 * Allows baseclass to consider input data as packetized or not. If the
5667 * input is packetized, then the `parse` method will not be called.
5668 * @param packetized whether the input data should be considered as packetized.
5669 */
5670 set_packetized(packetized: boolean): void;
5671 /**
5672 * If this is set to TRUE, it informs the base class that the subclass
5673 * can receive the data at a granularity lower than one frame.
5674 *
5675 * Note that in this mode, the subclass has two options. It can either
5676 * require the presence of a GST_VIDEO_BUFFER_FLAG_MARKER to mark the
5677 * end of a frame. Or it can operate in such a way that it will decode
5678 * a single frame at a time. In this second case, every buffer that
5679 * arrives to the element is considered part of the same frame until
5680 * gst_video_decoder_finish_frame() is called.
5681 *
5682 * In either case, the same #GstVideoCodecFrame will be passed to the
5683 * GstVideoDecoderClass:handle_frame vmethod repeatedly with a
5684 * different GstVideoCodecFrame:input_buffer every time until the end of the
5685 * frame has been signaled using either method.
5686 * This method must be called during the decoder subclass `set_format` call.
5687 * @param subframe_mode whether the input data should be considered as subframes.
5688 */
5689 set_subframe_mode(subframe_mode: boolean): void;
5690 /**
5691 * Lets #GstVideoDecoder sub-classes decide if they want the sink pad
5692 * to use the default pad query handler to reply to accept-caps queries.
5693 *
5694 * By setting this to true it is possible to further customize the default
5695 * handler with %GST_PAD_SET_ACCEPT_INTERSECT and
5696 * %GST_PAD_SET_ACCEPT_TEMPLATE
5697 * @param use if the default pad accept-caps query handling should be used
5698 */
5699 set_use_default_pad_acceptcaps(use: boolean): void;
5700 }
5701
5702 namespace VideoEncoder {
5703 // Constructor properties interface
5704
5705 interface ConstructorProps extends Gst.Element.ConstructorProps, Gst.Preset.ConstructorProps {
5706 min_force_key_unit_interval: number;
5707 minForceKeyUnitInterval: number;
5708 qos: boolean;
5709 }
5710 }
5711
5712 /**
5713 * This base class is for video encoders turning raw video into
5714 * encoded video data.
5715 *
5716 * GstVideoEncoder and subclass should cooperate as follows.
5717 *
5718 * ## Configuration
5719 *
5720 * * Initially, GstVideoEncoder calls `start` when the encoder element
5721 * is activated, which allows subclass to perform any global setup.
5722 * * GstVideoEncoder calls `set_format` to inform subclass of the format
5723 * of input video data that it is about to receive. Subclass should
5724 * setup for encoding and configure base class as appropriate
5725 * (e.g. latency). While unlikely, it might be called more than once,
5726 * if changing input parameters require reconfiguration. Baseclass
5727 * will ensure that processing of current configuration is finished.
5728 * * GstVideoEncoder calls `stop` at end of all processing.
5729 *
5730 * ## Data processing
5731 *
5732 * * Base class collects input data and metadata into a frame and hands
5733 * this to subclass' `handle_frame`.
5734 *
5735 * * If codec processing results in encoded data, subclass should call
5736 * `gst_video_encoder_finish_frame` to have encoded data pushed
5737 * downstream.
5738 *
5739 * * If implemented, baseclass calls subclass `pre_push` just prior to
5740 * pushing to allow subclasses to modify some metadata on the buffer.
5741 * If it returns GST_FLOW_OK, the buffer is pushed downstream.
5742 *
5743 * * GstVideoEncoderClass will handle both srcpad and sinkpad events.
5744 * Sink events will be passed to subclass if `event` callback has been
5745 * provided.
5746 *
5747 * ## Shutdown phase
5748 *
5749 * * GstVideoEncoder class calls `stop` to inform the subclass that data
5750 * parsing will be stopped.
5751 *
5752 * Subclass is responsible for providing pad template caps for
5753 * source and sink pads. The pads need to be named "sink" and "src". It should
5754 * also be able to provide fixed src pad caps in `getcaps` by the time it calls
5755 * `gst_video_encoder_finish_frame`.
5756 *
5757 * Things that subclass need to take care of:
5758 *
5759 * * Provide pad templates
5760 * * Provide source pad caps before pushing the first buffer
5761 * * Accept data in `handle_frame` and provide encoded results to
5762 * `gst_video_encoder_finish_frame`.
5763 *
5764 *
5765 * The #GstVideoEncoder:qos property will enable the Quality-of-Service
5766 * features of the encoder which gather statistics about the real-time
5767 * performance of the downstream elements. If enabled, subclasses can
5768 * use gst_video_encoder_get_max_encode_time() to check if input frames
5769 * are already late and drop them right away to give a chance to the
5770 * pipeline to catch up.
5771 */
5772 abstract class VideoEncoder extends Gst.Element implements Gst.Preset {
5773 static $gtype: GObject.GType<VideoEncoder>;
5774
5775 // Properties
5776
5777 /**
5778 * Minimum interval between force-keyunit requests in nanoseconds. See
5779 * gst_video_encoder_set_min_force_key_unit_interval() for more details.
5780 */
5781 get min_force_key_unit_interval(): number;
5782 set min_force_key_unit_interval(val: number);
5783 /**
5784 * Minimum interval between force-keyunit requests in nanoseconds. See
5785 * gst_video_encoder_set_min_force_key_unit_interval() for more details.
5786 */
5787 get minForceKeyUnitInterval(): number;
5788 set minForceKeyUnitInterval(val: number);
5789 get qos(): boolean;
5790 set qos(val: boolean);
5791
5792 // Constructors
5793
5794 constructor(properties?: Partial<VideoEncoder.ConstructorProps>, ...args: any[]);
5795
5796 _init(...args: any[]): void;
5797
5798 // Virtual methods
5799
5800 /**
5801 * Optional.
5802 * Called when the element changes to GST_STATE_NULL.
5803 * Allows closing external resources.
5804 */
5805 vfunc_close(): boolean;
5806 /**
5807 * Optional.
5808 * Setup the allocation parameters for allocating output
5809 * buffers. The passed in query contains the result of the
5810 * downstream allocation query.
5811 * Subclasses should chain up to the parent implementation to
5812 * invoke the default handler.
5813 * @param query
5814 */
5815 vfunc_decide_allocation(query: Gst.Query): boolean;
5816 /**
5817 * Optional.
5818 * Called to request subclass to dispatch any pending remaining
5819 * data (e.g. at EOS).
5820 */
5821 vfunc_finish(): Gst.FlowReturn;
5822 /**
5823 * Optional.
5824 * Flush all remaining data from the encoder without
5825 * pushing it downstream. Since: 1.2
5826 */
5827 vfunc_flush(): boolean;
5828 /**
5829 * Optional.
5830 * Allows for a custom sink getcaps implementation (e.g.
5831 * for multichannel input specification). If not implemented,
5832 * default returns gst_video_encoder_proxy_getcaps
5833 * applied to sink template caps.
5834 * @param filter
5835 */
5836 vfunc_getcaps(filter: Gst.Caps): Gst.Caps;
5837 /**
5838 * Provides input frame to subclass.
5839 * @param frame
5840 */
5841 vfunc_handle_frame(frame: VideoCodecFrame): Gst.FlowReturn;
5842 /**
5843 * Negotiate with downstream elements to currently configured #GstVideoCodecState.
5844 * Unmark GST_PAD_FLAG_NEED_RECONFIGURE in any case. But mark it again if
5845 * negotiate fails.
5846 */
5847 vfunc_negotiate(): boolean;
5848 /**
5849 * Optional.
5850 * Called when the element changes to GST_STATE_READY.
5851 * Allows opening external resources.
5852 */
5853 vfunc_open(): boolean;
5854 /**
5855 * Optional.
5856 * Allows subclass to push frame downstream in whatever
5857 * shape or form it deems appropriate. If not provided,
5858 * provided encoded frame data is simply pushed downstream.
5859 * @param frame
5860 */
5861 vfunc_pre_push(frame: VideoCodecFrame): Gst.FlowReturn;
5862 /**
5863 * Optional.
5864 * Propose buffer allocation parameters for upstream elements.
5865 * Subclasses should chain up to the parent implementation to
5866 * invoke the default handler.
5867 * @param query
5868 */
5869 vfunc_propose_allocation(query: Gst.Query): boolean;
5870 /**
5871 * Optional.
5872 * Allows subclass (encoder) to perform post-seek semantics reset.
5873 * Deprecated.
5874 * @param hard
5875 */
5876 vfunc_reset(hard: boolean): boolean;
5877 /**
5878 * Optional.
5879 * Notifies subclass of incoming data format.
5880 * GstVideoCodecState fields have already been
5881 * set according to provided caps.
5882 * @param state
5883 */
5884 vfunc_set_format(state: VideoCodecState): boolean;
5885 /**
5886 * Optional.
5887 * Event handler on the sink pad. This function should return
5888 * TRUE if the event was handled and should be discarded
5889 * (i.e. not unref'ed).
5890 * Subclasses should chain up to the parent implementation to
5891 * invoke the default handler.
5892 * @param event
5893 */
5894 vfunc_sink_event(event: Gst.Event): boolean;
5895 /**
5896 * Optional.
5897 * Query handler on the sink pad. This function should
5898 * return TRUE if the query could be performed. Subclasses
5899 * should chain up to the parent implementation to invoke the
5900 * default handler. Since: 1.4
5901 * @param query
5902 */
5903 vfunc_sink_query(query: Gst.Query): boolean;
5904 /**
5905 * Optional.
5906 * Event handler on the source pad. This function should return
5907 * TRUE if the event was handled and should be discarded
5908 * (i.e. not unref'ed).
5909 * Subclasses should chain up to the parent implementation to
5910 * invoke the default handler.
5911 * @param event
5912 */
5913 vfunc_src_event(event: Gst.Event): boolean;
5914 /**
5915 * Optional.
5916 * Query handler on the source pad. This function should
5917 * return TRUE if the query could be performed. Subclasses
5918 * should chain up to the parent implementation to invoke the
5919 * default handler. Since: 1.4
5920 * @param query
5921 */
5922 vfunc_src_query(query: Gst.Query): boolean;
5923 /**
5924 * Optional.
5925 * Called when the element starts processing.
5926 * Allows opening external resources.
5927 */
5928 vfunc_start(): boolean;
5929 /**
5930 * Optional.
5931 * Called when the element stops processing.
5932 * Allows closing external resources.
5933 */
5934 vfunc_stop(): boolean;
5935 /**
5936 * Optional. Transform the metadata on the input buffer to the
5937 * output buffer. By default this method is copies all meta without
5938 * tags and meta with only the "video" tag. subclasses can
5939 * implement this method and return %TRUE if the metadata is to be
5940 * copied. Since: 1.6
5941 * @param frame
5942 * @param meta
5943 */
5944 vfunc_transform_meta(frame: VideoCodecFrame, meta: Gst.Meta): boolean;
5945
5946 // Methods
5947
5948 /**
5949 * Helper function that allocates a buffer to hold an encoded video frame
5950 * for `encoder'`s current #GstVideoCodecState.
5951 * @param size size of the buffer
5952 * @returns allocated buffer
5953 */
5954 allocate_output_buffer(size: number): Gst.Buffer;
5955 /**
5956 * Helper function that allocates a buffer to hold an encoded video frame for `encoder'`s
5957 * current #GstVideoCodecState. Subclass should already have configured video
5958 * state and set src pad caps.
5959 *
5960 * The buffer allocated here is owned by the frame and you should only
5961 * keep references to the frame, not the buffer.
5962 * @param frame a #GstVideoCodecFrame
5963 * @param size size of the buffer
5964 * @returns %GST_FLOW_OK if an output buffer could be allocated
5965 */
5966 allocate_output_frame(frame: VideoCodecFrame, size: number): Gst.FlowReturn;
5967 /**
5968 * `frame` must have a valid encoded data buffer, whose metadata fields
5969 * are then appropriately set according to frame data or no buffer at
5970 * all if the frame should be dropped.
5971 * It is subsequently pushed downstream or provided to `pre_push`.
5972 * In any case, the frame is considered finished and released.
5973 *
5974 * After calling this function the output buffer of the frame is to be
5975 * considered read-only. This function will also change the metadata
5976 * of the buffer.
5977 * @param frame an encoded #GstVideoCodecFrame
5978 * @returns a #GstFlowReturn resulting from sending data downstream
5979 */
5980 finish_frame(frame: VideoCodecFrame): Gst.FlowReturn;
5981 /**
5982 * If multiple subframes are produced for one input frame then use this method
5983 * for each subframe, except for the last one. Before calling this function,
5984 * you need to fill frame->output_buffer with the encoded buffer to push.
5985 *
5986 * You must call #gst_video_encoder_finish_frame() for the last sub-frame
5987 * to tell the encoder that the frame has been fully encoded.
5988 *
5989 * This function will change the metadata of `frame` and frame->output_buffer
5990 * will be pushed downstream.
5991 * @param frame a #GstVideoCodecFrame being encoded
5992 * @returns a #GstFlowReturn resulting from pushing the buffer downstream.
5993 */
5994 finish_subframe(frame: VideoCodecFrame): Gst.FlowReturn;
5995 /**
5996 * Lets #GstVideoEncoder sub-classes to know the memory `allocator`
5997 * used by the base class and its `params`.
5998 *
5999 * Unref the `allocator` after use it.
6000 */
6001 get_allocator(): [Gst.Allocator | null, Gst.AllocationParams | null];
6002 /**
6003 * Get a pending unfinished #GstVideoCodecFrame
6004 * @param frame_number system_frame_number of a frame
6005 * @returns pending unfinished #GstVideoCodecFrame identified by @frame_number.
6006 */
6007 get_frame(frame_number: number): VideoCodecFrame | null;
6008 /**
6009 * Get all pending unfinished #GstVideoCodecFrame
6010 * @returns pending unfinished #GstVideoCodecFrame.
6011 */
6012 get_frames(): VideoCodecFrame[];
6013 /**
6014 * Query the configured encoding latency. Results will be returned via
6015 * `min_latency` and `max_latency`.
6016 */
6017 get_latency(): [Gst.ClockTime | null, Gst.ClockTime | null];
6018 /**
6019 * Determines maximum possible encoding time for `frame` that will
6020 * allow it to encode and arrive in time (as determined by QoS events).
6021 * In particular, a negative result means encoding in time is no longer possible
6022 * and should therefore occur as soon/skippy as possible.
6023 *
6024 * If no QoS events have been received from downstream, or if
6025 * #GstVideoEncoder:qos is disabled this function returns #G_MAXINT64.
6026 * @param frame a #GstVideoCodecFrame
6027 * @returns max decoding time.
6028 */
6029 get_max_encode_time(frame: VideoCodecFrame): Gst.ClockTimeDiff;
6030 /**
6031 * Returns the minimum force-keyunit interval, see gst_video_encoder_set_min_force_key_unit_interval()
6032 * for more details.
6033 * @returns the minimum force-keyunit interval
6034 */
6035 get_min_force_key_unit_interval(): Gst.ClockTime;
6036 /**
6037 * Get the oldest unfinished pending #GstVideoCodecFrame
6038 * @returns oldest unfinished pending #GstVideoCodecFrame
6039 */
6040 get_oldest_frame(): VideoCodecFrame | null;
6041 /**
6042 * Get the current #GstVideoCodecState
6043 * @returns #GstVideoCodecState describing format of video data.
6044 */
6045 get_output_state(): VideoCodecState | null;
6046 /**
6047 * Checks if `encoder` is currently configured to handle Quality-of-Service
6048 * events from downstream.
6049 * @returns %TRUE if the encoder is configured to perform Quality-of-Service.
6050 */
6051 is_qos_enabled(): boolean;
6052 /**
6053 * Sets the video encoder tags and how they should be merged with any
6054 * upstream stream tags. This will override any tags previously-set
6055 * with gst_video_encoder_merge_tags().
6056 *
6057 * Note that this is provided for convenience, and the subclass is
6058 * not required to use this and can still do tag handling on its own.
6059 *
6060 * MT safe.
6061 * @param tags a #GstTagList to merge, or NULL to unset previously-set tags
6062 * @param mode the #GstTagMergeMode to use, usually #GST_TAG_MERGE_REPLACE
6063 */
6064 merge_tags(tags: Gst.TagList | null, mode: Gst.TagMergeMode | null): void;
6065 /**
6066 * Negotiate with downstream elements to currently configured #GstVideoCodecState.
6067 * Unmark GST_PAD_FLAG_NEED_RECONFIGURE in any case. But mark it again if
6068 * negotiate fails.
6069 * @returns %TRUE if the negotiation succeeded, else %FALSE.
6070 */
6071 negotiate(): boolean;
6072 /**
6073 * Returns caps that express `caps` (or sink template caps if `caps` == NULL)
6074 * restricted to resolution/format/... combinations supported by downstream
6075 * elements (e.g. muxers).
6076 * @param caps initial caps
6077 * @param filter filter caps
6078 * @returns a #GstCaps owned by caller
6079 */
6080 proxy_getcaps(caps?: Gst.Caps | null, filter?: Gst.Caps | null): Gst.Caps;
6081 /**
6082 * Set the codec headers to be sent downstream whenever requested.
6083 * @param headers a list of #GstBuffer containing the codec header
6084 */
6085 set_headers(headers: Gst.Buffer[]): void;
6086 /**
6087 * Informs baseclass of encoding latency. If the provided values changed from
6088 * previously provided ones, this will also post a LATENCY message on the bus
6089 * so the pipeline can reconfigure its global latency.
6090 * @param min_latency minimum latency
6091 * @param max_latency maximum latency
6092 */
6093 set_latency(min_latency: Gst.ClockTime, max_latency: Gst.ClockTime): void;
6094 /**
6095 * Sets the minimum interval for requesting keyframes based on force-keyunit
6096 * events. Setting this to 0 will allow to handle every event, setting this to
6097 * %GST_CLOCK_TIME_NONE causes force-keyunit events to be ignored.
6098 * @param interval minimum interval
6099 */
6100 set_min_force_key_unit_interval(interval: Gst.ClockTime): void;
6101 /**
6102 * Request minimal value for PTS passed to handle_frame.
6103 *
6104 * For streams with reordered frames this can be used to ensure that there
6105 * is enough time to accommodate first DTS, which may be less than first PTS
6106 * @param min_pts minimal PTS that will be passed to handle_frame
6107 */
6108 set_min_pts(min_pts: Gst.ClockTime): void;
6109 /**
6110 * Creates a new #GstVideoCodecState with the specified caps as the output state
6111 * for the encoder.
6112 * Any previously set output state on `encoder` will be replaced by the newly
6113 * created one.
6114 *
6115 * The specified `caps` should not contain any resolution, pixel-aspect-ratio,
6116 * framerate, codec-data, .... Those should be specified instead in the returned
6117 * #GstVideoCodecState.
6118 *
6119 * If the subclass wishes to copy over existing fields (like pixel aspect ratio,
6120 * or framerate) from an existing #GstVideoCodecState, it can be provided as a
6121 * `reference`.
6122 *
6123 * If the subclass wishes to override some fields from the output state (like
6124 * pixel-aspect-ratio or framerate) it can do so on the returned #GstVideoCodecState.
6125 *
6126 * The new output state will only take effect (set on pads and buffers) starting
6127 * from the next call to #gst_video_encoder_finish_frame().
6128 * @param caps the #GstCaps to use for the output
6129 * @param reference An optional reference @GstVideoCodecState
6130 * @returns the newly configured output state.
6131 */
6132 set_output_state(caps: Gst.Caps, reference?: VideoCodecState | null): VideoCodecState | null;
6133 /**
6134 * Configures `encoder` to handle Quality-of-Service events from downstream.
6135 * @param enabled the new qos value.
6136 */
6137 set_qos_enabled(enabled: boolean): void;
6138
6139 // Inherited methods
6140 /**
6141 * Delete the given preset.
6142 * @param name preset name to remove
6143 * @returns %TRUE for success, %FALSE if e.g. there is no preset with that @name
6144 */
6145 delete_preset(name: string): boolean;
6146 /**
6147 * Gets the `value` for an existing meta data `tag`. Meta data `tag` names can be
6148 * something like e.g. "comment". Returned values need to be released when done.
6149 * @param name preset name
6150 * @param tag meta data item name
6151 * @returns %TRUE for success, %FALSE if e.g. there is no preset with that @name or no value for the given @tag
6152 */
6153 get_meta(name: string, tag: string): [boolean, string];
6154 /**
6155 * Get a copy of preset names as a %NULL terminated string array.
6156 * @returns list with names, use g_strfreev() after usage.
6157 */
6158 get_preset_names(): string[];
6159 /**
6160 * Get a the names of the GObject properties that can be used for presets.
6161 * @returns an array of property names which should be freed with g_strfreev() after use.
6162 */
6163 get_property_names(): string[];
6164 /**
6165 * Check if one can add new presets, change existing ones and remove presets.
6166 * @returns %TRUE if presets are editable or %FALSE if they are static
6167 */
6168 is_editable(): boolean;
6169 /**
6170 * Load the given preset.
6171 * @param name preset name to load
6172 * @returns %TRUE for success, %FALSE if e.g. there is no preset with that @name
6173 */
6174 load_preset(name: string): boolean;
6175 /**
6176 * Renames a preset. If there is already a preset by the `new_name` it will be
6177 * overwritten.
6178 * @param old_name current preset name
6179 * @param new_name new preset name
6180 * @returns %TRUE for success, %FALSE if e.g. there is no preset with @old_name
6181 */
6182 rename_preset(old_name: string, new_name: string): boolean;
6183 /**
6184 * Save the current object settings as a preset under the given name. If there
6185 * is already a preset by this `name` it will be overwritten.
6186 * @param name preset name to save
6187 * @returns %TRUE for success, %FALSE
6188 */
6189 save_preset(name: string): boolean;
6190 /**
6191 * Sets a new `value` for an existing meta data item or adds a new item. Meta
6192 * data `tag` names can be something like e.g. "comment". Supplying %NULL for the
6193 * `value` will unset an existing value.
6194 * @param name preset name
6195 * @param tag meta data item name
6196 * @param value new value
6197 * @returns %TRUE for success, %FALSE if e.g. there is no preset with that @name
6198 */
6199 set_meta(name: string, tag: string, value?: string | null): boolean;
6200 /**
6201 * Delete the given preset.
6202 * @param name preset name to remove
6203 */
6204 vfunc_delete_preset(name: string): boolean;
6205 /**
6206 * Gets the `value` for an existing meta data `tag`. Meta data `tag` names can be
6207 * something like e.g. "comment". Returned values need to be released when done.
6208 * @param name preset name
6209 * @param tag meta data item name
6210 */
6211 vfunc_get_meta(name: string, tag: string): [boolean, string];
6212 /**
6213 * Get a copy of preset names as a %NULL terminated string array.
6214 */
6215 vfunc_get_preset_names(): string[];
6216 /**
6217 * Get a the names of the GObject properties that can be used for presets.
6218 */
6219 vfunc_get_property_names(): string[];
6220 /**
6221 * Load the given preset.
6222 * @param name preset name to load
6223 */
6224 vfunc_load_preset(name: string): boolean;
6225 /**
6226 * Renames a preset. If there is already a preset by the `new_name` it will be
6227 * overwritten.
6228 * @param old_name current preset name
6229 * @param new_name new preset name
6230 */
6231 vfunc_rename_preset(old_name: string, new_name: string): boolean;
6232 /**
6233 * Save the current object settings as a preset under the given name. If there
6234 * is already a preset by this `name` it will be overwritten.
6235 * @param name preset name to save
6236 */
6237 vfunc_save_preset(name: string): boolean;
6238 /**
6239 * Sets a new `value` for an existing meta data item or adds a new item. Meta
6240 * data `tag` names can be something like e.g. "comment". Supplying %NULL for the
6241 * `value` will unset an existing value.
6242 * @param name preset name
6243 * @param tag meta data item name
6244 * @param value new value
6245 */
6246 vfunc_set_meta(name: string, tag: string, value?: string | null): boolean;
6247 /**
6248 * Creates a binding between `source_property` on `source` and `target_property`
6249 * on `target`.
6250 *
6251 * Whenever the `source_property` is changed the `target_property` is
6252 * updated using the same value. For instance:
6253 *
6254 *
6255 * ```c
6256 * g_object_bind_property (action, "active", widget, "sensitive", 0);
6257 * ```
6258 *
6259 *
6260 * Will result in the "sensitive" property of the widget #GObject instance to be
6261 * updated with the same value of the "active" property of the action #GObject
6262 * instance.
6263 *
6264 * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
6265 * if `target_property` on `target` changes then the `source_property` on `source`
6266 * will be updated as well.
6267 *
6268 * The binding will automatically be removed when either the `source` or the
6269 * `target` instances are finalized. To remove the binding without affecting the
6270 * `source` and the `target` you can just call g_object_unref() on the returned
6271 * #GBinding instance.
6272 *
6273 * Removing the binding by calling g_object_unref() on it must only be done if
6274 * the binding, `source` and `target` are only used from a single thread and it
6275 * is clear that both `source` and `target` outlive the binding. Especially it
6276 * is not safe to rely on this if the binding, `source` or `target` can be
6277 * finalized from different threads. Keep another reference to the binding and
6278 * use g_binding_unbind() instead to be on the safe side.
6279 *
6280 * A #GObject can have multiple bindings.
6281 * @param source_property the property on @source to bind
6282 * @param target the target #GObject
6283 * @param target_property the property on @target to bind
6284 * @param flags flags to pass to #GBinding
6285 * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
6286 */
6287 bind_property(
6288 source_property: string,
6289 target: GObject.Object,
6290 target_property: string,
6291 flags: GObject.BindingFlags | null,
6292 ): GObject.Binding;
6293 /**
6294 * Complete version of g_object_bind_property().
6295 *
6296 * Creates a binding between `source_property` on `source` and `target_property`
6297 * on `target,` allowing you to set the transformation functions to be used by
6298 * the binding.
6299 *
6300 * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
6301 * if `target_property` on `target` changes then the `source_property` on `source`
6302 * will be updated as well. The `transform_from` function is only used in case
6303 * of bidirectional bindings, otherwise it will be ignored
6304 *
6305 * The binding will automatically be removed when either the `source` or the
6306 * `target` instances are finalized. This will release the reference that is
6307 * being held on the #GBinding instance; if you want to hold on to the
6308 * #GBinding instance, you will need to hold a reference to it.
6309 *
6310 * To remove the binding, call g_binding_unbind().
6311 *
6312 * A #GObject can have multiple bindings.
6313 *
6314 * The same `user_data` parameter will be used for both `transform_to`
6315 * and `transform_from` transformation functions; the `notify` function will
6316 * be called once, when the binding is removed. If you need different data
6317 * for each transformation function, please use
6318 * g_object_bind_property_with_closures() instead.
6319 * @param source_property the property on @source to bind
6320 * @param target the target #GObject
6321 * @param target_property the property on @target to bind
6322 * @param flags flags to pass to #GBinding
6323 * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
6324 * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
6325 * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
6326 * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
6327 */
6328 bind_property_full(
6329 source_property: string,
6330 target: GObject.Object,
6331 target_property: string,
6332 flags: GObject.BindingFlags | null,
6333 transform_to?: GObject.BindingTransformFunc | null,
6334 transform_from?: GObject.BindingTransformFunc | null,
6335 notify?: GLib.DestroyNotify | null,
6336 ): GObject.Binding;
6337 // Conflicted with GObject.Object.bind_property_full
6338 bind_property_full(...args: never[]): any;
6339 /**
6340 * This function is intended for #GObject implementations to re-enforce
6341 * a [floating][floating-ref] object reference. Doing this is seldom
6342 * required: all #GInitiallyUnowneds are created with a floating reference
6343 * which usually just needs to be sunken by calling g_object_ref_sink().
6344 */
6345 force_floating(): void;
6346 /**
6347 * Increases the freeze count on `object`. If the freeze count is
6348 * non-zero, the emission of "notify" signals on `object` is
6349 * stopped. The signals are queued until the freeze count is decreased
6350 * to zero. Duplicate notifications are squashed so that at most one
6351 * #GObject::notify signal is emitted for each property modified while the
6352 * object is frozen.
6353 *
6354 * This is necessary for accessors that modify multiple properties to prevent
6355 * premature notification while the object is still being modified.
6356 */
6357 freeze_notify(): void;
6358 /**
6359 * Gets a named field from the objects table of associations (see g_object_set_data()).
6360 * @param key name of the key for that association
6361 * @returns the data if found, or %NULL if no such data exists.
6362 */
6363 get_data(key: string): any | null;
6364 /**
6365 * Gets a property of an object.
6366 *
6367 * The value can be:
6368 * - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
6369 * - a GObject.Value initialized with the expected type of the property
6370 * - a GObject.Value initialized with a type to which the expected type of the property can be transformed
6371 *
6372 * In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
6373 *
6374 * Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
6375 * @param property_name The name of the property to get
6376 * @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
6377 */
6378 get_property(property_name: string, value: GObject.Value | any): any;
6379 /**
6380 * This function gets back user data pointers stored via
6381 * g_object_set_qdata().
6382 * @param quark A #GQuark, naming the user data pointer
6383 * @returns The user data pointer set, or %NULL
6384 */
6385 get_qdata(quark: GLib.Quark): any | null;
6386 /**
6387 * Gets `n_properties` properties for an `object`.
6388 * Obtained properties will be set to `values`. All properties must be valid.
6389 * Warnings will be emitted and undefined behaviour may result if invalid
6390 * properties are passed in.
6391 * @param names the names of each property to get
6392 * @param values the values of each property to get
6393 */
6394 getv(names: string[], values: (GObject.Value | any)[]): void;
6395 /**
6396 * Checks whether `object` has a [floating][floating-ref] reference.
6397 * @returns %TRUE if @object has a floating reference
6398 */
6399 is_floating(): boolean;
6400 /**
6401 * Emits a "notify" signal for the property `property_name` on `object`.
6402 *
6403 * When possible, eg. when signaling a property change from within the class
6404 * that registered the property, you should use g_object_notify_by_pspec()
6405 * instead.
6406 *
6407 * Note that emission of the notify signal may be blocked with
6408 * g_object_freeze_notify(). In this case, the signal emissions are queued
6409 * and will be emitted (in reverse order) when g_object_thaw_notify() is
6410 * called.
6411 * @param property_name the name of a property installed on the class of @object.
6412 */
6413 notify(property_name: string): void;
6414 /**
6415 * Emits a "notify" signal for the property specified by `pspec` on `object`.
6416 *
6417 * This function omits the property name lookup, hence it is faster than
6418 * g_object_notify().
6419 *
6420 * One way to avoid using g_object_notify() from within the
6421 * class that registered the properties, and using g_object_notify_by_pspec()
6422 * instead, is to store the GParamSpec used with
6423 * g_object_class_install_property() inside a static array, e.g.:
6424 *
6425 *
6426 * ```c
6427 * typedef enum
6428 * {
6429 * PROP_FOO = 1,
6430 * PROP_LAST
6431 * } MyObjectProperty;
6432 *
6433 * static GParamSpec *properties[PROP_LAST];
6434 *
6435 * static void
6436 * my_object_class_init (MyObjectClass *klass)
6437 * {
6438 * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
6439 * 0, 100,
6440 * 50,
6441 * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
6442 * g_object_class_install_property (gobject_class,
6443 * PROP_FOO,
6444 * properties[PROP_FOO]);
6445 * }
6446 * ```
6447 *
6448 *
6449 * and then notify a change on the "foo" property with:
6450 *
6451 *
6452 * ```c
6453 * g_object_notify_by_pspec (self, properties[PROP_FOO]);
6454 * ```
6455 *
6456 * @param pspec the #GParamSpec of a property installed on the class of @object.
6457 */
6458 notify_by_pspec(pspec: GObject.ParamSpec): void;
6459 /**
6460 * Increases the reference count of `object`.
6461 *
6462 * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
6463 * of `object` will be propagated to the return type (using the GCC typeof()
6464 * extension), so any casting the caller needs to do on the return type must be
6465 * explicit.
6466 * @returns the same @object
6467 */
6468 ref(): GObject.Object;
6469 // Conflicted with Gst.Object.ref
6470 ref(...args: never[]): any;
6471 /**
6472 * Increase the reference count of `object,` and possibly remove the
6473 * [floating][floating-ref] reference, if `object` has a floating reference.
6474 *
6475 * In other words, if the object is floating, then this call "assumes
6476 * ownership" of the floating reference, converting it to a normal
6477 * reference by clearing the floating flag while leaving the reference
6478 * count unchanged. If the object is not floating, then this call
6479 * adds a new normal reference increasing the reference count by one.
6480 *
6481 * Since GLib 2.56, the type of `object` will be propagated to the return type
6482 * under the same conditions as for g_object_ref().
6483 * @returns @object
6484 */
6485 ref_sink(): GObject.Object;
6486 /**
6487 * Releases all references to other objects. This can be used to break
6488 * reference cycles.
6489 *
6490 * This function should only be called from object system implementations.
6491 */
6492 run_dispose(): void;
6493 /**
6494 * Each object carries around a table of associations from
6495 * strings to pointers. This function lets you set an association.
6496 *
6497 * If the object already had an association with that name,
6498 * the old association will be destroyed.
6499 *
6500 * Internally, the `key` is converted to a #GQuark using g_quark_from_string().
6501 * This means a copy of `key` is kept permanently (even after `object` has been
6502 * finalized) — so it is recommended to only use a small, bounded set of values
6503 * for `key` in your program, to avoid the #GQuark storage growing unbounded.
6504 * @param key name of the key
6505 * @param data data to associate with that key
6506 */
6507 set_data(key: string, data?: any | null): void;
6508 /**
6509 * Sets a property on an object.
6510 * @param property_name The name of the property to set
6511 * @param value The value to set the property to
6512 */
6513 set_property(property_name: string, value: GObject.Value | any): void;
6514 /**
6515 * Remove a specified datum from the object's data associations,
6516 * without invoking the association's destroy handler.
6517 * @param key name of the key
6518 * @returns the data if found, or %NULL if no such data exists.
6519 */
6520 steal_data(key: string): any | null;
6521 /**
6522 * This function gets back user data pointers stored via
6523 * g_object_set_qdata() and removes the `data` from object
6524 * without invoking its destroy() function (if any was
6525 * set).
6526 * Usually, calling this function is only required to update
6527 * user data pointers with a destroy notifier, for example:
6528 *
6529 * ```c
6530 * void
6531 * object_add_to_user_list (GObject *object,
6532 * const gchar *new_string)
6533 * {
6534 * // the quark, naming the object data
6535 * GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
6536 * // retrieve the old string list
6537 * GList *list = g_object_steal_qdata (object, quark_string_list);
6538 *
6539 * // prepend new string
6540 * list = g_list_prepend (list, g_strdup (new_string));
6541 * // this changed 'list', so we need to set it again
6542 * g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
6543 * }
6544 * static void
6545 * free_string_list (gpointer data)
6546 * {
6547 * GList *node, *list = data;
6548 *
6549 * for (node = list; node; node = node->next)
6550 * g_free (node->data);
6551 * g_list_free (list);
6552 * }
6553 * ```
6554 *
6555 * Using g_object_get_qdata() in the above example, instead of
6556 * g_object_steal_qdata() would have left the destroy function set,
6557 * and thus the partial string list would have been freed upon
6558 * g_object_set_qdata_full().
6559 * @param quark A #GQuark, naming the user data pointer
6560 * @returns The user data pointer set, or %NULL
6561 */
6562 steal_qdata(quark: GLib.Quark): any | null;
6563 /**
6564 * Reverts the effect of a previous call to
6565 * g_object_freeze_notify(). The freeze count is decreased on `object`
6566 * and when it reaches zero, queued "notify" signals are emitted.
6567 *
6568 * Duplicate notifications for each property are squashed so that at most one
6569 * #GObject::notify signal is emitted for each property, in the reverse order
6570 * in which they have been queued.
6571 *
6572 * It is an error to call this function when the freeze count is zero.
6573 */
6574 thaw_notify(): void;
6575 /**
6576 * Decreases the reference count of `object`. When its reference count
6577 * drops to 0, the object is finalized (i.e. its memory is freed).
6578 *
6579 * If the pointer to the #GObject may be reused in future (for example, if it is
6580 * an instance variable of another object), it is recommended to clear the
6581 * pointer to %NULL rather than retain a dangling pointer to a potentially
6582 * invalid #GObject instance. Use g_clear_object() for this.
6583 */
6584 unref(): void;
6585 /**
6586 * This function essentially limits the life time of the `closure` to
6587 * the life time of the object. That is, when the object is finalized,
6588 * the `closure` is invalidated by calling g_closure_invalidate() on
6589 * it, in order to prevent invocations of the closure with a finalized
6590 * (nonexisting) object. Also, g_object_ref() and g_object_unref() are
6591 * added as marshal guards to the `closure,` to ensure that an extra
6592 * reference count is held on `object` during invocation of the
6593 * `closure`. Usually, this function will be called on closures that
6594 * use this `object` as closure data.
6595 * @param closure #GClosure to watch
6596 */
6597 watch_closure(closure: GObject.Closure): void;
6598 /**
6599 * the `constructed` function is called by g_object_new() as the
6600 * final step of the object creation process. At the point of the call, all
6601 * construction properties have been set on the object. The purpose of this
6602 * call is to allow for object initialisation steps that can only be performed
6603 * after construction properties have been set. `constructed` implementors
6604 * should chain up to the `constructed` call of their parent class to allow it
6605 * to complete its initialisation.
6606 */
6607 vfunc_constructed(): void;
6608 /**
6609 * emits property change notification for a bunch
6610 * of properties. Overriding `dispatch_properties_changed` should be rarely
6611 * needed.
6612 * @param n_pspecs
6613 * @param pspecs
6614 */
6615 vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
6616 /**
6617 * the `dispose` function is supposed to drop all references to other
6618 * objects, but keep the instance otherwise intact, so that client method
6619 * invocations still work. It may be run multiple times (due to reference
6620 * loops). Before returning, `dispose` should chain up to the `dispose` method
6621 * of the parent class.
6622 */
6623 vfunc_dispose(): void;
6624 /**
6625 * instance finalization function, should finish the finalization of
6626 * the instance begun in `dispose` and chain up to the `finalize` method of the
6627 * parent class.
6628 */
6629 vfunc_finalize(): void;
6630 /**
6631 * the generic getter for all properties of this type. Should be
6632 * overridden for every type with properties.
6633 * @param property_id
6634 * @param value
6635 * @param pspec
6636 */
6637 vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
6638 /**
6639 * Emits a "notify" signal for the property `property_name` on `object`.
6640 *
6641 * When possible, eg. when signaling a property change from within the class
6642 * that registered the property, you should use g_object_notify_by_pspec()
6643 * instead.
6644 *
6645 * Note that emission of the notify signal may be blocked with
6646 * g_object_freeze_notify(). In this case, the signal emissions are queued
6647 * and will be emitted (in reverse order) when g_object_thaw_notify() is
6648 * called.
6649 * @param pspec
6650 */
6651 vfunc_notify(pspec: GObject.ParamSpec): void;
6652 /**
6653 * the generic setter for all properties of this type. Should be
6654 * overridden for every type with properties. If implementations of
6655 * `set_property` don't emit property change notification explicitly, this will
6656 * be done implicitly by the type system. However, if the notify signal is
6657 * emitted explicitly, the type system will not emit it a second time.
6658 * @param property_id
6659 * @param value
6660 * @param pspec
6661 */
6662 vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
6663 /**
6664 * Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
6665 * @param id Handler ID of the handler to be disconnected
6666 */
6667 disconnect(id: number): void;
6668 /**
6669 * Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
6670 * @param properties Object containing the properties to set
6671 */
6672 set(properties: { [key: string]: any }): void;
6673 /**
6674 * Blocks a handler of an instance so it will not be called during any signal emissions
6675 * @param id Handler ID of the handler to be blocked
6676 */
6677 block_signal_handler(id: number): void;
6678 /**
6679 * Unblocks a handler so it will be called again during any signal emissions
6680 * @param id Handler ID of the handler to be unblocked
6681 */
6682 unblock_signal_handler(id: number): void;
6683 /**
6684 * Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
6685 * @param detailedName Name of the signal to stop emission of
6686 */
6687 stop_emission_by_name(detailedName: string): void;
6688 }
6689
6690 namespace VideoFilter {
6691 // Constructor properties interface
6692
6693 interface ConstructorProps extends GstBase.BaseTransform.ConstructorProps {}
6694 }
6695
6696 /**
6697 * Provides useful functions and a base class for video filters.
6698 *
6699 * The videofilter will by default enable QoS on the parent GstBaseTransform
6700 * to implement frame dropping.
6701 */
6702 abstract class VideoFilter extends GstBase.BaseTransform {
6703 static $gtype: GObject.GType<VideoFilter>;
6704
6705 // Fields
6706
6707 element: GstBase.BaseTransform;
6708 negotiated: boolean;
6709
6710 // Constructors
6711
6712 constructor(properties?: Partial<VideoFilter.ConstructorProps>, ...args: any[]);
6713
6714 _init(...args: any[]): void;
6715
6716 // Virtual methods
6717
6718 /**
6719 * function to be called with the negotiated caps and video infos
6720 * @param incaps
6721 * @param in_info
6722 * @param outcaps
6723 * @param out_info
6724 */
6725 vfunc_set_info(incaps: Gst.Caps, in_info: VideoInfo, outcaps: Gst.Caps, out_info: VideoInfo): boolean;
6726 /**
6727 * transform a video frame
6728 * @param inframe
6729 * @param outframe
6730 */
6731 vfunc_transform_frame(inframe: VideoFrame, outframe: VideoFrame): Gst.FlowReturn;
6732 /**
6733 * transform a video frame in place
6734 * @param frame
6735 */
6736 vfunc_transform_frame_ip(frame: VideoFrame): Gst.FlowReturn;
6737 }
6738
6739 /**
6740 * See #GstVideoMultiviewFlags.
6741 */
6742 class VideoMultiviewFlagsSet extends Gst.FlagSet {
6743 static $gtype: GObject.GType<VideoMultiviewFlagsSet>;
6744
6745 // Constructors
6746
6747 _init(...args: any[]): void;
6748 }
6749
6750 namespace VideoSink {
6751 // Constructor properties interface
6752
6753 interface ConstructorProps extends GstBase.BaseSink.ConstructorProps {
6754 show_preroll_frame: boolean;
6755 showPrerollFrame: boolean;
6756 }
6757 }
6758
6759 /**
6760 * Provides useful functions and a base class for video sinks.
6761 *
6762 * GstVideoSink will configure the default base sink to drop frames that
6763 * arrive later than 20ms as this is considered the default threshold for
6764 * observing out-of-sync frames.
6765 */
6766 class VideoSink extends GstBase.BaseSink {
6767 static $gtype: GObject.GType<VideoSink>;
6768
6769 // Properties
6770
6771 /**
6772 * Whether to show video frames during preroll. If set to %FALSE, video
6773 * frames will only be rendered in PLAYING state.
6774 */
6775 get show_preroll_frame(): boolean;
6776 set show_preroll_frame(val: boolean);
6777 /**
6778 * Whether to show video frames during preroll. If set to %FALSE, video
6779 * frames will only be rendered in PLAYING state.
6780 */
6781 get showPrerollFrame(): boolean;
6782 set showPrerollFrame(val: boolean);
6783
6784 // Fields
6785
6786 element: GstBase.BaseSink;
6787 width: number;
6788 height: number;
6789
6790 // Constructors
6791
6792 constructor(properties?: Partial<VideoSink.ConstructorProps>, ...args: any[]);
6793
6794 _init(...args: any[]): void;
6795
6796 // Static methods
6797
6798 static center_rect(src: VideoRectangle, dst: VideoRectangle, scaling: boolean): VideoRectangle;
6799
6800 // Virtual methods
6801
6802 /**
6803 * Notifies the subclass of changed #GstVideoInfo.
6804 * @param caps A #GstCaps.
6805 * @param info A #GstVideoInfo corresponding to @caps.
6806 */
6807 vfunc_set_info(caps: Gst.Caps, info: VideoInfo): boolean;
6808 /**
6809 * render a video frame. Maps to #GstBaseSinkClass.render() and
6810 * #GstBaseSinkClass.preroll() vfuncs. Rendering during preroll will be
6811 * suppressed if the #GstVideoSink:show-preroll-frame property is set to
6812 * %FALSE.
6813 * @param buf
6814 */
6815 vfunc_show_frame(buf: Gst.Buffer): Gst.FlowReturn;
6816 }
6817
6818 /**
6819 * #GstMeta for carrying SMPTE-291M Ancillary data. Note that all the ADF fields
6820 * (`DID` to `checksum)` are 10bit values with parity/non-parity high-bits set.
6821 */
6822 class AncillaryMeta {
6823 static $gtype: GObject.GType<AncillaryMeta>;
6824
6825 // Fields
6826
6827 field: AncillaryMetaField;
6828 c_not_y_channel: boolean;
6829 line: number;
6830 offset: number;
6831 DID: number;
6832 SDID_block_number: number;
6833 data_count: number;
6834 data: number;
6835 checksum: number;
6836
6837 // Constructors
6838
6839 _init(...args: any[]): void;
6840
6841 // Static methods
6842
6843 static get_info(): Gst.MetaInfo;
6844 }
6845
6846 type ColorBalanceChannelClass = typeof ColorBalanceChannel;
6847 type ColorBalanceInterface = typeof ColorBalance;
6848 type NavigationInterface = typeof Navigation;
6849 /**
6850 * Active Format Description (AFD)
6851 *
6852 * For details, see Table 6.14 Active Format in:
6853 *
6854 * ATSC Digital Television Standard:
6855 * Part 4 – MPEG-2 Video System Characteristics
6856 *
6857 * https://www.atsc.org/wp-content/uploads/2015/03/a_53-Part-4-2009.pdf
6858 *
6859 * and Active Format Description in Complete list of AFD codes
6860 *
6861 * https://en.wikipedia.org/wiki/Active_Format_Description#Complete_list_of_AFD_codes
6862 *
6863 * and SMPTE ST2016-1
6864 */
6865 class VideoAFDMeta {
6866 static $gtype: GObject.GType<VideoAFDMeta>;
6867
6868 // Fields
6869
6870 field: number;
6871 spec: VideoAFDSpec;
6872 afd: VideoAFDValue;
6873
6874 // Constructors
6875
6876 _init(...args: any[]): void;
6877
6878 // Static methods
6879
6880 static get_info(): Gst.MetaInfo;
6881 }
6882
6883 /**
6884 * Extra buffer metadata for performing an affine transformation using a 4x4
6885 * matrix. The transformation matrix can be composed with
6886 * gst_video_affine_transformation_meta_apply_matrix().
6887 *
6888 * The vertices operated on are all in the range 0 to 1, not in
6889 * Normalized Device Coordinates (-1 to +1). Transforming points in this space
6890 * are assumed to have an origin at (0.5, 0.5, 0.5) in a left-handed coordinate
6891 * system with the x-axis moving horizontally (positive values to the right),
6892 * the y-axis moving vertically (positive values up the screen) and the z-axis
6893 * perpendicular to the screen (positive values into the screen).
6894 */
6895 class VideoAffineTransformationMeta {
6896 static $gtype: GObject.GType<VideoAffineTransformationMeta>;
6897
6898 // Fields
6899
6900 matrix: number[];
6901
6902 // Constructors
6903
6904 _init(...args: any[]): void;
6905
6906 // Static methods
6907
6908 static get_info(): Gst.MetaInfo;
6909
6910 // Methods
6911
6912 /**
6913 * Apply a transformation using the given 4x4 transformation matrix.
6914 * Performs the multiplication, meta->matrix X matrix.
6915 * @param matrix a 4x4 transformation matrix to be applied
6916 */
6917 apply_matrix(matrix: number[]): void;
6918 }
6919
6920 type VideoAggregatorClass = typeof VideoAggregator;
6921 type VideoAggregatorConvertPadClass = typeof VideoAggregatorConvertPad;
6922 abstract class VideoAggregatorConvertPadPrivate {
6923 static $gtype: GObject.GType<VideoAggregatorConvertPadPrivate>;
6924
6925 // Constructors
6926
6927 _init(...args: any[]): void;
6928 }
6929
6930 type VideoAggregatorPadClass = typeof VideoAggregatorPad;
6931 abstract class VideoAggregatorPadPrivate {
6932 static $gtype: GObject.GType<VideoAggregatorPadPrivate>;
6933
6934 // Constructors
6935
6936 _init(...args: any[]): void;
6937 }
6938
6939 type VideoAggregatorParallelConvertPadClass = typeof VideoAggregatorParallelConvertPad;
6940 abstract class VideoAggregatorPrivate {
6941 static $gtype: GObject.GType<VideoAggregatorPrivate>;
6942
6943 // Constructors
6944
6945 _init(...args: any[]): void;
6946 }
6947
6948 /**
6949 * Extra alignment parameters for the memory of video buffers. This
6950 * structure is usually used to configure the bufferpool if it supports the
6951 * #GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT.
6952 */
6953 class VideoAlignment {
6954 static $gtype: GObject.GType<VideoAlignment>;
6955
6956 // Fields
6957
6958 padding_top: number;
6959 padding_bottom: number;
6960 padding_left: number;
6961 padding_right: number;
6962 stride_align: number[];
6963
6964 // Constructors
6965
6966 constructor(
6967 properties?: Partial<{
6968 padding_top: number;
6969 padding_bottom: number;
6970 padding_left: number;
6971 padding_right: number;
6972 stride_align: number[];
6973 }>,
6974 );
6975 _init(...args: any[]): void;
6976
6977 // Methods
6978
6979 /**
6980 * Set `align` to its default values with no padding and no alignment.
6981 */
6982 reset(): void;
6983 }
6984
6985 /**
6986 * Video Ancillary data, according to SMPTE-291M specification.
6987 *
6988 * Note that the contents of the data are always stored as 8bit data (i.e. do not contain
6989 * the parity check bits).
6990 */
6991 class VideoAncillary {
6992 static $gtype: GObject.GType<VideoAncillary>;
6993
6994 // Fields
6995
6996 DID: number;
6997 SDID_block_number: number;
6998 data_count: number;
6999 data: Uint8Array;
7000
7001 // Constructors
7002
7003 constructor(
7004 properties?: Partial<{
7005 DID: number;
7006 SDID_block_number: number;
7007 data_count: number;
7008 data: Uint8Array;
7009 }>,
7010 );
7011 _init(...args: any[]): void;
7012 }
7013
7014 /**
7015 * Bar data should be included in video user data
7016 * whenever the rectangular picture area containing useful information
7017 * does not extend to the full height or width of the coded frame
7018 * and AFD alone is insufficient to describe the extent of the image.
7019 *
7020 * Note: either vertical or horizontal bars are specified, but not both.
7021 *
7022 * For more details, see:
7023 *
7024 * https://www.atsc.org/wp-content/uploads/2015/03/a_53-Part-4-2009.pdf
7025 *
7026 * and SMPTE ST2016-1
7027 */
7028 class VideoBarMeta {
7029 static $gtype: GObject.GType<VideoBarMeta>;
7030
7031 // Fields
7032
7033 field: number;
7034 is_letterbox: boolean;
7035 bar_data1: number;
7036 bar_data2: number;
7037
7038 // Constructors
7039
7040 _init(...args: any[]): void;
7041
7042 // Static methods
7043
7044 static get_info(): Gst.MetaInfo;
7045 }
7046
7047 type VideoBufferPoolClass = typeof VideoBufferPool;
7048 abstract class VideoBufferPoolPrivate {
7049 static $gtype: GObject.GType<VideoBufferPoolPrivate>;
7050
7051 // Constructors
7052
7053 _init(...args: any[]): void;
7054 }
7055
7056 /**
7057 * Extra buffer metadata providing Closed Caption.
7058 */
7059 class VideoCaptionMeta {
7060 static $gtype: GObject.GType<VideoCaptionMeta>;
7061
7062 // Fields
7063
7064 caption_type: VideoCaptionType;
7065 data: Uint8Array;
7066 size: number;
7067
7068 // Constructors
7069
7070 _init(...args: any[]): void;
7071
7072 // Static methods
7073
7074 static get_info(): Gst.MetaInfo;
7075 }
7076
7077 abstract class VideoChromaResample {
7078 static $gtype: GObject.GType<VideoChromaResample>;
7079
7080 // Constructors
7081
7082 _init(...args: any[]): void;
7083
7084 // Methods
7085
7086 /**
7087 * Free `resample`
7088 */
7089 free(): void;
7090 /**
7091 * The resampler must be fed `n_lines` at a time. The first line should be
7092 * at `offset`.
7093 */
7094 get_info(): [number, number];
7095 }
7096
7097 /**
7098 * This meta is primarily for internal use in GStreamer elements to support
7099 * VP8/VP9 transparent video stored into WebM or Matroska containers, or
7100 * transparent static AV1 images. Nothing prevents you from using this meta
7101 * for custom purposes, but it generally can't be used to easily to add support
7102 * for alpha channels to CODECs or formats that don't support that out of the
7103 * box.
7104 */
7105 class VideoCodecAlphaMeta {
7106 static $gtype: GObject.GType<VideoCodecAlphaMeta>;
7107
7108 // Constructors
7109
7110 _init(...args: any[]): void;
7111
7112 // Static methods
7113
7114 static get_info(): Gst.MetaInfo;
7115 }
7116
7117 /**
7118 * A #GstVideoCodecFrame represents a video frame both in raw and
7119 * encoded form.
7120 */
7121 class VideoCodecFrame {
7122 static $gtype: GObject.GType<VideoCodecFrame>;
7123
7124 // Fields
7125
7126 system_frame_number: number;
7127 dts: Gst.ClockTime;
7128 pts: Gst.ClockTime;
7129 duration: Gst.ClockTime;
7130 distance_from_sync: number;
7131 deadline: Gst.ClockTime;
7132
7133 // Constructors
7134
7135 _init(...args: any[]): void;
7136
7137 // Methods
7138
7139 /**
7140 * Gets private data set on the frame by the subclass via
7141 * gst_video_codec_frame_set_user_data() previously.
7142 * @returns The previously set user_data
7143 */
7144 get_user_data(): any | null;
7145 /**
7146 * Increases the refcount of the given frame by one.
7147 * @returns @buf
7148 */
7149 ref(): VideoCodecFrame;
7150 /**
7151 * Sets `user_data` on the frame and the #GDestroyNotify that will be called when
7152 * the frame is freed. Allows to attach private data by the subclass to frames.
7153 *
7154 * If a `user_data` was previously set, then the previous set `notify` will be called
7155 * before the `user_data` is replaced.
7156 * @param notify a #GDestroyNotify
7157 */
7158 set_user_data(notify: GLib.DestroyNotify): void;
7159 /**
7160 * Decreases the refcount of the frame. If the refcount reaches 0, the frame
7161 * will be freed.
7162 */
7163 unref(): void;
7164 }
7165
7166 /**
7167 * Structure representing the state of an incoming or outgoing video
7168 * stream for encoders and decoders.
7169 *
7170 * Decoders and encoders will receive such a state through their
7171 * respective `set_format` vmethods.
7172 *
7173 * Decoders and encoders can set the downstream state, by using the
7174 * gst_video_decoder_set_output_state() or
7175 * gst_video_encoder_set_output_state() methods.
7176 */
7177 class VideoCodecState {
7178 static $gtype: GObject.GType<VideoCodecState>;
7179
7180 // Fields
7181
7182 mastering_display_info: VideoMasteringDisplayInfo;
7183 content_light_level: VideoContentLightLevel;
7184
7185 // Constructors
7186
7187 _init(...args: any[]): void;
7188
7189 // Methods
7190
7191 /**
7192 * Increases the refcount of the given state by one.
7193 * @returns @buf
7194 */
7195 ref(): VideoCodecState;
7196 /**
7197 * Decreases the refcount of the state. If the refcount reaches 0, the state
7198 * will be freed.
7199 */
7200 unref(): void;
7201 }
7202
7203 /**
7204 * Structure describing the chromaticity coordinates of an RGB system. These
7205 * values can be used to construct a matrix to transform RGB to and from the
7206 * XYZ colorspace.
7207 */
7208 class VideoColorPrimariesInfo {
7209 static $gtype: GObject.GType<VideoColorPrimariesInfo>;
7210
7211 // Fields
7212
7213 primaries: VideoColorPrimaries;
7214 Wx: number;
7215 Wy: number;
7216 Rx: number;
7217 Ry: number;
7218 Gx: number;
7219 Gy: number;
7220 Bx: number;
7221 By: number;
7222
7223 // Constructors
7224
7225 _init(...args: any[]): void;
7226 }
7227
7228 /**
7229 * Structure describing the color info.
7230 */
7231 class VideoColorimetry {
7232 static $gtype: GObject.GType<VideoColorimetry>;
7233
7234 // Fields
7235
7236 range: VideoColorRange;
7237 matrix: VideoColorMatrix;
7238 transfer: VideoTransferFunction;
7239 primaries: VideoColorPrimaries;
7240
7241 // Constructors
7242
7243 _init(...args: any[]): void;
7244
7245 // Methods
7246
7247 /**
7248 * Parse the colorimetry string and update `cinfo` with the parsed
7249 * values.
7250 * @param color a colorimetry string
7251 * @returns %TRUE if @color points to valid colorimetry info.
7252 */
7253 from_string(color: string): boolean;
7254 /**
7255 * Compare the 2 colorimetry sets for equality
7256 * @param other another #GstVideoColorimetry
7257 * @returns %TRUE if @cinfo and @other are equal.
7258 */
7259 is_equal(other: VideoColorimetry): boolean;
7260 /**
7261 * Compare the 2 colorimetry sets for functionally equality
7262 * @param bitdepth bitdepth of a format associated with @cinfo
7263 * @param other another #GstVideoColorimetry
7264 * @param other_bitdepth bitdepth of a format associated with @other
7265 * @returns %TRUE if @cinfo and @other are equivalent.
7266 */
7267 is_equivalent(bitdepth: number, other: VideoColorimetry, other_bitdepth: number): boolean;
7268 /**
7269 * Check if the colorimetry information in `info` matches that of the
7270 * string `color`.
7271 * @param color a colorimetry string
7272 * @returns %TRUE if @color conveys the same colorimetry info as the color information in @info.
7273 */
7274 matches(color: string): boolean;
7275 /**
7276 * Make a string representation of `cinfo`.
7277 * @returns a string representation of @cinfo or %NULL if all the entries of @cinfo are unknown values.
7278 */
7279 to_string(): string | null;
7280 }
7281
7282 /**
7283 * Content light level information specified in CEA-861.3, Appendix A.
7284 */
7285 class VideoContentLightLevel {
7286 static $gtype: GObject.GType<VideoContentLightLevel>;
7287
7288 // Fields
7289
7290 max_content_light_level: number;
7291 max_frame_average_light_level: number;
7292
7293 // Constructors
7294
7295 constructor(
7296 properties?: Partial<{
7297 max_content_light_level: number;
7298 max_frame_average_light_level: number;
7299 }>,
7300 );
7301 _init(...args: any[]): void;
7302
7303 // Methods
7304
7305 /**
7306 * Parse `caps` and update `linfo`
7307 * @param caps a #GstCaps
7308 * @returns %TRUE if @linfo was successfully set to @caps
7309 */
7310 add_to_caps(caps: Gst.Caps): boolean;
7311 /**
7312 * Parse `caps` and update `linfo`
7313 * @param caps a #GstCaps
7314 * @returns if @caps has #GstVideoContentLightLevel and could be parsed
7315 */
7316 from_caps(caps: Gst.Caps): boolean;
7317 /**
7318 * Parse the value of content-light-level caps field and update `minfo`
7319 * with the parsed values.
7320 * @param level a content-light-level string from caps
7321 * @returns %TRUE if @linfo points to valid #GstVideoContentLightLevel.
7322 */
7323 from_string(level: string): boolean;
7324 /**
7325 * Initialize `linfo`
7326 */
7327 init(): void;
7328 /**
7329 * Checks equality between `linfo` and `other`.
7330 * @param other a #GstVideoContentLightLevel
7331 * @returns %TRUE if @linfo and @other are equal.
7332 */
7333 is_equal(other: VideoContentLightLevel): boolean;
7334 /**
7335 * Convert `linfo` to its string representation.
7336 * @returns a string representation of @linfo.
7337 */
7338 to_string(): string;
7339 }
7340
7341 abstract class VideoConverter {
7342 static $gtype: GObject.GType<VideoConverter>;
7343
7344 // Constructors
7345
7346 _init(...args: any[]): void;
7347
7348 // Methods
7349
7350 /**
7351 * Convert the pixels of `src` into `dest` using `convert`.
7352 *
7353 * If #GST_VIDEO_CONVERTER_OPT_ASYNC_TASKS is %TRUE then this function will
7354 * return immediately and needs to be followed by a call to
7355 * gst_video_converter_frame_finish().
7356 * @param src a #GstVideoFrame
7357 * @param dest a #GstVideoFrame
7358 */
7359 frame(src: VideoFrame, dest: VideoFrame): void;
7360 /**
7361 * Wait for a previous async conversion performed using
7362 * gst_video_converter_frame() to complete.
7363 */
7364 frame_finish(): void;
7365 /**
7366 * Free `convert`
7367 */
7368 free(): void;
7369 /**
7370 * Get the current configuration of `convert`.
7371 * @returns a #GstStructure that remains valid for as long as @convert is valid or until gst_video_converter_set_config() is called.
7372 */
7373 get_config(): Gst.Structure;
7374 /**
7375 * Retrieve the input format of `convert`.
7376 * @returns a #GstVideoInfo
7377 */
7378 get_in_info(): VideoInfo;
7379 /**
7380 * Retrieve the output format of `convert`.
7381 * @returns a #GstVideoInfo
7382 */
7383 get_out_info(): VideoInfo;
7384 /**
7385 * Set `config` as extra configuration for `convert`.
7386 *
7387 * If the parameters in `config` can not be set exactly, this function returns
7388 * %FALSE and will try to update as much state as possible. The new state can
7389 * then be retrieved and refined with gst_video_converter_get_config().
7390 *
7391 * Look at the `GST_VIDEO_CONVERTER_OPT_*` fields to check valid configuration
7392 * option and values.
7393 * @param config a #GstStructure
7394 * @returns %TRUE when @config could be set.
7395 */
7396 set_config(config: Gst.Structure): boolean;
7397 }
7398
7399 /**
7400 * Extra buffer metadata describing image cropping.
7401 */
7402 class VideoCropMeta {
7403 static $gtype: GObject.GType<VideoCropMeta>;
7404
7405 // Fields
7406
7407 x: number;
7408 y: number;
7409 width: number;
7410 height: number;
7411
7412 // Constructors
7413
7414 _init(...args: any[]): void;
7415
7416 // Static methods
7417
7418 static get_info(): Gst.MetaInfo;
7419 }
7420
7421 type VideoDecoderClass = typeof VideoDecoder;
7422 abstract class VideoDecoderPrivate {
7423 static $gtype: GObject.GType<VideoDecoderPrivate>;
7424
7425 // Constructors
7426
7427 _init(...args: any[]): void;
7428 }
7429
7430 type VideoDirectionInterface = typeof VideoDirection;
7431 /**
7432 * GstVideoDither provides implementations of several dithering algorithms
7433 * that can be applied to lines of video pixels to quantize and dither them.
7434 */
7435 abstract class VideoDither {
7436 static $gtype: GObject.GType<VideoDither>;
7437
7438 // Constructors
7439
7440 _init(...args: any[]): void;
7441
7442 // Methods
7443
7444 /**
7445 * Free `dither`
7446 */
7447 free(): void;
7448 /**
7449 * Dither `width` pixels starting from offset `x` in `line` using `dither`.
7450 *
7451 * `y` is the line number of `line` in the output image.
7452 * @param line pointer to the pixels of the line
7453 * @param x x coordinate
7454 * @param y y coordinate
7455 * @param width the width
7456 */
7457 line(line: any | null, x: number, y: number, width: number): void;
7458 }
7459
7460 type VideoEncoderClass = typeof VideoEncoder;
7461 abstract class VideoEncoderPrivate {
7462 static $gtype: GObject.GType<VideoEncoderPrivate>;
7463
7464 // Constructors
7465
7466 _init(...args: any[]): void;
7467 }
7468
7469 type VideoFilterClass = typeof VideoFilter;
7470 /**
7471 * Information for a video format.
7472 */
7473 class VideoFormatInfo {
7474 static $gtype: GObject.GType<VideoFormatInfo>;
7475
7476 // Fields
7477
7478 format: VideoFormat;
7479 name: string;
7480 description: string;
7481 flags: VideoFormatFlags;
7482 bits: number;
7483 n_components: number;
7484 shift: number[];
7485 depth: number[];
7486 pixel_stride: number[];
7487 n_planes: number;
7488 plane: number[];
7489 poffset: number[];
7490 w_sub: number[];
7491 h_sub: number[];
7492 unpack_format: VideoFormat;
7493 unpack_func: VideoFormatUnpack;
7494 pack_lines: number;
7495 pack_func: VideoFormatPack;
7496 tile_mode: VideoTileMode;
7497 tile_ws: number;
7498 tile_hs: number;
7499 tile_info: VideoTileInfo[];
7500
7501 // Constructors
7502
7503 _init(...args: any[]): void;
7504
7505 // Methods
7506
7507 /**
7508 * Fill `components` with the number of all the components packed in plane `p`
7509 * for the format `info`. A value of -1 in `components` indicates that no more
7510 * components are packed in the plane.
7511 * @param plane a plane number
7512 */
7513 component(plane: number): number;
7514 /**
7515 * Extrapolate `plane` stride from the first stride of an image. This helper is
7516 * useful to support legacy API were only one stride is supported.
7517 * @param plane a plane number
7518 * @param stride The fist plane stride
7519 * @returns The extrapolated stride for @plane
7520 */
7521 extrapolate_stride(plane: number, stride: number): number;
7522 }
7523
7524 /**
7525 * A video frame obtained from gst_video_frame_map()
7526 */
7527 class VideoFrame {
7528 static $gtype: GObject.GType<VideoFrame>;
7529
7530 // Fields
7531
7532 flags: VideoFrameFlags;
7533 meta: any;
7534 id: number;
7535 data: any[];
7536
7537 // Constructors
7538
7539 _init(...args: any[]): void;
7540
7541 // Static methods
7542
7543 /**
7544 * Use `info` and `buffer` to fill in the values of `frame`. `frame` is usually
7545 * allocated on the stack, and you will pass the address to the #GstVideoFrame
7546 * structure allocated on the stack; gst_video_frame_map() will then fill in
7547 * the structures with the various video-specific information you need to access
7548 * the pixels of the video buffer. You can then use accessor macros such as
7549 * GST_VIDEO_FRAME_COMP_DATA(), GST_VIDEO_FRAME_PLANE_DATA(),
7550 * GST_VIDEO_FRAME_COMP_STRIDE(), GST_VIDEO_FRAME_PLANE_STRIDE() etc.
7551 * to get to the pixels.
7552 *
7553 *
7554 * ```c
7555 * GstVideoFrame vframe;
7556 * ...
7557 * // set RGB pixels to black one at a time
7558 * if (gst_video_frame_map (&vframe, video_info, video_buffer, GST_MAP_WRITE)) {
7559 * guint8 *pixels = GST_VIDEO_FRAME_PLANE_DATA (vframe, 0);
7560 * guint stride = GST_VIDEO_FRAME_PLANE_STRIDE (vframe, 0);
7561 * guint pixel_stride = GST_VIDEO_FRAME_COMP_PSTRIDE (vframe, 0);
7562 *
7563 * for (h = 0; h < height; ++h) {
7564 * for (w = 0; w < width; ++w) {
7565 * guint8 *pixel = pixels + h * stride + w * pixel_stride;
7566 *
7567 * memset (pixel, 0, pixel_stride);
7568 * }
7569 * }
7570 *
7571 * gst_video_frame_unmap (&vframe);
7572 * }
7573 * ...
7574 * ```
7575 *
7576 *
7577 * All video planes of `buffer` will be mapped and the pointers will be set in
7578 * `frame->`data.
7579 *
7580 * The purpose of this function is to make it easy for you to get to the video
7581 * pixels in a generic way, without you having to worry too much about details
7582 * such as whether the video data is allocated in one contiguous memory chunk
7583 * or multiple memory chunks (e.g. one for each plane); or if custom strides
7584 * and custom plane offsets are used or not (as signalled by GstVideoMeta on
7585 * each buffer). This function will just fill the #GstVideoFrame structure
7586 * with the right values and if you use the accessor macros everything will
7587 * just work and you can access the data easily. It also maps the underlying
7588 * memory chunks for you.
7589 * @param info a #GstVideoInfo
7590 * @param buffer the buffer to map
7591 * @param flags #GstMapFlags
7592 */
7593 static map(info: VideoInfo, buffer: Gst.Buffer, flags: Gst.MapFlags): [boolean, VideoFrame];
7594 /**
7595 * Use `info` and `buffer` to fill in the values of `frame` with the video frame
7596 * information of frame `id`.
7597 *
7598 * When `id` is -1, the default frame is mapped. When `id` != -1, this function
7599 * will return %FALSE when there is no GstVideoMeta with that id.
7600 *
7601 * All video planes of `buffer` will be mapped and the pointers will be set in
7602 * `frame->`data.
7603 * @param info a #GstVideoInfo
7604 * @param buffer the buffer to map
7605 * @param id the frame id to map
7606 * @param flags #GstMapFlags
7607 */
7608 static map_id(info: VideoInfo, buffer: Gst.Buffer, id: number, flags: Gst.MapFlags): [boolean, VideoFrame];
7609
7610 // Methods
7611
7612 /**
7613 * Copy the contents from `src` to `dest`.
7614 *
7615 * Note: Since: 1.18, `dest` dimensions are allowed to be
7616 * smaller than `src` dimensions.
7617 * @param src a #GstVideoFrame
7618 * @returns TRUE if the contents could be copied.
7619 */
7620 copy(src: VideoFrame): boolean;
7621 /**
7622 * Copy the plane with index `plane` from `src` to `dest`.
7623 *
7624 * Note: Since: 1.18, `dest` dimensions are allowed to be
7625 * smaller than `src` dimensions.
7626 * @param src a #GstVideoFrame
7627 * @param plane a plane
7628 * @returns TRUE if the contents could be copied.
7629 */
7630 copy_plane(src: VideoFrame, plane: number): boolean;
7631 /**
7632 * Unmap the memory previously mapped with gst_video_frame_map.
7633 */
7634 unmap(): void;
7635 }
7636
7637 /**
7638 * Extra buffer metadata for uploading a buffer to an OpenGL texture
7639 * ID. The caller of gst_video_gl_texture_upload_meta_upload() must
7640 * have OpenGL set up and call this from a thread where it is valid
7641 * to upload something to an OpenGL texture.
7642 */
7643 class VideoGLTextureUploadMeta {
7644 static $gtype: GObject.GType<VideoGLTextureUploadMeta>;
7645
7646 // Fields
7647
7648 texture_orientation: VideoGLTextureOrientation;
7649 n_textures: number;
7650 texture_type: VideoGLTextureType[];
7651
7652 // Constructors
7653
7654 _init(...args: any[]): void;
7655
7656 // Static methods
7657
7658 static get_info(): Gst.MetaInfo;
7659
7660 // Methods
7661
7662 /**
7663 * Uploads the buffer which owns the meta to a specific texture ID.
7664 * @param texture_id the texture IDs to upload to
7665 * @returns %TRUE if uploading succeeded, %FALSE otherwise.
7666 */
7667 upload(texture_id: number): boolean;
7668 }
7669
7670 /**
7671 * Information describing image properties. This information can be filled
7672 * in from GstCaps with gst_video_info_from_caps(). The information is also used
7673 * to store the specific video info when mapping a video frame with
7674 * gst_video_frame_map().
7675 *
7676 * Use the provided macros to access the info in this structure.
7677 */
7678 class VideoInfo {
7679 static $gtype: GObject.GType<VideoInfo>;
7680
7681 // Fields
7682
7683 interlace_mode: VideoInterlaceMode;
7684 flags: VideoFlags;
7685 width: number;
7686 height: number;
7687 size: number;
7688 views: number;
7689 chroma_site: VideoChromaSite;
7690 par_n: number;
7691 par_d: number;
7692 fps_n: number;
7693 fps_d: number;
7694 offset: number[];
7695 stride: number[];
7696
7697 // Constructors
7698
7699 constructor(
7700 properties?: Partial<{
7701 interlace_mode: VideoInterlaceMode;
7702 flags: VideoFlags;
7703 width: number;
7704 height: number;
7705 size: number;
7706 views: number;
7707 chroma_site: VideoChromaSite;
7708 colorimetry: VideoColorimetry;
7709 par_n: number;
7710 par_d: number;
7711 fps_n: number;
7712 fps_d: number;
7713 offset: number[];
7714 stride: number[];
7715 }>,
7716 );
7717 _init(...args: any[]): void;
7718
7719 static ['new'](): VideoInfo;
7720
7721 static new_from_caps(caps: Gst.Caps): VideoInfo;
7722
7723 // Static methods
7724
7725 /**
7726 * Parse `caps` and update `info`.
7727 * @param caps a #GstCaps
7728 */
7729 static from_caps(caps: Gst.Caps): [boolean, VideoInfo];
7730 /**
7731 * Initialize `info` with default values.
7732 */
7733 static init(): VideoInfo;
7734
7735 // Methods
7736
7737 /**
7738 * Adjust the offset and stride fields in `info` so that the padding and
7739 * stride alignment in `align` is respected.
7740 *
7741 * Extra padding will be added to the right side when stride alignment padding
7742 * is required and `align` will be updated with the new padding values.
7743 * @param align alignment parameters
7744 * @returns %FALSE if alignment could not be applied, e.g. because the size of a frame can't be represented as a 32 bit integer (Since: 1.12)
7745 */
7746 align(align: VideoAlignment): boolean;
7747 /**
7748 * Extra padding will be added to the right side when stride alignment padding
7749 * is required and `align` will be updated with the new padding values.
7750 *
7751 * This variant of gst_video_info_align() provides the updated size, in bytes,
7752 * of each video plane after the alignment, including all horizontal and vertical
7753 * paddings.
7754 *
7755 * In case of GST_VIDEO_INTERLACE_MODE_ALTERNATE info, the returned sizes are the
7756 * ones used to hold a single field, not the full frame.
7757 * @param align alignment parameters
7758 * @returns %FALSE if alignment could not be applied, e.g. because the size of a frame can't be represented as a 32 bit integer
7759 */
7760 align_full(align: VideoAlignment): [boolean, number];
7761 /**
7762 * Converts among various #GstFormat types. This function handles
7763 * GST_FORMAT_BYTES, GST_FORMAT_TIME, and GST_FORMAT_DEFAULT. For
7764 * raw video, GST_FORMAT_DEFAULT corresponds to video frames. This
7765 * function can be used to handle pad queries of the type GST_QUERY_CONVERT.
7766 * @param src_format #GstFormat of the @src_value
7767 * @param src_value value to convert
7768 * @param dest_format #GstFormat of the @dest_value
7769 * @returns TRUE if the conversion was successful.
7770 */
7771 convert(
7772 src_format: Gst.Format | null,
7773 src_value: number,
7774 dest_format: Gst.Format | null,
7775 ): [boolean, number];
7776 /**
7777 * Copy a GstVideoInfo structure.
7778 * @returns a new #GstVideoInfo. free with gst_video_info_free.
7779 */
7780 copy(): VideoInfo;
7781 /**
7782 * Free a GstVideoInfo structure previously allocated with gst_video_info_new()
7783 * or gst_video_info_copy().
7784 */
7785 free(): void;
7786 /**
7787 * Compares two #GstVideoInfo and returns whether they are equal or not
7788 * @param other a #GstVideoInfo
7789 * @returns %TRUE if @info and @other are equal, else %FALSE.
7790 */
7791 is_equal(other: VideoInfo): boolean;
7792 /**
7793 * Set the default info for a video frame of `format` and `width` and `height`.
7794 *
7795 * Note: This initializes `info` first, no values are preserved. This function
7796 * does not set the offsets correctly for interlaced vertically
7797 * subsampled formats.
7798 * @param format the format
7799 * @param width a width
7800 * @param height a height
7801 * @returns %FALSE if the returned video info is invalid, e.g. because the size of a frame can't be represented as a 32 bit integer (Since: 1.12)
7802 */
7803 set_format(format: VideoFormat | null, width: number, height: number): boolean;
7804 /**
7805 * Same as #gst_video_info_set_format but also allowing to set the interlaced
7806 * mode.
7807 * @param format the format
7808 * @param mode a #GstVideoInterlaceMode
7809 * @param width a width
7810 * @param height a height
7811 * @returns %FALSE if the returned video info is invalid, e.g. because the size of a frame can't be represented as a 32 bit integer.
7812 */
7813 set_interlaced_format(
7814 format: VideoFormat | null,
7815 mode: VideoInterlaceMode | null,
7816 width: number,
7817 height: number,
7818 ): boolean;
7819 /**
7820 * Convert the values of `info` into a #GstCaps.
7821 * @returns a new #GstCaps containing the info of @info.
7822 */
7823 to_caps(): Gst.Caps;
7824 }
7825
7826 /**
7827 * Information describing a DMABuf image properties. It wraps #GstVideoInfo and
7828 * adds DRM information such as drm-fourcc and drm-modifier, required for
7829 * negotiation and mapping.
7830 */
7831 class VideoInfoDmaDrm {
7832 static $gtype: GObject.GType<VideoInfoDmaDrm>;
7833
7834 // Fields
7835
7836 drm_fourcc: number;
7837 drm_modifier: number;
7838
7839 // Constructors
7840
7841 constructor(
7842 properties?: Partial<{
7843 vinfo: VideoInfo;
7844 drm_fourcc: number;
7845 drm_modifier: number;
7846 }>,
7847 );
7848 _init(...args: any[]): void;
7849
7850 static ['new'](): VideoInfoDmaDrm;
7851
7852 static new_from_caps(caps: Gst.Caps): VideoInfoDmaDrm;
7853
7854 // Static methods
7855
7856 /**
7857 * Parse `caps` and update `info`. Please note that the `caps` should be
7858 * a dma drm caps. The gst_video_is_dma_drm_caps() can be used to verify
7859 * it before calling this function.
7860 * @param caps a #GstCaps
7861 */
7862 static from_caps(caps: Gst.Caps): [boolean, VideoInfoDmaDrm];
7863 /**
7864 * Fills `drm_info` if `info'`s format has a valid drm format and `modifier` is also
7865 * valid
7866 * @param info a #GstVideoInfo
7867 * @param modifier the associated modifier value.
7868 */
7869 static from_video_info(info: VideoInfo, modifier: number): [boolean, VideoInfoDmaDrm];
7870 /**
7871 * Initialize `drm_info` with default values.
7872 */
7873 static init(): VideoInfoDmaDrm;
7874
7875 // Methods
7876
7877 /**
7878 * Free a #GstVideoInfoDmaDrm structure previously allocated with
7879 * gst_video_info_dma_drm_new()
7880 */
7881 free(): void;
7882 /**
7883 * Convert the values of `drm_info` into a #GstCaps. Please note that the
7884 * `caps` returned will be a dma drm caps which sets format field to DMA_DRM,
7885 * and contains a new drm-format field. The value of drm-format field is
7886 * composed of a drm fourcc and a modifier, such as NV12:0x0100000000000002.
7887 * @returns a new #GstCaps containing the info in @drm_info.
7888 */
7889 to_caps(): Gst.Caps | null;
7890 /**
7891 * Convert the #GstVideoInfoDmaDrm into a traditional #GstVideoInfo with
7892 * recognized video format. For DMA kind memory, the non linear DMA format
7893 * should be recognized as #GST_VIDEO_FORMAT_DMA_DRM. This helper function
7894 * sets `info'`s video format into the default value according to `drm_info'`s
7895 * drm_fourcc field.
7896 * @returns %TRUE if @info is converted correctly.
7897 */
7898 to_video_info(): [boolean, VideoInfo];
7899 }
7900
7901 /**
7902 * Mastering display color volume information defined by SMPTE ST 2086
7903 * (a.k.a static HDR metadata).
7904 */
7905 class VideoMasteringDisplayInfo {
7906 static $gtype: GObject.GType<VideoMasteringDisplayInfo>;
7907
7908 // Fields
7909
7910 display_primaries: VideoMasteringDisplayInfoCoordinates[];
7911 white_point: VideoMasteringDisplayInfoCoordinates;
7912 max_display_mastering_luminance: number;
7913 min_display_mastering_luminance: number;
7914
7915 // Constructors
7916
7917 constructor(
7918 properties?: Partial<{
7919 display_primaries: VideoMasteringDisplayInfoCoordinates[];
7920 white_point: VideoMasteringDisplayInfoCoordinates;
7921 max_display_mastering_luminance: number;
7922 min_display_mastering_luminance: number;
7923 }>,
7924 );
7925 _init(...args: any[]): void;
7926
7927 // Static methods
7928
7929 /**
7930 * Extract #GstVideoMasteringDisplayInfo from `mastering`
7931 * @param mastering a #GstStructure representing #GstVideoMasteringDisplayInfo
7932 */
7933 static from_string(mastering: string): [boolean, VideoMasteringDisplayInfo];
7934
7935 // Methods
7936
7937 /**
7938 * Set string representation of `minfo` to `caps`
7939 * @param caps a #GstCaps
7940 * @returns %TRUE if @minfo was successfully set to @caps
7941 */
7942 add_to_caps(caps: Gst.Caps): boolean;
7943 /**
7944 * Parse `caps` and update `minfo`
7945 * @param caps a #GstCaps
7946 * @returns %TRUE if @caps has #GstVideoMasteringDisplayInfo and could be parsed
7947 */
7948 from_caps(caps: Gst.Caps): boolean;
7949 /**
7950 * Initialize `minfo`
7951 */
7952 init(): void;
7953 /**
7954 * Checks equality between `minfo` and `other`.
7955 * @param other a #GstVideoMasteringDisplayInfo
7956 * @returns %TRUE if @minfo and @other are equal.
7957 */
7958 is_equal(other: VideoMasteringDisplayInfo): boolean;
7959 /**
7960 * Convert `minfo` to its string representation
7961 * @returns a string representation of @minfo
7962 */
7963 to_string(): string;
7964 }
7965
7966 /**
7967 * Used to represent display_primaries and white_point of
7968 * #GstVideoMasteringDisplayInfo struct. See #GstVideoMasteringDisplayInfo
7969 */
7970 class VideoMasteringDisplayInfoCoordinates {
7971 static $gtype: GObject.GType<VideoMasteringDisplayInfoCoordinates>;
7972
7973 // Fields
7974
7975 x: number;
7976 y: number;
7977
7978 // Constructors
7979
7980 constructor(
7981 properties?: Partial<{
7982 x: number;
7983 y: number;
7984 }>,
7985 );
7986 _init(...args: any[]): void;
7987 }
7988
7989 /**
7990 * Extra buffer metadata describing image properties
7991 *
7992 * This meta can also be used by downstream elements to specifiy their
7993 * buffer layout requirements for upstream. Upstream should try to
7994 * fit those requirements, if possible, in order to prevent buffer copies.
7995 *
7996 * This is done by passing a custom #GstStructure to
7997 * gst_query_add_allocation_meta() when handling the ALLOCATION query.
7998 * This structure should be named 'video-meta' and can have the following
7999 * fields:
8000 * - padding-top (uint): extra pixels on the top
8001 * - padding-bottom (uint): extra pixels on the bottom
8002 * - padding-left (uint): extra pixels on the left side
8003 * - padding-right (uint): extra pixels on the right side
8004 * The padding fields have the same semantic as #GstVideoMeta.alignment
8005 * and so represent the paddings requested on produced video buffers.
8006 *
8007 * Since 1.24 it can be serialized using gst_meta_serialize() and
8008 * gst_meta_deserialize().
8009 */
8010 class VideoMeta {
8011 static $gtype: GObject.GType<VideoMeta>;
8012
8013 // Fields
8014
8015 flags: VideoFrameFlags;
8016 format: VideoFormat;
8017 id: number;
8018 width: number;
8019 height: number;
8020 n_planes: number;
8021 offset: number[];
8022 stride: number[];
8023 alignment: VideoAlignment;
8024
8025 // Constructors
8026
8027 _init(...args: any[]): void;
8028
8029 // Static methods
8030
8031 static get_info(): Gst.MetaInfo;
8032
8033 // Methods
8034
8035 /**
8036 * Compute the padded height of each plane from `meta` (padded size
8037 * divided by stride).
8038 *
8039 * It is not valid to call this function with a meta associated to a
8040 * TILED video format.
8041 * @returns %TRUE if @meta's alignment is valid and @plane_height has been updated, %FALSE otherwise
8042 */
8043 get_plane_height(): [boolean, number[]];
8044 /**
8045 * Compute the size, in bytes, of each video plane described in `meta` including
8046 * any padding and alignment constraint defined in `meta->`alignment.
8047 * @returns %TRUE if @meta's alignment is valid and @plane_size has been updated, %FALSE otherwise
8048 */
8049 get_plane_size(): [boolean, number[]];
8050 /**
8051 * Map the video plane with index `plane` in `meta` and return a pointer to the
8052 * first byte of the plane and the stride of the plane.
8053 * @param plane a plane
8054 * @param info a #GstMapInfo
8055 * @param flags @GstMapFlags
8056 * @returns TRUE if the map operation was successful.
8057 */
8058 map(plane: number, info: Gst.MapInfo, flags: Gst.MapFlags | null): [boolean, any, number];
8059 /**
8060 * Set the alignment of `meta` to `alignment`. This function checks that
8061 * the paddings defined in `alignment` are compatible with the strides
8062 * defined in `meta` and will fail to update if they are not.
8063 * @param alignment a #GstVideoAlignment
8064 * @returns %TRUE if @alignment's meta has been updated, %FALSE if not
8065 */
8066 set_alignment(alignment: VideoAlignment): boolean;
8067 /**
8068 * Unmap a previously mapped plane with gst_video_meta_map().
8069 * @param plane a plane
8070 * @param info a #GstMapInfo
8071 * @returns TRUE if the memory was successfully unmapped.
8072 */
8073 unmap(plane: number, info: Gst.MapInfo): boolean;
8074 }
8075
8076 /**
8077 * Extra data passed to a video transform #GstMetaTransformFunction such as:
8078 * "gst-video-scale".
8079 */
8080 class VideoMetaTransform {
8081 static $gtype: GObject.GType<VideoMetaTransform>;
8082
8083 // Constructors
8084
8085 _init(...args: any[]): void;
8086
8087 // Static methods
8088
8089 /**
8090 * Get the #GQuark for the "gst-video-scale" metadata transform operation.
8091 */
8092 static scale_get_quark(): GLib.Quark;
8093 }
8094
8095 type VideoOrientationInterface = typeof VideoOrientation;
8096 /**
8097 * Functions to create and handle overlay compositions on video buffers.
8098 *
8099 * An overlay composition describes one or more overlay rectangles to be
8100 * blended on top of a video buffer.
8101 *
8102 * This API serves two main purposes:
8103 *
8104 * * it can be used to attach overlay information (subtitles or logos)
8105 * to non-raw video buffers such as GL/VAAPI/VDPAU surfaces. The actual
8106 * blending of the overlay can then be done by e.g. the video sink that
8107 * processes these non-raw buffers.
8108 *
8109 * * it can also be used to blend overlay rectangles on top of raw video
8110 * buffers, thus consolidating blending functionality for raw video in
8111 * one place.
8112 *
8113 * Together, this allows existing overlay elements to easily handle raw
8114 * and non-raw video as input in without major changes (once the overlays
8115 * have been put into a #GstVideoOverlayComposition object anyway) - for raw
8116 * video the overlay can just use the blending function to blend the data
8117 * on top of the video, and for surface buffers it can just attach them to
8118 * the buffer and let the sink render the overlays.
8119 */
8120 class VideoOverlayComposition {
8121 static $gtype: GObject.GType<VideoOverlayComposition>;
8122
8123 // Constructors
8124
8125 constructor(rectangle?: VideoOverlayRectangle | null);
8126 _init(...args: any[]): void;
8127
8128 static ['new'](rectangle?: VideoOverlayRectangle | null): VideoOverlayComposition;
8129
8130 // Methods
8131
8132 /**
8133 * Adds an overlay rectangle to an existing overlay composition object. This
8134 * must be done right after creating the overlay composition.
8135 * @param rectangle a #GstVideoOverlayRectangle to add to the composition
8136 */
8137 add_rectangle(rectangle: VideoOverlayRectangle): void;
8138 /**
8139 * Blends the overlay rectangles in `comp` on top of the raw video data
8140 * contained in `video_buf`. The data in `video_buf` must be writable and
8141 * mapped appropriately.
8142 *
8143 * Since `video_buf` data is read and will be modified, it ought be
8144 * mapped with flag GST_MAP_READWRITE.
8145 * @param video_buf a #GstVideoFrame containing raw video data in a supported format. It should be mapped using GST_MAP_READWRITE
8146 */
8147 blend(video_buf: VideoFrame): boolean;
8148 /**
8149 * Makes a copy of `comp` and all contained rectangles, so that it is possible
8150 * to modify the composition and contained rectangles (e.g. add additional
8151 * rectangles or change the render co-ordinates or render dimension). The
8152 * actual overlay pixel data buffers contained in the rectangles are not
8153 * copied.
8154 * @returns a new #GstVideoOverlayComposition equivalent to @comp.
8155 */
8156 copy(): VideoOverlayComposition;
8157 /**
8158 * Returns the `n-th` #GstVideoOverlayRectangle contained in `comp`.
8159 * @param n number of the rectangle to get
8160 * @returns the @n-th rectangle, or NULL if @n is out of bounds. Will not return a new reference, the caller will need to obtain her own reference using gst_video_overlay_rectangle_ref() if needed.
8161 */
8162 get_rectangle(n: number): VideoOverlayRectangle | null;
8163 /**
8164 * Returns the sequence number of this composition. Sequence numbers are
8165 * monotonically increasing and unique for overlay compositions and rectangles
8166 * (meaning there will never be a rectangle with the same sequence number as
8167 * a composition).
8168 * @returns the sequence number of @comp
8169 */
8170 get_seqnum(): number;
8171 /**
8172 * Takes ownership of `comp` and returns a version of `comp` that is writable
8173 * (i.e. can be modified). Will either return `comp` right away, or create a
8174 * new writable copy of `comp` and unref `comp` itself. All the contained
8175 * rectangles will also be copied, but the actual overlay pixel data buffers
8176 * contained in the rectangles are not copied.
8177 * @returns a writable #GstVideoOverlayComposition equivalent to @comp.
8178 */
8179 make_writable(): VideoOverlayComposition;
8180 /**
8181 * Returns the number of #GstVideoOverlayRectangle<!-- -->s contained in `comp`.
8182 * @returns the number of rectangles
8183 */
8184 n_rectangles(): number;
8185 }
8186
8187 /**
8188 * Extra buffer metadata describing image overlay data.
8189 */
8190 class VideoOverlayCompositionMeta {
8191 static $gtype: GObject.GType<VideoOverlayCompositionMeta>;
8192
8193 // Constructors
8194
8195 _init(...args: any[]): void;
8196
8197 // Static methods
8198
8199 static get_info(): Gst.MetaInfo;
8200 }
8201
8202 type VideoOverlayInterface = typeof VideoOverlay;
8203 /**
8204 * An opaque video overlay rectangle object. A rectangle contains a single
8205 * overlay rectangle which can be added to a composition.
8206 */
8207 class VideoOverlayRectangle {
8208 static $gtype: GObject.GType<VideoOverlayRectangle>;
8209
8210 // Constructors
8211
8212 constructor(
8213 pixels: Gst.Buffer,
8214 render_x: number,
8215 render_y: number,
8216 render_width: number,
8217 render_height: number,
8218 flags: VideoOverlayFormatFlags,
8219 );
8220 _init(...args: any[]): void;
8221
8222 static new_raw(
8223 pixels: Gst.Buffer,
8224 render_x: number,
8225 render_y: number,
8226 render_width: number,
8227 render_height: number,
8228 flags: VideoOverlayFormatFlags,
8229 ): VideoOverlayRectangle;
8230
8231 // Methods
8232
8233 /**
8234 * Makes a copy of `rectangle,` so that it is possible to modify it
8235 * (e.g. to change the render co-ordinates or render dimension). The
8236 * actual overlay pixel data buffers contained in the rectangle are not
8237 * copied.
8238 * @returns a new #GstVideoOverlayRectangle equivalent to @rectangle.
8239 */
8240 copy(): VideoOverlayRectangle;
8241 /**
8242 * Retrieves the flags associated with a #GstVideoOverlayRectangle.
8243 * This is useful if the caller can handle both premultiplied alpha and
8244 * non premultiplied alpha, for example. By knowing whether the rectangle
8245 * uses premultiplied or not, it can request the pixel data in the format
8246 * it is stored in, to avoid unnecessary conversion.
8247 * @returns the #GstVideoOverlayFormatFlags associated with the rectangle.
8248 */
8249 get_flags(): VideoOverlayFormatFlags;
8250 /**
8251 * Retrieves the global-alpha value associated with a #GstVideoOverlayRectangle.
8252 * @returns the global-alpha value associated with the rectangle.
8253 */
8254 get_global_alpha(): number;
8255 get_pixels_argb(flags: VideoOverlayFormatFlags | null): Gst.Buffer;
8256 get_pixels_ayuv(flags: VideoOverlayFormatFlags | null): Gst.Buffer;
8257 get_pixels_raw(flags: VideoOverlayFormatFlags | null): Gst.Buffer;
8258 /**
8259 * Retrieves the pixel data as it is. This is useful if the caller can
8260 * do the scaling itself when handling the overlaying. The rectangle will
8261 * need to be scaled to the render dimensions, which can be retrieved using
8262 * gst_video_overlay_rectangle_get_render_rectangle().
8263 * @param flags flags. If a global_alpha value != 1 is set for the rectangle, the caller should set the #GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA flag if he wants to apply global-alpha himself. If the flag is not set global_alpha is applied internally before returning the pixel-data.
8264 * @returns a #GstBuffer holding the ARGB pixel data with #GstVideoMeta set. This function does not return a reference, the caller should obtain a reference of her own with gst_buffer_ref() if needed.
8265 */
8266 get_pixels_unscaled_argb(flags: VideoOverlayFormatFlags | null): Gst.Buffer;
8267 /**
8268 * Retrieves the pixel data as it is. This is useful if the caller can
8269 * do the scaling itself when handling the overlaying. The rectangle will
8270 * need to be scaled to the render dimensions, which can be retrieved using
8271 * gst_video_overlay_rectangle_get_render_rectangle().
8272 * @param flags flags. If a global_alpha value != 1 is set for the rectangle, the caller should set the #GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA flag if he wants to apply global-alpha himself. If the flag is not set global_alpha is applied internally before returning the pixel-data.
8273 * @returns a #GstBuffer holding the AYUV pixel data with #GstVideoMeta set. This function does not return a reference, the caller should obtain a reference of her own with gst_buffer_ref() if needed.
8274 */
8275 get_pixels_unscaled_ayuv(flags: VideoOverlayFormatFlags | null): Gst.Buffer;
8276 /**
8277 * Retrieves the pixel data as it is. This is useful if the caller can
8278 * do the scaling itself when handling the overlaying. The rectangle will
8279 * need to be scaled to the render dimensions, which can be retrieved using
8280 * gst_video_overlay_rectangle_get_render_rectangle().
8281 * @param flags flags. If a global_alpha value != 1 is set for the rectangle, the caller should set the #GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA flag if he wants to apply global-alpha himself. If the flag is not set global_alpha is applied internally before returning the pixel-data.
8282 * @returns a #GstBuffer holding the pixel data with #GstVideoMeta set. This function does not return a reference, the caller should obtain a reference of her own with gst_buffer_ref() if needed.
8283 */
8284 get_pixels_unscaled_raw(flags: VideoOverlayFormatFlags | null): Gst.Buffer;
8285 /**
8286 * Retrieves the render position and render dimension of the overlay
8287 * rectangle on the video.
8288 * @returns TRUE if valid render dimensions were retrieved.
8289 */
8290 get_render_rectangle(): [boolean, number, number, number, number];
8291 /**
8292 * Returns the sequence number of this rectangle. Sequence numbers are
8293 * monotonically increasing and unique for overlay compositions and rectangles
8294 * (meaning there will never be a rectangle with the same sequence number as
8295 * a composition).
8296 *
8297 * Using the sequence number of a rectangle as an indicator for changed
8298 * pixel-data of a rectangle is dangereous. Some API calls, like e.g.
8299 * gst_video_overlay_rectangle_set_global_alpha(), automatically update
8300 * the per rectangle sequence number, which is misleading for renderers/
8301 * consumers, that handle global-alpha themselves. For them the
8302 * pixel-data returned by gst_video_overlay_rectangle_get_pixels_*()
8303 * won't be different for different global-alpha values. In this case a
8304 * renderer could also use the GstBuffer pointers as a hint for changed
8305 * pixel-data.
8306 * @returns the sequence number of @rectangle
8307 */
8308 get_seqnum(): number;
8309 /**
8310 * Sets the global alpha value associated with a #GstVideoOverlayRectangle. Per-
8311 * pixel alpha values are multiplied with this value. Valid
8312 * values: 0 <= global_alpha <= 1; 1 to deactivate.
8313 *
8314 * `rectangle` must be writable, meaning its refcount must be 1. You can
8315 * make the rectangles inside a #GstVideoOverlayComposition writable using
8316 * gst_video_overlay_composition_make_writable() or
8317 * gst_video_overlay_composition_copy().
8318 * @param global_alpha Global alpha value (0 to 1.0)
8319 */
8320 set_global_alpha(global_alpha: number): void;
8321 /**
8322 * Sets the render position and dimensions of the rectangle on the video.
8323 * This function is mainly for elements that modify the size of the video
8324 * in some way (e.g. through scaling or cropping) and need to adjust the
8325 * details of any overlays to match the operation that changed the size.
8326 *
8327 * `rectangle` must be writable, meaning its refcount must be 1. You can
8328 * make the rectangles inside a #GstVideoOverlayComposition writable using
8329 * gst_video_overlay_composition_make_writable() or
8330 * gst_video_overlay_composition_copy().
8331 * @param render_x render X position of rectangle on video
8332 * @param render_y render Y position of rectangle on video
8333 * @param render_width render width of rectangle
8334 * @param render_height render height of rectangle
8335 */
8336 set_render_rectangle(render_x: number, render_y: number, render_width: number, render_height: number): void;
8337 }
8338
8339 /**
8340 * Helper structure representing a rectangular area.
8341 */
8342 class VideoRectangle {
8343 static $gtype: GObject.GType<VideoRectangle>;
8344
8345 // Fields
8346
8347 x: number;
8348 y: number;
8349 w: number;
8350 h: number;
8351
8352 // Constructors
8353
8354 constructor(
8355 properties?: Partial<{
8356 x: number;
8357 y: number;
8358 w: number;
8359 h: number;
8360 }>,
8361 );
8362 _init(...args: any[]): void;
8363 }
8364
8365 /**
8366 * Extra buffer metadata describing an image region of interest
8367 */
8368 class VideoRegionOfInterestMeta {
8369 static $gtype: GObject.GType<VideoRegionOfInterestMeta>;
8370
8371 // Fields
8372
8373 roi_type: GLib.Quark;
8374 id: number;
8375 parent_id: number;
8376 x: number;
8377 y: number;
8378 w: number;
8379 h: number;
8380 params: any[];
8381
8382 // Constructors
8383
8384 _init(...args: any[]): void;
8385
8386 // Static methods
8387
8388 static get_info(): Gst.MetaInfo;
8389
8390 // Methods
8391
8392 /**
8393 * Attach element-specific parameters to `meta` meant to be used by downstream
8394 * elements which may handle this ROI.
8395 * The name of `s` is used to identify the element these parameters are meant for.
8396 *
8397 * This is typically used to tell encoders how they should encode this specific region.
8398 * For example, a structure named "roi/x264enc" could be used to give the
8399 * QP offsets this encoder should use when encoding the region described in `meta`.
8400 * Multiple parameters can be defined for the same meta so different encoders
8401 * can be supported by cross platform applications).
8402 * @param s a #GstStructure
8403 */
8404 add_param(s: Gst.Structure): void;
8405 /**
8406 * Retrieve the parameter for `meta` having `name` as structure name,
8407 * or %NULL if there is none.
8408 * @param name a name.
8409 * @returns a #GstStructure
8410 */
8411 get_param(name: string): Gst.Structure | null;
8412 }
8413
8414 /**
8415 * #GstVideoResampler is a structure which holds the information
8416 * required to perform various kinds of resampling filtering.
8417 */
8418 class VideoResampler {
8419 static $gtype: GObject.GType<VideoResampler>;
8420
8421 // Fields
8422
8423 in_size: number;
8424 out_size: number;
8425 max_taps: number;
8426 n_phases: number;
8427 offset: number;
8428 phase: number;
8429 n_taps: number;
8430 taps: number;
8431
8432 // Constructors
8433
8434 constructor(
8435 properties?: Partial<{
8436 in_size: number;
8437 out_size: number;
8438 max_taps: number;
8439 n_phases: number;
8440 offset: number;
8441 phase: number;
8442 n_taps: number;
8443 taps: number;
8444 }>,
8445 );
8446 _init(...args: any[]): void;
8447
8448 // Methods
8449
8450 /**
8451 * Clear a previously initialized #GstVideoResampler `resampler`.
8452 */
8453 clear(): void;
8454 init(
8455 method: VideoResamplerMethod | null,
8456 flags: VideoResamplerFlags | null,
8457 n_phases: number,
8458 n_taps: number,
8459 shift: number,
8460 in_size: number,
8461 out_size: number,
8462 options: Gst.Structure,
8463 ): boolean;
8464 }
8465
8466 /**
8467 * H.264 H.265 metadata from SEI User Data Unregistered messages
8468 */
8469 class VideoSEIUserDataUnregisteredMeta {
8470 static $gtype: GObject.GType<VideoSEIUserDataUnregisteredMeta>;
8471
8472 // Fields
8473
8474 uuid: Uint8Array;
8475 data: number;
8476 size: number;
8477
8478 // Constructors
8479
8480 _init(...args: any[]): void;
8481
8482 // Static methods
8483
8484 static get_info(): Gst.MetaInfo;
8485 }
8486
8487 /**
8488 * #GstVideoScaler is a utility object for rescaling and resampling
8489 * video frames using various interpolation / sampling methods.
8490 */
8491 abstract class VideoScaler {
8492 static $gtype: GObject.GType<VideoScaler>;
8493
8494 // Constructors
8495
8496 _init(...args: any[]): void;
8497
8498 // Methods
8499
8500 /**
8501 * Scale a rectangle of pixels in `src` with `src_stride` to `dest` with
8502 * `dest_stride` using the horizontal scaler `hscaler` and the vertical
8503 * scaler `vscale`.
8504 *
8505 * One or both of `hscale` and `vscale` can be NULL to only perform scaling in
8506 * one dimension or do a copy without scaling.
8507 *
8508 * `x` and `y` are the coordinates in the destination image to process.
8509 * @param vscale a vertical #GstVideoScaler
8510 * @param format a #GstVideoFormat for @srcs and @dest
8511 * @param src source pixels
8512 * @param src_stride source pixels stride
8513 * @param dest destination pixels
8514 * @param dest_stride destination pixels stride
8515 * @param x the horizontal destination offset
8516 * @param y the vertical destination offset
8517 * @param width the number of output pixels to scale
8518 * @param height the number of output lines to scale
8519 */
8520 ['2d'](
8521 vscale: VideoScaler,
8522 format: VideoFormat | null,
8523 src: any | null,
8524 src_stride: number,
8525 dest: any | null,
8526 dest_stride: number,
8527 x: number,
8528 y: number,
8529 width: number,
8530 height: number,
8531 ): void;
8532 /**
8533 * Free a previously allocated #GstVideoScaler `scale`.
8534 */
8535 free(): void;
8536 /**
8537 * For a given pixel at `out_offset,` get the first required input pixel at
8538 * `in_offset` and the `n_taps` filter coefficients.
8539 *
8540 * Note that for interlaced content, `in_offset` needs to be incremented with
8541 * 2 to get the next input line.
8542 * @param out_offset an output offset
8543 * @returns an array of @n_tap gdouble values with filter coefficients.
8544 */
8545 get_coeff(out_offset: number): [number, number, number];
8546 /**
8547 * Get the maximum number of taps for `scale`.
8548 * @returns the maximum number of taps
8549 */
8550 get_max_taps(): number;
8551 /**
8552 * Horizontally scale the pixels in `src` to `dest,` starting from `dest_offset`
8553 * for `width` samples.
8554 * @param format a #GstVideoFormat for @src and @dest
8555 * @param src source pixels
8556 * @param dest destination pixels
8557 * @param dest_offset the horizontal destination offset
8558 * @param width the number of pixels to scale
8559 */
8560 horizontal(
8561 format: VideoFormat | null,
8562 src: any | null,
8563 dest: any | null,
8564 dest_offset: number,
8565 width: number,
8566 ): void;
8567 /**
8568 * Vertically combine `width` pixels in the lines in `src_lines` to `dest`.
8569 * `dest` is the location of the target line at `dest_offset` and
8570 * `srcs` are the input lines for `dest_offset`.
8571 * @param format a #GstVideoFormat for @srcs and @dest
8572 * @param src_lines source pixels lines
8573 * @param dest destination pixels
8574 * @param dest_offset the vertical destination offset
8575 * @param width the number of pixels to scale
8576 */
8577 vertical(
8578 format: VideoFormat | null,
8579 src_lines: any | null,
8580 dest: any | null,
8581 dest_offset: number,
8582 width: number,
8583 ): void;
8584 }
8585
8586 type VideoSinkClass = typeof VideoSink;
8587 abstract class VideoSinkPrivate {
8588 static $gtype: GObject.GType<VideoSinkPrivate>;
8589
8590 // Constructors
8591
8592 _init(...args: any[]): void;
8593 }
8594
8595 /**
8596 * Description of a tile. This structure allow to describe arbitrary tile
8597 * dimensions and sizes.
8598 */
8599 class VideoTileInfo {
8600 static $gtype: GObject.GType<VideoTileInfo>;
8601
8602 // Fields
8603
8604 width: number;
8605 height: number;
8606 stride: number;
8607 size: number;
8608
8609 // Constructors
8610
8611 constructor(
8612 properties?: Partial<{
8613 width: number;
8614 height: number;
8615 stride: number;
8616 size: number;
8617 }>,
8618 );
8619 _init(...args: any[]): void;
8620 }
8621
8622 /**
8623 * `field_count` must be 0 for progressive video and 1 or 2 for interlaced.
8624 *
8625 * A representation of a SMPTE time code.
8626 *
8627 * `hours` must be positive and less than 24. Will wrap around otherwise.
8628 * `minutes` and `seconds` must be positive and less than 60.
8629 * `frames` must be less than or equal to `config`.fps_n / `config`.fps_d
8630 * These values are *NOT* automatically normalized.
8631 */
8632 class VideoTimeCode {
8633 static $gtype: GObject.GType<VideoTimeCode>;
8634
8635 // Fields
8636
8637 hours: number;
8638 minutes: number;
8639 seconds: number;
8640 frames: number;
8641 field_count: number;
8642
8643 // Constructors
8644
8645 constructor(
8646 properties?: Partial<{
8647 config: VideoTimeCodeConfig;
8648 hours: number;
8649 minutes: number;
8650 seconds: number;
8651 frames: number;
8652 field_count: number;
8653 }>,
8654 );
8655 _init(...args: any[]): void;
8656
8657 static ['new'](
8658 fps_n: number,
8659 fps_d: number,
8660 latest_daily_jam: GLib.DateTime,
8661 flags: VideoTimeCodeFlags,
8662 hours: number,
8663 minutes: number,
8664 seconds: number,
8665 frames: number,
8666 field_count: number,
8667 ): VideoTimeCode;
8668
8669 static new_empty(): VideoTimeCode;
8670
8671 static new_from_date_time(
8672 fps_n: number,
8673 fps_d: number,
8674 dt: GLib.DateTime,
8675 flags: VideoTimeCodeFlags,
8676 field_count: number,
8677 ): VideoTimeCode;
8678
8679 static new_from_date_time_full(
8680 fps_n: number,
8681 fps_d: number,
8682 dt: GLib.DateTime,
8683 flags: VideoTimeCodeFlags,
8684 field_count: number,
8685 ): VideoTimeCode;
8686
8687 static new_from_string(tc_str: string): VideoTimeCode;
8688
8689 // Methods
8690
8691 /**
8692 * Adds or subtracts `frames` amount of frames to `tc`. tc needs to
8693 * contain valid data, as verified by gst_video_time_code_is_valid().
8694 * @param frames How many frames to add or subtract
8695 */
8696 add_frames(frames: number): void;
8697 /**
8698 * This makes a component-wise addition of `tc_inter` to `tc`. For example,
8699 * adding ("01:02:03:04", "00:01:00:00") will return "01:03:03:04".
8700 * When it comes to drop-frame timecodes,
8701 * adding ("00:00:00;00", "00:01:00:00") will return "00:01:00;02"
8702 * because of drop-frame oddities. However,
8703 * adding ("00:09:00;02", "00:01:00:00") will return "00:10:00;00"
8704 * because this time we can have an exact minute.
8705 * @param tc_inter The #GstVideoTimeCodeInterval to add to @tc. The interval must contain valid values, except that for drop-frame timecode, it may also contain timecodes which would normally be dropped. These are then corrected to the next reasonable timecode.
8706 * @returns A new #GstVideoTimeCode with @tc_inter added or %NULL if the interval can't be added.
8707 */
8708 add_interval(tc_inter: VideoTimeCodeInterval): VideoTimeCode | null;
8709 /**
8710 * Initializes `tc` with empty/zero/NULL values and frees any memory
8711 * it might currently use.
8712 */
8713 clear(): void;
8714 /**
8715 * Compares `tc1` and `tc2`. If both have latest daily jam information, it is
8716 * taken into account. Otherwise, it is assumed that the daily jam of both
8717 * `tc1` and `tc2` was at the same time. Both time codes must be valid.
8718 * @param tc2 another valid #GstVideoTimeCode
8719 * @returns 1 if @tc1 is after @tc2, -1 if @tc1 is before @tc2, 0 otherwise.
8720 */
8721 compare(tc2: VideoTimeCode): number;
8722 copy(): VideoTimeCode;
8723 frames_since_daily_jam(): number;
8724 /**
8725 * Frees `tc`.
8726 */
8727 free(): void;
8728 /**
8729 * Adds one frame to `tc`.
8730 */
8731 increment_frame(): void;
8732 /**
8733 * `field_count` is 0 for progressive, 1 or 2 for interlaced.
8734 * `latest_daiy_jam` reference is stolen from caller.
8735 *
8736 * Initializes `tc` with the given values.
8737 * The values are not checked for being in a valid range. To see if your
8738 * timecode actually has valid content, use gst_video_time_code_is_valid().
8739 * @param fps_n Numerator of the frame rate
8740 * @param fps_d Denominator of the frame rate
8741 * @param latest_daily_jam The latest daily jam of the #GstVideoTimeCode
8742 * @param flags #GstVideoTimeCodeFlags
8743 * @param hours the hours field of #GstVideoTimeCode
8744 * @param minutes the minutes field of #GstVideoTimeCode
8745 * @param seconds the seconds field of #GstVideoTimeCode
8746 * @param frames the frames field of #GstVideoTimeCode
8747 * @param field_count Interlaced video field count
8748 */
8749 init(
8750 fps_n: number,
8751 fps_d: number,
8752 latest_daily_jam: GLib.DateTime | null,
8753 flags: VideoTimeCodeFlags | null,
8754 hours: number,
8755 minutes: number,
8756 seconds: number,
8757 frames: number,
8758 field_count: number,
8759 ): void;
8760 /**
8761 * The resulting config->latest_daily_jam is set to midnight, and timecode is
8762 * set to the given time.
8763 *
8764 * Will assert on invalid parameters, use gst_video_time_code_init_from_date_time_full()
8765 * for being able to handle invalid parameters.
8766 * @param fps_n Numerator of the frame rate
8767 * @param fps_d Denominator of the frame rate
8768 * @param dt #GDateTime to convert
8769 * @param flags #GstVideoTimeCodeFlags
8770 * @param field_count Interlaced video field count
8771 */
8772 init_from_date_time(
8773 fps_n: number,
8774 fps_d: number,
8775 dt: GLib.DateTime,
8776 flags: VideoTimeCodeFlags | null,
8777 field_count: number,
8778 ): void;
8779 /**
8780 * The resulting config->latest_daily_jam is set to
8781 * midnight, and timecode is set to the given time.
8782 * @param fps_n Numerator of the frame rate
8783 * @param fps_d Denominator of the frame rate
8784 * @param dt #GDateTime to convert
8785 * @param flags #GstVideoTimeCodeFlags
8786 * @param field_count Interlaced video field count
8787 * @returns %TRUE if @tc could be correctly initialized to a valid timecode
8788 */
8789 init_from_date_time_full(
8790 fps_n: number,
8791 fps_d: number,
8792 dt: GLib.DateTime,
8793 flags: VideoTimeCodeFlags | null,
8794 field_count: number,
8795 ): boolean;
8796 is_valid(): boolean;
8797 nsec_since_daily_jam(): number;
8798 /**
8799 * The `tc`.config->latest_daily_jam is required to be non-NULL.
8800 * @returns the #GDateTime representation of @tc or %NULL if @tc has no daily jam.
8801 */
8802 to_date_time(): GLib.DateTime | null;
8803 to_string(): string;
8804 }
8805
8806 /**
8807 * Supported frame rates: 30000/1001, 60000/1001 (both with and without drop
8808 * frame), and integer frame rates e.g. 25/1, 30/1, 50/1, 60/1.
8809 *
8810 * The configuration of the time code.
8811 */
8812 class VideoTimeCodeConfig {
8813 static $gtype: GObject.GType<VideoTimeCodeConfig>;
8814
8815 // Fields
8816
8817 fps_n: number;
8818 fps_d: number;
8819 flags: VideoTimeCodeFlags;
8820
8821 // Constructors
8822
8823 _init(...args: any[]): void;
8824 }
8825
8826 /**
8827 * A representation of a difference between two #GstVideoTimeCode instances.
8828 * Will not necessarily correspond to a real timecode (e.g. 00:00:10;00)
8829 */
8830 class VideoTimeCodeInterval {
8831 static $gtype: GObject.GType<VideoTimeCodeInterval>;
8832
8833 // Fields
8834
8835 hours: number;
8836 minutes: number;
8837 seconds: number;
8838 frames: number;
8839
8840 // Constructors
8841
8842 constructor(
8843 properties?: Partial<{
8844 hours: number;
8845 minutes: number;
8846 seconds: number;
8847 frames: number;
8848 }>,
8849 );
8850 _init(...args: any[]): void;
8851
8852 static ['new'](hours: number, minutes: number, seconds: number, frames: number): VideoTimeCodeInterval;
8853
8854 static new_from_string(tc_inter_str: string): VideoTimeCodeInterval;
8855
8856 // Methods
8857
8858 /**
8859 * Initializes `tc` with empty/zero/NULL values.
8860 */
8861 clear(): void;
8862 copy(): VideoTimeCodeInterval;
8863 /**
8864 * Frees `tc`.
8865 */
8866 free(): void;
8867 /**
8868 * Initializes `tc` with the given values.
8869 * @param hours the hours field of #GstVideoTimeCodeInterval
8870 * @param minutes the minutes field of #GstVideoTimeCodeInterval
8871 * @param seconds the seconds field of #GstVideoTimeCodeInterval
8872 * @param frames the frames field of #GstVideoTimeCodeInterval
8873 */
8874 init(hours: number, minutes: number, seconds: number, frames: number): void;
8875 }
8876
8877 /**
8878 * Extra buffer metadata describing the GstVideoTimeCode of the frame.
8879 *
8880 * Each frame is assumed to have its own timecode, i.e. they are not
8881 * automatically incremented/interpolated.
8882 */
8883 class VideoTimeCodeMeta {
8884 static $gtype: GObject.GType<VideoTimeCodeMeta>;
8885
8886 // Fields
8887
8888 tc: VideoTimeCode;
8889
8890 // Constructors
8891
8892 _init(...args: any[]): void;
8893
8894 // Static methods
8895
8896 static get_info(): Gst.MetaInfo;
8897 }
8898
8899 /**
8900 * An encoder for writing ancillary data to the
8901 * Vertical Blanking Interval lines of component signals.
8902 */
8903 class VideoVBIEncoder {
8904 static $gtype: GObject.GType<VideoVBIEncoder>;
8905
8906 // Constructors
8907
8908 constructor(format: VideoFormat, pixel_width: number);
8909 _init(...args: any[]): void;
8910
8911 static ['new'](format: VideoFormat, pixel_width: number): VideoVBIEncoder;
8912
8913 // Methods
8914
8915 /**
8916 * Stores Video Ancillary data, according to SMPTE-291M specification.
8917 *
8918 * Note that the contents of the data are always read as 8bit data (i.e. do not contain
8919 * the parity check bits).
8920 * @param composite %TRUE if composite ADF should be created, component otherwise
8921 * @param DID The Data Identifier
8922 * @param SDID_block_number The Secondary Data Identifier (if type 2) or the Data Block Number (if type 1)
8923 * @param data The user data content of the Ancillary packet. Does not contain the ADF, DID, SDID nor CS.
8924 * @returns %TRUE if enough space was left in the current line, %FALSE otherwise.
8925 */
8926 add_ancillary(
8927 composite: boolean,
8928 DID: number,
8929 SDID_block_number: number,
8930 data: Uint8Array | string,
8931 ): boolean;
8932 copy(): VideoVBIEncoder;
8933 /**
8934 * Frees the `encoder`.
8935 */
8936 free(): void;
8937 write_line(data: number): void;
8938 }
8939
8940 /**
8941 * A parser for detecting and extracting `GstVideoAncillary` data from
8942 * Vertical Blanking Interval lines of component signals.
8943 */
8944 class VideoVBIParser {
8945 static $gtype: GObject.GType<VideoVBIParser>;
8946
8947 // Constructors
8948
8949 constructor(format: VideoFormat, pixel_width: number);
8950 _init(...args: any[]): void;
8951
8952 static ['new'](format: VideoFormat, pixel_width: number): VideoVBIParser;
8953
8954 // Methods
8955
8956 /**
8957 * Provide a new line of data to the `parser`. Call gst_video_vbi_parser_get_ancillary()
8958 * to get the Ancillary data that might be present on that line.
8959 * @param data The line of data to parse
8960 */
8961 add_line(data: Uint8Array | string): void;
8962 copy(): VideoVBIParser;
8963 /**
8964 * Frees the `parser`.
8965 */
8966 free(): void;
8967 /**
8968 * Parse the line provided previously by gst_video_vbi_parser_add_line().
8969 * @returns %GST_VIDEO_VBI_PARSER_RESULT_OK if ancillary data was found and @anc was filled. %GST_VIDEO_VBI_PARSER_RESULT_DONE if there wasn't any data.
8970 */
8971 get_ancillary(): [VideoVBIParserResult, VideoAncillary];
8972 }
8973
8974 namespace ColorBalance {
8975 // Constructor properties interface
8976
8977 interface ConstructorProps extends GObject.Object.ConstructorProps {}
8978 }
8979
8980 export interface ColorBalanceNamespace {
8981 $gtype: GObject.GType<ColorBalance>;
8982 prototype: ColorBalance;
8983 }
8984 interface ColorBalance extends GObject.Object {
8985 // Methods
8986
8987 /**
8988 * Get the #GstColorBalanceType of this implementation.
8989 * @returns A the #GstColorBalanceType.
8990 */
8991 get_balance_type(): ColorBalanceType;
8992 /**
8993 * Retrieve the current value of the indicated channel, between min_value
8994 * and max_value.
8995 *
8996 * See Also: The #GstColorBalanceChannel.min_value and
8997 * #GstColorBalanceChannel.max_value members of the
8998 * #GstColorBalanceChannel object.
8999 * @param channel A #GstColorBalanceChannel instance
9000 * @returns The current value of the channel.
9001 */
9002 get_value(channel: ColorBalanceChannel): number;
9003 /**
9004 * Retrieve a list of the available channels.
9005 * @returns A GList containing pointers to #GstColorBalanceChannel objects. The list is owned by the #GstColorBalance instance and must not be freed.
9006 */
9007 list_channels(): ColorBalanceChannel[];
9008 /**
9009 * Sets the current value of the channel to the passed value, which must
9010 * be between min_value and max_value.
9011 *
9012 * See Also: The #GstColorBalanceChannel.min_value and
9013 * #GstColorBalanceChannel.max_value members of the
9014 * #GstColorBalanceChannel object.
9015 * @param channel A #GstColorBalanceChannel instance
9016 * @param value The new value for the channel.
9017 */
9018 set_value(channel: ColorBalanceChannel, value: number): void;
9019 /**
9020 * A helper function called by implementations of the GstColorBalance
9021 * interface. It fires the #GstColorBalance::value-changed signal on the
9022 * instance, and the #GstColorBalanceChannel::value-changed signal on the
9023 * channel object.
9024 * @param channel A #GstColorBalanceChannel whose value has changed
9025 * @param value The new value of the channel
9026 */
9027 value_changed(channel: ColorBalanceChannel, value: number): void;
9028
9029 // Virtual methods
9030
9031 /**
9032 * Get the #GstColorBalanceType of this implementation.
9033 */
9034 vfunc_get_balance_type(): ColorBalanceType;
9035 /**
9036 * Retrieve the current value of the indicated channel, between min_value
9037 * and max_value.
9038 *
9039 * See Also: The #GstColorBalanceChannel.min_value and
9040 * #GstColorBalanceChannel.max_value members of the
9041 * #GstColorBalanceChannel object.
9042 * @param channel A #GstColorBalanceChannel instance
9043 */
9044 vfunc_get_value(channel: ColorBalanceChannel): number;
9045 /**
9046 * Retrieve a list of the available channels.
9047 */
9048 vfunc_list_channels(): ColorBalanceChannel[];
9049 /**
9050 * Sets the current value of the channel to the passed value, which must
9051 * be between min_value and max_value.
9052 *
9053 * See Also: The #GstColorBalanceChannel.min_value and
9054 * #GstColorBalanceChannel.max_value members of the
9055 * #GstColorBalanceChannel object.
9056 * @param channel A #GstColorBalanceChannel instance
9057 * @param value The new value for the channel.
9058 */
9059 vfunc_set_value(channel: ColorBalanceChannel, value: number): void;
9060 /**
9061 * A helper function called by implementations of the GstColorBalance
9062 * interface. It fires the #GstColorBalance::value-changed signal on the
9063 * instance, and the #GstColorBalanceChannel::value-changed signal on the
9064 * channel object.
9065 * @param channel A #GstColorBalanceChannel whose value has changed
9066 * @param value The new value of the channel
9067 */
9068 vfunc_value_changed(channel: ColorBalanceChannel, value: number): void;
9069 }
9070
9071 export const ColorBalance: ColorBalanceNamespace & {
9072 new (): ColorBalance; // This allows `obj instanceof ColorBalance`
9073 };
9074
9075 namespace Navigation {
9076 // Constructor properties interface
9077
9078 interface ConstructorProps extends GObject.Object.ConstructorProps {}
9079 }
9080
9081 export interface NavigationNamespace {
9082 $gtype: GObject.GType<Navigation>;
9083 prototype: Navigation;
9084
9085 /**
9086 * Try to retrieve x and y coordinates of a #GstNavigation event.
9087 * @param event The #GstEvent to inspect.
9088 */
9089 event_get_coordinates(event: Gst.Event): [boolean, number, number];
9090 /**
9091 * Inspect a #GstEvent and return the #GstNavigationEventType of the event, or
9092 * #GST_NAVIGATION_EVENT_INVALID if the event is not a #GstNavigation event.
9093 * @param event A #GstEvent to inspect.
9094 */
9095 event_get_type(event: Gst.Event): NavigationEventType;
9096 /**
9097 * Create a new navigation event given navigation command..
9098 * @param command The navigation command to use.
9099 */
9100 event_new_command(command: NavigationCommand): Gst.Event;
9101 /**
9102 * Create a new navigation event for the given key press.
9103 * @param key A string identifying the key press.
9104 * @param state a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt).
9105 */
9106 event_new_key_press(key: string, state: NavigationModifierType): Gst.Event;
9107 /**
9108 * Create a new navigation event for the given key release.
9109 * @param key A string identifying the released key.
9110 * @param state a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt).
9111 */
9112 event_new_key_release(key: string, state: NavigationModifierType): Gst.Event;
9113 /**
9114 * Create a new navigation event for the given key mouse button press.
9115 * @param button The number of the pressed mouse button.
9116 * @param x The x coordinate of the mouse cursor.
9117 * @param y The y coordinate of the mouse cursor.
9118 * @param state a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt).
9119 */
9120 event_new_mouse_button_press(
9121 button: number,
9122 x: number,
9123 y: number,
9124 state: NavigationModifierType,
9125 ): Gst.Event;
9126 /**
9127 * Create a new navigation event for the given key mouse button release.
9128 * @param button The number of the released mouse button.
9129 * @param x The x coordinate of the mouse cursor.
9130 * @param y The y coordinate of the mouse cursor.
9131 * @param state a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt).
9132 */
9133 event_new_mouse_button_release(
9134 button: number,
9135 x: number,
9136 y: number,
9137 state: NavigationModifierType,
9138 ): Gst.Event;
9139 /**
9140 * Create a new navigation event for the new mouse location.
9141 * @param x The x coordinate of the mouse cursor.
9142 * @param y The y coordinate of the mouse cursor.
9143 * @param state a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt).
9144 */
9145 event_new_mouse_move(x: number, y: number, state: NavigationModifierType): Gst.Event;
9146 /**
9147 * Create a new navigation event for the mouse scroll.
9148 * @param x The x coordinate of the mouse cursor.
9149 * @param y The y coordinate of the mouse cursor.
9150 * @param delta_x The x component of the scroll movement.
9151 * @param delta_y The y component of the scroll movement.
9152 * @param state a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt).
9153 */
9154 event_new_mouse_scroll(
9155 x: number,
9156 y: number,
9157 delta_x: number,
9158 delta_y: number,
9159 state: NavigationModifierType,
9160 ): Gst.Event;
9161 /**
9162 * Create a new navigation event signalling that all currently active touch
9163 * points are cancelled and should be discarded. For example, under Wayland
9164 * this event might be sent when a swipe passes the threshold to be recognized
9165 * as a gesture by the compositor.
9166 * @param state a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt).
9167 */
9168 event_new_touch_cancel(state: NavigationModifierType): Gst.Event;
9169 /**
9170 * Create a new navigation event for an added touch point.
9171 * @param identifier A number uniquely identifying this touch point. It must stay unique to this touch point at least until an up event is sent for the same identifier, or all touch points are cancelled.
9172 * @param x The x coordinate of the new touch point.
9173 * @param y The y coordinate of the new touch point.
9174 * @param pressure Pressure data of the touch point, from 0.0 to 1.0, or NaN if no data is available.
9175 * @param state a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt).
9176 */
9177 event_new_touch_down(
9178 identifier: number,
9179 x: number,
9180 y: number,
9181 pressure: number,
9182 state: NavigationModifierType,
9183 ): Gst.Event;
9184 /**
9185 * Create a new navigation event signalling the end of a touch frame. Touch
9186 * frames signal that all previous down, motion and up events not followed by
9187 * another touch frame event already should be considered simultaneous.
9188 * @param state a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt).
9189 */
9190 event_new_touch_frame(state: NavigationModifierType): Gst.Event;
9191 /**
9192 * Create a new navigation event for a moved touch point.
9193 * @param identifier A number uniquely identifying this touch point. It must correlate to exactly one previous touch_start event.
9194 * @param x The x coordinate of the touch point.
9195 * @param y The y coordinate of the touch point.
9196 * @param pressure Pressure data of the touch point, from 0.0 to 1.0, or NaN if no data is available.
9197 * @param state a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt).
9198 */
9199 event_new_touch_motion(
9200 identifier: number,
9201 x: number,
9202 y: number,
9203 pressure: number,
9204 state: NavigationModifierType,
9205 ): Gst.Event;
9206 /**
9207 * Create a new navigation event for a removed touch point.
9208 * @param identifier A number uniquely identifying this touch point. It must correlate to exactly one previous down event, but can be reused after sending this event.
9209 * @param x The x coordinate of the touch point.
9210 * @param y The y coordinate of the touch point.
9211 * @param state a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt).
9212 */
9213 event_new_touch_up(identifier: number, x: number, y: number, state: NavigationModifierType): Gst.Event;
9214 /**
9215 * Inspect a #GstNavigation command event and retrieve the enum value of the
9216 * associated command.
9217 * @param event A #GstEvent to inspect.
9218 */
9219 event_parse_command(event: Gst.Event): [boolean, NavigationCommand | null];
9220 /**
9221 * Note: Modifier keys (as defined in #GstNavigationModifierType)
9222 * [press](GST_NAVIGATION_EVENT_KEY_PRESS) and
9223 * [release](GST_NAVIGATION_KEY_PRESS) events are generated even if those states are
9224 * present on all other related events
9225 * @param event A #GstEvent to inspect.
9226 */
9227 event_parse_key_event(event: Gst.Event): [boolean, string];
9228 event_parse_modifier_state(event: Gst.Event, state: NavigationModifierType): boolean;
9229 /**
9230 * Retrieve the details of either a #GstNavigation mouse button press event or
9231 * a mouse button release event. Determine which type the event is using
9232 * gst_navigation_event_get_type() to retrieve the #GstNavigationEventType.
9233 * @param event A #GstEvent to inspect.
9234 */
9235 event_parse_mouse_button_event(event: Gst.Event): [boolean, number, number, number];
9236 /**
9237 * Inspect a #GstNavigation mouse movement event and extract the coordinates
9238 * of the event.
9239 * @param event A #GstEvent to inspect.
9240 */
9241 event_parse_mouse_move_event(event: Gst.Event): [boolean, number, number];
9242 /**
9243 * Inspect a #GstNavigation mouse scroll event and extract the coordinates
9244 * of the event.
9245 * @param event A #GstEvent to inspect.
9246 */
9247 event_parse_mouse_scroll_event(event: Gst.Event): [boolean, number, number, number, number];
9248 /**
9249 * Retrieve the details of a #GstNavigation touch-down or touch-motion event.
9250 * Determine which type the event is using gst_navigation_event_get_type()
9251 * to retrieve the #GstNavigationEventType.
9252 * @param event A #GstEvent to inspect.
9253 */
9254 event_parse_touch_event(event: Gst.Event): [boolean, number, number, number, number];
9255 /**
9256 * Retrieve the details of a #GstNavigation touch-up event.
9257 * @param event A #GstEvent to inspect.
9258 */
9259 event_parse_touch_up_event(event: Gst.Event): [boolean, number, number, number];
9260 /**
9261 * Try to set x and y coordinates on a #GstNavigation event. The event must
9262 * be writable.
9263 * @param event The #GstEvent to modify.
9264 * @param x The x coordinate to set.
9265 * @param y The y coordinate to set.
9266 */
9267 event_set_coordinates(event: Gst.Event, x: number, y: number): boolean;
9268 /**
9269 * Check a bus message to see if it is a #GstNavigation event, and return
9270 * the #GstNavigationMessageType identifying the type of the message if so.
9271 * @param message A #GstMessage to inspect.
9272 */
9273 message_get_type(message: Gst.Message): NavigationMessageType;
9274 /**
9275 * Creates a new #GstNavigation message with type
9276 * #GST_NAVIGATION_MESSAGE_ANGLES_CHANGED for notifying an application
9277 * that the current angle, or current number of angles available in a
9278 * multiangle video has changed.
9279 * @param src A #GstObject to set as source of the new message.
9280 * @param cur_angle The currently selected angle.
9281 * @param n_angles The number of viewing angles now available.
9282 */
9283 message_new_angles_changed(src: Gst.Object, cur_angle: number, n_angles: number): Gst.Message;
9284 /**
9285 * Creates a new #GstNavigation message with type
9286 * #GST_NAVIGATION_MESSAGE_COMMANDS_CHANGED
9287 * @param src A #GstObject to set as source of the new message.
9288 */
9289 message_new_commands_changed(src: Gst.Object): Gst.Message;
9290 /**
9291 * Creates a new #GstNavigation message with type
9292 * #GST_NAVIGATION_MESSAGE_EVENT.
9293 * @param src A #GstObject to set as source of the new message.
9294 * @param event A navigation #GstEvent
9295 */
9296 message_new_event(src: Gst.Object, event: Gst.Event): Gst.Message;
9297 /**
9298 * Creates a new #GstNavigation message with type
9299 * #GST_NAVIGATION_MESSAGE_MOUSE_OVER.
9300 * @param src A #GstObject to set as source of the new message.
9301 * @param active %TRUE if the mouse has entered a clickable area of the display. %FALSE if it over a non-clickable area.
9302 */
9303 message_new_mouse_over(src: Gst.Object, active: boolean): Gst.Message;
9304 /**
9305 * Parse a #GstNavigation message of type GST_NAVIGATION_MESSAGE_ANGLES_CHANGED
9306 * and extract the `cur_angle` and `n_angles` parameters.
9307 * @param message A #GstMessage to inspect.
9308 */
9309 message_parse_angles_changed(message: Gst.Message): [boolean, number, number];
9310 /**
9311 * Parse a #GstNavigation message of type #GST_NAVIGATION_MESSAGE_EVENT
9312 * and extract contained #GstEvent. The caller must unref the `event` when done
9313 * with it.
9314 * @param message A #GstMessage to inspect.
9315 */
9316 message_parse_event(message: Gst.Message): [boolean, Gst.Event | null];
9317 /**
9318 * Parse a #GstNavigation message of type #GST_NAVIGATION_MESSAGE_MOUSE_OVER
9319 * and extract the active/inactive flag. If the mouse over event is marked
9320 * active, it indicates that the mouse is over a clickable area.
9321 * @param message A #GstMessage to inspect.
9322 */
9323 message_parse_mouse_over(message: Gst.Message): [boolean, boolean];
9324 /**
9325 * Inspect a #GstQuery and return the #GstNavigationQueryType associated with
9326 * it if it is a #GstNavigation query.
9327 * @param query The query to inspect
9328 */
9329 query_get_type(query: Gst.Query): NavigationQueryType;
9330 /**
9331 * Create a new #GstNavigation angles query. When executed, it will
9332 * query the pipeline for the set of currently available angles, which may be
9333 * greater than one in a multiangle video.
9334 */
9335 query_new_angles(): Gst.Query;
9336 /**
9337 * Create a new #GstNavigation commands query. When executed, it will
9338 * query the pipeline for the set of currently available commands.
9339 */
9340 query_new_commands(): Gst.Query;
9341 /**
9342 * Parse the current angle number in the #GstNavigation angles `query` into the
9343 * #guint pointed to by the `cur_angle` variable, and the number of available
9344 * angles into the #guint pointed to by the `n_angles` variable.
9345 * @param query a #GstQuery
9346 */
9347 query_parse_angles(query: Gst.Query): [boolean, number, number];
9348 /**
9349 * Parse the number of commands in the #GstNavigation commands `query`.
9350 * @param query a #GstQuery
9351 */
9352 query_parse_commands_length(query: Gst.Query): [boolean, number];
9353 /**
9354 * Parse the #GstNavigation command query and retrieve the `nth` command from
9355 * it into `cmd`. If the list contains less elements than `nth,` `cmd` will be
9356 * set to #GST_NAVIGATION_COMMAND_INVALID.
9357 * @param query a #GstQuery
9358 * @param nth the nth command to retrieve.
9359 */
9360 query_parse_commands_nth(query: Gst.Query, nth: number): [boolean, NavigationCommand | null];
9361 /**
9362 * Set the #GstNavigation angles query result field in `query`.
9363 * @param query a #GstQuery
9364 * @param cur_angle the current viewing angle to set.
9365 * @param n_angles the number of viewing angles to set.
9366 */
9367 query_set_angles(query: Gst.Query, cur_angle: number, n_angles: number): void;
9368 /**
9369 * Set the #GstNavigation command query result fields in `query`. The number
9370 * of commands passed must be equal to `n_commands`.
9371 * @param query a #GstQuery
9372 * @param cmds An array containing @n_cmds @GstNavigationCommand values.
9373 */
9374 query_set_commandsv(query: Gst.Query, cmds: NavigationCommand[]): void;
9375 }
9376 interface Navigation extends GObject.Object {
9377 // Methods
9378
9379 /**
9380 * Sends the indicated command to the navigation interface.
9381 * @param command The command to issue
9382 */
9383 send_command(command: NavigationCommand | null): void;
9384 send_event(structure: Gst.Structure): void;
9385 /**
9386 * Sends an event to the navigation interface.
9387 * @param event The event to send
9388 */
9389 send_event_simple(event: Gst.Event): void;
9390 send_key_event(event: string, key: string): void;
9391 /**
9392 * Sends a mouse event to the navigation interface. Mouse event coordinates
9393 * are sent relative to the display space of the related output area. This is
9394 * usually the size in pixels of the window associated with the element
9395 * implementing the #GstNavigation interface.
9396 * @param event The type of mouse event, as a text string. Recognised values are "mouse-button-press", "mouse-button-release" and "mouse-move".
9397 * @param button The button number of the button being pressed or released. Pass 0 for mouse-move events.
9398 * @param x The x coordinate of the mouse event.
9399 * @param y The y coordinate of the mouse event.
9400 */
9401 send_mouse_event(event: string, button: number, x: number, y: number): void;
9402 /**
9403 * Sends a mouse scroll event to the navigation interface. Mouse event coordinates
9404 * are sent relative to the display space of the related output area. This is
9405 * usually the size in pixels of the window associated with the element
9406 * implementing the #GstNavigation interface.
9407 * @param x The x coordinate of the mouse event.
9408 * @param y The y coordinate of the mouse event.
9409 * @param delta_x The delta_x coordinate of the mouse event.
9410 * @param delta_y The delta_y coordinate of the mouse event.
9411 */
9412 send_mouse_scroll_event(x: number, y: number, delta_x: number, delta_y: number): void;
9413
9414 // Virtual methods
9415
9416 /**
9417 * sending a navigation event.
9418 * @param structure
9419 */
9420 vfunc_send_event(structure: Gst.Structure): void;
9421 /**
9422 * Sends an event to the navigation interface.
9423 * @param event The event to send
9424 */
9425 vfunc_send_event_simple(event: Gst.Event): void;
9426 }
9427
9428 export const Navigation: NavigationNamespace & {
9429 new (): Navigation; // This allows `obj instanceof Navigation`
9430 };
9431
9432 namespace VideoDirection {
9433 // Constructor properties interface
9434
9435 interface ConstructorProps extends GObject.Object.ConstructorProps {
9436 video_direction: VideoOrientationMethod;
9437 videoDirection: VideoOrientationMethod;
9438 }
9439 }
9440
9441 export interface VideoDirectionNamespace {
9442 $gtype: GObject.GType<VideoDirection>;
9443 prototype: VideoDirection;
9444 }
9445 interface VideoDirection extends GObject.Object {
9446 // Properties
9447
9448 get video_direction(): VideoOrientationMethod;
9449 set video_direction(val: VideoOrientationMethod);
9450 get videoDirection(): VideoOrientationMethod;
9451 set videoDirection(val: VideoOrientationMethod);
9452 }
9453
9454 export const VideoDirection: VideoDirectionNamespace & {
9455 new (): VideoDirection; // This allows `obj instanceof VideoDirection`
9456 };
9457
9458 namespace VideoOrientation {
9459 // Constructor properties interface
9460
9461 interface ConstructorProps extends GObject.Object.ConstructorProps {}
9462 }
9463
9464 export interface VideoOrientationNamespace {
9465 $gtype: GObject.GType<VideoOrientation>;
9466 prototype: VideoOrientation;
9467
9468 /**
9469 * Parses the "image-orientation" tag and transforms it into the
9470 * #GstVideoOrientationMethod enum.
9471 * @param taglist A #GstTagList
9472 */
9473 from_tag(taglist: Gst.TagList): [boolean, VideoOrientationMethod];
9474 }
9475 interface VideoOrientation extends GObject.Object {
9476 // Methods
9477
9478 /**
9479 * Get the horizontal centering offset from the given object.
9480 * @returns %TRUE in case the element supports centering
9481 */
9482 get_hcenter(): [boolean, number];
9483 /**
9484 * Get the horizontal flipping state (%TRUE for flipped) from the given object.
9485 * @returns %TRUE in case the element supports flipping
9486 */
9487 get_hflip(): [boolean, boolean];
9488 /**
9489 * Get the vertical centering offset from the given object.
9490 * @returns %TRUE in case the element supports centering
9491 */
9492 get_vcenter(): [boolean, number];
9493 /**
9494 * Get the vertical flipping state (%TRUE for flipped) from the given object.
9495 * @returns %TRUE in case the element supports flipping
9496 */
9497 get_vflip(): [boolean, boolean];
9498 /**
9499 * Set the horizontal centering offset for the given object.
9500 * @param center centering offset
9501 * @returns %TRUE in case the element supports centering
9502 */
9503 set_hcenter(center: number): boolean;
9504 /**
9505 * Set the horizontal flipping state (%TRUE for flipped) for the given object.
9506 * @param flip use flipping
9507 * @returns %TRUE in case the element supports flipping
9508 */
9509 set_hflip(flip: boolean): boolean;
9510 /**
9511 * Set the vertical centering offset for the given object.
9512 * @param center centering offset
9513 * @returns %TRUE in case the element supports centering
9514 */
9515 set_vcenter(center: number): boolean;
9516 /**
9517 * Set the vertical flipping state (%TRUE for flipped) for the given object.
9518 * @param flip use flipping
9519 * @returns %TRUE in case the element supports flipping
9520 */
9521 set_vflip(flip: boolean): boolean;
9522
9523 // Virtual methods
9524
9525 /**
9526 * Get the horizontal centering offset from the given object.
9527 */
9528 vfunc_get_hcenter(): [boolean, number];
9529 /**
9530 * Get the horizontal flipping state (%TRUE for flipped) from the given object.
9531 */
9532 vfunc_get_hflip(): [boolean, boolean];
9533 /**
9534 * Get the vertical centering offset from the given object.
9535 */
9536 vfunc_get_vcenter(): [boolean, number];
9537 /**
9538 * Get the vertical flipping state (%TRUE for flipped) from the given object.
9539 */
9540 vfunc_get_vflip(): [boolean, boolean];
9541 /**
9542 * Set the horizontal centering offset for the given object.
9543 * @param center centering offset
9544 */
9545 vfunc_set_hcenter(center: number): boolean;
9546 /**
9547 * Set the horizontal flipping state (%TRUE for flipped) for the given object.
9548 * @param flip use flipping
9549 */
9550 vfunc_set_hflip(flip: boolean): boolean;
9551 /**
9552 * Set the vertical centering offset for the given object.
9553 * @param center centering offset
9554 */
9555 vfunc_set_vcenter(center: number): boolean;
9556 /**
9557 * Set the vertical flipping state (%TRUE for flipped) for the given object.
9558 * @param flip use flipping
9559 */
9560 vfunc_set_vflip(flip: boolean): boolean;
9561 }
9562
9563 export const VideoOrientation: VideoOrientationNamespace & {
9564 new (): VideoOrientation; // This allows `obj instanceof VideoOrientation`
9565 };
9566
9567 namespace VideoOverlay {
9568 // Constructor properties interface
9569
9570 interface ConstructorProps extends GObject.Object.ConstructorProps {}
9571 }
9572
9573 export interface VideoOverlayNamespace {
9574 $gtype: GObject.GType<VideoOverlay>;
9575 prototype: VideoOverlay;
9576
9577 /**
9578 * This helper shall be used by classes implementing the #GstVideoOverlay
9579 * interface that want the render rectangle to be controllable using
9580 * properties. This helper will install "render-rectangle" property into the
9581 * class.
9582 * @param oclass The class on which the properties will be installed
9583 * @param last_prop_id The first free property ID to use
9584 */
9585 install_properties(oclass: typeof GObject.Object, last_prop_id: number): void;
9586 install_properties(...args: never[]): any;
9587 /**
9588 * This helper shall be used by classes implementing the #GstVideoOverlay
9589 * interface that want the render rectangle to be controllable using
9590 * properties. This helper will parse and set the render rectangle calling
9591 * gst_video_overlay_set_render_rectangle().
9592 * @param object The instance on which the property is set
9593 * @param last_prop_id The highest property ID.
9594 * @param property_id The property ID
9595 * @param value The #GValue to be set
9596 */
9597 set_property(
9598 object: GObject.Object,
9599 last_prop_id: number,
9600 property_id: number,
9601 value: GObject.Value | any,
9602 ): boolean;
9603 }
9604 interface VideoOverlay extends GObject.Object {
9605 // Methods
9606
9607 /**
9608 * Tell an overlay that it has been exposed. This will redraw the current frame
9609 * in the drawable even if the pipeline is PAUSED.
9610 */
9611 expose(): void;
9612 /**
9613 * This will post a "have-window-handle" element message on the bus.
9614 *
9615 * This function should only be used by video overlay plugin developers.
9616 * @param handle a platform-specific handle referencing the window
9617 */
9618 got_window_handle(handle: never): void;
9619 /**
9620 * Tell an overlay that it should handle events from the window system. These
9621 * events are forwarded upstream as navigation events. In some window system,
9622 * events are not propagated in the window hierarchy if a client is listening
9623 * for them. This method allows you to disable events handling completely
9624 * from the #GstVideoOverlay.
9625 * @param handle_events a #gboolean indicating if events should be handled or not.
9626 */
9627 handle_events(handle_events: boolean): void;
9628 /**
9629 * This will post a "prepare-window-handle" element message on the bus
9630 * to give applications an opportunity to call
9631 * gst_video_overlay_set_window_handle() before a plugin creates its own
9632 * window.
9633 *
9634 * This function should only be used by video overlay plugin developers.
9635 */
9636 prepare_window_handle(): void;
9637 /**
9638 * Configure a subregion as a video target within the window set by
9639 * gst_video_overlay_set_window_handle(). If this is not used or not supported
9640 * the video will fill the area of the window set as the overlay to 100%.
9641 * By specifying the rectangle, the video can be overlayed to a specific region
9642 * of that window only. After setting the new rectangle one should call
9643 * gst_video_overlay_expose() to force a redraw. To unset the region pass -1 for
9644 * the `width` and `height` parameters.
9645 *
9646 * This method is needed for non fullscreen video overlay in UI toolkits that
9647 * do not support subwindows.
9648 * @param x the horizontal offset of the render area inside the window
9649 * @param y the vertical offset of the render area inside the window
9650 * @param width the width of the render area inside the window
9651 * @param height the height of the render area inside the window
9652 * @returns %FALSE if not supported by the sink.
9653 */
9654 set_render_rectangle(x: number, y: number, width: number, height: number): boolean;
9655 /**
9656 * This will call the video overlay's set_window_handle method. You
9657 * should use this method to tell to an overlay to display video output to a
9658 * specific window (e.g. an XWindow on X11). Passing 0 as the `handle` will
9659 * tell the overlay to stop using that window and create an internal one.
9660 * @param handle a handle referencing the window.
9661 */
9662 set_window_handle(handle: never): void;
9663
9664 // Virtual methods
9665
9666 /**
9667 * Tell an overlay that it has been exposed. This will redraw the current frame
9668 * in the drawable even if the pipeline is PAUSED.
9669 */
9670 vfunc_expose(): void;
9671 /**
9672 * Tell an overlay that it should handle events from the window system. These
9673 * events are forwarded upstream as navigation events. In some window system,
9674 * events are not propagated in the window hierarchy if a client is listening
9675 * for them. This method allows you to disable events handling completely
9676 * from the #GstVideoOverlay.
9677 * @param handle_events a #gboolean indicating if events should be handled or not.
9678 */
9679 vfunc_handle_events(handle_events: boolean): void;
9680 /**
9681 * virtual method to set the render rectangle
9682 * @param x
9683 * @param y
9684 * @param width
9685 * @param height
9686 */
9687 vfunc_set_render_rectangle(x: number, y: number, width: number, height: number): void;
9688 /**
9689 * This will call the video overlay's set_window_handle method. You
9690 * should use this method to tell to an overlay to display video output to a
9691 * specific window (e.g. an XWindow on X11). Passing 0 as the `handle` will
9692 * tell the overlay to stop using that window and create an internal one.
9693 * @param handle a handle referencing the window.
9694 */
9695 vfunc_set_window_handle(handle: never): void;
9696 }
9697
9698 export const VideoOverlay: VideoOverlayNamespace & {
9699 new (): VideoOverlay; // This allows `obj instanceof VideoOverlay`
9700 };
9701
9702 /**
9703 * Name of the imported GIR library
9704 * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
9705 */
9706 const __name__: string;
9707 /**
9708 * Version of the imported GIR library
9709 * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
9710 */
9711 const __version__: string;
9712 }
9713
9714 export default GstVideo;
9715 }
9716
9717 declare module 'gi://GstVideo' {
9718 import GstVideo10 from 'gi://GstVideo?version=1.0';
9719 export default GstVideo10;
9720 }
9721 // END