History

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.

Anssi Hannula committed 15 years ago

Commit 3940caa1 parent aad216f5 files · +26 −22Browse files

Unified · Split

5 files
  1. doc/APIchanges +4 −0
  2. libavformat/avformat.h +19 −0
  3. libavformat/internal.h +0 −19
  4. libavformat/utils.c +2 −2
  5. libavformat/version.h +1 −1
doc/APIchanges+4−0
@@ -13,6 +13,10 @@ libavutil: 2009-03-08 · 12 unmodified lines
1313
1414 API changes, most recent first:
1515
16+2011-02-08 - xxxxxxx - lavf 52.98.0 - av_probe_input_buffer
17+ Add av_probe_input_buffer() to avformat.h for probing format from a
18+ ByteIOContext.
19+
1620 2011-02-06 - fe174fc - lavf 52.97.0 - avio.h
1721 Add flag for non-blocking protocols: URL_FLAG_NONBLOCK
1822
libavformat/avformat.h+19−0
@@ -1038,6 +1038,25 @@ AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened); · 1037 unmodified lines
10381038 */
10391039 AVInputFormat *av_probe_input_format2(AVProbeData *pd, int is_opened, int *score_max);
10401040
1041+/**
1042+ * Probe a bytestream to determine the input format. Each time a probe returns
1043+ * with a score that is too low, the probe buffer size is increased and another
1044+ * attempt is made. When the maximum probe size is reached, the input format
1045+ * with the highest score is returned.
1046+ *
1047+ * @param pb the bytestream to probe
1048+ * @param fmt the input format is put here
1049+ * @param filename the filename of the stream
1050+ * @param logctx the log context
1051+ * @param offset the offset within the bytestream to probe from
1052+ * @param max_probe_size the maximum probe buffer size (zero for default)
1053+ * @return 0 in case of success, a negative value corresponding to an
1054+ * AVERROR code otherwise
1055+ */
1056+int av_probe_input_buffer(ByteIOContext *pb, AVInputFormat **fmt,
1057+ const char *filename, void *logctx,
1058+ unsigned int offset, unsigned int max_probe_size);
1059+
10411060 /**
10421061 * Allocate all the structures needed to read an input stream.
10431062 * This does not open the needed codecs for decoding the stream[s].
libavformat/internal.h+0−19
@@ -82,25 +82,6 @@ void ff_read_frame_flush(AVFormatContext *s); · 81 unmodified lines
8282 /** Get the current time since NTP epoch in microseconds. */
8383 uint64_t ff_ntp_time(void);
8484
85−/**
86− * Probe a bytestream to determine the input format. Each time a probe returns
87− * with a score that is too low, the probe buffer size is increased and another
88− * attempt is made. When the maximum probe size is reached, the input format
89− * with the highest score is returned.
90− *
91− * @param pb the bytestream to probe
92− * @param fmt the input format is put here
93− * @param filename the filename of the stream
94− * @param logctx the log context
95− * @param offset the offset within the bytestream to probe from
96− * @param max_probe_size the maximum probe buffer size (zero for default)
97− * @return 0 in case of success, a negative value corresponding to an
98− * AVERROR code otherwise
99− */
100−int ff_probe_input_buffer(ByteIOContext *pb, AVInputFormat **fmt,
101− const char *filename, void *logctx,
102− unsigned int offset, unsigned int max_probe_size);
103−
10485 #if FF_API_URL_SPLIT
10586 /**
10687 * @deprecated use av_url_split() instead
libavformat/utils.c+2−2
@@ -524,7 +524,7 @@ int av_open_input_stream(AVFormatContext **ic_ptr, · 523 unmodified lines
524524 #define PROBE_BUF_MIN 2048
525525 #define PROBE_BUF_MAX (1<<20)
526526
527−int ff_probe_input_buffer(ByteIOContext *pb, AVInputFormat **fmt,
527+int av_probe_input_buffer(ByteIOContext *pb, AVInputFormat **fmt,
528528 const char *filename, void *logctx,
529529 unsigned int offset, unsigned int max_probe_size)
530530 {
@@ -622,7 +622,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename, · 91 unmodified lines
622622 if (buf_size > 0) {
623623 url_setbufsize(pb, buf_size);
624624 }
625− if (!fmt && (err = ff_probe_input_buffer(pb, &fmt, filename, logctx, 0, logctx ? (*ic_ptr)->probesize : 0)) < 0) {
625+ if (!fmt && (err = av_probe_input_buffer(pb, &fmt, filename, logctx, 0, logctx ? (*ic_ptr)->probesize : 0)) < 0) {
626626 goto fail;
627627 }
628628 }
libavformat/version.h+1−1
@@ -24,7 +24,7 @@ · 23 unmodified lines
2424 #include "libavutil/avutil.h"
2525
2626 #define LIBAVFORMAT_VERSION_MAJOR 52
27−#define LIBAVFORMAT_VERSION_MINOR 97
27+#define LIBAVFORMAT_VERSION_MINOR 98
2828 #define LIBAVFORMAT_VERSION_MICRO 0
2929
3030 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t