diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-04-06 02:59:49 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-04-06 02:59:49 +0200 |
commit | 11d78415ca1beaa39303c280d7896024edc45aa7 (patch) | |
tree | cea1da5ffc8ae3e09d7375241a1a334e27703610 /libavformat | |
parent | ee6db0de3760ceb7b7a9968a5322c1d8e8e23861 (diff) | |
parent | 5371803dd5d9f7bbc62d68274084d25f10a8dc61 (diff) | |
download | ffmpeg-11d78415ca1beaa39303c280d7896024edc45aa7.tar.gz |
Merge remote branch 'qatar/master'
* qatar/master:
psymodel: extend API to include PE and bit allocation.
avio: always compile dyn_buf functions
Remove unnecessary parameter from ff_thread_init() and fix behavior
Revert "aac_latm_dec: use aac context and aac m4ac"
configure: tell user if libva is enabled like the rest of external libs.
Add silence support for AV_SAMPLE_FMT_U8.
avio: make URL_PROTOCOL_FLAG_NESTED_SCHEME internal
avio: deprecate av_url_read_seek
avio: deprecate av_url_read_pause
ac3enc: NEON optimised extract_exponents
Conflicts:
libavcodec/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/avio.c | 2 | ||||
-rw-r--r-- | libavformat/avio.h | 31 | ||||
-rw-r--r-- | libavformat/avio_internal.h | 22 | ||||
-rw-r--r-- | libavformat/aviobuf.c | 4 | ||||
-rw-r--r-- | libavformat/url.h | 5 |
5 files changed, 33 insertions, 31 deletions
diff --git a/libavformat/avio.c b/libavformat/avio.c index bae080b01c..ddaafc84ea 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -388,6 +388,7 @@ void url_set_interrupt_cb(URLInterruptCB *interrupt_cb) url_interrupt_cb = interrupt_cb; } +#if FF_API_OLD_AVIO int av_url_read_pause(URLContext *h, int pause) { if (!h->prot->url_read_pause) @@ -402,3 +403,4 @@ int64_t av_url_read_seek(URLContext *h, return AVERROR(ENOSYS); return h->prot->url_read_seek(h, stream_index, timestamp, flags); } +#endif diff --git a/libavformat/avio.h b/libavformat/avio.h index 080be91202..dd22acfed7 100644 --- a/libavformat/avio.h +++ b/libavformat/avio.h @@ -114,6 +114,9 @@ attribute_deprecated int64_t url_filesize(URLContext *h); attribute_deprecated int url_get_file_handle(URLContext *h); attribute_deprecated int url_get_max_packet_size(URLContext *h); attribute_deprecated void url_get_filename(URLContext *h, char *buf, int buf_size); +attribute_deprecated int av_url_read_pause(URLContext *h, int pause); +attribute_deprecated int64_t av_url_read_seek(URLContext *h, int stream_index, + int64_t timestamp, int flags); #endif /** @@ -133,36 +136,10 @@ void url_set_interrupt_cb(URLInterruptCB *interrupt_cb); #if FF_API_OLD_AVIO /* not implemented */ attribute_deprecated int url_poll(URLPollEntry *poll_table, int n, int timeout); -#endif - -/** - * Pause and resume playing - only meaningful if using a network streaming - * protocol (e.g. MMS). - * @param pause 1 for pause, 0 for resume - */ -int av_url_read_pause(URLContext *h, int pause); -/** - * Seek to a given timestamp relative to some component stream. - * Only meaningful if using a network streaming protocol (e.g. MMS.). - * @param stream_index The stream index that the timestamp is relative to. - * If stream_index is (-1) the timestamp should be in AV_TIME_BASE - * units from the beginning of the presentation. - * If a stream_index >= 0 is used and the protocol does not support - * seeking based on component streams, the call will fail with ENOTSUP. - * @param timestamp timestamp in AVStream.time_base units - * or if there is no stream specified then in AV_TIME_BASE units. - * @param flags Optional combination of AVSEEK_FLAG_BACKWARD, AVSEEK_FLAG_BYTE - * and AVSEEK_FLAG_ANY. The protocol may silently ignore - * AVSEEK_FLAG_BACKWARD and AVSEEK_FLAG_ANY, but AVSEEK_FLAG_BYTE will - * fail with ENOTSUP if used and not supported. - * @return >= 0 on success - * @see AVInputFormat::read_seek - */ -int64_t av_url_read_seek(URLContext *h, int stream_index, - int64_t timestamp, int flags); #define URL_PROTOCOL_FLAG_NESTED_SCHEME 1 /*< The protocol name can be the first part of a nested protocol scheme */ +#endif typedef struct URLProtocol { const char *name; diff --git a/libavformat/avio_internal.h b/libavformat/avio_internal.h index bf2ddb2daf..0c4bd6950d 100644 --- a/libavformat/avio_internal.h +++ b/libavformat/avio_internal.h @@ -66,7 +66,29 @@ uint64_t ffio_read_varlen(AVIOContext *bc); /** @warning must be called before any I/O */ int ffio_set_buf_size(AVIOContext *s, int buf_size); +/** + * Pause and resume playing - only meaningful if using a network streaming + * protocol (e.g. MMS). + * @param pause 1 for pause, 0 for resume + */ int ffio_read_pause(AVIOContext *h, int pause); +/** + * Seek to a given timestamp relative to some component stream. + * Only meaningful if using a network streaming protocol (e.g. MMS.). + * @param stream_index The stream index that the timestamp is relative to. + * If stream_index is (-1) the timestamp should be in AV_TIME_BASE + * units from the beginning of the presentation. + * If a stream_index >= 0 is used and the protocol does not support + * seeking based on component streams, the call will fail with ENOTSUP. + * @param timestamp timestamp in AVStream.time_base units + * or if there is no stream specified then in AV_TIME_BASE units. + * @param flags Optional combination of AVSEEK_FLAG_BACKWARD, AVSEEK_FLAG_BYTE + * and AVSEEK_FLAG_ANY. The protocol may silently ignore + * AVSEEK_FLAG_BACKWARD and AVSEEK_FLAG_ANY, but AVSEEK_FLAG_BYTE will + * fail with ENOTSUP if used and not supported. + * @return >= 0 on success + * @see AVInputFormat::read_seek + */ int64_t ffio_read_seek (AVIOContext *h, int stream_index, int64_t timestamp, int flags); diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 14051cfc3d..1472380acf 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -1049,9 +1049,6 @@ int64_t ffio_read_seek(AVIOContext *s, int stream_index, return ret; } -/* avio_open_dyn_buf and avio_close_dyn_buf are used in rtp.c to send a response - * back to the server even if CONFIG_MUXERS is false. */ -#if CONFIG_MUXERS || CONFIG_NETWORK /* buffer handling */ #if FF_API_OLD_AVIO int url_open_buf(AVIOContext **s, uint8_t *buf, int buf_size, int flags) @@ -1198,4 +1195,3 @@ int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer) av_free(s); return size - padding; } -#endif /* CONFIG_MUXERS || CONFIG_NETWORK */ diff --git a/libavformat/url.h b/libavformat/url.h index 2110129cb1..97652bb972 100644 --- a/libavformat/url.h +++ b/libavformat/url.h @@ -26,6 +26,11 @@ #define AVFORMAT_URL_H #include "avio.h" +#include "libavformat/version.h" + +#if !FF_API_OLD_AVIO +#define URL_PROTOCOL_FLAG_NESTED_SCHEME 1 /*< The protocol name can be the first part of a nested protocol scheme */ +#endif /** * Create a URLContext for accessing to the resource indicated by |