## GstRtspdefs GstRtspdefs — common RTSP defines |

## Functions

#define | GST_RTSP_CHECK()
gchar * | gst_rtsp_strresult ()
const gchar * | gst_rtsp_method_as_text ()
const gchar * | gst_rtsp_version_as_text ()
const gchar * | gst_rtsp_header_as_text ()
gboolean | gst_rtsp_header_allow_multiple ()
const gchar * | gst_rtsp_status_as_text ()
gchar * | gst_rtsp_options_as_text ()
GstRTSPMethod | gst_rtsp_options_from_text ()
GstRTSPHeaderField | gst_rtsp_find_header_field ()
GstRTSPMethod | gst_rtsp_find_method ()
gchar * | gst_rtsp_generate_digest_auth_response ()

## Types and Values

#define | GST_RTSP_AUTH_MAX
enum | GstRTSPEvent
enum | GstRTSPResult
enum | GstRTSPFamily
enum | GstRTSPState
enum | GstRTSPVersion
enum | GstRTSPMethod
enum | GstRTSPAuthMethod
enum | GstRTSPHeaderField
enum | GstRTSPStatusCode

## Includes

    #include <gst/rtsp/gstrtspdefs.h>

## Description

Provides common defines for the RTSP library.

## Functions

### GST_RTSP_CHECK()

    #define             GST_RTSP_CHECK(stmt, label)

Macro that checks the return value of `stmt` and jumps to `label` when it does not equal GST_RTSP_OK.

#### Parameters

stmt | a statement |
label | a label |

### gst_rtsp_strresult ()

    gchar *
    gst_rtsp_strresult (GstRTSPResult result);

Convert `result` in a human readable string.

#### Parameters

result | a GstRTSPResult |

#### Returns

a newly allocated string. `g_free()` after usage.

### gst_rtsp_method_as_text ()

    const gchar *
    gst_rtsp_method_as_text (GstRTSPMethod method);

Convert `method` to a string.

#### Parameters

method | a GstRTSPMethod |

#### Returns

a string representation of `method` .

### gst_rtsp_version_as_text ()

    const gchar *
    gst_rtsp_version_as_text (GstRTSPVersion version);

Convert `version` to a string.

#### Parameters

version | a GstRTSPVersion |

#### Returns

a string representation of `version` .

### gst_rtsp_header_as_text ()

    const gchar *
    gst_rtsp_header_as_text (GstRTSPHeaderField field);

Convert `field` to a string.

#### Parameters

field | a GstRTSPHeaderField |

#### Returns

a string representation of `field` .

### gst_rtsp_header_allow_multiple ()

    gboolean
    gst_rtsp_header_allow_multiple (GstRTSPHeaderField field);

Check whether `field` may appear multiple times in a message.

#### Parameters

field | a GstRTSPHeaderField |

#### Returns

`TRUE` if multiple headers are allowed.

### gst_rtsp_status_as_text ()

    const gchar *
    gst_rtsp_status_as_text (GstRTSPStatusCode code);

Convert `code` to a string.

#### Parameters

code | a GstRTSPStatusCode |

#### Returns

a string representation of `code` .

### gst_rtsp_options_as_text ()

    gchar *
    gst_rtsp_options_as_text (GstRTSPMethod options);

Convert `options` to a string.

#### Parameters

options | one or more GstRTSPMethod |

#### Returns

a new string of `options` . `g_free()` after usage.

### gst_rtsp_options_from_text ()

    GstRTSPMethod
    gst_rtsp_options_from_text (const gchar *options);

Convert the comma separated list `options` to a GstRTSPMethod bitwise or of methods. This functions is the reverse of `gst_rtsp_options_as_text()`.

#### Parameters

options | a comma separated list of options |

#### Returns

a GstRTSPMethod

Since: 1.2

### gst_rtsp_find_header_field ()

    GstRTSPHeaderField
    gst_rtsp_find_header_field (const gchar *header);

Convert `header` to a GstRTSPHeaderField.

#### Parameters

header | a header string |

#### Returns

a GstRTSPHeaderField for `header` or GST_RTSP_HDR_INVALID if the header field is unknown.

### gst_rtsp_find_method ()

    GstRTSPMethod
    gst_rtsp_find_method (const gchar *method);

Convert `method` to a GstRTSPMethod.

#### Parameters

method | a method |

#### Returns

a GstRTSPMethod for `method` or GST_RTSP_INVALID if the method is unknown.

