Imported Debian version 2.4.3~trusty1
[deb_ffmpeg.git] / ffmpeg / libavformat / rtspcodes.h
CommitLineData
2ba45a60
DM
1/*
2 * RTSP definitions
3 * copyright (c) 2002 Fabrice Bellard
4 * copyright (c) 2014 Samsung Electronics. All rights reserved.
5 * @Author: Reynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>
6 *
7 * This file is part of FFmpeg.
8 *
9 * FFmpeg is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * FFmpeg is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with FFmpeg; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23
24#ifndef AVFORMAT_RTSPCODES_H
25#define AVFORMAT_RTSPCODES_H
26
27#include "libavutil/common.h"
28
29/** RTSP handling */
30enum RTSPStatusCode {
31RTSP_STATUS_CONTINUE =100,
32RTSP_STATUS_OK =200,
33RTSP_STATUS_CREATED =201,
34RTSP_STATUS_LOW_ON_STORAGE_SPACE =250,
35RTSP_STATUS_MULTIPLE_CHOICES =300,
36RTSP_STATUS_MOVED_PERMANENTLY =301,
37RTSP_STATUS_MOVED_TEMPORARILY =302,
38RTSP_STATUS_SEE_OTHER =303,
39RTSP_STATUS_NOT_MODIFIED =304,
40RTSP_STATUS_USE_PROXY =305,
41RTSP_STATUS_BAD_REQUEST =400,
42RTSP_STATUS_UNAUTHORIZED =401,
43RTSP_STATUS_PAYMENT_REQUIRED =402,
44RTSP_STATUS_FORBIDDEN =403,
45RTSP_STATUS_NOT_FOUND =404,
46RTSP_STATUS_METHOD =405,
47RTSP_STATUS_NOT_ACCEPTABLE =406,
48RTSP_STATUS_PROXY_AUTH_REQUIRED =407,
49RTSP_STATUS_REQ_TIME_OUT =408,
50RTSP_STATUS_GONE =410,
51RTSP_STATUS_LENGTH_REQUIRED =411,
52RTSP_STATUS_PRECONDITION_FAILED =412,
53RTSP_STATUS_REQ_ENTITY_2LARGE =413,
54RTSP_STATUS_REQ_URI_2LARGE =414,
55RTSP_STATUS_UNSUPPORTED_MTYPE =415,
56RTSP_STATUS_PARAM_NOT_UNDERSTOOD =451,
57RTSP_STATUS_CONFERENCE_NOT_FOUND =452,
58RTSP_STATUS_BANDWIDTH =453,
59RTSP_STATUS_SESSION =454,
60RTSP_STATUS_STATE =455,
61RTSP_STATUS_INVALID_HEADER_FIELD =456,
62RTSP_STATUS_INVALID_RANGE =457,
63RTSP_STATUS_RONLY_PARAMETER =458,
64RTSP_STATUS_AGGREGATE =459,
65RTSP_STATUS_ONLY_AGGREGATE =460,
66RTSP_STATUS_TRANSPORT =461,
67RTSP_STATUS_UNREACHABLE =462,
68RTSP_STATUS_INTERNAL =500,
69RTSP_STATUS_NOT_IMPLEMENTED =501,
70RTSP_STATUS_BAD_GATEWAY =502,
71RTSP_STATUS_SERVICE =503,
72RTSP_STATUS_GATEWAY_TIME_OUT =504,
73RTSP_STATUS_VERSION =505,
74RTSP_STATUS_UNSUPPORTED_OPTION =551,
75};
76
77static const av_unused char * const rtsp_status_strings[] = {
78[RTSP_STATUS_CONTINUE] ="Continue",
79[RTSP_STATUS_OK] ="OK",
80[RTSP_STATUS_CREATED] ="Created",
81[RTSP_STATUS_LOW_ON_STORAGE_SPACE] ="Low on Storage Space",
82[RTSP_STATUS_MULTIPLE_CHOICES] ="Multiple Choices",
83[RTSP_STATUS_MOVED_PERMANENTLY] ="Moved Permanently",
84[RTSP_STATUS_MOVED_TEMPORARILY] ="Moved Temporarily",
85[RTSP_STATUS_SEE_OTHER] ="See Other",
86[RTSP_STATUS_NOT_MODIFIED] ="Not Modified",
87[RTSP_STATUS_USE_PROXY] ="Use Proxy",
88[RTSP_STATUS_BAD_REQUEST] ="Bad Request",
89[RTSP_STATUS_UNAUTHORIZED] ="Unauthorized",
90[RTSP_STATUS_PAYMENT_REQUIRED] ="Payment Required",
91[RTSP_STATUS_FORBIDDEN] ="Forbidden",
92[RTSP_STATUS_NOT_FOUND] ="Not Found",
93[RTSP_STATUS_METHOD] ="Method Not Allowed",
94[RTSP_STATUS_NOT_ACCEPTABLE] ="Not Acceptable",
95[RTSP_STATUS_PROXY_AUTH_REQUIRED] ="Proxy Authentication Required",
96[RTSP_STATUS_REQ_TIME_OUT] ="Request Time-out",
97[RTSP_STATUS_GONE] ="Gone",
98[RTSP_STATUS_LENGTH_REQUIRED] ="Length Required",
99[RTSP_STATUS_PRECONDITION_FAILED] ="Precondition Failed",
100[RTSP_STATUS_REQ_ENTITY_2LARGE] ="Request Entity Too Large",
101[RTSP_STATUS_REQ_URI_2LARGE] ="Request URI Too Large",
102[RTSP_STATUS_UNSUPPORTED_MTYPE] ="Unsupported Media Type",
103[RTSP_STATUS_PARAM_NOT_UNDERSTOOD] ="Parameter Not Understood",
104[RTSP_STATUS_CONFERENCE_NOT_FOUND] ="Conference Not Found",
105[RTSP_STATUS_BANDWIDTH] ="Not Enough Bandwidth",
106[RTSP_STATUS_SESSION] ="Session Not Found",
107[RTSP_STATUS_STATE] ="Method Not Valid in This State",
108[RTSP_STATUS_INVALID_HEADER_FIELD] ="Header Field Not Valid for Resource",
109[RTSP_STATUS_INVALID_RANGE] ="Invalid Range",
110[RTSP_STATUS_RONLY_PARAMETER] ="Parameter Is Read-Only",
111[RTSP_STATUS_AGGREGATE] ="Aggregate Operation no Allowed",
112[RTSP_STATUS_ONLY_AGGREGATE] ="Only Aggregate Operation Allowed",
113[RTSP_STATUS_TRANSPORT] ="Unsupported Transport",
114[RTSP_STATUS_UNREACHABLE] ="Destination Unreachable",
115[RTSP_STATUS_INTERNAL] ="Internal Server Error",
116[RTSP_STATUS_NOT_IMPLEMENTED] ="Not Implemented",
117[RTSP_STATUS_BAD_GATEWAY] ="Bad Gateway",
118[RTSP_STATUS_SERVICE] ="Service Unavailable",
119[RTSP_STATUS_GATEWAY_TIME_OUT] ="Gateway Time-out",
120[RTSP_STATUS_VERSION] ="RTSP Version not Supported",
121[RTSP_STATUS_UNSUPPORTED_OPTION] ="Option not supported",
122};
123
124#define RTSP_STATUS_CODE2STRING(x) (\
125x >= 100 && x < FF_ARRAY_ELEMS(rtsp_status_strings) && rtsp_status_strings[x] \
126)? rtsp_status_strings[x] : NULL
127
128enum RTSPMethod {
129 DESCRIBE,
130 ANNOUNCE,
131 OPTIONS,
132 SETUP,
133 PLAY,
134 PAUSE,
135 TEARDOWN,
136 GET_PARAMETER,
137 SET_PARAMETER,
138 REDIRECT,
139 RECORD,
140 UNKNOWN = -1,
141};
142#endif /* AVFORMAT_RTSPCODES_H */