diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-04-20 06:48:23 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-04-20 06:48:23 +0400 |
commit | efb5fa79f5ca34140db357a00c999286097ab53e (patch) | |
tree | 16cc9f34b25abc571f7a9915ff98ff2bb787203c /libavformat/avio.h | |
parent | f92b0084c0e02b3c816a9eb234c548487acadae8 (diff) | |
parent | 31d76ec2883c04d29d1f173ea99e605a6936613a (diff) |
Merge remote branch 'qatar/master'
* qatar/master: (37 commits)
In avcodec_open(), set return code to an error value only when an error occurs instead of unconditionally at the start of the function.
lavc: remove reference to opt.h from Makefile.
prefer avio_check() over url_exist()
avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols
lavu: remove misc disabled cruft
lavu: remove FF_API_OLD_IMAGE_NAMES cruft
NOT PULLED lavu: remove FF_API_OLD_EVAL_NAMES cruft
lavc: remove misc disabled cruft.
lavc: remove the FF_API_INOFFICIAL cruft.
lavc: remove the FF_API_SET_STRING_OLD cruft.
lavc: remove the FF_API_USE_LPC cruft.
lavc: remove the FF_API_SUBTITLE_OLD cruft.
lavc: remove the FF_API_VIDEO_OLD cruft.
lavc: remove the FF_API_AUDIO_OLD cruft.
lavc: remove the FF_API_OPT_SHOW cruft.
lavc: remove the FF_API_MM_FLAGS cruft.
lavf: remove misc disabled cruft.
lavf: remove FF_API_INDEX_BUILT cruft
lavf: remove FF_API_URL_CLASS cruft.
lavf: remove FF_API_SYMVER cruft
...
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/avio.h')
-rw-r--r-- | libavformat/avio.h | 51 |
1 files changed, 4 insertions, 47 deletions
diff --git a/libavformat/avio.h b/libavformat/avio.h index 9d805822d4..ba4fc2351b 100644 --- a/libavformat/avio.h +++ b/libavformat/avio.h @@ -101,9 +101,7 @@ typedef struct { * @deprecated This struct will be made private */ typedef struct URLContext { -#if FF_API_URL_CLASS const AVClass *av_class; ///< information for av_log(). Set by url_open(). -#endif struct URLProtocol *prot; int flags; int is_streamed; /**< true if streamed (no seek possible), default = false */ @@ -346,7 +344,7 @@ attribute_deprecated int url_exist(const char *url); #endif // FF_API_OLD_AVIO /** - * Return AVIO_* access flags corresponding to the access permissions + * Return AVIO_FLAG_* access flags corresponding to the access permissions * of the resource in url, or a negative value corresponding to an * AVERROR code in case of failure. The returned access flags are * masked by the value in flags. @@ -356,9 +354,6 @@ attribute_deprecated int url_exist(const char *url); * one call to another. Thus you should not trust the returned value, * unless you are sure that no other processes are accessing the * checked resource. - * - * @note This function is slightly broken until next major bump - * because of AVIO_RDONLY == 0. Don't use it until then. */ int avio_check(const char *url, int flags); @@ -370,22 +365,6 @@ int avio_check(const char *url, int flags); */ void avio_set_interrupt_cb(int (*interrupt_cb)(void)); -#if FF_API_REGISTER_PROTOCOL -extern URLProtocol *first_protocol; -#endif - -#if FF_API_REGISTER_PROTOCOL -/** - * @deprecated Use av_register_protocol() instead. - */ -attribute_deprecated int register_protocol(URLProtocol *protocol); - -/** - * @deprecated Use av_register_protocol2() instead. - */ -attribute_deprecated int av_register_protocol(URLProtocol *protocol); -#endif - /** * Allocate and initialize an AVIOContext for buffered I/O. It must be later * freed with av_free(). @@ -542,29 +521,15 @@ int avio_get_str16le(AVIOContext *pb, int maxlen, char *buf, int buflen); int avio_get_str16be(AVIOContext *pb, int maxlen, char *buf, int buflen); -#if FF_API_URL_RESETBUF -/** Reset the buffer for reading or writing. - * @note Will drop any data currently in the buffer without transmitting it. - * @param flags URL_RDONLY to set up the buffer for reading, or URL_WRONLY - * to set up the buffer for writing. */ -int url_resetbuf(AVIOContext *s, int flags); -#endif - /** * @defgroup open_modes URL open modes * The flags argument to avio_open must be one of the following * constants, optionally ORed with other flags. * @{ */ -#if LIBAVFORMAT_VERSION_MAJOR < 53 -#define AVIO_RDONLY 0 /**< read-only */ -#define AVIO_WRONLY 1 /**< write-only */ -#define AVIO_RDWR 2 /**< read-write */ -#else -#define AVIO_RDONLY 1 /**< read-only */ -#define AVIO_WRONLY 2 /**< write-only */ -#define AVIO_RDWR 4 /**< read-write */ -#endif +#define AVIO_FLAG_READ 1 /**< read-only */ +#define AVIO_FLAG_WRITE 2 /**< write-only */ +#define AVIO_FLAG_READ_WRITE (AVIO_FLAG_READ|AVIO_FLAG_WRITE) /**< read-write pseudo flag */ /** * @} */ @@ -581,11 +546,7 @@ int url_resetbuf(AVIOContext *s, int flags); * Warning: non-blocking protocols is work-in-progress; this flag may be * silently ignored. */ -#if LIBAVFORMAT_VERSION_MAJOR < 53 -#define AVIO_FLAG_NONBLOCK 4 -#else #define AVIO_FLAG_NONBLOCK 8 -#endif /** * Create and initialize a AVIOContext for accessing the @@ -629,10 +590,6 @@ int avio_open_dyn_buf(AVIOContext **s); */ int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer); -#if FF_API_UDP_GET_FILE -int udp_get_file_handle(URLContext *h); -#endif - /** * Iterate through names of available protocols. * @note it is recommanded to use av_protocol_next() instead of this |