comparison stream/librtsp/rtsp_session.c @ 27103:a3f6dc43b585

Move rtsp_close away by simplification - avoids symbol clash with libnemesi
author lu_zero
date Wed, 25 Jun 2008 09:53:45 +0000
parents 4401909aac98
children 83d160a30ca7
comparison
equal deleted inserted replaced
27102:7acfd8c9c3bb 27103:a3f6dc43b585
70 struct rtsp_session_s { 70 struct rtsp_session_s {
71 rtsp_t *s; 71 rtsp_t *s;
72 struct real_rtsp_session_t* real_session; 72 struct real_rtsp_session_t* real_session;
73 struct rtp_rtsp_session_t* rtp_session; 73 struct rtp_rtsp_session_t* rtp_session;
74 }; 74 };
75
76 /*
77 * closes an rtsp connection
78 */
79
80 static void rtsp_close(rtsp_t *s) {
81
82 if (s->server_state)
83 {
84 if (s->server_state == RTSP_PLAYING)
85 rtsp_request_teardown (s, NULL);
86 closesocket (s->s);
87 }
88
89 if (s->path) free(s->path);
90 if (s->host) free(s->host);
91 if (s->mrl) free(s->mrl);
92 if (s->session) free(s->session);
93 if (s->user_agent) free(s->user_agent);
94 rtsp_free_answers(s);
95 rtsp_unschedule_all(s);
96 free(s);
97 }
75 98
76 //rtsp_session_t *rtsp_session_start(char *mrl) { 99 //rtsp_session_t *rtsp_session_start(char *mrl) {
77 rtsp_session_t *rtsp_session_start(int fd, char **mrl, char *path, char *host, 100 rtsp_session_t *rtsp_session_start(int fd, char **mrl, char *path, char *host,
78 int port, int *redir, uint32_t bandwidth, char *user, char *pass) { 101 int port, int *redir, uint32_t bandwidth, char *user, char *pass) {
79 102