/
GstRtp-1.0.d.ts
8373 lines (8370 loc) · 363 KB
/
GstRtp-1.0.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Type Definitions for Gjs (https://gjs.guide/)
*
* These type definitions are automatically generated, do not edit them by hand.
* If you found a bug fix it in ts-for-gir itself or create a bug report on https://github.com/sammydre/ts-for-gjs
*/
/**
* GstRtp-1.0
*/
import type * as Gjs from './Gjs';
import type GstBase from './GstBase-1.0';
import type Gst from './Gst-1.0';
import type GObject from './GObject-2.0';
import type GLib from './GLib-2.0';
import type GModule from './GModule-2.0';
export namespace GstRtp {
/**
* Different types of feedback messages.
*/
enum RTCPFBType {
/**
* Invalid type
*/
FB_TYPE_INVALID,
/**
* Generic NACK
*/
RTPFB_TYPE_NACK,
/**
* Temporary Maximum Media Stream Bit Rate Request
*/
RTPFB_TYPE_TMMBR,
/**
* Temporary Maximum Media Stream Bit Rate
* Notification
*/
RTPFB_TYPE_TMMBN,
/**
* Request an SR packet for early
* synchronization
*/
RTPFB_TYPE_RTCP_SR_REQ,
RTPFB_TYPE_TWCC,
/**
* Picture Loss Indication
*/
PSFB_TYPE_PLI,
/**
* Slice Loss Indication
*/
PSFB_TYPE_SLI,
/**
* Reference Picture Selection Indication
*/
PSFB_TYPE_RPSI,
/**
* Application layer Feedback
*/
PSFB_TYPE_AFB,
/**
* Full Intra Request Command
*/
PSFB_TYPE_FIR,
/**
* Temporal-Spatial Trade-off Request
*/
PSFB_TYPE_TSTR,
/**
* Temporal-Spatial Trade-off Notification
*/
PSFB_TYPE_TSTN,
/**
* Video Back Channel Message
*/
PSFB_TYPE_VBCN,
}
/**
* Different types of SDES content.
*/
enum RTCPSDESType {
/**
* Invalid SDES entry
*/
INVALID,
/**
* End of SDES list
*/
END,
/**
* Canonical name
*/
CNAME,
/**
* User name
*/
NAME,
/**
* User's electronic mail address
*/
EMAIL,
/**
* User's phone number
*/
PHONE,
/**
* Geographic user location
*/
LOC,
/**
* Name of application or tool
*/
TOOL,
/**
* Notice about the source
*/
NOTE,
/**
* Private extensions
*/
PRIV,
/**
* H.323 callable address
*/
H323_CADDR,
/**
* Application Specific Identifier (RFC6776)
*/
APSI,
/**
* Reporting Group Identifier (RFC8861)
*/
RGRP,
/**
* RtpStreamId SDES item (RFC8852).
*/
RTP_STREAM_ID,
/**
* RepairedRtpStreamId SDES item (RFC8852).
*/
REPAIRED_RTP_STREAM_ID,
/**
* CLUE CaptId (RFC8849)
*/
CCID,
/**
* MID SDES item (RFC8843).
*/
MID,
}
/**
* Different RTCP packet types.
*/
enum RTCPType {
/**
* Invalid type
*/
INVALID,
/**
* Sender report
*/
SR,
/**
* Receiver report
*/
RR,
/**
* Source description
*/
SDES,
/**
* Goodbye
*/
BYE,
/**
* Application defined
*/
APP,
/**
* Transport layer feedback.
*/
RTPFB,
/**
* Payload-specific feedback.
*/
PSFB,
/**
* Extended report.
*/
XR,
}
/**
* Types of RTCP Extended Reports, those are defined in RFC 3611 and other RFCs
* according to the [IANA registry](https://www.iana.org/assignments/rtcp-xr-block-types/rtcp-xr-block-types.xhtml).
*/
enum RTCPXRType {
/**
* Invalid XR Report Block
*/
INVALID,
/**
* Loss RLE Report Block
*/
LRLE,
/**
* Duplicate RLE Report Block
*/
DRLE,
/**
* Packet Receipt Times Report Block
*/
PRT,
/**
* Receiver Reference Time Report Block
*/
RRT,
/**
* Delay since the last Receiver Report
*/
DLRR,
/**
* Statistics Summary Report Block
*/
SSUMM,
/**
* VoIP Metrics Report Block
*/
VOIP_METRICS,
}
/**
* Standard predefined fixed payload types.
*
* The official list is at:
* http://www.iana.org/assignments/rtp-parameters
*
* Audio:
* reserved: 19
* unassigned: 20-23,
*
* Video:
* unassigned: 24, 27, 29, 30, 35-71, 77-95
* Reserved for RTCP conflict avoidance: 72-76
*/
enum RTPPayload {
/**
* ITU-T G.711. mu-law audio (RFC 3551)
*/
PCMU,
/**
* RFC 3551 says reserved
*/
TODO_1016,
/**
* RFC 3551 says reserved
*/
G721,
/**
* GSM audio
*/
GSM,
/**
* ITU G.723.1 audio
*/
G723,
/**
* IMA ADPCM wave type (RFC 3551)
*/
DVI4_8000,
/**
* IMA ADPCM wave type (RFC 3551)
*/
DVI4_16000,
/**
* experimental linear predictive encoding
*/
LPC,
/**
* ITU-T G.711 A-law audio (RFC 3551)
*/
PCMA,
/**
* ITU-T G.722 (RFC 3551)
*/
G722,
/**
* stereo PCM
*/
L16_STEREO,
/**
* mono PCM
*/
L16_MONO,
/**
* EIA & TIA standard IS-733
*/
QCELP,
/**
* Comfort Noise (RFC 3389)
*/
CN,
/**
* Audio MPEG 1-3.
*/
MPA,
/**
* ITU-T G.728 Speech coder (RFC 3551)
*/
G728,
/**
* IMA ADPCM wave type (RFC 3551)
*/
DVI4_11025,
/**
* IMA ADPCM wave type (RFC 3551)
*/
DVI4_22050,
/**
* ITU-T G.729 Speech coder (RFC 3551)
*/
G729,
/**
* See RFC 2029
*/
CELLB,
/**
* ISO Standards 10918-1 and 10918-2 (RFC 2435)
*/
JPEG,
/**
* nv encoding by Ron Frederick
*/
NV,
/**
* ITU-T Recommendation H.261 (RFC 2032)
*/
H261,
/**
* Video MPEG 1 & 2 (RFC 2250)
*/
MPV,
/**
* MPEG-2 transport stream (RFC 2250)
*/
MP2T,
/**
* Video H263 (RFC 2190)
*/
H263,
}
/**
* The transfer profile to use.
*/
enum RTPProfile {
/**
* invalid profile
*/
UNKNOWN,
/**
* the Audio/Visual profile (RFC 3551)
*/
AVP,
/**
* the secure Audio/Visual profile (RFC 3711)
*/
SAVP,
/**
* the Audio/Visual profile with feedback (RFC 4585)
*/
AVPF,
/**
* the secure Audio/Visual profile with feedback (RFC 5124)
*/
SAVPF,
}
/**
* Additional RTP buffer flags. These flags can potentially be used on any
* buffers carrying RTP packets.
*
* Note that these are only valid for #GstCaps of type: application/x-rtp (x-rtcp).
* They can conflict with other extended buffer flags.
*/
enum RTPBufferFlags {
/**
* The #GstBuffer was once wrapped
* in a retransmitted packet as specified by RFC 4588.
*/
RETRANSMISSION,
/**
* The packet represents redundant RTP packet.
* The flag is used in gstrtpstorage to be able to hold the packetback
* and use it only for recovery from packet loss.
* Since: 1.14
*/
REDUNDANT,
/**
* Offset to define more flags.
*/
LAST,
}
/**
* Additional mapping flags for gst_rtp_buffer_map().
*/
enum RTPBufferMapFlags {
/**
* Skip mapping and validation of RTP
* padding and RTP pad count when present. Useful for buffers where
* the padding may be encrypted.
*/
SKIP_PADDING,
/**
* Offset to define more flags
*/
LAST,
}
/**
* Direction to which to apply the RTP Header Extension
*/
enum RTPHeaderExtensionDirection {
/**
* Neither send nor
* receive RTP Header Extensions
*/
INACTIVE,
/**
* Only send RTP Header
* Extensions `GST_RTP_HEADER_EXTENSION_DIRECTION_RECVONLY:` Only
* receive RTP Header Extensions
*/
SENDONLY,
RECVONLY,
/**
* Send and receive RTP
* Header Extensions ext
*/
SENDRECV,
/**
* RTP header extension
* direction is inherited from the stream
*/
INHERITED,
}
/**
* Flags that apply to a RTP Audio/Video header extension.
*/
enum RTPHeaderExtensionFlags {
/**
* The one byte rtp extension header.
* 1-16 data bytes per extension with a maximum of
* 14 extension ids in total.
*/
ONE_BYTE,
/**
* The two byte rtp extension header.
* 256 data bytes per extension with a maximum of 255 (or 256
* including appbits) extensions in total.
*/
TWO_BYTE,
}
/**
* The maximum amount of SSRCs in a BYE packet.
*/
const RTCP_MAX_BYE_SSRC_COUNT: number
/**
* The maximum amount of Receiver report blocks in RR and SR messages.
*/
const RTCP_MAX_RB_COUNT: number
/**
* The maximum text length for an SDES item.
*/
const RTCP_MAX_SDES: number
/**
* The maximum amount of SDES items.
*/
const RTCP_MAX_SDES_ITEM_COUNT: number
/**
* Mask for version, padding bit and packet type pair allowing reduced size
* packets, basically it accepts other types than RR and SR
*/
const RTCP_REDUCED_SIZE_VALID_MASK: number
/**
* Mask for version, padding bit and packet type pair
*/
const RTCP_VALID_MASK: number
/**
* Valid value for the first two bytes of an RTCP packet after applying
* #GST_RTCP_VALID_MASK to them.
*/
const RTCP_VALID_VALUE: number
/**
* The supported RTCP version 2.
*/
const RTCP_VERSION: number
const RTP_HDREXT_BASE: string
/**
* Constant string used in element classification to signal that this element
* is a RTP header extension.
*/
const RTP_HDREXT_ELEMENT_CLASS: string
const RTP_HDREXT_NTP_56: string
const RTP_HDREXT_NTP_56_SIZE: number
const RTP_HDREXT_NTP_64: string
const RTP_HDREXT_NTP_64_SIZE: number
const RTP_HEADER_EXTENSION_URI_METADATA_KEY: string
const RTP_PAYLOAD_1016_STRING: string
const RTP_PAYLOAD_CELLB_STRING: string
const RTP_PAYLOAD_CN_STRING: string
const RTP_PAYLOAD_DVI4_11025_STRING: string
const RTP_PAYLOAD_DVI4_16000_STRING: string
const RTP_PAYLOAD_DVI4_22050_STRING: string
const RTP_PAYLOAD_DVI4_8000_STRING: string
const RTP_PAYLOAD_DYNAMIC_STRING: string
const RTP_PAYLOAD_G721_STRING: string
const RTP_PAYLOAD_G722_STRING: string
const RTP_PAYLOAD_G723_53: number
const RTP_PAYLOAD_G723_53_STRING: string
const RTP_PAYLOAD_G723_63: number
const RTP_PAYLOAD_G723_63_STRING: string
const RTP_PAYLOAD_G723_STRING: string
const RTP_PAYLOAD_G728_STRING: string
const RTP_PAYLOAD_G729_STRING: string
const RTP_PAYLOAD_GSM_STRING: string
const RTP_PAYLOAD_H261_STRING: string
const RTP_PAYLOAD_H263_STRING: string
const RTP_PAYLOAD_JPEG_STRING: string
const RTP_PAYLOAD_L16_MONO_STRING: string
const RTP_PAYLOAD_L16_STEREO_STRING: string
const RTP_PAYLOAD_LPC_STRING: string
const RTP_PAYLOAD_MP2T_STRING: string
const RTP_PAYLOAD_MPA_STRING: string
const RTP_PAYLOAD_MPV_STRING: string
const RTP_PAYLOAD_NV_STRING: string
const RTP_PAYLOAD_PCMA_STRING: string
const RTP_PAYLOAD_PCMU_STRING: string
const RTP_PAYLOAD_QCELP_STRING: string
const RTP_PAYLOAD_TS41: number
const RTP_PAYLOAD_TS41_STRING: string
const RTP_PAYLOAD_TS48: number
const RTP_PAYLOAD_TS48_STRING: string
const RTP_SOURCE_META_MAX_CSRC_COUNT: number
/**
* The supported RTP version 2.
*/
const RTP_VERSION: number
function buffer_add_rtp_source_meta(buffer: Gst.Buffer, ssrc: number | null, csrc: number | null, csrc_count: number): RTPSourceMeta
function buffer_get_rtp_source_meta(buffer: Gst.Buffer): RTPSourceMeta
function rtcp_buffer_map(buffer: Gst.Buffer, flags: Gst.MapFlags, rtcp: RTCPBuffer): boolean
function rtcp_buffer_new(mtu: number): Gst.Buffer
function rtcp_buffer_new_copy_data(data: Uint8Array): Gst.Buffer
function rtcp_buffer_new_take_data(data: Uint8Array): Gst.Buffer
function rtcp_buffer_validate(buffer: Gst.Buffer): boolean
function rtcp_buffer_validate_data(data: Uint8Array): boolean
function rtcp_buffer_validate_data_reduced(data: Uint8Array): boolean
function rtcp_buffer_validate_reduced(buffer: Gst.Buffer): boolean
function rtcp_ntp_to_unix(ntptime: number): number
function rtcp_sdes_name_to_type(name: string): RTCPSDESType
function rtcp_sdes_type_to_name(type: RTCPSDESType): string
function rtcp_unix_to_ntp(unixtime: number): number
function rtp_buffer_allocate_data(buffer: Gst.Buffer, payload_len: number, pad_len: number, csrc_count: number): void
function rtp_buffer_calc_header_len(csrc_count: number): number
function rtp_buffer_calc_packet_len(payload_len: number, pad_len: number, csrc_count: number): number
function rtp_buffer_calc_payload_len(packet_len: number, pad_len: number, csrc_count: number): number
function rtp_buffer_compare_seqnum(seqnum1: number, seqnum2: number): number
function rtp_buffer_default_clock_rate(payload_type: number): number
function rtp_buffer_ext_timestamp(exttimestamp: number, timestamp: number): [ /* returnType */ number, /* exttimestamp */ number ]
function rtp_buffer_get_extension_onebyte_header_from_bytes(bytes: GLib.Bytes, bit_pattern: number, id: number, nth: number): [ /* returnType */ boolean, /* data */ Uint8Array ]
function rtp_buffer_map(buffer: Gst.Buffer, flags: Gst.MapFlags): [ /* returnType */ boolean, /* rtp */ RTPBuffer ]
function rtp_buffer_new_allocate(payload_len: number, pad_len: number, csrc_count: number): Gst.Buffer
function rtp_buffer_new_allocate_len(packet_len: number, pad_len: number, csrc_count: number): Gst.Buffer
function rtp_buffer_new_copy_data(data: Uint8Array): Gst.Buffer
function rtp_buffer_new_take_data(data: Uint8Array): Gst.Buffer
function rtp_get_header_extension_list(): Gst.ElementFactory[]
function rtp_hdrext_get_ntp_56(data: Uint8Array): [ /* returnType */ boolean, /* ntptime */ number ]
function rtp_hdrext_get_ntp_64(data: Uint8Array): [ /* returnType */ boolean, /* ntptime */ number ]
function rtp_hdrext_set_ntp_56(data: object | null, size: number, ntptime: number): boolean
function rtp_hdrext_set_ntp_64(data: object | null, size: number, ntptime: number): boolean
function rtp_payload_info_for_name(media: string, encoding_name: string): RTPPayloadInfo
function rtp_payload_info_for_pt(payload_type: number): RTPPayloadInfo
function rtp_source_meta_api_get_type(): GObject.Type
function rtp_source_meta_get_info(): Gst.MetaInfo
interface RTPBaseAudioPayload_ConstructProps extends RTPBasePayload_ConstructProps {
/* Constructor properties of GstRtp-1.0.GstRtp.RTPBaseAudioPayload */
buffer_list?: boolean
}
class RTPBaseAudioPayload {
/* Properties of GstRtp-1.0.GstRtp.RTPBaseAudioPayload */
buffer_list: boolean
/* Properties of GstRtp-1.0.GstRtp.RTPBasePayload */
/**
* If enabled, the payloader will automatically try to enable all the
* RTP header extensions provided in the src caps, saving the application
* the need to handle these extensions manually using the
* GstRTPBasePayload::request-extension: signal.
*/
auto_header_extension: boolean
max_ptime: number
/**
* Minimum duration of the packet data in ns (can't go above MTU)
*/
min_ptime: number
mtu: number
/**
* Make the payloader timestamp packets according to the Rate-Control=no
* behaviour specified in the ONVIF replay spec.
*/
onvif_no_rate_control: boolean
/**
* Try to use the offset fields to generate perfect RTP timestamps. When this
* option is disabled, RTP timestamps are generated from GST_BUFFER_PTS of
* each payloaded buffer. The PTSes of buffers may not necessarily increment
* with the amount of data in each input buffer, consider e.g. the case where
* the buffer arrives from a network which means that the PTS is unrelated to
* the amount of data. Because the RTP timestamps are generated from
* GST_BUFFER_PTS this can result in RTP timestamps that also don't increment
* with the amount of data in the payloaded packet. To circumvent this it is
* possible to set the perfect rtptime option enabled. When this option is
* enabled the payloader will increment the RTP timestamps based on
* GST_BUFFER_OFFSET which relates to the amount of data in each packet
* rather than the GST_BUFFER_PTS of each buffer and therefore the RTP
* timestamps will more closely correlate with the amount of data in each
* buffer. Currently GstRTPBasePayload is limited to handling perfect RTP
* timestamps for audio streams.
*/
perfect_rtptime: boolean
pt: number
/**
* Force buffers to be multiples of this duration in ns (0 disables)
*/
ptime_multiple: number
/**
* Make the RTP packets' timestamps be scaled with the segment's rate
* (corresponding to RTSP speed parameter). Disabling this property means
* the timestamps will not be affected by the set delivery speed (RTSP speed).
*
* Example: A server wants to allow streaming a recorded video in double
* speed but still have the timestamps correspond to the position in the
* video. This is achieved by the client setting RTSP Speed to 2 while the
* server has this property disabled.
*/
scale_rtptime: boolean
readonly seqnum: number
seqnum_offset: number
/**
* Enable writing the CSRC field in allocated RTP header based on RTP source
* information found in the input buffer's #GstRTPSourceMeta.
*/
source_info: boolean
ssrc: number
/**
* Various payloader statistics retrieved atomically (and are therefore
* synchroized with each other), these can be used e.g. to generate an
* RTP-Info header. This property return a GstStructure named
* application/x-rtp-payload-stats containing the following fields relating to
* the last processed buffer and current state of the stream being payloaded:
*
* * `clock-rate` :#G_TYPE_UINT, clock-rate of the stream
* * `running-time` :#G_TYPE_UINT64, running time
* * `seqnum` :#G_TYPE_UINT, sequence number, same as #GstRTPBasePayload:seqnum
* * `timestamp` :#G_TYPE_UINT, RTP timestamp, same as #GstRTPBasePayload:timestamp
* * `ssrc` :#G_TYPE_UINT, The SSRC in use
* * `pt` :#G_TYPE_UINT, The Payload type in use, same as #GstRTPBasePayload:pt
* * `seqnum-offset` :#G_TYPE_UINT, The current offset added to the seqnum
* * `timestamp-offset` :#G_TYPE_UINT, The current offset added to the timestamp
*/
readonly stats: Gst.Structure
readonly timestamp: number
timestamp_offset: number
/* Fields of GstRtp-1.0.GstRtp.RTPBasePayload */
element: Gst.Element
/* Fields of Gst-1.0.Gst.Element */
object: Gst.Object
/**
* Used to serialize execution of gst_element_set_state()
*/
state_lock: GLib.RecMutex
/**
* Used to signal completion of a state change
*/
state_cond: GLib.Cond
/**
* Used to detect concurrent execution of
* gst_element_set_state() and gst_element_get_state()
*/
state_cookie: number
/**
* the target state of an element as set by the application
*/
target_state: Gst.State
/**
* the current state of an element
*/
current_state: Gst.State
/**
* the next state of an element, can be #GST_STATE_VOID_PENDING if
* the element is in the correct state.
*/
next_state: Gst.State
/**
* the final state the element should go to, can be
* #GST_STATE_VOID_PENDING if the element is in the correct state
*/
pending_state: Gst.State
/**
* the last return value of an element state change
*/
last_return: Gst.StateChangeReturn
/**
* the bus of the element. This bus is provided to the element by the
* parent element or the application. A #GstPipeline has a bus of its own.
*/
bus: Gst.Bus
/**
* the clock of the element. This clock is usually provided to the
* element by the toplevel #GstPipeline.
*/
clock: Gst.Clock
/**
* the time of the clock right before the element is set to
* PLAYING. Subtracting `base_time` from the current clock time in the PLAYING
* state will yield the running_time against the clock.
*/
base_time: Gst.ClockTimeDiff
/**
* the running_time of the last PAUSED state
*/
start_time: Gst.ClockTime
/**
* number of pads of the element, includes both source and sink pads.
*/
numpads: number
/**
* list of pads
*/
pads: Gst.Pad[]
/**
* number of source pads of the element.
*/
numsrcpads: number
/**
* list of source pads
*/
srcpads: Gst.Pad[]
/**
* number of sink pads of the element.
*/
numsinkpads: number
/**
* list of sink pads
*/
sinkpads: Gst.Pad[]
/**
* updated whenever the a pad is added or removed
*/
pads_cookie: number
/**
* list of contexts
*/
contexts: Gst.Context[]
/* Fields of Gst-1.0.Gst.Object */
/**
* object LOCK
*/
lock: GLib.Mutex
/**
* The name of the object
*/
name: string
/**
* this object's parent, weak ref
*/
parent: Gst.Object
/**
* flags for this object
*/
flags: number
/* Fields of GObject-2.0.GObject.InitiallyUnowned */
g_type_instance: GObject.TypeInstance
/* Methods of GstRtp-1.0.GstRtp.RTPBaseAudioPayload */
/**
* Create an RTP buffer and store `payload_len` bytes of the adapter as the
* payload. Set the timestamp on the new buffer to `timestamp` before pushing
* the buffer downstream.
*
* If `payload_len` is -1, all pending bytes will be flushed. If `timestamp` is
* -1, the timestamp will be calculated automatically.
* @param payload_len length of payload
* @param timestamp a #GstClockTime
*/
flush(payload_len: number, timestamp: Gst.ClockTime): Gst.FlowReturn
/**
* Gets the internal adapter used by the depayloader.
*/
get_adapter(): GstBase.Adapter
/**
* Create an RTP buffer and store `payload_len` bytes of `data` as the
* payload. Set the timestamp on the new buffer to `timestamp` before pushing
* the buffer downstream.
* @param data data to set as payload
* @param timestamp a #GstClockTime
*/
push(data: Uint8Array, timestamp: Gst.ClockTime): Gst.FlowReturn
/**
* Tells #GstRTPBaseAudioPayload that the child element is for a frame based
* audio codec
*/
set_frame_based(): void
/**
* Sets the options for frame based audio codecs.
* @param frame_duration The duraction of an audio frame in milliseconds.
* @param frame_size The size of an audio frame in bytes.
*/
set_frame_options(frame_duration: number, frame_size: number): void
/**
* Tells #GstRTPBaseAudioPayload that the child element is for a sample based
* audio codec
*/
set_sample_based(): void
/**
* Sets the options for sample based audio codecs.
* @param sample_size Size per sample in bytes.
*/
set_sample_options(sample_size: number): void
/**
* Sets the options for sample based audio codecs.
* @param sample_size Size per sample in bits.
*/
set_samplebits_options(sample_size: number): void
/* Methods of GstRtp-1.0.GstRtp.RTPBasePayload */
/**
* Allocate a new #GstBuffer with enough data to hold an RTP packet with
* minimum `csrc_count` CSRCs, a payload length of `payload_len` and padding of
* `pad_len`. If `payload` has #GstRTPBasePayload:source-info %TRUE additional
* CSRCs may be allocated and filled with RTP source information.
* @param payload_len the length of the payload
* @param pad_len the amount of padding
* @param csrc_count the minimum number of CSRC entries
*/
allocate_output_buffer(payload_len: number, pad_len: number, csrc_count: number): Gst.Buffer
/**
* Count the total number of RTP sources found in the meta of `buffer,` which
* will be automically added by gst_rtp_base_payload_allocate_output_buffer().
* If #GstRTPBasePayload:source-info is %FALSE the count will be 0.
* @param buffer a #GstBuffer, typically the buffer to payload
*/
get_source_count(buffer: Gst.Buffer): number
/**
* Check if the packet with `size` and `duration` would exceed the configured
* maximum size.
* @param size the size of the packet
* @param duration the duration of the packet
*/
is_filled(size: number, duration: Gst.ClockTime): boolean
/**
* Queries whether the payloader will add contributing sources (CSRCs) to the
* RTP header from #GstRTPSourceMeta.
*/
is_source_info_enabled(): boolean
/**
* Push `buffer` to the peer element of the payloader. The SSRC, payload type,
* seqnum and timestamp of the RTP buffer will be updated first.
*
* This function takes ownership of `buffer`.
* @param buffer a #GstBuffer
*/
push(buffer: Gst.Buffer): Gst.FlowReturn
/**
* Push `list` to the peer element of the payloader. The SSRC, payload type,
* seqnum and timestamp of the RTP buffer will be updated first.
*
* This function takes ownership of `list`.
* @param list a #GstBufferList
*/
push_list(list: Gst.BufferList): Gst.FlowReturn
/**
* Set the rtp options of the payloader. These options will be set in the caps
* of the payloader. Subclasses must call this method before calling
* gst_rtp_base_payload_push() or gst_rtp_base_payload_set_outcaps().
* @param media the media type (typically "audio" or "video")
* @param dynamic if the payload type is dynamic
* @param encoding_name the encoding name
* @param clock_rate the clock rate of the media
*/
set_options(media: string, dynamic: boolean, encoding_name: string, clock_rate: number): void
/**
* Configure the output caps with the optional fields.
* @param s a #GstStructure with the caps fields
*/
set_outcaps_structure(s?: Gst.Structure | null): boolean
/**
* Enable or disable adding contributing sources to RTP packets from
* #GstRTPSourceMeta.
* @param enable whether to add contributing sources to RTP packets
*/
set_source_info_enabled(enable: boolean): void
/* Methods of Gst-1.0.Gst.Element */
/**
* Abort the state change of the element. This function is used
* by elements that do asynchronous state changes and find out
* something is wrong.
*
* This function should be called with the STATE_LOCK held.
*
* MT safe.
*/
abort_state(): void
/**
* Adds a pad (link point) to `element`. `pad'`s parent will be set to `element;`
* see gst_object_set_parent() for refcounting information.
*
* Pads are automatically activated when added in the PAUSED or PLAYING
* state.
*
* The pad and the element should be unlocked when calling this function.
*
* This function will emit the #GstElement::pad-added signal on the element.
* @param pad the #GstPad to add to the element.
*/
add_pad(pad: Gst.Pad): boolean
add_property_deep_notify_watch(property_name: string | null, include_value: boolean): number
add_property_notify_watch(property_name: string | null, include_value: boolean): number
/**
* Calls `func` from another thread and passes `user_data` to it. This is to be
* used for cases when a state change has to be performed from a streaming
* thread, directly via gst_element_set_state() or indirectly e.g. via SEEK
* events.
*
* Calling those functions directly from the streaming thread will cause
* deadlocks in many situations, as they might involve waiting for the
* streaming thread to shut down from this very streaming thread.
*
* MT safe.
* @param func Function to call asynchronously from another thread
*/
call_async(func: Gst.ElementCallAsyncFunc): void
/**
* Perform `transition` on `element`.
*
* This function must be called with STATE_LOCK held and is mainly used
* internally.
* @param transition the requested transition
*/
change_state(transition: Gst.StateChange): Gst.StateChangeReturn
/**
* Commit the state change of the element and proceed to the next
* pending state if any. This function is used
* by elements that do asynchronous state changes.
* The core will normally call this method automatically when an
* element returned %GST_STATE_CHANGE_SUCCESS from the state change function.
*
* If after calling this method the element still has not reached
* the pending state, the next state change is performed.
*
* This method is used internally and should normally not be called by plugins
* or applications.
*
* This function must be called with STATE_LOCK held.
* @param ret The previous state return value
*/
continue_state(ret: Gst.StateChangeReturn): Gst.StateChangeReturn
/**
* Creates a pad for each pad template that is always available.
* This function is only useful during object initialization of
* subclasses of #GstElement.
*/
create_all_pads(): void
/**
* Call `func` with `user_data` for each of `element'`s pads. `func` will be called
* exactly once for each pad that exists at the time of this call, unless
* one of the calls to `func` returns %FALSE in which case we will stop
* iterating pads and return early. If new pads are added or pads are removed
* while pads are being iterated, this will not be taken into account until
* next time this function is used.
* @param func function to call for each pad
*/
foreach_pad(func: Gst.ElementForeachPadFunc): boolean
/**
* Call `func` with `user_data` for each of `element'`s sink pads. `func` will be
* called exactly once for each sink pad that exists at the time of this call,
* unless one of the calls to `func` returns %FALSE in which case we will stop
* iterating pads and return early. If new sink pads are added or sink pads
* are removed while the sink pads are being iterated, this will not be taken
* into account until next time this function is used.
* @param func function to call for each sink pad
*/
foreach_sink_pad(func: Gst.ElementForeachPadFunc): boolean
/**
* Call `func` with `user_data` for each of `element'`s source pads. `func` will be
* called exactly once for each source pad that exists at the time of this call,
* unless one of the calls to `func` returns %FALSE in which case we will stop
* iterating pads and return early. If new source pads are added or source pads
* are removed while the source pads are being iterated, this will not be taken
* into account until next time this function is used.
* @param func function to call for each source pad
*/
foreach_src_pad(func: Gst.ElementForeachPadFunc): boolean
/**
* Returns the base time of the element. The base time is the
* absolute time of the clock when this element was last put to
* PLAYING. Subtracting the base time from the clock time gives