From 2f22e8c325c60c6e473cb39a8167c8c2a66c17f3 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Tue, 6 Feb 2018 18:45:59 +0100 Subject: [PATCH] Add bindings for GStreamer Sdp, Rtsp and RtspServer libraries Fixes https://github.com/sdroege/gstreamer-sys/pull/8 --- Cargo.toml | 3 + Gir_GstRtsp.toml | 17 + Gir_GstRtspServer.toml | 19 + Gir_GstSdp.toml | 15 + gir-files/GstRtsp-1.0.gir | 5018 +++++++++++++ gir-files/GstRtspServer-1.0.gir | 9497 ++++++++++++++++++++++++ gir-files/GstSdp-1.0.gir | 4309 +++++++++++ gstreamer-rtsp-server-sys/CHANGELOG.md | 78 + gstreamer-rtsp-server-sys/Cargo.toml | 55 + gstreamer-rtsp-server-sys/LICENSE | 23 + gstreamer-rtsp-server-sys/README.md | 31 + gstreamer-rtsp-server-sys/build.rs | 67 + gstreamer-rtsp-server-sys/src/lib.rs | 1406 ++++ gstreamer-rtsp-sys/CHANGELOG.md | 78 + gstreamer-rtsp-sys/Cargo.toml | 50 + gstreamer-rtsp-sys/LICENSE | 23 + gstreamer-rtsp-sys/README.md | 31 + gstreamer-rtsp-sys/build.rs | 69 + gstreamer-rtsp-sys/src/lib.rs | 946 +++ gstreamer-sdp-sys/CHANGELOG.md | 78 + gstreamer-sdp-sys/Cargo.toml | 44 + gstreamer-sdp-sys/LICENSE | 23 + gstreamer-sdp-sys/README.md | 31 + gstreamer-sdp-sys/build.rs | 67 + gstreamer-sdp-sys/src/lib.rs | 853 +++ 25 files changed, 22831 insertions(+) create mode 100644 Gir_GstRtsp.toml create mode 100644 Gir_GstRtspServer.toml create mode 100644 Gir_GstSdp.toml create mode 100644 gir-files/GstRtsp-1.0.gir create mode 100644 gir-files/GstRtspServer-1.0.gir create mode 100644 gir-files/GstSdp-1.0.gir create mode 100644 gstreamer-rtsp-server-sys/CHANGELOG.md create mode 100644 gstreamer-rtsp-server-sys/Cargo.toml create mode 100644 gstreamer-rtsp-server-sys/LICENSE create mode 100644 gstreamer-rtsp-server-sys/README.md create mode 100644 gstreamer-rtsp-server-sys/build.rs create mode 100644 gstreamer-rtsp-server-sys/src/lib.rs create mode 100644 gstreamer-rtsp-sys/CHANGELOG.md create mode 100644 gstreamer-rtsp-sys/Cargo.toml create mode 100644 gstreamer-rtsp-sys/LICENSE create mode 100644 gstreamer-rtsp-sys/README.md create mode 100644 gstreamer-rtsp-sys/build.rs create mode 100644 gstreamer-rtsp-sys/src/lib.rs create mode 100644 gstreamer-sdp-sys/CHANGELOG.md create mode 100644 gstreamer-sdp-sys/Cargo.toml create mode 100644 gstreamer-sdp-sys/LICENSE create mode 100644 gstreamer-sdp-sys/README.md create mode 100644 gstreamer-sdp-sys/build.rs create mode 100644 gstreamer-sdp-sys/src/lib.rs diff --git a/Cargo.toml b/Cargo.toml index cb3511826..2146777b2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,4 +11,7 @@ members = [ "gstreamer-player-sys", "gstreamer-mpegts-sys", "gstreamer-net-sys", + "gstreamer-sdp-sys", + "gstreamer-rtsp-sys", + "gstreamer-rtsp-server-sys" ] diff --git a/Gir_GstRtsp.toml b/Gir_GstRtsp.toml new file mode 100644 index 000000000..ceb564832 --- /dev/null +++ b/Gir_GstRtsp.toml @@ -0,0 +1,17 @@ +[options] +girs_dir = "gir-files" +library = "GstRtsp" +version = "1.0" +min_cfg_version = "1.0" +target_path = "gstreamer-rtsp-sys" +work_mode = "sys" + +external_libraries = [ + "GLib", + "GObject", + "Gio" +] + +[external_libraries] +gstreamer="Gst" +gstreamer_sdp="GstSdp" diff --git a/Gir_GstRtspServer.toml b/Gir_GstRtspServer.toml new file mode 100644 index 000000000..b7e6b54e5 --- /dev/null +++ b/Gir_GstRtspServer.toml @@ -0,0 +1,19 @@ +[options] +girs_dir = "gir-files" +library = "GstRtspServer" +version = "1.0" +min_cfg_version = "1.0" +target_path = "gstreamer-rtsp-server-sys" +work_mode = "sys" + +external_libraries = [ + "GLib", + "GObject", + "Gio" +] + +[external_libraries] +gstreamer="Gst" +gstreamer_net="GstNet" +gstreamer_sdp="GstSdp" +gstreamer_rtsp="GstRtsp" diff --git a/Gir_GstSdp.toml b/Gir_GstSdp.toml new file mode 100644 index 000000000..238fa843e --- /dev/null +++ b/Gir_GstSdp.toml @@ -0,0 +1,15 @@ +[options] +girs_dir = "gir-files" +library = "GstSdp" +version = "1.0" +min_cfg_version = "1.0" +target_path = "gstreamer-sdp-sys" +work_mode = "sys" + +external_libraries = [ + "GLib", + "GObject" +] + +[external_libraries] +gstreamer="Gst" diff --git a/gir-files/GstRtsp-1.0.gir b/gir-files/GstRtsp-1.0.gir new file mode 100644 index 000000000..af34b1dd5 --- /dev/null +++ b/gir-files/GstRtsp-1.0.gir @@ -0,0 +1,5018 @@ + + + + + + + + + + + + + + + + + + + + + + Authentication methods, ordered by strength + + no authentication + + + basic authentication + + + digest authentication + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This object manages the RTSP connection to the server. It provides function +to receive and send bytes and messages. + + Clear the list of authentication directives stored in @conn. + + + + + + a #GstRTSPConnection + + + + + + Close the connected @conn. After this call, the connection is in the same +state as when it was first created. + + #GST_RTSP_OK on success. + + + + + a #GstRTSPConnection + + + + + + Attempt to connect to the url of @conn made with +gst_rtsp_connection_create(). If @timeout is #NULL this function can block +forever. If @timeout contains a valid timeout, this function will return +#GST_RTSP_ETIMEOUT after the timeout expired. + +This function can be cancelled with gst_rtsp_connection_flush(). + + #GST_RTSP_OK when a connection could be made. + + + + + a #GstRTSPConnection + + + + a #GTimeVal timeout + + + + + + Attempt to connect to the url of @conn made with +gst_rtsp_connection_create(). If @timeout is #NULL this function can block +forever. If @timeout contains a valid timeout, this function will return +#GST_RTSP_ETIMEOUT after the timeout expired. If @conn is set to tunneled, +@response will contain a response to the tunneling request messages. + +This function can be cancelled with gst_rtsp_connection_flush(). + + #GST_RTSP_OK when a connection could be made. + +Since 1.8 + + + + + a #GstRTSPConnection + + + + a #GTimeVal timeout + + + + a #GstRTSPMessage + + + + + + If @conn received the first tunnel connection and @conn2 received +the second tunnel connection, link the two connections together so that +@conn manages the tunneled connection. + +After this call, @conn2 cannot be used anymore and must be freed with +gst_rtsp_connection_free(). + +If @conn2 is %NULL then only the base64 decoding context will be setup for +@conn. + + return GST_RTSP_OK on success. + + + + + a #GstRTSPConnection + + + + a #GstRTSPConnection or %NULL + + + + + + Start or stop the flushing action on @conn. When flushing, all current +and future actions on @conn will return #GST_RTSP_EINTR until the connection +is set to non-flushing mode again. + + #GST_RTSP_OK. + + + + + a #GstRTSPConnection + + + + start or stop the flush + + + + + + Close and free @conn. + + #GST_RTSP_OK on success. + + + + + a #GstRTSPConnection + + + + + + Retrieve the IP address of the other end of @conn. + + The IP address as a string. this value remains valid until the +connection is closed. + + + + + a #GstRTSPConnection + + + + + + Get the file descriptor for reading. + + the file descriptor used for reading or %NULL on +error. The file descriptor remains valid until the connection is closed. + + + + + a #GstRTSPConnection + + + + + + + %TRUE if the #GstRTSPConnection remembers the session id in the +last response to set it on any further request. + + + + + a #GstRTSPConnection + + + + + + Get the TLS connection of @conn. + +For client side this will return the #GTlsClientConnection when connected +over TLS. + +For server side connections, this function will create a GTlsServerConnection +when called the first time and will return that same connection on subsequent +calls. The server is then responsible for configuring the TLS connection. + + the TLS connection for @conn. + + + + + a #GstRTSPConnection + + + + + + Gets the anchor certificate authorities database that will be used +after a server certificate can't be verified with the default +certificate database. + + the anchor certificate authorities database, or NULL if no +database has been previously set. Use g_object_unref() to release the +certificate database. + + + + + a #GstRTSPConnection + + + + + + Gets a #GTlsInteraction object to be used when the connection or certificate +database need to interact with the user. This will be used to prompt the +user for passwords where necessary. + + a reference on the #GTlsInteraction. Use +g_object_unref() to release. + + + + + a #GstRTSPConnection + + + + + + Gets the TLS validation flags used to verify the peer certificate +when a TLS connection is established. + + the validationg flags. + + + + + a #GstRTSPConnection + + + + + + Get the tunnel session id the connection. + + returns a non-empty string if @conn is being tunneled over HTTP. + + + + + a #GstRTSPConnection + + + + + + Retrieve the URL of the other end of @conn. + + The URL. This value remains valid until the +connection is freed. + + + + + a #GstRTSPConnection + + + + + + Get the file descriptor for writing. + + the file descriptor used for writing or NULL on +error. The file descriptor remains valid until the connection is closed. + + + + + a #GstRTSPConnection + + + + + + Get the tunneling state of the connection. + + if @conn is using HTTP tunneling. + + + + + a #GstRTSPConnection + + + + + + Calculate the next timeout for @conn, storing the result in @timeout. + + #GST_RTSP_OK. + + + + + a #GstRTSPConnection + + + + a timeout + + + + + + Wait up to the specified @timeout for the connection to become available for +at least one of the operations specified in @events. When the function returns +with #GST_RTSP_OK, @revents will contain a bitmask of available operations on +@conn. + +@timeout can be #NULL, in which case this function might block forever. + +This function can be cancelled with gst_rtsp_connection_flush(). + + #GST_RTSP_OK on success. + + + + + a #GstRTSPConnection + + + + a bitmask of #GstRTSPEvent flags to check + + + + location for result flags + + + + a timeout + + + + + + Attempt to read @size bytes into @data from the connected @conn, blocking up to +the specified @timeout. @timeout can be #NULL, in which case this function +might block forever. + +This function can be cancelled with gst_rtsp_connection_flush(). + + #GST_RTSP_OK on success. + + + + + a #GstRTSPConnection + + + + the data to read + + + + the size of @data + + + + a timeout value or #NULL + + + + + + Attempt to read into @message from the connected @conn, blocking up to +the specified @timeout. @timeout can be #NULL, in which case this function +might block forever. + +This function can be cancelled with gst_rtsp_connection_flush(). + + #GST_RTSP_OK on success. + + + + + a #GstRTSPConnection + + + + the message to read + + + + a timeout value or #NULL + + + + + + Reset the timeout of @conn. + + #GST_RTSP_OK. + + + + + a #GstRTSPConnection + + + + + + Attempt to send @message to the connected @conn, blocking up to +the specified @timeout. @timeout can be #NULL, in which case this function +might block forever. + +This function can be cancelled with gst_rtsp_connection_flush(). + + #GST_RTSP_OK on success. + + + + + a #GstRTSPConnection + + + + the message to send + + + + a timeout value or #NULL + + + + + + Configure @conn for authentication mode @method with @user and @pass as the +user and password respectively. + + #GST_RTSP_OK. + + + + + a #GstRTSPConnection + + + + authentication method + + + + the user + + + + the password + + + + + + Setup @conn with authentication directives. This is not necesary for +methods #GST_RTSP_AUTH_NONE and #GST_RTSP_AUTH_BASIC. For +#GST_RTSP_AUTH_DIGEST, directives should be taken from the digest challenge +in the WWW-Authenticate response header and can include realm, domain, +nonce, opaque, stale, algorithm, qop as per RFC2617. + + + + + + a #GstRTSPConnection + + + + authentication directive + + + + value + + + + + + By setting the HTTP mode to %TRUE the message parsing will support HTTP +messages in addition to the RTSP messages. It will also disable the +automatic handling of setting up an HTTP tunnel. + + + + + + a #GstRTSPConnection + + + + %TRUE to enable manual HTTP mode + + + + + + Set the IP address of the server. + + + + + + a #GstRTSPConnection + + + + an ip address + + + + + + Set the proxy host and port. + + #GST_RTSP_OK. + + + + + a #GstRTSPConnection + + + + the proxy host + + + + the proxy port + + + + + + Configure @conn to use the specified DSCP value. + + #GST_RTSP_OK on success. + + + + + a #GstRTSPConnection + + + + DSCP value + + + + + + Sets if the #GstRTSPConnection should remember the session id from the last +response received and force it onto any further requests. + +The default value is %TRUE + + + + + + a #GstRTSPConnection + + + + %TRUE if the connection should remember the session id + + + + + + Sets the anchor certificate authorities database. This certificate +database will be used to verify the server's certificate in case it +can't be verified with the default certificate database first. + + + + + + a #GstRTSPConnection + + + + a #GTlsDatabase + + + + + + Sets a #GTlsInteraction object to be used when the connection or certificate +database need to interact with the user. This will be used to prompt the +user for passwords where necessary. + + + + + + a #GstRTSPConnection + + + + a #GTlsInteraction + + + + + + Sets the TLS validation flags to be used to verify the peer +certificate when a TLS connection is established. + + TRUE if the validation flags are set correctly, or FALSE if +@conn is NULL or is not a TLS connection. + + + + + a #GstRTSPConnection + + + + the validation flags. + + + + + + Set the HTTP tunneling state of the connection. This must be configured before +the @conn is connected. + + + + + + a #GstRTSPConnection + + + + the new state + + + + + + Attempt to write @size bytes of @data to the connected @conn, blocking up to +the specified @timeout. @timeout can be #NULL, in which case this function +might block forever. + +This function can be cancelled with gst_rtsp_connection_flush(). + + #GST_RTSP_OK on success. + + + + + a #GstRTSPConnection + + + + the data to write + + + + the size of @data + + + + a timeout value or #NULL + + + + + + Accept a new connection on @socket and create a new #GstRTSPConnection for +handling communication on new socket. + + #GST_RTSP_OK when @conn contains a valid connection. + + + + + a socket + + + + storage for a #GstRTSPConnection + + + + a #GCancellable to cancel the operation + + + + + + Create a newly allocated #GstRTSPConnection from @url and store it in @conn. +The connection will not yet attempt to connect to @url, use +gst_rtsp_connection_connect(). + +A copy of @url will be made. + + #GST_RTSP_OK when @conn contains a valid connection. + + + + + a #GstRTSPUrl + + + + storage for a #GstRTSPConnection + + + + + + Create a new #GstRTSPConnection for handling communication on the existing +socket @socket. The @initial_buffer contains zero terminated data already +read from @socket which should be used before starting to read new data. + + #GST_RTSP_OK when @conn contains a valid connection. + + + + + a #GSocket + + + + the IP address of the other end + + + + the port used by the other end + + + + data already read from @fd + + + + storage for a #GstRTSPConnection + + + + + + + The possible events for the connection. + + connection is readable + + + connection is writable + + + + This interface is implemented e.g. by the Windows Media Streaming RTSP + exentension (rtspwms) and the RealMedia RTSP extension (rtspreal). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The possible network families. + + unknown network family + + + internet + + + internet V6 + + + + Enumeration of rtsp header fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The different transport methods. + + invalid transport flag + + + stream data over UDP + + + stream data over UDP multicast + + + stream data over TCP + + + stream data tunneled over HTTP. + + + encrypt TCP and HTTP with TLS + + + + Provides methods for creating and parsing request, response and data messages. + + the message type + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Add a header with key @field and @value to @msg. This function takes a copy +of @value. + + a #GstRTSPResult. + + + + + a #GstRTSPMessage + + + + a #GstRTSPHeaderField + + + + the value of the header + + + + + + Add a header with key @header and @value to @msg. This function takes a copy +of @value. + + a #GstRTSPResult. + + + + + a #GstRTSPMessage + + + + header string + + + + the value of the header + + + + + + Append the currently configured headers in @msg to the #GString @str suitable +for transmission. + + #GST_RTSP_OK. + + + + + a #GstRTSPMessage + + + + a string + + + + + + Dump the contents of @msg to stdout. + + #GST_RTSP_OK. + + + + + a #GstRTSPMessage + + + + + + Free the memory used by @msg. + + a #GstRTSPResult. + + + + + a #GstRTSPMessage + + + + + + Get the body of @msg. @data remains valid for as long as @msg is valid and +unchanged. + + #GST_RTSP_OK. + + + + + a #GstRTSPMessage + + + + location for the data + + + + + + location for the size of @data + + + + + + Get the @indx header value with key @field from @msg. The result in @value +stays valid as long as it remains present in @msg. + + #GST_RTSP_OK when @field was found, #GST_RTSP_ENOTIMPL if the key +was not found. + + + + + a #GstRTSPMessage + + + + a #GstRTSPHeaderField + + + + pointer to hold the result + + + + the index of the header + + + + + + Get the @index header value with key @header from @msg. The result in @value +stays valid as long as it remains present in @msg. + + #GST_RTSP_OK when @field was found, #GST_RTSP_ENOTIMPL if the key +was not found. + + + + + a #GstRTSPMessage + + + + a #GstRTSPHeaderField + + + + pointer to hold the result + + + + the index of the header + + + + + + Get the message type of @msg. + + the message type. + + + + + a #GstRTSPMessage + + + + + + Initialize @msg. This function is mostly used when @msg is allocated on the +stack. The reverse operation of this is gst_rtsp_message_unset(). + + a #GstRTSPResult. + + + + + a #GstRTSPMessage + + + + + + Initialize a new data #GstRTSPMessage for @channel. + + a #GstRTSPResult. + + + + + a #GstRTSPMessage + + + + a channel + + + + + + Initialize @msg as a request message with @method and @uri. To clear @msg +again, use gst_rtsp_message_unset(). + + a #GstRTSPResult. + + + + + a #GstRTSPMessage + + + + the request method to use + + + + the uri of the request + + + + + + Initialize @msg with @code and @reason. + +When @reason is #NULL, the default reason for @code will be used. + +When @request is not #NULL, the relevant headers will be copied to the new +response message. + + a #GstRTSPResult. + + + + + a #GstRTSPMessage + + + + the status code + + + + the status reason or %NULL + + + + the request that triggered the response or %NULL + + + + + + Parses the credentials given in a WWW-Authenticate or Authorization header. + + %NULL-terminated array of GstRTSPAuthCredential or %NULL. + + + + + a #GstRTSPMessage + + + + a #GstRTSPHeaderField + + + + + + Parse the data message @msg and store the channel in @channel. + + a #GstRTSPResult. + + + + + a #GstRTSPMessage + + + + location to hold the channel + + + + + + Parse the request message @msg and store the values @method, @uri and +@version. The result locations can be #NULL if one is not interested in its +value. + +@uri remains valid for as long as @msg is valid and unchanged. + + a #GstRTSPResult. + + + + + a #GstRTSPMessage + + + + location to hold the method + + + + location to hold the uri + + + + location to hold the version + + + + + + Parse the response message @msg and store the values @code, @reason and +@version. The result locations can be #NULL if one is not interested in its +value. + +@reason remains valid for as long as @msg is valid and unchanged. + + a #GstRTSPResult. + + + + + a #GstRTSPMessage + + + + location to hold the status code + + + + location to hold the status reason + + + + location to hold the version + + + + + + Remove the @indx header with key @field from @msg. If @indx equals -1, all +headers will be removed. + + a #GstRTSPResult. + + + + + a #GstRTSPMessage + + + + a #GstRTSPHeaderField + + + + the index of the header + + + + + + Remove the @index header with key @header from @msg. If @index equals -1, +all matching headers will be removed. + + a #GstRTSPResult + + + + + a #GstRTSPMessage + + + + the header string + + + + the index of the header + + + + + + Set the body of @msg to a copy of @data. + + #GST_RTSP_OK. + + + + + a #GstRTSPMessage + + + + the data + + + + + + the size of @data + + + + + + Take the body of @msg and store it in @data and @size. After this method, +the body and size of @msg will be set to #NULL and 0 respectively. + + #GST_RTSP_OK. + + + + + a #GstRTSPMessage + + + + location for the data + + + + + + location for the size of @data + + + + + + Set the body of @msg to @data and @size. This method takes ownership of +@data. + + #GST_RTSP_OK. + + + + + a #GstRTSPMessage + + + + the data + + + + + + the size of @data + + + + + + Add a header with key @field and @value to @msg. This function takes +ownership of @value. + + a #GstRTSPResult. + + + + + a #GstRTSPMessage + + + + a #GstRTSPHeaderField + + + + the value of the header + + + + + + Add a header with key @header and @value to @msg. This function takes +ownership of @value, but not of @header. + + a #GstRTSPResult. + + + + + a #GstRTSPMessage + + + + a header string + + + + the value of the header + + + + + + Unset the contents of @msg so that it becomes an uninitialized +#GstRTSPMessage again. This function is mostly used in combination with +gst_rtsp_message_init_request(), gst_rtsp_message_init_response() and +gst_rtsp_message_init_data() on stack allocated #GstRTSPMessage structures. + + #GST_RTSP_OK. + + + + + a #GstRTSPMessage + + + + + + Create a new initialized #GstRTSPMessage. Free with gst_rtsp_message_free(). + + a #GstRTSPResult. + + + + + a location for the new #GstRTSPMessage + + + + + + Create a new data #GstRTSPMessage with @channel and store the +result message in @msg. Free with gst_rtsp_message_free(). + + a #GstRTSPResult. + + + + + a location for the new #GstRTSPMessage + + + + the channel + + + + + + Create a new #GstRTSPMessage with @method and @uri and store the result +request message in @msg. Free with gst_rtsp_message_free(). + + a #GstRTSPResult. + + + + + a location for the new #GstRTSPMessage + + + + the request method to use + + + + the uri of the request + + + + + + Create a new response #GstRTSPMessage with @code and @reason and store the +result message in @msg. Free with gst_rtsp_message_free(). + +When @reason is #NULL, the default reason for @code will be used. + +When @request is not #NULL, the relevant headers will be copied to the new +response message. + + a #GstRTSPResult. + + + + + a location for the new #GstRTSPMessage + + + + the status code + + + + the status reason or %NULL + + + + the request that triggered the response or %NULL + + + + + + + The different supported RTSP methods. + + invalid method + + + the DESCRIBE method + + + the ANNOUNCE method + + + the GET_PARAMETER method + + + the OPTIONS method + + + the PAUSE method + + + the PLAY method + + + the RECORD method + + + the REDIRECT method + + + the SETUP method + + + the SET_PARAMETER method + + + the TEARDOWN method + + + the GET method (HTTP). + + + the POST method (HTTP). + + + Convert @method to a string. + + a string representation of @method. + + + + + a #GstRTSPMethod + + + + + + + The type of a message. + + invalid message type + + + RTSP request message + + + RTSP response message + + + HTTP request message. + + + HTTP response message. + + + data message + + + + The transfer profile to use. + + invalid profile + + + the Audio/Visual profile (RFC 3551) + + + the secure Audio/Visual profile (RFC 3711) + + + the Audio/Visual profile with feedback (RFC 4585) + + + the secure Audio/Visual profile with feedback (RFC 5124) + + + + Provides helper functions to deal with time ranges. + + minimum value of the range + + + + maximum value of the range + + + + Converts the range in-place between different types of units. +Ranges containing the special value #GST_RTSP_TIME_NOW can not be +converted as these are only valid for #GST_RTSP_RANGE_NPT. + + %TRUE if the range could be converted + + + + + a #GstRTSPTimeRange + + + + the unit to convert the range into + + + + + + Free the memory allocated by @range. + + + + + + a #GstRTSPTimeRange + + + + + + Retrieve the minimum and maximum values from @range converted to +#GstClockTime in @min and @max. + +A value of %GST_CLOCK_TIME_NONE will be used to signal #GST_RTSP_TIME_NOW +and #GST_RTSP_TIME_END for @min and @max respectively. + +UTC times will be converted to nanoseconds since 1900. + + %TRUE on success. + + + + + a #GstRTSPTimeRange + + + + result minimum #GstClockTime + + + + result maximum #GstClockTime + + + + + + Parse @rangestr to a #GstRTSPTimeRange. + + #GST_RTSP_OK on success. + + + + + a range string to parse + + + + location to hold the #GstRTSPTimeRange result + + + + + + Convert @range into a string representation. + + The string representation of @range. g_free() after usage. + + + + + a #GstRTSPTimeRange + + + + + + + Different possible time range units. + + SMPTE timecode + + + 29.97 frames per second + + + 25 frames per second + + + Normal play time + + + Absolute time expressed as ISO 8601 timestamps + + + + Result codes from the RTSP functions. + + no error + + + some unspecified error occured + + + invalid arguments were provided to a function + + + an operation was canceled + + + no memory was available for the operation + + + a host resolve error occured + + + function not implemented + + + a system error occured, errno contains more details + + + a persing error occured + + + windows networking could not start + + + windows networking stack has wrong version + + + end-of-file was reached + + + a network problem occured, h_errno contains more details + + + the host is not an IP host + + + a timeout occured + + + the tunnel GET request has been performed + + + the tunnel POST request has been performed + + + last error + + + + The different RTSP states. + + invalid state + + + initializing + + + ready for operation + + + seeking in progress + + + playing + + + recording + + + + Enumeration of rtsp status codes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A time indication. + + the time of the time + + + + seconds when @type is GST_RTSP_TIME_SECONDS, + GST_RTSP_TIME_UTC and GST_RTSP_TIME_FRAMES + + + + + Extra fields for a time indication. + + frames and subframes when type in GstRTSPTime is + GST_RTSP_TIME_FRAMES + + + + year when type is GST_RTSP_TIME_UTC + + + + month when type is GST_RTSP_TIME_UTC + + + + day when type is GST_RTSP_TIME_UTC + + + + + A time range. + + the time units used + + + + the minimum interval + + + + the maximum interval + + + + extra fields in the minimum interval (Since: 1.2) + + + + extra fields in the maximum interval (Since: 1.2) + + + + + Possible time types. + + seconds + + + now + + + end + + + frames and subframes + + + UTC time + + + + The transfer mode to use. + + invalid tansport mode + + + transfer RTP data + + + transfer RDT (RealMedia) data + + + + Provides helper functions to deal with RTSP transport strings. + + the transport mode + + + + the tansport profile + + + + the lower transport + + + + the destination ip/hostname + + + + the source ip/hostname + + + + the number of layers + + + + if play mode was selected + + + + if record mode was selected + + + + is append mode was selected + + + + the interleave range + + + + the time to live for multicast UDP + + + + the port pair for multicast sessions + + + + the client port pair for receiving data. For TCP + based transports, applications can use this field to store the + sender and receiver ports of the client. + + + + the server port pair for receiving data. For TCP + based transports, applications can use this field to store the + sender and receiver ports of the server. + + + + the ssrc that the sender/receiver will use + + + + + + + + + Convert @transport into a string that can be used to signal the transport in +an RTSP SETUP response. + + a string describing the RTSP transport or #NULL when the transport +is invalid. + + + + + a #GstRTSPTransport + + + + + + Free the memory used by @transport. + + #GST_RTSP_OK. + + + + + a #GstRTSPTransport + + + + + + Get the media type of @transport. This media type is typically +used to generate #GstCaps events. + + #GST_RTSP_OK. + + + + + a #GstRTSPTransport + + + + media type of @transport + + + + + + Initialize @transport so that it can be used. + + #GST_RTSP_OK. + + + + + a #GstRTSPTransport + + + + + + Get the #GstElement that can handle the buffers transported over @trans. + +It is possible that there are several managers available, use @option to +selected one. + +@manager will contain an element name or #NULL when no manager is +needed/available for @trans. + + #GST_RTSP_OK. + + + + + a #GstRTSPTransMode + + + + location to hold the result + + + + option index. + + + + + + Get the mime type of the transport mode @trans. This mime type is typically +used to generate #GstCaps events. + This functions only deals with the GstRTSPTransMode and only + returns the mime type for #GST_RTSP_PROFILE_AVP. Use + gst_rtsp_transport_get_media_type() instead. + + #GST_RTSP_OK. + + + + + a #GstRTSPTransMode + + + + location to hold the result + + + + + + Allocate a new initialized #GstRTSPTransport. Use gst_rtsp_transport_free() +after usage. + + a #GstRTSPResult. + + + + + location to hold the new #GstRTSPTransport + + + + + + Parse the RTSP transport string @str into @transport. + + a #GstRTSPResult. + + + + + a transport string + + + + a #GstRTSPTransport + + + + + + + Provides helper functions to handle RTSP urls. + + the transports allowed + + + + the family + + + + the user + + + + the password + + + + the host + + + + the port + + + + the absolute path + + + + additional query parameters + + + + Make a copy of @url. + + a copy of @url. Free with gst_rtsp_url_free () after usage. + + + + + a #GstRTSPUrl + + + + + + Splits the path of @url on '/' boundaries, decoding the resulting components, + +The decoding performed by this routine is "URI decoding", as defined in RFC +3986, commonly known as percent-decoding. For example, a string "foo\%2fbar" +will decode to "foo/bar" -- the \%2f being replaced by the corresponding byte +with hex value 0x2f. Note that there is no guarantee that the resulting byte +sequence is valid in any given encoding. As a special case, \%00 is not +unescaped to NUL, as that would prematurely terminate the string. + +Also note that since paths usually start with a slash, the first component +will usually be the empty string. + + %NULL-terminated array of URL components. Free with +g_strfreev() when no longer needed. + + + + + + + a #GstRTSPUrl + + + + + + Free the memory used by @url. + + + + + + a #GstRTSPUrl + + + + + + Get the port number of @url. + + #GST_RTSP_OK. + + + + + a #GstRTSPUrl + + + + location to hold the port + + + + + + Get a newly allocated string describing the request URI for @url. + + a string with the request URI. g_free() after usage. + + + + + a #GstRTSPUrl + + + + + + Set the port number in @url to @port. + + #GST_RTSP_OK. + + + + + a #GstRTSPUrl + + + + the port + + + + + + Parse the RTSP @urlstr into a newly allocated #GstRTSPUrl. Free after usage +with gst_rtsp_url_free(). + + a #GstRTSPResult. + + + + + the url string to parse + + + + location to hold the result. + + + + + + + The supported RTSP versions. + + unknown/invalid version + + + version 1.0 + + + version 1.1. + + + Convert @version to a string. + + a string representation of @version. + + + + + a #GstRTSPVersion + + + + + + + Opaque RTSP watch object that can be used for asynchronous RTSP +operations. + + Adds a #GstRTSPWatch to a context so that it will be executed within that context. + + the ID (greater than 0) for the watch within the GMainContext. + + + + + a #GstRTSPWatch + + + + a GMainContext (if NULL, the default context will be used) + + + + + + Get the maximum amount of bytes and messages that will be queued in @watch. +See gst_rtsp_watch_set_send_backlog(). + + + + + + a #GstRTSPWatch + + + + maximum bytes + + + + maximum messages + + + + + + Reset @watch, this is usually called after gst_rtsp_connection_do_tunnel() +when the file descriptors of the connection might have changed. + + + + + + a #GstRTSPWatch + + + + + + Send a @message using the connection of the @watch. If it cannot be sent +immediately, it will be queued for transmission in @watch. The contents of +@message will then be serialized and transmitted when the connection of the +@watch becomes writable. In case the @message is queued, the ID returned in +@id will be non-zero and used as the ID argument in the message_sent +callback. + + #GST_RTSP_OK on success. + + + + + a #GstRTSPWatch + + + + a #GstRTSPMessage + + + + location for a message ID or %NULL + + + + + + When @flushing is %TRUE, abort a call to gst_rtsp_watch_wait_backlog() +and make sure gst_rtsp_watch_write_data() returns immediately with +#GST_RTSP_EINTR. And empty the queue. + + + + + + a #GstRTSPWatch + + + + new flushing state + + + + + + Set the maximum amount of bytes and messages that will be queued in @watch. +When the maximum amounts are exceeded, gst_rtsp_watch_write_data() and +gst_rtsp_watch_send_message() will return #GST_RTSP_ENOMEM. + +A value of 0 for @bytes or @messages means no limits. + + + + + + a #GstRTSPWatch + + + + maximum bytes + + + + maximum messages + + + + + + Decreases the reference count of @watch by one. If the resulting reference +count is zero the watch and associated memory will be destroyed. + + + + + + a #GstRTSPWatch + + + + + + Wait until there is place in the backlog queue, @timeout is reached +or @watch is set to flushing. + +If @timeout is %NULL this function can block forever. If @timeout +contains a valid timeout, this function will return %GST_RTSP_ETIMEOUT +after the timeout expired. + +The typically use of this function is when gst_rtsp_watch_write_data +returns %GST_RTSP_ENOMEM. The caller then calls this function to wait for +free space in the backlog queue and try again. + + %GST_RTSP_OK when if there is room in queue. + %GST_RTSP_ETIMEOUT when @timeout was reached. + %GST_RTSP_EINTR when @watch is flushing + %GST_RTSP_EINVAL when called with invalid parameters. + + + + + a #GstRTSPWatch + + + + a #GTimeVal timeout + + + + + + Write @data using the connection of the @watch. If it cannot be sent +immediately, it will be queued for transmission in @watch. The contents of +@message will then be serialized and transmitted when the connection of the +@watch becomes writable. In case the @message is queued, the ID returned in +@id will be non-zero and used as the ID argument in the message_sent +callback. + +This function will take ownership of @data and g_free() it after use. + +If the amount of queued data exceeds the limits set with +gst_rtsp_watch_set_send_backlog(), this function will return +#GST_RTSP_ENOMEM. + + #GST_RTSP_OK on success. #GST_RTSP_ENOMEM when the backlog limits +are reached. #GST_RTSP_EINTR when @watch was flushing. + + + + + a #GstRTSPWatch + + + + the data to queue + + + + + + the size of @data + + + + location for a message ID or %NULL + + + + + + Create a watch object for @conn. The functions provided in @funcs will be +called with @user_data when activity happened on the watch. + +The new watch is usually created so that it can be attached to a +maincontext with gst_rtsp_watch_attach(). + +@conn must exist for the entire lifetime of the watch. + + a #GstRTSPWatch that can be used for asynchronous RTSP +communication. Free with gst_rtsp_watch_unref () after usage. + + + + + a #GstRTSPConnection + + + + watch functions + + + + user data to pass to @funcs + + + + notify when @user_data is not referenced anymore + + + + + + + Callback functions from a #GstRTSPWatch. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The default RTSP port to connect to. + + + + Free a %NULL-terminated array of credentials returned from +gst_rtsp_message_parse_auth_credentials(). + + + + + + a %NULL-terminated array of #GstRTSPAuthCredential + + + + + + Accept a new connection on @socket and create a new #GstRTSPConnection for +handling communication on new socket. + + #GST_RTSP_OK when @conn contains a valid connection. + + + + + a socket + + + + storage for a #GstRTSPConnection + + + + a #GCancellable to cancel the operation + + + + + + Create a newly allocated #GstRTSPConnection from @url and store it in @conn. +The connection will not yet attempt to connect to @url, use +gst_rtsp_connection_connect(). + +A copy of @url will be made. + + #GST_RTSP_OK when @conn contains a valid connection. + + + + + a #GstRTSPUrl + + + + storage for a #GstRTSPConnection + + + + + + Create a new #GstRTSPConnection for handling communication on the existing +socket @socket. The @initial_buffer contains zero terminated data already +read from @socket which should be used before starting to read new data. + + #GST_RTSP_OK when @conn contains a valid connection. + + + + + a #GSocket + + + + the IP address of the other end + + + + the port used by the other end + + + + data already read from @fd + + + + storage for a #GstRTSPConnection + + + + + + Convert @header to a #GstRTSPHeaderField. + + a #GstRTSPHeaderField for @header or #GST_RTSP_HDR_INVALID if the +header field is unknown. + + + + + a header string + + + + + + Convert @method to a #GstRTSPMethod. + + a #GstRTSPMethod for @method or #GST_RTSP_INVALID if the +method is unknown. + + + + + a method + + + + + + Calculates the digest auth response from the values given by the server and +the username and password. See RFC2069 for details. + +Currently only supported algorithm "md5". + + Authentication response or %NULL if unsupported + + + + + Hash algorithm to use, or %NULL for MD5 + + + + Request method, e.g. PLAY + + + + Realm + + + + Username + + + + Password + + + + Original request URI + + + + Nonce + + + + + + Check whether @field may appear multiple times in a message. + + %TRUE if multiple headers are allowed. + + + + + a #GstRTSPHeaderField + + + + + + Convert @field to a string. + + a string representation of @field. + + + + + a #GstRTSPHeaderField + + + + + + Create a new initialized #GstRTSPMessage. Free with gst_rtsp_message_free(). + + a #GstRTSPResult. + + + + + a location for the new #GstRTSPMessage + + + + + + Create a new data #GstRTSPMessage with @channel and store the +result message in @msg. Free with gst_rtsp_message_free(). + + a #GstRTSPResult. + + + + + a location for the new #GstRTSPMessage + + + + the channel + + + + + + Create a new #GstRTSPMessage with @method and @uri and store the result +request message in @msg. Free with gst_rtsp_message_free(). + + a #GstRTSPResult. + + + + + a location for the new #GstRTSPMessage + + + + the request method to use + + + + the uri of the request + + + + + + Create a new response #GstRTSPMessage with @code and @reason and store the +result message in @msg. Free with gst_rtsp_message_free(). + +When @reason is #NULL, the default reason for @code will be used. + +When @request is not #NULL, the relevant headers will be copied to the new +response message. + + a #GstRTSPResult. + + + + + a location for the new #GstRTSPMessage + + + + the status code + + + + the status reason or %NULL + + + + the request that triggered the response or %NULL + + + + + + Convert @method to a string. + + a string representation of @method. + + + + + a #GstRTSPMethod + + + + + + Convert @options to a string. + + a new string of @options. g_free() after usage. + + + + + one or more #GstRTSPMethod + + + + + + Convert the comma separated list @options to a #GstRTSPMethod bitwise or +of methods. This functions is the reverse of gst_rtsp_options_as_text(). + + a #GstRTSPMethod + + + + + a comma separated list of options + + + + + + Converts the range in-place between different types of units. +Ranges containing the special value #GST_RTSP_TIME_NOW can not be +converted as these are only valid for #GST_RTSP_RANGE_NPT. + + %TRUE if the range could be converted + + + + + a #GstRTSPTimeRange + + + + the unit to convert the range into + + + + + + Free the memory allocated by @range. + + + + + + a #GstRTSPTimeRange + + + + + + Retrieve the minimum and maximum values from @range converted to +#GstClockTime in @min and @max. + +A value of %GST_CLOCK_TIME_NONE will be used to signal #GST_RTSP_TIME_NOW +and #GST_RTSP_TIME_END for @min and @max respectively. + +UTC times will be converted to nanoseconds since 1900. + + %TRUE on success. + + + + + a #GstRTSPTimeRange + + + + result minimum #GstClockTime + + + + result maximum #GstClockTime + + + + + + Parse @rangestr to a #GstRTSPTimeRange. + + #GST_RTSP_OK on success. + + + + + a range string to parse + + + + location to hold the #GstRTSPTimeRange result + + + + + + Convert @range into a string representation. + + The string representation of @range. g_free() after usage. + + + + + a #GstRTSPTimeRange + + + + + + Convert @code to a string. + + a string representation of @code. + + + + + a #GstRTSPStatusCode + + + + + + Convert @result in a human readable string. + + a newly allocated string. g_free() after usage. + + + + + a #GstRTSPResult + + + + + + Get the #GstElement that can handle the buffers transported over @trans. + +It is possible that there are several managers available, use @option to +selected one. + +@manager will contain an element name or #NULL when no manager is +needed/available for @trans. + + #GST_RTSP_OK. + + + + + a #GstRTSPTransMode + + + + location to hold the result + + + + option index. + + + + + + Get the mime type of the transport mode @trans. This mime type is typically +used to generate #GstCaps events. + This functions only deals with the GstRTSPTransMode and only + returns the mime type for #GST_RTSP_PROFILE_AVP. Use + gst_rtsp_transport_get_media_type() instead. + + #GST_RTSP_OK. + + + + + a #GstRTSPTransMode + + + + location to hold the result + + + + + + Allocate a new initialized #GstRTSPTransport. Use gst_rtsp_transport_free() +after usage. + + a #GstRTSPResult. + + + + + location to hold the new #GstRTSPTransport + + + + + + Parse the RTSP transport string @str into @transport. + + a #GstRTSPResult. + + + + + a transport string + + + + a #GstRTSPTransport + + + + + + Parse the RTSP @urlstr into a newly allocated #GstRTSPUrl. Free after usage +with gst_rtsp_url_free(). + + a #GstRTSPResult. + + + + + the url string to parse + + + + location to hold the result. + + + + + + Convert @version to a string. + + a string representation of @version. + + + + + a #GstRTSPVersion + + + + + + Create a watch object for @conn. The functions provided in @funcs will be +called with @user_data when activity happened on the watch. + +The new watch is usually created so that it can be attached to a +maincontext with gst_rtsp_watch_attach(). + +@conn must exist for the entire lifetime of the watch. + + a #GstRTSPWatch that can be used for asynchronous RTSP +communication. Free with gst_rtsp_watch_unref () after usage. + + + + + a #GstRTSPConnection + + + + watch functions + + + + user data to pass to @funcs + + + + notify when @user_data is not referenced anymore + + + + + + diff --git a/gir-files/GstRtspServer-1.0.gir b/gir-files/GstRtspServer-1.0.gir new file mode 100644 index 000000000..e8cc92b21 --- /dev/null +++ b/gir-files/GstRtspServer-1.0.gir @@ -0,0 +1,9497 @@ + + + + + + + + + + + An address + + the #GstRTSPAddressPool owner of this address + + + + the address + + + + the port number + + + + number of ports + + + + TTL or 0 for unicast addresses + + + + + + + Make a copy of @addr. + + a copy of @addr. + + + + + a #GstRTSPAddress + + + + + + Free @addr and releasing it back into the pool when owned by a +pool. + + + + + + a #GstRTSPAddress + + + + + + + Flags used to control allocation of addresses + + no flags + + + an IPv4 address + + + and IPv6 address + + + address with an even port + + + a multicast address + + + a unicast address + + + + An address pool, all member are private + + Make a new #GstRTSPAddressPool. + + a new #GstRTSPAddressPool + + + + + Take an address and ports from @pool. @flags can be used to control the +allocation. @n_ports consecutive ports will be allocated of which the first +one can be found in @port. + + a #GstRTSPAddress that should be freed with +gst_rtsp_address_free after use or %NULL when no address could be +acquired. + + + + + a #GstRTSPAddressPool + + + + flags + + + + the amount of ports + + + + + + Adds the addresses from @min_addess to @max_address (inclusive) +to @pool. The valid port range for the addresses will be from @min_port to +@max_port inclusive. + +When @ttl is 0, @min_address and @max_address should be unicast addresses. +@min_address and @max_address can be set to +#GST_RTSP_ADDRESS_POOL_ANY_IPV4 or #GST_RTSP_ADDRESS_POOL_ANY_IPV6 to bind +to all available IPv4 or IPv6 addresses. + +When @ttl > 0, @min_address and @max_address should be multicast addresses. + + %TRUE if the addresses could be added. + + + + + a #GstRTSPAddressPool + + + + a minimum address to add + + + + a maximum address to add + + + + the minimum port + + + + the maximum port + + + + a TTL or 0 for unicast addresses + + + + + + Clear all addresses in @pool. There should be no outstanding +allocations. + + + + + + a #GstRTSPAddressPool + + + + + + Dump the free and allocated addresses to stdout. + + + + + + a #GstRTSPAddressPool + + + + + + Used to know if the pool includes any unicast addresses. + + %TRUE if the pool includes any unicast addresses, %FALSE otherwise + + + + + a #GstRTSPAddressPool + + + + + + Take a specific address and ports from @pool. @n_ports consecutive +ports will be allocated of which the first one can be found in +@port. + +If @ttl is 0, @address should be a unicast address. If @ttl > 0, @address +should be a valid multicast address. + + #GST_RTSP_ADDRESS_POOL_OK if an address was reserved. The address +is returned in @address and should be freed with gst_rtsp_address_free +after use. + + + + + a #GstRTSPAddressPool + + + + The IP address to reserve + + + + The first port to reserve + + + + The number of ports + + + + The requested ttl + + + + storage for a #GstRTSPAddress + + + + + + the parent GObject + + + + + + + + + + + + + Opaque Address pool class. + + + + + + + + + + + + + Result codes from RTSP address pool functions. + + no error + + + invalid arguments were provided to a function + + + the addres has already been reserved + + + the address is not in the pool + + + last error + + + + The authentication structure. + + Create a new #GstRTSPAuth instance. + + a new #GstRTSPAuth + + + + + Check if @check is allowed in the current context. + + FALSE if check failed. + + + + + the item to check + + + + + + Construct a Basic authorisation token from @user and @pass. + + the base64 encoding of the string @user:@pass. +g_free() after usage. + + + + + a userid + + + + a password + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Add a basic token for the default authentication algorithm that +enables the client with privileges listed in @token. + + + + + + a #GstRTSPAuth + + + + the basic token + + + + authorisation token + + + + + + Add a digest @user and @pass for the default authentication algorithm that +enables the client with privileges listed in @token. + + + + + + a #GstRTSPAuth + + + + the digest user name + + + + the digest password + + + + authorisation token + + + + + + Get the default token for @auth. This token will be used for unauthenticated +users. + + the #GstRTSPToken of @auth. gst_rtsp_token_unref() after +usage. + + + + + a #GstRTSPAuth + + + + + + Gets the supported authentication methods of @auth. + + The supported authentication methods + + + + + a #GstRTSPAuth + + + + + + Get the #GTlsAuthenticationMode. + + the #GTlsAuthenticationMode. + + + + + a #GstRTSPAuth + + + + + + Get the #GTlsCertificate used for negotiating TLS @auth. + + the #GTlsCertificate of @auth. g_object_unref() after +usage. + + + + + a #GstRTSPAuth + + + + + + Get the #GTlsDatabase used for verifying client certificate. + + the #GTlsDatabase of @auth. g_object_unref() after +usage. + + + + + a #GstRTSPAuth + + + + + + Removes @basic authentication token. + + + + + + a #GstRTSPAuth + + + + the basic token + + + + + + Removes a digest user. + + + + + + a #GstRTSPAuth + + + + the digest user name + + + + + + Set the default #GstRTSPToken to @token in @auth. The default token will +be used for unauthenticated users. + + + + + + a #GstRTSPAuth + + + + a #GstRTSPToken + + + + + + Sets the supported authentication @methods for @auth. + + + + + + a #GstRTSPAuth + + + + supported methods + + + + + + The #GTlsAuthenticationMode to set on the underlying GTlsServerConnection. +When set to another value than %G_TLS_AUTHENTICATION_NONE, +#GstRTSPAuth::accept-certificate signal will be emitted and must be handled. + + + + + + a #GstRTSPAuth + + + + a #GTlsAuthenticationMode + + + + + + Set the TLS certificate for the auth. Client connections will only +be accepted when TLS is negotiated. + + + + + + a #GstRTSPAuth + + + + a #GTlsCertificate + + + + + + Sets the certificate database that is used to verify peer certificates. +If set to %NULL (the default), then peer certificate validation will always +set the %G_TLS_CERTIFICATE_UNKNOWN_CA error. + +Since 1.6 + + + + + + a #GstRTSPAuth + + + + a #GTlsDatabase + + + + + + + + + + + + + + + + + Emitted during the TLS handshake after the client certificate has +been received. See also gst_rtsp_auth_set_tls_authentication_mode(). + + %TRUE to accept @peer_cert (which will also +immediately end the signal emission). %FALSE to allow the signal +emission to continue, which will cause the handshake to fail if +no one else overrides it. + + + + + a #GTlsConnection + + + + the peer's #GTlsCertificate + + + + the problems with @peer_cert. + + + + + + + The authentication class. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The client object represents the connection and its state with a client. + + Create a new #GstRTSPClient instance. + + a new #GstRTSPClient + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Attaches @client to @context. When the mainloop for @context is run, the +client will be dispatched. When @context is %NULL, the default context will be +used). + +This function should be called when the client properties and urls are fully +configured and the client is ready to start. + + the ID (greater than 0) for the source within the GMainContext. + + + + + a #GstRTSPClient + + + + a #GMainContext + + + + + + Close the connection of @client and remove all media it was managing. + + + + + + a #GstRTSPClient + + + + + + Get the #GstRTSPAuth used as the authentication manager of @client. + + the #GstRTSPAuth of @client. g_object_unref() after +usage. + + + + + a #GstRTSPClient + + + + + + Get the #GstRTSPConnection of @client. + + the #GstRTSPConnection of @client. +The connection object returned remains valid until the client is freed. + + + + + a #GstRTSPClient + + + + + + Get the #GstRTSPMountPoints object that @client uses to manage its sessions. + + a #GstRTSPMountPoints, unref after usage. + + + + + a #GstRTSPClient + + + + + + Get the #GstRTSPSessionPool object that @client uses to manage its sessions. + + a #GstRTSPSessionPool, unref after usage. + + + + + a #GstRTSPClient + + + + + + Get the #GstRTSPThreadPool used as the thread pool of @client. + + the #GstRTSPThreadPool of @client. g_object_unref() after +usage. + + + + + a #GstRTSPClient + + + + + + Let the client handle @message. + + a #GstRTSPResult. + + + + + a #GstRTSPClient + + + + an #GstRTSPMessage + + + + + + Send a message message to the remote end. @message must be a +#GST_RTSP_MESSAGE_REQUEST or a #GST_RTSP_MESSAGE_RESPONSE. + + + + + + a #GstRTSPClient + + + + a #GstRTSPSession to send + the message to or %NULL + + + + The #GstRTSPMessage to send + + + + + + Call @func for each session managed by @client. The result value of @func +determines what happens to the session. @func will be called with @client +locked so no further actions on @client can be performed from @func. + +If @func returns #GST_RTSP_FILTER_REMOVE, the session will be removed from +@client. + +If @func returns #GST_RTSP_FILTER_KEEP, the session will remain in @client. + +If @func returns #GST_RTSP_FILTER_REF, the session will remain in @client but +will also be added with an additional ref to the result #GList of this +function.. + +When @func is %NULL, #GST_RTSP_FILTER_REF will be assumed for each session. + + a #GList with all +sessions for which @func returned #GST_RTSP_FILTER_REF. After usage, each +element in the #GList should be unreffed before the list is freed. + + + + + + + a #GstRTSPClient + + + + a callback + + + + user data passed to @func + + + + + + configure @auth to be used as the authentication manager of @client. + + + + + + a #GstRTSPClient + + + + a #GstRTSPAuth + + + + + + Set the #GstRTSPConnection of @client. This function takes ownership of +@conn. + + %TRUE on success. + + + + + a #GstRTSPClient + + + + a #GstRTSPConnection + + + + + + Set @mounts as the mount points for @client which it will use to map urls +to media streams. These mount points are usually inherited from the server that +created the client but can be overriden later. + + + + + + a #GstRTSPClient + + + + a #GstRTSPMountPoints + + + + + + Set @func as the callback that will be called when a new message needs to be +sent to the client. @user_data is passed to @func and @notify is called when +@user_data is no longer in use. + +By default, the client will send the messages on the #GstRTSPConnection that +was configured with gst_rtsp_client_attach() was called. + + + + + + a #GstRTSPClient + + + + a #GstRTSPClientSendFunc + + + + user data passed to @func + + + + called when @user_data is no longer in use + + + + + + Set @pool as the sessionpool for @client which it will use to find +or allocate sessions. the sessionpool is usually inherited from the server +that created the client but can be overridden later. + + + + + + a #GstRTSPClient + + + + a #GstRTSPSessionPool + + + + + + configure @pool to be used as the thread pool of @client. + + + + + + a #GstRTSPClient + + + + a #GstRTSPThreadPool + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + a #GstRTSPContext + + + + + + + a newly allocated string with comma-separated list of + unsupported options. An empty string must be returned if + all options are supported. + + + + + a #GstRTSPContext + + + + a NULL-terminated array of strings + + + + + + + + + + + + + + + + + + a #GstRTSPContext + + + + + + + + + + + a #GstRTSPContext + + + + + + + + + + + a #GstRTSPContext + + + + + + + + + + + + + + + + + + + + + a #GstRTSPContext + + + + + + + + + + + a #GstRTSPContext + + + + + + + + + + + a #GstRTSPContext + + + + + + + a #GstRTSPStatusCode, GST_RTSP_STS_OK in case of success, + otherwise an appropriate return code + + + + + a #GstRTSPContext + + + + + + + a #GstRTSPStatusCode, GST_RTSP_STS_OK in case of success, + otherwise an appropriate return code + + + + + a #GstRTSPContext + + + + + + + a #GstRTSPStatusCode, GST_RTSP_STS_OK in case of success, + otherwise an appropriate return code + + + + + a #GstRTSPContext + + + + + + + a #GstRTSPStatusCode, GST_RTSP_STS_OK in case of success, + otherwise an appropriate return code + + + + + a #GstRTSPContext + + + + + + + a #GstRTSPStatusCode, GST_RTSP_STS_OK in case of success, + otherwise an appropriate return code + + + + + a #GstRTSPContext + + + + + + + a #GstRTSPStatusCode, GST_RTSP_STS_OK in case of success, + otherwise an appropriate return code + + + + + a #GstRTSPContext + + + + + + + a #GstRTSPStatusCode, GST_RTSP_STS_OK in case of success, + otherwise an appropriate return code + + + + + a #GstRTSPContext + + + + + + + a #GstRTSPStatusCode, GST_RTSP_STS_OK in case of success, + otherwise an appropriate return code + + + + + a #GstRTSPContext + + + + + + + a #GstRTSPStatusCode, GST_RTSP_STS_OK in case of success, + otherwise an appropriate return code + + + + + a #GstRTSPContext + + + + + + + a #GstRTSPStatusCode, GST_RTSP_STS_OK in case of success, + otherwise an appropriate return code + + + + + a #GstRTSPContext + + + + + + + + + + + a #GstRTSPContext + + + + + + + + + + + The session + + + + The message + + + + + + + + + + + a #GstRTSPContext + + + + + + + + + + + a #GstRTSPContext + + + + + + + + + + + a #GstRTSPContext + + + + + + + The client class structure. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This callback is called when @client wants to send @message. When @close is +%TRUE, the connection should be closed when the message has been sent. + + %TRUE on success. + + + + + a #GstRTSPClient + + + + a #GstRTSPMessage + + + + close the connection + + + + user data when registering the callback + + + + + + This function will be called by the gst_rtsp_client_session_filter(). An +implementation should return a value of #GstRTSPFilterResult. + +When this function returns #GST_RTSP_FILTER_REMOVE, @sess will be removed +from @client. + +A return value of #GST_RTSP_FILTER_KEEP will leave @sess untouched in +@client. + +A value of #GST_RTSP_FILTER_REF will add @sess to the result #GList of +gst_rtsp_client_session_filter(). + + a #GstRTSPFilterResult. + + + + + a #GstRTSPClient object + + + + a #GstRTSPSession in @client + + + + user data that has been given to gst_rtsp_client_session_filter() + + + + + + Information passed around containing the context of a request. + + the server + + + + the connection + + + + the client + + + + the complete request + + + + the complete url parsed from @request + + + + the parsed method of @uri + + + + the current auth object or %NULL + + + + authorisation token + + + + the session, can be %NULL + + + + the session media for the url can be %NULL + + + + the media factory for the url, can be %NULL + + + + the media for the url can be %NULL + + + + the stream for the url can be %NULL + + + + the response + + + + the stream transport, can be %NULL + + + + + + + + + Pops @ctx off the context stack (verifying that @ctx +is on the top of the stack). + + + + + + a #GstRTSPContext + + + + + + Pushes @ctx onto the context stack. The current +context can then be received using gst_rtsp_context_get_current(). + + + + + + a ##GstRTSPContext + + + + + + Get the current #GstRTSPContext. This object is retrieved from the +current thread that is handling the request for a client. + + a #GstRTSPContext + + + + + + Possible return values for gst_rtsp_session_pool_filter(). + + Remove session + + + Keep session in the pool + + + Ref session in the result list + + + + Function registered with gst_rtsp_stream_transport_set_keepalive() and called +when the stream is active. + + + + + + user data + + + + + + A class that contains the GStreamer element along with a list of +#GstRTSPStream objects that can produce data. + +This object is usually created from a #GstRTSPMediaFactory. + + Create a new #GstRTSPMedia instance. @element is the bin element that +provides the different streams. The #GstRTSPMedia object contains the +element to produce RTP data for one or more related (audio/video/..) +streams. + +Ownership is taken of @element. + + a new #GstRTSPMedia object. + + + + + a #GstElement + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Configure an SDP on @media for receiving streams + + TRUE on success. + + + + + a #GstRTSPMedia + + + + a #GstSDPMessage + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Prepare @media for streaming. This function will create the objects +to manage the streaming. A pipeline must have been set on @media with +gst_rtsp_media_take_pipeline(). + +It will preroll the pipeline and collect vital information about the streams +such as the duration. + + %TRUE on success. + + + + + a #GstRTSPMedia + + + + a #GstRTSPThread to run the + bus handler or %NULL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Add @media specific info to @sdp. @info is used to configure the connection +information in the SDP. + + TRUE on success. + + + + + a #GstRTSPMedia + + + + a #GstSDPMessage + + + + a #GstSDPInfo + + + + + + Suspend @media. The state of the pipeline managed by @media is set to +GST_STATE_NULL but all streams are kept. @media can be prepared again +with gst_rtsp_media_unsuspend() + +@media must be prepared with gst_rtsp_media_prepare(); + + %TRUE on success. + + + + + a #GstRTSPMedia + + + + + + + + + + + + + + + + + + + Unprepare @media. After this call, the media should be prepared again before +it can be used again. If the media is set to be non-reusable, a new instance +must be created. + + %TRUE on success. + + + + + a #GstRTSPMedia + + + + + + + + + + + + + + + + Unsuspend @media if it was in a suspended state. This method does nothing +when the media was not in the suspended state. + + %TRUE on success. + + + + + a #GstRTSPMedia + + + + + + Find all payloader elements, they should be named pay\%d in the +element of @media, and create #GstRTSPStreams for them. + +Collect all dynamic elements, named dynpay\%d, and add them to +the list of dynamic elements. + +Find all depayloader elements, they should be named depay\%d in the +element of @media, and create #GstRTSPStreams for them. + + + + + + a #GstRTSPMedia + + + + + + Create a new stream in @media that provides RTP data on @pad. +@pad should be a pad of an element inside @media->element. + + a new #GstRTSPStream that remains valid for as long +as @media exists. + + + + + a #GstRTSPMedia + + + + a #GstElement + + + + a #GstPad + + + + + + Find a stream in @media with @control as the control uri. + + the #GstRTSPStream with +control uri @control or %NULL when a stream with that control did +not exist. + + + + + a #GstRTSPMedia + + + + the control of the stream + + + + + + Get the #GstRTSPAddressPool used as the address pool of @media. + + the #GstRTSPAddressPool of @media. g_object_unref() after +usage. + + + + + a #GstRTSPMedia + + + + + + Get the base_time that is used by the pipeline in @media. + +@media must be prepared before this method returns a valid base_time. + + the base_time used by @media. + + + + + a #GstRTSPMedia + + + + + + Get the kernel UDP buffer size. + + the kernel UDP buffer size. + + + + + a #GstRTSPMedia + + + + + + Get the clock that is used by the pipeline in @media. + +@media must be prepared before this method returns a valid clock object. + + the #GstClock used by @media. unref after usage. + + + + + a #GstRTSPMedia + + + + + + Get the element that was used when constructing @media. + + a #GstElement. Unref after usage. + + + + + a #GstRTSPMedia + + + + + + Get the latency that is used for receiving media. + + latency in milliseconds + + + + + a #GstRTSPMedia + + + + + + Get the multicast interface used for @media. + + the multicast interface for @media. g_free() after +usage. + + + + + a #GstRTSPMedia + + + + + + Get the permissions object from @media. + + a #GstRTSPPermissions object, unref after usage. + + + + + a #GstRTSPMedia + + + + + + Get the allowed profiles of @media. + + a #GstRTSPProfile + + + + + a #GstRTSPMedia + + + + + + Get the allowed protocols of @media. + + a #GstRTSPLowerTrans + + + + + a #GstRTSPMedia + + + + + + Gets if and how the media clock should be published according to RFC7273. + + The GstRTSPPublishClockMode + + + + + a #GstRTSPMedia + + + + + + Get the current range as a string. @media must be prepared with +gst_rtsp_media_prepare (). + + The range as a string, g_free() after usage. + + + + + a #GstRTSPMedia + + + + for the PLAY request + + + + the unit to use for the string + + + + + + Get the amount of time to store retransmission data. + + the amount of time to store retransmission data. + + + + + a #GstRTSPMedia + + + + + + Get the status of @media. When @media is busy preparing, this function waits +until @media is prepared or in error. + + the status of @media. + + + + + a #GstRTSPMedia + + + + + + Retrieve the stream with index @idx from @media. + + the #GstRTSPStream at index +@idx or %NULL when a stream with that index did not exist. + + + + + a #GstRTSPMedia + + + + the stream index + + + + + + Get how @media will be suspended. + + #GstRTSPSuspendMode. + + + + + a #GstRTSPMedia + + + + + + Get the #GstNetTimeProvider for the clock used by @media. The time provider +will listen on @address and @port for client time requests. + + the #GstNetTimeProvider of @media. + + + + + a #GstRTSPMedia + + + + an address or %NULL + + + + a port or 0 + + + + + + Check if the pipeline for @media can be used for PLAY or RECORD methods. + + The transport mode. + + + + + a #GstRTSPMedia + + + + + + Configure an SDP on @media for receiving streams + + TRUE on success. + + + + + a #GstRTSPMedia + + + + a #GstSDPMessage + + + + + + Check if the pipeline for @media will send an EOS down the pipeline before +unpreparing. + + %TRUE if the media will send EOS before unpreparing. + + + + + a #GstRTSPMedia + + + + + + Check if the pipeline for @media can be reused after an unprepare. + + %TRUE if the media can be reused + + + + + a #GstRTSPMedia + + + + + + Check if the pipeline for @media can be shared between multiple clients. + + %TRUE if the media can be shared between clients. + + + + + a #GstRTSPMedia + + + + + + Check if the pipeline for @media will be stopped when a client disconnects +without sending TEARDOWN. + + %TRUE if the media will be stopped when a client disconnects + without sending TEARDOWN. + + + + + a #GstRTSPMedia + + + + + + Check if @media can provide a #GstNetTimeProvider for its pipeline clock. + +Use gst_rtsp_media_get_time_provider() to get the network clock. + + %TRUE if @media can provide a #GstNetTimeProvider. + + + + + a #GstRTSPMedia + + + + + + Get the number of streams in this media. + + The number of streams. + + + + + a #GstRTSPMedia + + + + + + Prepare @media for streaming. This function will create the objects +to manage the streaming. A pipeline must have been set on @media with +gst_rtsp_media_take_pipeline(). + +It will preroll the pipeline and collect vital information about the streams +such as the duration. + + %TRUE on success. + + + + + a #GstRTSPMedia + + + + a #GstRTSPThread to run the + bus handler or %NULL + + + + + + Seek the pipeline of @media to @range. @media must be prepared with +gst_rtsp_media_prepare(). + + %TRUE on success. + + + + + a #GstRTSPMedia + + + + a #GstRTSPTimeRange + + + + + + configure @pool to be used as the address pool of @media. + + + + + + a #GstRTSPMedia + + + + a #GstRTSPAddressPool + + + + + + Set the kernel UDP buffer size. + + + + + + a #GstRTSPMedia + + + + the new value + + + + + + Configure the clock used for the media. + + + + + + a #GstRTSPMedia + + + + #GstClock to be used + + + + + + Set or unset if an EOS event will be sent to the pipeline for @media before +it is unprepared. + + + + + + a #GstRTSPMedia + + + + the new value + + + + + + Configure the latency used for receiving media. + + + + + + a #GstRTSPMedia + + + + latency in milliseconds + + + + + + configure @multicast_iface to be used for @media. + + + + + + a #GstRTSPMedia + + + + a multicast interface name + + + + + + Set @permissions on @media. + + + + + + a #GstRTSPMedia + + + + a #GstRTSPPermissions + + + + + + Set the state of the pipeline managed by @media to @state + + + + + + a #GstRTSPMedia + + + + the target state of the pipeline + + + + + + Configure the allowed lower transport for @media. + + + + + + a #GstRTSPMedia + + + + the new flags + + + + + + Configure the allowed lower transport for @media. + + + + + + a #GstRTSPMedia + + + + the new flags + + + + + + Sets if and how the media clock should be published according to RFC7273. + + + + + + a #GstRTSPMedia + + + + the clock publish mode + + + + + + Set the amount of time to store retransmission packets. + + + + + + a #GstRTSPMedia + + + + the new value + + + + + + Set or unset if the pipeline for @media can be reused after the pipeline has +been unprepared. + + + + + + a #GstRTSPMedia + + + + the new value + + + + + + Set or unset if the pipeline for @media can be shared will multiple clients. +When @shared is %TRUE, client requests for this media will share the media +pipeline. + + + + + + a #GstRTSPMedia + + + + the new value + + + + + + Set the state of @media to @state and for the transports in @transports. + +@media must be prepared with gst_rtsp_media_prepare(); + + %TRUE on success. + + + + + a #GstRTSPMedia + + + + the target state of the media + + + + +a #GPtrArray of #GstRTSPStreamTransport pointers + + + + + + + + Set or unset if the pipeline for @media should be stopped when a +client disconnects without sending TEARDOWN. + + + + + + a #GstRTSPMedia + + + + the new value + + + + + + Control how @ media will be suspended after the SDP has been generated and +after a PAUSE request has been performed. + +Media must be unprepared when setting the suspend mode. + + + + + + a #GstRTSPMedia + + + + the new #GstRTSPSuspendMode + + + + + + Sets if the media pipeline can work in PLAY or RECORD mode + + + + + + a #GstRTSPMedia + + + + the new value + + + + + + Add @media specific info to @sdp. @info is used to configure the connection +information in the SDP. + + TRUE on success. + + + + + a #GstRTSPMedia + + + + a #GstSDPMessage + + + + a #GstSDPInfo + + + + + + Suspend @media. The state of the pipeline managed by @media is set to +GST_STATE_NULL but all streams are kept. @media can be prepared again +with gst_rtsp_media_unsuspend() + +@media must be prepared with gst_rtsp_media_prepare(); + + %TRUE on success. + + + + + a #GstRTSPMedia + + + + + + Set @pipeline as the #GstPipeline for @media. Ownership is +taken of @pipeline. + + + + + + a #GstRTSPMedia + + + + a #GstPipeline + + + + + + Unprepare @media. After this call, the media should be prepared again before +it can be used again. If the media is set to be non-reusable, a new instance +must be created. + + %TRUE on success. + + + + + a #GstRTSPMedia + + + + + + Unsuspend @media if it was in a suspended state. This method does nothing +when the media was not in the suspended state. + + %TRUE on success. + + + + + a #GstRTSPMedia + + + + + + Set @media to provide a #GstNetTimeProvider. + + + + + + a #GstRTSPMedia + + + + if a #GstNetTimeProvider should be used + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The RTSP media class + + + + + + + + + + + + + + + + + + + + + + %TRUE on success. + + + + + a #GstRTSPMedia + + + + a #GstRTSPThread to run the + bus handler or %NULL + + + + + + + + + %TRUE on success. + + + + + a #GstRTSPMedia + + + + + + + + + %TRUE on success. + + + + + a #GstRTSPMedia + + + + + + + + + %TRUE on success. + + + + + a #GstRTSPMedia + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + TRUE on success. + + + + + a #GstRTSPMedia + + + + a #GstSDPMessage + + + + a #GstSDPInfo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + TRUE on success. + + + + + a #GstRTSPMedia + + + + a #GstSDPMessage + + + + + + + + + + + + + The definition and logic for constructing the pipeline for a media. The media +can contain multiple streams like audio and video. + + Create a new #GstRTSPMediaFactory instance. + + a new #GstRTSPMediaFactory object. + + + + + + + + + + + + + + + + + + Construct the media object and create its streams. Implementations +should create the needed gstreamer elements and add them to the result +object. No state changes should be performed on them yet. + +One or more GstRTSPStream objects should be created from the result +with gst_rtsp_media_create_stream (). + +After the media is constructed, it can be configured and then prepared +with gst_rtsp_media_prepare (). + + a new #GstRTSPMedia if the media could be prepared. + + + + + a #GstRTSPMediaFactory + + + + the url used + + + + + + Construct and return a #GstElement that is a #GstBin containing +the elements to use for streaming the media. + +The bin should contain payloaders pay\%d for each stream. The default +implementation of this function returns the bin created from the +launch parameter. + + a new #GstElement. + + + + + a #GstRTSPMediaFactory + + + + the url used + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A convenience method to add @role with @fieldname and additional arguments to +the permissions of @factory. If @factory had no permissions, new permissions +will be created and the role will be added to it. + + + + + + a #GstRTSPMediaFactory + + + + a role + + + + the first field name + + + + additional arguments + + + + + + Construct the media object and create its streams. Implementations +should create the needed gstreamer elements and add them to the result +object. No state changes should be performed on them yet. + +One or more GstRTSPStream objects should be created from the result +with gst_rtsp_media_create_stream (). + +After the media is constructed, it can be configured and then prepared +with gst_rtsp_media_prepare (). + + a new #GstRTSPMedia if the media could be prepared. + + + + + a #GstRTSPMediaFactory + + + + the url used + + + + + + Construct and return a #GstElement that is a #GstBin containing +the elements to use for streaming the media. + +The bin should contain payloaders pay\%d for each stream. The default +implementation of this function returns the bin created from the +launch parameter. + + a new #GstElement. + + + + + a #GstRTSPMediaFactory + + + + the url used + + + + + + Get the #GstRTSPAddressPool used as the address pool of @factory. + + the #GstRTSPAddressPool of @factory. g_object_unref() after +usage. + + + + + a #GstRTSPMediaFactory + + + + + + Get the kernel UDP buffer size. + + the kernel UDP buffer size. + + + + + a #GstRTSPMedia + + + + + + Returns the clock that is going to be used by the pipelines +of all medias created from this factory. + + The GstClock + + + + + a #GstRTSPMediaFactory + + + + + + Get the latency that is used for receiving media + + latency in milliseconds + + + + + a #GstRTSPMediaFactory + + + + + + Get the gst_parse_launch() pipeline description that will be used in the +default prepare vmethod. + + the configured launch description. g_free() after +usage. + + + + + a #GstRTSPMediaFactory + + + + + + Return the GType of the GstRTSPMedia subclass this +factory will create. + + + + + + a #GstRTSPMediaFactory + + + + + + Get the multicast interface used for @factory. + + the multicast interface for @factory. g_free() after +usage. + + + + + a #GstRTSPMediaFactory + + + + + + Get the permissions object from @factory. + + a #GstRTSPPermissions object, unref after usage. + + + + + a #GstRTSPMediaFactory + + + + + + Get the allowed profiles of @factory. + + a #GstRTSPProfile + + + + + a #GstRTSPMediaFactory + + + + + + Get the allowed protocols of @factory. + + a #GstRTSPLowerTrans + + + + + a #GstRTSPMediaFactory + + + + + + Gets if and how the media clock should be published according to RFC7273. + + The GstRTSPPublishClockMode + + + + + a #GstRTSPMediaFactory + + + + + + Get the time that is stored for retransmission purposes + + a #GstClockTime + + + + + a #GstRTSPMediaFactory + + + + + + Get how media created from this factory will be suspended. + + a #GstRTSPSuspendMode. + + + + + a #GstRTSPMediaFactory + + + + + + Get if media created from this factory can be used for PLAY or RECORD +methods. + + The supported transport modes. + + + + + a #GstRTSPMediaFactory + + + + + + Get if media created from this factory will have an EOS event sent to the +pipeline before shutdown. + + %TRUE if the media will receive EOS before shutdown. + + + + + a #GstRTSPMediaFactory + + + + + + Get if media created from this factory can be shared between clients. + + %TRUE if the media will be shared between clients. + + + + + a #GstRTSPMediaFactory + + + + + + + + + + + + + + + + configure @pool to be used as the address pool of @factory. + + + + + + a #GstRTSPMediaFactory + + + + a #GstRTSPAddressPool + + + + + + Set the kernel UDP buffer size. + + + + + + a #GstRTSPMedia + + + + the new value + + + + + + Configures a specific clock to be used by the pipelines +of all medias created from this factory. + + + + + + a #GstRTSPMediaFactory + + + + the clock to be used by the media factory + + + + + + Configure if media created from this factory will have an EOS sent to the +pipeline before shutdown. + + + + + + a #GstRTSPMediaFactory + + + + the new value + + + + + + Configure the latency used for receiving media + + + + + + a #GstRTSPMediaFactory + + + + latency in milliseconds + + + + + + The gst_parse_launch() line to use for constructing the pipeline in the +default prepare vmethod. + +The pipeline description should return a GstBin as the toplevel element +which can be accomplished by enclosing the description with brackets '(' +')'. + +The description should return a pipeline with payloaders named pay0, pay1, +etc.. Each of the payloaders will result in a stream. + + + + + + a #GstRTSPMediaFactory + + + + the launch description + + + + + + Configure the GType of the GstRTSPMedia subclass to +create (by default, overridden construct vmethods +may of course do something different) + + + + + + a #GstRTSPMediaFactory + + + + the GType of the class to create + + + + + + configure @multicast_iface to be used for @factory. + + + + + + a #GstRTSPMediaFactory + + + + a multicast interface name + + + + + + Set @permissions on @factory. + + + + + + a #GstRTSPMediaFactory + + + + a #GstRTSPPermissions + + + + + + Configure the allowed profiles for @factory. + + + + + + a #GstRTSPMediaFactory + + + + the new flags + + + + + + Configure the allowed lower transport for @factory. + + + + + + a #GstRTSPMediaFactory + + + + the new flags + + + + + + Sets if and how the media clock should be published according to RFC7273. + + + + + + a #GstRTSPMediaFactory + + + + the clock publish mode + + + + + + Configure the time to store for possible retransmission + + + + + + a #GstRTSPMediaFactory + + + + a #GstClockTime + + + + + + Configure if media created from this factory can be shared between clients. + + + + + + a #GstRTSPMediaFactory + + + + the new value + + + + + + Configure if media created from this factory should be stopped +when a client disconnects without sending TEARDOWN. + + + + + + a #GstRTSPMediaFactory + + + + the new value + + + + + + Configure how media created from this factory will be suspended. + + + + + + a #GstRTSPMediaFactory + + + + the new #GstRTSPSuspendMode + + + + + + Configure if this factory creates media for PLAY or RECORD modes. + + + + + + a #GstRTSPMediaFactory + + + + the new value + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The #GstRTSPMediaFactory class structure. + + + + + + + + + + + + + + + + + + + + + + a new #GstElement. + + + + + a #GstRTSPMediaFactory + + + + the url used + + + + + + + + + a new #GstRTSPMedia if the media could be prepared. + + + + + a #GstRTSPMediaFactory + + + + the url used + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A media factory that creates a pipeline to play and uri. + + Create a new #GstRTSPMediaFactoryURI instance. + + a new #GstRTSPMediaFactoryURI object. + + + + + Get the URI that will provide media for this factory. + + the configured URI. g_free() after usage. + + + + + a #GstRTSPMediaFactory + + + + + + Set the URI of the resource that will be streamed by this factory. + + + + + + a #GstRTSPMediaFactory + + + + the uri the stream + + + + + + + + + + + + + + + + + + + + + + + + The #GstRTSPMediaFactoryURI class structure. + + + + + + + + + + + + + + + The state of the media pipeline. + + media pipeline not prerolled + + + media pipeline is busy doing a clean + shutdown. + + + media pipeline is prerolling + + + media pipeline is prerolled + + + media is suspended + + + media pipeline is in error + + + + Creates a #GstRTSPMediaFactory object for a given url. + + Make a new mount points object. + + a new #GstRTSPMountPoints + + + + + Make a path string from @url. + + a path string for @url, g_free() after usage. + + + + + a #GstRTSPMountPoints + + + + a #GstRTSPUrl + + + + + + Attach @factory to the mount point @path in @mounts. + +@path is of the form (/node)+. Any previous mount point will be freed. + +Ownership is taken of the reference on @factory so that @factory should not be +used after calling this function. + + + + + + a #GstRTSPMountPoints + + + + a mount point + + + + a #GstRTSPMediaFactory + + + + + + Make a path string from @url. + + a path string for @url, g_free() after usage. + + + + + a #GstRTSPMountPoints + + + + a #GstRTSPUrl + + + + + + Find the factory in @mounts that has the longest match with @path. + +If @matched is %NULL, @path will match the factory exactly otherwise +the amount of characters that matched is returned in @matched. + + the #GstRTSPMediaFactory for @path. +g_object_unref() after usage. + + + + + a #GstRTSPMountPoints + + + + a mount point + + + + the amount of @path matched + + + + + + Remove the #GstRTSPMediaFactory associated with @path in @mounts. + + + + + + a #GstRTSPMountPoints + + + + a mount point + + + + + + + + + + + + + + + + + + The class for the media mounts object. + + + + + + + a path string for @url, g_free() after usage. + + + + + a #GstRTSPMountPoints + + + + a #GstRTSPUrl + + + + + + + + + + + + + + + The opaque permissions structure. It is used to define the permissions +of objects in different roles. + + + + + Create a new empty Authorization permissions. + + a new empty authorization permissions. + + + + + Add a new @role to @permissions with the given variables. The fields +are the same layout as gst_structure_new(). + + + + + + a #GstRTSPPermissions + + + + a role + + + + the first field name + + + + additional arguments + + + + + + Add a new @role to @permissions with the given variables. Structure fields +are set according to the varargs in a manner similar to gst_structure_new(). + + + + + + a #GstRTSPPermissions + + + + a role + + + + the first field name + + + + additional fields to add + + + + + + Get all permissions for @role in @permissions. + + the structure with permissions for @role. It +remains valid for as long as @permissions is valid. + + + + + a #GstRTSPPermissions + + + + a role + + + + + + Check if @role in @permissions is given permission for @permission. + + %TRUE if @role is allowed @permission. + + + + + a #GstRTSPPermissions + + + + a role + + + + a permission + + + + + + Remove all permissions for @role in @permissions. + + + + + + a #GstRTSPPermissions + + + + a role + + + + + + + Whether the clock and possibly RTP/clock offset should be published according to RFC7273. + + Publish nothing + + + Publish the clock but not the offset + + + Publish the clock and offset + + + + Function registered with gst_rtsp_stream_transport_set_callbacks() and +called when @buffer must be sent on @channel. + + %TRUE on success + + + + + a #GstBuffer + + + + a channel + + + + user data + + + + + + This object listens on a port, creates and manages the clients connected to +it. + + Create a new #GstRTSPServer instance. + + a new #GstRTSPServer + + + + + A default #GSocketSourceFunc that creates a new #GstRTSPClient to accept and handle a +new connection on @socket or @server. + + TRUE if the source could be connected, FALSE if an error occurred. + + + + + a #GSocket + + + + the condition on @source + + + + a #GstRTSPServer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Attaches @server to @context. When the mainloop for @context is run, the +server will be dispatched. When @context is %NULL, the default context will be +used). + +This function should be called when the server properties and urls are fully +configured and the server is ready to start. + +This takes a reference on @server until the source is destroyed. Note that +if @context is not the default main context as returned by +g_main_context_default() (or %NULL), g_source_remove() cannot be used to +destroy the source. In that case it is recommended to use +gst_rtsp_server_create_source() and attach it to @context manually. + + the ID (greater than 0) for the source within the GMainContext. + + + + + a #GstRTSPServer + + + + a #GMainContext + + + + + + Call @func for each client managed by @server. The result value of @func +determines what happens to the client. @func will be called with @server +locked so no further actions on @server can be performed from @func. + +If @func returns #GST_RTSP_FILTER_REMOVE, the client will be removed from +@server. + +If @func returns #GST_RTSP_FILTER_KEEP, the client will remain in @server. + +If @func returns #GST_RTSP_FILTER_REF, the client will remain in @server but +will also be added with an additional ref to the result #GList of this +function.. + +When @func is %NULL, #GST_RTSP_FILTER_REF will be assumed for each client. + + a #GList with all +clients for which @func returned #GST_RTSP_FILTER_REF. After usage, each +element in the #GList should be unreffed before the list is freed. + + + + + + + a #GstRTSPServer + + + + a callback + + + + user data passed to @func + + + + + + Create a #GSocket for @server. The socket will listen on the +configured service. + + the #GSocket for @server or %NULL when an error +occurred. + + + + + a #GstRTSPServer + + + + a #GCancellable + + + + + + Create a #GSource for @server. The new source will have a default +#GSocketSourceFunc of gst_rtsp_server_io_func(). + +@cancellable if not %NULL can be used to cancel the source, which will cause +the source to trigger, reporting the current condition (which is likely 0 +unless cancellation happened at the same time as a condition change). You can +check for this in the callback using g_cancellable_is_cancelled(). + +This takes a reference on @server until @source is destroyed. + + the #GSource for @server or %NULL when an error +occurred. Free with g_source_unref () + + + + + a #GstRTSPServer + + + + a #GCancellable or %NULL. + + + + + + Get the address on which the server will accept connections. + + the server address. g_free() after usage. + + + + + a #GstRTSPServer + + + + + + Get the #GstRTSPAuth used as the authentication manager of @server. + + the #GstRTSPAuth of @server. g_object_unref() after +usage. + + + + + a #GstRTSPServer + + + + + + The maximum amount of queued requests for the server. + + the server backlog. + + + + + a #GstRTSPServer + + + + + + Get the port number where the server was bound to. + + the port number + + + + + a #GstRTSPServer + + + + + + Get the #GstRTSPMountPoints used as the mount points of @server. + + the #GstRTSPMountPoints of @server. g_object_unref() after +usage. + + + + + a #GstRTSPServer + + + + + + Get the service on which the server will accept connections. + + the service. use g_free() after usage. + + + + + a #GstRTSPServer + + + + + + Get the #GstRTSPSessionPool used as the session pool of @server. + + the #GstRTSPSessionPool used for sessions. g_object_unref() after +usage. + + + + + a #GstRTSPServer + + + + + + Get the #GstRTSPThreadPool used as the thread pool of @server. + + the #GstRTSPThreadPool of @server. g_object_unref() after +usage. + + + + + a #GstRTSPServer + + + + + + Configure @server to accept connections on the given address. + +This function must be called before the server is bound. + + + + + + a #GstRTSPServer + + + + the address + + + + + + configure @auth to be used as the authentication manager of @server. + + + + + + a #GstRTSPServer + + + + a #GstRTSPAuth + + + + + + configure the maximum amount of requests that may be queued for the +server. + +This function must be called before the server is bound. + + + + + + a #GstRTSPServer + + + + the backlog + + + + + + configure @mounts to be used as the mount points of @server. + + + + + + a #GstRTSPServer + + + + a #GstRTSPMountPoints + + + + + + Configure @server to accept connections on the given service. +@service should be a string containing the service name (see services(5)) or +a string containing a port number between 1 and 65535. + +When @service is set to "0", the server will listen on a random free +port. The actual used port can be retrieved with +gst_rtsp_server_get_bound_port(). + +This function must be called before the server is bound. + + + + + + a #GstRTSPServer + + + + the service + + + + + + configure @pool to be used as the session pool of @server. + + + + + + a #GstRTSPServer + + + + a #GstRTSPSessionPool + + + + + + configure @pool to be used as the thread pool of @server. + + + + + + a #GstRTSPServer + + + + a #GstRTSPThreadPool + + + + + + Take an existing network socket and use it for an RTSP connection. This +is used when transferring a socket from an HTTP server which should be used +as an RTSP over HTTP tunnel. The @initial_buffer contains any remaining data +that the HTTP server read from the socket while parsing the HTTP header. + + TRUE if all was ok, FALSE if an error occurred. + + + + + a #GstRTSPServer + + + + a network socket + + + + the IP address of the remote client + + + + the port used by the other end + + + + any initial data that was already read from the socket + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The RTSP server class structure + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This function will be called by the gst_rtsp_server_client_filter(). An +implementation should return a value of #GstRTSPFilterResult. + +When this function returns #GST_RTSP_FILTER_REMOVE, @client will be removed +from @server. + +A return value of #GST_RTSP_FILTER_KEEP will leave @client untouched in +@server. + +A value of #GST_RTSP_FILTER_REF will add @client to the result #GList of +gst_rtsp_server_client_filter(). + + a #GstRTSPFilterResult. + + + + + a #GstRTSPServer object + + + + a #GstRTSPClient in @server + + + + user data that has been given to gst_rtsp_server_client_filter() + + + + + + + + Session information kept by the server for a specific client. +One client session, identified with a session id, can handle multiple medias +identified with the url of a media. + + Create a new #GstRTSPSession instance with @sessionid. + + a new #GstRTSPSession + + + + + a session id + + + + + + Allow @session to expire. This method must be called an equal +amount of time as gst_rtsp_session_prevent_expire(). + + + + + + a #GstRTSPSession + + + + + + Call @func for each media in @sess. The result value of @func determines +what happens to the media. @func will be called with @sess +locked so no further actions on @sess can be performed from @func. + +If @func returns #GST_RTSP_FILTER_REMOVE, the media will be removed from +@sess. + +If @func returns #GST_RTSP_FILTER_KEEP, the media will remain in @sess. + +If @func returns #GST_RTSP_FILTER_REF, the media will remain in @sess but +will also be added with an additional ref to the result #GList of this +function.. + +When @func is %NULL, #GST_RTSP_FILTER_REF will be assumed for all media. + + a GList with all +media for which @func returned #GST_RTSP_FILTER_REF. After usage, each +element in the #GList should be unreffed before the list is freed. + + + + + + + a #GstRTSPSession + + + + a callback + + + + user data passed to @func + + + + + + Get the string that can be placed in the Session header field. + + the Session header of @session. g_free() after usage. + + + + + a #GstRTSPSession + + + + + + Get the session media for @path. @matched will contain the number of matched +characters of @path. + + the configuration for @path in @sess. + + + + + a #GstRTSPSession + + + + the path for the media + + + + the amount of matched characters + + + + + + Get the sessionid of @session. + + the sessionid of @session. The value remains valid +as long as @session is alive. + + + + + a #GstRTSPSession + + + + + + Get the timeout value of @session. + + the timeout of @session in seconds. + + + + + a #GstRTSPSession + + + + + + Check if @session timeout out. + Use gst_rtsp_session_is_expired_usec() instead. + + %TRUE if @session timed out + + + + + a #GstRTSPSession + + + + the current system time + + + + + + Check if @session timeout out. + + %TRUE if @session timed out + + + + + a #GstRTSPSession + + + + the current monotonic time + + + + + + Manage the media object @obj in @sess. @path will be used to retrieve this +media from the session with gst_rtsp_session_get_media(). + +Ownership is taken from @media. + + a new @GstRTSPSessionMedia object. + + + + + a #GstRTSPSession + + + + the path for the media + + + + a #GstRTSPMedia + + + + + + Get the amount of milliseconds till the session will expire. + Use gst_rtsp_session_next_timeout_usec() instead. + + the amount of milliseconds since the session will time out. + + + + + a #GstRTSPSession + + + + the current system time + + + + + + Get the amount of milliseconds till the session will expire. + + the amount of milliseconds since the session will time out. + + + + + a #GstRTSPSession + + + + the current monotonic time + + + + + + Prevent @session from expiring. + + + + + + a #GstRTSPSession + + + + + + Release the managed @media in @sess, freeing the memory allocated by it. + + %TRUE if there are more media session left in @sess. + + + + + a #GstRTSPSession + + + + a #GstRTSPMedia + + + + + + Configure @session for a timeout of @timeout seconds. The session will be +cleaned up when there is no activity for @timeout seconds. + + + + + + a #GstRTSPSession + + + + the new timeout + + + + + + Update the last_access time of the session to the current time. + + + + + + a #GstRTSPSession + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This function will be called by the gst_rtsp_session_filter(). An +implementation should return a value of #GstRTSPFilterResult. + +When this function returns #GST_RTSP_FILTER_REMOVE, @media will be removed +from @sess. + +A return value of #GST_RTSP_FILTER_KEEP will leave @media untouched in +@sess. + +A value of GST_RTSP_FILTER_REF will add @media to the result #GList of +gst_rtsp_session_filter(). + + a #GstRTSPFilterResult. + + + + + a #GstRTSPSession object + + + + a #GstRTSPSessionMedia in @sess + + + + user data that has been given to gst_rtsp_session_filter() + + + + + + State of a client session regarding a specific media identified by path. + + Create a new #GstRTSPSessionMedia that manages the streams +in @media for @path. @media should be prepared. + +Ownership is taken of @media. + + a new #GstRTSPSessionMedia. + + + + + the path + + + + the #GstRTSPMedia + + + + + + Fill @range with the next available min and max channels for +interleaved transport. + + %TRUE on success. + + + + + a #GstRTSPSessionMedia + + + + a #GstRTSPRange + + + + + + Get the base_time of the #GstRTSPMedia in @media + + the base_time of the media. + + + + + a #GstRTSPSessionMedia + + + + + + Get the #GstRTSPMedia that was used when constructing @media + + the #GstRTSPMedia of @media. Remains valid as long +as @media is valid. + + + + + a #GstRTSPSessionMedia + + + + + + Retrieve the RTP-Info header string for all streams in @media +with configured transports. + + The RTP-Info as a string or +%NULL when no RTP-Info could be generated, g_free() after usage. + + + + + a #GstRTSPSessionMedia + + + + + + Get the current RTSP state of @media. + + the current RTSP state of @media. + + + + + a #GstRTSPSessionMedia + + + + + + Get a previously created #GstRTSPStreamTransport for the stream at @idx. + + a #GstRTSPStreamTransport that is valid until the +session of @media is unreffed. + + + + + a #GstRTSPSessionMedia + + + + the stream index + + + + + + Check if the path of @media matches @path. It @path matches, the amount of +matched characters is returned in @matched. + + %TRUE when @path matches the path of @media. + + + + + a #GstRTSPSessionMedia + + + + a path + + + + the amount of matched characters of @path + + + + + + Set the RTSP state of @media to @state. + + + + + + a #GstRTSPSessionMedia + + + + a #GstRTSPState + + + + + + Tell the media object @media to change to @state. + + %TRUE on success. + + + + + a #GstRTSPSessionMedia + + + + the new state + + + + + + Configure the transport for @stream to @tr in @media. + + the new or updated #GstRTSPStreamTransport for @stream. + + + + + a #GstRTSPSessionMedia + + + + a #GstRTSPStream + + + + a #GstRTSPTransport + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + An object that keeps track of the active sessions. This object is usually +attached to a #GstRTSPServer object to manage the sessions in that server. + + Create a new #GstRTSPSessionPool instance. + + A new #GstRTSPSessionPool. g_object_unref() after +usage. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Inspect all the sessions in @pool and remove the sessions that are inactive +for more than their timeout. + + the amount of sessions that got removed. + + + + + a #GstRTSPSessionPool + + + + + + Create a new #GstRTSPSession object in @pool. + + a new #GstRTSPSession. + + + + + a #GstRTSPSessionPool + + + + + + Create a #GSource that will be dispatched when the session should be cleaned +up. + + a #GSource + + + + + a #GstRTSPSessionPool + + + + + + Call @func for each session in @pool. The result value of @func determines +what happens to the session. @func will be called with the session pool +locked so no further actions on @pool can be performed from @func. + +If @func returns #GST_RTSP_FILTER_REMOVE, the session will be set to the +expired state with gst_rtsp_session_set_expired() and removed from +@pool. + +If @func returns #GST_RTSP_FILTER_KEEP, the session will remain in @pool. + +If @func returns #GST_RTSP_FILTER_REF, the session will remain in @pool but +will also be added with an additional ref to the result GList of this +function.. + +When @func is %NULL, #GST_RTSP_FILTER_REF will be assumed for all sessions. + + a GList with all +sessions for which @func returned #GST_RTSP_FILTER_REF. After usage, each +element in the GList should be unreffed before the list is freed. + + + + + + + a #GstRTSPSessionPool + + + + a callback + + + + user data passed to @func + + + + + + Find the session with @sessionid in @pool. The access time of the session +will be updated with gst_rtsp_session_touch(). + + the #GstRTSPSession with @sessionid +or %NULL when the session did not exist. g_object_unref() after usage. + + + + + the pool to search + + + + the session id + + + + + + Get the maximum allowed number of sessions in @pool. 0 means an unlimited +amount of sessions. + + the maximum allowed number of sessions. + + + + + a #GstRTSPSessionPool + + + + + + Get the amount of active sessions in @pool. + + the amount of active sessions in @pool. + + + + + a #GstRTSPSessionPool + + + + + + Remove @sess from @pool, releasing the ref that the pool has on @sess. + + %TRUE if the session was found and removed. + + + + + a #GstRTSPSessionPool + + + + a #GstRTSPSession + + + + + + Configure the maximum allowed number of sessions in @pool to @max. +A value of 0 means an unlimited amount of sessions. + + + + + + a #GstRTSPSessionPool + + + + the maximum number of sessions + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This function will be called by the gst_rtsp_session_pool_filter(). An +implementation should return a value of #GstRTSPFilterResult. + +When this function returns #GST_RTSP_FILTER_REMOVE, @session will be removed +from @pool. + +A return value of #GST_RTSP_FILTER_KEEP will leave @session untouched in +@pool. + +A value of GST_RTSP_FILTER_REF will add @session to the result #GList of +gst_rtsp_session_pool_filter(). + + a #GstRTSPFilterResult. + + + + + a #GstRTSPSessionPool object + + + + a #GstRTSPSession in @pool + + + + user data that has been given to gst_rtsp_session_pool_filter() + + + + + + The function that will be called from the GSource watch on the session pool. + +The function will be called when the pool must be cleaned up because one or +more sessions timed out. + + %FALSE if the source should be removed. + + + + + a #GstRTSPSessionPool object + + + + user data that has been given when registering the handler + + + + + + + + + + The definition of a media stream. + + Create a new media stream with index @idx that handles RTP data on +@pad and has a payloader element @payloader if @pad is a source pad +or a depayloader element @payloader if @pad is a sink pad. + + a new #GstRTSPStream + + + + + an index + + + + a #GstElement + + + + a #GstPad + + + + + + Add the transport in @trans to @stream. The media of @stream will +then also be send to the values configured in @trans. + +@stream must be joined to a bin. + +@trans must contain a valid #GstRTSPTransport. + + %TRUE if @trans was added + + + + + a #GstRTSPStream + + + + a #GstRTSPStreamTransport + + + + + + Allocates RTP and RTCP ports. + This function shouldn't have been made public + + %TRUE if the RTP and RTCP sockets have been succeccully allocated. + + + + + a #GstRTSPStream + + + + protocol family + + + + transport method + + + + Whether to use client settings or not + + + + + + Get the #GstRTSPAddressPool used as the address pool of @stream. + + the #GstRTSPAddressPool of @stream. g_object_unref() after +usage. + + + + + a #GstRTSPStream + + + + + + Get the size of the UDP transmission buffer (in bytes) + + the size of the UDP TX buffer + + + + + a #GstRTSPStream + + + + + + Retrieve the current caps of @stream. + + the #GstCaps of @stream. use gst_caps_unref() +after usage. + + + + + a #GstRTSPStream + + + + + + Get the control string to identify this stream. + + the control string. g_free() after usage. + + + + + a #GstRTSPStream + + + + + + + + + + + + + + + + Get the configured DSCP QoS in of the outgoing sockets. + + the DSCP QoS value of the outgoing sockets, or -1 if disbled. + + + + + a #GstRTSPStream + + + + + + Get the stream index. + + the stream index. + + + + + a #GstRTSPStream + + + + + + Get the previous joined bin with gst_rtsp_stream_join_bin() or NULL. + + the joined bin or NULL. + + + + + a #GstRTSPStream + + + + + + Get the configured MTU in the payloader of @stream. + + the MTU of the payloader. + + + + + a #GstRTSPStream + + + + + + Get the multicast address of @stream for @family. The original +#GstRTSPAddress is cached and copy is returned, so freeing the return value +won't release the address from the pool. + + the #GstRTSPAddress of @stream +or %NULL when no address could be allocated. gst_rtsp_address_free() +after usage. + + + + + a #GstRTSPStream + + + + the #GSocketFamily + + + + + + Get the multicast interface used for @stream. + + the multicast interface for @stream. g_free() after +usage. + + + + + a #GstRTSPStream + + + + + + Get the allowed profiles of @stream. + + a #GstRTSPProfile + + + + + a #GstRTSPStream + + + + + + Get the allowed protocols of @stream. + + a #GstRTSPLowerTrans + + + + + a #GstRTSPStream + + + + + + Get the stream payload type. + + the stream payload type. + + + + + a #GstRTSPStream + + + + + + Gets if and how the stream clock should be published according to RFC7273. + + The GstRTSPPublishClockMode + + + + + a #GstRTSPStream + + + + + + Get the payload-type used for retransmission of this stream + + The retransmission PT. + + + + + a #GstRTSPStream + + + + + + Get the amount of time to store retransmission data. + + the amount of time to store retransmission data. + + + + + a #GstRTSPStream + + + + + + Get the RTCP socket from @stream for a @family. + +@stream must be joined to a bin. + + the RTCP socket or %NULL if no +socket could be allocated for @family. Unref after usage + + + + + a #GstRTSPStream + + + + the socket family + + + + + + Get the RTP socket from @stream for a @family. + +@stream must be joined to a bin. + + the RTP socket or %NULL if no +socket could be allocated for @family. Unref after usage + + + + + a #GstRTSPStream + + + + the socket family + + + + + + Retrieve the current rtptime, seq and running-time. This is used to +construct a RTPInfo reply header. + + %TRUE when rtptime, seq and running-time could be determined. + + + + + a #GstRTSPStream + + + + result RTP timestamp + + + + result RTP seqnum + + + + the clock rate + + + + result running-time + + + + + + Get the RTP session of this stream. + + The RTP session of this stream. Unref after usage. + + + + + a #GstRTSPStream + + + + + + Fill @server_port with the port pair used by the server. This function can +only be called when @stream has been joined. + + + + + + a #GstRTSPStream + + + + result server port + + + + the port family to get + + + + + + Get the sinkpad associated with @stream. + + the sinkpad. Unref after usage. + + + + + a #GstRTSPStream + + + + + + Get the srcpad associated with @stream. + + the srcpad. Unref after usage. + + + + + a #GstRTSPStream + + + + + + Get the SRTP encoder for this stream. + + The SRTP encoder for this stream. Unref after usage. + + + + + a #GstRTSPStream + + + + + + Get the SSRC used by the RTP session of this stream. This function can only +be called when @stream has been joined. + + + + + + a #GstRTSPStream + + + + result ssrc + + + + + + Check if @stream has the control string @control. + + %TRUE is @stream has @control as the control string + + + + + a #GstRTSPStream + + + + a control string + + + + + + Check if @stream is blocking on a #GstBuffer. + + %TRUE if @stream is blocking + + + + + a #GstRTSPStream + + + + + + See gst_rtsp_stream_set_client_side() + + TRUE if this #GstRTSPStream is client-side. + + + + + a #GstRTSPStream + + + + + + Check if @transport can be handled by stream + + %TRUE if @transport can be handled by @stream. + + + + + a #GstRTSPStream + + + + a #GstRTSPTransport + + + + + + Join the #GstBin @bin that contains the element @rtpbin. + +@stream will link to @rtpbin, which must be inside @bin. The elements +added to @bin will be set to the state given in @state. + + %TRUE on success. + + + + + a #GstRTSPStream + + + + a #GstBin to join + + + + a rtpbin element in @bin + + + + the target state of the new elements + + + + + + Remove the elements of @stream from @bin. + + %TRUE on success. + + + + + a #GstRTSPStream + + + + a #GstBin + + + + a rtpbin #GstElement + + + + + + Query the position of the stream in %GST_FORMAT_TIME. This only considers +the RTP parts of the pipeline and not the RTCP parts. + + %TRUE if the position could be queried + + + + + a #GstRTSPStream + + + + + + + + + Query the stop of the stream in %GST_FORMAT_TIME. This only considers +the RTP parts of the pipeline and not the RTCP parts. + + %TRUE if the stop could be queried + + + + + a #GstRTSPStream + + + + + + + + + Handle an RTCP buffer for the stream. This method is usually called when a +message has been received from a client using the TCP transport. + +This function takes ownership of @buffer. + + a GstFlowReturn. + + + + + a #GstRTSPStream + + + + a #GstBuffer + + + + + + Handle an RTP buffer for the stream. This method is usually called when a +message has been received from a client using the TCP transport. + +This function takes ownership of @buffer. + + a GstFlowReturn. + + + + + a #GstRTSPStream + + + + a #GstBuffer + + + + + + Remove the transport in @trans from @stream. The media of @stream will +not be sent to the values configured in @trans. + +@stream must be joined to a bin. + +@trans must contain a valid #GstRTSPTransport. + + %TRUE if @trans was removed + + + + + a #GstRTSPStream + + + + a #GstRTSPStreamTransport + + + + + + Creating a rtxsend bin + + a #GstElement. + + + + + a #GstRTSPStream + + + + the session id + + + + + + Reserve @address and @port as the address and port of @stream. The original +#GstRTSPAddress is cached and copy is returned, so freeing the return value +won't release the address from the pool. + + the #GstRTSPAddress of @stream or %NULL when +the address could be reserved. gst_rtsp_address_free() after usage. + + + + + a #GstRTSPStream + + + + an address + + + + a port + + + + n_ports + + + + a TTL + + + + + + configure @pool to be used as the address pool of @stream. + + + + + + a #GstRTSPStream + + + + a #GstRTSPAddressPool + + + + + + Blocks or unblocks the dataflow on @stream. + + %TRUE on success + + + + + a #GstRTSPStream + + + + boolean indicating we should block or unblock + + + + + + Set the size of the UDP transmission buffer (in bytes) +Needs to be set before the stream is joined to a bin. + + + + + + a #GstRTSPStream + + + + the buffer size + + + + + + Sets the #GstRTSPStream as a 'client side' stream - used for sending +streams to an RTSP server via RECORD. This has the practical effect +of changing which UDP port numbers are used when setting up the local +side of the stream sending to be either the 'server' or 'client' pair +of a configured UDP transport. + + + + + + a #GstRTSPStream + + + + TRUE if this #GstRTSPStream is running on the 'client' side of +an RTSP connection. + + + + + + Set the control string in @stream. + + + + + + a #GstRTSPStream + + + + a control string + + + + + + Configure the dscp qos of the outgoing sockets to @dscp_qos. + + + + + + a #GstRTSPStream + + + + a new dscp qos value (0-63, or -1 to disable) + + + + + + Configure the mtu in the payloader of @stream to @mtu. + + + + + + a #GstRTSPStream + + + + a new MTU + + + + + + configure @multicast_iface to be used for @stream. + + + + + + a #GstRTSPStream + + + + a multicast interface name + + + + + + Configure the allowed profiles for @stream. + + + + + + a #GstRTSPStream + + + + the new profiles + + + + + + Configure the allowed lower transport for @stream. + + + + + + a #GstRTSPStream + + + + the new flags + + + + + + Configure a pt map between @pt and @caps. + + + + + + a #GstRTSPStream + + + + the pt + + + + a #GstCaps + + + + + + Sets if and how the stream clock should be published according to RFC7273. + + + + + + a #GstRTSPStream + + + + the clock publish mode + + + + + + Set the payload type (pt) for retransmission of this stream. + + + + + + a #GstRTSPStream + + + + a #guint + + + + + + Set the amount of time to store retransmission packets. + + + + + + a #GstRTSPStream + + + + a #GstClockTime + + + + + + + + + + + + + + + + + + + Call @func for each transport managed by @stream. The result value of @func +determines what happens to the transport. @func will be called with @stream +locked so no further actions on @stream can be performed from @func. + +If @func returns #GST_RTSP_FILTER_REMOVE, the transport will be removed from +@stream. + +If @func returns #GST_RTSP_FILTER_KEEP, the transport will remain in @stream. + +If @func returns #GST_RTSP_FILTER_REF, the transport will remain in @stream but +will also be added with an additional ref to the result #GList of this +function.. + +When @func is %NULL, #GST_RTSP_FILTER_REF will be assumed for each transport. + + a #GList with all +transports for which @func returned #GST_RTSP_FILTER_REF. After usage, each +element in the #GList should be unreffed before the list is freed. + + + + + + + a #GstRTSPStream + + + + a callback + + + + user data passed to @func + + + + + + Update the new crypto information for @ssrc in @stream. If information +for @ssrc did not exist, it will be added. If information +for @ssrc existed, it will be replaced. If @crypto is %NULL, it will +be removed from @stream. + + %TRUE if @crypto could be updated + + + + + a #GstRTSPStream + + + + the SSRC + + + + a #GstCaps with crypto info + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A Transport description for a stream + + Create a new #GstRTSPStreamTransport that can be used to manage +@stream with transport @tr. + + a new #GstRTSPStreamTransport + + + + + a #GstRTSPStream + + + + a GstRTSPTransport + + + + + + Get the RTP-Info string for @trans and @start_time. + + the RTPInfo string for @trans +and @start_time or %NULL when the RTP-Info could not be +determined. g_free() after usage. + + + + + a #GstRTSPStreamTransport + + + + a star time + + + + + + Get the #GstRTSPStream used when constructing @trans. + + the stream used when constructing @trans. + + + + + a #GstRTSPStreamTransport + + + + + + Get the transport configured in @trans. + + the transport configured in @trans. It remains +valid for as long as @trans is valid. + + + + + a #GstRTSPStreamTransport + + + + + + Get the url configured in @trans. + + the url configured in @trans. It remains +valid for as long as @trans is valid. + + + + + a #GstRTSPStreamTransport + + + + + + Check if @trans is timed out. + + %TRUE if @trans timed out. + + + + + a #GstRTSPStreamTransport + + + + + + Signal the installed keep_alive callback for @trans. + + + + + + a #GstRTSPStreamTransport + + + + + + Receive @buffer on @channel @trans. + + a #GstFlowReturn. Returns GST_FLOW_NOT_LINKED when @channel is not + configured in the transport of @trans. + + + + + a #GstRTSPStreamTransport + + + + a channel + + + + a #GstBuffer + + + + + + Send @buffer to the installed RTCP callback for @trans. + + %TRUE on success + + + + + a #GstRTSPStreamTransport + + + + a #GstBuffer + + + + + + Send @buffer to the installed RTP callback for @trans. + + %TRUE on success + + + + + a #GstRTSPStreamTransport + + + + a #GstBuffer + + + + + + Activate or deactivate datatransfer configured in @trans. + + %TRUE when the state was changed. + + + + + a #GstRTSPStreamTransport + + + + new state of @trans + + + + + + Install callbacks that will be called when data for a stream should be sent +to a client. This is usually used when sending RTP/RTCP over TCP. + + + + + + a #GstRTSPStreamTransport + + + + a callback called when RTP should be sent + + + + a callback called when RTCP should be sent + + + + user data passed to callbacks + + + + called with the user_data when no longer needed. + + + + + + Install callbacks that will be called when RTCP packets are received from the +receiver of @trans. + + + + + + a #GstRTSPStreamTransport + + + + a callback called when the receiver is active + + + + user data passed to callback + + + + called with the user_data when no longer needed. + + + + + + Set the timed out state of @trans to @timedout + + + + + + a #GstRTSPStreamTransport + + + + timed out value + + + + + + Set @tr as the client transport. This function takes ownership of the +passed @tr. + + + + + + a #GstRTSPStreamTransport + + + + a client #GstRTSPTransport + + + + + + Set @url as the client url. + + + + + + a #GstRTSPStreamTransport + + + + a client #GstRTSPUrl + + + + + + parent instance + + + + + + + + + + + + + + + + + + + + + + + This function will be called by the gst_rtsp_stream_transport_filter(). An +implementation should return a value of #GstRTSPFilterResult. + +When this function returns #GST_RTSP_FILTER_REMOVE, @trans will be removed +from @stream. + +A return value of #GST_RTSP_FILTER_KEEP will leave @trans untouched in +@stream. + +A value of #GST_RTSP_FILTER_REF will add @trans to the result #GList of +gst_rtsp_stream_transport_filter(). + + a #GstRTSPFilterResult. + + + + + a #GstRTSPStream object + + + + a #GstRTSPStreamTransport in @stream + + + + user data that has been given to gst_rtsp_stream_transport_filter() + + + + + + + + The suspend mode of the media pipeline. A media pipeline is suspended right +after creating the SDP and when the client performs a PAUSED request. + + Media is not suspended + + + Media is PAUSED in suspend + + + The media is set to NULL when suspended + + + + Structure holding info about a mainloop running in a thread + + parent #GstMiniObject + + + + the thread type + + + + a #GMainContext + + + + a #GMainLoop + + + + Create a new thread object that can run a mainloop. + + a #GstRTSPThread. + + + + + the thread type + + + + + + Reuse the mainloop of @thread + + %TRUE if the mainloop could be reused + + + + + a #GstRTSPThread + + + + + + Stop and unref @thread. When no threads are using the mainloop, the thread +will be stopped and the final ref to @thread will be released. + + + + + + a #GstRTSPThread + + + + + + + The thread pool structure. + + Create a new #GstRTSPThreadPool instance. + + a new #GstRTSPThreadPool + + + + + Wait for all tasks to be stopped and free all allocated resources. This is +mainly used in test suites to ensure proper cleanup of internal data +structures. + + + + + + + + + + + + + + + + + + + + + + Get a new #GstRTSPThread for @type and @ctx. + + a new #GstRTSPThread, gst_rtsp_thread_stop() after usage + + + + + a #GstRTSPThreadPool + + + + the #GstRTSPThreadType + + + + a #GstRTSPContext + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get the maximum number of threads used for client connections. +See gst_rtsp_thread_pool_set_max_threads(). + + the maximum number of threads. + + + + + a #GstRTSPThreadPool + + + + + + Get a new #GstRTSPThread for @type and @ctx. + + a new #GstRTSPThread, gst_rtsp_thread_stop() after usage + + + + + a #GstRTSPThreadPool + + + + the #GstRTSPThreadType + + + + a #GstRTSPContext + + + + + + Set the maximum threads used by the pool to handle client requests. +A value of 0 will use the pool mainloop, a value of -1 will use an +unlimited number of threads. + + + + + + a #GstRTSPThreadPool + + + + maximum threads + + + + + + + + + + + + + + + + + + + + + Class for managing threads. + + + + + a #GThreadPool used internally + + + + + + a new #GstRTSPThread, gst_rtsp_thread_stop() after usage + + + + + a #GstRTSPThreadPool + + + + the #GstRTSPThreadType + + + + a #GstRTSPContext + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Different thread types + + a thread to handle the client communication + + + a thread to handle media + + + + An opaque object used for checking authorisations. +It is generated after successful authentication. + + + + + Create a new Authorization token with the given fieldnames and values. +Arguments are given similar to gst_structure_new(). + + a new authorization token. + + + + + the first fieldname + + + + additional arguments + + + + + + Create a new empty Authorization token. + + a new empty authorization token. + + + + + Create a new Authorization token with the given fieldnames and values. +Arguments are given similar to gst_structure_new_valist(). + + a new authorization token. + + + + + the first fieldname + + + + additional arguments + + + + + + Get the string value of @field in @token. + + the string value of @field in +@token or %NULL when @field is not defined in @token. The string +becomes invalid when you free @token. + + + + + a #GstRTSPToken + + + + a field name + + + + + + Access the structure of the token. + + The structure of the token. The structure is still +owned by the token, which means that you should not free it and that the +pointer becomes invalid when you free the token. + +MT safe. + + + + + The #GstRTSPToken. + + + + + + Check if @token has a boolean @field and if it is set to %TRUE. + + %TRUE if @token has a boolean field named @field set to %TRUE. + + + + + a #GstRTSPToken + + + + a field name + + + + + + Get a writable version of the structure. + + The structure of the token. The structure is still +owned by the token, which means that you should not free it and that the +pointer becomes invalid when you free the token. This function checks if +@token is writable and will never return %NULL. + +MT safe. + + + + + The #GstRTSPToken. + + + + + + + The supported modes of the media. + + Transport supports PLAY mode + + + Transport supports RECORD mode + + + + Used with gst_rtsp_address_pool_add_range() to bind to all +IPv4 addresses + + + + Used with gst_rtsp_address_pool_add_range() to bind to all +IPv6 addresses + + + + Check a new connection + + + + Check if access is allowed to a factory. +When access is not allowed an 404 Not Found is sent in the response. + + + + Check if media can be constructed from a media factory +A response should be sent on error. + + + + Check if the client can specify TTL, destination and +port pair in multicast. No response is sent when the check returns +%FALSE. + + + + Check the URL and methods + + + + G_TYPE_BOOLEAN, %TRUE if the media can be accessed, %FALSE will +return a 404 Not Found error when trying to access the media. + + + + G_TYPE_BOOLEAN, %TRUE if the media can be constructed, %FALSE will +return a 404 Not Found error when trying to access the media. + + + + G_TYPE_STRING, the role to use when dealing with media factories + +The default #GstRTSPAuth object uses this string in the token to find the +role of the media factory. It will then retrieve the #GstRTSPPermissions of +the media factory and retrieve the role with the same name. + + + + G_TYPE_BOOLEAN, %TRUE if the client can specify TTL, destination and + port pair in multicast. + + + + + + + + + + + + Get the current #GstRTSPContext. This object is retrieved from the +current thread that is handling the request for a client. + + a #GstRTSPContext + + + + + + + + + + Get parameters (not implemented yet) + + a #GstRTSPResult + + + + + a #GstRTSPClient + + + + a #GstRTSPContext + + + + + + Set parameters (not implemented yet) + + a #GstRTSPResult + + + + + a #GstRTSPClient + + + + a #GstRTSPContext + + + + + + Add @media specific info to @sdp. @info is used to configure the connection +information in the SDP. + + TRUE on success. + + + + + a #GstSDPMessage + + + + a #GstSDPInfo + + + + a #GstRTSPMedia + + + + + + Add info from @stream to @sdp. + + TRUE on success. + + + + + a #GstSDPMessage + + + + a #GstSDPInfo + + + + a #GstRTSPStream + + + + + + diff --git a/gir-files/GstSdp-1.0.gir b/gir-files/GstSdp-1.0.gir new file mode 100644 index 000000000..db78f9dce --- /dev/null +++ b/gir-files/GstSdp-1.0.gir @@ -0,0 +1,4309 @@ + + + + + + + + + The different cache types + + The envelope key MUST NOT be cached + + + The envelope key MUST be cached + + + The envelope key MUST be cached, but only + to be used for the specific CSB. + + + + + + The encryption algorithm used to encrypt the Encr data field + + no encryption + + + AES-CM using a 128-bit key + + + AES Key Wrap using a 128-bit key + + + + + + The key validity type + + No specific usage rule + + + The key is associated with the SPI/MKI + + + The key has a start and expiration time + + + + The type of key. + + a TEK Generation Key + + + Traffic-Encrypting Key + + + + Specifies the authentication algorithm used + + no authentication + + + HMAC-SHA-1-160 + + + + The Security policy Map item for SRTP + + The security policy applied for the stream with @ssrc + + + + the SSRC that must be used for the stream + + + + current rollover counter + + + + + Specifies the method of uniquely mapping Crypto Sessions to the security +protocol sessions. + + + + + Structure holding the information of the MIKEY message + + + + + the version + + + + the #GstMIKEYType message type + + + + verify flag + + + + a #GstMIKEYPRFFunc + + + + Identifies the Crypto Session Bundle + + + + a #GstMIKEYMapType + + + + map info array of type depending on @map_type + + + + + + the payload array of #GstMIKEYPayload + + + + + + Make a new MIKEY message. + + a new #GstMIKEYMessage on success + + + + + Make a new #GstMIKEYMessage from @bytes. + + a new #GstMIKEYMessage + + + + + a #GBytes + + + + a #GstMIKEYDecryptInfo + + + + + + Makes mikey message including: + - Security Policy Payload + - Key Data Transport Payload + - Key Data Sub-Payload + + a #GstMIKEYMessage, +or %NULL if there is no srtp information in the caps. + + + + + a #GstCaps, including SRTP parameters (srtp/srtcp cipher, authorization, key data) + + + + + + Parse @size bytes from @data into a #GstMIKEYMessage. @info contains the +parameters to decrypt and verify the data. + + a #GstMIKEYMessage on success or %NULL when parsing failed and +@error will be set. + + + + + bytes to read + + + + + + length of @data + + + + #GstMIKEYDecryptInfo + + + + + + Add a Crypto policy for SRTP to @msg. + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + The security policy applied for the stream with @ssrc + + + + the SSRC that must be used for the stream + + + + current rollover counter + + + + + + Add a new payload to @msg. + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + a #GstMIKEYPayload + + + + + + Add a new PKE payload to @msg with the given parameters. + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + envelope key cache indicator + + + + the length of @data + + + + the encrypted envelope key + + + + + + + + Add a new RAND payload to @msg with the given parameters. + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + the length of @rand + + + + random data + + + + + + + + Add a new RAND payload to @msg with @len random bytes. + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + length + + + + + + Add a new T payload to @msg with the given parameters. + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + specifies the timestamp type used + + + + The timestamp value of the specified @type + + + + + + + + Add a new T payload to @msg that contains the current time +in NTP-UTC format. + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + + + + a #gchar, base64-encoded data + + + + + a #GstMIKEYMessage + + + + + + Find the @nth occurence of the payload with @type in @msg. + + the @nth #GstMIKEYPayload of @type. + + + + + a #GstMIKEYMessage + + + + a #GstMIKEYPayloadType + + + + payload to find + + + + + + Get the policy information of @msg at @idx. + + a #GstMIKEYMapSRTP + + + + + a #GstMIKEYMessage + + + + an index + + + + + + Get the number of crypto sessions in @msg. + + the number of crypto sessions + + + + + a #GstMIKEYMessage + + + + + + Get the number of payloads in @msg. + + the number of payloads in @msg + + + + + a #GstMIKEYMessage + + + + + + Get the #GstMIKEYPayload at @idx in @msg + + the #GstMIKEYPayload at @idx. The payload +remains valid for as long as it is part of @msg. + + + + + a #GstMIKEYMessage + + + + an index + + + + + + Insert a Crypto Session map for SRTP in @msg at @idx + +When @idx is -1, the policy will be appended. + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + the index to insert at + + + + the map info + + + + + + Insert the @payload at index @idx in @msg. If @idx is -1, the payload +will be appended to @msg. + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + an index + + + + a #GstMIKEYPayload + + + + + + Remove the SRTP policy at @idx. + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + the index to remove + + + + + + Remove the payload in @msg at @idx + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + an index + + + + + + Replace a Crypto Session map for SRTP in @msg at @idx with @map. + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + the index to insert at + + + + the map info + + + + + + Replace the payload at @idx in @msg with @payload. + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + an index + + + + a #GstMIKEYPayload + + + + + + Set the information in @msg. + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + a version + + + + a #GstMIKEYType + + + + verify flag + + + + the #GstMIKEYPRFFunc function to use + + + + the Crypto Session Bundle id + + + + the #GstMIKEYCSIDMapType + + + + + + Convert @msg to a #GBytes. + + a new #GBytes for @msg. + + + + + a #GstMIKEYMessage + + + + a #GstMIKEYEncryptInfo + + + + + + + %TRUE on success + + + + + a #GstMIKEYMessage + + + + a #GstCaps to be filled with SRTP parameters (srtp/srtcp cipher, authorization, key data) + + + + + + + The PRF function that has been/will be used for key derivation + + MIKEY-1 PRF function + + + + Hold the common fields for all payloads + + + + + the payload type + + + + length of the payload + + + + Make a new #GstMIKEYPayload with @type. + + a new #GstMIKEYPayload or %NULL on failure. + + + + + a #GstMIKEYPayloadType + + + + + + Add a new sub payload to @payload. + + %TRUE on success. + + + + + a #GstMIKEYPayload + + + + a #GstMIKEYPayload to add + + + + + + Get the number of sub payloads of @payload. @payload should be of type +%GST_MIKEY_PT_KEMAC. + + the number of sub payloads in @payload + + + + + a #GstMIKEYPayload + + + + + + Get the sub payload of @payload at @idx. @payload should be of type +%GST_MIKEY_PT_KEMAC. + + the #GstMIKEYPayload at @idx. + + + + + a #GstMIKEYPayload + + + + an index + + + + + + Remove the sub payload at @idx in @payload. + + %TRUE on success. + + + + + a #GstMIKEYPayload + + + + the index to remove + + + + + + Set the KEMAC parameters. @payload should point to a %GST_MIKEY_PT_KEMAC +payload. + + %TRUE on success + + + + + a #GstMIKEYPayload + + + + the #GstMIKEYEncAlg + + + + a #GstMIKEYMacAlg + + + + + + Set the key validity period in the %GST_MIKEY_PT_KEY_DATA @payload. + + %TRUE on success + + + + + a #GstMIKEYPayload + + + + the length of @vf_data + + + + the Valid From data + + + + + + the length of @vt_data + + + + the Valid To data + + + + + + + + Set @key_len bytes of @key_data of type @key_type as the key for the +%GST_MIKEY_PT_KEY_DATA @payload. + + %TRUE on success + + + + + a #GstMIKEYPayload + + + + a #GstMIKEYKeyDataType + + + + the length of @key_data + + + + the key of type @key_type + + + + + + + + Set the salt key data. If @salt_len is 0 and @salt_data is %NULL, the +salt data will be removed. + + %TRUE on success + + + + + a #GstMIKEYPayload + + + + the length of @salt_data + + + + the salt + + + + + + + + Set the SPI/MKI validity in the %GST_MIKEY_PT_KEY_DATA @payload. + + %TRUE on success + + + + + a #GstMIKEYPayload + + + + the length of @spi_data + + + + the SPI/MKI data + + + + + + + + Set the PKE values in @payload. @payload must be of type +%GST_MIKEY_PT_PKE. + + %TRUE on success + + + + + a #GstMIKEYPayload + + + + envelope key cache indicator + + + + the length of @data + + + + the encrypted envelope key + + + + + + + + Set the random values in a %GST_MIKEY_PT_RAND @payload. + + %TRUE on success + + + + + a #GstMIKEYPayload + + + + the length of @rand + + + + random values + + + + + + + + Add a new parameter to the %GST_MIKEY_PT_SP @payload with @type, @len +and @val. + + %TRUE on success + + + + + a #GstMIKEYPayload + + + + a type + + + + a length + + + + @len bytes of data + + + + + + + + Get the number of security policy parameters in a %GST_MIKEY_PT_SP +@payload. + + the number of parameters in @payload + + + + + a #GstMIKEYPayload + + + + + + Get the Security Policy parameter in a %GST_MIKEY_PT_SP @payload +at @idx. + + the #GstMIKEYPayloadSPParam at @idx in @payload + + + + + a #GstMIKEYPayload + + + + an index + + + + + + Remove the Security Policy parameters from a %GST_MIKEY_PT_SP +@payload at @idx. + + %TRUE on success + + + + + a #GstMIKEYPayload + + + + an index + + + + + + Set the Security Policy parameters for @payload. + + %TRUE on success + + + + + a #GstMIKEYPayload + + + + the policy number + + + + a #GstMIKEYSecProto + + + + + + Set the timestamp in a %GST_MIKEY_PT_T @payload. + + %TRUE on success + + + + + a #GstMIKEYPayload + + + + the #GstMIKEYTSType + + + + the timestamp value + + + + + + + + + A structure holding the KEMAC payload + + the common #GstMIKEYPayload + + + + the #GstMIKEYEncAlg + + + + the #GstMIKEYMacAlg + + + + the subpayloads + + + + + + + The Key data payload contains key material. It should be added as sub +payload to the KEMAC. + + the payload header + + + + + + + length of @key_data + + + + + + + the length of @salt_data, can be 0 + + + + salt data + + + + the Key Validity type + + + + length of @kv_data + + + + + + key validity data + + + + + + + The Envelope data payload contains the encrypted envelope key that is +used in the public-key transport to protect the data in the Key data +transport payload. The encryption algorithm used is implicit from +the certificate/public key used. + + the common #GstMIKEYPayload + + + + envelope key cache indicator + + + + length of @data + + + + the encrypted envelope key + + + + + The RAND payload consists of a (pseudo-)random bit-string + + the payload header + + + + the length of @rand + + + + random values + + + + + The Security Policy payload defines a set of policies that apply to a +specific security protocol + + the payload header + + + + the policy number + + + + the security protocol + + + + array of #GstMIKEYPayloadPSParam + + + + + + + A Type/Length/Value field for security paramaters + + specifies the type of the parameter + + + + specifies the length of @val + + + + specifies the value of the parameter + + + + + The timestamp payload carries the timestamp information + + the payload header + + + + a #GstMIKEYTSType + + + + the timestamp value + + + + + Different MIKEY Payload types. + + Last payload + + + Key data transport payload + + + Envelope data payload + + + DH data payload + + + Signature payload + + + Timestamp payload + + + ID payload + + + Certificate Payload + + + Cert hash payload + + + Verfication message payload + + + Security Policy payload + + + RAND payload + + + Error payload + + + Key data sub-payload + + + General Extension Payload + + + + Specifies the security protocol + + + + + This policy specifies the parameters for SRTP and SRTCP + + Encryption algorithm + + + Session Encr. key length + + + Authentication algorithm + + + Session Auth. key length + + + Session Salt key length + + + SRTP Pseudo Random Function + + + Key derivation rate + + + SRTP encryption off/on, 0 if off, 1 if on + + + SRTCP encryption off/on, 0 if off, 1 if on + + + sender's FEC order + + + SRTP authentication off/on, 0 if off, 1 if on + + + Authentication tag length + + + SRTP prefix length + + + + Specifies the timestamp type. + + an NTP time in UTC timezone + + + an NTP time + + + a counter + + + + Different MIKEY data types. + + Invalid type + + + Initiator's pre-shared key message + + + Verification message of a Pre-shared key message + + + Initiator's public-key transport message + + + Verification message of a public-key message + + + Initiator's DH exchange message + + + Responder's DH exchange message + + + Error message + + + + The supported MIKEY version 1. + + + + The contents of the SDP "a=" field which contains a key/value pair. + + the attribute key + + + + the attribute value or NULL when it was a property attribute + + + + Clear the attribute. + + @GST_SDP_OK. + + + + + a #GstSDPAttribute + + + + + + Set the attribute with @key and @value. + + @GST_SDP_OK. + + + + + a #GstSDPAttribute + + + + the key + + + + the value + + + + + + + The contents of the SDP "b=" field which specifies the proposed bandwidth to +be used by the session or media. + + the bandwidth modifier type + + + + the bandwidth in kilobits per second + + + + Reset the bandwidth information in @bw. + + a #GstSDPResult. + + + + + a #GstSDPBandwidth + + + + + + Set bandwidth information in @bw. + + a #GstSDPResult. + + + + + a #GstSDPBandwidth + + + + the bandwidth modifier type + + + + the bandwidth in kilobits per second + + + + + + + The contents of the SDP "c=" field which contains connection data. + + the type of network. "IN" is defined to have the meaning + "Internet". + + + + the type of @address. + + + + the address + + + + the time to live of the address + + + + the number of layers + + + + Clear the connection. + + @GST_SDP_OK. + + + + + a #GstSDPConnection + + + + + + Set the connection with the given parameters. + + @GST_SDP_OK. + + + + + a #GstSDPConnection + + + + the type of network. "IN" is defined to have the meaning +"Internet". + + + + the type of address. + + + + the address + + + + the time to live of the address + + + + the number of layers + + + + + + + The contents of the SDP "k=" field which is used to convey encryption +keys. + + the encryption type + + + + the encryption data + + + + + The contents of the SDP "m=" field with all related fields. + + the media type + + + + the transport port to which the media stream will be sent + + + + the number of ports or -1 if only one port was specified + + + + the transport protocol + + + + an array of #gchar formats + + + + + + the media title + + + + array of #GstSDPConnection with media connection information + + + + + + array of #GstSDPBandwidth with media bandwidth information + + + + + + the encryption key + + + + array of #GstSDPAttribute with the additional media attributes + + + + + + Add the attribute with @key and @value to @media. + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + a key + + + + a value + + + + + + Add the bandwidth information with @bwtype and @bandwidth to @media. + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + the bandwidth modifier type + + + + the bandwidth in kilobits per second + + + + + + Add the given connection parameters to @media. + + a #GstSDPResult. + + + + + a #GstSDPMedia + + + + the type of network. "IN" is defined to have the meaning +"Internet". + + + + the type of address. + + + + the address + + + + the time to live of the address + + + + the number of layers + + + + + + Add the format information to @media. + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + the format + + + + + + Convert the contents of @media to a text string. + + A dynamically allocated string representing the media. + + + + + a #GstSDPMedia + + + + + + Get the number of attribute fields in @media. + + the number of attributes in @media. + + + + + a #GstSDPMedia + + + + + + Mapping of attributes of #GstSDPMedia to #GstCaps + + a #GstSDPResult. + + + + + a #GstSDPMedia + + + + a #GstCaps + + + + + + Get the number of bandwidth fields in @media. + + the number of bandwidths in @media. + + + + + a #GstSDPMedia + + + + + + Get the number of connection fields in @media. + + the number of connections in @media. + + + + + a #GstSDPMedia + + + + + + Allocate a new copy of @media and store the result in @copy. The value in +@copy should be release with gst_sdp_media_free function. + + a #GstSDPResult + + + + + a #GstSDPMedia + + + + pointer to new #GstSDPMedia + + + + + + Get the number of formats in @media. + + the number of formats in @media. + + + + + a #GstSDPMedia + + + + + + Free all resources allocated by @media. @media should not be used anymore after +this function. This function should be used when @media was dynamically +allocated with gst_sdp_media_new(). + + a #GstSDPResult. + + + + + a #GstSDPMedia + + + + + + Get the attribute at position @idx in @media. + + the #GstSDPAttribute at position @idx. + + + + + a #GstSDPMedia + + + + an index + + + + + + Get the first attribute value for @key in @media. + + the first attribute value for @key. + + + + + a #GstSDPMedia + + + + a key + + + + + + Get the @nth attribute value for @key in @media. + + the @nth attribute value. + + + + + a #GstSDPMedia + + + + a key + + + + an index + + + + + + Get the bandwidth at position @idx in @media. + + the #GstSDPBandwidth at position @idx. + + + + + a #GstSDPMedia + + + + an index + + + + + + Mapping of caps from SDP fields: + +a=rtpmap:(payload) (encoding_name)/(clock_rate)[/(encoding_params)] + +a=framesize:(payload) (width)-(height) + +a=fmtp:(payload) (param)[=(value)];... + + a #GstCaps, or %NULL if an error happened + + + + + a #GstSDPMedia + + + + a payload type + + + + + + Get the connection at position @idx in @media. + + the #GstSDPConnection at position @idx. + + + + + a #GstSDPMedia + + + + an index + + + + + + Get the format information at position @idx in @media. + + the format at position @idx. + + + + + a #GstSDPMedia + + + + an index + + + + + + Get the information of @media + + the information of @media. + + + + + a #GstSDPMedia + + + + + + Get the encryption information from @media. + + a #GstSDPKey. + + + + + a #GstSDPMedia + + + + + + Get the media description of @media. + + the media description. + + + + + a #GstSDPMedia + + + + + + Get the number of ports for @media. + + the number of ports for @media. + + + + + a #GstSDPMedia + + + + + + Get the port number for @media. + + the port number of @media. + + + + + a #GstSDPMedia + + + + + + Get the transport protocol of @media + + the transport protocol of @media. + + + + + a #GstSDPMedia + + + + + + Initialize @media so that its contents are as if it was freshly allocated +with gst_sdp_media_new(). This function is mostly used to initialize a media +allocated on the stack. gst_sdp_media_uninit() undoes this operation. + +When this function is invoked on newly allocated data (with malloc or on the +stack), its contents should be set to 0 before calling this function. + + a #GstSDPResult. + + + + + a #GstSDPMedia + + + + + + Insert the attribute to @media at @idx. When @idx is -1, +the attribute is appended. + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + an index + + + + a #GstSDPAttribute + + + + + + Insert the bandwidth information to @media at @idx. When @idx is -1, +the bandwidth is appended. + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + an index + + + + a #GstSDPBandwidth + + + + + + Insert the connection information to @media at @idx. When @idx is -1, +the connection is appended. + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + an index + + + + a #GstSDPConnection + + + + + + Insert the format information to @media at @idx. When @idx is -1, +the format is appended. + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + an index + + + + the format + + + + + + Creates a new #GstMIKEYMessage after parsing the key-mgmt attribute +from a #GstSDPMedia. + + a #GstSDPResult. + + + + + a #GstSDPMedia + + + + pointer to new #GstMIKEYMessage + + + + + + Remove the attribute in @media at @idx. + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + an index + + + + + + Remove the bandwidth information in @media at @idx. + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + an index + + + + + + Remove the connection information in @media at @idx. + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + an index + + + + + + Remove the format information in @media at @idx. + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + an index + + + + + + Replace the attribute in @media at @idx with @attr. + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + an index + + + + a #GstSDPAttribute + + + + + + Replace the bandwidth information in @media at @idx with @bw. + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + an index + + + + a #GstSDPBandwidth + + + + + + Replace the connection information in @media at @idx with @conn. + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + an index + + + + a #GstSDPConnection + + + + + + Replace the format information in @media at @idx with @format. + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + an index + + + + the format + + + + + + Set the media information of @media to @information. + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + the media information + + + + + + Adds the encryption information to @media. + + a #GstSDPResult. + + + + + a #GstSDPMedia + + + + the encryption type + + + + the encryption data + + + + + + Set the media description of @media to @med. + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + the media description + + + + + + Set the port information in @media. + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + the port number + + + + the number of ports + + + + + + Set the media transport protocol of @media to @proto. + + #GST_SDP_OK. + + + + + a #GstSDPMedia + + + + the media transport protocol + + + + + + Free all resources allocated in @media. @media should not be used anymore after +this function. This function should be used when @media was allocated on the +stack and initialized with gst_sdp_media_init(). + + a #GstSDPResult. + + + + + a #GstSDPMedia + + + + + + Allocate a new GstSDPMedia and store the result in @media. + + a #GstSDPResult. + + + + + pointer to new #GstSDPMedia + + + + + + Mapping of caps to SDP fields: + +a=rtpmap:(payload) (encoding_name) or (clock_rate)[or (encoding_params)] + +a=framesize:(payload) (width)-(height) + +a=fmtp:(payload) (param)[=(value)];... + +a=rtcp-fb:(payload) (param1) [param2]... + + a #GstSDPResult. + + + + + a #GstCaps + + + + a #GstSDPMedia + + + + + + + The GstSDPMessage helper functions makes it easy to parse and create SDP +messages. + + the protocol version + + + + owner/creator and session identifier + + + + session name + + + + session information + + + + URI of description + + + + array of #gchar with email addresses + + + + + + array of #gchar with phone numbers + + + + + + connection information for the session + + + + array of #GstSDPBandwidth with bandwidth information + + + + + + array of #GstSDPTime with time descriptions + + + + + + array of #GstSDPZone with time zone adjustments + + + + + + encryption key + + + + array of #GstSDPAttribute with session attributes + + + + + + array of #GstSDPMedia with media descriptions + + + + + + Add the attribute with @key and @value to @msg. + + @GST_SDP_OK. + + + + + a #GstSDPMessage + + + + the key + + + + the value + + + + + + Add the specified bandwidth information to @msg. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the bandwidth modifier type + + + + the bandwidth in kilobits per second + + + + + + Add @email to the list of emails in @msg. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + an email + + + + + + Adds @media to the array of medias in @msg. This function takes ownership of +the contents of @media so that @media will have to be reinitialized with +gst_sdp_media_init() before it can be used again. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + a #GstSDPMedia to add + + + + + + Add @phone to the list of phones in @msg. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + a phone + + + + + + Add time information @start and @stop to @msg. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the start time + + + + the stop time + + + + the repeat times + + + + + + + + Add time zone information to @msg. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the NTP time that a time zone adjustment happens + + + + the offset from the time when the session was first scheduled + + + + + + Convert the contents of @msg to a text string. + + A dynamically allocated string representing the SDP description. + + + + + a #GstSDPMessage + + + + + + Get the number of attributes in @msg. + + the number of attributes in @msg. + + + + + a #GstSDPMessage + + + + + + Mapping of attributes of #GstSDPMessage to #GstCaps + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + a #GstCaps + + + + + + Get the number of bandwidth information in @msg. + + the number of bandwidth information in @msg. + + + + + a #GstSDPMessage + + + + + + Allocate a new copy of @msg and store the result in @copy. The value in +@copy should be release with gst_sdp_message_free function. + + a #GstSDPResult + + + + + a #GstSDPMessage + + + + pointer to new #GstSDPMessage + + + + + + Dump the parsed contents of @msg to stdout. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + + + Get the number of emails in @msg. + + the number of emails in @msg. + + + + + a #GstSDPMessage + + + + + + Free all resources allocated by @msg. @msg should not be used anymore after +this function. This function should be used when @msg was dynamically +allocated with gst_sdp_message_new(). + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + + + Get the attribute at position @idx in @msg. + + the #GstSDPAttribute at position @idx. + + + + + a #GstSDPMessage + + + + the index + + + + + + Get the first attribute with key @key in @msg. + + the attribute value of the first attribute with @key. + + + + + a #GstSDPMessage + + + + the key + + + + + + Get the @nth attribute with key @key in @msg. + + the attribute value of the @nth attribute with @key. + + + + + a #GstSDPMessage + + + + the key + + + + the index + + + + + + Get the bandwidth at index @idx from @msg. + + a #GstSDPBandwidth. + + + + + a #GstSDPMessage + + + + the bandwidth index + + + + + + Get the connection of @msg. + + a #GstSDPConnection. The result remains valid as long as @msg is valid. + + + + + a #GstSDPMessage + + + + + + Get the email with number @idx from @msg. + + the email at position @idx. + + + + + a #GstSDPMessage + + + + an email index + + + + + + Get the information in @msg. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + + + Get the encryption information from @msg. + + a #GstSDPKey. + + + + + a #GstSDPMessage + + + + + + Get the media description at index @idx in @msg. + + a #GstSDPMedia. + + + + + a #GstSDPMessage + + + + the index + + + + + + Get the origin of @msg. + + a #GstSDPOrigin. The result remains valid as long as @msg is valid. + + + + + a #GstSDPMessage + + + + + + Get the phone with number @idx from @msg. + + the phone at position @idx. + + + + + a #GstSDPMessage + + + + a phone index + + + + + + Get the session name in @msg. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + + + Get time information with index @idx from @msg. + + a #GstSDPTime. + + + + + a #GstSDPMessage + + + + the time index + + + + + + Get the URI in @msg. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + + + Get the version in @msg. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + + + Get time zone information with index @idx from @msg. + + a #GstSDPZone. + + + + + a #GstSDPMessage + + + + the zone index + + + + + + Initialize @msg so that its contents are as if it was freshly allocated +with gst_sdp_message_new(). This function is mostly used to initialize a message +allocated on the stack. gst_sdp_message_uninit() undoes this operation. + +When this function is invoked on newly allocated data (with malloc or on the +stack), its contents should be set to 0 before calling this function. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + + + Insert attribute into the array of attributes in @msg +at index @idx. +When -1 is given as @idx, the attribute is inserted at the end. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + an index + + + + a #GstSDPAttribute + + + + + + Insert bandwidth parameters into the array of bandwidths in @msg +at index @idx. +When -1 is given as @idx, the bandwidth is inserted at the end. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + an index + + + + the bandwidth + + + + + + Insert @email into the array of emails in @msg at index @idx. +When -1 is given as @idx, the email is inserted at the end. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + an index + + + + an email + + + + + + Insert @phone into the array of phone numbers in @msg at index @idx. +When -1 is given as @idx, the phone is inserted at the end. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + a phone index + + + + a phone + + + + + + Insert time parameters into the array of times in @msg +at index @idx. +When -1 is given as @idx, the times are inserted at the end. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + an index + + + + a #GstSDPTime + + + + + + Insert zone parameters into the array of zones in @msg +at index @idx. +When -1 is given as @idx, the zone is inserted at the end. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + an index +@zone a #GstSDPZone + + + + + + + + + Get the number of media descriptions in @msg. + + the number of media descriptions in @msg. + + + + + a #GstSDPMessage + + + + + + Creates a new #GstMIKEYMessage after parsing the key-mgmt attribute +from a #GstSDPMessage. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + pointer to new #GstMIKEYMessage + + + + + + Get the number of phones in @msg. + + the number of phones in @msg. + + + + + a #GstSDPMessage + + + + + + Remove the attribute in @msg at index @idx. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the index + + + + + + Remove the bandwidth information in @msg at index @idx. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the bandwidth index + + + + + + Remove the email in @msg at index @idx. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + an email index + + + + + + Remove the phone number in @msg at index @idx. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + a phone index + + + + + + Remove the time information in @msg at index @idx. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the index + + + + + + Remove the zone information in @msg at index @idx. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the index + + + + + + Replace the attribute in @msg at index @idx with @attr. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the index + + + + a #GstSDPAttribute + + + + + + Replace the bandwidth information in @msg at index @idx with @bw. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the bandwidth index + + + + the bandwidth + + + + + + Replace the email in @msg at index @idx with @email. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + an email index + + + + an email + + + + + + Replace the phone number in @msg at index @idx with @phone. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + a phone index + + + + a phone + + + + + + Replace the time information in @msg at index @idx with @t. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the index + + + + a #GstSDPTime + + + + + + Replace the zone information in @msg at index @idx with @zone. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the index + + + + a #GstSDPZone + + + + + + Configure the SDP connection in @msg with the given parameters. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the type of network. "IN" is defined to have the meaning +"Internet". + + + + the type of address. + + + + the address + + + + the time to live of the address + + + + the number of layers + + + + + + Set the information in @msg. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the information + + + + + + Adds the encryption information to @msg. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the encryption type + + + + the encryption data + + + + + + Configure the SDP origin in @msg with the given parameters. + + #GST_SDP_OK. + + + + + a #GstSDPMessage + + + + the user name + + + + a session id + + + + a session version + + + + a network type + + + + an address type + + + + an address + + + + + + Set the session name in @msg. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the session name + + + + + + Set the URI in @msg. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the URI + + + + + + Set the version in @msg. + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + the version + + + + + + Get the number of time information entries in @msg. + + the number of time information entries in @msg. + + + + + a #GstSDPMessage + + + + + + Free all resources allocated in @msg. @msg should not be used anymore after +this function. This function should be used when @msg was allocated on the +stack and initialized with gst_sdp_message_init(). + + a #GstSDPResult. + + + + + a #GstSDPMessage + + + + + + Get the number of time zone information entries in @msg. + + the number of time zone information entries in @msg. + + + + + a #GstSDPMessage + + + + + + Creates a uri from @msg with the given @scheme. The uri has the format: + + \@scheme:///[#type=value *[&type=value]] + + Where each value is url encoded. + + a uri for @msg. + + + + + the uri scheme + + + + the #GstSDPMessage + + + + + + Allocate a new GstSDPMessage and store the result in @msg. + + a #GstSDPResult. + + + + + pointer to new #GstSDPMessage + + + + + + Parse the contents of @size bytes pointed to by @data and store the result in +@msg. + + #GST_SDP_OK on success. + + + + + the start of the buffer + + + + + + the size of the buffer + + + + the result #GstSDPMessage + + + + + + Parse the null-terminated @uri and store the result in @msg. + +The uri should be of the form: + + scheme://[address[:ttl=ttl][:noa=noa]]/[sessionname] + [#type=value *[&type=value]] + + where value is url encoded. This looslely resembles + http://tools.ietf.org/html/draft-fujikawa-sdp-url-01 + + #GST_SDP_OK on success. + + + + + the start of the uri + + + + the result #GstSDPMessage + + + + + + + The contents of the SDP "o=" field which gives the originator of the session +(their username and the address of the user's host) plus a session id and +session version number. + + the user's login on the originating host, or it is "-" + if the originating host does not support the concept of user ids. + + + + is a numeric string such that the tuple of @username, @sess_id, + @nettype, @addrtype and @addr form a globally unique identifier for the + session. + + + + a version number for this announcement + + + + the type of network. "IN" is defined to have the meaning + "Internet". + + + + the type of @addr. + + + + the globally unique address of the machine from which the session was + created. + + + + + Return values for the SDP functions. + + A successful return value + + + a function was given invalid parameters + + + + The contents of the SDP "t=" field which specify the start and stop times for +a conference session. + + start time for the conference. The value is the decimal + representation of Network Time Protocol (NTP) time values in seconds + + + + stop time for the conference. The value is the decimal + representation of Network Time Protocol (NTP) time values in seconds + + + + repeat times for a session + + + + + + Reset the time information in @t. + + a #GstSDPResult. + + + + + a #GstSDPTime + + + + + + Set time information @start, @stop and @repeat in @t. + + a #GstSDPResult. + + + + + a #GstSDPTime + + + + the start time + + + + the stop time + + + + the repeat times + + + + + + + + + The contents of the SDP "z=" field which allows the sender to +specify a list of time zone adjustments and offsets from the base +time. + + the NTP time that a time zone adjustment happens + + + + the offset from the time when the session was first scheduled + + + + Reset the zone information in @zone. + + a #GstSDPResult. + + + + + a #GstSDPZone + + + + + + Set zone information in @zone. + + a #GstSDPResult. + + + + + a #GstSDPZone + + + + the NTP time that a time zone adjustment happens + + + + the offset from the time when the session was first scheduled + + + + + + + The Application-Specific Maximum bandwidth modifier. + + + + The Conference Total bandwidth modifier. + + + + The extension prefix bandwidth modifier. + + + + RTCP bandwidth allocated to data receivers (RFC 3556). + + + + RTCP bandwidth allocated to active data senders (RFC 3556). + + + + Transport Independent Application Specific Maximum bandwidth (RFC 3890). + + + + Check if the given @addr is a multicast address. + + TRUE when @addr is multicast. + + + + + a network type + + + + an address type + + + + an address + + + + + + Makes key management data + + a #gchar key-mgmt data, + + + + + a #gchar URI + + + + a #gchar base64-encoded key data + + + + + + Allocate a new GstSDPMedia and store the result in @media. + + a #GstSDPResult. + + + + + pointer to new #GstSDPMedia + + + + + + Mapping of caps to SDP fields: + +a=rtpmap:(payload) (encoding_name) or (clock_rate)[or (encoding_params)] + +a=framesize:(payload) (width)-(height) + +a=fmtp:(payload) (param)[=(value)];... + +a=rtcp-fb:(payload) (param1) [param2]... + + a #GstSDPResult. + + + + + a #GstCaps + + + + a #GstSDPMedia + + + + + + Creates a uri from @msg with the given @scheme. The uri has the format: + + \@scheme:///[#type=value *[&type=value]] + + Where each value is url encoded. + + a uri for @msg. + + + + + the uri scheme + + + + the #GstSDPMessage + + + + + + Allocate a new GstSDPMessage and store the result in @msg. + + a #GstSDPResult. + + + + + pointer to new #GstSDPMessage + + + + + + Parse the contents of @size bytes pointed to by @data and store the result in +@msg. + + #GST_SDP_OK on success. + + + + + the start of the buffer + + + + + + the size of the buffer + + + + the result #GstSDPMessage + + + + + + Parse the null-terminated @uri and store the result in @msg. + +The uri should be of the form: + + scheme://[address[:ttl=ttl][:noa=noa]]/[sessionname] + [#type=value *[&type=value]] + + where value is url encoded. This looslely resembles + http://tools.ietf.org/html/draft-fujikawa-sdp-url-01 + + #GST_SDP_OK on success. + + + + + the start of the uri + + + + the result #GstSDPMessage + + + + + + diff --git a/gstreamer-rtsp-server-sys/CHANGELOG.md b/gstreamer-rtsp-server-sys/CHANGELOG.md new file mode 100644 index 000000000..0b8ae721c --- /dev/null +++ b/gstreamer-rtsp-server-sys/CHANGELOG.md @@ -0,0 +1,78 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html), +specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field). + +## [0.4.0] - 2017-12-23 +### Added +- GstNet bindings +- Debug impls for basically every type +- Script to automatically regenerate everything + +### Changed +- gst_player_[sg]et_multiview_mode() argument types were changed from + GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset + of the former that is allowed here +- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead + of *mut *const c_char + +## [0.3.0] - 2017-11-26 +### Added +- GstMpegTs bindings + +### Changed +- GstDebugColorFlags from an enum to a bitfield +- Updated to bitflags 1.0 +- Added support for the "dox" feature to generate documentation for all + possible versions +- Depend on glib-sys/gobject-sys 0.5 + +### Fixes +- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since + 1.12 and 1.12.1 respectively +- All C enums are represented as integers + constants now to prevent undefined + behaviour when out-of-range values are received + +## [0.2.1] - 2017-09-10 +### Changed +- Add README.md to all crates directly + +### Fixed +- Fix various compiler warnings +- Fix versioning/feature mess. Now each library has features for all major + versions and for the correct minor versions that added API. +- Removed Cargo.lock from GIT + +## [0.2.0] - 2017-08-28 +### Added +- Add GstPlayer bindings + +### Changed +- Depend on bitflags 0.9 +- Update GIR files to 1.12.1 release +- Fix various errors in the GIR files, backported from GStreamer GIT master +- Depend on gobject-sys/glib-sys 0.4.0 for various improvements +- Regenerated everything with latest GIR + +## [0.1.1] - 2017-05-10 +### Added +- Add GstTag and GstApp bindings +- Add lots of missing fields to all the structs thanks to GIR improvements + +### Changed +- Update GIR files to 1.12.0 release +- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs +- Regenerated everything with latest GIR + +## [0.1.0] - 2017-04-09 + +- Initial release of the autogenerated GStreamer FFI bindings. + +[Unreleased]: https://github.com/sdroege/gstreamer-sys/compare/0.4.0...HEAD +[0.4.0]: https://github.com/sdroege/gstreamer-sys/compare/0.3.0...0.4.0 +[0.3.0]: https://github.com/sdroege/gstreamer-sys/compare/0.2.1...0.3.0 +[0.2.1]: https://github.com/sdroege/gstreamer-sys/compare/0.2.0...0.2.1 +[0.2.0]: https://github.com/sdroege/gstreamer-sys/compare/0.1.1...0.2.0 +[0.1.1]: https://github.com/sdroege/gstreamer-sys/compare/0.1.0...0.1.1 diff --git a/gstreamer-rtsp-server-sys/Cargo.toml b/gstreamer-rtsp-server-sys/Cargo.toml new file mode 100644 index 000000000..d727136b1 --- /dev/null +++ b/gstreamer-rtsp-server-sys/Cargo.toml @@ -0,0 +1,55 @@ +[badges.travis-ci] +branch = "master" +repository = "sdroege/gstreamer-sys" + +[build-dependencies] +pkg-config = "0.3.7" + +[dependencies] +bitflags = "1.0" +libc = "0.2" + +[dependencies.gio-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.glib-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gobject-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gstreamer-net-sys] +path = "../gstreamer-net-sys" + +[dependencies.gstreamer-rtsp-sys] +path = "../gstreamer-rtsp-sys" + +[dependencies.gstreamer-sdp-sys] +path = "../gstreamer-sdp-sys" + +[dependencies.gstreamer-sys] +path = "../gstreamer-sys" + +[features] +dox = [] +v1_4 = [] +v1_6 = ["v1_4"] +v1_8 = ["v1_6"] +v1_10 = ["v1_8"] +v1_12 = ["v1_10"] + +[lib] +name = "gstreamer_rtsp_server_sys" + +[package] +authors = ["Mathieu Duponchelle "] +build = "build.rs" +description = "FFI bindings to libgstrtspserver-1.0" +homepage = "https://gstreamer.freedesktop.org" +keywords = ["ffi", "gstreamer", "gnome", "multimedia"] +license = "MIT" +links = "gstrtspserver-1.0" +name = "gstreamer-rtsp-server-sys" +readme = "README.md" +repository = "https://github.com/sdroege/gstreamer-sys" +version = "0.5.0" diff --git a/gstreamer-rtsp-server-sys/LICENSE b/gstreamer-rtsp-server-sys/LICENSE new file mode 100644 index 000000000..3d76f6e2f --- /dev/null +++ b/gstreamer-rtsp-server-sys/LICENSE @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) 2017 Sebastian Dröge . + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + diff --git a/gstreamer-rtsp-server-sys/README.md b/gstreamer-rtsp-server-sys/README.md new file mode 100644 index 000000000..7cdf5808d --- /dev/null +++ b/gstreamer-rtsp-server-sys/README.md @@ -0,0 +1,31 @@ +# gstreamer-rtsp-server-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-sys.svg)](https://crates.io/crates/gstreamer-sys) [![Build Status](https://travis-ci.org/sdroege/gstreamer-sys.svg?branch=master)](https://travis-ci.org/sdroege/gstreamer-sys) + +[GStreamer](https://gstreamer.freedesktop.org/) (Rtsp Server library) FFI bindings for Rust. + +These bindings are providing unsafe FFI API that can be used to interface with +GStreamer. Generally they are meant to be used as the building block for +higher-level abstractions like: + + * Application-side bindings for GStreamer: https://github.com/sdroege/gstreamer-rs + * Crate for writing GStreamer plugins in Rust: https://github.com/sdroege/gst-plugin-rs + +The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/) +based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/) +API metadata provided by the GStreamer project. + +## LICENSE + +gstreamer-sys and all crates contained here are licensed under the MIT +license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT). + +GStreamer itself is licensed under the Lesser General Public License version +2.1 or (at your option) any later version: +https://www.gnu.org/licenses/lgpl-2.1.html + +## Contribution + +Any kinds of contributions are welcome as a pull request. + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above, +without any additional terms or conditions. diff --git a/gstreamer-rtsp-server-sys/build.rs b/gstreamer-rtsp-server-sys/build.rs new file mode 100644 index 000000000..a28eace6b --- /dev/null +++ b/gstreamer-rtsp-server-sys/build.rs @@ -0,0 +1,67 @@ +extern crate pkg_config; + +use pkg_config::{Config, Error}; +use std::env; +use std::io::prelude::*; +use std::io; +use std::process; + +fn main() { + if let Err(s) = find() { + let _ = writeln!(io::stderr(), "{}", s); + process::exit(1); + } +} + +fn find() -> Result<(), Error> { + let package_name = "gstreamer-rtsp-server-1.0"; + let shared_libs = ["gstrtspserver-1.0"]; + let version = if cfg!(feature = "v1_12") { + "1.12" + } else if cfg!(feature = "v1_8") { + "1.8" + } else if cfg!(feature = "v1_6") { + "1.6" + } else { + "1.0" + }; + + if let Ok(lib_dir) = env::var("GTK_LIB_DIR") { + for lib_ in shared_libs.iter() { + println!("cargo:rustc-link-lib=dylib={}", lib_); + } + println!("cargo:rustc-link-search=native={}", lib_dir); + return Ok(()) + } + + let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); + let hardcode_shared_libs = target.contains("windows"); + + let mut config = Config::new(); + config.atleast_version(version); + if hardcode_shared_libs { + config.cargo_metadata(false); + } + match config.probe(package_name) { + Ok(library) => { + if hardcode_shared_libs { + for lib_ in shared_libs.iter() { + println!("cargo:rustc-link-lib=dylib={}", lib_); + } + for path in library.link_paths.iter() { + println!("cargo:rustc-link-search=native={}", + path.to_str().expect("library path doesn't exist")); + } + } + Ok(()) + } + Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => { + for lib_ in shared_libs.iter() { + println!("cargo:rustc-link-lib=dylib={}", lib_); + } + Ok(()) + } + Err(err) => Err(err), + } +} + diff --git a/gstreamer-rtsp-server-sys/src/lib.rs b/gstreamer-rtsp-server-sys/src/lib.rs new file mode 100644 index 000000000..93e7c92af --- /dev/null +++ b/gstreamer-rtsp-server-sys/src/lib.rs @@ -0,0 +1,1406 @@ +// This file was generated by gir (81a781f) from gir-files (???) +// DO NOT EDIT + +#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] + +extern crate libc; +#[macro_use] extern crate bitflags; +extern crate glib_sys as glib; +extern crate gobject_sys as gobject; +extern crate gio_sys as gio; +extern crate gstreamer_sys as gst; +extern crate gstreamer_net_sys as gst_net; +extern crate gstreamer_rtsp_sys as gst_rtsp; +extern crate gstreamer_sdp_sys as gst_sdp; + +#[allow(unused_imports)] +use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double, + c_short, c_ushort, c_long, c_ulong, + c_void, size_t, ssize_t, intptr_t, uintptr_t, time_t, FILE}; + +#[allow(unused_imports)] +use glib::{gboolean, gconstpointer, gpointer, GType, Volatile}; + +// Enums +pub type GstRTSPAddressPoolResult = c_int; +pub const GST_RTSP_ADDRESS_POOL_OK: GstRTSPAddressPoolResult = 0; +pub const GST_RTSP_ADDRESS_POOL_EINVAL: GstRTSPAddressPoolResult = -1; +pub const GST_RTSP_ADDRESS_POOL_ERESERVED: GstRTSPAddressPoolResult = -2; +pub const GST_RTSP_ADDRESS_POOL_ERANGE: GstRTSPAddressPoolResult = -3; +pub const GST_RTSP_ADDRESS_POOL_ELAST: GstRTSPAddressPoolResult = -4; + +pub type GstRTSPFilterResult = c_int; +pub const GST_RTSP_FILTER_REMOVE: GstRTSPFilterResult = 0; +pub const GST_RTSP_FILTER_KEEP: GstRTSPFilterResult = 1; +pub const GST_RTSP_FILTER_REF: GstRTSPFilterResult = 2; + +pub type GstRTSPMediaStatus = c_int; +pub const GST_RTSP_MEDIA_STATUS_UNPREPARED: GstRTSPMediaStatus = 0; +pub const GST_RTSP_MEDIA_STATUS_UNPREPARING: GstRTSPMediaStatus = 1; +pub const GST_RTSP_MEDIA_STATUS_PREPARING: GstRTSPMediaStatus = 2; +pub const GST_RTSP_MEDIA_STATUS_PREPARED: GstRTSPMediaStatus = 3; +pub const GST_RTSP_MEDIA_STATUS_SUSPENDED: GstRTSPMediaStatus = 4; +pub const GST_RTSP_MEDIA_STATUS_ERROR: GstRTSPMediaStatus = 5; + +pub type GstRTSPPublishClockMode = c_int; +pub const GST_RTSP_PUBLISH_CLOCK_MODE_NONE: GstRTSPPublishClockMode = 0; +pub const GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK: GstRTSPPublishClockMode = 1; +pub const GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK_AND_OFFSET: GstRTSPPublishClockMode = 2; + +pub type GstRTSPSuspendMode = c_int; +pub const GST_RTSP_SUSPEND_MODE_NONE: GstRTSPSuspendMode = 0; +pub const GST_RTSP_SUSPEND_MODE_PAUSE: GstRTSPSuspendMode = 1; +pub const GST_RTSP_SUSPEND_MODE_RESET: GstRTSPSuspendMode = 2; + +pub type GstRTSPThreadType = c_int; +pub const GST_RTSP_THREAD_TYPE_CLIENT: GstRTSPThreadType = 0; +pub const GST_RTSP_THREAD_TYPE_MEDIA: GstRTSPThreadType = 1; + +// Constants +pub const GST_RTSP_ADDRESS_POOL_ANY_IPV4: *const c_char = b"0.0.0.0\0" as *const u8 as *const c_char; +pub const GST_RTSP_ADDRESS_POOL_ANY_IPV6: *const c_char = b"::\0" as *const u8 as *const c_char; +pub const GST_RTSP_AUTH_CHECK_CONNECT: *const c_char = b"auth.check.connect\0" as *const u8 as *const c_char; +pub const GST_RTSP_AUTH_CHECK_MEDIA_FACTORY_ACCESS: *const c_char = b"auth.check.media.factory.access\0" as *const u8 as *const c_char; +pub const GST_RTSP_AUTH_CHECK_MEDIA_FACTORY_CONSTRUCT: *const c_char = b"auth.check.media.factory.construct\0" as *const u8 as *const c_char; +pub const GST_RTSP_AUTH_CHECK_TRANSPORT_CLIENT_SETTINGS: *const c_char = b"auth.check.transport.client-settings\0" as *const u8 as *const c_char; +pub const GST_RTSP_AUTH_CHECK_URL: *const c_char = b"auth.check.url\0" as *const u8 as *const c_char; +pub const GST_RTSP_PERM_MEDIA_FACTORY_ACCESS: *const c_char = b"media.factory.access\0" as *const u8 as *const c_char; +pub const GST_RTSP_PERM_MEDIA_FACTORY_CONSTRUCT: *const c_char = b"media.factory.construct\0" as *const u8 as *const c_char; +pub const GST_RTSP_TOKEN_MEDIA_FACTORY_ROLE: *const c_char = b"media.factory.role\0" as *const u8 as *const c_char; +pub const GST_RTSP_TOKEN_TRANSPORT_CLIENT_SETTINGS: *const c_char = b"transport.client-settings\0" as *const u8 as *const c_char; + +// Flags +bitflags! { + #[repr(C)] + pub struct GstRTSPAddressFlags: c_uint { + const NONE = 0; + const IPV4 = 1; + const IPV6 = 2; + const EVEN_PORT = 4; + const MULTICAST = 8; + const UNICAST = 16; + } +} +pub const GST_RTSP_ADDRESS_FLAG_NONE: GstRTSPAddressFlags = GstRTSPAddressFlags::NONE; +pub const GST_RTSP_ADDRESS_FLAG_IPV4: GstRTSPAddressFlags = GstRTSPAddressFlags::IPV4; +pub const GST_RTSP_ADDRESS_FLAG_IPV6: GstRTSPAddressFlags = GstRTSPAddressFlags::IPV6; +pub const GST_RTSP_ADDRESS_FLAG_EVEN_PORT: GstRTSPAddressFlags = GstRTSPAddressFlags::EVEN_PORT; +pub const GST_RTSP_ADDRESS_FLAG_MULTICAST: GstRTSPAddressFlags = GstRTSPAddressFlags::MULTICAST; +pub const GST_RTSP_ADDRESS_FLAG_UNICAST: GstRTSPAddressFlags = GstRTSPAddressFlags::UNICAST; + +bitflags! { + #[repr(C)] + pub struct GstRTSPTransportMode: c_uint { + const PLAY = 1; + const RECORD = 2; + } +} +pub const GST_RTSP_TRANSPORT_MODE_PLAY: GstRTSPTransportMode = GstRTSPTransportMode::PLAY; +pub const GST_RTSP_TRANSPORT_MODE_RECORD: GstRTSPTransportMode = GstRTSPTransportMode::RECORD; + +// Callbacks +pub type GstRTSPClientSendFunc = Option gboolean>; +pub type GstRTSPClientSessionFilterFunc = Option GstRTSPFilterResult>; +pub type GstRTSPKeepAliveFunc = Option; +pub type GstRTSPSendFunc = Option gboolean>; +pub type GstRTSPServerClientFilterFunc = Option GstRTSPFilterResult>; +pub type GstRTSPSessionFilterFunc = Option GstRTSPFilterResult>; +pub type GstRTSPSessionPoolFilterFunc = Option GstRTSPFilterResult>; +pub type GstRTSPSessionPoolFunc = Option gboolean>; +pub type GstRTSPStreamTransportFilterFunc = Option GstRTSPFilterResult>; + +// Records +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPAddress { + pub pool: *mut GstRTSPAddressPool, + pub address: *mut c_char, + pub port: u16, + pub n_ports: c_int, + pub ttl: u8, + pub priv_: gpointer, +} + +impl ::std::fmt::Debug for GstRTSPAddress { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPAddress @ {:?}", self as *const _)) + .field("pool", &self.pool) + .field("address", &self.address) + .field("port", &self.port) + .field("n_ports", &self.n_ports) + .field("ttl", &self.ttl) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPAddressPoolClass { + pub parent_class: gobject::GObjectClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPAddressPoolClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPAddressPoolClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct GstRTSPAddressPoolPrivate(c_void); + +impl ::std::fmt::Debug for GstRTSPAddressPoolPrivate { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPAddressPoolPrivate @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPAuthClass { + pub parent_class: gobject::GObjectClass, + pub authenticate: Option gboolean>, + pub check: Option gboolean>, + pub generate_authenticate_header: Option, + pub accept_certificate: Option gboolean>, + pub _gst_reserved: [gpointer; 3], +} + +impl ::std::fmt::Debug for GstRTSPAuthClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPAuthClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("authenticate", &self.authenticate) + .field("check", &self.check) + .field("generate_authenticate_header", &self.generate_authenticate_header) + .field("accept_certificate", &self.accept_certificate) + .finish() + } +} + +#[repr(C)] +pub struct GstRTSPAuthPrivate(c_void); + +impl ::std::fmt::Debug for GstRTSPAuthPrivate { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPAuthPrivate @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPClientClass { + pub parent_class: gobject::GObjectClass, + pub create_sdp: Option *mut gst_sdp::GstSDPMessage>, + pub configure_client_media: Option gboolean>, + pub configure_client_transport: Option gboolean>, + pub params_set: Option gst_rtsp::GstRTSPResult>, + pub params_get: Option gst_rtsp::GstRTSPResult>, + pub make_path_from_uri: Option *mut c_char>, + pub closed: Option, + pub new_session: Option, + pub options_request: Option, + pub describe_request: Option, + pub setup_request: Option, + pub play_request: Option, + pub pause_request: Option, + pub teardown_request: Option, + pub set_parameter_request: Option, + pub get_parameter_request: Option, + pub handle_response: Option, + pub tunnel_http_response: Option, + pub send_message: Option, + pub handle_sdp: Option gboolean>, + pub announce_request: Option, + pub record_request: Option, + pub check_requirements: Option *mut c_char>, + pub pre_options_request: Option gst_rtsp::GstRTSPStatusCode>, + pub pre_describe_request: Option gst_rtsp::GstRTSPStatusCode>, + pub pre_setup_request: Option gst_rtsp::GstRTSPStatusCode>, + pub pre_play_request: Option gst_rtsp::GstRTSPStatusCode>, + pub pre_pause_request: Option gst_rtsp::GstRTSPStatusCode>, + pub pre_teardown_request: Option gst_rtsp::GstRTSPStatusCode>, + pub pre_set_parameter_request: Option gst_rtsp::GstRTSPStatusCode>, + pub pre_get_parameter_request: Option gst_rtsp::GstRTSPStatusCode>, + pub pre_announce_request: Option gst_rtsp::GstRTSPStatusCode>, + pub pre_record_request: Option gst_rtsp::GstRTSPStatusCode>, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPClientClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPClientClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("create_sdp", &self.create_sdp) + .field("configure_client_media", &self.configure_client_media) + .field("configure_client_transport", &self.configure_client_transport) + .field("params_set", &self.params_set) + .field("params_get", &self.params_get) + .field("make_path_from_uri", &self.make_path_from_uri) + .field("closed", &self.closed) + .field("new_session", &self.new_session) + .field("options_request", &self.options_request) + .field("describe_request", &self.describe_request) + .field("setup_request", &self.setup_request) + .field("play_request", &self.play_request) + .field("pause_request", &self.pause_request) + .field("teardown_request", &self.teardown_request) + .field("set_parameter_request", &self.set_parameter_request) + .field("get_parameter_request", &self.get_parameter_request) + .field("handle_response", &self.handle_response) + .field("tunnel_http_response", &self.tunnel_http_response) + .field("send_message", &self.send_message) + .field("handle_sdp", &self.handle_sdp) + .field("announce_request", &self.announce_request) + .field("record_request", &self.record_request) + .field("check_requirements", &self.check_requirements) + .field("pre_options_request", &self.pre_options_request) + .field("pre_describe_request", &self.pre_describe_request) + .field("pre_setup_request", &self.pre_setup_request) + .field("pre_play_request", &self.pre_play_request) + .field("pre_pause_request", &self.pre_pause_request) + .field("pre_teardown_request", &self.pre_teardown_request) + .field("pre_set_parameter_request", &self.pre_set_parameter_request) + .field("pre_get_parameter_request", &self.pre_get_parameter_request) + .field("pre_announce_request", &self.pre_announce_request) + .field("pre_record_request", &self.pre_record_request) + .finish() + } +} + +#[repr(C)] +pub struct GstRTSPClientPrivate(c_void); + +impl ::std::fmt::Debug for GstRTSPClientPrivate { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPClientPrivate @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPContext { + pub server: *mut GstRTSPServer, + pub conn: *mut gst_rtsp::GstRTSPConnection, + pub client: *mut GstRTSPClient, + pub request: *mut gst_rtsp::GstRTSPMessage, + pub uri: *mut gst_rtsp::GstRTSPUrl, + pub method: gst_rtsp::GstRTSPMethod, + pub auth: *mut GstRTSPAuth, + pub token: *mut GstRTSPToken, + pub session: *mut GstRTSPSession, + pub sessmedia: *mut GstRTSPSessionMedia, + pub factory: *mut GstRTSPMediaFactory, + pub media: *mut GstRTSPMedia, + pub stream: *mut GstRTSPStream, + pub response: *mut gst_rtsp::GstRTSPMessage, + pub trans: *mut GstRTSPStreamTransport, + pub _gst_reserved: [gpointer; 3], +} + +impl ::std::fmt::Debug for GstRTSPContext { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPContext @ {:?}", self as *const _)) + .field("server", &self.server) + .field("conn", &self.conn) + .field("client", &self.client) + .field("request", &self.request) + .field("uri", &self.uri) + .field("method", &self.method) + .field("auth", &self.auth) + .field("token", &self.token) + .field("session", &self.session) + .field("sessmedia", &self.sessmedia) + .field("factory", &self.factory) + .field("media", &self.media) + .field("stream", &self.stream) + .field("response", &self.response) + .field("trans", &self.trans) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPMediaClass { + pub parent_class: gobject::GObjectClass, + pub handle_message: Option gboolean>, + pub prepare: Option gboolean>, + pub unprepare: Option gboolean>, + pub suspend: Option gboolean>, + pub unsuspend: Option gboolean>, + pub convert_range: Option gboolean>, + pub query_position: Option gboolean>, + pub query_stop: Option gboolean>, + pub create_rtpbin: Option *mut gst::GstElement>, + pub setup_rtpbin: Option gboolean>, + pub setup_sdp: Option gboolean>, + pub new_stream: Option, + pub removed_stream: Option, + pub prepared: Option, + pub unprepared: Option, + pub target_state: Option, + pub new_state: Option, + pub handle_sdp: Option gboolean>, + pub _gst_reserved: [gpointer; 19], +} + +impl ::std::fmt::Debug for GstRTSPMediaClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPMediaClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("handle_message", &self.handle_message) + .field("prepare", &self.prepare) + .field("unprepare", &self.unprepare) + .field("suspend", &self.suspend) + .field("unsuspend", &self.unsuspend) + .field("convert_range", &self.convert_range) + .field("query_position", &self.query_position) + .field("query_stop", &self.query_stop) + .field("create_rtpbin", &self.create_rtpbin) + .field("setup_rtpbin", &self.setup_rtpbin) + .field("setup_sdp", &self.setup_sdp) + .field("new_stream", &self.new_stream) + .field("removed_stream", &self.removed_stream) + .field("prepared", &self.prepared) + .field("unprepared", &self.unprepared) + .field("target_state", &self.target_state) + .field("new_state", &self.new_state) + .field("handle_sdp", &self.handle_sdp) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPMediaFactoryClass { + pub parent_class: gobject::GObjectClass, + pub gen_key: Option *mut c_char>, + pub create_element: Option *mut gst::GstElement>, + pub construct: Option *mut GstRTSPMedia>, + pub create_pipeline: Option *mut gst::GstElement>, + pub configure: Option, + pub media_constructed: Option, + pub media_configure: Option, + pub _gst_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GstRTSPMediaFactoryClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPMediaFactoryClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("gen_key", &self.gen_key) + .field("create_element", &self.create_element) + .field("construct", &self.construct) + .field("create_pipeline", &self.create_pipeline) + .field("configure", &self.configure) + .field("media_constructed", &self.media_constructed) + .field("media_configure", &self.media_configure) + .finish() + } +} + +#[repr(C)] +pub struct GstRTSPMediaFactoryPrivate(c_void); + +impl ::std::fmt::Debug for GstRTSPMediaFactoryPrivate { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPMediaFactoryPrivate @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPMediaFactoryURIClass { + pub parent_class: GstRTSPMediaFactoryClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPMediaFactoryURIClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPMediaFactoryURIClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct GstRTSPMediaFactoryURIPrivate(c_void); + +impl ::std::fmt::Debug for GstRTSPMediaFactoryURIPrivate { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPMediaFactoryURIPrivate @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstRTSPMediaPrivate(c_void); + +impl ::std::fmt::Debug for GstRTSPMediaPrivate { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPMediaPrivate @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPMountPointsClass { + pub parent_class: gobject::GObjectClass, + pub make_path: Option *mut c_char>, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPMountPointsClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPMountPointsClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("make_path", &self.make_path) + .finish() + } +} + +#[repr(C)] +pub struct GstRTSPMountPointsPrivate(c_void); + +impl ::std::fmt::Debug for GstRTSPMountPointsPrivate { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPMountPointsPrivate @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPPermissions { + pub mini_object: gst::GstMiniObject, +} + +impl ::std::fmt::Debug for GstRTSPPermissions { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPPermissions @ {:?}", self as *const _)) + .field("mini_object", &self.mini_object) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPServerClass { + pub parent_class: gobject::GObjectClass, + pub create_client: Option *mut GstRTSPClient>, + pub client_connected: Option, + pub _gst_reserved: [gpointer; 20], +} + +impl ::std::fmt::Debug for GstRTSPServerClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPServerClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("create_client", &self.create_client) + .field("client_connected", &self.client_connected) + .finish() + } +} + +#[repr(C)] +pub struct GstRTSPServerPrivate(c_void); + +impl ::std::fmt::Debug for GstRTSPServerPrivate { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPServerPrivate @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPSessionClass { + pub parent_class: gobject::GObjectClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPSessionClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPSessionClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPSessionMediaClass { + pub parent_class: gobject::GObjectClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPSessionMediaClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPSessionMediaClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct GstRTSPSessionMediaPrivate(c_void); + +impl ::std::fmt::Debug for GstRTSPSessionMediaPrivate { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPSessionMediaPrivate @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPSessionPoolClass { + pub parent_class: gobject::GObjectClass, + pub create_session_id: Option *mut c_char>, + pub create_session: Option *mut GstRTSPSession>, + pub session_removed: Option, + pub _gst_reserved: [gpointer; 19], +} + +impl ::std::fmt::Debug for GstRTSPSessionPoolClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPSessionPoolClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("create_session_id", &self.create_session_id) + .field("create_session", &self.create_session) + .field("session_removed", &self.session_removed) + .finish() + } +} + +#[repr(C)] +pub struct GstRTSPSessionPoolPrivate(c_void); + +impl ::std::fmt::Debug for GstRTSPSessionPoolPrivate { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPSessionPoolPrivate @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstRTSPSessionPrivate(c_void); + +impl ::std::fmt::Debug for GstRTSPSessionPrivate { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPSessionPrivate @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPStreamClass { + pub parent_class: gobject::GObjectClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPStreamClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPStreamClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct GstRTSPStreamPrivate(c_void); + +impl ::std::fmt::Debug for GstRTSPStreamPrivate { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPStreamPrivate @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPStreamTransportClass { + pub parent_class: gobject::GObjectClass, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPStreamTransportClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPStreamTransportClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct GstRTSPStreamTransportPrivate(c_void); + +impl ::std::fmt::Debug for GstRTSPStreamTransportPrivate { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPStreamTransportPrivate @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPThread { + pub mini_object: gst::GstMiniObject, + pub type_: GstRTSPThreadType, + pub context: *mut glib::GMainContext, + pub loop_: *mut glib::GMainLoop, +} + +impl ::std::fmt::Debug for GstRTSPThread { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPThread @ {:?}", self as *const _)) + .field("mini_object", &self.mini_object) + .field("type_", &self.type_) + .field("context", &self.context) + .field("loop_", &self.loop_) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPThreadPoolClass { + pub parent_class: gobject::GObjectClass, + pub pool: *mut glib::GThreadPool, + pub get_thread: Option *mut GstRTSPThread>, + pub configure_thread: Option, + pub thread_enter: Option, + pub thread_leave: Option, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPThreadPoolClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPThreadPoolClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .field("pool", &self.pool) + .field("get_thread", &self.get_thread) + .field("configure_thread", &self.configure_thread) + .field("thread_enter", &self.thread_enter) + .field("thread_leave", &self.thread_leave) + .finish() + } +} + +#[repr(C)] +pub struct GstRTSPThreadPoolPrivate(c_void); + +impl ::std::fmt::Debug for GstRTSPThreadPoolPrivate { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPThreadPoolPrivate @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPToken { + pub mini_object: gst::GstMiniObject, +} + +impl ::std::fmt::Debug for GstRTSPToken { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPToken @ {:?}", self as *const _)) + .field("mini_object", &self.mini_object) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstSDPInfo { + pub is_ipv6: gboolean, + pub server_ip: *const c_char, +} + +impl ::std::fmt::Debug for GstSDPInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstSDPInfo @ {:?}", self as *const _)) + .field("is_ipv6", &self.is_ipv6) + .field("server_ip", &self.server_ip) + .finish() + } +} + +// Classes +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPAddressPool { + pub parent: gobject::GObject, + pub priv_: *mut GstRTSPAddressPoolPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPAddressPool { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPAddressPool @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPAuth { + pub parent: gobject::GObject, + pub priv_: *mut GstRTSPAuthPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPAuth { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPAuth @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPClient { + pub parent: gobject::GObject, + pub priv_: *mut GstRTSPClientPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPClient { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPClient @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPMedia { + pub parent: gobject::GObject, + pub priv_: *mut GstRTSPMediaPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPMedia { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPMedia @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPMediaFactory { + pub parent: gobject::GObject, + pub priv_: *mut GstRTSPMediaFactoryPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPMediaFactory { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPMediaFactory @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPMediaFactoryURI { + pub parent: GstRTSPMediaFactory, + pub priv_: *mut GstRTSPMediaFactoryURIPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPMediaFactoryURI { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPMediaFactoryURI @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPMountPoints { + pub parent: gobject::GObject, + pub priv_: *mut GstRTSPMountPointsPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPMountPoints { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPMountPoints @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPServer { + pub parent: gobject::GObject, + pub priv_: *mut GstRTSPServerPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPServer { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPServer @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPSession { + pub parent: gobject::GObject, + pub priv_: *mut GstRTSPSessionPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPSession { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPSession @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPSessionMedia { + pub parent: gobject::GObject, + pub priv_: *mut GstRTSPSessionMediaPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPSessionMedia { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPSessionMedia @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPSessionPool { + pub parent: gobject::GObject, + pub priv_: *mut GstRTSPSessionPoolPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPSessionPool { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPSessionPool @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPStream { + pub parent: gobject::GObject, + pub priv_: *mut GstRTSPStreamPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPStream { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPStream @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPStreamTransport { + pub parent: gobject::GObject, + pub priv_: *mut GstRTSPStreamTransportPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPStreamTransport { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPStreamTransport @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPThreadPool { + pub parent: gobject::GObject, + pub priv_: *mut GstRTSPThreadPoolPrivate, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPThreadPool { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPThreadPool @ {:?}", self as *const _)) + .field("parent", &self.parent) + .finish() + } +} + +extern "C" { + + //========================================================================= + // GstRTSPPublishClockMode + //========================================================================= + pub fn gst_rtsp_publish_clock_mode_get_type() -> GType; + + //========================================================================= + // GstRTSPSuspendMode + //========================================================================= + pub fn gst_rtsp_suspend_mode_get_type() -> GType; + + //========================================================================= + // GstRTSPTransportMode + //========================================================================= + pub fn gst_rtsp_transport_mode_get_type() -> GType; + + //========================================================================= + // GstRTSPAddress + //========================================================================= + pub fn gst_rtsp_address_get_type() -> GType; + pub fn gst_rtsp_address_copy(addr: *mut GstRTSPAddress) -> *mut GstRTSPAddress; + pub fn gst_rtsp_address_free(addr: *mut GstRTSPAddress); + + //========================================================================= + // GstRTSPContext + //========================================================================= + pub fn gst_rtsp_context_pop_current(ctx: *mut GstRTSPContext); + pub fn gst_rtsp_context_push_current(ctx: *mut GstRTSPContext); + pub fn gst_rtsp_context_get_current() -> *mut GstRTSPContext; + + //========================================================================= + // GstRTSPPermissions + //========================================================================= + pub fn gst_rtsp_permissions_get_type() -> GType; + pub fn gst_rtsp_permissions_new() -> *mut GstRTSPPermissions; + pub fn gst_rtsp_permissions_add_role(permissions: *mut GstRTSPPermissions, role: *const c_char, fieldname: *const c_char, ...); + //pub fn gst_rtsp_permissions_add_role_valist(permissions: *mut GstRTSPPermissions, role: *const c_char, fieldname: *const c_char, var_args: /*Unimplemented*/va_list); + pub fn gst_rtsp_permissions_get_role(permissions: *mut GstRTSPPermissions, role: *const c_char) -> *const gst::GstStructure; + pub fn gst_rtsp_permissions_is_allowed(permissions: *mut GstRTSPPermissions, role: *const c_char, permission: *const c_char) -> gboolean; + pub fn gst_rtsp_permissions_remove_role(permissions: *mut GstRTSPPermissions, role: *const c_char); + + //========================================================================= + // GstRTSPThread + //========================================================================= + pub fn gst_rtsp_thread_get_type() -> GType; + pub fn gst_rtsp_thread_new(type_: GstRTSPThreadType) -> *mut GstRTSPThread; + pub fn gst_rtsp_thread_reuse(thread: *mut GstRTSPThread) -> gboolean; + pub fn gst_rtsp_thread_stop(thread: *mut GstRTSPThread); + + //========================================================================= + // GstRTSPToken + //========================================================================= + pub fn gst_rtsp_token_get_type() -> GType; + pub fn gst_rtsp_token_new(firstfield: *const c_char, ...) -> *mut GstRTSPToken; + pub fn gst_rtsp_token_new_empty() -> *mut GstRTSPToken; + //pub fn gst_rtsp_token_new_valist(firstfield: *const c_char, var_args: /*Unimplemented*/va_list) -> *mut GstRTSPToken; + pub fn gst_rtsp_token_get_string(token: *mut GstRTSPToken, field: *const c_char) -> *const c_char; + pub fn gst_rtsp_token_get_structure(token: *mut GstRTSPToken) -> *const gst::GstStructure; + pub fn gst_rtsp_token_is_allowed(token: *mut GstRTSPToken, field: *const c_char) -> gboolean; + pub fn gst_rtsp_token_writable_structure(token: *mut GstRTSPToken) -> *mut gst::GstStructure; + + //========================================================================= + // GstRTSPAddressPool + //========================================================================= + pub fn gst_rtsp_address_pool_get_type() -> GType; + pub fn gst_rtsp_address_pool_new() -> *mut GstRTSPAddressPool; + pub fn gst_rtsp_address_pool_acquire_address(pool: *mut GstRTSPAddressPool, flags: GstRTSPAddressFlags, n_ports: c_int) -> *mut GstRTSPAddress; + pub fn gst_rtsp_address_pool_add_range(pool: *mut GstRTSPAddressPool, min_address: *const c_char, max_address: *const c_char, min_port: u16, max_port: u16, ttl: u8) -> gboolean; + pub fn gst_rtsp_address_pool_clear(pool: *mut GstRTSPAddressPool); + pub fn gst_rtsp_address_pool_dump(pool: *mut GstRTSPAddressPool); + pub fn gst_rtsp_address_pool_has_unicast_addresses(pool: *mut GstRTSPAddressPool) -> gboolean; + pub fn gst_rtsp_address_pool_reserve_address(pool: *mut GstRTSPAddressPool, ip_address: *const c_char, port: c_uint, n_ports: c_uint, ttl: c_uint, address: *mut *mut GstRTSPAddress) -> GstRTSPAddressPoolResult; + + //========================================================================= + // GstRTSPAuth + //========================================================================= + pub fn gst_rtsp_auth_get_type() -> GType; + pub fn gst_rtsp_auth_new() -> *mut GstRTSPAuth; + pub fn gst_rtsp_auth_check(check: *const c_char) -> gboolean; + pub fn gst_rtsp_auth_make_basic(user: *const c_char, pass: *const c_char) -> *mut c_char; + pub fn gst_rtsp_auth_add_basic(auth: *mut GstRTSPAuth, basic: *const c_char, token: *mut GstRTSPToken); + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_rtsp_auth_add_digest(auth: *mut GstRTSPAuth, user: *const c_char, pass: *const c_char, token: *mut GstRTSPToken); + pub fn gst_rtsp_auth_get_default_token(auth: *mut GstRTSPAuth) -> *mut GstRTSPToken; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_rtsp_auth_get_supported_methods(auth: *mut GstRTSPAuth) -> gst_rtsp::GstRTSPAuthMethod; + pub fn gst_rtsp_auth_get_tls_authentication_mode(auth: *mut GstRTSPAuth) -> gio::GTlsAuthenticationMode; + pub fn gst_rtsp_auth_get_tls_certificate(auth: *mut GstRTSPAuth) -> *mut gio::GTlsCertificate; + #[cfg(any(feature = "v1_6", feature = "dox"))] + pub fn gst_rtsp_auth_get_tls_database(auth: *mut GstRTSPAuth) -> *mut gio::GTlsDatabase; + pub fn gst_rtsp_auth_remove_basic(auth: *mut GstRTSPAuth, basic: *const c_char); + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_rtsp_auth_remove_digest(auth: *mut GstRTSPAuth, user: *const c_char); + pub fn gst_rtsp_auth_set_default_token(auth: *mut GstRTSPAuth, token: *mut GstRTSPToken); + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_rtsp_auth_set_supported_methods(auth: *mut GstRTSPAuth, methods: gst_rtsp::GstRTSPAuthMethod); + #[cfg(any(feature = "v1_6", feature = "dox"))] + pub fn gst_rtsp_auth_set_tls_authentication_mode(auth: *mut GstRTSPAuth, mode: gio::GTlsAuthenticationMode); + pub fn gst_rtsp_auth_set_tls_certificate(auth: *mut GstRTSPAuth, cert: *mut gio::GTlsCertificate); + pub fn gst_rtsp_auth_set_tls_database(auth: *mut GstRTSPAuth, database: *mut gio::GTlsDatabase); + + //========================================================================= + // GstRTSPClient + //========================================================================= + pub fn gst_rtsp_client_get_type() -> GType; + pub fn gst_rtsp_client_new() -> *mut GstRTSPClient; + pub fn gst_rtsp_client_attach(client: *mut GstRTSPClient, context: *mut glib::GMainContext) -> c_uint; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_rtsp_client_close(client: *mut GstRTSPClient); + pub fn gst_rtsp_client_get_auth(client: *mut GstRTSPClient) -> *mut GstRTSPAuth; + pub fn gst_rtsp_client_get_connection(client: *mut GstRTSPClient) -> *mut gst_rtsp::GstRTSPConnection; + pub fn gst_rtsp_client_get_mount_points(client: *mut GstRTSPClient) -> *mut GstRTSPMountPoints; + pub fn gst_rtsp_client_get_session_pool(client: *mut GstRTSPClient) -> *mut GstRTSPSessionPool; + pub fn gst_rtsp_client_get_thread_pool(client: *mut GstRTSPClient) -> *mut GstRTSPThreadPool; + pub fn gst_rtsp_client_handle_message(client: *mut GstRTSPClient, message: *mut gst_rtsp::GstRTSPMessage) -> gst_rtsp::GstRTSPResult; + pub fn gst_rtsp_client_send_message(client: *mut GstRTSPClient, session: *mut GstRTSPSession, message: *mut gst_rtsp::GstRTSPMessage) -> gst_rtsp::GstRTSPResult; + pub fn gst_rtsp_client_session_filter(client: *mut GstRTSPClient, func: GstRTSPClientSessionFilterFunc, user_data: gpointer) -> *mut glib::GList; + pub fn gst_rtsp_client_set_auth(client: *mut GstRTSPClient, auth: *mut GstRTSPAuth); + pub fn gst_rtsp_client_set_connection(client: *mut GstRTSPClient, conn: *mut gst_rtsp::GstRTSPConnection) -> gboolean; + pub fn gst_rtsp_client_set_mount_points(client: *mut GstRTSPClient, mounts: *mut GstRTSPMountPoints); + pub fn gst_rtsp_client_set_send_func(client: *mut GstRTSPClient, func: GstRTSPClientSendFunc, user_data: gpointer, notify: glib::GDestroyNotify); + pub fn gst_rtsp_client_set_session_pool(client: *mut GstRTSPClient, pool: *mut GstRTSPSessionPool); + pub fn gst_rtsp_client_set_thread_pool(client: *mut GstRTSPClient, pool: *mut GstRTSPThreadPool); + + //========================================================================= + // GstRTSPMedia + //========================================================================= + pub fn gst_rtsp_media_get_type() -> GType; + pub fn gst_rtsp_media_new(element: *mut gst::GstElement) -> *mut GstRTSPMedia; + pub fn gst_rtsp_media_collect_streams(media: *mut GstRTSPMedia); + pub fn gst_rtsp_media_create_stream(media: *mut GstRTSPMedia, payloader: *mut gst::GstElement, pad: *mut gst::GstPad) -> *mut GstRTSPStream; + pub fn gst_rtsp_media_find_stream(media: *mut GstRTSPMedia, control: *const c_char) -> *mut GstRTSPStream; + pub fn gst_rtsp_media_get_address_pool(media: *mut GstRTSPMedia) -> *mut GstRTSPAddressPool; + pub fn gst_rtsp_media_get_base_time(media: *mut GstRTSPMedia) -> gst::GstClockTime; + pub fn gst_rtsp_media_get_buffer_size(media: *mut GstRTSPMedia) -> c_uint; + pub fn gst_rtsp_media_get_clock(media: *mut GstRTSPMedia) -> *mut gst::GstClock; + pub fn gst_rtsp_media_get_element(media: *mut GstRTSPMedia) -> *mut gst::GstElement; + pub fn gst_rtsp_media_get_latency(media: *mut GstRTSPMedia) -> c_uint; + pub fn gst_rtsp_media_get_multicast_iface(media: *mut GstRTSPMedia) -> *mut c_char; + pub fn gst_rtsp_media_get_permissions(media: *mut GstRTSPMedia) -> *mut GstRTSPPermissions; + pub fn gst_rtsp_media_get_profiles(media: *mut GstRTSPMedia) -> gst_rtsp::GstRTSPProfile; + pub fn gst_rtsp_media_get_protocols(media: *mut GstRTSPMedia) -> gst_rtsp::GstRTSPLowerTrans; + #[cfg(any(feature = "v1_8", feature = "dox"))] + pub fn gst_rtsp_media_get_publish_clock_mode(media: *mut GstRTSPMedia) -> GstRTSPPublishClockMode; + pub fn gst_rtsp_media_get_range_string(media: *mut GstRTSPMedia, play: gboolean, unit: gst_rtsp::GstRTSPRangeUnit) -> *mut c_char; + pub fn gst_rtsp_media_get_retransmission_time(media: *mut GstRTSPMedia) -> gst::GstClockTime; + pub fn gst_rtsp_media_get_status(media: *mut GstRTSPMedia) -> GstRTSPMediaStatus; + pub fn gst_rtsp_media_get_stream(media: *mut GstRTSPMedia, idx: c_uint) -> *mut GstRTSPStream; + pub fn gst_rtsp_media_get_suspend_mode(media: *mut GstRTSPMedia) -> GstRTSPSuspendMode; + pub fn gst_rtsp_media_get_time_provider(media: *mut GstRTSPMedia, address: *const c_char, port: u16) -> *mut gst_net::GstNetTimeProvider; + pub fn gst_rtsp_media_get_transport_mode(media: *mut GstRTSPMedia) -> GstRTSPTransportMode; + pub fn gst_rtsp_media_handle_sdp(media: *mut GstRTSPMedia, sdp: *mut gst_sdp::GstSDPMessage) -> gboolean; + pub fn gst_rtsp_media_is_eos_shutdown(media: *mut GstRTSPMedia) -> gboolean; + pub fn gst_rtsp_media_is_reusable(media: *mut GstRTSPMedia) -> gboolean; + pub fn gst_rtsp_media_is_shared(media: *mut GstRTSPMedia) -> gboolean; + pub fn gst_rtsp_media_is_stop_on_disconnect(media: *mut GstRTSPMedia) -> gboolean; + pub fn gst_rtsp_media_is_time_provider(media: *mut GstRTSPMedia) -> gboolean; + pub fn gst_rtsp_media_n_streams(media: *mut GstRTSPMedia) -> c_uint; + pub fn gst_rtsp_media_prepare(media: *mut GstRTSPMedia, thread: *mut GstRTSPThread) -> gboolean; + pub fn gst_rtsp_media_seek(media: *mut GstRTSPMedia, range: *mut gst_rtsp::GstRTSPTimeRange) -> gboolean; + pub fn gst_rtsp_media_set_address_pool(media: *mut GstRTSPMedia, pool: *mut GstRTSPAddressPool); + pub fn gst_rtsp_media_set_buffer_size(media: *mut GstRTSPMedia, size: c_uint); + pub fn gst_rtsp_media_set_clock(media: *mut GstRTSPMedia, clock: *mut gst::GstClock); + pub fn gst_rtsp_media_set_eos_shutdown(media: *mut GstRTSPMedia, eos_shutdown: gboolean); + pub fn gst_rtsp_media_set_latency(media: *mut GstRTSPMedia, latency: c_uint); + pub fn gst_rtsp_media_set_multicast_iface(media: *mut GstRTSPMedia, multicast_iface: *const c_char); + pub fn gst_rtsp_media_set_permissions(media: *mut GstRTSPMedia, permissions: *mut GstRTSPPermissions); + pub fn gst_rtsp_media_set_pipeline_state(media: *mut GstRTSPMedia, state: gst::GstState); + pub fn gst_rtsp_media_set_profiles(media: *mut GstRTSPMedia, profiles: gst_rtsp::GstRTSPProfile); + pub fn gst_rtsp_media_set_protocols(media: *mut GstRTSPMedia, protocols: gst_rtsp::GstRTSPLowerTrans); + #[cfg(any(feature = "v1_8", feature = "dox"))] + pub fn gst_rtsp_media_set_publish_clock_mode(media: *mut GstRTSPMedia, mode: GstRTSPPublishClockMode); + pub fn gst_rtsp_media_set_retransmission_time(media: *mut GstRTSPMedia, time: gst::GstClockTime); + pub fn gst_rtsp_media_set_reusable(media: *mut GstRTSPMedia, reusable: gboolean); + pub fn gst_rtsp_media_set_shared(media: *mut GstRTSPMedia, shared: gboolean); + pub fn gst_rtsp_media_set_state(media: *mut GstRTSPMedia, state: gst::GstState, transports: *mut glib::GPtrArray) -> gboolean; + pub fn gst_rtsp_media_set_stop_on_disconnect(media: *mut GstRTSPMedia, stop_on_disconnect: gboolean); + pub fn gst_rtsp_media_set_suspend_mode(media: *mut GstRTSPMedia, mode: GstRTSPSuspendMode); + pub fn gst_rtsp_media_set_transport_mode(media: *mut GstRTSPMedia, mode: GstRTSPTransportMode); + pub fn gst_rtsp_media_setup_sdp(media: *mut GstRTSPMedia, sdp: *mut gst_sdp::GstSDPMessage, info: *mut GstSDPInfo) -> gboolean; + pub fn gst_rtsp_media_suspend(media: *mut GstRTSPMedia) -> gboolean; + pub fn gst_rtsp_media_take_pipeline(media: *mut GstRTSPMedia, pipeline: *mut gst::GstPipeline); + pub fn gst_rtsp_media_unprepare(media: *mut GstRTSPMedia) -> gboolean; + pub fn gst_rtsp_media_unsuspend(media: *mut GstRTSPMedia) -> gboolean; + pub fn gst_rtsp_media_use_time_provider(media: *mut GstRTSPMedia, time_provider: gboolean); + + //========================================================================= + // GstRTSPMediaFactory + //========================================================================= + pub fn gst_rtsp_media_factory_get_type() -> GType; + pub fn gst_rtsp_media_factory_new() -> *mut GstRTSPMediaFactory; + pub fn gst_rtsp_media_factory_add_role(factory: *mut GstRTSPMediaFactory, role: *const c_char, fieldname: *const c_char, ...); + pub fn gst_rtsp_media_factory_construct(factory: *mut GstRTSPMediaFactory, url: *const gst_rtsp::GstRTSPUrl) -> *mut GstRTSPMedia; + pub fn gst_rtsp_media_factory_create_element(factory: *mut GstRTSPMediaFactory, url: *const gst_rtsp::GstRTSPUrl) -> *mut gst::GstElement; + pub fn gst_rtsp_media_factory_get_address_pool(factory: *mut GstRTSPMediaFactory) -> *mut GstRTSPAddressPool; + pub fn gst_rtsp_media_factory_get_buffer_size(factory: *mut GstRTSPMediaFactory) -> c_uint; + #[cfg(any(feature = "v1_8", feature = "dox"))] + pub fn gst_rtsp_media_factory_get_clock(factory: *mut GstRTSPMediaFactory) -> *mut gst::GstClock; + pub fn gst_rtsp_media_factory_get_latency(factory: *mut GstRTSPMediaFactory) -> c_uint; + pub fn gst_rtsp_media_factory_get_launch(factory: *mut GstRTSPMediaFactory) -> *mut c_char; + #[cfg(any(feature = "v1_6", feature = "dox"))] + pub fn gst_rtsp_media_factory_get_media_gtype(factory: *mut GstRTSPMediaFactory) -> GType; + pub fn gst_rtsp_media_factory_get_multicast_iface(factory: *mut GstRTSPMediaFactory) -> *mut c_char; + pub fn gst_rtsp_media_factory_get_permissions(factory: *mut GstRTSPMediaFactory) -> *mut GstRTSPPermissions; + pub fn gst_rtsp_media_factory_get_profiles(factory: *mut GstRTSPMediaFactory) -> gst_rtsp::GstRTSPProfile; + pub fn gst_rtsp_media_factory_get_protocols(factory: *mut GstRTSPMediaFactory) -> gst_rtsp::GstRTSPLowerTrans; + #[cfg(any(feature = "v1_8", feature = "dox"))] + pub fn gst_rtsp_media_factory_get_publish_clock_mode(factory: *mut GstRTSPMediaFactory) -> GstRTSPPublishClockMode; + pub fn gst_rtsp_media_factory_get_retransmission_time(factory: *mut GstRTSPMediaFactory) -> gst::GstClockTime; + pub fn gst_rtsp_media_factory_get_suspend_mode(factory: *mut GstRTSPMediaFactory) -> GstRTSPSuspendMode; + pub fn gst_rtsp_media_factory_get_transport_mode(factory: *mut GstRTSPMediaFactory) -> GstRTSPTransportMode; + pub fn gst_rtsp_media_factory_is_eos_shutdown(factory: *mut GstRTSPMediaFactory) -> gboolean; + pub fn gst_rtsp_media_factory_is_shared(factory: *mut GstRTSPMediaFactory) -> gboolean; + pub fn gst_rtsp_media_factory_is_stop_on_disonnect(factory: *mut GstRTSPMediaFactory) -> gboolean; + pub fn gst_rtsp_media_factory_set_address_pool(factory: *mut GstRTSPMediaFactory, pool: *mut GstRTSPAddressPool); + pub fn gst_rtsp_media_factory_set_buffer_size(factory: *mut GstRTSPMediaFactory, size: c_uint); + #[cfg(any(feature = "v1_8", feature = "dox"))] + pub fn gst_rtsp_media_factory_set_clock(factory: *mut GstRTSPMediaFactory, clock: *mut gst::GstClock); + pub fn gst_rtsp_media_factory_set_eos_shutdown(factory: *mut GstRTSPMediaFactory, eos_shutdown: gboolean); + pub fn gst_rtsp_media_factory_set_latency(factory: *mut GstRTSPMediaFactory, latency: c_uint); + pub fn gst_rtsp_media_factory_set_launch(factory: *mut GstRTSPMediaFactory, launch: *const c_char); + #[cfg(any(feature = "v1_6", feature = "dox"))] + pub fn gst_rtsp_media_factory_set_media_gtype(factory: *mut GstRTSPMediaFactory, media_gtype: GType); + pub fn gst_rtsp_media_factory_set_multicast_iface(factory: *mut GstRTSPMediaFactory, multicast_iface: *const c_char); + pub fn gst_rtsp_media_factory_set_permissions(factory: *mut GstRTSPMediaFactory, permissions: *mut GstRTSPPermissions); + pub fn gst_rtsp_media_factory_set_profiles(factory: *mut GstRTSPMediaFactory, profiles: gst_rtsp::GstRTSPProfile); + pub fn gst_rtsp_media_factory_set_protocols(factory: *mut GstRTSPMediaFactory, protocols: gst_rtsp::GstRTSPLowerTrans); + #[cfg(any(feature = "v1_8", feature = "dox"))] + pub fn gst_rtsp_media_factory_set_publish_clock_mode(factory: *mut GstRTSPMediaFactory, mode: GstRTSPPublishClockMode); + pub fn gst_rtsp_media_factory_set_retransmission_time(factory: *mut GstRTSPMediaFactory, time: gst::GstClockTime); + pub fn gst_rtsp_media_factory_set_shared(factory: *mut GstRTSPMediaFactory, shared: gboolean); + pub fn gst_rtsp_media_factory_set_stop_on_disconnect(factory: *mut GstRTSPMediaFactory, stop_on_disconnect: gboolean); + pub fn gst_rtsp_media_factory_set_suspend_mode(factory: *mut GstRTSPMediaFactory, mode: GstRTSPSuspendMode); + pub fn gst_rtsp_media_factory_set_transport_mode(factory: *mut GstRTSPMediaFactory, mode: GstRTSPTransportMode); + + //========================================================================= + // GstRTSPMediaFactoryURI + //========================================================================= + pub fn gst_rtsp_media_factory_uri_get_type() -> GType; + pub fn gst_rtsp_media_factory_uri_new() -> *mut GstRTSPMediaFactoryURI; + pub fn gst_rtsp_media_factory_uri_get_uri(factory: *mut GstRTSPMediaFactoryURI) -> *mut c_char; + pub fn gst_rtsp_media_factory_uri_set_uri(factory: *mut GstRTSPMediaFactoryURI, uri: *const c_char); + + //========================================================================= + // GstRTSPMountPoints + //========================================================================= + pub fn gst_rtsp_mount_points_get_type() -> GType; + pub fn gst_rtsp_mount_points_new() -> *mut GstRTSPMountPoints; + pub fn gst_rtsp_mount_points_add_factory(mounts: *mut GstRTSPMountPoints, path: *const c_char, factory: *mut GstRTSPMediaFactory); + pub fn gst_rtsp_mount_points_make_path(mounts: *mut GstRTSPMountPoints, url: *const gst_rtsp::GstRTSPUrl) -> *mut c_char; + pub fn gst_rtsp_mount_points_match(mounts: *mut GstRTSPMountPoints, path: *const c_char, matched: *mut c_int) -> *mut GstRTSPMediaFactory; + pub fn gst_rtsp_mount_points_remove_factory(mounts: *mut GstRTSPMountPoints, path: *const c_char); + + //========================================================================= + // GstRTSPServer + //========================================================================= + pub fn gst_rtsp_server_get_type() -> GType; + pub fn gst_rtsp_server_new() -> *mut GstRTSPServer; + pub fn gst_rtsp_server_io_func(socket: *mut gio::GSocket, condition: glib::GIOCondition, server: *mut GstRTSPServer) -> gboolean; + pub fn gst_rtsp_server_attach(server: *mut GstRTSPServer, context: *mut glib::GMainContext) -> c_uint; + pub fn gst_rtsp_server_client_filter(server: *mut GstRTSPServer, func: GstRTSPServerClientFilterFunc, user_data: gpointer) -> *mut glib::GList; + pub fn gst_rtsp_server_create_socket(server: *mut GstRTSPServer, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> *mut gio::GSocket; + pub fn gst_rtsp_server_create_source(server: *mut GstRTSPServer, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> *mut glib::GSource; + pub fn gst_rtsp_server_get_address(server: *mut GstRTSPServer) -> *mut c_char; + pub fn gst_rtsp_server_get_auth(server: *mut GstRTSPServer) -> *mut GstRTSPAuth; + pub fn gst_rtsp_server_get_backlog(server: *mut GstRTSPServer) -> c_int; + pub fn gst_rtsp_server_get_bound_port(server: *mut GstRTSPServer) -> c_int; + pub fn gst_rtsp_server_get_mount_points(server: *mut GstRTSPServer) -> *mut GstRTSPMountPoints; + pub fn gst_rtsp_server_get_service(server: *mut GstRTSPServer) -> *mut c_char; + pub fn gst_rtsp_server_get_session_pool(server: *mut GstRTSPServer) -> *mut GstRTSPSessionPool; + pub fn gst_rtsp_server_get_thread_pool(server: *mut GstRTSPServer) -> *mut GstRTSPThreadPool; + pub fn gst_rtsp_server_set_address(server: *mut GstRTSPServer, address: *const c_char); + pub fn gst_rtsp_server_set_auth(server: *mut GstRTSPServer, auth: *mut GstRTSPAuth); + pub fn gst_rtsp_server_set_backlog(server: *mut GstRTSPServer, backlog: c_int); + pub fn gst_rtsp_server_set_mount_points(server: *mut GstRTSPServer, mounts: *mut GstRTSPMountPoints); + pub fn gst_rtsp_server_set_service(server: *mut GstRTSPServer, service: *const c_char); + pub fn gst_rtsp_server_set_session_pool(server: *mut GstRTSPServer, pool: *mut GstRTSPSessionPool); + pub fn gst_rtsp_server_set_thread_pool(server: *mut GstRTSPServer, pool: *mut GstRTSPThreadPool); + pub fn gst_rtsp_server_transfer_connection(server: *mut GstRTSPServer, socket: *mut gio::GSocket, ip: *const c_char, port: c_int, initial_buffer: *const c_char) -> gboolean; + + //========================================================================= + // GstRTSPSession + //========================================================================= + pub fn gst_rtsp_session_get_type() -> GType; + pub fn gst_rtsp_session_new(sessionid: *const c_char) -> *mut GstRTSPSession; + pub fn gst_rtsp_session_allow_expire(session: *mut GstRTSPSession); + pub fn gst_rtsp_session_filter(sess: *mut GstRTSPSession, func: GstRTSPSessionFilterFunc, user_data: gpointer) -> *mut glib::GList; + pub fn gst_rtsp_session_get_header(session: *mut GstRTSPSession) -> *mut c_char; + pub fn gst_rtsp_session_get_media(sess: *mut GstRTSPSession, path: *const c_char, matched: *mut c_int) -> *mut GstRTSPSessionMedia; + pub fn gst_rtsp_session_get_sessionid(session: *mut GstRTSPSession) -> *const c_char; + pub fn gst_rtsp_session_get_timeout(session: *mut GstRTSPSession) -> c_uint; + pub fn gst_rtsp_session_is_expired(session: *mut GstRTSPSession, now: *mut glib::GTimeVal) -> gboolean; + pub fn gst_rtsp_session_is_expired_usec(session: *mut GstRTSPSession, now: i64) -> gboolean; + pub fn gst_rtsp_session_manage_media(sess: *mut GstRTSPSession, path: *const c_char, media: *mut GstRTSPMedia) -> *mut GstRTSPSessionMedia; + pub fn gst_rtsp_session_next_timeout(session: *mut GstRTSPSession, now: *mut glib::GTimeVal) -> c_int; + pub fn gst_rtsp_session_next_timeout_usec(session: *mut GstRTSPSession, now: i64) -> c_int; + pub fn gst_rtsp_session_prevent_expire(session: *mut GstRTSPSession); + pub fn gst_rtsp_session_release_media(sess: *mut GstRTSPSession, media: *mut GstRTSPSessionMedia) -> gboolean; + pub fn gst_rtsp_session_set_timeout(session: *mut GstRTSPSession, timeout: c_uint); + pub fn gst_rtsp_session_touch(session: *mut GstRTSPSession); + + //========================================================================= + // GstRTSPSessionMedia + //========================================================================= + pub fn gst_rtsp_session_media_get_type() -> GType; + pub fn gst_rtsp_session_media_new(path: *const c_char, media: *mut GstRTSPMedia) -> *mut GstRTSPSessionMedia; + pub fn gst_rtsp_session_media_alloc_channels(media: *mut GstRTSPSessionMedia, range: *mut gst_rtsp::GstRTSPRange) -> gboolean; + pub fn gst_rtsp_session_media_get_base_time(media: *mut GstRTSPSessionMedia) -> gst::GstClockTime; + pub fn gst_rtsp_session_media_get_media(media: *mut GstRTSPSessionMedia) -> *mut GstRTSPMedia; + pub fn gst_rtsp_session_media_get_rtpinfo(media: *mut GstRTSPSessionMedia) -> *mut c_char; + pub fn gst_rtsp_session_media_get_rtsp_state(media: *mut GstRTSPSessionMedia) -> gst_rtsp::GstRTSPState; + pub fn gst_rtsp_session_media_get_transport(media: *mut GstRTSPSessionMedia, idx: c_uint) -> *mut GstRTSPStreamTransport; + pub fn gst_rtsp_session_media_matches(media: *mut GstRTSPSessionMedia, path: *const c_char, matched: *mut c_int) -> gboolean; + pub fn gst_rtsp_session_media_set_rtsp_state(media: *mut GstRTSPSessionMedia, state: gst_rtsp::GstRTSPState); + pub fn gst_rtsp_session_media_set_state(media: *mut GstRTSPSessionMedia, state: gst::GstState) -> gboolean; + pub fn gst_rtsp_session_media_set_transport(media: *mut GstRTSPSessionMedia, stream: *mut GstRTSPStream, tr: *mut gst_rtsp::GstRTSPTransport) -> *mut GstRTSPStreamTransport; + + //========================================================================= + // GstRTSPSessionPool + //========================================================================= + pub fn gst_rtsp_session_pool_get_type() -> GType; + pub fn gst_rtsp_session_pool_new() -> *mut GstRTSPSessionPool; + pub fn gst_rtsp_session_pool_cleanup(pool: *mut GstRTSPSessionPool) -> c_uint; + pub fn gst_rtsp_session_pool_create(pool: *mut GstRTSPSessionPool) -> *mut GstRTSPSession; + pub fn gst_rtsp_session_pool_create_watch(pool: *mut GstRTSPSessionPool) -> *mut glib::GSource; + pub fn gst_rtsp_session_pool_filter(pool: *mut GstRTSPSessionPool, func: GstRTSPSessionPoolFilterFunc, user_data: gpointer) -> *mut glib::GList; + pub fn gst_rtsp_session_pool_find(pool: *mut GstRTSPSessionPool, sessionid: *const c_char) -> *mut GstRTSPSession; + pub fn gst_rtsp_session_pool_get_max_sessions(pool: *mut GstRTSPSessionPool) -> c_uint; + pub fn gst_rtsp_session_pool_get_n_sessions(pool: *mut GstRTSPSessionPool) -> c_uint; + pub fn gst_rtsp_session_pool_remove(pool: *mut GstRTSPSessionPool, sess: *mut GstRTSPSession) -> gboolean; + pub fn gst_rtsp_session_pool_set_max_sessions(pool: *mut GstRTSPSessionPool, max: c_uint); + + //========================================================================= + // GstRTSPStream + //========================================================================= + pub fn gst_rtsp_stream_get_type() -> GType; + pub fn gst_rtsp_stream_new(idx: c_uint, payloader: *mut gst::GstElement, pad: *mut gst::GstPad) -> *mut GstRTSPStream; + pub fn gst_rtsp_stream_add_transport(stream: *mut GstRTSPStream, trans: *mut GstRTSPStreamTransport) -> gboolean; + pub fn gst_rtsp_stream_allocate_udp_sockets(stream: *mut GstRTSPStream, family: gio::GSocketFamily, transport: *mut gst_rtsp::GstRTSPTransport, use_client_setttings: gboolean) -> gboolean; + pub fn gst_rtsp_stream_get_address_pool(stream: *mut GstRTSPStream) -> *mut GstRTSPAddressPool; + #[cfg(any(feature = "v1_6", feature = "dox"))] + pub fn gst_rtsp_stream_get_buffer_size(stream: *mut GstRTSPStream) -> c_uint; + pub fn gst_rtsp_stream_get_caps(stream: *mut GstRTSPStream) -> *mut gst::GstCaps; + pub fn gst_rtsp_stream_get_control(stream: *mut GstRTSPStream) -> *mut c_char; + pub fn gst_rtsp_stream_get_current_seqnum(stream: *mut GstRTSPStream) -> u16; + pub fn gst_rtsp_stream_get_dscp_qos(stream: *mut GstRTSPStream) -> c_int; + pub fn gst_rtsp_stream_get_index(stream: *mut GstRTSPStream) -> c_uint; + pub fn gst_rtsp_stream_get_joined_bin(stream: *mut GstRTSPStream) -> *mut gst::GstBin; + pub fn gst_rtsp_stream_get_mtu(stream: *mut GstRTSPStream) -> c_uint; + pub fn gst_rtsp_stream_get_multicast_address(stream: *mut GstRTSPStream, family: gio::GSocketFamily) -> *mut GstRTSPAddress; + pub fn gst_rtsp_stream_get_multicast_iface(stream: *mut GstRTSPStream) -> *mut c_char; + pub fn gst_rtsp_stream_get_profiles(stream: *mut GstRTSPStream) -> gst_rtsp::GstRTSPProfile; + pub fn gst_rtsp_stream_get_protocols(stream: *mut GstRTSPStream) -> gst_rtsp::GstRTSPLowerTrans; + pub fn gst_rtsp_stream_get_pt(stream: *mut GstRTSPStream) -> c_uint; + #[cfg(any(feature = "v1_8", feature = "dox"))] + pub fn gst_rtsp_stream_get_publish_clock_mode(stream: *mut GstRTSPStream) -> GstRTSPPublishClockMode; + pub fn gst_rtsp_stream_get_retransmission_pt(stream: *mut GstRTSPStream) -> c_uint; + pub fn gst_rtsp_stream_get_retransmission_time(stream: *mut GstRTSPStream) -> gst::GstClockTime; + pub fn gst_rtsp_stream_get_rtcp_socket(stream: *mut GstRTSPStream, family: gio::GSocketFamily) -> *mut gio::GSocket; + pub fn gst_rtsp_stream_get_rtp_socket(stream: *mut GstRTSPStream, family: gio::GSocketFamily) -> *mut gio::GSocket; + pub fn gst_rtsp_stream_get_rtpinfo(stream: *mut GstRTSPStream, rtptime: *mut c_uint, seq: *mut c_uint, clock_rate: *mut c_uint, running_time: *mut gst::GstClockTime) -> gboolean; + pub fn gst_rtsp_stream_get_rtpsession(stream: *mut GstRTSPStream) -> *mut gobject::GObject; + pub fn gst_rtsp_stream_get_server_port(stream: *mut GstRTSPStream, server_port: *mut gst_rtsp::GstRTSPRange, family: gio::GSocketFamily); + pub fn gst_rtsp_stream_get_sinkpad(stream: *mut GstRTSPStream) -> *mut gst::GstPad; + pub fn gst_rtsp_stream_get_srcpad(stream: *mut GstRTSPStream) -> *mut gst::GstPad; + pub fn gst_rtsp_stream_get_srtp_encoder(stream: *mut GstRTSPStream) -> *mut gst::GstElement; + pub fn gst_rtsp_stream_get_ssrc(stream: *mut GstRTSPStream, ssrc: *mut c_uint); + pub fn gst_rtsp_stream_has_control(stream: *mut GstRTSPStream, control: *const c_char) -> gboolean; + pub fn gst_rtsp_stream_is_blocking(stream: *mut GstRTSPStream) -> gboolean; + pub fn gst_rtsp_stream_is_client_side(stream: *mut GstRTSPStream) -> gboolean; + pub fn gst_rtsp_stream_is_transport_supported(stream: *mut GstRTSPStream, transport: *mut gst_rtsp::GstRTSPTransport) -> gboolean; + pub fn gst_rtsp_stream_join_bin(stream: *mut GstRTSPStream, bin: *mut gst::GstBin, rtpbin: *mut gst::GstElement, state: gst::GstState) -> gboolean; + pub fn gst_rtsp_stream_leave_bin(stream: *mut GstRTSPStream, bin: *mut gst::GstBin, rtpbin: *mut gst::GstElement) -> gboolean; + pub fn gst_rtsp_stream_query_position(stream: *mut GstRTSPStream, position: *mut i64) -> gboolean; + pub fn gst_rtsp_stream_query_stop(stream: *mut GstRTSPStream, stop: *mut i64) -> gboolean; + pub fn gst_rtsp_stream_recv_rtcp(stream: *mut GstRTSPStream, buffer: *mut gst::GstBuffer) -> gst::GstFlowReturn; + pub fn gst_rtsp_stream_recv_rtp(stream: *mut GstRTSPStream, buffer: *mut gst::GstBuffer) -> gst::GstFlowReturn; + pub fn gst_rtsp_stream_remove_transport(stream: *mut GstRTSPStream, trans: *mut GstRTSPStreamTransport) -> gboolean; + #[cfg(any(feature = "v1_6", feature = "dox"))] + pub fn gst_rtsp_stream_request_aux_sender(stream: *mut GstRTSPStream, sessid: c_uint) -> *mut gst::GstElement; + pub fn gst_rtsp_stream_reserve_address(stream: *mut GstRTSPStream, address: *const c_char, port: c_uint, n_ports: c_uint, ttl: c_uint) -> *mut GstRTSPAddress; + pub fn gst_rtsp_stream_set_address_pool(stream: *mut GstRTSPStream, pool: *mut GstRTSPAddressPool); + pub fn gst_rtsp_stream_set_blocked(stream: *mut GstRTSPStream, blocked: gboolean) -> gboolean; + #[cfg(any(feature = "v1_6", feature = "dox"))] + pub fn gst_rtsp_stream_set_buffer_size(stream: *mut GstRTSPStream, size: c_uint); + pub fn gst_rtsp_stream_set_client_side(stream: *mut GstRTSPStream, client_side: gboolean); + pub fn gst_rtsp_stream_set_control(stream: *mut GstRTSPStream, control: *const c_char); + pub fn gst_rtsp_stream_set_dscp_qos(stream: *mut GstRTSPStream, dscp_qos: c_int); + pub fn gst_rtsp_stream_set_mtu(stream: *mut GstRTSPStream, mtu: c_uint); + pub fn gst_rtsp_stream_set_multicast_iface(stream: *mut GstRTSPStream, multicast_iface: *const c_char); + pub fn gst_rtsp_stream_set_profiles(stream: *mut GstRTSPStream, profiles: gst_rtsp::GstRTSPProfile); + pub fn gst_rtsp_stream_set_protocols(stream: *mut GstRTSPStream, protocols: gst_rtsp::GstRTSPLowerTrans); + pub fn gst_rtsp_stream_set_pt_map(stream: *mut GstRTSPStream, pt: c_uint, caps: *mut gst::GstCaps); + #[cfg(any(feature = "v1_8", feature = "dox"))] + pub fn gst_rtsp_stream_set_publish_clock_mode(stream: *mut GstRTSPStream, mode: GstRTSPPublishClockMode); + pub fn gst_rtsp_stream_set_retransmission_pt(stream: *mut GstRTSPStream, rtx_pt: c_uint); + pub fn gst_rtsp_stream_set_retransmission_time(stream: *mut GstRTSPStream, time: gst::GstClockTime); + pub fn gst_rtsp_stream_set_seqnum_offset(stream: *mut GstRTSPStream, seqnum: u16); + pub fn gst_rtsp_stream_transport_filter(stream: *mut GstRTSPStream, func: GstRTSPStreamTransportFilterFunc, user_data: gpointer) -> *mut glib::GList; + pub fn gst_rtsp_stream_update_crypto(stream: *mut GstRTSPStream, ssrc: c_uint, crypto: *mut gst::GstCaps) -> gboolean; + + //========================================================================= + // GstRTSPStreamTransport + //========================================================================= + pub fn gst_rtsp_stream_transport_get_type() -> GType; + pub fn gst_rtsp_stream_transport_new(stream: *mut GstRTSPStream, tr: *mut gst_rtsp::GstRTSPTransport) -> *mut GstRTSPStreamTransport; + pub fn gst_rtsp_stream_transport_get_rtpinfo(trans: *mut GstRTSPStreamTransport, start_time: gst::GstClockTime) -> *mut c_char; + pub fn gst_rtsp_stream_transport_get_stream(trans: *mut GstRTSPStreamTransport) -> *mut GstRTSPStream; + pub fn gst_rtsp_stream_transport_get_transport(trans: *mut GstRTSPStreamTransport) -> *const gst_rtsp::GstRTSPTransport; + pub fn gst_rtsp_stream_transport_get_url(trans: *mut GstRTSPStreamTransport) -> *const gst_rtsp::GstRTSPUrl; + pub fn gst_rtsp_stream_transport_is_timed_out(trans: *mut GstRTSPStreamTransport) -> gboolean; + pub fn gst_rtsp_stream_transport_keep_alive(trans: *mut GstRTSPStreamTransport); + pub fn gst_rtsp_stream_transport_recv_data(trans: *mut GstRTSPStreamTransport, channel: c_uint, buffer: *mut gst::GstBuffer) -> gst::GstFlowReturn; + pub fn gst_rtsp_stream_transport_send_rtcp(trans: *mut GstRTSPStreamTransport, buffer: *mut gst::GstBuffer) -> gboolean; + pub fn gst_rtsp_stream_transport_send_rtp(trans: *mut GstRTSPStreamTransport, buffer: *mut gst::GstBuffer) -> gboolean; + pub fn gst_rtsp_stream_transport_set_active(trans: *mut GstRTSPStreamTransport, active: gboolean) -> gboolean; + pub fn gst_rtsp_stream_transport_set_callbacks(trans: *mut GstRTSPStreamTransport, send_rtp: GstRTSPSendFunc, send_rtcp: GstRTSPSendFunc, user_data: gpointer, notify: glib::GDestroyNotify); + pub fn gst_rtsp_stream_transport_set_keepalive(trans: *mut GstRTSPStreamTransport, keep_alive: GstRTSPKeepAliveFunc, user_data: gpointer, notify: glib::GDestroyNotify); + pub fn gst_rtsp_stream_transport_set_timed_out(trans: *mut GstRTSPStreamTransport, timedout: gboolean); + pub fn gst_rtsp_stream_transport_set_transport(trans: *mut GstRTSPStreamTransport, tr: *mut gst_rtsp::GstRTSPTransport); + pub fn gst_rtsp_stream_transport_set_url(trans: *mut GstRTSPStreamTransport, url: *const gst_rtsp::GstRTSPUrl); + + //========================================================================= + // GstRTSPThreadPool + //========================================================================= + pub fn gst_rtsp_thread_pool_get_type() -> GType; + pub fn gst_rtsp_thread_pool_new() -> *mut GstRTSPThreadPool; + pub fn gst_rtsp_thread_pool_cleanup(); + pub fn gst_rtsp_thread_pool_get_max_threads(pool: *mut GstRTSPThreadPool) -> c_int; + pub fn gst_rtsp_thread_pool_get_thread(pool: *mut GstRTSPThreadPool, type_: GstRTSPThreadType, ctx: *mut GstRTSPContext) -> *mut GstRTSPThread; + pub fn gst_rtsp_thread_pool_set_max_threads(pool: *mut GstRTSPThreadPool, max_threads: c_int); + + //========================================================================= + // Other functions + //========================================================================= + pub fn gst_rtsp_context_get_type() -> GType; + pub fn gst_rtsp_params_get(client: *mut GstRTSPClient, ctx: *mut GstRTSPContext) -> gst_rtsp::GstRTSPResult; + pub fn gst_rtsp_params_set(client: *mut GstRTSPClient, ctx: *mut GstRTSPContext) -> gst_rtsp::GstRTSPResult; + pub fn gst_rtsp_sdp_from_media(sdp: *mut gst_sdp::GstSDPMessage, info: *mut GstSDPInfo, media: *mut GstRTSPMedia) -> gboolean; + pub fn gst_rtsp_sdp_from_stream(sdp: *mut gst_sdp::GstSDPMessage, info: *mut GstSDPInfo, stream: *mut GstRTSPStream) -> gboolean; + +} diff --git a/gstreamer-rtsp-sys/CHANGELOG.md b/gstreamer-rtsp-sys/CHANGELOG.md new file mode 100644 index 000000000..0b8ae721c --- /dev/null +++ b/gstreamer-rtsp-sys/CHANGELOG.md @@ -0,0 +1,78 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html), +specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field). + +## [0.4.0] - 2017-12-23 +### Added +- GstNet bindings +- Debug impls for basically every type +- Script to automatically regenerate everything + +### Changed +- gst_player_[sg]et_multiview_mode() argument types were changed from + GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset + of the former that is allowed here +- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead + of *mut *const c_char + +## [0.3.0] - 2017-11-26 +### Added +- GstMpegTs bindings + +### Changed +- GstDebugColorFlags from an enum to a bitfield +- Updated to bitflags 1.0 +- Added support for the "dox" feature to generate documentation for all + possible versions +- Depend on glib-sys/gobject-sys 0.5 + +### Fixes +- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since + 1.12 and 1.12.1 respectively +- All C enums are represented as integers + constants now to prevent undefined + behaviour when out-of-range values are received + +## [0.2.1] - 2017-09-10 +### Changed +- Add README.md to all crates directly + +### Fixed +- Fix various compiler warnings +- Fix versioning/feature mess. Now each library has features for all major + versions and for the correct minor versions that added API. +- Removed Cargo.lock from GIT + +## [0.2.0] - 2017-08-28 +### Added +- Add GstPlayer bindings + +### Changed +- Depend on bitflags 0.9 +- Update GIR files to 1.12.1 release +- Fix various errors in the GIR files, backported from GStreamer GIT master +- Depend on gobject-sys/glib-sys 0.4.0 for various improvements +- Regenerated everything with latest GIR + +## [0.1.1] - 2017-05-10 +### Added +- Add GstTag and GstApp bindings +- Add lots of missing fields to all the structs thanks to GIR improvements + +### Changed +- Update GIR files to 1.12.0 release +- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs +- Regenerated everything with latest GIR + +## [0.1.0] - 2017-04-09 + +- Initial release of the autogenerated GStreamer FFI bindings. + +[Unreleased]: https://github.com/sdroege/gstreamer-sys/compare/0.4.0...HEAD +[0.4.0]: https://github.com/sdroege/gstreamer-sys/compare/0.3.0...0.4.0 +[0.3.0]: https://github.com/sdroege/gstreamer-sys/compare/0.2.1...0.3.0 +[0.2.1]: https://github.com/sdroege/gstreamer-sys/compare/0.2.0...0.2.1 +[0.2.0]: https://github.com/sdroege/gstreamer-sys/compare/0.1.1...0.2.0 +[0.1.1]: https://github.com/sdroege/gstreamer-sys/compare/0.1.0...0.1.1 diff --git a/gstreamer-rtsp-sys/Cargo.toml b/gstreamer-rtsp-sys/Cargo.toml new file mode 100644 index 000000000..11bd930c2 --- /dev/null +++ b/gstreamer-rtsp-sys/Cargo.toml @@ -0,0 +1,50 @@ +[build-dependencies] +pkg-config = "0.3.7" + +[dependencies] +bitflags = "1.0" +libc = "0.2" + +[dependencies.gio-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.glib-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gobject-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gstreamer-sdp-sys] +path = "../gstreamer-sdp-sys" + +[dependencies.gstreamer-sys] +path = "../gstreamer-sys" + +[features] +dox = [] +v1_2 = [] +v1_2_1 = ["v1_2"] +v1_4 = ["v1_2_1"] +v1_6 = ["v1_4"] +v1_8 = ["v1_6"] +v1_10 = ["v1_8"] +v1_12 = ["v1_10"] + +[lib] +name = "gstreamer_rtsp_sys" + +[package] +build = "build.rs" +links = "gstrtsp-1.0" +name = "gstreamer-rtsp-sys" +version = "0.5.0" +authors = ["Mathieu Duponchelle "] +description = "FFI bindings to libgstrtsp-1.0" +homepage = "https://gstreamer.freedesktop.org" +keywords = ["ffi", "gstreamer", "gnome", "multimedia"] +repository = "https://github.com/sdroege/gstreamer-sys" +license = "MIT" +readme = "README.md" + +[badges] +travis-ci = { repository = "sdroege/gstreamer-sys", branch = "master" } diff --git a/gstreamer-rtsp-sys/LICENSE b/gstreamer-rtsp-sys/LICENSE new file mode 100644 index 000000000..3d76f6e2f --- /dev/null +++ b/gstreamer-rtsp-sys/LICENSE @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) 2017 Sebastian Dröge . + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + diff --git a/gstreamer-rtsp-sys/README.md b/gstreamer-rtsp-sys/README.md new file mode 100644 index 000000000..04871be04 --- /dev/null +++ b/gstreamer-rtsp-sys/README.md @@ -0,0 +1,31 @@ +# gstreamer-rtsp-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-sys.svg)](https://crates.io/crates/gstreamer-sys) [![Build Status](https://travis-ci.org/sdroege/gstreamer-sys.svg?branch=master)](https://travis-ci.org/sdroege/gstreamer-sys) + +[GStreamer](https://gstreamer.freedesktop.org/) (Rtsp library) FFI bindings for Rust. + +These bindings are providing unsafe FFI API that can be used to interface with +GStreamer. Generally they are meant to be used as the building block for +higher-level abstractions like: + + * Application-side bindings for GStreamer: https://github.com/sdroege/gstreamer-rs + * Crate for writing GStreamer plugins in Rust: https://github.com/sdroege/gst-plugin-rs + +The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/) +based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/) +API metadata provided by the GStreamer project. + +## LICENSE + +gstreamer-sys and all crates contained here are licensed under the MIT +license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT). + +GStreamer itself is licensed under the Lesser General Public License version +2.1 or (at your option) any later version: +https://www.gnu.org/licenses/lgpl-2.1.html + +## Contribution + +Any kinds of contributions are welcome as a pull request. + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above, +without any additional terms or conditions. diff --git a/gstreamer-rtsp-sys/build.rs b/gstreamer-rtsp-sys/build.rs new file mode 100644 index 000000000..6369e72aa --- /dev/null +++ b/gstreamer-rtsp-sys/build.rs @@ -0,0 +1,69 @@ +extern crate pkg_config; + +use pkg_config::{Config, Error}; +use std::env; +use std::io::prelude::*; +use std::io; +use std::process; + +fn main() { + if let Err(s) = find() { + let _ = writeln!(io::stderr(), "{}", s); + process::exit(1); + } +} + +fn find() -> Result<(), Error> { + let package_name = "gstreamer-rtsp-1.0"; + let shared_libs = ["gstrtsp-1.0"]; + let version = if cfg!(feature = "v1_12") { + "1.12" + } else if cfg!(feature = "v1_6") { + "1.6" + } else if cfg!(feature = "v1_4") { + "1.4" + } else if cfg!(feature = "v1_2_1") { + "1.2.1" + } else { + "1.0" + }; + + if let Ok(lib_dir) = env::var("GTK_LIB_DIR") { + for lib_ in shared_libs.iter() { + println!("cargo:rustc-link-lib=dylib={}", lib_); + } + println!("cargo:rustc-link-search=native={}", lib_dir); + return Ok(()) + } + + let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); + let hardcode_shared_libs = target.contains("windows"); + + let mut config = Config::new(); + config.atleast_version(version); + if hardcode_shared_libs { + config.cargo_metadata(false); + } + match config.probe(package_name) { + Ok(library) => { + if hardcode_shared_libs { + for lib_ in shared_libs.iter() { + println!("cargo:rustc-link-lib=dylib={}", lib_); + } + for path in library.link_paths.iter() { + println!("cargo:rustc-link-search=native={}", + path.to_str().expect("library path doesn't exist")); + } + } + Ok(()) + } + Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => { + for lib_ in shared_libs.iter() { + println!("cargo:rustc-link-lib=dylib={}", lib_); + } + Ok(()) + } + Err(err) => Err(err), + } +} + diff --git a/gstreamer-rtsp-sys/src/lib.rs b/gstreamer-rtsp-sys/src/lib.rs new file mode 100644 index 000000000..3bdfddcb1 --- /dev/null +++ b/gstreamer-rtsp-sys/src/lib.rs @@ -0,0 +1,946 @@ +// This file was generated by gir (81a781f) from gir-files (???) +// DO NOT EDIT + +#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] + +extern crate libc; +#[macro_use] extern crate bitflags; +extern crate glib_sys as glib; +extern crate gobject_sys as gobject; +extern crate gio_sys as gio; +extern crate gstreamer_sys as gst; +extern crate gstreamer_sdp_sys as gst_sdp; + +#[allow(unused_imports)] +use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double, + c_short, c_ushort, c_long, c_ulong, + c_void, size_t, ssize_t, intptr_t, uintptr_t, time_t, FILE}; + +#[allow(unused_imports)] +use glib::{gboolean, gconstpointer, gpointer, GType, Volatile}; + +// Enums +pub type GstRTSPAuthMethod = c_int; +pub const GST_RTSP_AUTH_NONE: GstRTSPAuthMethod = 0; +pub const GST_RTSP_AUTH_BASIC: GstRTSPAuthMethod = 1; +pub const GST_RTSP_AUTH_DIGEST: GstRTSPAuthMethod = 2; + +pub type GstRTSPFamily = c_int; +pub const GST_RTSP_FAM_NONE: GstRTSPFamily = 0; +pub const GST_RTSP_FAM_INET: GstRTSPFamily = 1; +pub const GST_RTSP_FAM_INET6: GstRTSPFamily = 2; + +pub type GstRTSPHeaderField = c_int; +pub const GST_RTSP_HDR_INVALID: GstRTSPHeaderField = 0; +pub const GST_RTSP_HDR_ACCEPT: GstRTSPHeaderField = 1; +pub const GST_RTSP_HDR_ACCEPT_ENCODING: GstRTSPHeaderField = 2; +pub const GST_RTSP_HDR_ACCEPT_LANGUAGE: GstRTSPHeaderField = 3; +pub const GST_RTSP_HDR_ALLOW: GstRTSPHeaderField = 4; +pub const GST_RTSP_HDR_AUTHORIZATION: GstRTSPHeaderField = 5; +pub const GST_RTSP_HDR_BANDWIDTH: GstRTSPHeaderField = 6; +pub const GST_RTSP_HDR_BLOCKSIZE: GstRTSPHeaderField = 7; +pub const GST_RTSP_HDR_CACHE_CONTROL: GstRTSPHeaderField = 8; +pub const GST_RTSP_HDR_CONFERENCE: GstRTSPHeaderField = 9; +pub const GST_RTSP_HDR_CONNECTION: GstRTSPHeaderField = 10; +pub const GST_RTSP_HDR_CONTENT_BASE: GstRTSPHeaderField = 11; +pub const GST_RTSP_HDR_CONTENT_ENCODING: GstRTSPHeaderField = 12; +pub const GST_RTSP_HDR_CONTENT_LANGUAGE: GstRTSPHeaderField = 13; +pub const GST_RTSP_HDR_CONTENT_LENGTH: GstRTSPHeaderField = 14; +pub const GST_RTSP_HDR_CONTENT_LOCATION: GstRTSPHeaderField = 15; +pub const GST_RTSP_HDR_CONTENT_TYPE: GstRTSPHeaderField = 16; +pub const GST_RTSP_HDR_CSEQ: GstRTSPHeaderField = 17; +pub const GST_RTSP_HDR_DATE: GstRTSPHeaderField = 18; +pub const GST_RTSP_HDR_EXPIRES: GstRTSPHeaderField = 19; +pub const GST_RTSP_HDR_FROM: GstRTSPHeaderField = 20; +pub const GST_RTSP_HDR_IF_MODIFIED_SINCE: GstRTSPHeaderField = 21; +pub const GST_RTSP_HDR_LAST_MODIFIED: GstRTSPHeaderField = 22; +pub const GST_RTSP_HDR_PROXY_AUTHENTICATE: GstRTSPHeaderField = 23; +pub const GST_RTSP_HDR_PROXY_REQUIRE: GstRTSPHeaderField = 24; +pub const GST_RTSP_HDR_PUBLIC: GstRTSPHeaderField = 25; +pub const GST_RTSP_HDR_RANGE: GstRTSPHeaderField = 26; +pub const GST_RTSP_HDR_REFERER: GstRTSPHeaderField = 27; +pub const GST_RTSP_HDR_REQUIRE: GstRTSPHeaderField = 28; +pub const GST_RTSP_HDR_RETRY_AFTER: GstRTSPHeaderField = 29; +pub const GST_RTSP_HDR_RTP_INFO: GstRTSPHeaderField = 30; +pub const GST_RTSP_HDR_SCALE: GstRTSPHeaderField = 31; +pub const GST_RTSP_HDR_SESSION: GstRTSPHeaderField = 32; +pub const GST_RTSP_HDR_SERVER: GstRTSPHeaderField = 33; +pub const GST_RTSP_HDR_SPEED: GstRTSPHeaderField = 34; +pub const GST_RTSP_HDR_TRANSPORT: GstRTSPHeaderField = 35; +pub const GST_RTSP_HDR_UNSUPPORTED: GstRTSPHeaderField = 36; +pub const GST_RTSP_HDR_USER_AGENT: GstRTSPHeaderField = 37; +pub const GST_RTSP_HDR_VIA: GstRTSPHeaderField = 38; +pub const GST_RTSP_HDR_WWW_AUTHENTICATE: GstRTSPHeaderField = 39; +pub const GST_RTSP_HDR_CLIENT_CHALLENGE: GstRTSPHeaderField = 40; +pub const GST_RTSP_HDR_REAL_CHALLENGE1: GstRTSPHeaderField = 41; +pub const GST_RTSP_HDR_REAL_CHALLENGE2: GstRTSPHeaderField = 42; +pub const GST_RTSP_HDR_REAL_CHALLENGE3: GstRTSPHeaderField = 43; +pub const GST_RTSP_HDR_SUBSCRIBE: GstRTSPHeaderField = 44; +pub const GST_RTSP_HDR_ALERT: GstRTSPHeaderField = 45; +pub const GST_RTSP_HDR_CLIENT_ID: GstRTSPHeaderField = 46; +pub const GST_RTSP_HDR_COMPANY_ID: GstRTSPHeaderField = 47; +pub const GST_RTSP_HDR_GUID: GstRTSPHeaderField = 48; +pub const GST_RTSP_HDR_REGION_DATA: GstRTSPHeaderField = 49; +pub const GST_RTSP_HDR_MAX_ASM_WIDTH: GstRTSPHeaderField = 50; +pub const GST_RTSP_HDR_LANGUAGE: GstRTSPHeaderField = 51; +pub const GST_RTSP_HDR_PLAYER_START_TIME: GstRTSPHeaderField = 52; +pub const GST_RTSP_HDR_LOCATION: GstRTSPHeaderField = 53; +pub const GST_RTSP_HDR_ETAG: GstRTSPHeaderField = 54; +pub const GST_RTSP_HDR_IF_MATCH: GstRTSPHeaderField = 55; +pub const GST_RTSP_HDR_ACCEPT_CHARSET: GstRTSPHeaderField = 56; +pub const GST_RTSP_HDR_SUPPORTED: GstRTSPHeaderField = 57; +pub const GST_RTSP_HDR_VARY: GstRTSPHeaderField = 58; +pub const GST_RTSP_HDR_X_ACCELERATE_STREAMING: GstRTSPHeaderField = 59; +pub const GST_RTSP_HDR_X_ACCEPT_AUTHENT: GstRTSPHeaderField = 60; +pub const GST_RTSP_HDR_X_ACCEPT_PROXY_AUTHENT: GstRTSPHeaderField = 61; +pub const GST_RTSP_HDR_X_BROADCAST_ID: GstRTSPHeaderField = 62; +pub const GST_RTSP_HDR_X_BURST_STREAMING: GstRTSPHeaderField = 63; +pub const GST_RTSP_HDR_X_NOTICE: GstRTSPHeaderField = 64; +pub const GST_RTSP_HDR_X_PLAYER_LAG_TIME: GstRTSPHeaderField = 65; +pub const GST_RTSP_HDR_X_PLAYLIST: GstRTSPHeaderField = 66; +pub const GST_RTSP_HDR_X_PLAYLIST_CHANGE_NOTICE: GstRTSPHeaderField = 67; +pub const GST_RTSP_HDR_X_PLAYLIST_GEN_ID: GstRTSPHeaderField = 68; +pub const GST_RTSP_HDR_X_PLAYLIST_SEEK_ID: GstRTSPHeaderField = 69; +pub const GST_RTSP_HDR_X_PROXY_CLIENT_AGENT: GstRTSPHeaderField = 70; +pub const GST_RTSP_HDR_X_PROXY_CLIENT_VERB: GstRTSPHeaderField = 71; +pub const GST_RTSP_HDR_X_RECEDING_PLAYLISTCHANGE: GstRTSPHeaderField = 72; +pub const GST_RTSP_HDR_X_RTP_INFO: GstRTSPHeaderField = 73; +pub const GST_RTSP_HDR_X_STARTUPPROFILE: GstRTSPHeaderField = 74; +pub const GST_RTSP_HDR_TIMESTAMP: GstRTSPHeaderField = 75; +pub const GST_RTSP_HDR_AUTHENTICATION_INFO: GstRTSPHeaderField = 76; +pub const GST_RTSP_HDR_HOST: GstRTSPHeaderField = 77; +pub const GST_RTSP_HDR_PRAGMA: GstRTSPHeaderField = 78; +pub const GST_RTSP_HDR_X_SERVER_IP_ADDRESS: GstRTSPHeaderField = 79; +pub const GST_RTSP_HDR_X_SESSIONCOOKIE: GstRTSPHeaderField = 80; +pub const GST_RTSP_HDR_RTCP_INTERVAL: GstRTSPHeaderField = 81; +pub const GST_RTSP_HDR_KEYMGMT: GstRTSPHeaderField = 82; +pub const GST_RTSP_HDR_LAST: GstRTSPHeaderField = 83; + +pub type GstRTSPMsgType = c_int; +pub const GST_RTSP_MESSAGE_INVALID: GstRTSPMsgType = 0; +pub const GST_RTSP_MESSAGE_REQUEST: GstRTSPMsgType = 1; +pub const GST_RTSP_MESSAGE_RESPONSE: GstRTSPMsgType = 2; +pub const GST_RTSP_MESSAGE_HTTP_REQUEST: GstRTSPMsgType = 3; +pub const GST_RTSP_MESSAGE_HTTP_RESPONSE: GstRTSPMsgType = 4; +pub const GST_RTSP_MESSAGE_DATA: GstRTSPMsgType = 5; + +pub type GstRTSPRangeUnit = c_int; +pub const GST_RTSP_RANGE_SMPTE: GstRTSPRangeUnit = 0; +pub const GST_RTSP_RANGE_SMPTE_30_DROP: GstRTSPRangeUnit = 1; +pub const GST_RTSP_RANGE_SMPTE_25: GstRTSPRangeUnit = 2; +pub const GST_RTSP_RANGE_NPT: GstRTSPRangeUnit = 3; +pub const GST_RTSP_RANGE_CLOCK: GstRTSPRangeUnit = 4; + +pub type GstRTSPResult = c_int; +pub const GST_RTSP_OK: GstRTSPResult = 0; +pub const GST_RTSP_ERROR: GstRTSPResult = -1; +pub const GST_RTSP_EINVAL: GstRTSPResult = -2; +pub const GST_RTSP_EINTR: GstRTSPResult = -3; +pub const GST_RTSP_ENOMEM: GstRTSPResult = -4; +pub const GST_RTSP_ERESOLV: GstRTSPResult = -5; +pub const GST_RTSP_ENOTIMPL: GstRTSPResult = -6; +pub const GST_RTSP_ESYS: GstRTSPResult = -7; +pub const GST_RTSP_EPARSE: GstRTSPResult = -8; +pub const GST_RTSP_EWSASTART: GstRTSPResult = -9; +pub const GST_RTSP_EWSAVERSION: GstRTSPResult = -10; +pub const GST_RTSP_EEOF: GstRTSPResult = -11; +pub const GST_RTSP_ENET: GstRTSPResult = -12; +pub const GST_RTSP_ENOTIP: GstRTSPResult = -13; +pub const GST_RTSP_ETIMEOUT: GstRTSPResult = -14; +pub const GST_RTSP_ETGET: GstRTSPResult = -15; +pub const GST_RTSP_ETPOST: GstRTSPResult = -16; +pub const GST_RTSP_ELAST: GstRTSPResult = -17; + +pub type GstRTSPState = c_int; +pub const GST_RTSP_STATE_INVALID: GstRTSPState = 0; +pub const GST_RTSP_STATE_INIT: GstRTSPState = 1; +pub const GST_RTSP_STATE_READY: GstRTSPState = 2; +pub const GST_RTSP_STATE_SEEKING: GstRTSPState = 3; +pub const GST_RTSP_STATE_PLAYING: GstRTSPState = 4; +pub const GST_RTSP_STATE_RECORDING: GstRTSPState = 5; + +pub type GstRTSPStatusCode = c_int; +pub const GST_RTSP_STS_INVALID: GstRTSPStatusCode = 0; +pub const GST_RTSP_STS_CONTINUE: GstRTSPStatusCode = 100; +pub const GST_RTSP_STS_OK: GstRTSPStatusCode = 200; +pub const GST_RTSP_STS_CREATED: GstRTSPStatusCode = 201; +pub const GST_RTSP_STS_LOW_ON_STORAGE: GstRTSPStatusCode = 250; +pub const GST_RTSP_STS_MULTIPLE_CHOICES: GstRTSPStatusCode = 300; +pub const GST_RTSP_STS_MOVED_PERMANENTLY: GstRTSPStatusCode = 301; +pub const GST_RTSP_STS_MOVE_TEMPORARILY: GstRTSPStatusCode = 302; +pub const GST_RTSP_STS_SEE_OTHER: GstRTSPStatusCode = 303; +pub const GST_RTSP_STS_NOT_MODIFIED: GstRTSPStatusCode = 304; +pub const GST_RTSP_STS_USE_PROXY: GstRTSPStatusCode = 305; +pub const GST_RTSP_STS_BAD_REQUEST: GstRTSPStatusCode = 400; +pub const GST_RTSP_STS_UNAUTHORIZED: GstRTSPStatusCode = 401; +pub const GST_RTSP_STS_PAYMENT_REQUIRED: GstRTSPStatusCode = 402; +pub const GST_RTSP_STS_FORBIDDEN: GstRTSPStatusCode = 403; +pub const GST_RTSP_STS_NOT_FOUND: GstRTSPStatusCode = 404; +pub const GST_RTSP_STS_METHOD_NOT_ALLOWED: GstRTSPStatusCode = 405; +pub const GST_RTSP_STS_NOT_ACCEPTABLE: GstRTSPStatusCode = 406; +pub const GST_RTSP_STS_PROXY_AUTH_REQUIRED: GstRTSPStatusCode = 407; +pub const GST_RTSP_STS_REQUEST_TIMEOUT: GstRTSPStatusCode = 408; +pub const GST_RTSP_STS_GONE: GstRTSPStatusCode = 410; +pub const GST_RTSP_STS_LENGTH_REQUIRED: GstRTSPStatusCode = 411; +pub const GST_RTSP_STS_PRECONDITION_FAILED: GstRTSPStatusCode = 412; +pub const GST_RTSP_STS_REQUEST_ENTITY_TOO_LARGE: GstRTSPStatusCode = 413; +pub const GST_RTSP_STS_REQUEST_URI_TOO_LARGE: GstRTSPStatusCode = 414; +pub const GST_RTSP_STS_UNSUPPORTED_MEDIA_TYPE: GstRTSPStatusCode = 415; +pub const GST_RTSP_STS_PARAMETER_NOT_UNDERSTOOD: GstRTSPStatusCode = 451; +pub const GST_RTSP_STS_CONFERENCE_NOT_FOUND: GstRTSPStatusCode = 452; +pub const GST_RTSP_STS_NOT_ENOUGH_BANDWIDTH: GstRTSPStatusCode = 453; +pub const GST_RTSP_STS_SESSION_NOT_FOUND: GstRTSPStatusCode = 454; +pub const GST_RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE: GstRTSPStatusCode = 455; +pub const GST_RTSP_STS_HEADER_FIELD_NOT_VALID_FOR_RESOURCE: GstRTSPStatusCode = 456; +pub const GST_RTSP_STS_INVALID_RANGE: GstRTSPStatusCode = 457; +pub const GST_RTSP_STS_PARAMETER_IS_READONLY: GstRTSPStatusCode = 458; +pub const GST_RTSP_STS_AGGREGATE_OPERATION_NOT_ALLOWED: GstRTSPStatusCode = 459; +pub const GST_RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED: GstRTSPStatusCode = 460; +pub const GST_RTSP_STS_UNSUPPORTED_TRANSPORT: GstRTSPStatusCode = 461; +pub const GST_RTSP_STS_DESTINATION_UNREACHABLE: GstRTSPStatusCode = 462; +pub const GST_RTSP_STS_KEY_MANAGEMENT_FAILURE: GstRTSPStatusCode = 463; +pub const GST_RTSP_STS_INTERNAL_SERVER_ERROR: GstRTSPStatusCode = 500; +pub const GST_RTSP_STS_NOT_IMPLEMENTED: GstRTSPStatusCode = 501; +pub const GST_RTSP_STS_BAD_GATEWAY: GstRTSPStatusCode = 502; +pub const GST_RTSP_STS_SERVICE_UNAVAILABLE: GstRTSPStatusCode = 503; +pub const GST_RTSP_STS_GATEWAY_TIMEOUT: GstRTSPStatusCode = 504; +pub const GST_RTSP_STS_RTSP_VERSION_NOT_SUPPORTED: GstRTSPStatusCode = 505; +pub const GST_RTSP_STS_OPTION_NOT_SUPPORTED: GstRTSPStatusCode = 551; + +pub type GstRTSPTimeType = c_int; +pub const GST_RTSP_TIME_SECONDS: GstRTSPTimeType = 0; +pub const GST_RTSP_TIME_NOW: GstRTSPTimeType = 1; +pub const GST_RTSP_TIME_END: GstRTSPTimeType = 2; +pub const GST_RTSP_TIME_FRAMES: GstRTSPTimeType = 3; +pub const GST_RTSP_TIME_UTC: GstRTSPTimeType = 4; + +pub type GstRTSPVersion = c_int; +pub const GST_RTSP_VERSION_INVALID: GstRTSPVersion = 0; +pub const GST_RTSP_VERSION_1_0: GstRTSPVersion = 16; +pub const GST_RTSP_VERSION_1_1: GstRTSPVersion = 17; + +// Constants +pub const GST_RTSP_DEFAULT_PORT: c_int = 554; + +// Flags +bitflags! { + #[repr(C)] + pub struct GstRTSPEvent: c_uint { + const READ = 1; + const WRITE = 2; + } +} +pub const GST_RTSP_EV_READ: GstRTSPEvent = GstRTSPEvent::READ; +pub const GST_RTSP_EV_WRITE: GstRTSPEvent = GstRTSPEvent::WRITE; + +bitflags! { + #[repr(C)] + pub struct GstRTSPLowerTrans: c_uint { + const UNKNOWN = 0; + const UDP = 1; + const UDP_MCAST = 2; + const TCP = 4; + const HTTP = 16; + const TLS = 32; + } +} +pub const GST_RTSP_LOWER_TRANS_UNKNOWN: GstRTSPLowerTrans = GstRTSPLowerTrans::UNKNOWN; +pub const GST_RTSP_LOWER_TRANS_UDP: GstRTSPLowerTrans = GstRTSPLowerTrans::UDP; +pub const GST_RTSP_LOWER_TRANS_UDP_MCAST: GstRTSPLowerTrans = GstRTSPLowerTrans::UDP_MCAST; +pub const GST_RTSP_LOWER_TRANS_TCP: GstRTSPLowerTrans = GstRTSPLowerTrans::TCP; +pub const GST_RTSP_LOWER_TRANS_HTTP: GstRTSPLowerTrans = GstRTSPLowerTrans::HTTP; +pub const GST_RTSP_LOWER_TRANS_TLS: GstRTSPLowerTrans = GstRTSPLowerTrans::TLS; + +bitflags! { + #[repr(C)] + pub struct GstRTSPMethod: c_uint { + const INVALID = 0; + const DESCRIBE = 1; + const ANNOUNCE = 2; + const GET_PARAMETER = 4; + const OPTIONS = 8; + const PAUSE = 16; + const PLAY = 32; + const RECORD = 64; + const REDIRECT = 128; + const SETUP = 256; + const SET_PARAMETER = 512; + const TEARDOWN = 1024; + const GET = 2048; + const POST = 4096; + } +} +pub const GST_RTSP_INVALID: GstRTSPMethod = GstRTSPMethod::INVALID; +pub const GST_RTSP_DESCRIBE: GstRTSPMethod = GstRTSPMethod::DESCRIBE; +pub const GST_RTSP_ANNOUNCE: GstRTSPMethod = GstRTSPMethod::ANNOUNCE; +pub const GST_RTSP_GET_PARAMETER: GstRTSPMethod = GstRTSPMethod::GET_PARAMETER; +pub const GST_RTSP_OPTIONS: GstRTSPMethod = GstRTSPMethod::OPTIONS; +pub const GST_RTSP_PAUSE: GstRTSPMethod = GstRTSPMethod::PAUSE; +pub const GST_RTSP_PLAY: GstRTSPMethod = GstRTSPMethod::PLAY; +pub const GST_RTSP_RECORD: GstRTSPMethod = GstRTSPMethod::RECORD; +pub const GST_RTSP_REDIRECT: GstRTSPMethod = GstRTSPMethod::REDIRECT; +pub const GST_RTSP_SETUP: GstRTSPMethod = GstRTSPMethod::SETUP; +pub const GST_RTSP_SET_PARAMETER: GstRTSPMethod = GstRTSPMethod::SET_PARAMETER; +pub const GST_RTSP_TEARDOWN: GstRTSPMethod = GstRTSPMethod::TEARDOWN; +pub const GST_RTSP_GET: GstRTSPMethod = GstRTSPMethod::GET; +pub const GST_RTSP_POST: GstRTSPMethod = GstRTSPMethod::POST; + +bitflags! { + #[repr(C)] + pub struct GstRTSPProfile: c_uint { + const UNKNOWN = 0; + const AVP = 1; + const SAVP = 2; + const AVPF = 4; + const SAVPF = 8; + } +} +pub const GST_RTSP_PROFILE_UNKNOWN: GstRTSPProfile = GstRTSPProfile::UNKNOWN; +pub const GST_RTSP_PROFILE_AVP: GstRTSPProfile = GstRTSPProfile::AVP; +pub const GST_RTSP_PROFILE_SAVP: GstRTSPProfile = GstRTSPProfile::SAVP; +pub const GST_RTSP_PROFILE_AVPF: GstRTSPProfile = GstRTSPProfile::AVPF; +pub const GST_RTSP_PROFILE_SAVPF: GstRTSPProfile = GstRTSPProfile::SAVPF; + +bitflags! { + #[repr(C)] + pub struct GstRTSPTransMode: c_uint { + const UNKNOWN = 0; + const RTP = 1; + const RDT = 2; + } +} +pub const GST_RTSP_TRANS_UNKNOWN: GstRTSPTransMode = GstRTSPTransMode::UNKNOWN; +pub const GST_RTSP_TRANS_RTP: GstRTSPTransMode = GstRTSPTransMode::RTP; +pub const GST_RTSP_TRANS_RDT: GstRTSPTransMode = GstRTSPTransMode::RDT; + +// Unions +#[repr(C)] +#[derive(Copy, Clone)] +pub union GstRTSPMessage_type_data { + pub request: GstRTSPMessage_type_data_request, + pub response: GstRTSPMessage_type_data_response, + pub data: GstRTSPMessage_type_data_data, +} + +impl ::std::fmt::Debug for GstRTSPMessage_type_data { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPMessage_type_data @ {:?}", self as *const _)) + .field("request", unsafe { &self.request }) + .field("response", unsafe { &self.response }) + .field("data", unsafe { &self.data }) + .finish() + } +} + +// Records +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPAuthCredential { + pub scheme: GstRTSPAuthMethod, + pub params: *mut *mut GstRTSPAuthParam, + pub authorization: *mut c_char, +} + +impl ::std::fmt::Debug for GstRTSPAuthCredential { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPAuthCredential @ {:?}", self as *const _)) + .field("scheme", &self.scheme) + .field("params", &self.params) + .field("authorization", &self.authorization) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPAuthParam { + pub name: *mut c_char, + pub value: *mut c_char, +} + +impl ::std::fmt::Debug for GstRTSPAuthParam { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPAuthParam @ {:?}", self as *const _)) + .field("name", &self.name) + .field("value", &self.value) + .finish() + } +} + +#[repr(C)] +pub struct GstRTSPConnection(c_void); + +impl ::std::fmt::Debug for GstRTSPConnection { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPConnection @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPExtensionInterface { + pub parent: gobject::GTypeInterface, + pub detect_server: Option gboolean>, + pub before_send: Option GstRTSPResult>, + pub after_send: Option GstRTSPResult>, + pub parse_sdp: Option GstRTSPResult>, + pub setup_media: Option GstRTSPResult>, + pub configure_stream: Option gboolean>, + pub get_transports: Option GstRTSPResult>, + pub stream_select: Option GstRTSPResult>, + pub send: Option GstRTSPResult>, + pub receive_request: Option GstRTSPResult>, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPExtensionInterface { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPExtensionInterface @ {:?}", self as *const _)) + .field("parent", &self.parent) + .field("detect_server", &self.detect_server) + .field("before_send", &self.before_send) + .field("after_send", &self.after_send) + .field("parse_sdp", &self.parse_sdp) + .field("setup_media", &self.setup_media) + .field("configure_stream", &self.configure_stream) + .field("get_transports", &self.get_transports) + .field("stream_select", &self.stream_select) + .field("send", &self.send) + .field("receive_request", &self.receive_request) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPMessage { + pub type_: GstRTSPMsgType, + pub type_data: GstRTSPMessage_type_data, + pub hdr_fields: *mut glib::GArray, + pub body: *mut u8, + pub body_size: c_uint, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPMessage { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPMessage @ {:?}", self as *const _)) + .field("type_", &self.type_) + .field("type_data", &self.type_data) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPMessage_type_data_data { + pub channel: u8, +} + +impl ::std::fmt::Debug for GstRTSPMessage_type_data_data { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPMessage_type_data_data @ {:?}", self as *const _)) + .field("channel", &self.channel) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPMessage_type_data_request { + pub method: GstRTSPMethod, + pub uri: *mut c_char, + pub version: GstRTSPVersion, +} + +impl ::std::fmt::Debug for GstRTSPMessage_type_data_request { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPMessage_type_data_request @ {:?}", self as *const _)) + .field("method", &self.method) + .field("uri", &self.uri) + .field("version", &self.version) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPMessage_type_data_response { + pub code: GstRTSPStatusCode, + pub reason: *mut c_char, + pub version: GstRTSPVersion, +} + +impl ::std::fmt::Debug for GstRTSPMessage_type_data_response { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPMessage_type_data_response @ {:?}", self as *const _)) + .field("code", &self.code) + .field("reason", &self.reason) + .field("version", &self.version) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPRange { + pub min: c_int, + pub max: c_int, +} + +impl ::std::fmt::Debug for GstRTSPRange { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPRange @ {:?}", self as *const _)) + .field("min", &self.min) + .field("max", &self.max) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPTime { + pub type_: GstRTSPTimeType, + pub seconds: c_double, +} + +impl ::std::fmt::Debug for GstRTSPTime { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPTime @ {:?}", self as *const _)) + .field("type_", &self.type_) + .field("seconds", &self.seconds) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPTime2 { + pub frames: c_double, + pub year: c_uint, + pub month: c_uint, + pub day: c_uint, +} + +impl ::std::fmt::Debug for GstRTSPTime2 { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPTime2 @ {:?}", self as *const _)) + .field("frames", &self.frames) + .field("year", &self.year) + .field("month", &self.month) + .field("day", &self.day) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPTimeRange { + pub unit: GstRTSPRangeUnit, + pub min: GstRTSPTime, + pub max: GstRTSPTime, + pub min2: GstRTSPTime2, + pub max2: GstRTSPTime2, +} + +impl ::std::fmt::Debug for GstRTSPTimeRange { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPTimeRange @ {:?}", self as *const _)) + .field("unit", &self.unit) + .field("min", &self.min) + .field("max", &self.max) + .field("min2", &self.min2) + .field("max2", &self.max2) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPTransport { + pub trans: GstRTSPTransMode, + pub profile: GstRTSPProfile, + pub lower_transport: GstRTSPLowerTrans, + pub destination: *mut c_char, + pub source: *mut c_char, + pub layers: c_uint, + pub mode_play: gboolean, + pub mode_record: gboolean, + pub append: gboolean, + pub interleaved: GstRTSPRange, + pub ttl: c_uint, + pub port: GstRTSPRange, + pub client_port: GstRTSPRange, + pub server_port: GstRTSPRange, + pub ssrc: c_uint, + pub _gst_reserved: [gpointer; 4], +} + +impl ::std::fmt::Debug for GstRTSPTransport { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPTransport @ {:?}", self as *const _)) + .field("trans", &self.trans) + .field("profile", &self.profile) + .field("lower_transport", &self.lower_transport) + .field("destination", &self.destination) + .field("source", &self.source) + .field("layers", &self.layers) + .field("mode_play", &self.mode_play) + .field("mode_record", &self.mode_record) + .field("append", &self.append) + .field("interleaved", &self.interleaved) + .field("ttl", &self.ttl) + .field("port", &self.port) + .field("client_port", &self.client_port) + .field("server_port", &self.server_port) + .field("ssrc", &self.ssrc) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPUrl { + pub transports: GstRTSPLowerTrans, + pub family: GstRTSPFamily, + pub user: *mut c_char, + pub passwd: *mut c_char, + pub host: *mut c_char, + pub port: u16, + pub abspath: *mut c_char, + pub query: *mut c_char, +} + +impl ::std::fmt::Debug for GstRTSPUrl { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPUrl @ {:?}", self as *const _)) + .field("transports", &self.transports) + .field("family", &self.family) + .field("user", &self.user) + .field("passwd", &self.passwd) + .field("host", &self.host) + .field("port", &self.port) + .field("abspath", &self.abspath) + .field("query", &self.query) + .finish() + } +} + +#[repr(C)] +pub struct GstRTSPWatch(c_void); + +impl ::std::fmt::Debug for GstRTSPWatch { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPWatch @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstRTSPWatchFuncs { + pub message_received: Option GstRTSPResult>, + pub message_sent: Option GstRTSPResult>, + pub closed: Option GstRTSPResult>, + pub error: Option GstRTSPResult>, + pub tunnel_start: Option GstRTSPStatusCode>, + pub tunnel_complete: Option GstRTSPResult>, + pub error_full: Option GstRTSPResult>, + pub tunnel_lost: Option GstRTSPResult>, + pub tunnel_http_response: Option GstRTSPResult>, + pub _gst_reserved: [gpointer; 3], +} + +impl ::std::fmt::Debug for GstRTSPWatchFuncs { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstRTSPWatchFuncs @ {:?}", self as *const _)) + .field("message_received", &self.message_received) + .field("message_sent", &self.message_sent) + .field("closed", &self.closed) + .field("error", &self.error) + .field("tunnel_start", &self.tunnel_start) + .field("tunnel_complete", &self.tunnel_complete) + .field("error_full", &self.error_full) + .field("tunnel_lost", &self.tunnel_lost) + .field("tunnel_http_response", &self.tunnel_http_response) + .finish() + } +} + +// Interfaces +#[repr(C)] +pub struct GstRTSPExtension(c_void); + +impl ::std::fmt::Debug for GstRTSPExtension { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + write!(f, "GstRTSPExtension @ {:?}", self as *const _) + } +} + + +extern "C" { + + //========================================================================= + // GstRTSPAuthMethod + //========================================================================= + pub fn gst_rtsp_auth_method_get_type() -> GType; + + //========================================================================= + // GstRTSPFamily + //========================================================================= + pub fn gst_rtsp_family_get_type() -> GType; + + //========================================================================= + // GstRTSPHeaderField + //========================================================================= + pub fn gst_rtsp_header_field_get_type() -> GType; + + //========================================================================= + // GstRTSPMsgType + //========================================================================= + pub fn gst_rtsp_msg_type_get_type() -> GType; + + //========================================================================= + // GstRTSPRangeUnit + //========================================================================= + pub fn gst_rtsp_range_unit_get_type() -> GType; + + //========================================================================= + // GstRTSPResult + //========================================================================= + pub fn gst_rtsp_result_get_type() -> GType; + + //========================================================================= + // GstRTSPState + //========================================================================= + pub fn gst_rtsp_state_get_type() -> GType; + + //========================================================================= + // GstRTSPStatusCode + //========================================================================= + pub fn gst_rtsp_status_code_get_type() -> GType; + + //========================================================================= + // GstRTSPTimeType + //========================================================================= + pub fn gst_rtsp_time_type_get_type() -> GType; + + //========================================================================= + // GstRTSPVersion + //========================================================================= + pub fn gst_rtsp_version_get_type() -> GType; + pub fn gst_rtsp_version_as_text(version: GstRTSPVersion) -> *const c_char; + + //========================================================================= + // GstRTSPEvent + //========================================================================= + pub fn gst_rtsp_event_get_type() -> GType; + + //========================================================================= + // GstRTSPLowerTrans + //========================================================================= + pub fn gst_rtsp_lower_trans_get_type() -> GType; + + //========================================================================= + // GstRTSPMethod + //========================================================================= + pub fn gst_rtsp_method_get_type() -> GType; + pub fn gst_rtsp_method_as_text(method: GstRTSPMethod) -> *const c_char; + + //========================================================================= + // GstRTSPProfile + //========================================================================= + pub fn gst_rtsp_profile_get_type() -> GType; + + //========================================================================= + // GstRTSPTransMode + //========================================================================= + pub fn gst_rtsp_trans_mode_get_type() -> GType; + + //========================================================================= + // GstRTSPAuthCredential + //========================================================================= + pub fn gst_rtsp_auth_credential_get_type() -> GType; + + //========================================================================= + // GstRTSPAuthParam + //========================================================================= + pub fn gst_rtsp_auth_param_get_type() -> GType; + pub fn gst_rtsp_auth_param_copy(param: *mut GstRTSPAuthParam) -> *mut GstRTSPAuthParam; + pub fn gst_rtsp_auth_param_free(param: *mut GstRTSPAuthParam); + + //========================================================================= + // GstRTSPConnection + //========================================================================= + pub fn gst_rtsp_connection_clear_auth_params(conn: *mut GstRTSPConnection); + pub fn gst_rtsp_connection_close(conn: *mut GstRTSPConnection) -> GstRTSPResult; + pub fn gst_rtsp_connection_connect(conn: *mut GstRTSPConnection, timeout: *mut glib::GTimeVal) -> GstRTSPResult; + pub fn gst_rtsp_connection_connect_with_response(conn: *mut GstRTSPConnection, timeout: *mut glib::GTimeVal, response: *mut GstRTSPMessage) -> GstRTSPResult; + pub fn gst_rtsp_connection_do_tunnel(conn: *mut GstRTSPConnection, conn2: *mut GstRTSPConnection) -> GstRTSPResult; + pub fn gst_rtsp_connection_flush(conn: *mut GstRTSPConnection, flush: gboolean) -> GstRTSPResult; + pub fn gst_rtsp_connection_free(conn: *mut GstRTSPConnection) -> GstRTSPResult; + pub fn gst_rtsp_connection_get_ip(conn: *const GstRTSPConnection) -> *const c_char; + pub fn gst_rtsp_connection_get_read_socket(conn: *const GstRTSPConnection) -> *mut gio::GSocket; + pub fn gst_rtsp_connection_get_remember_session_id(conn: *mut GstRTSPConnection) -> gboolean; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_rtsp_connection_get_tls(conn: *mut GstRTSPConnection, error: *mut *mut glib::GError) -> *mut gio::GTlsConnection; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_rtsp_connection_get_tls_database(conn: *mut GstRTSPConnection) -> *mut gio::GTlsDatabase; + #[cfg(any(feature = "v1_6", feature = "dox"))] + pub fn gst_rtsp_connection_get_tls_interaction(conn: *mut GstRTSPConnection) -> *mut gio::GTlsInteraction; + #[cfg(any(feature = "v1_2_1", feature = "dox"))] + pub fn gst_rtsp_connection_get_tls_validation_flags(conn: *mut GstRTSPConnection) -> gio::GTlsCertificateFlags; + pub fn gst_rtsp_connection_get_tunnelid(conn: *const GstRTSPConnection) -> *const c_char; + pub fn gst_rtsp_connection_get_url(conn: *const GstRTSPConnection) -> *mut GstRTSPUrl; + pub fn gst_rtsp_connection_get_write_socket(conn: *const GstRTSPConnection) -> *mut gio::GSocket; + pub fn gst_rtsp_connection_is_tunneled(conn: *const GstRTSPConnection) -> gboolean; + pub fn gst_rtsp_connection_next_timeout(conn: *mut GstRTSPConnection, timeout: *mut glib::GTimeVal) -> GstRTSPResult; + pub fn gst_rtsp_connection_poll(conn: *mut GstRTSPConnection, events: GstRTSPEvent, revents: *mut GstRTSPEvent, timeout: *mut glib::GTimeVal) -> GstRTSPResult; + pub fn gst_rtsp_connection_read(conn: *mut GstRTSPConnection, data: *mut u8, size: c_uint, timeout: *mut glib::GTimeVal) -> GstRTSPResult; + pub fn gst_rtsp_connection_receive(conn: *mut GstRTSPConnection, message: *mut GstRTSPMessage, timeout: *mut glib::GTimeVal) -> GstRTSPResult; + pub fn gst_rtsp_connection_reset_timeout(conn: *mut GstRTSPConnection) -> GstRTSPResult; + pub fn gst_rtsp_connection_send(conn: *mut GstRTSPConnection, message: *mut GstRTSPMessage, timeout: *mut glib::GTimeVal) -> GstRTSPResult; + pub fn gst_rtsp_connection_set_auth(conn: *mut GstRTSPConnection, method: GstRTSPAuthMethod, user: *const c_char, pass: *const c_char) -> GstRTSPResult; + pub fn gst_rtsp_connection_set_auth_param(conn: *mut GstRTSPConnection, param: *const c_char, value: *const c_char); + pub fn gst_rtsp_connection_set_http_mode(conn: *mut GstRTSPConnection, enable: gboolean); + pub fn gst_rtsp_connection_set_ip(conn: *mut GstRTSPConnection, ip: *const c_char); + pub fn gst_rtsp_connection_set_proxy(conn: *mut GstRTSPConnection, host: *const c_char, port: c_uint) -> GstRTSPResult; + pub fn gst_rtsp_connection_set_qos_dscp(conn: *mut GstRTSPConnection, qos_dscp: c_uint) -> GstRTSPResult; + pub fn gst_rtsp_connection_set_remember_session_id(conn: *mut GstRTSPConnection, remember: gboolean); + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_rtsp_connection_set_tls_database(conn: *mut GstRTSPConnection, database: *mut gio::GTlsDatabase); + #[cfg(any(feature = "v1_6", feature = "dox"))] + pub fn gst_rtsp_connection_set_tls_interaction(conn: *mut GstRTSPConnection, interaction: *mut gio::GTlsInteraction); + #[cfg(any(feature = "v1_2_1", feature = "dox"))] + pub fn gst_rtsp_connection_set_tls_validation_flags(conn: *mut GstRTSPConnection, flags: gio::GTlsCertificateFlags) -> gboolean; + pub fn gst_rtsp_connection_set_tunneled(conn: *mut GstRTSPConnection, tunneled: gboolean); + pub fn gst_rtsp_connection_write(conn: *mut GstRTSPConnection, data: *const u8, size: c_uint, timeout: *mut glib::GTimeVal) -> GstRTSPResult; + pub fn gst_rtsp_connection_accept(socket: *mut gio::GSocket, conn: *mut *mut GstRTSPConnection, cancellable: *mut gio::GCancellable) -> GstRTSPResult; + pub fn gst_rtsp_connection_create(url: *const GstRTSPUrl, conn: *mut *mut GstRTSPConnection) -> GstRTSPResult; + pub fn gst_rtsp_connection_create_from_socket(socket: *mut gio::GSocket, ip: *const c_char, port: u16, initial_buffer: *const c_char, conn: *mut *mut GstRTSPConnection) -> GstRTSPResult; + + //========================================================================= + // GstRTSPMessage + //========================================================================= + pub fn gst_rtsp_message_add_header(msg: *mut GstRTSPMessage, field: GstRTSPHeaderField, value: *const c_char) -> GstRTSPResult; + #[cfg(any(feature = "v1_6", feature = "dox"))] + pub fn gst_rtsp_message_add_header_by_name(msg: *mut GstRTSPMessage, header: *const c_char, value: *const c_char) -> GstRTSPResult; + pub fn gst_rtsp_message_append_headers(msg: *const GstRTSPMessage, str: *mut glib::GString) -> GstRTSPResult; + pub fn gst_rtsp_message_dump(msg: *mut GstRTSPMessage) -> GstRTSPResult; + pub fn gst_rtsp_message_free(msg: *mut GstRTSPMessage) -> GstRTSPResult; + pub fn gst_rtsp_message_get_body(msg: *const GstRTSPMessage, data: *mut *mut u8, size: *mut c_uint) -> GstRTSPResult; + pub fn gst_rtsp_message_get_header(msg: *const GstRTSPMessage, field: GstRTSPHeaderField, value: *mut *mut c_char, indx: c_int) -> GstRTSPResult; + #[cfg(any(feature = "v1_6", feature = "dox"))] + pub fn gst_rtsp_message_get_header_by_name(msg: *mut GstRTSPMessage, header: *const c_char, value: *mut *mut c_char, index: c_int) -> GstRTSPResult; + pub fn gst_rtsp_message_get_type(msg: *mut GstRTSPMessage) -> GstRTSPMsgType; + pub fn gst_rtsp_message_init(msg: *mut GstRTSPMessage) -> GstRTSPResult; + pub fn gst_rtsp_message_init_data(msg: *mut GstRTSPMessage, channel: u8) -> GstRTSPResult; + pub fn gst_rtsp_message_init_request(msg: *mut GstRTSPMessage, method: GstRTSPMethod, uri: *const c_char) -> GstRTSPResult; + pub fn gst_rtsp_message_init_response(msg: *mut GstRTSPMessage, code: GstRTSPStatusCode, reason: *const c_char, request: *const GstRTSPMessage) -> GstRTSPResult; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_rtsp_message_parse_auth_credentials(msg: *mut GstRTSPMessage, field: GstRTSPHeaderField) -> *mut *mut GstRTSPAuthCredential; + pub fn gst_rtsp_message_parse_data(msg: *mut GstRTSPMessage, channel: *mut u8) -> GstRTSPResult; + pub fn gst_rtsp_message_parse_request(msg: *mut GstRTSPMessage, method: *mut GstRTSPMethod, uri: *mut *const c_char, version: *mut GstRTSPVersion) -> GstRTSPResult; + pub fn gst_rtsp_message_parse_response(msg: *mut GstRTSPMessage, code: *mut GstRTSPStatusCode, reason: *mut *const c_char, version: *mut GstRTSPVersion) -> GstRTSPResult; + pub fn gst_rtsp_message_remove_header(msg: *mut GstRTSPMessage, field: GstRTSPHeaderField, indx: c_int) -> GstRTSPResult; + #[cfg(any(feature = "v1_6", feature = "dox"))] + pub fn gst_rtsp_message_remove_header_by_name(msg: *mut GstRTSPMessage, header: *const c_char, index: c_int) -> GstRTSPResult; + pub fn gst_rtsp_message_set_body(msg: *mut GstRTSPMessage, data: *mut u8, size: c_uint) -> GstRTSPResult; + pub fn gst_rtsp_message_steal_body(msg: *mut GstRTSPMessage, data: *mut *mut u8, size: *mut c_uint) -> GstRTSPResult; + pub fn gst_rtsp_message_take_body(msg: *mut GstRTSPMessage, data: *mut u8, size: c_uint) -> GstRTSPResult; + pub fn gst_rtsp_message_take_header(msg: *mut GstRTSPMessage, field: GstRTSPHeaderField, value: *mut c_char) -> GstRTSPResult; + #[cfg(any(feature = "v1_6", feature = "dox"))] + pub fn gst_rtsp_message_take_header_by_name(msg: *mut GstRTSPMessage, header: *const c_char, value: *mut c_char) -> GstRTSPResult; + pub fn gst_rtsp_message_unset(msg: *mut GstRTSPMessage) -> GstRTSPResult; + pub fn gst_rtsp_message_new(msg: *mut *mut GstRTSPMessage) -> GstRTSPResult; + pub fn gst_rtsp_message_new_data(msg: *mut *mut GstRTSPMessage, channel: u8) -> GstRTSPResult; + pub fn gst_rtsp_message_new_request(msg: *mut *mut GstRTSPMessage, method: GstRTSPMethod, uri: *const c_char) -> GstRTSPResult; + pub fn gst_rtsp_message_new_response(msg: *mut *mut GstRTSPMessage, code: GstRTSPStatusCode, reason: *const c_char, request: *const GstRTSPMessage) -> GstRTSPResult; + + //========================================================================= + // GstRTSPRange + //========================================================================= + pub fn gst_rtsp_range_convert_units(range: *mut GstRTSPTimeRange, unit: GstRTSPRangeUnit) -> gboolean; + pub fn gst_rtsp_range_free(range: *mut GstRTSPTimeRange); + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_rtsp_range_get_times(range: *const GstRTSPTimeRange, min: *mut gst::GstClockTime, max: *mut gst::GstClockTime) -> gboolean; + pub fn gst_rtsp_range_parse(rangestr: *const c_char, range: *mut *mut GstRTSPTimeRange) -> GstRTSPResult; + pub fn gst_rtsp_range_to_string(range: *const GstRTSPTimeRange) -> *mut c_char; + + //========================================================================= + // GstRTSPTransport + //========================================================================= + pub fn gst_rtsp_transport_as_text(transport: *mut GstRTSPTransport) -> *mut c_char; + pub fn gst_rtsp_transport_free(transport: *mut GstRTSPTransport) -> GstRTSPResult; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_rtsp_transport_get_media_type(transport: *mut GstRTSPTransport, media_type: *mut *const c_char) -> GstRTSPResult; + pub fn gst_rtsp_transport_init(transport: *mut GstRTSPTransport) -> GstRTSPResult; + pub fn gst_rtsp_transport_get_manager(trans: GstRTSPTransMode, manager: *mut *const c_char, option: c_uint) -> GstRTSPResult; + pub fn gst_rtsp_transport_get_mime(trans: GstRTSPTransMode, mime: *mut *const c_char) -> GstRTSPResult; + pub fn gst_rtsp_transport_new(transport: *mut *mut GstRTSPTransport) -> GstRTSPResult; + pub fn gst_rtsp_transport_parse(str: *const c_char, transport: *mut GstRTSPTransport) -> GstRTSPResult; + + //========================================================================= + // GstRTSPUrl + //========================================================================= + pub fn gst_rtsp_url_get_type() -> GType; + pub fn gst_rtsp_url_copy(url: *const GstRTSPUrl) -> *mut GstRTSPUrl; + pub fn gst_rtsp_url_decode_path_components(url: *const GstRTSPUrl) -> *mut *mut c_char; + pub fn gst_rtsp_url_free(url: *mut GstRTSPUrl); + pub fn gst_rtsp_url_get_port(url: *const GstRTSPUrl, port: *mut u16) -> GstRTSPResult; + pub fn gst_rtsp_url_get_request_uri(url: *const GstRTSPUrl) -> *mut c_char; + pub fn gst_rtsp_url_set_port(url: *mut GstRTSPUrl, port: u16) -> GstRTSPResult; + pub fn gst_rtsp_url_parse(urlstr: *const c_char, url: *mut *mut GstRTSPUrl) -> GstRTSPResult; + + //========================================================================= + // GstRTSPWatch + //========================================================================= + pub fn gst_rtsp_watch_attach(watch: *mut GstRTSPWatch, context: *mut glib::GMainContext) -> c_uint; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_rtsp_watch_get_send_backlog(watch: *mut GstRTSPWatch, bytes: *mut size_t, messages: *mut c_uint); + pub fn gst_rtsp_watch_reset(watch: *mut GstRTSPWatch); + pub fn gst_rtsp_watch_send_message(watch: *mut GstRTSPWatch, message: *mut GstRTSPMessage, id: *mut c_uint) -> GstRTSPResult; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_rtsp_watch_set_flushing(watch: *mut GstRTSPWatch, flushing: gboolean); + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_rtsp_watch_set_send_backlog(watch: *mut GstRTSPWatch, bytes: size_t, messages: c_uint); + pub fn gst_rtsp_watch_unref(watch: *mut GstRTSPWatch); + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_rtsp_watch_wait_backlog(watch: *mut GstRTSPWatch, timeout: *mut glib::GTimeVal) -> GstRTSPResult; + pub fn gst_rtsp_watch_write_data(watch: *mut GstRTSPWatch, data: *mut u8, size: c_uint, id: *mut c_uint) -> GstRTSPResult; + pub fn gst_rtsp_watch_new(conn: *mut GstRTSPConnection, funcs: *mut GstRTSPWatchFuncs, user_data: gpointer, notify: glib::GDestroyNotify) -> *mut GstRTSPWatch; + + //========================================================================= + // GstRTSPExtension + //========================================================================= + pub fn gst_rtsp_extension_get_type() -> GType; + pub fn gst_rtsp_extension_after_send(ext: *mut GstRTSPExtension, req: *mut GstRTSPMessage, resp: *mut GstRTSPMessage) -> GstRTSPResult; + pub fn gst_rtsp_extension_before_send(ext: *mut GstRTSPExtension, req: *mut GstRTSPMessage) -> GstRTSPResult; + pub fn gst_rtsp_extension_configure_stream(ext: *mut GstRTSPExtension, caps: *mut gst::GstCaps) -> gboolean; + pub fn gst_rtsp_extension_detect_server(ext: *mut GstRTSPExtension, resp: *mut GstRTSPMessage) -> gboolean; + pub fn gst_rtsp_extension_get_transports(ext: *mut GstRTSPExtension, protocols: GstRTSPLowerTrans, transport: *mut *mut c_char) -> GstRTSPResult; + pub fn gst_rtsp_extension_parse_sdp(ext: *mut GstRTSPExtension, sdp: *mut gst_sdp::GstSDPMessage, s: *mut gst::GstStructure) -> GstRTSPResult; + pub fn gst_rtsp_extension_receive_request(ext: *mut GstRTSPExtension, req: *mut GstRTSPMessage) -> GstRTSPResult; + pub fn gst_rtsp_extension_send(ext: *mut GstRTSPExtension, req: *mut GstRTSPMessage, resp: *mut GstRTSPMessage) -> GstRTSPResult; + pub fn gst_rtsp_extension_setup_media(ext: *mut GstRTSPExtension, media: *mut gst_sdp::GstSDPMedia) -> GstRTSPResult; + pub fn gst_rtsp_extension_stream_select(ext: *mut GstRTSPExtension, url: *mut GstRTSPUrl) -> GstRTSPResult; + + //========================================================================= + // Other functions + //========================================================================= + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_rtsp_auth_credentials_free(credentials: *mut *mut GstRTSPAuthCredential); + pub fn gst_rtsp_find_header_field(header: *const c_char) -> GstRTSPHeaderField; + pub fn gst_rtsp_find_method(method: *const c_char) -> GstRTSPMethod; + #[cfg(any(feature = "v1_12", feature = "dox"))] + pub fn gst_rtsp_generate_digest_auth_response(algorithm: *const c_char, method: *const c_char, realm: *const c_char, username: *const c_char, password: *const c_char, uri: *const c_char, nonce: *const c_char) -> *mut c_char; + pub fn gst_rtsp_header_allow_multiple(field: GstRTSPHeaderField) -> gboolean; + pub fn gst_rtsp_header_as_text(field: GstRTSPHeaderField) -> *const c_char; + pub fn gst_rtsp_options_as_text(options: GstRTSPMethod) -> *mut c_char; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_rtsp_options_from_text(options: *const c_char) -> GstRTSPMethod; + pub fn gst_rtsp_status_as_text(code: GstRTSPStatusCode) -> *const c_char; + pub fn gst_rtsp_strresult(result: GstRTSPResult) -> *mut c_char; + +} diff --git a/gstreamer-sdp-sys/CHANGELOG.md b/gstreamer-sdp-sys/CHANGELOG.md new file mode 100644 index 000000000..0b8ae721c --- /dev/null +++ b/gstreamer-sdp-sys/CHANGELOG.md @@ -0,0 +1,78 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html), +specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field). + +## [0.4.0] - 2017-12-23 +### Added +- GstNet bindings +- Debug impls for basically every type +- Script to automatically regenerate everything + +### Changed +- gst_player_[sg]et_multiview_mode() argument types were changed from + GstMultiviewMode to GstMultiviewFramePacking, which is the correct subset + of the former that is allowed here +- gst_plugin_add_dependency() takes *mut *mut c_char as argument type instead + of *mut *const c_char + +## [0.3.0] - 2017-11-26 +### Added +- GstMpegTs bindings + +### Changed +- GstDebugColorFlags from an enum to a bitfield +- Updated to bitflags 1.0 +- Added support for the "dox" feature to generate documentation for all + possible versions +- Depend on glib-sys/gobject-sys 0.5 + +### Fixes +- GstStackTraceFlags, gst_flow_combiner_ref/unref are only available since + 1.12 and 1.12.1 respectively +- All C enums are represented as integers + constants now to prevent undefined + behaviour when out-of-range values are received + +## [0.2.1] - 2017-09-10 +### Changed +- Add README.md to all crates directly + +### Fixed +- Fix various compiler warnings +- Fix versioning/feature mess. Now each library has features for all major + versions and for the correct minor versions that added API. +- Removed Cargo.lock from GIT + +## [0.2.0] - 2017-08-28 +### Added +- Add GstPlayer bindings + +### Changed +- Depend on bitflags 0.9 +- Update GIR files to 1.12.1 release +- Fix various errors in the GIR files, backported from GStreamer GIT master +- Depend on gobject-sys/glib-sys 0.4.0 for various improvements +- Regenerated everything with latest GIR + +## [0.1.1] - 2017-05-10 +### Added +- Add GstTag and GstApp bindings +- Add lots of missing fields to all the structs thanks to GIR improvements + +### Changed +- Update GIR files to 1.12.0 release +- Depend on gobject-sys/glib-sys 0.3.4 release for more complete structs +- Regenerated everything with latest GIR + +## [0.1.0] - 2017-04-09 + +- Initial release of the autogenerated GStreamer FFI bindings. + +[Unreleased]: https://github.com/sdroege/gstreamer-sys/compare/0.4.0...HEAD +[0.4.0]: https://github.com/sdroege/gstreamer-sys/compare/0.3.0...0.4.0 +[0.3.0]: https://github.com/sdroege/gstreamer-sys/compare/0.2.1...0.3.0 +[0.2.1]: https://github.com/sdroege/gstreamer-sys/compare/0.2.0...0.2.1 +[0.2.0]: https://github.com/sdroege/gstreamer-sys/compare/0.1.1...0.2.0 +[0.1.1]: https://github.com/sdroege/gstreamer-sys/compare/0.1.0...0.1.1 diff --git a/gstreamer-sdp-sys/Cargo.toml b/gstreamer-sdp-sys/Cargo.toml new file mode 100644 index 000000000..36c0ec3f1 --- /dev/null +++ b/gstreamer-sdp-sys/Cargo.toml @@ -0,0 +1,44 @@ +[build-dependencies] +pkg-config = "0.3.7" + +[dependencies] +bitflags = "1.0" +libc = "0.2" + +[dependencies.glib-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gobject-sys] +git = "https://github.com/gtk-rs/sys" + +[dependencies.gstreamer-sys] +path = "../gstreamer-sys" + +[features] +dox = [] +v1_2 = [] +v1_4 = ["v1_2"] +v1_6 = ["v1_4"] +v1_8 = ["v1_4"] +v1_8_1 = ["v1_8"] +v1_10 = ["v1_8_1"] +v1_12 = ["v1_10"] + +[lib] +name = "gstreamer_sdp_sys" + +[package] +build = "build.rs" +links = "gstsdp-1.0" +name = "gstreamer-sdp-sys" +version = "0.5.0" +authors = ["Mathieu Duponchelle "] +description = "FFI bindings to libgstsdp-1.0" +homepage = "https://gstreamer.freedesktop.org" +keywords = ["ffi", "gstreamer", "gnome", "multimedia"] +repository = "https://github.com/sdroege/gstreamer-sys" +license = "MIT" +readme = "README.md" + +[badges] +travis-ci = { repository = "sdroege/gstreamer-sys", branch = "master" } diff --git a/gstreamer-sdp-sys/LICENSE b/gstreamer-sdp-sys/LICENSE new file mode 100644 index 000000000..3d76f6e2f --- /dev/null +++ b/gstreamer-sdp-sys/LICENSE @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) 2017 Sebastian Dröge . + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + diff --git a/gstreamer-sdp-sys/README.md b/gstreamer-sdp-sys/README.md new file mode 100644 index 000000000..a8024f7c1 --- /dev/null +++ b/gstreamer-sdp-sys/README.md @@ -0,0 +1,31 @@ +# gstreamer-sdp-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-sys.svg)](https://crates.io/crates/gstreamer-sys) [![Build Status](https://travis-ci.org/sdroege/gstreamer-sys.svg?branch=master)](https://travis-ci.org/sdroege/gstreamer-sys) + +[GStreamer](https://gstreamer.freedesktop.org/) (Sdp library) FFI bindings for Rust. + +These bindings are providing unsafe FFI API that can be used to interface with +GStreamer. Generally they are meant to be used as the building block for +higher-level abstractions like: + + * Application-side bindings for GStreamer: https://github.com/sdroege/gstreamer-rs + * Crate for writing GStreamer plugins in Rust: https://github.com/sdroege/gst-plugin-rs + +The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/) +based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/) +API metadata provided by the GStreamer project. + +## LICENSE + +gstreamer-sys and all crates contained here are licensed under the MIT +license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT). + +GStreamer itself is licensed under the Lesser General Public License version +2.1 or (at your option) any later version: +https://www.gnu.org/licenses/lgpl-2.1.html + +## Contribution + +Any kinds of contributions are welcome as a pull request. + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above, +without any additional terms or conditions. diff --git a/gstreamer-sdp-sys/build.rs b/gstreamer-sdp-sys/build.rs new file mode 100644 index 000000000..4b467c4ac --- /dev/null +++ b/gstreamer-sdp-sys/build.rs @@ -0,0 +1,67 @@ +extern crate pkg_config; + +use pkg_config::{Config, Error}; +use std::env; +use std::io::prelude::*; +use std::io; +use std::process; + +fn main() { + if let Err(s) = find() { + let _ = writeln!(io::stderr(), "{}", s); + process::exit(1); + } +} + +fn find() -> Result<(), Error> { + let package_name = "gstreamer-sdp-1.0"; + let shared_libs = ["gstsdp-1.0"]; + let version = if cfg!(feature = "v1_8_1") { + "1.8.1" + } else if cfg!(feature = "v1_8") { + "1.8" + } else if cfg!(feature = "v1_4") { + "1.4" + } else { + "1.0" + }; + + if let Ok(lib_dir) = env::var("GTK_LIB_DIR") { + for lib_ in shared_libs.iter() { + println!("cargo:rustc-link-lib=dylib={}", lib_); + } + println!("cargo:rustc-link-search=native={}", lib_dir); + return Ok(()) + } + + let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); + let hardcode_shared_libs = target.contains("windows"); + + let mut config = Config::new(); + config.atleast_version(version); + if hardcode_shared_libs { + config.cargo_metadata(false); + } + match config.probe(package_name) { + Ok(library) => { + if hardcode_shared_libs { + for lib_ in shared_libs.iter() { + println!("cargo:rustc-link-lib=dylib={}", lib_); + } + for path in library.link_paths.iter() { + println!("cargo:rustc-link-search=native={}", + path.to_str().expect("library path doesn't exist")); + } + } + Ok(()) + } + Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => { + for lib_ in shared_libs.iter() { + println!("cargo:rustc-link-lib=dylib={}", lib_); + } + Ok(()) + } + Err(err) => Err(err), + } +} + diff --git a/gstreamer-sdp-sys/src/lib.rs b/gstreamer-sdp-sys/src/lib.rs new file mode 100644 index 000000000..dcb27d489 --- /dev/null +++ b/gstreamer-sdp-sys/src/lib.rs @@ -0,0 +1,853 @@ +// This file was generated by gir (81a781f) from gir-files (???) +// DO NOT EDIT + +#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] + +extern crate libc; +extern crate bitflags; +extern crate glib_sys as glib; +extern crate gobject_sys as gobject; +extern crate gstreamer_sys as gst; + +#[allow(unused_imports)] +use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double, + c_short, c_ushort, c_long, c_ulong, + c_void, size_t, ssize_t, intptr_t, uintptr_t, time_t, FILE}; + +#[allow(unused_imports)] +use glib::{gboolean, gconstpointer, gpointer, GType, Volatile}; + +// Enums +pub type GstMIKEYCacheType = c_int; +pub const GST_MIKEY_CACHE_NONE: GstMIKEYCacheType = 0; +pub const GST_MIKEY_CACHE_ALWAYS: GstMIKEYCacheType = 1; +pub const GST_MIKEY_CACHE_FOR_CSB: GstMIKEYCacheType = 2; + +pub type GstMIKEYEncAlg = c_int; +pub const GST_MIKEY_ENC_NULL: GstMIKEYEncAlg = 0; +pub const GST_MIKEY_ENC_AES_CM_128: GstMIKEYEncAlg = 1; +pub const GST_MIKEY_ENC_AES_KW_128: GstMIKEYEncAlg = 2; + +pub type GstMIKEYKVType = c_int; +pub const GST_MIKEY_KV_NULL: GstMIKEYKVType = 0; +pub const GST_MIKEY_KV_SPI: GstMIKEYKVType = 1; +pub const GST_MIKEY_KV_INTERVAL: GstMIKEYKVType = 2; + +pub type GstMIKEYKeyDataType = c_int; +pub const GST_MIKEY_KD_TGK: GstMIKEYKeyDataType = 0; +pub const GST_MIKEY_KD_TEK: GstMIKEYKeyDataType = 2; + +pub type GstMIKEYMacAlg = c_int; +pub const GST_MIKEY_MAC_NULL: GstMIKEYMacAlg = 0; +pub const GST_MIKEY_MAC_HMAC_SHA_1_160: GstMIKEYMacAlg = 1; + +pub type MIKEYMapType = c_int; +pub const GST_MIKEY_MAP_TYPE_SRTP: MIKEYMapType = 0; +pub type GstMIKEYMapType = MIKEYMapType; + +pub type MIKEYPRFFunc = c_int; +pub const GST_MIKEY_PRF_MIKEY_1: MIKEYPRFFunc = 0; +pub type GstMIKEYPRFFunc = MIKEYPRFFunc; + +pub type GstMIKEYPayloadType = c_int; +pub const GST_MIKEY_PT_LAST: GstMIKEYPayloadType = 0; +pub const GST_MIKEY_PT_KEMAC: GstMIKEYPayloadType = 1; +pub const GST_MIKEY_PT_PKE: GstMIKEYPayloadType = 2; +pub const GST_MIKEY_PT_DH: GstMIKEYPayloadType = 3; +pub const GST_MIKEY_PT_SIGN: GstMIKEYPayloadType = 4; +pub const GST_MIKEY_PT_T: GstMIKEYPayloadType = 5; +pub const GST_MIKEY_PT_ID: GstMIKEYPayloadType = 6; +pub const GST_MIKEY_PT_CERT: GstMIKEYPayloadType = 7; +pub const GST_MIKEY_PT_CHASH: GstMIKEYPayloadType = 8; +pub const GST_MIKEY_PT_V: GstMIKEYPayloadType = 9; +pub const GST_MIKEY_PT_SP: GstMIKEYPayloadType = 10; +pub const GST_MIKEY_PT_RAND: GstMIKEYPayloadType = 11; +pub const GST_MIKEY_PT_ERR: GstMIKEYPayloadType = 12; +pub const GST_MIKEY_PT_KEY_DATA: GstMIKEYPayloadType = 20; +pub const GST_MIKEY_PT_GEN_EXT: GstMIKEYPayloadType = 21; + +pub type MIKEYSecProto = c_int; +pub const GST_MIKEY_SEC_PROTO_SRTP: MIKEYSecProto = 0; +pub type GstMIKEYSecProto = MIKEYSecProto; + +pub type GstMIKEYSecSRTP = c_int; +pub const GST_MIKEY_SP_SRTP_ENC_ALG: GstMIKEYSecSRTP = 0; +pub const GST_MIKEY_SP_SRTP_ENC_KEY_LEN: GstMIKEYSecSRTP = 1; +pub const GST_MIKEY_SP_SRTP_AUTH_ALG: GstMIKEYSecSRTP = 2; +pub const GST_MIKEY_SP_SRTP_AUTH_KEY_LEN: GstMIKEYSecSRTP = 3; +pub const GST_MIKEY_SP_SRTP_SALT_KEY_LEN: GstMIKEYSecSRTP = 4; +pub const GST_MIKEY_SP_SRTP_PRF: GstMIKEYSecSRTP = 5; +pub const GST_MIKEY_SP_SRTP_KEY_DERIV_RATE: GstMIKEYSecSRTP = 6; +pub const GST_MIKEY_SP_SRTP_SRTP_ENC: GstMIKEYSecSRTP = 7; +pub const GST_MIKEY_SP_SRTP_SRTCP_ENC: GstMIKEYSecSRTP = 8; +pub const GST_MIKEY_SP_SRTP_FEC_ORDER: GstMIKEYSecSRTP = 9; +pub const GST_MIKEY_SP_SRTP_SRTP_AUTH: GstMIKEYSecSRTP = 10; +pub const GST_MIKEY_SP_SRTP_AUTH_TAG_LEN: GstMIKEYSecSRTP = 11; +pub const GST_MIKEY_SP_SRTP_SRTP_PREFIX_LEN: GstMIKEYSecSRTP = 12; + +pub type GstMIKEYTSType = c_int; +pub const GST_MIKEY_TS_TYPE_NTP_UTC: GstMIKEYTSType = 0; +pub const GST_MIKEY_TS_TYPE_NTP: GstMIKEYTSType = 1; +pub const GST_MIKEY_TS_TYPE_COUNTER: GstMIKEYTSType = 2; + +pub type GstMIKEYType = c_int; +pub const GST_MIKEY_TYPE_INVALID: GstMIKEYType = -1; +pub const GST_MIKEY_TYPE_PSK_INIT: GstMIKEYType = 0; +pub const GST_MIKEY_TYPE_PSK_VERIFY: GstMIKEYType = 1; +pub const GST_MIKEY_TYPE_PK_INIT: GstMIKEYType = 2; +pub const GST_MIKEY_TYPE_PK_VERIFY: GstMIKEYType = 3; +pub const GST_MIKEY_TYPE_DH_INIT: GstMIKEYType = 4; +pub const GST_MIKEY_TYPE_DH_RESP: GstMIKEYType = 5; +pub const GST_MIKEY_TYPE_ERROR: GstMIKEYType = 6; + +pub type GstSDPResult = c_int; +pub const GST_SDP_OK: GstSDPResult = 0; +pub const GST_SDP_EINVAL: GstSDPResult = -1; + +// Constants +pub const GST_MIKEY_VERSION: c_int = 1; +pub const GST_SDP_BWTYPE_AS: *const c_char = b"AS\0" as *const u8 as *const c_char; +pub const GST_SDP_BWTYPE_CT: *const c_char = b"CT\0" as *const u8 as *const c_char; +pub const GST_SDP_BWTYPE_EXT_PREFIX: *const c_char = b"X-\0" as *const u8 as *const c_char; +pub const GST_SDP_BWTYPE_RR: *const c_char = b"RR\0" as *const u8 as *const c_char; +pub const GST_SDP_BWTYPE_RS: *const c_char = b"RS\0" as *const u8 as *const c_char; +pub const GST_SDP_BWTYPE_TIAS: *const c_char = b"TIAS\0" as *const u8 as *const c_char; + +// Records +#[repr(C)] +pub struct GstMIKEYDecryptInfo(c_void); + +impl ::std::fmt::Debug for GstMIKEYDecryptInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMIKEYDecryptInfo @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +pub struct GstMIKEYEncryptInfo(c_void); + +impl ::std::fmt::Debug for GstMIKEYEncryptInfo { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMIKEYEncryptInfo @ {:?}", self as *const _)) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMIKEYMapSRTP { + pub policy: u8, + pub ssrc: u32, + pub roc: u32, +} + +impl ::std::fmt::Debug for GstMIKEYMapSRTP { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMIKEYMapSRTP @ {:?}", self as *const _)) + .field("policy", &self.policy) + .field("ssrc", &self.ssrc) + .field("roc", &self.roc) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMIKEYMessage { + pub mini_object: gst::GstMiniObject, + pub version: u8, + pub type_: GstMIKEYType, + pub V: gboolean, + pub prf_func: GstMIKEYPRFFunc, + pub CSB_id: u32, + pub map_type: GstMIKEYMapType, + pub map_info: *mut glib::GArray, + pub payloads: *mut glib::GArray, +} + +impl ::std::fmt::Debug for GstMIKEYMessage { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMIKEYMessage @ {:?}", self as *const _)) + .field("version", &self.version) + .field("type_", &self.type_) + .field("V", &self.V) + .field("prf_func", &self.prf_func) + .field("CSB_id", &self.CSB_id) + .field("map_type", &self.map_type) + .field("map_info", &self.map_info) + .field("payloads", &self.payloads) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMIKEYPayload { + pub mini_object: gst::GstMiniObject, + pub type_: GstMIKEYPayloadType, + pub len: c_uint, +} + +impl ::std::fmt::Debug for GstMIKEYPayload { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMIKEYPayload @ {:?}", self as *const _)) + .field("type_", &self.type_) + .field("len", &self.len) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMIKEYPayloadKEMAC { + pub pt: GstMIKEYPayload, + pub enc_alg: GstMIKEYEncAlg, + pub mac_alg: GstMIKEYMacAlg, + pub subpayloads: *mut glib::GArray, +} + +impl ::std::fmt::Debug for GstMIKEYPayloadKEMAC { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMIKEYPayloadKEMAC @ {:?}", self as *const _)) + .field("pt", &self.pt) + .field("enc_alg", &self.enc_alg) + .field("mac_alg", &self.mac_alg) + .field("subpayloads", &self.subpayloads) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMIKEYPayloadKeyData { + pub pt: GstMIKEYPayload, + pub key_type: GstMIKEYKeyDataType, + pub key_len: u16, + pub key_data: *mut u8, + pub salt_len: u16, + pub salt_data: *mut u8, + pub kv_type: GstMIKEYKVType, + pub kv_len: [u8; 2], + pub kv_data: [u8; 2], +} + +impl ::std::fmt::Debug for GstMIKEYPayloadKeyData { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMIKEYPayloadKeyData @ {:?}", self as *const _)) + .field("pt", &self.pt) + .field("key_type", &self.key_type) + .field("key_len", &self.key_len) + .field("key_data", &self.key_data) + .field("salt_len", &self.salt_len) + .field("salt_data", &self.salt_data) + .field("kv_type", &self.kv_type) + .field("kv_len", &self.kv_len) + .field("kv_data", &self.kv_data) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMIKEYPayloadPKE { + pub pt: GstMIKEYPayload, + pub C: GstMIKEYCacheType, + pub data_len: u16, + pub data: *mut u8, +} + +impl ::std::fmt::Debug for GstMIKEYPayloadPKE { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMIKEYPayloadPKE @ {:?}", self as *const _)) + .field("pt", &self.pt) + .field("C", &self.C) + .field("data_len", &self.data_len) + .field("data", &self.data) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMIKEYPayloadRAND { + pub pt: GstMIKEYPayload, + pub len: u8, + pub rand: *mut u8, +} + +impl ::std::fmt::Debug for GstMIKEYPayloadRAND { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMIKEYPayloadRAND @ {:?}", self as *const _)) + .field("pt", &self.pt) + .field("len", &self.len) + .field("rand", &self.rand) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMIKEYPayloadSP { + pub pt: GstMIKEYPayload, + pub policy: c_uint, + pub proto: GstMIKEYSecProto, + pub params: *mut glib::GArray, +} + +impl ::std::fmt::Debug for GstMIKEYPayloadSP { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMIKEYPayloadSP @ {:?}", self as *const _)) + .field("pt", &self.pt) + .field("policy", &self.policy) + .field("proto", &self.proto) + .field("params", &self.params) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMIKEYPayloadSPParam { + pub type_: u8, + pub len: u8, + pub val: *mut u8, +} + +impl ::std::fmt::Debug for GstMIKEYPayloadSPParam { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMIKEYPayloadSPParam @ {:?}", self as *const _)) + .field("type_", &self.type_) + .field("len", &self.len) + .field("val", &self.val) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstMIKEYPayloadT { + pub pt: GstMIKEYPayload, + pub type_: GstMIKEYTSType, + pub ts_value: *mut u8, +} + +impl ::std::fmt::Debug for GstMIKEYPayloadT { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstMIKEYPayloadT @ {:?}", self as *const _)) + .field("pt", &self.pt) + .field("type_", &self.type_) + .field("ts_value", &self.ts_value) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstSDPAttribute { + pub key: *mut c_char, + pub value: *mut c_char, +} + +impl ::std::fmt::Debug for GstSDPAttribute { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstSDPAttribute @ {:?}", self as *const _)) + .field("key", &self.key) + .field("value", &self.value) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstSDPBandwidth { + pub bwtype: *mut c_char, + pub bandwidth: c_uint, +} + +impl ::std::fmt::Debug for GstSDPBandwidth { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstSDPBandwidth @ {:?}", self as *const _)) + .field("bwtype", &self.bwtype) + .field("bandwidth", &self.bandwidth) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstSDPConnection { + pub nettype: *mut c_char, + pub addrtype: *mut c_char, + pub address: *mut c_char, + pub ttl: c_uint, + pub addr_number: c_uint, +} + +impl ::std::fmt::Debug for GstSDPConnection { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstSDPConnection @ {:?}", self as *const _)) + .field("nettype", &self.nettype) + .field("addrtype", &self.addrtype) + .field("address", &self.address) + .field("ttl", &self.ttl) + .field("addr_number", &self.addr_number) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstSDPKey { + pub type_: *mut c_char, + pub data: *mut c_char, +} + +impl ::std::fmt::Debug for GstSDPKey { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstSDPKey @ {:?}", self as *const _)) + .field("type_", &self.type_) + .field("data", &self.data) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstSDPMedia { + pub media: *mut c_char, + pub port: c_uint, + pub num_ports: c_uint, + pub proto: *mut c_char, + pub fmts: *mut glib::GArray, + pub information: *mut c_char, + pub connections: *mut glib::GArray, + pub bandwidths: *mut glib::GArray, + pub key: GstSDPKey, + pub attributes: *mut glib::GArray, +} + +impl ::std::fmt::Debug for GstSDPMedia { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstSDPMedia @ {:?}", self as *const _)) + .field("media", &self.media) + .field("port", &self.port) + .field("num_ports", &self.num_ports) + .field("proto", &self.proto) + .field("fmts", &self.fmts) + .field("information", &self.information) + .field("connections", &self.connections) + .field("bandwidths", &self.bandwidths) + .field("key", &self.key) + .field("attributes", &self.attributes) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstSDPMessage { + pub version: *mut c_char, + pub origin: GstSDPOrigin, + pub session_name: *mut c_char, + pub information: *mut c_char, + pub uri: *mut c_char, + pub emails: *mut glib::GArray, + pub phones: *mut glib::GArray, + pub connection: GstSDPConnection, + pub bandwidths: *mut glib::GArray, + pub times: *mut glib::GArray, + pub zones: *mut glib::GArray, + pub key: GstSDPKey, + pub attributes: *mut glib::GArray, + pub medias: *mut glib::GArray, +} + +impl ::std::fmt::Debug for GstSDPMessage { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstSDPMessage @ {:?}", self as *const _)) + .field("version", &self.version) + .field("origin", &self.origin) + .field("session_name", &self.session_name) + .field("information", &self.information) + .field("uri", &self.uri) + .field("emails", &self.emails) + .field("phones", &self.phones) + .field("connection", &self.connection) + .field("bandwidths", &self.bandwidths) + .field("times", &self.times) + .field("zones", &self.zones) + .field("key", &self.key) + .field("attributes", &self.attributes) + .field("medias", &self.medias) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstSDPOrigin { + pub username: *mut c_char, + pub sess_id: *mut c_char, + pub sess_version: *mut c_char, + pub nettype: *mut c_char, + pub addrtype: *mut c_char, + pub addr: *mut c_char, +} + +impl ::std::fmt::Debug for GstSDPOrigin { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstSDPOrigin @ {:?}", self as *const _)) + .field("username", &self.username) + .field("sess_id", &self.sess_id) + .field("sess_version", &self.sess_version) + .field("nettype", &self.nettype) + .field("addrtype", &self.addrtype) + .field("addr", &self.addr) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstSDPTime { + pub start: *mut c_char, + pub stop: *mut c_char, + pub repeat: *mut glib::GArray, +} + +impl ::std::fmt::Debug for GstSDPTime { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstSDPTime @ {:?}", self as *const _)) + .field("start", &self.start) + .field("stop", &self.stop) + .field("repeat", &self.repeat) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct GstSDPZone { + pub time: *mut c_char, + pub typed_time: *mut c_char, +} + +impl ::std::fmt::Debug for GstSDPZone { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("GstSDPZone @ {:?}", self as *const _)) + .field("time", &self.time) + .field("typed_time", &self.typed_time) + .finish() + } +} + +extern "C" { + + //========================================================================= + // GstMIKEYMessage + //========================================================================= + pub fn gst_mikey_message_get_type() -> GType; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_message_new() -> *mut GstMIKEYMessage; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_message_new_from_bytes(bytes: *mut glib::GBytes, info: *mut GstMIKEYDecryptInfo, error: *mut *mut glib::GError) -> *mut GstMIKEYMessage; + #[cfg(any(feature = "v1_8", feature = "dox"))] + pub fn gst_mikey_message_new_from_caps(caps: *mut gst::GstCaps) -> *mut GstMIKEYMessage; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_message_new_from_data(data: gconstpointer, size: size_t, info: *mut GstMIKEYDecryptInfo, error: *mut *mut glib::GError) -> *mut GstMIKEYMessage; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_message_add_cs_srtp(msg: *mut GstMIKEYMessage, policy: u8, ssrc: u32, roc: u32) -> gboolean; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_message_add_payload(msg: *mut GstMIKEYMessage, payload: *mut GstMIKEYPayload) -> gboolean; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_message_add_pke(msg: *mut GstMIKEYMessage, C: GstMIKEYCacheType, data_len: u16, data: *mut u8) -> gboolean; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_message_add_rand(msg: *mut GstMIKEYMessage, len: u8, rand: *mut u8) -> gboolean; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_message_add_rand_len(msg: *mut GstMIKEYMessage, len: u8) -> gboolean; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_message_add_t(msg: *mut GstMIKEYMessage, type_: GstMIKEYTSType, ts_value: *mut u8) -> gboolean; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_message_add_t_now_ntp_utc(msg: *mut GstMIKEYMessage) -> gboolean; + #[cfg(any(feature = "v1_8", feature = "dox"))] + pub fn gst_mikey_message_base64_encode(msg: *mut GstMIKEYMessage) -> *mut c_char; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_message_find_payload(msg: *const GstMIKEYMessage, type_: GstMIKEYPayloadType, nth: c_uint) -> *const GstMIKEYPayload; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_message_get_cs_srtp(msg: *const GstMIKEYMessage, idx: c_uint) -> *const GstMIKEYMapSRTP; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_message_get_n_cs(msg: *const GstMIKEYMessage) -> c_uint; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_message_get_n_payloads(msg: *const GstMIKEYMessage) -> c_uint; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_message_get_payload(msg: *const GstMIKEYMessage, idx: c_uint) -> *const GstMIKEYPayload; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_message_insert_cs_srtp(msg: *mut GstMIKEYMessage, idx: c_int, map: *const GstMIKEYMapSRTP) -> gboolean; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_message_insert_payload(msg: *mut GstMIKEYMessage, idx: c_uint, payload: *mut GstMIKEYPayload) -> gboolean; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_message_remove_cs_srtp(msg: *mut GstMIKEYMessage, idx: c_int) -> gboolean; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_message_remove_payload(msg: *mut GstMIKEYMessage, idx: c_uint) -> gboolean; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_message_replace_cs_srtp(msg: *mut GstMIKEYMessage, idx: c_int, map: *const GstMIKEYMapSRTP) -> gboolean; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_message_replace_payload(msg: *mut GstMIKEYMessage, idx: c_uint, payload: *mut GstMIKEYPayload) -> gboolean; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_message_set_info(msg: *mut GstMIKEYMessage, version: u8, type_: GstMIKEYType, V: gboolean, prf_func: GstMIKEYPRFFunc, CSB_id: u32, map_type: GstMIKEYMapType) -> gboolean; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_message_to_bytes(msg: *mut GstMIKEYMessage, info: *mut GstMIKEYEncryptInfo, error: *mut *mut glib::GError) -> *mut glib::GBytes; + #[cfg(any(feature = "v1_8_1", feature = "dox"))] + pub fn gst_mikey_message_to_caps(msg: *const GstMIKEYMessage, caps: *mut gst::GstCaps) -> gboolean; + + //========================================================================= + // GstMIKEYPayload + //========================================================================= + pub fn gst_mikey_payload_get_type() -> GType; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_payload_new(type_: GstMIKEYPayloadType) -> *mut GstMIKEYPayload; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_payload_kemac_add_sub(payload: *mut GstMIKEYPayload, newpay: *mut GstMIKEYPayload) -> gboolean; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_payload_kemac_get_n_sub(payload: *const GstMIKEYPayload) -> c_uint; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_payload_kemac_get_sub(payload: *const GstMIKEYPayload, idx: c_uint) -> *const GstMIKEYPayload; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_payload_kemac_remove_sub(payload: *mut GstMIKEYPayload, idx: c_uint) -> gboolean; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_payload_kemac_set(payload: *mut GstMIKEYPayload, enc_alg: GstMIKEYEncAlg, mac_alg: GstMIKEYMacAlg) -> gboolean; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_payload_key_data_set_interval(payload: *mut GstMIKEYPayload, vf_len: u8, vf_data: *mut u8, vt_len: u8, vt_data: *mut u8) -> gboolean; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_payload_key_data_set_key(payload: *mut GstMIKEYPayload, key_type: GstMIKEYKeyDataType, key_len: u16, key_data: *mut u8) -> gboolean; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_payload_key_data_set_salt(payload: *mut GstMIKEYPayload, salt_len: u16, salt_data: *mut u8) -> gboolean; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_payload_key_data_set_spi(payload: *mut GstMIKEYPayload, spi_len: u8, spi_data: *mut u8) -> gboolean; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_payload_pke_set(payload: *mut GstMIKEYPayload, C: GstMIKEYCacheType, data_len: u16, data: *mut u8) -> gboolean; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_payload_rand_set(payload: *mut GstMIKEYPayload, len: u8, rand: *mut u8) -> gboolean; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_payload_sp_add_param(payload: *mut GstMIKEYPayload, type_: u8, len: u8, val: *mut u8) -> gboolean; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_payload_sp_get_n_params(payload: *const GstMIKEYPayload) -> c_uint; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_payload_sp_get_param(payload: *const GstMIKEYPayload, idx: c_uint) -> *const GstMIKEYPayloadSPParam; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_payload_sp_remove_param(payload: *mut GstMIKEYPayload, idx: c_uint) -> gboolean; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_payload_sp_set(payload: *mut GstMIKEYPayload, policy: c_uint, proto: GstMIKEYSecProto) -> gboolean; + #[cfg(any(feature = "v1_4", feature = "dox"))] + pub fn gst_mikey_payload_t_set(payload: *mut GstMIKEYPayload, type_: GstMIKEYTSType, ts_value: *mut u8) -> gboolean; + + //========================================================================= + // GstSDPAttribute + //========================================================================= + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_attribute_clear(attr: *mut GstSDPAttribute) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_attribute_set(attr: *mut GstSDPAttribute, key: *const c_char, value: *const c_char) -> GstSDPResult; + + //========================================================================= + // GstSDPBandwidth + //========================================================================= + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_bandwidth_clear(bw: *mut GstSDPBandwidth) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_bandwidth_set(bw: *mut GstSDPBandwidth, bwtype: *const c_char, bandwidth: c_uint) -> GstSDPResult; + + //========================================================================= + // GstSDPConnection + //========================================================================= + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_connection_clear(conn: *mut GstSDPConnection) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_connection_set(conn: *mut GstSDPConnection, nettype: *const c_char, addrtype: *const c_char, address: *const c_char, ttl: c_uint, addr_number: c_uint) -> GstSDPResult; + + //========================================================================= + // GstSDPMedia + //========================================================================= + pub fn gst_sdp_media_add_attribute(media: *mut GstSDPMedia, key: *const c_char, value: *const c_char) -> GstSDPResult; + pub fn gst_sdp_media_add_bandwidth(media: *mut GstSDPMedia, bwtype: *const c_char, bandwidth: c_uint) -> GstSDPResult; + pub fn gst_sdp_media_add_connection(media: *mut GstSDPMedia, nettype: *const c_char, addrtype: *const c_char, address: *const c_char, ttl: c_uint, addr_number: c_uint) -> GstSDPResult; + pub fn gst_sdp_media_add_format(media: *mut GstSDPMedia, format: *const c_char) -> GstSDPResult; + pub fn gst_sdp_media_as_text(media: *const GstSDPMedia) -> *mut c_char; + pub fn gst_sdp_media_attributes_len(media: *const GstSDPMedia) -> c_uint; + #[cfg(any(feature = "v1_8", feature = "dox"))] + pub fn gst_sdp_media_attributes_to_caps(media: *const GstSDPMedia, caps: *mut gst::GstCaps) -> GstSDPResult; + pub fn gst_sdp_media_bandwidths_len(media: *const GstSDPMedia) -> c_uint; + pub fn gst_sdp_media_connections_len(media: *const GstSDPMedia) -> c_uint; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_media_copy(media: *const GstSDPMedia, copy: *mut *mut GstSDPMedia) -> GstSDPResult; + pub fn gst_sdp_media_formats_len(media: *const GstSDPMedia) -> c_uint; + pub fn gst_sdp_media_free(media: *mut GstSDPMedia) -> GstSDPResult; + pub fn gst_sdp_media_get_attribute(media: *const GstSDPMedia, idx: c_uint) -> *const GstSDPAttribute; + pub fn gst_sdp_media_get_attribute_val(media: *const GstSDPMedia, key: *const c_char) -> *const c_char; + pub fn gst_sdp_media_get_attribute_val_n(media: *const GstSDPMedia, key: *const c_char, nth: c_uint) -> *const c_char; + pub fn gst_sdp_media_get_bandwidth(media: *const GstSDPMedia, idx: c_uint) -> *const GstSDPBandwidth; + #[cfg(any(feature = "v1_8", feature = "dox"))] + pub fn gst_sdp_media_get_caps_from_media(media: *const GstSDPMedia, pt: c_int) -> *mut gst::GstCaps; + pub fn gst_sdp_media_get_connection(media: *const GstSDPMedia, idx: c_uint) -> *const GstSDPConnection; + pub fn gst_sdp_media_get_format(media: *const GstSDPMedia, idx: c_uint) -> *const c_char; + pub fn gst_sdp_media_get_information(media: *const GstSDPMedia) -> *const c_char; + pub fn gst_sdp_media_get_key(media: *const GstSDPMedia) -> *const GstSDPKey; + pub fn gst_sdp_media_get_media(media: *const GstSDPMedia) -> *const c_char; + pub fn gst_sdp_media_get_num_ports(media: *const GstSDPMedia) -> c_uint; + pub fn gst_sdp_media_get_port(media: *const GstSDPMedia) -> c_uint; + pub fn gst_sdp_media_get_proto(media: *const GstSDPMedia) -> *const c_char; + pub fn gst_sdp_media_init(media: *mut GstSDPMedia) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_media_insert_attribute(media: *mut GstSDPMedia, idx: c_int, attr: *mut GstSDPAttribute) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_media_insert_bandwidth(media: *mut GstSDPMedia, idx: c_int, bw: *mut GstSDPBandwidth) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_media_insert_connection(media: *mut GstSDPMedia, idx: c_int, conn: *mut GstSDPConnection) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_media_insert_format(media: *mut GstSDPMedia, idx: c_int, format: *const c_char) -> GstSDPResult; + #[cfg(any(feature = "v1_8_1", feature = "dox"))] + pub fn gst_sdp_media_parse_keymgmt(media: *const GstSDPMedia, mikey: *mut *mut GstMIKEYMessage) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_media_remove_attribute(media: *mut GstSDPMedia, idx: c_uint) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_media_remove_bandwidth(media: *mut GstSDPMedia, idx: c_uint) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_media_remove_connection(media: *mut GstSDPMedia, idx: c_uint) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_media_remove_format(media: *mut GstSDPMedia, idx: c_uint) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_media_replace_attribute(media: *mut GstSDPMedia, idx: c_uint, attr: *mut GstSDPAttribute) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_media_replace_bandwidth(media: *mut GstSDPMedia, idx: c_uint, bw: *mut GstSDPBandwidth) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_media_replace_connection(media: *mut GstSDPMedia, idx: c_uint, conn: *mut GstSDPConnection) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_media_replace_format(media: *mut GstSDPMedia, idx: c_uint, format: *const c_char) -> GstSDPResult; + pub fn gst_sdp_media_set_information(media: *mut GstSDPMedia, information: *const c_char) -> GstSDPResult; + pub fn gst_sdp_media_set_key(media: *mut GstSDPMedia, type_: *const c_char, data: *const c_char) -> GstSDPResult; + pub fn gst_sdp_media_set_media(media: *mut GstSDPMedia, med: *const c_char) -> GstSDPResult; + pub fn gst_sdp_media_set_port_info(media: *mut GstSDPMedia, port: c_uint, num_ports: c_uint) -> GstSDPResult; + pub fn gst_sdp_media_set_proto(media: *mut GstSDPMedia, proto: *const c_char) -> GstSDPResult; + pub fn gst_sdp_media_uninit(media: *mut GstSDPMedia) -> GstSDPResult; + pub fn gst_sdp_media_new(media: *mut *mut GstSDPMedia) -> GstSDPResult; + #[cfg(any(feature = "v1_8", feature = "dox"))] + pub fn gst_sdp_media_set_media_from_caps(caps: *const gst::GstCaps, media: *mut GstSDPMedia) -> GstSDPResult; + + //========================================================================= + // GstSDPMessage + //========================================================================= + pub fn gst_sdp_message_get_type() -> GType; + pub fn gst_sdp_message_add_attribute(msg: *mut GstSDPMessage, key: *const c_char, value: *const c_char) -> GstSDPResult; + pub fn gst_sdp_message_add_bandwidth(msg: *mut GstSDPMessage, bwtype: *const c_char, bandwidth: c_uint) -> GstSDPResult; + pub fn gst_sdp_message_add_email(msg: *mut GstSDPMessage, email: *const c_char) -> GstSDPResult; + pub fn gst_sdp_message_add_media(msg: *mut GstSDPMessage, media: *mut GstSDPMedia) -> GstSDPResult; + pub fn gst_sdp_message_add_phone(msg: *mut GstSDPMessage, phone: *const c_char) -> GstSDPResult; + pub fn gst_sdp_message_add_time(msg: *mut GstSDPMessage, start: *const c_char, stop: *const c_char, repeat: *mut *mut c_char) -> GstSDPResult; + pub fn gst_sdp_message_add_zone(msg: *mut GstSDPMessage, adj_time: *const c_char, typed_time: *const c_char) -> GstSDPResult; + pub fn gst_sdp_message_as_text(msg: *const GstSDPMessage) -> *mut c_char; + pub fn gst_sdp_message_attributes_len(msg: *const GstSDPMessage) -> c_uint; + #[cfg(any(feature = "v1_8", feature = "dox"))] + pub fn gst_sdp_message_attributes_to_caps(msg: *const GstSDPMessage, caps: *mut gst::GstCaps) -> GstSDPResult; + pub fn gst_sdp_message_bandwidths_len(msg: *const GstSDPMessage) -> c_uint; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_message_copy(msg: *const GstSDPMessage, copy: *mut *mut GstSDPMessage) -> GstSDPResult; + pub fn gst_sdp_message_dump(msg: *const GstSDPMessage) -> GstSDPResult; + pub fn gst_sdp_message_emails_len(msg: *const GstSDPMessage) -> c_uint; + pub fn gst_sdp_message_free(msg: *mut GstSDPMessage) -> GstSDPResult; + pub fn gst_sdp_message_get_attribute(msg: *const GstSDPMessage, idx: c_uint) -> *const GstSDPAttribute; + pub fn gst_sdp_message_get_attribute_val(msg: *const GstSDPMessage, key: *const c_char) -> *const c_char; + pub fn gst_sdp_message_get_attribute_val_n(msg: *const GstSDPMessage, key: *const c_char, nth: c_uint) -> *const c_char; + pub fn gst_sdp_message_get_bandwidth(msg: *const GstSDPMessage, idx: c_uint) -> *const GstSDPBandwidth; + pub fn gst_sdp_message_get_connection(msg: *const GstSDPMessage) -> *const GstSDPConnection; + pub fn gst_sdp_message_get_email(msg: *const GstSDPMessage, idx: c_uint) -> *const c_char; + pub fn gst_sdp_message_get_information(msg: *const GstSDPMessage) -> *const c_char; + pub fn gst_sdp_message_get_key(msg: *const GstSDPMessage) -> *const GstSDPKey; + pub fn gst_sdp_message_get_media(msg: *const GstSDPMessage, idx: c_uint) -> *const GstSDPMedia; + pub fn gst_sdp_message_get_origin(msg: *const GstSDPMessage) -> *const GstSDPOrigin; + pub fn gst_sdp_message_get_phone(msg: *const GstSDPMessage, idx: c_uint) -> *const c_char; + pub fn gst_sdp_message_get_session_name(msg: *const GstSDPMessage) -> *const c_char; + pub fn gst_sdp_message_get_time(msg: *const GstSDPMessage, idx: c_uint) -> *const GstSDPTime; + pub fn gst_sdp_message_get_uri(msg: *const GstSDPMessage) -> *const c_char; + pub fn gst_sdp_message_get_version(msg: *const GstSDPMessage) -> *const c_char; + pub fn gst_sdp_message_get_zone(msg: *const GstSDPMessage, idx: c_uint) -> *const GstSDPZone; + pub fn gst_sdp_message_init(msg: *mut GstSDPMessage) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_message_insert_attribute(msg: *mut GstSDPMessage, idx: c_int, attr: *mut GstSDPAttribute) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_message_insert_bandwidth(msg: *mut GstSDPMessage, idx: c_int, bw: *mut GstSDPBandwidth) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_message_insert_email(msg: *mut GstSDPMessage, idx: c_int, email: *const c_char) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_message_insert_phone(msg: *mut GstSDPMessage, idx: c_int, phone: *const c_char) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_message_insert_time(msg: *mut GstSDPMessage, idx: c_int, t: *mut GstSDPTime) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_message_insert_zone(msg: *mut GstSDPMessage, idx: c_int, zone: *mut GstSDPZone) -> GstSDPResult; + pub fn gst_sdp_message_medias_len(msg: *const GstSDPMessage) -> c_uint; + #[cfg(any(feature = "v1_8_1", feature = "dox"))] + pub fn gst_sdp_message_parse_keymgmt(msg: *const GstSDPMessage, mikey: *mut *mut GstMIKEYMessage) -> GstSDPResult; + pub fn gst_sdp_message_phones_len(msg: *const GstSDPMessage) -> c_uint; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_message_remove_attribute(msg: *mut GstSDPMessage, idx: c_uint) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_message_remove_bandwidth(msg: *mut GstSDPMessage, idx: c_uint) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_message_remove_email(msg: *mut GstSDPMessage, idx: c_uint) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_message_remove_phone(msg: *mut GstSDPMessage, idx: c_uint) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_message_remove_time(msg: *mut GstSDPMessage, idx: c_uint) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_message_remove_zone(msg: *mut GstSDPMessage, idx: c_uint) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_message_replace_attribute(msg: *mut GstSDPMessage, idx: c_uint, attr: *mut GstSDPAttribute) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_message_replace_bandwidth(msg: *mut GstSDPMessage, idx: c_uint, bw: *mut GstSDPBandwidth) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_message_replace_email(msg: *mut GstSDPMessage, idx: c_uint, email: *const c_char) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_message_replace_phone(msg: *mut GstSDPMessage, idx: c_uint, phone: *const c_char) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_message_replace_time(msg: *mut GstSDPMessage, idx: c_uint, t: *mut GstSDPTime) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_message_replace_zone(msg: *mut GstSDPMessage, idx: c_uint, zone: *mut GstSDPZone) -> GstSDPResult; + pub fn gst_sdp_message_set_connection(msg: *mut GstSDPMessage, nettype: *const c_char, addrtype: *const c_char, address: *const c_char, ttl: c_uint, addr_number: c_uint) -> GstSDPResult; + pub fn gst_sdp_message_set_information(msg: *mut GstSDPMessage, information: *const c_char) -> GstSDPResult; + pub fn gst_sdp_message_set_key(msg: *mut GstSDPMessage, type_: *const c_char, data: *const c_char) -> GstSDPResult; + pub fn gst_sdp_message_set_origin(msg: *mut GstSDPMessage, username: *const c_char, sess_id: *const c_char, sess_version: *const c_char, nettype: *const c_char, addrtype: *const c_char, addr: *const c_char) -> GstSDPResult; + pub fn gst_sdp_message_set_session_name(msg: *mut GstSDPMessage, session_name: *const c_char) -> GstSDPResult; + pub fn gst_sdp_message_set_uri(msg: *mut GstSDPMessage, uri: *const c_char) -> GstSDPResult; + pub fn gst_sdp_message_set_version(msg: *mut GstSDPMessage, version: *const c_char) -> GstSDPResult; + pub fn gst_sdp_message_times_len(msg: *const GstSDPMessage) -> c_uint; + pub fn gst_sdp_message_uninit(msg: *mut GstSDPMessage) -> GstSDPResult; + pub fn gst_sdp_message_zones_len(msg: *const GstSDPMessage) -> c_uint; + pub fn gst_sdp_message_as_uri(scheme: *const c_char, msg: *const GstSDPMessage) -> *mut c_char; + pub fn gst_sdp_message_new(msg: *mut *mut GstSDPMessage) -> GstSDPResult; + pub fn gst_sdp_message_parse_buffer(data: *mut u8, size: c_uint, msg: *mut GstSDPMessage) -> GstSDPResult; + pub fn gst_sdp_message_parse_uri(uri: *const c_char, msg: *mut GstSDPMessage) -> GstSDPResult; + + //========================================================================= + // GstSDPTime + //========================================================================= + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_time_clear(t: *mut GstSDPTime) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_time_set(t: *mut GstSDPTime, start: *const c_char, stop: *const c_char, repeat: *mut *mut c_char) -> GstSDPResult; + + //========================================================================= + // GstSDPZone + //========================================================================= + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_zone_clear(zone: *mut GstSDPZone) -> GstSDPResult; + #[cfg(any(feature = "v1_2", feature = "dox"))] + pub fn gst_sdp_zone_set(zone: *mut GstSDPZone, adj_time: *const c_char, typed_time: *const c_char) -> GstSDPResult; + + //========================================================================= + // Other functions + //========================================================================= + pub fn gst_sdp_address_is_multicast(nettype: *const c_char, addrtype: *const c_char, addr: *const c_char) -> gboolean; + #[cfg(any(feature = "v1_8", feature = "dox"))] + pub fn gst_sdp_make_keymgmt(uri: *const c_char, base64: *const c_char) -> *mut c_char; + +}