[FFmpeg-devel] [PATCH 1/2] lavf: split tls.c
James Almer
jamrial at gmail.com
Fri May 22 20:14:29 CEST 2015
On 22/05/15 10:54 AM, wm4 wrote:
> Move the OpenSSL and GnuTLS implementations to their own files. Other
> than the connection code (including options) and some boilerplate, no
> code is actually shared.
> ---
> This is on top of commit 29216d7fd14d1cec16821867d17c90b5c49e8c07 (aka Libav).
> Sending this to ffmpeg-devel for review as requested by someone.
> ---
> libavformat/Makefile | 4 +-
> libavformat/tls.c | 427 ----------------------------------------------
> libavformat/tls_common.c | 80 +++++++++
> libavformat/tls_common.h | 51 ++++++
> libavformat/tls_gnutls.c | 226 ++++++++++++++++++++++++
> libavformat/tls_openssl.c | 233 +++++++++++++++++++++++++
> 6 files changed, 593 insertions(+), 428 deletions(-)
> delete mode 100644 libavformat/tls.c
> create mode 100644 libavformat/tls_common.c
> create mode 100644 libavformat/tls_common.h
> create mode 100644 libavformat/tls_gnutls.c
> create mode 100644 libavformat/tls_openssl.c
>
> diff --git a/libavformat/Makefile b/libavformat/Makefile
> index 73b9f63..f580d75 100644
> --- a/libavformat/Makefile
> +++ b/libavformat/Makefile
> @@ -372,6 +372,8 @@ OBJS-$(CONFIG_YUV4MPEGPIPE_DEMUXER) += yuv4mpegdec.o
>
> # external libraries
> OBJS-$(CONFIG_LIBRTMP) += librtmp.o
> +OBJS-$(CONFIG_GNUTLS) += tls_gnutls.o
> +OBJS-$(CONFIG_OPENSSL) += tls_openssl.o
These would be built even if the tls protocol is disabled as long as gnutls or openssl
are enabled during configure.
[...]
> diff --git a/libavformat/tls_common.c b/libavformat/tls_common.c
> new file mode 100644
> index 0000000..9950427
> --- /dev/null
> +++ b/libavformat/tls_common.c
Nit: Why not just leave it as tls.c? More in line with other components with a file
containing shared functions.
More information about the ffmpeg-devel
mailing list