### gst_rtsp_generate_digest_auth_response ()

    gchar *
    gst_rtsp_generate_digest_auth_response
                                   (const gchar *algorithm,
                                    const gchar *method,
                                    const gchar *realm,
                                    const gchar *username,
                                    const gchar *password,
                                    const gchar *uri,
                                    const gchar *nonce);

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".

#### Parameters

algorithm | Hash algorithm to use, or `NULL` for MD5. | [allow-none]
method | Request method, e.g. PLAY |
realm | Realm |
username | Username |
password | Password |
uri | Original request URI |
nonce | Nonce |

#### Returns

Authentication response or `NULL` if unsupported

Since: 1.12

## Types and Values

### GST_RTSP_AUTH_MAX

    #define GST_RTSP_AUTH_MAX GST_RTSP_AUTH_DIGEST

Strongest available authentication method

### enum GstRTSPEvent

The possible events for the connection.

#### Members

GST_RTSP_EV_READ | connection is readable |
GST_RTSP_EV_WRITE | connection is writable |

### enum GstRTSPResult

Result codes from the RTSP functions.

#### Members

GST_RTSP_OK | no error |
GST_RTSP_ERROR | some unspecified error occured |
GST_RTSP_EINVAL | invalid arguments were provided to a function |
GST_RTSP_EINTR | an operation was canceled |
GST_RTSP_ENOMEM | no memory was available for the operation |
GST_RTSP_ERESOLV | a host resolve error occured |
GST_RTSP_ENOTIMPL | function not implemented |
GST_RTSP_ESYS | a system error occured, errno contains more details |
GST_RTSP_EPARSE | a parsing error occured |
GST_RTSP_EWSASTART | windows networking could not start |
GST_RTSP_EWSAVERSION | windows networking stack has wrong version |
GST_RTSP_EEOF | end-of-file was reached |
GST_RTSP_ENET | a network problem occured, h_errno contains more details |
GST_RTSP_ENOTIP | the host is not an IP host |
GST_RTSP_ETIMEOUT | a timeout occured |
GST_RTSP_ETGET | the tunnel GET request has been performed |
GST_RTSP_ETPOST | the tunnel POST request has been performed |
GST_RTSP_ELAST | last error |

### enum GstRTSPFamily

The possible network families.

#### Members

GST_RTSP_FAM_NONE | unknown network family |
GST_RTSP_FAM_INET | internet |
GST_RTSP_FAM_INET6 | internet V6 |

### enum GstRTSPState

The different RTSP states.

#### Members

GST_RTSP_STATE_INVALID | invalid state |
GST_RTSP_STATE_INIT | initializing |
GST_RTSP_STATE_READY | ready for operation |
GST_RTSP_STATE_SEEKING | seeking in progress |
GST_RTSP_STATE_PLAYING | playing |
GST_RTSP_STATE_RECORDING | recording |

### enum GstRTSPVersion

The supported RTSP versions.

#### Members

GST_RTSP_VERSION_INVALID | unknown/invalid version |
GST_RTSP_VERSION_1_0 | version 1.0 |
GST_RTSP_VERSION_1_1 | version 1.1. |
GST_RTSP_VERSION_2_0 | version 2.0. |

### enum GstRTSPMethod

The different supported RTSP methods.

#### Members

GST_RTSP_INVALID | invalid method |
GST_RTSP_DESCRIBE | the DESCRIBE method |
GST_RTSP_ANNOUNCE | the ANNOUNCE method |
GST_RTSP_GET_PARAMETER | the GET_PARAMETER method |
GST_RTSP_OPTIONS | the OPTIONS method |
GST_RTSP_PAUSE | the PAUSE method |
GST_RTSP_PLAY | the PLAY method |
GST_RTSP_RECORD | the RECORD method |
GST_RTSP_REDIRECT | the REDIRECT method |
GST_RTSP_SETUP | the SETUP method |
GST_RTSP_SET_PARAMETER | the SET_PARAMETER method |
GST_RTSP_TEARDOWN | the TEARDOWN method |
GST_RTSP_GET | the GET method (HTTP). |
GST_RTSP_POST | the POST method (HTTP). |

### enum GstRTSPAuthMethod

Authentication methods, ordered by strength

#### Members

GST_RTSP_AUTH_NONE | no authentication |
GST_RTSP_AUTH_BASIC | basic authentication |
GST_RTSP_AUTH_DIGEST | digest authentication |

### enum GstRTSPHeaderField

Enumeration of rtsp header fields

#### Members

