diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-04-09 03:09:49 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-04-09 03:17:07 +0200 |
commit | d4d09329eef30787da699c7a397b00f6f96940bc (patch) | |
tree | 3605d4e30063b924254a373e270026bca6436f11 /libavformat/url.h | |
parent | a61bc91d42945e6ccefef4867ef32d2073f8f8c7 (diff) | |
parent | 0c68c804196400de3c40c8849124b292ed62b99c (diff) | |
download | ffmpeg-d4d09329eef30787da699c7a397b00f6f96940bc.tar.gz |
Merge remote branch 'qatar/master'
* qatar/master:
lavf: bump minor and add an APIChanges entry for avformat cleanup
lavf: get rid of ffm-specific stuff in avformat.h
Not pulled: avio: deprecate av_protocol_next().
avio: add a function for iterating though protocol names.
lavf: rename a parameter of av_sdp_create from buff->buf
lavf: rename avf_sdp_create to av_sdp_create.
lavf: make av_guess_image2_codec internal
avio: make URLProtocol internal.
avio: make URLContext internal.
lavf: mark av_pkt_dump(_log) for remove on $next+1 bump.
lavf: use designated initializers for all protocols
applehttp: don't use deprecated url_ functions.
avio: move two ff_udp_* functions from avio_internal to url.h
asfdec: remove a forgotten declaration of nonexistent function
avio: deprecate the typedef for URLInterruptCB
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/url.h')
-rw-r--r-- | libavformat/url.h | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/libavformat/url.h b/libavformat/url.h index 9f97db594f..3f96f73763 100644 --- a/libavformat/url.h +++ b/libavformat/url.h @@ -31,7 +31,35 @@ #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 */ -extern URLInterruptCB *url_interrupt_cb; +extern int (*url_interrupt_cb)(void); + +typedef struct URLContext { + const AVClass *av_class; /**< information for av_log(). Set by url_open(). */ + struct URLProtocol *prot; + void *priv_data; + char *filename; /**< specified URL */ + int flags; + int max_packet_size; /**< if non zero, the stream is packetized with this max packet size */ + int is_streamed; /**< true if streamed (no seek possible), default = false */ + int is_connected; +} URLContext; + +typedef struct URLProtocol { + const char *name; + int (*url_open)( URLContext *h, const char *url, int flags); + int (*url_read)( URLContext *h, unsigned char *buf, int size); + int (*url_write)(URLContext *h, const unsigned char *buf, int size); + int64_t (*url_seek)( URLContext *h, int64_t pos, int whence); + int (*url_close)(URLContext *h); + struct URLProtocol *next; + int (*url_read_pause)(URLContext *h, int pause); + int64_t (*url_read_seek)(URLContext *h, int stream_index, + int64_t timestamp, int flags); + int (*url_get_file_handle)(URLContext *h); + int priv_data_size; + const AVClass *priv_data_class; + int flags; +} URLProtocol; #endif /** @@ -140,4 +168,8 @@ int ffurl_get_file_handle(URLContext *h); */ int ffurl_register_protocol(URLProtocol *protocol, int size); +/* udp.c */ +int ff_udp_set_remote_url(URLContext *h, const char *uri); +int ff_udp_get_local_port(URLContext *h); + #endif //AVFORMAT_URL_H |