[FFmpeg-cvslog] lavf: rename ff_probe_input_buffer to make it public
Anssi Hannula
git
Wed Feb 9 04:00:12 CET 2011
ffmpeg | branch: master | Anssi Hannula <anssi.hannula at iki.fi> | Tue Feb 8 00:46:53 2011 +0200| [070e5ba560b86d8b0de72536d9e861b215d7ee20] | committer: Michael Niedermayer
lavf: rename ff_probe_input_buffer to make it public
It is useful for applications that hand input data directly to lavf via
a ByteIOContext.
Signed-off-by: Ronald S. Bultje <rsbultje at gmail.com>
(cherry picked from commit 3940caad02fbc4f075e77bc605849b1d84ba1b8e)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=070e5ba560b86d8b0de72536d9e861b215d7ee20
---
doc/APIchanges | 4 ++++
libavformat/avformat.h | 19 +++++++++++++++++++
libavformat/internal.h | 19 -------------------
libavformat/utils.c | 4 ++--
libavformat/version.h | 2 +-
5 files changed, 26 insertions(+), 22 deletions(-)
diff --git a/doc/APIchanges b/doc/APIchanges
index 3c6c6d3..e7cd1c1 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -13,6 +13,10 @@ libavutil: 2009-03-08
API changes, most recent first:
+2011-02-08 - xxxxxxx - lavf 52.98.0 - av_probe_input_buffer
+ Add av_probe_input_buffer() to avformat.h for probing format from a
+ ByteIOContext.
+
2011-02-06 - fe174fc - lavf 52.97.0 - avio.h
Add flag for non-blocking protocols: URL_FLAG_NONBLOCK
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 66b220f..aeaf902 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1041,6 +1041,25 @@ AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened);
AVInputFormat *av_probe_input_format2(AVProbeData *pd, int is_opened, int *score_max);
/**
+ * Probe a bytestream to determine the input format. Each time a probe returns
+ * with a score that is too low, the probe buffer size is increased and another
+ * attempt is made. When the maximum probe size is reached, the input format
+ * with the highest score is returned.
+ *
+ * @param pb the bytestream to probe
+ * @param fmt the input format is put here
+ * @param filename the filename of the stream
+ * @param logctx the log context
+ * @param offset the offset within the bytestream to probe from
+ * @param max_probe_size the maximum probe buffer size (zero for default)
+ * @return 0 in case of success, a negative value corresponding to an
+ * AVERROR code otherwise
+ */
+int av_probe_input_buffer(ByteIOContext *pb, AVInputFormat **fmt,
+ const char *filename, void *logctx,
+ unsigned int offset, unsigned int max_probe_size);
+
+/**
* Allocate all the structures needed to read an input stream.
* This does not open the needed codecs for decoding the stream[s].
*/
diff --git a/libavformat/internal.h b/libavformat/internal.h
index fc4ee21..2fdf61f 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -82,25 +82,6 @@ void ff_read_frame_flush(AVFormatContext *s);
/** Get the current time since NTP epoch in microseconds. */
uint64_t ff_ntp_time(void);
-/**
- * Probe a bytestream to determine the input format. Each time a probe returns
- * with a score that is too low, the probe buffer size is increased and another
- * attempt is made. When the maximum probe size is reached, the input format
- * with the highest score is returned.
- *
- * @param pb the bytestream to probe
- * @param fmt the input format is put here
- * @param filename the filename of the stream
- * @param logctx the log context
- * @param offset the offset within the bytestream to probe from
- * @param max_probe_size the maximum probe buffer size (zero for default)
- * @return 0 in case of success, a negative value corresponding to an
- * AVERROR code otherwise
- */
-int ff_probe_input_buffer(ByteIOContext *pb, AVInputFormat **fmt,
- const char *filename, void *logctx,
- unsigned int offset, unsigned int max_probe_size);
-
#if FF_API_URL_SPLIT
/**
* @deprecated use av_url_split() instead
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 505c2db..8c3311f 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -524,7 +524,7 @@ int av_open_input_stream(AVFormatContext **ic_ptr,
#define PROBE_BUF_MIN 2048
#define PROBE_BUF_MAX (1<<20)
-int ff_probe_input_buffer(ByteIOContext *pb, AVInputFormat **fmt,
+int av_probe_input_buffer(ByteIOContext *pb, AVInputFormat **fmt,
const char *filename, void *logctx,
unsigned int offset, unsigned int max_probe_size)
{
@@ -622,7 +622,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
if (buf_size > 0) {
url_setbufsize(pb, buf_size);
}
- if (!fmt && (err = ff_probe_input_buffer(pb, &fmt, filename, logctx, 0, logctx ? (*ic_ptr)->probesize : 0)) < 0) {
+ if (!fmt && (err = av_probe_input_buffer(pb, &fmt, filename, logctx, 0, logctx ? (*ic_ptr)->probesize : 0)) < 0) {
goto fail;
}
}
diff --git a/libavformat/version.h b/libavformat/version.h
index 603d7cf..e1abaa7 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -24,7 +24,7 @@
#include "libavutil/avutil.h"
#define LIBAVFORMAT_VERSION_MAJOR 52
-#define LIBAVFORMAT_VERSION_MINOR 97
+#define LIBAVFORMAT_VERSION_MINOR 98
#define LIBAVFORMAT_VERSION_MICRO 0
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
More information about the ffmpeg-cvslog
mailing list