GST_RTSP_HDR_INVALID |  |
GST_RTSP_HDR_ACCEPT |  |
GST_RTSP_HDR_ACCEPT_ENCODING |  |
GST_RTSP_HDR_ACCEPT_LANGUAGE |  |
GST_RTSP_HDR_ALLOW |  |
GST_RTSP_HDR_AUTHORIZATION |  |
GST_RTSP_HDR_BANDWIDTH |  |
GST_RTSP_HDR_BLOCKSIZE |  |
GST_RTSP_HDR_CACHE_CONTROL |  |
GST_RTSP_HDR_CONFERENCE |  |
GST_RTSP_HDR_CONNECTION |  |
GST_RTSP_HDR_CONTENT_BASE |  |
GST_RTSP_HDR_CONTENT_ENCODING |  |
GST_RTSP_HDR_CONTENT_LANGUAGE |  |
GST_RTSP_HDR_CONTENT_LENGTH |  |
GST_RTSP_HDR_CONTENT_LOCATION |  |
GST_RTSP_HDR_CONTENT_TYPE |  |
GST_RTSP_HDR_CSEQ |  |
GST_RTSP_HDR_DATE |  |
GST_RTSP_HDR_EXPIRES |  |
GST_RTSP_HDR_FROM |  |
GST_RTSP_HDR_IF_MODIFIED_SINCE |  |
GST_RTSP_HDR_LAST_MODIFIED |  |
GST_RTSP_HDR_PROXY_AUTHENTICATE |  |
GST_RTSP_HDR_PROXY_REQUIRE |  |
GST_RTSP_HDR_PUBLIC |  |
GST_RTSP_HDR_RANGE |  |
GST_RTSP_HDR_REFERER |  |
GST_RTSP_HDR_REQUIRE |  |
GST_RTSP_HDR_RETRY_AFTER |  |
GST_RTSP_HDR_RTP_INFO |  |
GST_RTSP_HDR_SCALE |  |
GST_RTSP_HDR_SESSION |  |
GST_RTSP_HDR_SERVER |  |
GST_RTSP_HDR_SPEED |  |
GST_RTSP_HDR_TRANSPORT |  |
GST_RTSP_HDR_UNSUPPORTED |  |
GST_RTSP_HDR_USER_AGENT |  |
GST_RTSP_HDR_VIA |  |
GST_RTSP_HDR_WWW_AUTHENTICATE |  |
GST_RTSP_HDR_CLIENT_CHALLENGE |  |
GST_RTSP_HDR_REAL_CHALLENGE1 |  |
GST_RTSP_HDR_REAL_CHALLENGE2 |  |
GST_RTSP_HDR_REAL_CHALLENGE3 |  |
GST_RTSP_HDR_SUBSCRIBE |  |
GST_RTSP_HDR_ALERT |  |
GST_RTSP_HDR_CLIENT_ID |  |
GST_RTSP_HDR_COMPANY_ID |  |
GST_RTSP_HDR_GUID |  |
GST_RTSP_HDR_REGION_DATA |  |
GST_RTSP_HDR_MAX_ASM_WIDTH |  |
GST_RTSP_HDR_LANGUAGE |  |
GST_RTSP_HDR_PLAYER_START_TIME |  |
GST_RTSP_HDR_LOCATION |  |
GST_RTSP_HDR_ETAG |  |
GST_RTSP_HDR_IF_MATCH |  |
GST_RTSP_HDR_ACCEPT_CHARSET |  |
GST_RTSP_HDR_SUPPORTED |  |
GST_RTSP_HDR_VARY |  |
GST_RTSP_HDR_X_ACCELERATE_STREAMING |  |
GST_RTSP_HDR_X_ACCEPT_AUTHENT |  |
GST_RTSP_HDR_X_ACCEPT_PROXY_AUTHENT |  |
GST_RTSP_HDR_X_BROADCAST_ID |  |
GST_RTSP_HDR_X_BURST_STREAMING |  |
GST_RTSP_HDR_X_NOTICE |  |
GST_RTSP_HDR_X_PLAYER_LAG_TIME |  |
GST_RTSP_HDR_X_PLAYLIST |  |
GST_RTSP_HDR_X_PLAYLIST_CHANGE_NOTICE |  |
GST_RTSP_HDR_X_PLAYLIST_GEN_ID |  |
GST_RTSP_HDR_X_PLAYLIST_SEEK_ID |  |
GST_RTSP_HDR_X_PROXY_CLIENT_AGENT |  |
GST_RTSP_HDR_X_PROXY_CLIENT_VERB |  |
GST_RTSP_HDR_X_RECEDING_PLAYLISTCHANGE |  |
GST_RTSP_HDR_X_RTP_INFO |  |
GST_RTSP_HDR_X_STARTUPPROFILE |  |
GST_RTSP_HDR_TIMESTAMP |  |
GST_RTSP_HDR_AUTHENTICATION_INFO |  |
GST_RTSP_HDR_HOST |  |
GST_RTSP_HDR_PRAGMA |  |
GST_RTSP_HDR_X_SERVER_IP_ADDRESS |  |
GST_RTSP_HDR_X_SESSIONCOOKIE |  |
GST_RTSP_HDR_RTCP_INTERVAL |  |
GST_RTSP_HDR_KEYMGMT |  |
GST_RTSP_HDR_PIPELINED_REQUESTS |  |
GST_RTSP_HDR_MEDIA_PROPERTIES |  |
GST_RTSP_HDR_SEEK_STYLE |  |
GST_RTSP_HDR_ACCEPT_RANGES |  |
GST_RTSP_HDR_LAST |  |

