Mercurial > mplayer.hg
changeset 18822:a48dead7424a
cosmetic changes to avoid constants redefinition
author | ben |
---|---|
date | Mon, 26 Jun 2006 17:27:38 +0000 |
parents | ac61a42feb47 |
children | ef667dd373e2 |
files | libmpdemux/librtsp/rtsp_session.c |
diffstat | 1 files changed, 15 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/librtsp/rtsp_session.c Mon Jun 26 17:01:07 2006 +0000 +++ b/libmpdemux/librtsp/rtsp_session.c Mon Jun 26 17:27:38 2006 +0000 @@ -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);