* RTSP/SDP client
* Copyright (c) 2002 Fabrice Bellard.
*
- * This library is free software; you can redistribute it and/or
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
+ * version 2.1 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
+ * FFmpeg 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser 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
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "avformat.h"
char buf[256];
int i;
AVCodec *c;
- char *c_name;
+ const char *c_name;
/* Loop into AVRtpDynamicPayloadTypes[] and AVRtpPayloadTypes[] and
see if we can handle this kind of payload */
c = avcodec_find_decoder(codec->codec_id);
if (c && c->name)
- c_name = (char *)c->name;
+ c_name = c->name;
else
c_name = (char *)NULL;
typedef struct attrname_map
{
- char *str;
+ const char *str;
uint16_t type;
uint32_t offset;
} attrname_map_t;
rt->state = RTSP_STATE_IDLE;
rt->seek_timestamp = 0; /* default is to start stream at position
zero */
- if (ap && ap->initial_pause) {
+ if (ap->initial_pause) {
/* do not start immediately */
} else {
if (rtsp_read_play(s) < 0) {
return 0;
}
-AVInputFormat rtsp_demux = {
+AVInputFormat rtsp_demuxer = {
"rtsp",
"RTSP input format",
sizeof(RTSPState),
return 0;
}
-
-static AVInputFormat sdp_demux = {
+#ifdef CONFIG_SDP_DEMUXER
+AVInputFormat sdp_demuxer = {
"sdp",
"SDP",
sizeof(RTSPState),
sdp_read_packet,
sdp_read_close,
};
-
+#endif
/* dummy redirector format (used directly in av_open_input_file now) */
static int redir_probe(AVProbeData *pd)
return 0;
}
-AVInputFormat redir_demux = {
+AVInputFormat redir_demuxer = {
"redir",
"Redirector format",
0,
NULL,
NULL,
};
-
-int rtsp_init(void)
-{
- av_register_input_format(&rtsp_demux);
- av_register_input_format(&redir_demux);
- av_register_input_format(&sdp_demux);
- return 0;
-}