[FFmpeg-devel] [RFC] Separating the RTSP muxer/demuxer and SDP demuxer
Diego Biurrun
diego
Thu Oct 7 15:28:21 CEST 2010
On Thu, Oct 07, 2010 at 01:01:16PM +0300, Martin Storsj? wrote:
>
> The attached patch splits the current code from rtsp.c and rtspenc.c into
> the following files:
>
> rtsp.c - handling of RTSP protocol things, shared by the RTSP muxer
> and demuxer
> rtspcommon.c - common code shared by all three components, such as opening
> of the transport contexts, cleanup of transport contexts,
> common parsing helpers such as get_word(), get_word_sep(),
> get_word_until_chars()
> Then there's of course the question of how to name all the files. Perhaps
> it would be better to rename rtsp.c to rtspproto.c, and rtspcommon.c to
> rtsp.c.
Yes.
> --- a/libavformat/Makefile
> +++ b/libavformat/Makefile
> @@ -7,6 +7,7 @@ HEADERS = avformat.h avio.h
>
> OBJS = allformats.o \
> cutils.o \
> + id3v2.o \
> metadata.o \
> metadata_compat.o \
> options.o \
This looks unrelated.
> --- /dev/null
> +++ b/libavformat/rtprecv.c
> @@ -0,0 +1,564 @@
> +
> +#include "libavutil/avstring.h"
> +#include "avformat.h"
> +
> +#include <sys/time.h>
> +#if HAVE_SYS_SELECT_H
> +#include <sys/select.h>
> +#endif
> +#include <strings.h>
> +#include "internal.h"
> +#include "network.h"
> +#include "os_support.h"
> +#include "rtsp.h"
Place system headers before local ones and this is missing config.h.
> --- /dev/null
> +++ b/libavformat/rtspcommon.c
> @@ -0,0 +1,198 @@
> +
> +#include "libavutil/avstring.h"
> +#include "avformat.h"
> +
> +#include <sys/time.h>
> +#include "internal.h"
> +#include "network.h"
> +#include "os_support.h"
> +#include "rtsp.h"
again
> +void get_word_sep(char *buf, int buf_size, const char *sep,
> + const char **pp)
indentation
> +{
> + if (**pp == '/') (*pp)++;
Please break the line.
> --- /dev/null
> +++ b/libavformat/rtspdec.c
> @@ -0,0 +1,361 @@
> +int tcp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,
> + uint8_t *buf, int buf_size)
indentation
Diego
More information about the ffmpeg-devel
mailing list