gstrtsp.rtspconnection
Module for [RTSPConnection] class
class RTSPConnection
Types 1
classRTSPConnection
This object manages the RTSP connection to the server. It provides function to receive and send bytes and messages.
Methods
void * _cPtr()void addExtraHttpRequestHeader(string key, string value)Add header to be appended to any HTTP request made by connection. If the header already exists then the old header is replaced by the new header.void clearAuthParams()Clear the list of authentication directives stored in conn.gstrtsp.types.RTSPResult close()Close the connected conn. After this call, the connection is in the same state as when it was first created. Returns: #GSTRTSPOK on success.gstrtsp.types.RTSPResult connect(glib.time_val.TimeVal timeout)Attempt to connect to the url of conn made with [gstrtsp.rtspconnection.RTSPConnection.create]. If timeout is null this function can block forever. If timeout contains a valid timeout, this functio...gstrtsp.types.RTSPResult connectUsec(long timeout)Attempt to connect to the url of conn made with [gstrtsp.rtspconnection.RTSPConnection.create]. If timeout is 0 this function can block forever. If timeout contains a valid timeout, this function w...gstrtsp.types.RTSPResult connectWithResponse(glib.time_val.TimeVal timeout, gstrtsp.rtspmessage.RTSPMessage response)Attempt to connect to the url of conn made with [gstrtsp.rtspconnection.RTSPConnection.create]. If timeout is null this function can block forever. If timeout contains a valid timeout, this functio...gstrtsp.types.RTSPResult connectWithResponseUsec(long timeout, gstrtsp.rtspmessage.RTSPMessage response)Attempt to connect to the url of conn made with [gstrtsp.rtspconnection.RTSPConnection.create]. If timeout is 0 this function can block forever. If timeout contains a valid timeout, this function w...gstrtsp.types.RTSPResult doTunnel(gstrtsp.rtspconnection.RTSPConnection conn2 = null)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.gstrtsp.types.RTSPResult flush(bool flush)Start or stop the flushing action on conn. When flushing, all current and future actions on conn will return #GSTRTSPEINTR until the connection is set to non-flushing mode again.bool getIgnoreXServerReply()Get the ignorexserver_reply value. Returns: returns true if the x-server-ip-address header reply will be ignored, else returns falsestring getIp()Retrieve the IP address of the other end of conn. Returns: The IP address as a string. this value remains valid until the connection is closed.gio.socket.Socket getReadSocket()Get the file descriptor for reading. Returns: the file descriptor used for reading or null on error. The file descriptor remains valid until the connection is closed.bool getRememberSessionId()gio.tls_connection.TlsConnection getTls()Get the TLS connection of conn.gio.tls_database.TlsDatabase getTlsDatabase()Gets the anchor certificate authorities database that will be used after a server certificate can't be verified with the default certificate database. Returns: the anchor certificate authorities da...gio.tls_interaction.TlsInteraction getTlsInteraction()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. Returns: a ...gio.types.TlsCertificateFlags getTlsValidationFlags()Gets the TLS validation flags used to verify the peer certificate when a TLS connection is established.string getTunnelid()Get the tunnel session id the connection. Returns: returns a non-empty string if conn is being tunneled over HTTP.gstrtsp.rtspurl.RTSPUrl getUrl()Retrieve the URL of the other end of conn. Returns: The URL. This value remains valid until the connection is freed.gio.socket.Socket getWriteSocket()Get the file descriptor for writing. Returns: the file descriptor used for writing or NULL on error. The file descriptor remains valid until the connection is closed.bool isTunneled()Get the tunneling state of the connection. Returns: if conn is using HTTP tunneling.gstrtsp.types.RTSPResult nextTimeout(glib.time_val.TimeVal timeout)Calculate the next timeout for conn, storing the result in timeout.long nextTimeoutUsec()Calculate the next timeout for conn Returns: #the next timeout in microsecondsgstrtsp.types.RTSPResult poll(gstrtsp.types.RTSPEvent events, out gstrtsp.types.RTSPEvent revents, glib.time_val.TimeVal 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 #GSTRTSPOK, revents will contain a bit...gstrtsp.types.RTSPResult pollUsec(gstrtsp.types.RTSPEvent events, out gstrtsp.types.RTSPEvent revents, long 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 #GSTRTSPOK, revents will contain a bit...gstrtsp.types.RTSPResult read(ubyte[] data, glib.time_val.TimeVal 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.gstrtsp.types.RTSPResult readUsec(ubyte[] data, long timeout)Attempt to read size bytes into data from the connected conn, blocking up to the specified timeout. timeout can be 0, in which case this function might block forever.gstrtsp.types.RTSPResult receive(gstrtsp.rtspmessage.RTSPMessage message, glib.time_val.TimeVal timeout)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.gstrtsp.types.RTSPResult receiveUsec(gstrtsp.rtspmessage.RTSPMessage message, long timeout)Attempt to read into message from the connected conn, blocking up to the specified timeout. timeout can be 0, in which case this function might block forever.gstrtsp.types.RTSPResult resetTimeout()Reset the timeout of conn. Returns: #GSTRTSPOK.gstrtsp.types.RTSPResult send(gstrtsp.rtspmessage.RTSPMessage message, glib.time_val.TimeVal timeout)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.gstrtsp.types.RTSPResult sendMessages(gstrtsp.rtspmessage.RTSPMessage[] messages, glib.time_val.TimeVal timeout)Attempt to send messages to the connected conn, blocking up to the specified timeout. timeout can be null, in which case this function might block forever.gstrtsp.types.RTSPResult sendMessagesUsec(gstrtsp.rtspmessage.RTSPMessage[] messages, long timeout)Attempt to send messages to the connected conn, blocking up to the specified timeout. timeout can be 0, in which case this function might block forever.gstrtsp.types.RTSPResult sendUsec(gstrtsp.rtspmessage.RTSPMessage message, long timeout)Attempt to send message to the connected conn, blocking up to the specified timeout. timeout can be 0, in which case this function might block forever.void setAcceptCertificateFunc(gstrtsp.types.RTSPConnectionAcceptCertificateFunc func)Sets a custom accept-certificate function for checking certificates for validity. This will directly map to #GTlsConnection 's "accept-certificate" signal and be performed after the default checks ...gstrtsp.types.RTSPResult setAuth(gstrtsp.types.RTSPAuthMethod method, string user, string pass)Configure conn for authentication mode method with user and pass as the user and password respectively.void setAuthParam(string param, string value)Setup conn with authentication directives. This is not necessary for methods #GSTRTSPAUTHNONE and #GSTRTSPAUTHBASIC. For #GSTRTSPAUTH_DIGEST, directives should be taken from the digest challenge in...void setContentLengthLimit(uint limit)Configure conn to use the specified Content-Length limit. Both requests and responses are validated. If content-length is exceeded, ENOMEM error will be returned.void setHttpMode(bool enable)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.void setIgnoreXServerReply(bool ignore)Set whether to ignore the x-server-ip-address header reply or not. If the header is ignored, the original address will be used instead.void setIp(string ip)Set the IP address of the server.gstrtsp.types.RTSPResult setProxy(string host, uint port)Set the proxy host and port.gstrtsp.types.RTSPResult setQosDscp(uint qosDscp)Configure conn to use the specified DSCP value.void setRememberSessionId(bool remember)Sets if the #GstRTSPConnection should remember the session id from the last response received and force it onto any further requests.void setTlsDatabase(gio.tls_database.TlsDatabase database = null)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.void setTlsInteraction(gio.tls_interaction.TlsInteraction interaction = null)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.bool setTlsValidationFlags(gio.types.TlsCertificateFlags flags)Sets the TLS validation flags to be used to verify the peer certificate when a TLS connection is established.void setTunneled(bool tunneled)Set the HTTP tunneling state of the connection. This must be configured before the conn is connected.gstrtsp.types.RTSPResult write(ubyte[] data, glib.time_val.TimeVal timeout)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.gstrtsp.types.RTSPResult writeUsec(ubyte[] data, long timeout)Attempt to write size bytes of data to the connected conn, blocking up to the specified timeout. timeout can be 0, in which case this function might block forever.gstrtsp.types.RTSPResult accept(gio.socket.Socket socket, out gstrtsp.rtspconnection.RTSPConnection conn, gio.cancellable.Cancellable cancellable = null)Accept a new connection on socket and create a new #GstRTSPConnection for handling communication on new socket.gstrtsp.types.RTSPResult create(gstrtsp.rtspurl.RTSPUrl url, out gstrtsp.rtspconnection.RTSPConnection conn)Create a newly allocated #GstRTSPConnection from url and store it in conn. The connection will not yet attempt to connect to url, use [gstrtsp.rtspconnection.RTSPConnection.connect].gstrtsp.types.RTSPResult createFromSocket(gio.socket.Socket socket, string ip, ushort port, string initialBuffer, out gstrtsp.rtspconnection.RTSPConnection conn)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 start...