# rtsp context

Last reviewed on 2013-07-11 (1.0.0)

## GstRTSPContext

Information passed around containing the context of a request.

### Members

`server` (GstRTSPServer *) –

the server

`conn` (GstRTSPConnection *) –

the connection

`client` (GstRTSPClient *) –

the client

`request` (GstRTSPMessage *) –

the complete request

`uri` (GstRTSPUrl *) –

the complete url parsed from request

`method` (GstRTSPMethod) –

the parsed method of uri

`auth` (GstRTSPAuth *) –

the current auth object or NULL

`token` (GstRTSPToken *) –

authorisation token

`session` (GstRTSPSession *) –

the session, can be NULL

`sessmedia` (GstRTSPSessionMedia *) –

the session media for the url can be NULL

`factory` (GstRTSPMediaFactory *) –

the media factory for the url, can be NULL

`media` (GstRTSPMedia *) –

the media for the url can be NULL

`stream` (GstRTSPStream *) –

the stream for the url can be NULL

`response` (GstRTSPMessage *) –

the response

`trans` (GstRTSPStreamTransport *) –

the stream transport, can be NULL

## GstRtspServer.RTSPContext

Information passed around containing the context of a request.

### Members

`server` (GstRtspServer.RTSPServer) –

the server

`conn` (GstRtsp.RTSPConnection) –

the connection

`client` (GstRtspServer.RTSPClient) –

the client

`request` (GstRtsp.RTSPMessage) –

the complete request

`uri` (GstRtsp.RTSPUrl) –

the complete url parsed from request

`method` (GstRtsp.RTSPMethod) –

the parsed method of uri

`auth` (GstRtspServer.RTSPAuth) –

the current auth object or NULL

`token` (GstRtspServer.RTSPToken) –

authorisation token

`session` (GstRtspServer.RTSPSession) –

the session, can be NULL

`sessmedia` (GstRtspServer.RTSPSessionMedia) –

the session media for the url can be NULL

`factory` (GstRtspServer.RTSPMediaFactory) –

the media factory for the url, can be NULL

`media` (GstRtspServer.RTSPMedia) –

the media for the url can be NULL

`stream` (GstRtspServer.RTSPStream) –

the stream for the url can be NULL

`response` (GstRtsp.RTSPMessage) –

the response

`trans` (GstRtspServer.RTSPStreamTransport) –

the stream transport, can be NULL

## GstRtspServer.RTSPContext

Information passed around containing the context of a request.

### Members

`server` (GstRtspServer.RTSPServer) –

the server

`conn` (GstRtsp.RTSPConnection) –

the connection

`client` (GstRtspServer.RTSPClient) –

the client

`request` (GstRtsp.RTSPMessage) –

the complete request

`uri` (GstRtsp.RTSPUrl) –

the complete url parsed from request

`method` (GstRtsp.RTSPMethod) –

the parsed method of uri

`auth` (GstRtspServer.RTSPAuth) –

the current auth object or NULL

`token` (GstRtspServer.RTSPToken) –

authorisation token

`session` (GstRtspServer.RTSPSession) –

the session, can be NULL

`sessmedia` (GstRtspServer.RTSPSessionMedia) –

the session media for the url can be NULL

`factory` (GstRtspServer.RTSPMediaFactory) –

the media factory for the url, can be NULL

`media` (GstRtspServer.RTSPMedia) –

the media for the url can be NULL

`stream` (GstRtspServer.RTSPStream) –

the stream for the url can be NULL

`response` (GstRtsp.RTSPMessage) –

the response

`trans` (GstRtspServer.RTSPStreamTransport) –

the stream transport, can be NULL

### Methods

#### gst_rtsp_context_pop_current

    gst_rtsp_context_pop_current (GstRTSPContext * ctx)

Pops ctx off the context stack (verifying that ctx is on the top of the stack).

Parameters:

`ctx` –

a GstRTSPContext

#### GstRtspServer.RTSPContext.prototype.pop_current

    function GstRtspServer.RTSPContext.prototype.pop_current(): {
        // javascript wrapper for 'gst_rtsp_context_pop_current'
    }

Pops ctx off the context stack (verifying that ctx is on the top of the stack).

Parameters:

`ctx` (GstRtspServer.RTSPContext) –

a GstRtspServer.RTSPContext

#### GstRtspServer.RTSPContext.pop_current

    def GstRtspServer.RTSPContext.pop_current (self):
        #python wrapper for 'gst_rtsp_context_pop_current'

Pops ctx off the context stack (verifying that ctx is on the top of the stack).

Parameters:

`ctx` (GstRtspServer.RTSPContext) –

a GstRtspServer.RTSPContext

#### gst_rtsp_context_push_current

    gst_rtsp_context_push_current (GstRTSPContext * ctx)

Pushes ctx onto the context stack. The current context can then be received using gst_rtsp_context_get_current.

Parameters:

`ctx` –

a GstRTSPContext

#### GstRtspServer.RTSPContext.prototype.push_current

    function GstRtspServer.RTSPContext.prototype.push_current(): {
        // javascript wrapper for 'gst_rtsp_context_push_current'
    }

Pushes ctx onto the context stack. The current context can then be received using gst_rtsp_context_get_current (not introspectable).

Parameters:

`ctx` (GstRtspServer.RTSPContext) –

a GstRtspServer.RTSPContext

#### GstRtspServer.RTSPContext.push_current

    def GstRtspServer.RTSPContext.push_current (self):
        #python wrapper for 'gst_rtsp_context_push_current'

Pushes ctx onto the context stack. The current context can then be received using gst_rtsp_context_get_current (not introspectable).

Parameters:

`ctx` (GstRtspServer.RTSPContext) –

a GstRtspServer.RTSPContext

#### gst_rtsp_context_set_token

    gst_rtsp_context_set_token (GstRTSPContext * ctx,
                                GstRTSPToken * token)

Set the token for ctx.

Parameters:

`ctx` –

a GstRTSPContext

`token` –

a GstRTSPToken

Since : 1.22

#### GstRtspServer.RTSPContext.prototype.set_token

    function GstRtspServer.RTSPContext.prototype.set_token(token: GstRtspServer.RTSPToken): {
        // javascript wrapper for 'gst_rtsp_context_set_token'
    }

Set the token for ctx.

Parameters:

`ctx` (GstRtspServer.RTSPContext) –

a GstRtspServer.RTSPContext

`token` (GstRtspServer.RTSPToken) –

a GstRtspServer.RTSPToken

Since : 1.22

#### GstRtspServer.RTSPContext.set_token

    def GstRtspServer.RTSPContext.set_token (self, token):
        #python wrapper for 'gst_rtsp_context_set_token'

Set the token for ctx.

Parameters:

`ctx` (GstRtspServer.RTSPContext) –

a GstRtspServer.RTSPContext

`token` (GstRtspServer.RTSPToken) –

a GstRtspServer.RTSPToken

Since : 1.22

### Functions

#### gst_rtsp_context_get_current

    GstRTSPContext *
    gst_rtsp_context_get_current ()

Get the current GstRTSPContext. This object is retrieved from the current thread that is handling the request for a client.

Returns –

a GstRTSPContext

The results of the search are