[FFmpeg-devel] [PATCH 09/13] lavc: remove the FF_API_SET_STRING_OLD cruft.
Anton Khirnov
anton
Thu Feb 3 16:35:40 CET 2011
---
ffmpeg.c | 2 +-
ffplay.c | 2 +-
ffprobe.c | 2 +-
ffserver.c | 2 +-
libavcodec/Makefile | 2 +-
libavcodec/avcodec.h | 3 ---
libavcodec/opt.c | 17 -----------------
libavcodec/opt.h | 49 -------------------------------------------------
libswscale/options.c | 2 +-
9 files changed, 6 insertions(+), 75 deletions(-)
delete mode 100644 libavcodec/opt.h
diff --git a/ffmpeg.c b/ffmpeg.c
index fac6063..975f66e 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -34,7 +34,6 @@
#include "libavformat/avformat.h"
#include "libavdevice/avdevice.h"
#include "libswscale/swscale.h"
-#include "libavcodec/opt.h"
#include "libavcodec/audioconvert.h"
#include "libavcore/audioconvert.h"
#include "libavcore/parseutils.h"
@@ -45,6 +44,7 @@
#include "libavutil/pixdesc.h"
#include "libavutil/avstring.h"
#include "libavutil/libm.h"
+#include "libavutil/opt.h"
#include "libavformat/os_support.h"
#if CONFIG_AVFILTER
diff --git a/ffplay.c b/ffplay.c
index 1fb7502..8df6f46 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -28,6 +28,7 @@
#include "libavutil/avstring.h"
#include "libavutil/colorspace.h"
#include "libavutil/pixdesc.h"
+#include "libavutil/opt.h"
#include "libavcore/imgutils.h"
#include "libavcore/parseutils.h"
#include "libavcore/samplefmt.h"
@@ -35,7 +36,6 @@
#include "libavdevice/avdevice.h"
#include "libswscale/swscale.h"
#include "libavcodec/audioconvert.h"
-#include "libavcodec/opt.h"
#include "libavcodec/avfft.h"
#if CONFIG_AVFILTER
diff --git a/ffprobe.c b/ffprobe.c
index 2c99e5a..1e74079 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -23,8 +23,8 @@
#include "libavformat/avformat.h"
#include "libavcodec/avcodec.h"
-#include "libavcodec/opt.h"
#include "libavutil/pixdesc.h"
+#include "libavutil/opt.h"
#include "libavdevice/avdevice.h"
#include "cmdutils.h"
diff --git a/ffserver.c b/ffserver.c
index 9a32408..8ac92a5 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -36,8 +36,8 @@
#include "libavutil/avstring.h"
#include "libavutil/lfg.h"
#include "libavutil/random_seed.h"
+#include "libavutil/opt.h"
#include "libavcore/parseutils.h"
-#include "libavcodec/opt.h"
#include <stdarg.h>
#include <unistd.h>
#include <fcntl.h>
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 6a0a05b..0266984 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -3,7 +3,7 @@ include $(SUBDIR)../config.mak
NAME = avcodec
FFLIBS = avcore avutil
-HEADERS = avcodec.h avfft.h dxva2.h opt.h vaapi.h vdpau.h xvmc.h
+HEADERS = avcodec.h avfft.h dxva2.h vaapi.h vdpau.h xvmc.h
OBJS = allcodecs.o \
audioconvert.o \
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 494bcf4..33af187 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -52,9 +52,6 @@
#ifndef FF_API_PALETTE_CONTROL
#define FF_API_PALETTE_CONTROL (LIBAVCODEC_VERSION_MAJOR < 54)
#endif
-#ifndef FF_API_SET_STRING_OLD
-#define FF_API_SET_STRING_OLD (LIBAVCODEC_VERSION_MAJOR < 53)
-#endif
#ifndef FF_API_INOFFICIAL
#define FF_API_INOFFICIAL (LIBAVCODEC_VERSION_MAJOR < 53)
#endif
diff --git a/libavcodec/opt.c b/libavcodec/opt.c
index 92ab323..296d9c2 100644
--- a/libavcodec/opt.c
+++ b/libavcodec/opt.c
@@ -20,7 +20,6 @@
*/
#include "avcodec.h"
-#include "opt.h"
#if LIBAVCODEC_VERSION_MAJOR < 53 && CONFIG_SHARED && HAVE_SYMVER
@@ -64,19 +63,3 @@ FF_SYMVER(void, av_opt_set_defaults2, (void *s, int mask, int flags), "LIBAVCODE
return av_opt_set_defaults2(s, mask, flags);
}
#endif
-
-#if FF_API_SET_STRING_OLD
-const AVOption *av_set_string2(void *obj, const char *name, const char *val, int alloc){
- const AVOption *o;
- if (av_set_string3(obj, name, val, alloc, &o) < 0)
- return NULL;
- return o;
-}
-
-const AVOption *av_set_string(void *obj, const char *name, const char *val){
- const AVOption *o;
- if (av_set_string3(obj, name, val, 0, &o) < 0)
- return NULL;
- return o;
-}
-#endif
diff --git a/libavcodec/opt.h b/libavcodec/opt.h
deleted file mode 100644
index 1c7273a..0000000
--- a/libavcodec/opt.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * AVOptions
- * copyright (c) 2005 Michael Niedermayer <michaelni at gmx.at>
- *
- * 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.1 of the License, or (at your option) any later version.
- *
- * 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 FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef AVCODEC_OPT_H
-#define AVCODEC_OPT_H
-
-/**
- * @file
- * AVOptions
- */
-
-#include "libavutil/rational.h"
-#include "avcodec.h"
-#include "libavutil/opt.h"
-
-#if FF_API_SET_STRING_OLD
-/**
- * @see av_set_string2()
- */
-attribute_deprecated const AVOption *av_set_string(void *obj, const char *name, const char *val);
-
-/**
- * @return a pointer to the AVOption corresponding to the field set or
- * NULL if no matching AVOption exists, or if the value val is not
- * valid
- * @see av_set_string3()
- */
-attribute_deprecated const AVOption *av_set_string2(void *obj, const char *name, const char *val, int alloc);
-#endif
-
-#endif /* AVCODEC_OPT_H */
diff --git a/libswscale/options.c b/libswscale/options.c
index 5817d3f..9ec37e4 100644
--- a/libswscale/options.c
+++ b/libswscale/options.c
@@ -20,7 +20,7 @@
#include "libavutil/avutil.h"
#include "libavutil/pixfmt.h"
-#include "libavcodec/opt.h"
+#include "libavutil/opt.h"
#include "swscale.h"
#include "swscale_internal.h"
--
1.7.2.3
More information about the ffmpeg-devel
mailing list