[MPlayer-cvslog] r18826 - trunk/libmpdemux/librtsp/rtsp_session.c
ben
subversion at mplayerhq.hu
Mon Jun 26 19:27:39 CEST 2006
Author: ben
Date: Mon Jun 26 19:27:38 2006
New Revision: 18826
Modified:
trunk/libmpdemux/librtsp/rtsp_session.c
Log:
cosmetic changes to avoid constants redefinition
Modified: trunk/libmpdemux/librtsp/rtsp_session.c
==============================================================================
--- trunk/libmpdemux/librtsp/rtsp_session.c (original)
+++ trunk/libmpdemux/librtsp/rtsp_session.c Mon Jun 26 19:27:38 2006
@@ -53,6 +53,13 @@
#define LOG
*/
+#define RTSP_OPTIONS_SERVER "Server"
+#define RTSP_OPTIONS_LOCATION "Location"
+#define RTSP_OPTIONS_REAL "RealChallenge1"
+#define RTSP_SERVER_TYPE_REAL "Real"
+#define RTSP_SERVER_TYPE_HELIX "Helix"
+#define RTSP_SERVER_TYPE_UNKNOWN "unknown"
+
struct rtsp_session_s {
rtsp_t *s;
struct real_rtsp_session_t* real_session;
@@ -83,25 +90,25 @@
}
/* looking for server type */
- if (rtsp_search_answers(rtsp_session->s,"Server"))
- server=strdup(rtsp_search_answers(rtsp_session->s,"Server"));
+ if (rtsp_search_answers(rtsp_session->s,RTSP_OPTIONS_SERVER))
+ server=strdup(rtsp_search_answers(rtsp_session->s,RTSP_OPTIONS_SERVER));
else {
- if (rtsp_search_answers(rtsp_session->s,"RealChallenge1"))
- server=strdup("Real");
+ if (rtsp_search_answers(rtsp_session->s,RTSP_OPTIONS_REAL))
+ server=strdup(RTSP_SERVER_TYPE_REAL);
else
- server=strdup("unknown");
+ server=strdup(RTSP_SERVER_TYPE_UNKNOWN);
}
- if (strstr(server,"Real") || strstr(server,"Helix"))
+ if (strstr(server,RTSP_SERVER_TYPE_REAL) || strstr(server,RTSP_SERVER_TYPE_HELIX))
{
/* we are talking to a real server ... */
h=real_setup_and_get_header(rtsp_session->s, bandwidth);
if (!h) {
/* got an redirect? */
- if (rtsp_search_answers(rtsp_session->s, "Location"))
+ if (rtsp_search_answers(rtsp_session->s, RTSP_OPTIONS_LOCATION))
{
free(mrl_line);
- mrl_line=strdup(rtsp_search_answers(rtsp_session->s, "Location"));
+ mrl_line=strdup(rtsp_search_answers(rtsp_session->s, RTSP_OPTIONS_LOCATION));
mp_msg (MSGT_OPEN, MSGL_INFO,"rtsp_session: redirected to %s\n", mrl_line);
rtsp_close(rtsp_session->s);
free(server);
More information about the MPlayer-cvslog
mailing list