@girs/farstream-0.2 0.2.0-3.2.5 → 0.2.0-3.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/farstream-0.2)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for Farstream-0.2, generated from library version 0.2.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.5.
8
+ GJS TypeScript type definitions for Farstream-0.2, generated from library version 0.2.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.7.
9
9
 
10
10
 
11
11
  ## Install
@@ -271,7 +271,7 @@ export enum StreamDirection {
271
271
  /**
272
272
  * A format that can be used in printf like format strings to format a FsCodec
273
273
  */
274
- export const CODEC_FORMAT: string | null
274
+ export const CODEC_FORMAT: string
275
275
  /**
276
276
  * If the id of a #FsCodec is #FS_CODEC_ID_ANY, then it will be replaced
277
277
  * with a dynamic payload type at runtime
@@ -286,7 +286,7 @@ export const CODEC_ID_DISABLE: number
286
286
  * A format that can be used in printf like format strings to format a
287
287
  * FsRtpHeaderExtension
288
288
  */
289
- export const RTP_HEADER_EXTENSION_FORMAT: string | null
289
+ export const RTP_HEADER_EXTENSION_FORMAT: string
290
290
  /**
291
291
  * Copies a GList of #FsCandidate and its contents
292
292
  * @param candidate_list A GList of #FsCandidate
@@ -333,14 +333,14 @@ export function codec_list_copy(codec_list: Codec[]): Codec[]
333
333
  * @param filename Name of the #GKeyFile to read the codecs parameters from
334
334
  * @returns The #GList of #FsCodec or %NULL if the keyfile was empty or an error occured.
335
335
  */
336
- export function codec_list_from_keyfile(filename: string | null): Codec[]
336
+ export function codec_list_from_keyfile(filename: string): Codec[]
337
337
  export function error_quark(): GLib.Quark
338
338
  /**
339
339
  * Gives a user-printable string representing the media type
340
340
  * @param media_type A media type
341
341
  * @returns a static string representing the media type
342
342
  */
343
- export function media_type_to_string(media_type: MediaType): string | null
343
+ export function media_type_to_string(media_type: MediaType): string
344
344
  /**
345
345
  * Parses a "farstream-farstream" message and checks if it matches
346
346
  * the `object` parameters.
@@ -348,7 +348,7 @@ export function media_type_to_string(media_type: MediaType): string | null
348
348
  * @param message a #GstMessage to parse
349
349
  * @returns %TRUE if the message matches the object and is valid.
350
350
  */
351
- export function parse_error(object: GObject.Object, message: Gst.Message): [ /* returnType */ boolean, /* error */ Error, /* error_msg */ string | null ]
351
+ export function parse_error(object: GObject.Object, message: Gst.Message): [ /* returnType */ boolean, /* error */ Error, /* error_msg */ string ]
352
352
  /**
353
353
  * Does a deep copy of a #GList of #FsRtpHeaderExtension
354
354
  * @param extensions a #GList of #FsRtpHeaderExtension
@@ -388,7 +388,7 @@ export function rtp_header_extension_list_copy(extensions: RtpHeaderExtension[])
388
388
  * @param media_type The media type for which to get header extensions
389
389
  * @returns a #GList of #FsRtpHeaderExtension that must be freed with fs_rtp_header_extension_list_destroy()
390
390
  */
391
- export function rtp_header_extension_list_from_keyfile(filename: string | null, media_type: MediaType): RtpHeaderExtension[]
391
+ export function rtp_header_extension_list_from_keyfile(filename: string, media_type: MediaType): RtpHeaderExtension[]
392
392
  /**
393
393
  * These default codec preferences should work with the elements that are
394
394
  * available in the main GStreamer element repositories.
@@ -463,7 +463,7 @@ export interface Conference extends Gst.ChildProxy {
463
463
  * You are responsible for freeing it by calling g_value_unset()
464
464
  * @param name name of the property
465
465
  */
466
- get_property(name: string | null): /* value */ any
466
+ get_property(name: string): /* value */ any
467
467
 
468
468
  // Overloads of get_property
469
469
 
@@ -487,7 +487,7 @@ export interface Conference extends Gst.ChildProxy {
487
487
  * @param property_name the name of the property to get
488
488
  * @param value return location for the property value
489
489
  */
490
- get_property(property_name: string | null, value: any): void
490
+ get_property(property_name: string, value: any): void
491
491
  /**
492
492
  * Gets a property of an object.
493
493
  *
@@ -508,7 +508,7 @@ export interface Conference extends Gst.ChildProxy {
508
508
  * @param property_name the name of the property to get
509
509
  * @param value return location for the property value
510
510
  */
511
- get_property(property_name: string | null, value: any): void
511
+ get_property(property_name: string, value: any): void
512
512
  /**
513
513
  * Increases the reference count of `object`.
514
514
  *
@@ -647,7 +647,7 @@ export interface ElementAddedNotifier {
647
647
  * @param filename The name of the keyfile to use
648
648
  * @returns %TRUE if the file was successfully loaded, %FALSE otherwise
649
649
  */
650
- set_properties_from_file(filename: string | null): boolean
650
+ set_properties_from_file(filename: string): boolean
651
651
  /**
652
652
  * Using a #GKeyFile where the groups are the element's type or name
653
653
  * and the key=value are the property and its value, this function
@@ -816,7 +816,7 @@ export class Plugin extends GObject.TypeModule {
816
816
  * @param type_suffix Get list of plugins with this type suffix
817
817
  * @returns a newly allocated NULL terminated array of strings or %NULL if no strings were found. It should be freed with g_strfreev().
818
818
  */
819
- static list_available(type_suffix: string | null): string[]
819
+ static list_available(type_suffix: string): string[]
820
820
  }
821
821
 
822
822
  export module Session {
@@ -856,6 +856,11 @@ export module Session {
856
856
  * Sets the IP ToS field (and if possible the IPv6 TCLASS field
857
857
  */
858
858
  tos?: number | null
859
+ /**
860
+ * The media-type of the session. This is either Audio, Video or both.
861
+ * This is a constructor parameter that cannot be changed.
862
+ */
863
+ mediaType?: MediaType | null
859
864
  }
860
865
 
861
866
  }
@@ -870,12 +875,24 @@ export interface Session {
870
875
  * accepted those caps as input.
871
876
  */
872
877
  readonly allowed_sink_caps: Gst.Caps
878
+ /**
879
+ * These are the #GstCaps that can be fed into the session,
880
+ * they are used to filter the codecs to only those that can
881
+ * accepted those caps as input.
882
+ */
883
+ readonly allowedSinkCaps: Gst.Caps
873
884
  /**
874
885
  * These are the #GstCaps that the session can produce,
875
886
  * they are used to filter the codecs to only those that can
876
887
  * accepted those caps as output.
877
888
  */
878
889
  readonly allowed_src_caps: Gst.Caps
890
+ /**
891
+ * These are the #GstCaps that the session can produce,
892
+ * they are used to filter the codecs to only those that can
893
+ * accepted those caps as output.
894
+ */
895
+ readonly allowedSrcCaps: Gst.Caps
879
896
  /**
880
897
  * This is the current preferences list for the local codecs. It is
881
898
  * set by the user to specify the codec options and priorities. The user may
@@ -889,6 +906,19 @@ export interface Session {
889
906
  * dynamically assigned payload type.
890
907
  */
891
908
  readonly codec_preferences: Codec[]
909
+ /**
910
+ * This is the current preferences list for the local codecs. It is
911
+ * set by the user to specify the codec options and priorities. The user may
912
+ * change its value with fs_session_set_codec_preferences() at any time
913
+ * during a session. It is a #GList of #FsCodec.
914
+ * The user must free this codec list using fs_codec_list_destroy() when done.
915
+ *
916
+ * The payload type may be a valid dynamic PT (96-127), %FS_CODEC_ID_DISABLE
917
+ * or %FS_CODEC_ID_ANY. If the encoding name is "reserve-pt", then the
918
+ * payload type of the codec will be "reserved" and not be used by any
919
+ * dynamically assigned payload type.
920
+ */
921
+ readonly codecPreferences: Codec[]
892
922
  /**
893
923
  * This is the list of codecs used for this session. It will include the
894
924
  * codecs and payload type used to receive media on this session. It will
@@ -928,6 +958,25 @@ export interface Session {
928
958
  * fs_codec_list_destroy() when done.
929
959
  */
930
960
  readonly codecs_without_config: Codec[]
961
+ /**
962
+ * This is the same list of codecs as #FsSession:codecs without
963
+ * the configuration information that describes the data sent. It is suitable
964
+ * for configurations where a list of codecs is shared by many senders.
965
+ * If one is using codecs such as Theora, Vorbis or H.264 that require
966
+ * such information to be transmitted, the configuration data should be
967
+ * included in the stream and retransmitted regularly.
968
+ *
969
+ * It may change when the codec preferences are set, when codecs are set
970
+ * on a #FsStream in this session, when a #FsStream is destroyed or
971
+ * asynchronously when new config data is discovered.
972
+ *
973
+ * The "farstream-codecs-changed" message will be emitted whenever the value
974
+ * of this property changes.
975
+ *
976
+ * It is a #GList of #FsCodec. User must free this codec list using
977
+ * fs_codec_list_destroy() when done.
978
+ */
979
+ readonly codecsWithoutConfig: Codec[]
931
980
  /**
932
981
  * The #FsConference parent of this session. This property is a
933
982
  * construct param and is read-only.
@@ -942,10 +991,23 @@ export interface Session {
942
991
  * the value of this property changes.
943
992
  */
944
993
  readonly current_send_codec: Codec
994
+ /**
995
+ * Indicates the currently active send codec. A user can change the active
996
+ * send codec by calling fs_session_set_send_codec(). The send codec could
997
+ * also be automatically changed by Farstream. This property is an
998
+ * #FsCodec. User must free the codec using fs_codec_destroy() when done.
999
+ * The "farstream-send-codec-changed" message is emitted on the bus when
1000
+ * the value of this property changes.
1001
+ */
1002
+ readonly currentSendCodec: Codec
945
1003
  /**
946
1004
  * Retrieves previously set encryption parameters
947
1005
  */
948
1006
  readonly encryption_parameters: Gst.Structure
1007
+ /**
1008
+ * Retrieves previously set encryption parameters
1009
+ */
1010
+ readonly encryptionParameters: Gst.Structure
949
1011
  /**
950
1012
  * The ID of the session, the first number of the pads linked to this session
951
1013
  * will be this id
@@ -956,11 +1018,21 @@ export interface Session {
956
1018
  * This is a constructor parameter that cannot be changed.
957
1019
  */
958
1020
  readonly media_type: MediaType
1021
+ /**
1022
+ * The media-type of the session. This is either Audio, Video or both.
1023
+ * This is a constructor parameter that cannot be changed.
1024
+ */
1025
+ readonly mediaType: MediaType
959
1026
  /**
960
1027
  * The Gstreamer sink pad that must be used to send media data on this
961
1028
  * session. User must unref this GstPad when done with it.
962
1029
  */
963
1030
  readonly sink_pad: Gst.Pad
1031
+ /**
1032
+ * The Gstreamer sink pad that must be used to send media data on this
1033
+ * session. User must unref this GstPad when done with it.
1034
+ */
1035
+ readonly sinkPad: Gst.Pad
964
1036
  /**
965
1037
  * Sets the IP ToS field (and if possible the IPv6 TCLASS field
966
1038
  */
@@ -997,14 +1069,14 @@ export interface Session {
997
1069
  * @param error_no The number of the error of type #FsError
998
1070
  * @param error_msg Error message
999
1071
  */
1000
- emit_error(error_no: number, error_msg: string | null): void
1072
+ emit_error(error_no: number, error_msg: string): void
1001
1073
  /**
1002
1074
  * Returns the GType of the stream transmitter, bindings can use it
1003
1075
  * to validate/convert the parameters passed to fs_session_new_stream().
1004
1076
  * @param transmitter The name of the transmitter
1005
1077
  * @returns The #GType of the stream transmitter
1006
1078
  */
1007
- get_stream_transmitter_type(transmitter: string | null): GObject.GType
1079
+ get_stream_transmitter_type(transmitter: string): GObject.GType
1008
1080
  /**
1009
1081
  * Get the list of all available transmitters for this session.
1010
1082
  * @returns a newly-allocagted %NULL terminated array of named of transmitters or %NULL if no transmitter is needed for this type of session. It should be freed with g_strfreev().
@@ -1143,7 +1215,7 @@ export interface Session {
1143
1215
  * @param transmitter The name of the transmitter
1144
1216
  * @returns The #GType of the stream transmitter
1145
1217
  */
1146
- vfunc_get_stream_transmitter_type(transmitter: string | null): GObject.GType
1218
+ vfunc_get_stream_transmitter_type(transmitter: string): GObject.GType
1147
1219
  /**
1148
1220
  * Get the list of all available transmitters for this session.
1149
1221
  * @virtual
@@ -1370,10 +1442,25 @@ export interface Stream {
1370
1442
  * will come to it is different.
1371
1443
  */
1372
1444
  readonly current_recv_codecs: Codec[]
1445
+ /**
1446
+ * This is the list of codecs that have been received by this stream.
1447
+ * The user must free the list if fs_codec_list_destroy().
1448
+ * The "farstream-recv-codecs-changed" message is send on the #GstBus
1449
+ * when the value of this property changes.
1450
+ * It is normally emitted right after #FsStream::src-pad-added
1451
+ * only if that codec was not previously received in this stream, but it can
1452
+ * also be emitted if the pad already exists, but the source material that
1453
+ * will come to it is different.
1454
+ */
1455
+ readonly currentRecvCodecs: Codec[]
1373
1456
  /**
1374
1457
  * Retrieves previously set decryption parameters
1375
1458
  */
1376
1459
  readonly decryption_parameters: Gst.Structure
1460
+ /**
1461
+ * Retrieves previously set decryption parameters
1462
+ */
1463
+ readonly decryptionParameters: Gst.Structure
1377
1464
  /**
1378
1465
  * The direction of the stream. This property is set initially as a parameter
1379
1466
  * to the fs_session_new_stream() function. It can be changed later if
@@ -1388,6 +1475,14 @@ export interface Stream {
1388
1475
  * It is a #GList of #FsCodec.
1389
1476
  */
1390
1477
  readonly negotiated_codecs: Codec[]
1478
+ /**
1479
+ * This is the list of negotiatied codecs, it is the same list as the list
1480
+ * of #FsCodec from the parent #FsSession, except that the codec config data
1481
+ * has been replaced with the data from the remote codecs for this stream.
1482
+ * This is the list of #FsCodec used to receive data from this stream.
1483
+ * It is a #GList of #FsCodec.
1484
+ */
1485
+ readonly negotiatedCodecs: Codec[]
1391
1486
  /**
1392
1487
  * The #FsParticipant for this stream. This property is a construct param and
1393
1488
  * is read-only construction.
@@ -1399,6 +1494,12 @@ export interface Stream {
1399
1494
  * (generally through external signaling). It is a #GList of #FsCodec.
1400
1495
  */
1401
1496
  readonly remote_codecs: Codec[]
1497
+ /**
1498
+ * This is the list of remote codecs for this stream. They must be set by the
1499
+ * user as soon as they are known using fs_stream_set_remote_codecs()
1500
+ * (generally through external signaling). It is a #GList of #FsCodec.
1501
+ */
1502
+ readonly remoteCodecs: Codec[]
1402
1503
  /**
1403
1504
  * The #FsSession for this stream. This property is a construct param and
1404
1505
  * is read-only construction.
@@ -1452,7 +1553,7 @@ export interface Stream {
1452
1553
  * @param error_no The number of the error
1453
1554
  * @param error_msg Error message to be displayed to user
1454
1555
  */
1455
- emit_error(error_no: number, error_msg: string | null): void
1556
+ emit_error(error_no: number, error_msg: string): void
1456
1557
  /**
1457
1558
  * Emits the #FsStream::src-pad-added" signal, it should only be
1458
1559
  * called by subclasses.
@@ -1537,7 +1638,7 @@ export interface Stream {
1537
1638
  * @param stream_transmitter_parameters an array of n_parameters #GParameter struct that will be passed to the newly-create #FsStreamTransmitter
1538
1639
  * @returns %TRUE if the transmitter could be set, %FALSE otherwise
1539
1640
  */
1540
- set_transmitter(transmitter: string | null, stream_transmitter_parameters: GObject.Parameter[] | null): boolean
1641
+ set_transmitter(transmitter: string, stream_transmitter_parameters: GObject.Parameter[] | null): boolean
1541
1642
  /**
1542
1643
  * Set the transmitter to use for this stream. This function will only succeed
1543
1644
  * once.
@@ -1551,7 +1652,7 @@ export interface Stream {
1551
1652
  * @param stream_transmitter_parameters A #GHashTable of string->GValue containing the parameters.
1552
1653
  * @returns %TRUE if the transmitter could be set, %FALSE otherwise
1553
1654
  */
1554
- set_transmitter_ht(transmitter: string | null, stream_transmitter_parameters: GLib.HashTable | null): boolean
1655
+ set_transmitter_ht(transmitter: string, stream_transmitter_parameters: GLib.HashTable | null): boolean
1555
1656
 
1556
1657
  // Own virtual methods of Farstream-0.2.Farstream.Stream
1557
1658
 
@@ -1622,7 +1723,7 @@ export interface Stream {
1622
1723
  * @param stream_transmitter_parameters an array of n_parameters #GParameter struct that will be passed to the newly-create #FsStreamTransmitter
1623
1724
  * @returns %TRUE if the transmitter could be set, %FALSE otherwise
1624
1725
  */
1625
- vfunc_set_transmitter(transmitter: string | null, stream_transmitter_parameters: GObject.Parameter[] | null): boolean
1726
+ vfunc_set_transmitter(transmitter: string, stream_transmitter_parameters: GObject.Parameter[] | null): boolean
1626
1727
 
1627
1728
  // Own signals of Farstream-0.2.Farstream.Stream
1628
1729
 
@@ -1742,6 +1843,12 @@ export module StreamTransmitter {
1742
1843
  * A network source #GstElement to be used by the #FsSession
1743
1844
  */
1744
1845
  sending?: boolean | null
1846
+ /**
1847
+ * This tells the stream transmitter to associate incoming data with this
1848
+ * based on the source without looking at the content if possible.
1849
+ */
1850
+ associateOnSource?: boolean | null
1851
+ preferredLocalCandidates?: any | null
1745
1852
  }
1746
1853
 
1747
1854
  }
@@ -1755,7 +1862,13 @@ export interface StreamTransmitter {
1755
1862
  * based on the source without looking at the content if possible.
1756
1863
  */
1757
1864
  readonly associate_on_source: boolean
1865
+ /**
1866
+ * This tells the stream transmitter to associate incoming data with this
1867
+ * based on the source without looking at the content if possible.
1868
+ */
1869
+ readonly associateOnSource: boolean
1758
1870
  readonly preferred_local_candidates: any
1871
+ readonly preferredLocalCandidates: any
1759
1872
  /**
1760
1873
  * A network source #GstElement to be used by the #FsSession
1761
1874
  */
@@ -1779,7 +1892,7 @@ export interface StreamTransmitter {
1779
1892
  * @param error_no The number of the error
1780
1893
  * @param error_msg Error message (for the programmer)
1781
1894
  */
1782
- emit_error(error_no: number, error_msg: string | null): void
1895
+ emit_error(error_no: number, error_msg: string): void
1783
1896
  /**
1784
1897
  * This function forces data to be sent immediately to the selected remote
1785
1898
  * candidate, by-passing any connectivity checks. There should be at most
@@ -1920,6 +2033,11 @@ export module Transmitter {
1920
2033
  * Sets the IP ToS field (and if possible the IPv6 TCLASS field
1921
2034
  */
1922
2035
  tos?: number | null
2036
+ /**
2037
+ * Apply current stream time to buffers or provide buffers without
2038
+ * timestamps. Must be set before creating a stream transmitter.
2039
+ */
2040
+ doTimestamp?: boolean | null
1923
2041
  }
1924
2042
 
1925
2043
  }
@@ -1937,6 +2055,11 @@ export interface Transmitter {
1937
2055
  * timestamps. Must be set before creating a stream transmitter.
1938
2056
  */
1939
2057
  do_timestamp: boolean
2058
+ /**
2059
+ * Apply current stream time to buffers or provide buffers without
2060
+ * timestamps. Must be set before creating a stream transmitter.
2061
+ */
2062
+ doTimestamp: boolean
1940
2063
  /**
1941
2064
  * A network source #GstElement to be used by the #FsSession
1942
2065
  * These element's sink must have async=FALSE
@@ -1946,6 +2069,15 @@ export interface Transmitter {
1946
2069
  * These pads MUST be static pads.
1947
2070
  */
1948
2071
  readonly gst_sink: Gst.Element
2072
+ /**
2073
+ * A network source #GstElement to be used by the #FsSession
2074
+ * These element's sink must have async=FALSE
2075
+ * This element MUST provide a pad named "sink_\%u" per component.
2076
+ * These pads number must start at 1 (the \%u corresponds to the component
2077
+ * number).
2078
+ * These pads MUST be static pads.
2079
+ */
2080
+ readonly gstSink: Gst.Element
1949
2081
  /**
1950
2082
  * A network source #GstElement to be used by the #FsSession
1951
2083
  * This element MUST provide a source pad named "src_%u" per component.
@@ -1954,6 +2086,14 @@ export interface Transmitter {
1954
2086
  * These pads MUST be static pads.
1955
2087
  */
1956
2088
  readonly gst_src: Gst.Element
2089
+ /**
2090
+ * A network source #GstElement to be used by the #FsSession
2091
+ * This element MUST provide a source pad named "src_%u" per component.
2092
+ * These pads number must start at 1 (the %u corresponds to the component
2093
+ * number).
2094
+ * These pads MUST be static pads.
2095
+ */
2096
+ readonly gstSrc: Gst.Element
1957
2097
  /**
1958
2098
  * Sets the IP ToS field (and if possible the IPv6 TCLASS field
1959
2099
  */
@@ -1971,7 +2111,7 @@ export interface Transmitter {
1971
2111
  * @param error_no The number of the error
1972
2112
  * @param error_msg Error message to be displayed to user
1973
2113
  */
1974
- emit_error(error_no: number, error_msg: string | null): void
2114
+ emit_error(error_no: number, error_msg: string): void
1975
2115
  /**
1976
2116
  * This function returns the GObject type for the stream transmitter.
1977
2117
  * This is meant for bindings that need to introspect the type of arguments
@@ -2062,7 +2202,7 @@ export class Transmitter extends GObject.Object {
2062
2202
  * @param tos The Type of Service of the socket, max is 255
2063
2203
  * @returns a newly-created #FsTransmitter of the requested type (or NULL if there is an error)
2064
2204
  */
2065
- constructor(type: string | null, components: number, tos: number)
2205
+ constructor(type: string, components: number, tos: number)
2066
2206
  /**
2067
2207
  * This function creates a new transmitter of the requested type.
2068
2208
  * It will load the appropriate plugin as required.
@@ -2072,7 +2212,7 @@ export class Transmitter extends GObject.Object {
2072
2212
  * @param tos The Type of Service of the socket, max is 255
2073
2213
  * @returns a newly-created #FsTransmitter of the requested type (or NULL if there is an error)
2074
2214
  */
2075
- static new(type: string | null, components: number, tos: number): Transmitter
2215
+ static new(type: string, components: number, tos: number): Transmitter
2076
2216
  _init(config?: Transmitter.ConstructorProperties): void
2077
2217
  /**
2078
2218
  * Get the list of all available transmitters
@@ -2181,7 +2321,7 @@ export class Candidate {
2181
2321
  * @param port the UDP/TCP port
2182
2322
  * @returns a newly-allocated #FsCandidate
2183
2323
  */
2184
- constructor(foundation: string | null, component_id: number, type: CandidateType, proto: NetworkProtocol, ip: string | null, port: number)
2324
+ constructor(foundation: string, component_id: number, type: CandidateType, proto: NetworkProtocol, ip: string | null, port: number)
2185
2325
  /**
2186
2326
  * Allocates a new #FsCandidate, the rest of the fields can be optionally
2187
2327
  * filled manually. See also fs_candidate_new_full()
@@ -2194,7 +2334,7 @@ export class Candidate {
2194
2334
  * @param port the UDP/TCP port
2195
2335
  * @returns a newly-allocated #FsCandidate
2196
2336
  */
2197
- static new(foundation: string | null, component_id: number, type: CandidateType, proto: NetworkProtocol, ip: string | null, port: number): Candidate
2337
+ static new(foundation: string, component_id: number, type: CandidateType, proto: NetworkProtocol, ip: string | null, port: number): Candidate
2198
2338
  /**
2199
2339
  * Allocates a new #FsCandidate, filling all the fields. See also
2200
2340
  * fs_candidate_new()
@@ -2213,7 +2353,7 @@ export class Candidate {
2213
2353
  * @param ttl The TTL used when sending Multicast packet (0 = auto)
2214
2354
  * @returns a newly-allocated #FsCandidate
2215
2355
  */
2216
- static new_full(foundation: string | null, component_id: number, ip: string | null, port: number, base_ip: string | null, base_port: number, proto: NetworkProtocol, priority: number, type: CandidateType, username: string | null, password: string | null, ttl: number): Candidate
2356
+ static new_full(foundation: string, component_id: number, ip: string | null, port: number, base_ip: string | null, base_port: number, proto: NetworkProtocol, priority: number, type: CandidateType, username: string | null, password: string | null, ttl: number): Candidate
2217
2357
  }
2218
2358
 
2219
2359
  export interface Codec {
@@ -2272,13 +2412,13 @@ export interface Codec {
2272
2412
  * @param subtype The subtype of the feedback parameter
2273
2413
  * @param extra_params The extra_params of the feeback parameter
2274
2414
  */
2275
- add_feedback_parameter(type: string | null, subtype: string | null, extra_params: string | null): void
2415
+ add_feedback_parameter(type: string, subtype: string, extra_params: string): void
2276
2416
  /**
2277
2417
  * This function adds an new optional parameter to a #FsCodec
2278
2418
  * @param name The name of the optional parameter
2279
2419
  * @param value The extra_params of the optional parameter
2280
2420
  */
2281
- add_optional_parameter(name: string | null, value: string | null): void
2421
+ add_optional_parameter(name: string, value: string): void
2282
2422
  /**
2283
2423
  * Compare two codecs, it will declare two codecs to be identical even
2284
2424
  * if their optional parameters are in a different order. %NULL encoding names
@@ -2308,7 +2448,7 @@ export interface Codec {
2308
2448
  * @param value The value of the parameter to search for or %NULL for any value
2309
2449
  * @returns the #FsCodecParameter from the #FsCodec or %NULL
2310
2450
  */
2311
- get_optional_parameter(name: string | null, value: string | null): CodecParameter
2451
+ get_optional_parameter(name: string, value: string | null): CodecParameter
2312
2452
  /**
2313
2453
  * Removes an optional parameter from a codec.
2314
2454
  *
@@ -2351,7 +2491,7 @@ export class Codec {
2351
2491
  * @param clock_rate The clock rate this codec encodes at, if applicable
2352
2492
  * @returns A newly allocated #FsCodec
2353
2493
  */
2354
- constructor(id: number, encoding_name: string | null, media_type: MediaType, clock_rate: number)
2494
+ constructor(id: number, encoding_name: string, media_type: MediaType, clock_rate: number)
2355
2495
  /**
2356
2496
  * Allocates and initializes a #FsCodec structure
2357
2497
  * @constructor
@@ -2361,7 +2501,7 @@ export class Codec {
2361
2501
  * @param clock_rate The clock rate this codec encodes at, if applicable
2362
2502
  * @returns A newly allocated #FsCodec
2363
2503
  */
2364
- static new(id: number, encoding_name: string | null, media_type: MediaType, clock_rate: number): Codec
2504
+ static new(id: number, encoding_name: string, media_type: MediaType, clock_rate: number): Codec
2365
2505
  }
2366
2506
 
2367
2507
  export interface CodecParameter {
@@ -2611,7 +2751,7 @@ export class RtpHeaderExtension {
2611
2751
  * @param uri The URI that defines this extension
2612
2752
  * @returns a new #FsRtpHeaderExtension
2613
2753
  */
2614
- constructor(id: number, direction: StreamDirection, uri: string | null)
2754
+ constructor(id: number, direction: StreamDirection, uri: string)
2615
2755
  /**
2616
2756
  * Creates a new #FsRtpHeaderExtension
2617
2757
  * @constructor
@@ -2620,7 +2760,7 @@ export class RtpHeaderExtension {
2620
2760
  * @param uri The URI that defines this extension
2621
2761
  * @returns a new #FsRtpHeaderExtension
2622
2762
  */
2623
- static new(id: number, direction: StreamDirection, uri: string | null): RtpHeaderExtension
2763
+ static new(id: number, direction: StreamDirection, uri: string): RtpHeaderExtension
2624
2764
  }
2625
2765
 
2626
2766
  export interface SessionClass {
@@ -2638,7 +2778,7 @@ export interface SessionClass {
2638
2778
  set_send_codec: (session: Session, send_codec: Codec) => boolean
2639
2779
  set_codec_preferences: (session: Session, codec_preferences: Codec[] | null) => boolean
2640
2780
  list_transmitters: (session: Session) => string[]
2641
- get_stream_transmitter_type: (session: Session, transmitter: string | null) => GObject.GType
2781
+ get_stream_transmitter_type: (session: Session, transmitter: string) => GObject.GType
2642
2782
  codecs_need_resend: (session: Session, old_codecs: Codec[] | null, new_codecs: Codec[] | null) => Codec[]
2643
2783
  set_allowed_caps: (session: Session, sink_caps: Gst.Caps | null, src_caps: Gst.Caps | null) => boolean
2644
2784
  set_encryption_parameters: (session: Session, parameters: Gst.Structure | null) => boolean
@@ -2678,7 +2818,7 @@ export interface StreamClass {
2678
2818
  force_remote_candidates: (stream: Stream, remote_candidates: Candidate[]) => boolean
2679
2819
  set_remote_codecs: (stream: Stream, remote_codecs: Codec[]) => boolean
2680
2820
  add_id: (stream: Stream, id: number) => void
2681
- set_transmitter: (stream: Stream, transmitter: string | null, stream_transmitter_parameters: GObject.Parameter[] | null) => boolean
2821
+ set_transmitter: (stream: Stream, transmitter: string, stream_transmitter_parameters: GObject.Parameter[] | null) => boolean
2682
2822
  set_decryption_parameters: (stream: Stream, parameters: Gst.Structure) => boolean
2683
2823
  }
2684
2824
 
@@ -273,7 +273,7 @@ enum StreamDirection {
273
273
  /**
274
274
  * A format that can be used in printf like format strings to format a FsCodec
275
275
  */
276
- const CODEC_FORMAT: string | null
276
+ const CODEC_FORMAT: string
277
277
  /**
278
278
  * If the id of a #FsCodec is #FS_CODEC_ID_ANY, then it will be replaced
279
279
  * with a dynamic payload type at runtime
@@ -288,7 +288,7 @@ const CODEC_ID_DISABLE: number
288
288
  * A format that can be used in printf like format strings to format a
289
289
  * FsRtpHeaderExtension
290
290
  */
291
- const RTP_HEADER_EXTENSION_FORMAT: string | null
291
+ const RTP_HEADER_EXTENSION_FORMAT: string
292
292
  /**
293
293
  * Copies a GList of #FsCandidate and its contents
294
294
  * @param candidate_list A GList of #FsCandidate
@@ -335,14 +335,14 @@ function codec_list_copy(codec_list: Codec[]): Codec[]
335
335
  * @param filename Name of the #GKeyFile to read the codecs parameters from
336
336
  * @returns The #GList of #FsCodec or %NULL if the keyfile was empty or an error occured.
337
337
  */
338
- function codec_list_from_keyfile(filename: string | null): Codec[]
338
+ function codec_list_from_keyfile(filename: string): Codec[]
339
339
  function error_quark(): GLib.Quark
340
340
  /**
341
341
  * Gives a user-printable string representing the media type
342
342
  * @param media_type A media type
343
343
  * @returns a static string representing the media type
344
344
  */
345
- function media_type_to_string(media_type: MediaType): string | null
345
+ function media_type_to_string(media_type: MediaType): string
346
346
  /**
347
347
  * Parses a "farstream-farstream" message and checks if it matches
348
348
  * the `object` parameters.
@@ -350,7 +350,7 @@ function media_type_to_string(media_type: MediaType): string | null
350
350
  * @param message a #GstMessage to parse
351
351
  * @returns %TRUE if the message matches the object and is valid.
352
352
  */
353
- function parse_error(object: GObject.Object, message: Gst.Message): [ /* returnType */ boolean, /* error */ Error, /* error_msg */ string | null ]
353
+ function parse_error(object: GObject.Object, message: Gst.Message): [ /* returnType */ boolean, /* error */ Error, /* error_msg */ string ]
354
354
  /**
355
355
  * Does a deep copy of a #GList of #FsRtpHeaderExtension
356
356
  * @param extensions a #GList of #FsRtpHeaderExtension
@@ -390,7 +390,7 @@ function rtp_header_extension_list_copy(extensions: RtpHeaderExtension[]): RtpHe
390
390
  * @param media_type The media type for which to get header extensions
391
391
  * @returns a #GList of #FsRtpHeaderExtension that must be freed with fs_rtp_header_extension_list_destroy()
392
392
  */
393
- function rtp_header_extension_list_from_keyfile(filename: string | null, media_type: MediaType): RtpHeaderExtension[]
393
+ function rtp_header_extension_list_from_keyfile(filename: string, media_type: MediaType): RtpHeaderExtension[]
394
394
  /**
395
395
  * These default codec preferences should work with the elements that are
396
396
  * available in the main GStreamer element repositories.
@@ -465,7 +465,7 @@ interface Conference extends Gst.ChildProxy {
465
465
  * You are responsible for freeing it by calling g_value_unset()
466
466
  * @param name name of the property
467
467
  */
468
- get_property(name: string | null): /* value */ any
468
+ get_property(name: string): /* value */ any
469
469
 
470
470
  // Overloads of get_property
471
471
 
@@ -489,7 +489,7 @@ interface Conference extends Gst.ChildProxy {
489
489
  * @param property_name the name of the property to get
490
490
  * @param value return location for the property value
491
491
  */
492
- get_property(property_name: string | null, value: any): void
492
+ get_property(property_name: string, value: any): void
493
493
  /**
494
494
  * Gets a property of an object.
495
495
  *
@@ -510,7 +510,7 @@ interface Conference extends Gst.ChildProxy {
510
510
  * @param property_name the name of the property to get
511
511
  * @param value return location for the property value
512
512
  */
513
- get_property(property_name: string | null, value: any): void
513
+ get_property(property_name: string, value: any): void
514
514
  /**
515
515
  * Increases the reference count of `object`.
516
516
  *
@@ -649,7 +649,7 @@ interface ElementAddedNotifier {
649
649
  * @param filename The name of the keyfile to use
650
650
  * @returns %TRUE if the file was successfully loaded, %FALSE otherwise
651
651
  */
652
- set_properties_from_file(filename: string | null): boolean
652
+ set_properties_from_file(filename: string): boolean
653
653
  /**
654
654
  * Using a #GKeyFile where the groups are the element's type or name
655
655
  * and the key=value are the property and its value, this function
@@ -818,7 +818,7 @@ class Plugin extends GObject.TypeModule {
818
818
  * @param type_suffix Get list of plugins with this type suffix
819
819
  * @returns a newly allocated NULL terminated array of strings or %NULL if no strings were found. It should be freed with g_strfreev().
820
820
  */
821
- static list_available(type_suffix: string | null): string[]
821
+ static list_available(type_suffix: string): string[]
822
822
  }
823
823
 
824
824
  module Session {
@@ -858,6 +858,11 @@ module Session {
858
858
  * Sets the IP ToS field (and if possible the IPv6 TCLASS field
859
859
  */
860
860
  tos?: number | null
861
+ /**
862
+ * The media-type of the session. This is either Audio, Video or both.
863
+ * This is a constructor parameter that cannot be changed.
864
+ */
865
+ mediaType?: MediaType | null
861
866
  }
862
867
 
863
868
  }
@@ -872,12 +877,24 @@ interface Session {
872
877
  * accepted those caps as input.
873
878
  */
874
879
  readonly allowed_sink_caps: Gst.Caps
880
+ /**
881
+ * These are the #GstCaps that can be fed into the session,
882
+ * they are used to filter the codecs to only those that can
883
+ * accepted those caps as input.
884
+ */
885
+ readonly allowedSinkCaps: Gst.Caps
875
886
  /**
876
887
  * These are the #GstCaps that the session can produce,
877
888
  * they are used to filter the codecs to only those that can
878
889
  * accepted those caps as output.
879
890
  */
880
891
  readonly allowed_src_caps: Gst.Caps
892
+ /**
893
+ * These are the #GstCaps that the session can produce,
894
+ * they are used to filter the codecs to only those that can
895
+ * accepted those caps as output.
896
+ */
897
+ readonly allowedSrcCaps: Gst.Caps
881
898
  /**
882
899
  * This is the current preferences list for the local codecs. It is
883
900
  * set by the user to specify the codec options and priorities. The user may
@@ -891,6 +908,19 @@ interface Session {
891
908
  * dynamically assigned payload type.
892
909
  */
893
910
  readonly codec_preferences: Codec[]
911
+ /**
912
+ * This is the current preferences list for the local codecs. It is
913
+ * set by the user to specify the codec options and priorities. The user may
914
+ * change its value with fs_session_set_codec_preferences() at any time
915
+ * during a session. It is a #GList of #FsCodec.
916
+ * The user must free this codec list using fs_codec_list_destroy() when done.
917
+ *
918
+ * The payload type may be a valid dynamic PT (96-127), %FS_CODEC_ID_DISABLE
919
+ * or %FS_CODEC_ID_ANY. If the encoding name is "reserve-pt", then the
920
+ * payload type of the codec will be "reserved" and not be used by any
921
+ * dynamically assigned payload type.
922
+ */
923
+ readonly codecPreferences: Codec[]
894
924
  /**
895
925
  * This is the list of codecs used for this session. It will include the
896
926
  * codecs and payload type used to receive media on this session. It will
@@ -930,6 +960,25 @@ interface Session {
930
960
  * fs_codec_list_destroy() when done.
931
961
  */
932
962
  readonly codecs_without_config: Codec[]
963
+ /**
964
+ * This is the same list of codecs as #FsSession:codecs without
965
+ * the configuration information that describes the data sent. It is suitable
966
+ * for configurations where a list of codecs is shared by many senders.
967
+ * If one is using codecs such as Theora, Vorbis or H.264 that require
968
+ * such information to be transmitted, the configuration data should be
969
+ * included in the stream and retransmitted regularly.
970
+ *
971
+ * It may change when the codec preferences are set, when codecs are set
972
+ * on a #FsStream in this session, when a #FsStream is destroyed or
973
+ * asynchronously when new config data is discovered.
974
+ *
975
+ * The "farstream-codecs-changed" message will be emitted whenever the value
976
+ * of this property changes.
977
+ *
978
+ * It is a #GList of #FsCodec. User must free this codec list using
979
+ * fs_codec_list_destroy() when done.
980
+ */
981
+ readonly codecsWithoutConfig: Codec[]
933
982
  /**
934
983
  * The #FsConference parent of this session. This property is a
935
984
  * construct param and is read-only.
@@ -944,10 +993,23 @@ interface Session {
944
993
  * the value of this property changes.
945
994
  */
946
995
  readonly current_send_codec: Codec
996
+ /**
997
+ * Indicates the currently active send codec. A user can change the active
998
+ * send codec by calling fs_session_set_send_codec(). The send codec could
999
+ * also be automatically changed by Farstream. This property is an
1000
+ * #FsCodec. User must free the codec using fs_codec_destroy() when done.
1001
+ * The "farstream-send-codec-changed" message is emitted on the bus when
1002
+ * the value of this property changes.
1003
+ */
1004
+ readonly currentSendCodec: Codec
947
1005
  /**
948
1006
  * Retrieves previously set encryption parameters
949
1007
  */
950
1008
  readonly encryption_parameters: Gst.Structure
1009
+ /**
1010
+ * Retrieves previously set encryption parameters
1011
+ */
1012
+ readonly encryptionParameters: Gst.Structure
951
1013
  /**
952
1014
  * The ID of the session, the first number of the pads linked to this session
953
1015
  * will be this id
@@ -958,11 +1020,21 @@ interface Session {
958
1020
  * This is a constructor parameter that cannot be changed.
959
1021
  */
960
1022
  readonly media_type: MediaType
1023
+ /**
1024
+ * The media-type of the session. This is either Audio, Video or both.
1025
+ * This is a constructor parameter that cannot be changed.
1026
+ */
1027
+ readonly mediaType: MediaType
961
1028
  /**
962
1029
  * The Gstreamer sink pad that must be used to send media data on this
963
1030
  * session. User must unref this GstPad when done with it.
964
1031
  */
965
1032
  readonly sink_pad: Gst.Pad
1033
+ /**
1034
+ * The Gstreamer sink pad that must be used to send media data on this
1035
+ * session. User must unref this GstPad when done with it.
1036
+ */
1037
+ readonly sinkPad: Gst.Pad
966
1038
  /**
967
1039
  * Sets the IP ToS field (and if possible the IPv6 TCLASS field
968
1040
  */
@@ -999,14 +1071,14 @@ interface Session {
999
1071
  * @param error_no The number of the error of type #FsError
1000
1072
  * @param error_msg Error message
1001
1073
  */
1002
- emit_error(error_no: number, error_msg: string | null): void
1074
+ emit_error(error_no: number, error_msg: string): void
1003
1075
  /**
1004
1076
  * Returns the GType of the stream transmitter, bindings can use it
1005
1077
  * to validate/convert the parameters passed to fs_session_new_stream().
1006
1078
  * @param transmitter The name of the transmitter
1007
1079
  * @returns The #GType of the stream transmitter
1008
1080
  */
1009
- get_stream_transmitter_type(transmitter: string | null): GObject.GType
1081
+ get_stream_transmitter_type(transmitter: string): GObject.GType
1010
1082
  /**
1011
1083
  * Get the list of all available transmitters for this session.
1012
1084
  * @returns a newly-allocagted %NULL terminated array of named of transmitters or %NULL if no transmitter is needed for this type of session. It should be freed with g_strfreev().
@@ -1145,7 +1217,7 @@ interface Session {
1145
1217
  * @param transmitter The name of the transmitter
1146
1218
  * @returns The #GType of the stream transmitter
1147
1219
  */
1148
- vfunc_get_stream_transmitter_type(transmitter: string | null): GObject.GType
1220
+ vfunc_get_stream_transmitter_type(transmitter: string): GObject.GType
1149
1221
  /**
1150
1222
  * Get the list of all available transmitters for this session.
1151
1223
  * @virtual
@@ -1372,10 +1444,25 @@ interface Stream {
1372
1444
  * will come to it is different.
1373
1445
  */
1374
1446
  readonly current_recv_codecs: Codec[]
1447
+ /**
1448
+ * This is the list of codecs that have been received by this stream.
1449
+ * The user must free the list if fs_codec_list_destroy().
1450
+ * The "farstream-recv-codecs-changed" message is send on the #GstBus
1451
+ * when the value of this property changes.
1452
+ * It is normally emitted right after #FsStream::src-pad-added
1453
+ * only if that codec was not previously received in this stream, but it can
1454
+ * also be emitted if the pad already exists, but the source material that
1455
+ * will come to it is different.
1456
+ */
1457
+ readonly currentRecvCodecs: Codec[]
1375
1458
  /**
1376
1459
  * Retrieves previously set decryption parameters
1377
1460
  */
1378
1461
  readonly decryption_parameters: Gst.Structure
1462
+ /**
1463
+ * Retrieves previously set decryption parameters
1464
+ */
1465
+ readonly decryptionParameters: Gst.Structure
1379
1466
  /**
1380
1467
  * The direction of the stream. This property is set initially as a parameter
1381
1468
  * to the fs_session_new_stream() function. It can be changed later if
@@ -1390,6 +1477,14 @@ interface Stream {
1390
1477
  * It is a #GList of #FsCodec.
1391
1478
  */
1392
1479
  readonly negotiated_codecs: Codec[]
1480
+ /**
1481
+ * This is the list of negotiatied codecs, it is the same list as the list
1482
+ * of #FsCodec from the parent #FsSession, except that the codec config data
1483
+ * has been replaced with the data from the remote codecs for this stream.
1484
+ * This is the list of #FsCodec used to receive data from this stream.
1485
+ * It is a #GList of #FsCodec.
1486
+ */
1487
+ readonly negotiatedCodecs: Codec[]
1393
1488
  /**
1394
1489
  * The #FsParticipant for this stream. This property is a construct param and
1395
1490
  * is read-only construction.
@@ -1401,6 +1496,12 @@ interface Stream {
1401
1496
  * (generally through external signaling). It is a #GList of #FsCodec.
1402
1497
  */
1403
1498
  readonly remote_codecs: Codec[]
1499
+ /**
1500
+ * This is the list of remote codecs for this stream. They must be set by the
1501
+ * user as soon as they are known using fs_stream_set_remote_codecs()
1502
+ * (generally through external signaling). It is a #GList of #FsCodec.
1503
+ */
1504
+ readonly remoteCodecs: Codec[]
1404
1505
  /**
1405
1506
  * The #FsSession for this stream. This property is a construct param and
1406
1507
  * is read-only construction.
@@ -1454,7 +1555,7 @@ interface Stream {
1454
1555
  * @param error_no The number of the error
1455
1556
  * @param error_msg Error message to be displayed to user
1456
1557
  */
1457
- emit_error(error_no: number, error_msg: string | null): void
1558
+ emit_error(error_no: number, error_msg: string): void
1458
1559
  /**
1459
1560
  * Emits the #FsStream::src-pad-added" signal, it should only be
1460
1561
  * called by subclasses.
@@ -1539,7 +1640,7 @@ interface Stream {
1539
1640
  * @param stream_transmitter_parameters an array of n_parameters #GParameter struct that will be passed to the newly-create #FsStreamTransmitter
1540
1641
  * @returns %TRUE if the transmitter could be set, %FALSE otherwise
1541
1642
  */
1542
- set_transmitter(transmitter: string | null, stream_transmitter_parameters: GObject.Parameter[] | null): boolean
1643
+ set_transmitter(transmitter: string, stream_transmitter_parameters: GObject.Parameter[] | null): boolean
1543
1644
  /**
1544
1645
  * Set the transmitter to use for this stream. This function will only succeed
1545
1646
  * once.
@@ -1553,7 +1654,7 @@ interface Stream {
1553
1654
  * @param stream_transmitter_parameters A #GHashTable of string->GValue containing the parameters.
1554
1655
  * @returns %TRUE if the transmitter could be set, %FALSE otherwise
1555
1656
  */
1556
- set_transmitter_ht(transmitter: string | null, stream_transmitter_parameters: GLib.HashTable | null): boolean
1657
+ set_transmitter_ht(transmitter: string, stream_transmitter_parameters: GLib.HashTable | null): boolean
1557
1658
 
1558
1659
  // Own virtual methods of Farstream-0.2.Farstream.Stream
1559
1660
 
@@ -1624,7 +1725,7 @@ interface Stream {
1624
1725
  * @param stream_transmitter_parameters an array of n_parameters #GParameter struct that will be passed to the newly-create #FsStreamTransmitter
1625
1726
  * @returns %TRUE if the transmitter could be set, %FALSE otherwise
1626
1727
  */
1627
- vfunc_set_transmitter(transmitter: string | null, stream_transmitter_parameters: GObject.Parameter[] | null): boolean
1728
+ vfunc_set_transmitter(transmitter: string, stream_transmitter_parameters: GObject.Parameter[] | null): boolean
1628
1729
 
1629
1730
  // Own signals of Farstream-0.2.Farstream.Stream
1630
1731
 
@@ -1744,6 +1845,12 @@ module StreamTransmitter {
1744
1845
  * A network source #GstElement to be used by the #FsSession
1745
1846
  */
1746
1847
  sending?: boolean | null
1848
+ /**
1849
+ * This tells the stream transmitter to associate incoming data with this
1850
+ * based on the source without looking at the content if possible.
1851
+ */
1852
+ associateOnSource?: boolean | null
1853
+ preferredLocalCandidates?: any | null
1747
1854
  }
1748
1855
 
1749
1856
  }
@@ -1757,7 +1864,13 @@ interface StreamTransmitter {
1757
1864
  * based on the source without looking at the content if possible.
1758
1865
  */
1759
1866
  readonly associate_on_source: boolean
1867
+ /**
1868
+ * This tells the stream transmitter to associate incoming data with this
1869
+ * based on the source without looking at the content if possible.
1870
+ */
1871
+ readonly associateOnSource: boolean
1760
1872
  readonly preferred_local_candidates: any
1873
+ readonly preferredLocalCandidates: any
1761
1874
  /**
1762
1875
  * A network source #GstElement to be used by the #FsSession
1763
1876
  */
@@ -1781,7 +1894,7 @@ interface StreamTransmitter {
1781
1894
  * @param error_no The number of the error
1782
1895
  * @param error_msg Error message (for the programmer)
1783
1896
  */
1784
- emit_error(error_no: number, error_msg: string | null): void
1897
+ emit_error(error_no: number, error_msg: string): void
1785
1898
  /**
1786
1899
  * This function forces data to be sent immediately to the selected remote
1787
1900
  * candidate, by-passing any connectivity checks. There should be at most
@@ -1922,6 +2035,11 @@ module Transmitter {
1922
2035
  * Sets the IP ToS field (and if possible the IPv6 TCLASS field
1923
2036
  */
1924
2037
  tos?: number | null
2038
+ /**
2039
+ * Apply current stream time to buffers or provide buffers without
2040
+ * timestamps. Must be set before creating a stream transmitter.
2041
+ */
2042
+ doTimestamp?: boolean | null
1925
2043
  }
1926
2044
 
1927
2045
  }
@@ -1939,6 +2057,11 @@ interface Transmitter {
1939
2057
  * timestamps. Must be set before creating a stream transmitter.
1940
2058
  */
1941
2059
  do_timestamp: boolean
2060
+ /**
2061
+ * Apply current stream time to buffers or provide buffers without
2062
+ * timestamps. Must be set before creating a stream transmitter.
2063
+ */
2064
+ doTimestamp: boolean
1942
2065
  /**
1943
2066
  * A network source #GstElement to be used by the #FsSession
1944
2067
  * These element's sink must have async=FALSE
@@ -1948,6 +2071,15 @@ interface Transmitter {
1948
2071
  * These pads MUST be static pads.
1949
2072
  */
1950
2073
  readonly gst_sink: Gst.Element
2074
+ /**
2075
+ * A network source #GstElement to be used by the #FsSession
2076
+ * These element's sink must have async=FALSE
2077
+ * This element MUST provide a pad named "sink_\%u" per component.
2078
+ * These pads number must start at 1 (the \%u corresponds to the component
2079
+ * number).
2080
+ * These pads MUST be static pads.
2081
+ */
2082
+ readonly gstSink: Gst.Element
1951
2083
  /**
1952
2084
  * A network source #GstElement to be used by the #FsSession
1953
2085
  * This element MUST provide a source pad named "src_%u" per component.
@@ -1956,6 +2088,14 @@ interface Transmitter {
1956
2088
  * These pads MUST be static pads.
1957
2089
  */
1958
2090
  readonly gst_src: Gst.Element
2091
+ /**
2092
+ * A network source #GstElement to be used by the #FsSession
2093
+ * This element MUST provide a source pad named "src_%u" per component.
2094
+ * These pads number must start at 1 (the %u corresponds to the component
2095
+ * number).
2096
+ * These pads MUST be static pads.
2097
+ */
2098
+ readonly gstSrc: Gst.Element
1959
2099
  /**
1960
2100
  * Sets the IP ToS field (and if possible the IPv6 TCLASS field
1961
2101
  */
@@ -1973,7 +2113,7 @@ interface Transmitter {
1973
2113
  * @param error_no The number of the error
1974
2114
  * @param error_msg Error message to be displayed to user
1975
2115
  */
1976
- emit_error(error_no: number, error_msg: string | null): void
2116
+ emit_error(error_no: number, error_msg: string): void
1977
2117
  /**
1978
2118
  * This function returns the GObject type for the stream transmitter.
1979
2119
  * This is meant for bindings that need to introspect the type of arguments
@@ -2064,7 +2204,7 @@ class Transmitter extends GObject.Object {
2064
2204
  * @param tos The Type of Service of the socket, max is 255
2065
2205
  * @returns a newly-created #FsTransmitter of the requested type (or NULL if there is an error)
2066
2206
  */
2067
- constructor(type: string | null, components: number, tos: number)
2207
+ constructor(type: string, components: number, tos: number)
2068
2208
  /**
2069
2209
  * This function creates a new transmitter of the requested type.
2070
2210
  * It will load the appropriate plugin as required.
@@ -2074,7 +2214,7 @@ class Transmitter extends GObject.Object {
2074
2214
  * @param tos The Type of Service of the socket, max is 255
2075
2215
  * @returns a newly-created #FsTransmitter of the requested type (or NULL if there is an error)
2076
2216
  */
2077
- static new(type: string | null, components: number, tos: number): Transmitter
2217
+ static new(type: string, components: number, tos: number): Transmitter
2078
2218
  _init(config?: Transmitter.ConstructorProperties): void
2079
2219
  /**
2080
2220
  * Get the list of all available transmitters
@@ -2183,7 +2323,7 @@ class Candidate {
2183
2323
  * @param port the UDP/TCP port
2184
2324
  * @returns a newly-allocated #FsCandidate
2185
2325
  */
2186
- constructor(foundation: string | null, component_id: number, type: CandidateType, proto: NetworkProtocol, ip: string | null, port: number)
2326
+ constructor(foundation: string, component_id: number, type: CandidateType, proto: NetworkProtocol, ip: string | null, port: number)
2187
2327
  /**
2188
2328
  * Allocates a new #FsCandidate, the rest of the fields can be optionally
2189
2329
  * filled manually. See also fs_candidate_new_full()
@@ -2196,7 +2336,7 @@ class Candidate {
2196
2336
  * @param port the UDP/TCP port
2197
2337
  * @returns a newly-allocated #FsCandidate
2198
2338
  */
2199
- static new(foundation: string | null, component_id: number, type: CandidateType, proto: NetworkProtocol, ip: string | null, port: number): Candidate
2339
+ static new(foundation: string, component_id: number, type: CandidateType, proto: NetworkProtocol, ip: string | null, port: number): Candidate
2200
2340
  /**
2201
2341
  * Allocates a new #FsCandidate, filling all the fields. See also
2202
2342
  * fs_candidate_new()
@@ -2215,7 +2355,7 @@ class Candidate {
2215
2355
  * @param ttl The TTL used when sending Multicast packet (0 = auto)
2216
2356
  * @returns a newly-allocated #FsCandidate
2217
2357
  */
2218
- static new_full(foundation: string | null, component_id: number, ip: string | null, port: number, base_ip: string | null, base_port: number, proto: NetworkProtocol, priority: number, type: CandidateType, username: string | null, password: string | null, ttl: number): Candidate
2358
+ static new_full(foundation: string, component_id: number, ip: string | null, port: number, base_ip: string | null, base_port: number, proto: NetworkProtocol, priority: number, type: CandidateType, username: string | null, password: string | null, ttl: number): Candidate
2219
2359
  }
2220
2360
 
2221
2361
  interface Codec {
@@ -2274,13 +2414,13 @@ interface Codec {
2274
2414
  * @param subtype The subtype of the feedback parameter
2275
2415
  * @param extra_params The extra_params of the feeback parameter
2276
2416
  */
2277
- add_feedback_parameter(type: string | null, subtype: string | null, extra_params: string | null): void
2417
+ add_feedback_parameter(type: string, subtype: string, extra_params: string): void
2278
2418
  /**
2279
2419
  * This function adds an new optional parameter to a #FsCodec
2280
2420
  * @param name The name of the optional parameter
2281
2421
  * @param value The extra_params of the optional parameter
2282
2422
  */
2283
- add_optional_parameter(name: string | null, value: string | null): void
2423
+ add_optional_parameter(name: string, value: string): void
2284
2424
  /**
2285
2425
  * Compare two codecs, it will declare two codecs to be identical even
2286
2426
  * if their optional parameters are in a different order. %NULL encoding names
@@ -2310,7 +2450,7 @@ interface Codec {
2310
2450
  * @param value The value of the parameter to search for or %NULL for any value
2311
2451
  * @returns the #FsCodecParameter from the #FsCodec or %NULL
2312
2452
  */
2313
- get_optional_parameter(name: string | null, value: string | null): CodecParameter
2453
+ get_optional_parameter(name: string, value: string | null): CodecParameter
2314
2454
  /**
2315
2455
  * Removes an optional parameter from a codec.
2316
2456
  *
@@ -2353,7 +2493,7 @@ class Codec {
2353
2493
  * @param clock_rate The clock rate this codec encodes at, if applicable
2354
2494
  * @returns A newly allocated #FsCodec
2355
2495
  */
2356
- constructor(id: number, encoding_name: string | null, media_type: MediaType, clock_rate: number)
2496
+ constructor(id: number, encoding_name: string, media_type: MediaType, clock_rate: number)
2357
2497
  /**
2358
2498
  * Allocates and initializes a #FsCodec structure
2359
2499
  * @constructor
@@ -2363,7 +2503,7 @@ class Codec {
2363
2503
  * @param clock_rate The clock rate this codec encodes at, if applicable
2364
2504
  * @returns A newly allocated #FsCodec
2365
2505
  */
2366
- static new(id: number, encoding_name: string | null, media_type: MediaType, clock_rate: number): Codec
2506
+ static new(id: number, encoding_name: string, media_type: MediaType, clock_rate: number): Codec
2367
2507
  }
2368
2508
 
2369
2509
  interface CodecParameter {
@@ -2613,7 +2753,7 @@ class RtpHeaderExtension {
2613
2753
  * @param uri The URI that defines this extension
2614
2754
  * @returns a new #FsRtpHeaderExtension
2615
2755
  */
2616
- constructor(id: number, direction: StreamDirection, uri: string | null)
2756
+ constructor(id: number, direction: StreamDirection, uri: string)
2617
2757
  /**
2618
2758
  * Creates a new #FsRtpHeaderExtension
2619
2759
  * @constructor
@@ -2622,7 +2762,7 @@ class RtpHeaderExtension {
2622
2762
  * @param uri The URI that defines this extension
2623
2763
  * @returns a new #FsRtpHeaderExtension
2624
2764
  */
2625
- static new(id: number, direction: StreamDirection, uri: string | null): RtpHeaderExtension
2765
+ static new(id: number, direction: StreamDirection, uri: string): RtpHeaderExtension
2626
2766
  }
2627
2767
 
2628
2768
  interface SessionClass {
@@ -2640,7 +2780,7 @@ interface SessionClass {
2640
2780
  set_send_codec: (session: Session, send_codec: Codec) => boolean
2641
2781
  set_codec_preferences: (session: Session, codec_preferences: Codec[] | null) => boolean
2642
2782
  list_transmitters: (session: Session) => string[]
2643
- get_stream_transmitter_type: (session: Session, transmitter: string | null) => GObject.GType
2783
+ get_stream_transmitter_type: (session: Session, transmitter: string) => GObject.GType
2644
2784
  codecs_need_resend: (session: Session, old_codecs: Codec[] | null, new_codecs: Codec[] | null) => Codec[]
2645
2785
  set_allowed_caps: (session: Session, sink_caps: Gst.Caps | null, src_caps: Gst.Caps | null) => boolean
2646
2786
  set_encryption_parameters: (session: Session, parameters: Gst.Structure | null) => boolean
@@ -2680,7 +2820,7 @@ interface StreamClass {
2680
2820
  force_remote_candidates: (stream: Stream, remote_candidates: Candidate[]) => boolean
2681
2821
  set_remote_codecs: (stream: Stream, remote_codecs: Codec[]) => boolean
2682
2822
  add_id: (stream: Stream, id: number) => void
2683
- set_transmitter: (stream: Stream, transmitter: string | null, stream_transmitter_parameters: GObject.Parameter[] | null) => boolean
2823
+ set_transmitter: (stream: Stream, transmitter: string, stream_transmitter_parameters: GObject.Parameter[] | null) => boolean
2684
2824
  set_decryption_parameters: (stream: Stream, parameters: Gst.Structure) => boolean
2685
2825
  }
2686
2826
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/farstream-0.2",
3
- "version": "0.2.0-3.2.5",
3
+ "version": "0.2.0-3.2.7",
4
4
  "description": "GJS TypeScript type definitions for Farstream-0.2, generated from library version 0.2.0",
5
5
  "type": "module",
6
6
  "module": "farstream-0.2.js",
@@ -25,11 +25,11 @@
25
25
  "test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit farstream-0.2.d.cts"
26
26
  },
27
27
  "dependencies": {
28
- "@girs/gjs": "^3.2.5",
29
- "@girs/glib-2.0": "^2.78.0-3.2.5",
30
- "@girs/gmodule-2.0": "^2.0.0-3.2.5",
31
- "@girs/gobject-2.0": "^2.78.0-3.2.5",
32
- "@girs/gst-1.0": "^1.23.0-3.2.5"
28
+ "@girs/gjs": "^3.2.7",
29
+ "@girs/glib-2.0": "^2.78.0-3.2.7",
30
+ "@girs/gmodule-2.0": "^2.0.0-3.2.7",
31
+ "@girs/gobject-2.0": "^2.78.0-3.2.7",
32
+ "@girs/gst-1.0": "^1.23.0-3.2.7"
33
33
  },
34
34
  "devDependencies": {
35
35
  "typescript": "*"