2005-05-11 07:44:44 +00:00
|
|
|
/* GStreamer
|
gst/rtsp/URLS: Added some test URLS.
Original commit message from CVS:
* gst/rtsp/URLS:
Added some test URLS.
* gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_create_stream),
(gst_rtspsrc_loop), (gst_rtspsrc_open):
* gst/rtsp/gstrtspsrc.h:
When creating streams, give access to the complete SDP.
Fix some leaks.
Collect and merge global stream properties in stream caps.
Preliminary support for WMServer.
* gst/rtsp/rtspconnection.c: (rtsp_connection_create),
(rtsp_connection_connect), (rtsp_connection_read), (read_body),
(rtsp_connection_receive):
* gst/rtsp/rtspconnection.h:
Make connection interruptable.
Refactor to make it reconnectable.
Don't fail on short reads when reading data packets.
* gst/rtsp/rtspurl.c: (rtsp_url_parse), (rtsp_url_set_port),
(rtsp_url_get_port):
* gst/rtsp/rtspurl.h:
Add methods for getting/setting the port.
* gst/rtsp/sdpmessage.c: (sdp_message_get_attribute_val_n),
(sdp_message_get_attribute_val), (sdp_media_get_attribute),
(sdp_media_get_attribute_val_n), (sdp_media_get_attribute_val),
(sdp_media_get_format), (sdp_parse_line),
(sdp_message_parse_buffer):
Fix headers.
Add methods for getting multiple attributes with the same name.
Increase buffer size when parsing.
Fix parsing of a=foo fields.
* gst/rtsp/test.c: (main):
Update to new connection API.
* gst/rtsp/rtspmessage.c: (rtsp_message_new_response),
(rtsp_message_init_response), (rtsp_message_init_data),
(rtsp_message_unset), (rtsp_message_free), (rtsp_message_dump):
* gst/rtsp/rtspmessage.h:
* gst/rtsp/rtsptransport.c: (rtsp_transport_free):
* gst/rtsp/rtsptransport.h:
* gst/rtsp/sdp.h:
* gst/rtsp/sdpmessage.h:
* gst/rtsp/gstrtsp.c:
* gst/rtsp/gstrtsp.h:
* gst/rtsp/gstrtpdec.c:
* gst/rtsp/gstrtpdec.h:
* gst/rtsp/rtsp.h:
* gst/rtsp/rtspdefs.c:
* gst/rtsp/rtspdefs.h:
Dual licensed under MIT and LGPL now.
2006-09-20 16:06:27 +00:00
|
|
|
* Copyright (C) <2005,2006> Wim Taymans <wim@fluendo.com>
|
2005-05-11 07:44:44 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
gst/rtsp/URLS: Added some test URLS.
Original commit message from CVS:
* gst/rtsp/URLS:
Added some test URLS.
* gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_create_stream),
(gst_rtspsrc_loop), (gst_rtspsrc_open):
* gst/rtsp/gstrtspsrc.h:
When creating streams, give access to the complete SDP.
Fix some leaks.
Collect and merge global stream properties in stream caps.
Preliminary support for WMServer.
* gst/rtsp/rtspconnection.c: (rtsp_connection_create),
(rtsp_connection_connect), (rtsp_connection_read), (read_body),
(rtsp_connection_receive):
* gst/rtsp/rtspconnection.h:
Make connection interruptable.
Refactor to make it reconnectable.
Don't fail on short reads when reading data packets.
* gst/rtsp/rtspurl.c: (rtsp_url_parse), (rtsp_url_set_port),
(rtsp_url_get_port):
* gst/rtsp/rtspurl.h:
Add methods for getting/setting the port.
* gst/rtsp/sdpmessage.c: (sdp_message_get_attribute_val_n),
(sdp_message_get_attribute_val), (sdp_media_get_attribute),
(sdp_media_get_attribute_val_n), (sdp_media_get_attribute_val),
(sdp_media_get_format), (sdp_parse_line),
(sdp_message_parse_buffer):
Fix headers.
Add methods for getting multiple attributes with the same name.
Increase buffer size when parsing.
Fix parsing of a=foo fields.
* gst/rtsp/test.c: (main):
Update to new connection API.
* gst/rtsp/rtspmessage.c: (rtsp_message_new_response),
(rtsp_message_init_response), (rtsp_message_init_data),
(rtsp_message_unset), (rtsp_message_free), (rtsp_message_dump):
* gst/rtsp/rtspmessage.h:
* gst/rtsp/rtsptransport.c: (rtsp_transport_free):
* gst/rtsp/rtsptransport.h:
* gst/rtsp/sdp.h:
* gst/rtsp/sdpmessage.h:
* gst/rtsp/gstrtsp.c:
* gst/rtsp/gstrtsp.h:
* gst/rtsp/gstrtpdec.c:
* gst/rtsp/gstrtpdec.h:
* gst/rtsp/rtsp.h:
* gst/rtsp/rtspdefs.c:
* gst/rtsp/rtspdefs.h:
Dual licensed under MIT and LGPL now.
2006-09-20 16:06:27 +00:00
|
|
|
/*
|
|
|
|
* Unless otherwise indicated, Source Code is licensed under MIT license.
|
|
|
|
* See further explanation attached in License Statement (distributed in the file
|
|
|
|
* LICENSE).
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
|
|
* this software and associated documentation files (the "Software"), to deal in
|
|
|
|
* the Software without restriction, including without limitation the rights to
|
|
|
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
|
|
* of the Software, and to permit persons to whom the Software is furnished to do
|
|
|
|
* so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be included in all
|
|
|
|
* copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
* SOFTWARE.
|
|
|
|
*/
|
2005-05-11 07:44:44 +00:00
|
|
|
|
2006-09-23 15:31:56 +00:00
|
|
|
#include <errno.h>
|
|
|
|
|
|
|
|
extern int h_errno;
|
|
|
|
|
|
|
|
#include <netdb.h>
|
|
|
|
|
2005-05-11 07:44:44 +00:00
|
|
|
#include "rtspdefs.h"
|
|
|
|
|
2006-09-23 15:31:56 +00:00
|
|
|
static const gchar *rtsp_results[] = {
|
|
|
|
"OK",
|
|
|
|
/* errors */
|
gst/rtsp/gstrtspsrc.*: Rework how the transport string is constructed, try to share channels and udp ports.
Original commit message from CVS:
* gst/rtsp/gstrtspsrc.c: (gst_rtsp_proto_get_type),
(gst_rtspsrc_class_init), (gst_rtspsrc_init),
(gst_rtspsrc_create_stream), (gst_rtspsrc_media_to_caps),
(gst_rtspsrc_alloc_udp_ports),
(gst_rtspsrc_stream_configure_transport), (find_stream_by_channel),
(gst_rtspsrc_push_event), (gst_rtspsrc_loop_interleaved),
(gst_rtspsrc_create_transports_string),
(gst_rtspsrc_configure_transports), (gst_rtspsrc_open),
(gst_rtspsrc_handle_message), (gst_rtspsrc_change_state):
* gst/rtsp/gstrtspsrc.h:
Rework how the transport string is constructed, try to share channels
and udp ports.
Make most of the stuff less dependant on RTP as we are also going to use
it for RDT.
Add support for transport specific session managers.
* gst/rtsp/rtspconnection.c: (rtsp_connection_flush):
Implement _flush().
* gst/rtsp/rtspdefs.c: (rtsp_strresult):
* gst/rtsp/rtspdefs.h:
Add generic error return code.
* gst/rtsp/rtspext.h:
Add support for pluggable tranport strings.
* gst/rtsp/rtspextwms.c: (rtsp_ext_wms_before_send),
(rtsp_ext_wms_after_send), (rtsp_ext_wms_parse_sdp),
(rtsp_ext_wms_get_context):
Detect WMServer and activate the extension.
* gst/rtsp/rtsptransport.c: (rtsp_transport_get_mime),
(rtsp_transport_get_manager), (rtsp_transport_parse):
* gst/rtsp/rtsptransport.h:
Added methods to get mime/manager for certain transports.
2006-10-06 12:55:53 +00:00
|
|
|
"Generic error",
|
2006-09-23 15:31:56 +00:00
|
|
|
"Invalid parameter specified",
|
|
|
|
"Operation interrupted",
|
|
|
|
"Out of memory",
|
|
|
|
"Cannot resolve host",
|
|
|
|
"Function not implemented",
|
|
|
|
"System error: '%s'",
|
|
|
|
"Parse error",
|
|
|
|
"Error on WSAStartup",
|
|
|
|
"Windows sockets are not version 0x202",
|
|
|
|
"Received end-of-file",
|
|
|
|
"Network error: %s",
|
|
|
|
"Host is not a valid IP address",
|
|
|
|
"Unknown error (%d)",
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
|
|
|
static const gchar *rtsp_methods[] = {
|
2005-05-11 07:44:44 +00:00
|
|
|
"DESCRIBE",
|
|
|
|
"ANNOUNCE",
|
|
|
|
"GET_PARAMETER",
|
|
|
|
"OPTIONS",
|
|
|
|
"PAUSE",
|
|
|
|
"PLAY",
|
|
|
|
"RECORD",
|
|
|
|
"REDIRECT",
|
|
|
|
"SETUP",
|
|
|
|
"SET_PARAMETER",
|
|
|
|
"TEARDOWN",
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
2006-09-23 15:31:56 +00:00
|
|
|
static const gchar *rtsp_headers[] = {
|
2005-05-11 07:44:44 +00:00
|
|
|
"Accept", /* Accept R opt. entity */
|
|
|
|
"Accept-Encoding", /* Accept-Encoding R opt. entity */
|
|
|
|
"Accept-Language", /* Accept-Language R opt. all */
|
|
|
|
"Allow", /* Allow r opt. all */
|
|
|
|
"Authorization", /* Authorization R opt. all */
|
|
|
|
"Bandwidth", /* Bandwidth R opt. all */
|
|
|
|
"Blocksize", /* Blocksize R opt. all but OPTIONS, TEARDOWN */
|
|
|
|
"Cache-Control", /* Cache-Control g opt. SETUP */
|
|
|
|
"Conference", /* Conference R opt. SETUP */
|
|
|
|
"Connection", /* Connection g req. all */
|
|
|
|
"Content-Base", /* Content-Base e opt. entity */
|
|
|
|
"Content-Encoding", /* Content-Encoding e req. SET_PARAMETER, DESCRIBE, ANNOUNCE */
|
|
|
|
"Content-Language", /* Content-Language e req. DESCRIBE, ANNOUNCE */
|
|
|
|
"Content-Length", /* Content-Length e req. SET_PARAMETER, ANNOUNCE, entity */
|
|
|
|
"Content-Location", /* Content-Location e opt. entity */
|
|
|
|
"Content-Type", /* Content-Type e req. SET_PARAMETER, ANNOUNCE, entity */
|
|
|
|
"CSeq", /* CSeq g req. all */
|
|
|
|
"Date", /* Date g opt. all */
|
|
|
|
"Expires", /* Expires e opt. DESCRIBE, ANNOUNCE */
|
|
|
|
"From", /* From R opt. all */
|
|
|
|
"If-Modified-Since", /* If-Modified-Since R opt. DESCRIBE, SETUP */
|
|
|
|
"Last-Modified", /* Last-Modified e opt. entity */
|
|
|
|
"Proxy-Authenticate", /* Proxy-Authenticate */
|
|
|
|
"Proxy-Require", /* Proxy-Require R req. all */
|
|
|
|
"Public", /* Public r opt. all */
|
|
|
|
"Range", /* Range Rr opt. PLAY, PAUSE, RECORD */
|
|
|
|
"Referer", /* Referer R opt. all */
|
|
|
|
"Require", /* Require R req. all */
|
|
|
|
"Retry-After", /* Retry-After r opt. all */
|
|
|
|
"RTP-Info", /* RTP-Info r req. PLAY */
|
|
|
|
"Scale", /* Scale Rr opt. PLAY, RECORD */
|
|
|
|
"Session", /* Session Rr req. all but SETUP, OPTIONS */
|
|
|
|
"Server", /* Server r opt. all */
|
|
|
|
"Speed", /* Speed Rr opt. PLAY */
|
|
|
|
"Transport", /* Transport Rr req. SETUP */
|
|
|
|
"Unsupported", /* Unsupported r req. all */
|
|
|
|
"User-Agent", /* User-Agent R opt. all */
|
|
|
|
"Via", /* Via g opt. all */
|
|
|
|
"WWW-Authenticate", /* WWW-Authenticate r opt. all */
|
gst/rtsp/: Factor out extension in separate module.
Original commit message from CVS:
* gst/rtsp/Makefile.am:
* gst/rtsp/gstrtpdec.c: (gst_rtpdec_getcaps),
(gst_rtpdec_chain_rtp), (gst_rtpdec_chain_rtcp):
* gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_init),
(gst_rtspsrc_finalize), (gst_rtspsrc_create_stream),
(gst_rtspsrc_parse_rtpmap),
(gst_rtspsrc_stream_configure_transport), (gst_rtspsrc_send),
(gst_rtspsrc_parse_methods), (gst_rtspsrc_open),
(gst_rtspsrc_play), (gst_rtspsrc_handle_message):
* gst/rtsp/gstrtspsrc.h:
* gst/rtsp/rtspdefs.c: (rtsp_strresult):
* gst/rtsp/rtspdefs.h:
* gst/rtsp/rtspext.h:
* gst/rtsp/rtspextwms.c: (rtsp_ext_wms_parse_sdp),
(rtsp_ext_wms_get_context):
* gst/rtsp/rtspextwms.h:
* gst/rtsp/rtsptransport.c: (rtsp_transport_init), (parse_mode),
(rtsp_transport_parse):
* gst/rtsp/rtsptransport.h:
Factor out extension in separate module.
Fix getcaps to filter against the padtemplate.
Use Content-Base if the server gives one.
Rework the transport parsing a bit for future extensions.
Added some Real Header field definitions.
2006-10-04 17:24:40 +00:00
|
|
|
|
|
|
|
/* Real extensions */
|
|
|
|
"ClientChallenge", /* ClientChallenge */
|
|
|
|
"RealChallenge1", /* RealChallenge1 */
|
|
|
|
"RealChallenge2", /* RealChallenge2 */
|
|
|
|
"Subscribe", /* Subscribe */
|
|
|
|
|
2005-05-11 07:44:44 +00:00
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
|
|
|
#define DEF_STATUS(c,t)
|
|
|
|
|
|
|
|
void
|
|
|
|
rtsp_init_status (void)
|
|
|
|
{
|
|
|
|
DEF_STATUS (RTSP_STS_CONTINUE, "Continue");
|
|
|
|
DEF_STATUS (RTSP_STS_OK, "OK");
|
|
|
|
DEF_STATUS (RTSP_STS_CREATED, "Created");
|
|
|
|
DEF_STATUS (RTSP_STS_LOW_ON_STORAGE, "Low on Storage Space");
|
|
|
|
DEF_STATUS (RTSP_STS_MULTIPLE_CHOICES, "Multiple Choices");
|
|
|
|
DEF_STATUS (RTSP_STS_MOVED_PERMANENTLY, "Moved Permanently");
|
|
|
|
DEF_STATUS (RTSP_STS_MOVE_TEMPORARILY, "Moved Temporarily");
|
|
|
|
DEF_STATUS (RTSP_STS_SEE_OTHER, "See Other");
|
|
|
|
DEF_STATUS (RTSP_STS_NOT_MODIFIED, "Not Modified");
|
|
|
|
DEF_STATUS (RTSP_STS_USE_PROXY, "Use Proxy");
|
|
|
|
DEF_STATUS (RTSP_STS_BAD_REQUEST, "Bad Request");
|
|
|
|
DEF_STATUS (RTSP_STS_UNAUTHORIZED, "Unauthorized");
|
|
|
|
DEF_STATUS (RTSP_STS_PAYMENT_REQUIRED, "Payment Required");
|
|
|
|
DEF_STATUS (RTSP_STS_FORBIDDEN, "Forbidden");
|
|
|
|
DEF_STATUS (RTSP_STS_NOT_FOUND, "Not Found");
|
|
|
|
DEF_STATUS (RTSP_STS_METHOD_NOT_ALLOWED, "Method Not Allowed");
|
|
|
|
DEF_STATUS (RTSP_STS_NOT_ACCEPTABLE, "Not Acceptable");
|
|
|
|
DEF_STATUS (RTSP_STS_PROXY_AUTH_REQUIRED, "Proxy Authentication Required");
|
|
|
|
DEF_STATUS (RTSP_STS_REQUEST_TIMEOUT, "Request Time-out");
|
|
|
|
DEF_STATUS (RTSP_STS_GONE, "Gone");
|
|
|
|
DEF_STATUS (RTSP_STS_LENGTH_REQUIRED, "Length Required");
|
|
|
|
DEF_STATUS (RTSP_STS_PRECONDITION_FAILED, "Precondition Failed");
|
|
|
|
DEF_STATUS (RTSP_STS_REQUEST_ENTITY_TOO_LARGE, "Request Entity Too Large");
|
|
|
|
DEF_STATUS (RTSP_STS_REQUEST_URI_TOO_LARGE, "Request-URI Too Large");
|
|
|
|
DEF_STATUS (RTSP_STS_UNSUPPORTED_MEDIA_TYPE, "Unsupported Media Type");
|
|
|
|
DEF_STATUS (RTSP_STS_PARAMETER_NOT_UNDERSTOOD, "Parameter Not Understood");
|
|
|
|
DEF_STATUS (RTSP_STS_CONFERENCE_NOT_FOUND, "Conference Not Found");
|
|
|
|
DEF_STATUS (RTSP_STS_NOT_ENOUGH_BANDWIDTH, "Not Enough Bandwidth");
|
|
|
|
DEF_STATUS (RTSP_STS_SESSION_NOT_FOUND, "Session Not Found");
|
|
|
|
DEF_STATUS (RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE,
|
|
|
|
"Method Not Valid in This State");
|
|
|
|
DEF_STATUS (RTSP_STS_HEADER_FIELD_NOT_VALID_FOR_RESOURCE,
|
|
|
|
"Header Field Not Valid for Resource");
|
|
|
|
DEF_STATUS (RTSP_STS_INVALID_RANGE, "Invalid Range");
|
|
|
|
DEF_STATUS (RTSP_STS_PARAMETER_IS_READONLY, "Parameter Is Read-Only");
|
|
|
|
DEF_STATUS (RTSP_STS_AGGREGATE_OPERATION_NOT_ALLOWED,
|
|
|
|
"Aggregate operation not allowed");
|
|
|
|
DEF_STATUS (RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED,
|
|
|
|
"Only aggregate operation allowed");
|
|
|
|
DEF_STATUS (RTSP_STS_UNSUPPORTED_TRANSPORT, "Unsupported transport");
|
|
|
|
DEF_STATUS (RTSP_STS_DESTINATION_UNREACHABLE, "Destination unreachable");
|
|
|
|
DEF_STATUS (RTSP_STS_INTERNAL_SERVER_ERROR, "Internal Server Error");
|
|
|
|
DEF_STATUS (RTSP_STS_NOT_IMPLEMENTED, "Not Implemented");
|
|
|
|
DEF_STATUS (RTSP_STS_BAD_GATEWAY, "Bad Gateway");
|
|
|
|
DEF_STATUS (RTSP_STS_SERVICE_UNAVAILABLE, "Service Unavailable");
|
|
|
|
DEF_STATUS (RTSP_STS_GATEWAY_TIMEOUT, "Gateway Time-out");
|
|
|
|
DEF_STATUS (RTSP_STS_RTSP_VERSION_NOT_SUPPORTED,
|
|
|
|
"RTSP Version not supported");
|
|
|
|
DEF_STATUS (RTSP_STS_OPTION_NOT_SUPPORTED, "Option not supported");
|
|
|
|
}
|
|
|
|
|
2006-09-23 15:31:56 +00:00
|
|
|
gchar *
|
|
|
|
rtsp_strresult (RTSPResult result)
|
|
|
|
{
|
|
|
|
gint idx;
|
|
|
|
gchar *res;
|
|
|
|
|
|
|
|
idx = ABS (result);
|
|
|
|
idx = CLAMP (idx, 0, -RTSP_ELAST);
|
|
|
|
|
|
|
|
switch (idx) {
|
|
|
|
case -RTSP_ESYS:
|
|
|
|
res = g_strdup_printf (rtsp_results[idx], g_strerror (errno));
|
|
|
|
break;
|
|
|
|
case -RTSP_ENET:
|
|
|
|
res = g_strdup_printf (rtsp_results[idx], hstrerror (h_errno));
|
|
|
|
break;
|
|
|
|
case -RTSP_ELAST:
|
|
|
|
res = g_strdup_printf (rtsp_results[idx], result);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
res = g_strdup (rtsp_results[idx]);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
2005-05-11 07:44:44 +00:00
|
|
|
const gchar *
|
|
|
|
rtsp_method_as_text (RTSPMethod method)
|
|
|
|
{
|
2005-08-18 16:53:14 +00:00
|
|
|
gint i;
|
|
|
|
|
|
|
|
if (method == 0)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
i = 0;
|
|
|
|
while ((method & 1) == 0) {
|
|
|
|
i++;
|
|
|
|
method >>= 1;
|
|
|
|
}
|
|
|
|
return rtsp_methods[i];
|
2005-05-11 07:44:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const gchar *
|
|
|
|
rtsp_header_as_text (RTSPHeaderField field)
|
|
|
|
{
|
|
|
|
return rtsp_headers[field];
|
|
|
|
}
|
|
|
|
|
|
|
|
const gchar *
|
|
|
|
rtsp_status_as_text (RTSPStatusCode code)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
const gchar *
|
|
|
|
rtsp_status_to_string (RTSPStatusCode code)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
RTSPHeaderField
|
|
|
|
rtsp_find_header_field (gchar * header)
|
|
|
|
{
|
|
|
|
gint idx;
|
|
|
|
|
|
|
|
for (idx = 0; rtsp_headers[idx]; idx++) {
|
|
|
|
if (g_ascii_strcasecmp (rtsp_headers[idx], header) == 0) {
|
|
|
|
return idx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return -1;
|
|
|
|
}
|
gst/rtsp/: Added README
Original commit message from CVS:
* gst/rtsp/README:
* gst/rtsp/gstrtspsrc.c: (gst_rtsp_proto_get_type),
(gst_rtspsrc_class_init), (gst_rtspsrc_create_stream),
(gst_rtspsrc_add_element), (gst_rtspsrc_set_state),
(gst_rtspsrc_stream_setup_rtp),
(gst_rtspsrc_stream_configure_transport), (find_stream),
(gst_rtspsrc_loop), (gst_rtspsrc_open), (gst_rtspsrc_play):
* gst/rtsp/rtsp.h:
* gst/rtsp/rtspconnection.c: (rtsp_connection_create),
(rtsp_connection_send), (read_line), (parse_request_line),
(parse_line), (read_body), (rtsp_connection_receive),
(rtsp_connection_free):
* gst/rtsp/rtspconnection.h:
* gst/rtsp/rtspdefs.c: (rtsp_find_method):
* gst/rtsp/rtspdefs.h:
* gst/rtsp/rtspmessage.c: (rtsp_message_set_body),
(rtsp_message_take_body):
* gst/rtsp/rtspmessage.h:
* gst/rtsp/rtspstream.h:
* gst/rtsp/sdpmessage.c: (sdp_parse_line):
Added README
Some cleanups.
2005-05-11 12:01:10 +00:00
|
|
|
|
|
|
|
RTSPMethod
|
|
|
|
rtsp_find_method (gchar * method)
|
|
|
|
{
|
|
|
|
gint idx;
|
|
|
|
|
|
|
|
for (idx = 0; rtsp_methods[idx]; idx++) {
|
2005-08-18 16:53:14 +00:00
|
|
|
if (g_ascii_strcasecmp (rtsp_methods[idx], method) == 0) {
|
|
|
|
return (1 << idx);
|
gst/rtsp/: Added README
Original commit message from CVS:
* gst/rtsp/README:
* gst/rtsp/gstrtspsrc.c: (gst_rtsp_proto_get_type),
(gst_rtspsrc_class_init), (gst_rtspsrc_create_stream),
(gst_rtspsrc_add_element), (gst_rtspsrc_set_state),
(gst_rtspsrc_stream_setup_rtp),
(gst_rtspsrc_stream_configure_transport), (find_stream),
(gst_rtspsrc_loop), (gst_rtspsrc_open), (gst_rtspsrc_play):
* gst/rtsp/rtsp.h:
* gst/rtsp/rtspconnection.c: (rtsp_connection_create),
(rtsp_connection_send), (read_line), (parse_request_line),
(parse_line), (read_body), (rtsp_connection_receive),
(rtsp_connection_free):
* gst/rtsp/rtspconnection.h:
* gst/rtsp/rtspdefs.c: (rtsp_find_method):
* gst/rtsp/rtspdefs.h:
* gst/rtsp/rtspmessage.c: (rtsp_message_set_body),
(rtsp_message_take_body):
* gst/rtsp/rtspmessage.h:
* gst/rtsp/rtspstream.h:
* gst/rtsp/sdpmessage.c: (sdp_parse_line):
Added README
Some cleanups.
2005-05-11 12:01:10 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return -1;
|
|
|
|
}
|