From 403ee835e7913eb9536b22c2b22edfdd700166a9 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 17 Mar 2011 08:19:54 +0100 Subject: avio: make url_open_dyn_packet_buf internal. It doesn't look fit to be a part of the public API. Adding a temporary hack to ffserver to be able to use it, should be cleaned up when somebody is up for it. --- libavformat/avio_internal.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libavformat/avio_internal.h') diff --git a/libavformat/avio_internal.h b/libavformat/avio_internal.h index 916de8f..29553ed 100644 --- a/libavformat/avio_internal.h +++ b/libavformat/avio_internal.h @@ -81,4 +81,15 @@ unsigned long ffio_get_checksum(AVIOContext *s); unsigned long ff_crc04C11DB7_update(unsigned long checksum, const uint8_t *buf, unsigned int len); +/** + * Open a write only packetized memory stream with a maximum packet + * size of 'max_packet_size'. The stream is stored in a memory buffer + * with a big endian 4 byte header giving the packet size in bytes. + * + * @param s new IO context + * @param max_packet_size maximum packet size (must be > 0) + * @return zero if no error. + */ +int ffio_open_dyn_packet_buf(AVIOContext **s, int max_packet_size); + #endif // AVFORMAT_AVIO_INTERNAL_H -- cgit v1.1 From 724f6a0fa43f615dcebb2cb16ccb7c60ef7ec95c Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 17 Mar 2011 08:44:44 +0100 Subject: avio: make url_fdopen internal. The unbuffered URLContext API will be made private, so there's no point in this function being public. --- libavformat/avio_internal.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libavformat/avio_internal.h') diff --git a/libavformat/avio_internal.h b/libavformat/avio_internal.h index 29553ed..b0f96cf 100644 --- a/libavformat/avio_internal.h +++ b/libavformat/avio_internal.h @@ -92,4 +92,17 @@ unsigned long ff_crc04C11DB7_update(unsigned long checksum, const uint8_t *buf, */ int ffio_open_dyn_packet_buf(AVIOContext **s, int max_packet_size); +/** + * Create and initialize a AVIOContext for accessing the + * resource referenced by the URLContext h. + * @note When the URLContext h has been opened in read+write mode, the + * AVIOContext can be used only for writing. + * + * @param s Used to return the pointer to the created AVIOContext. + * In case of failure the pointed to value is set to NULL. + * @return 0 in case of success, a negative value corresponding to an + * AVERROR code in case of failure + */ +int ffio_fdopen(AVIOContext **s, URLContext *h); + #endif // AVFORMAT_AVIO_INTERNAL_H -- cgit v1.1