|  |  |  | GStreamer Base Plugins 0.10 Library Reference Manual |  | 
|---|---|---|---|---|
#include <gst/rtsp/gstrtspdefs.h> #define GST_RTSP_CHECK (stmt, label) enum GstRTSPResult; enum GstRTSPFamily; enum GstRTSPState; enum GstRTSPVersion; enum GstRTSPMethod; enum GstRTSPAuthMethod; #define GST_RTSP_AUTH_MAX enum GstRTSPHeaderField; enum GstRTSPStatusCode; gchar* gst_rtsp_strresult (GstRTSPResult result); const gchar* gst_rtsp_method_as_text (GstRTSPMethod method); const gchar* gst_rtsp_version_as_text (GstRTSPVersion version); const gchar* gst_rtsp_header_as_text (GstRTSPHeaderField field); const gchar* gst_rtsp_status_as_text (GstRTSPStatusCode code); GstRTSPHeaderField gst_rtsp_find_header_field (const gchar *header); GstRTSPMethod gst_rtsp_find_method (const gchar *method);
#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.
| 
 | a statement | 
| 
 | a label | 
typedef enum {
  GST_RTSP_OK          =  0,
  /* errors */
  GST_RTSP_ERROR       = -1,
  GST_RTSP_EINVAL      = -2,
  GST_RTSP_EINTR       = -3,
  GST_RTSP_ENOMEM      = -4,
  GST_RTSP_ERESOLV     = -5,
  GST_RTSP_ENOTIMPL    = -6,
  GST_RTSP_ESYS        = -7,
  GST_RTSP_EPARSE      = -8,
  GST_RTSP_EWSASTART   = -9,
  GST_RTSP_EWSAVERSION = -10,
  GST_RTSP_EEOF        = -11,
  GST_RTSP_ENET        = -12,
  GST_RTSP_ENOTIP      = -13,
  GST_RTSP_ETIMEOUT    = -14,
  GST_RTSP_ELAST       = -15
} GstRTSPResult;
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 | |
| last error | 
typedef enum {
  GST_RTSP_FAM_NONE,
  GST_RTSP_FAM_INET,
  GST_RTSP_FAM_INET6
} GstRTSPFamily;
The possible network families.
typedef enum {
  GST_RTSP_STATE_INVALID,
  GST_RTSP_STATE_INIT,
  GST_RTSP_STATE_READY,
  GST_RTSP_STATE_SEEKING,
  GST_RTSP_STATE_PLAYING,
  GST_RTSP_STATE_RECORDING
} GstRTSPState;
The different RTSP states.
typedef enum {
  GST_RTSP_VERSION_INVALID = 0x00,
  GST_RTSP_VERSION_1_0     = 0x10
} GstRTSPVersion;
The supported RTSP versions.
typedef enum {
  GST_RTSP_INVALID          = 0,
  GST_RTSP_DESCRIBE         = (1 <<  0),
  GST_RTSP_ANNOUNCE         = (1 <<  1),
  GST_RTSP_GET_PARAMETER    = (1 <<  2),
  GST_RTSP_OPTIONS          = (1 <<  3),
  GST_RTSP_PAUSE            = (1 <<  4),
  GST_RTSP_PLAY             = (1 <<  5),
  GST_RTSP_RECORD           = (1 <<  6),
  GST_RTSP_REDIRECT         = (1 <<  7),
  GST_RTSP_SETUP            = (1 <<  8),
  GST_RTSP_SET_PARAMETER    = (1 <<  9),
  GST_RTSP_TEARDOWN         = (1 << 10)
} GstRTSPMethod;
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 | 
typedef enum {
  GST_RTSP_AUTH_NONE    = 0x00,
  GST_RTSP_AUTH_BASIC   = 0x01,
  GST_RTSP_AUTH_DIGEST  = 0x02
} GstRTSPAuthMethod;
Authentication methods, ordered by strength
#define GST_RTSP_AUTH_MAX GST_RTSP_AUTH_DIGEST
Strongest available authentication method
typedef enum {
  GST_RTSP_HDR_INVALID,
  /*
   * R = Request
   * r = response
   * g = general
   * e = entity
   */
  GST_RTSP_HDR_ACCEPT,              /* Accept               R      opt.      entity */
  GST_RTSP_HDR_ACCEPT_ENCODING,     /* Accept-Encoding      R      opt.      entity */
  GST_RTSP_HDR_ACCEPT_LANGUAGE,     /* Accept-Language      R      opt.      all */
  GST_RTSP_HDR_ALLOW,               /* Allow                r      opt.      all */
  GST_RTSP_HDR_AUTHORIZATION,       /* Authorization        R      opt.      all */
  GST_RTSP_HDR_BANDWIDTH,           /* Bandwidth            R      opt.      all */
  GST_RTSP_HDR_BLOCKSIZE,           /* Blocksize            R      opt.      all but OPTIONS, TEARDOWN */
  GST_RTSP_HDR_CACHE_CONTROL,       /* Cache-Control        g      opt.      SETUP */
  GST_RTSP_HDR_CONFERENCE,          /* Conference           R      opt.      SETUP */
  GST_RTSP_HDR_CONNECTION,          /* Connection           g      req.      all */
  GST_RTSP_HDR_CONTENT_BASE,        /* Content-Base         e      opt.      entity */
  GST_RTSP_HDR_CONTENT_ENCODING,    /* Content-Encoding     e      req.      SET_PARAMETER, DESCRIBE, ANNOUNCE */
  GST_RTSP_HDR_CONTENT_LANGUAGE,    /* Content-Language     e      req.      DESCRIBE, ANNOUNCE */
  GST_RTSP_HDR_CONTENT_LENGTH,      /* Content-Length       e      req.      SET_PARAMETER, ANNOUNCE, entity */
  GST_RTSP_HDR_CONTENT_LOCATION,    /* Content-Location     e      opt.      entity */
  GST_RTSP_HDR_CONTENT_TYPE,        /* Content-Type         e      req.      SET_PARAMETER, ANNOUNCE, entity */
  GST_RTSP_HDR_CSEQ,                /* CSeq                 g      req.      all */
  GST_RTSP_HDR_DATE,                /* Date                 g      opt.      all */
  GST_RTSP_HDR_EXPIRES,             /* Expires              e      opt.      DESCRIBE, ANNOUNCE */
  GST_RTSP_HDR_FROM,                /* From                 R      opt.      all */
  GST_RTSP_HDR_IF_MODIFIED_SINCE,   /* If-Modified-Since    R      opt.      DESCRIBE, SETUP */
  GST_RTSP_HDR_LAST_MODIFIED,       /* Last-Modified        e      opt.      entity */
  GST_RTSP_HDR_PROXY_AUTHENTICATE,  /* Proxy-Authenticate */
  GST_RTSP_HDR_PROXY_REQUIRE,       /* Proxy-Require        R      req.      all */
  GST_RTSP_HDR_PUBLIC,              /* Public               r      opt.      all */
  GST_RTSP_HDR_RANGE,               /* Range                Rr     opt.      PLAY, PAUSE, RECORD */
  GST_RTSP_HDR_REFERER,             /* Referer              R      opt.      all */
  GST_RTSP_HDR_REQUIRE,             /* Require              R      req.      all */
  GST_RTSP_HDR_RETRY_AFTER,         /* Retry-After          r      opt.      all */
  GST_RTSP_HDR_RTP_INFO,            /* RTP-Info             r      req.      PLAY */
  GST_RTSP_HDR_SCALE,               /* Scale                Rr     opt.      PLAY, RECORD */
  GST_RTSP_HDR_SESSION,             /* Session              Rr     req.      all but SETUP, OPTIONS */
  GST_RTSP_HDR_SERVER,              /* Server               r      opt.      all */
  GST_RTSP_HDR_SPEED,               /* Speed                Rr     opt.      PLAY */
  GST_RTSP_HDR_TRANSPORT,           /* Transport            Rr     req.      SETUP */
  GST_RTSP_HDR_UNSUPPORTED,         /* Unsupported          r      req.      all */
  GST_RTSP_HDR_USER_AGENT,          /* User-Agent           R      opt.      all */
  GST_RTSP_HDR_VIA,                 /* Via                  g      opt.      all */
  GST_RTSP_HDR_WWW_AUTHENTICATE,    /* WWW-Authenticate     r      opt.      all */
  /* Real extensions */
  GST_RTSP_HDR_CLIENT_CHALLENGE,    /* ClientChallenge */
  GST_RTSP_HDR_REAL_CHALLENGE1,     /* RealChallenge1 */
  GST_RTSP_HDR_REAL_CHALLENGE2,     /* RealChallenge2 */
  GST_RTSP_HDR_REAL_CHALLENGE3,     /* RealChallenge3 */
  GST_RTSP_HDR_SUBSCRIBE,           /* Subscribe */
  GST_RTSP_HDR_ALERT,               /* Alert */
  GST_RTSP_HDR_CLIENT_ID,           /* ClientID */
  GST_RTSP_HDR_COMPANY_ID,          /* CompanyID */
  GST_RTSP_HDR_GUID,                /* GUID */
  GST_RTSP_HDR_REGION_DATA,         /* RegionData */
  GST_RTSP_HDR_MAX_ASM_WIDTH,       /* SupportsMaximumASMBandwidth */
  GST_RTSP_HDR_LANGUAGE,            /* Language */
  GST_RTSP_HDR_PLAYER_START_TIME,   /* PlayerStarttime */
  /* Since 0.10.16 */
  GST_RTSP_HDR_LOCATION             /* Location */
} GstRTSPHeaderField;
typedef enum {
  GST_RTSP_STS_INVALID                              = 0, 
  GST_RTSP_STS_CONTINUE                             = 100, 
  GST_RTSP_STS_OK                                   = 200, 
  GST_RTSP_STS_CREATED                              = 201, 
  GST_RTSP_STS_LOW_ON_STORAGE                       = 250, 
  GST_RTSP_STS_MULTIPLE_CHOICES                     = 300, 
  GST_RTSP_STS_MOVED_PERMANENTLY                    = 301, 
  GST_RTSP_STS_MOVE_TEMPORARILY                     = 302, 
  GST_RTSP_STS_SEE_OTHER                            = 303, 
  GST_RTSP_STS_NOT_MODIFIED                         = 304, 
  GST_RTSP_STS_USE_PROXY                            = 305, 
  GST_RTSP_STS_BAD_REQUEST                          = 400, 
  GST_RTSP_STS_UNAUTHORIZED                         = 401, 
  GST_RTSP_STS_PAYMENT_REQUIRED                     = 402, 
  GST_RTSP_STS_FORBIDDEN                            = 403, 
  GST_RTSP_STS_NOT_FOUND                            = 404, 
  GST_RTSP_STS_METHOD_NOT_ALLOWED                   = 405, 
  GST_RTSP_STS_NOT_ACCEPTABLE                       = 406, 
  GST_RTSP_STS_PROXY_AUTH_REQUIRED                  = 407, 
  GST_RTSP_STS_REQUEST_TIMEOUT                      = 408, 
  GST_RTSP_STS_GONE                                 = 410, 
  GST_RTSP_STS_LENGTH_REQUIRED                      = 411, 
  GST_RTSP_STS_PRECONDITION_FAILED                  = 412, 
  GST_RTSP_STS_REQUEST_ENTITY_TOO_LARGE             = 413, 
  GST_RTSP_STS_REQUEST_URI_TOO_LARGE                = 414, 
  GST_RTSP_STS_UNSUPPORTED_MEDIA_TYPE               = 415, 
  GST_RTSP_STS_PARAMETER_NOT_UNDERSTOOD             = 451, 
  GST_RTSP_STS_CONFERENCE_NOT_FOUND                 = 452, 
  GST_RTSP_STS_NOT_ENOUGH_BANDWIDTH                 = 453, 
  GST_RTSP_STS_SESSION_NOT_FOUND                    = 454, 
  GST_RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE       = 455, 
  GST_RTSP_STS_HEADER_FIELD_NOT_VALID_FOR_RESOURCE  = 456, 
  GST_RTSP_STS_INVALID_RANGE                        = 457, 
  GST_RTSP_STS_PARAMETER_IS_READONLY                = 458, 
  GST_RTSP_STS_AGGREGATE_OPERATION_NOT_ALLOWED      = 459, 
  GST_RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED     = 460, 
  GST_RTSP_STS_UNSUPPORTED_TRANSPORT                = 461, 
  GST_RTSP_STS_DESTINATION_UNREACHABLE              = 462, 
  GST_RTSP_STS_INTERNAL_SERVER_ERROR                = 500, 
  GST_RTSP_STS_NOT_IMPLEMENTED                      = 501, 
  GST_RTSP_STS_BAD_GATEWAY                          = 502, 
  GST_RTSP_STS_SERVICE_UNAVAILABLE                  = 503, 
  GST_RTSP_STS_GATEWAY_TIMEOUT                      = 504, 
  GST_RTSP_STS_RTSP_VERSION_NOT_SUPPORTED           = 505, 
  GST_RTSP_STS_OPTION_NOT_SUPPORTED                 = 551
} GstRTSPStatusCode;
gchar* gst_rtsp_strresult (GstRTSPResult result);
Convert result in a human readable string.
| 
 | a GstRTSPResult | 
