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
13 13
14API changes, most recent first:14API changes, most recent first:
15 15
162011-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
162011-02-06 - fe174fc - lavf 52.97.0 - avio.h202011-02-06 - fe174fc - lavf 52.97.0 - avio.h
17 Add flag for non-blocking protocols: URL_FLAG_NONBLOCK21 Add flag for non-blocking protocols: URL_FLAG_NONBLOCK
18 22
libavformat/avformat.h+19−0
@@ -1038,6 +1038,25 @@ AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened); · 1037 unmodified lines
1038 */1038 */
1039AVInputFormat *av_probe_input_format2(AVProbeData *pd, int is_opened, int *score_max);1039AVInputFormat *av_probe_input_format2(AVProbeData *pd, int is_opened, int *score_max);
1040 1040
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 */
1056int av_probe_input_buffer(ByteIOContext *pb, AVInputFormat **fmt,
1057 const char *filename, void *logctx,
1058 unsigned int offset, unsigned int max_probe_size);
1059
1041/**1060/**
1042 * Allocate all the structures needed to read an input stream.1061 * Allocate all the structures needed to read an input stream.
1043 * This does not open the needed codecs for decoding the stream[s].1062 * 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
82/** Get the current time since NTP epoch in microseconds. */82/** Get the current time since NTP epoch in microseconds. */
83uint64_t ff_ntp_time(void);83uint64_t ff_ntp_time(void);
84 84
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 */
100int ff_probe_input_buffer(ByteIOContext *pb, AVInputFormat **fmt,
101 const char *filename, void *logctx,
102 unsigned int offset, unsigned int max_probe_size);
103
104#if FF_API_URL_SPLIT85#if FF_API_URL_SPLIT
105/**86/**
106 * @deprecated use av_url_split() instead87 * @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
524#define PROBE_BUF_MIN 2048524#define PROBE_BUF_MIN 2048
525#define PROBE_BUF_MAX (1<<20)525#define PROBE_BUF_MAX (1<<20)
526 526
527int ff_probe_input_buffer(ByteIOContext *pb, AVInputFormat **fmt,527int av_probe_input_buffer(ByteIOContext *pb, AVInputFormat **fmt,
528 const char *filename, void *logctx,528 const char *filename, void *logctx,
529 unsigned int offset, unsigned int max_probe_size)529 unsigned int offset, unsigned int max_probe_size)
530{530{
@@ -622,7 +622,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename, · 91 unmodified lines
622 if (buf_size > 0) {622 if (buf_size > 0) {
623 url_setbufsize(pb, buf_size);623 url_setbufsize(pb, buf_size);
624 }624 }
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) {
626 goto fail;626 goto fail;
627 }627 }
628 }628 }
libavformat/version.h+1−1
@@ -24,7 +24,7 @@ · 23 unmodified lines
24#include "libavutil/avutil.h"24#include "libavutil/avutil.h"
25 25
26#define LIBAVFORMAT_VERSION_MAJOR 5226#define LIBAVFORMAT_VERSION_MAJOR 52
27#define LIBAVFORMAT_VERSION_MINOR 9727#define LIBAVFORMAT_VERSION_MINOR 98
28#define LIBAVFORMAT_VERSION_MICRO 028#define LIBAVFORMAT_VERSION_MICRO 0
29 29
30#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \30#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