Add explanatory comments to the #endif part of multiple inclusion guards.
[mplayer/greg.git] / stream / stream_nemesi.c
blob5771710bfe47d93a885d9cb733bbd8824e9df5aa
1 /*
2 * Copyright (C) 2007 Alessandro Molina <amol.wrk@gmail.com>
3 * based on previous RTSP support from Benjamin Zores.
5 * MPlayer is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * MPlayer is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with MPlayer; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 #define HAVE_STRUCT_SOCKADDR_STORAGE
22 #include <stdlib.h>
23 #include <string.h>
24 #include <stdlib.h>
25 #include <stdio.h>
26 #include <ctype.h>
27 #include "config.h"
28 #include "nemesi/rtsp.h"
30 #include <errno.h>
32 #include "stream.h"
33 #include "libmpdemux/demuxer.h"
35 #include "tcp.h"
37 extern int network_bandwidth;
38 char *rtsp_destination = NULL;
40 static int rtsp_streaming_seek(int fd, off_t pos,
41 streaming_ctrl_t* streaming_ctrl) {
42 return -1;
45 static int rtsp_streaming_open (stream_t *stream, int mode, void *opts,
46 int *file_format)
48 rtsp_ctrl * ctl;
49 URL_t *url;
50 stream->fd = -1;
52 mp_msg (MSGT_OPEN, MSGL_V, "STREAM_RTSP, URL: %s\n", stream->url);
53 stream->streaming_ctrl = streaming_ctrl_new ();
54 if (!stream->streaming_ctrl)
55 return STREAM_ERROR;
57 stream->streaming_ctrl->bandwidth = network_bandwidth;
58 url = url_new(stream->url);
59 stream->streaming_ctrl->url = check4proxies(url);
60 stream->streaming_ctrl->streaming_seek = rtsp_streaming_seek;
62 *file_format = DEMUXER_TYPE_RTP_NEMESI;
63 stream->type = STREAMTYPE_STREAM;
64 return STREAM_OK;
67 const stream_info_t stream_info_rtsp = {
68 "RTSP streaming",
69 "rtsp",
70 "Alessandro Molina",
71 "implemented over libnemesi",
72 rtsp_streaming_open,
73 {"rtsp", NULL},
74 NULL,
75 0 /* Urls are an option string */