| Returns : | a newly allocated string. g_free()after usage. | 
const gchar* gst_rtsp_method_as_text (GstRTSPMethod method);
Convert method to a string.
| 
 | a GstRTSPMethod | 
| Returns : | a string representation of method. | 
const gchar* gst_rtsp_version_as_text (GstRTSPVersion version);
Convert version to a string.
| 
 | a GstRTSPVersion | 
| Returns : | a string representation of version. | 
const gchar* gst_rtsp_header_as_text (GstRTSPHeaderField field);
Convert field to a string.
| 
 | a GstRTSPHeaderField | 
| Returns : | a string representation of field. | 
const gchar* gst_rtsp_status_as_text (GstRTSPStatusCode code);
Convert code to a string.
| 
 | a GstRTSPStatusCode | 
| Returns : | a string representation of code. | 
GstRTSPHeaderField gst_rtsp_find_header_field (const gchar *header);
Convert header to a GstRTSPHeaderField.
| 
 | a header string | 
| Returns : | a GstRTSPHeaderField for headeror GST_RTSP_HDR_INVALID if the
header field is unknown. | 
GstRTSPMethod gst_rtsp_find_method (const gchar *method);
Convert method to a GstRTSPMethod.
| 
 | a method | 
| Returns : | a GstRTSPMethod for methodor GST_RTSP_INVALID if the
method is unknown. |