[FFmpeg-devel] [PATCH 06/16] lavf: remove FF_API_GUESS_FORMAT cruft

Anton Khirnov anton
Thu Feb 3 16:36:33 CET 2011


---
 libavformat/avformat.h |   12 ------------
 libavformat/utils.c    |   29 -----------------------------
 libavformat/version.h  |    3 ---
 3 files changed, 0 insertions(+), 44 deletions(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 2f304de..014f9f8 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -833,18 +833,6 @@ enum CodecID av_guess_image2_codec(const char *filename);
 /* utils.c */
 void av_register_input_format(AVInputFormat *format);
 void av_register_output_format(AVOutputFormat *format);
-#if FF_API_GUESS_FORMAT
-attribute_deprecated AVOutputFormat *guess_stream_format(const char *short_name,
-                                    const char *filename,
-                                    const char *mime_type);
-
-/**
- * @deprecated Use av_guess_format() instead.
- */
-attribute_deprecated AVOutputFormat *guess_format(const char *short_name,
-                                                  const char *filename,
-                                                  const char *mime_type);
-#endif
 
 /**
  * Return the output format in the list of registered output formats
diff --git a/libavformat/utils.c b/libavformat/utils.c
index ab2067a..93fd71f 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -195,14 +195,6 @@ static int match_format(const char *name, const char *names)
     return !strcasecmp(name, names);
 }
 
-#if FF_API_GUESS_FORMAT
-AVOutputFormat *guess_format(const char *short_name, const char *filename,
-                             const char *mime_type)
-{
-    return av_guess_format(short_name, filename, mime_type);
-}
-#endif
-
 AVOutputFormat *av_guess_format(const char *short_name, const char *filename,
                                 const char *mime_type)
 {
@@ -238,27 +230,6 @@ AVOutputFormat *av_guess_format(const char *short_name, const char *filename,
     return fmt_found;
 }
 
-#if FF_API_GUESS_FORMAT
-AVOutputFormat *guess_stream_format(const char *short_name, const char *filename,
-                             const char *mime_type)
-{
-    AVOutputFormat *fmt = av_guess_format(short_name, filename, mime_type);
-
-    if (fmt) {
-        AVOutputFormat *stream_fmt;
-        char stream_format_name[64];
-
-        snprintf(stream_format_name, sizeof(stream_format_name), "%s_stream", fmt->name);
-        stream_fmt = av_guess_format(stream_format_name, NULL, NULL);
-
-        if (stream_fmt)
-            fmt = stream_fmt;
-    }
-
-    return fmt;
-}
-#endif
-
 enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,
                             const char *filename, const char *mime_type, enum AVMediaType type){
     if(type == AVMEDIA_TYPE_VIDEO){
diff --git a/libavformat/version.h b/libavformat/version.h
index db8ed2e..7bceac8 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -44,9 +44,6 @@
 #ifndef FF_API_URL_CLASS
 #define FF_API_URL_CLASS               (LIBAVFORMAT_VERSION_MAJOR >= 53)
 #endif
-#ifndef FF_API_GUESS_FORMAT
-#define FF_API_GUESS_FORMAT            (LIBAVFORMAT_VERSION_MAJOR < 53)
-#endif
 #ifndef FF_API_UDP_GET_FILE
 #define FF_API_UDP_GET_FILE            (LIBAVFORMAT_VERSION_MAJOR < 53)
 #endif
-- 
1.7.2.3




More information about the ffmpeg-devel mailing list