### enum GstRTSPStatusCode

Enumeration of rtsp status codes

#### Members

GST_RTSP_STS_INVALID |  |
GST_RTSP_STS_CONTINUE |  |
GST_RTSP_STS_OK |  |
GST_RTSP_STS_CREATED |  |
GST_RTSP_STS_LOW_ON_STORAGE |  |
GST_RTSP_STS_MULTIPLE_CHOICES |  |
GST_RTSP_STS_MOVED_PERMANENTLY |  |
GST_RTSP_STS_MOVE_TEMPORARILY |  |
GST_RTSP_STS_SEE_OTHER |  |
GST_RTSP_STS_NOT_MODIFIED |  |
GST_RTSP_STS_USE_PROXY |  |
GST_RTSP_STS_BAD_REQUEST |  |
GST_RTSP_STS_UNAUTHORIZED |  |
GST_RTSP_STS_PAYMENT_REQUIRED |  |
GST_RTSP_STS_FORBIDDEN |  |
GST_RTSP_STS_NOT_FOUND |  |
GST_RTSP_STS_METHOD_NOT_ALLOWED |  |
GST_RTSP_STS_NOT_ACCEPTABLE |  |
GST_RTSP_STS_PROXY_AUTH_REQUIRED |  |
GST_RTSP_STS_REQUEST_TIMEOUT |  |
GST_RTSP_STS_GONE |  |
GST_RTSP_STS_LENGTH_REQUIRED |  |
GST_RTSP_STS_PRECONDITION_FAILED |  |
GST_RTSP_STS_REQUEST_ENTITY_TOO_LARGE |  |
GST_RTSP_STS_REQUEST_URI_TOO_LARGE |  |
GST_RTSP_STS_UNSUPPORTED_MEDIA_TYPE |  |
GST_RTSP_STS_PARAMETER_NOT_UNDERSTOOD |  |
GST_RTSP_STS_CONFERENCE_NOT_FOUND |  |
GST_RTSP_STS_NOT_ENOUGH_BANDWIDTH |  |
GST_RTSP_STS_SESSION_NOT_FOUND |  |
GST_RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE |  |
GST_RTSP_STS_HEADER_FIELD_NOT_VALID_FOR_RESOURCE |  |
GST_RTSP_STS_INVALID_RANGE |  |
GST_RTSP_STS_PARAMETER_IS_READONLY |  |
GST_RTSP_STS_AGGREGATE_OPERATION_NOT_ALLOWED |  |
GST_RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED |  |
GST_RTSP_STS_UNSUPPORTED_TRANSPORT |  |
GST_RTSP_STS_DESTINATION_UNREACHABLE |  |
GST_RTSP_STS_KEY_MANAGEMENT_FAILURE |  |
GST_RTSP_STS_INTERNAL_SERVER_ERROR |  |
GST_RTSP_STS_NOT_IMPLEMENTED |  |
GST_RTSP_STS_BAD_GATEWAY |  |
GST_RTSP_STS_SERVICE_UNAVAILABLE |  |
GST_RTSP_STS_GATEWAY_TIMEOUT |  |
GST_RTSP_STS_RTSP_VERSION_NOT_SUPPORTED |  |
GST_RTSP_STS_OPTION_NOT_SUPPORTED |  |

## See Also

gstrtspurl, gstrtspconnection