Go to the documentation of this file.
26 #include "config_components.h"
36 #define AV_CAT_SEPARATOR "|"
57 for (
i = 0;
i !=
data->length;
i++)
62 return err < 0 ? -1 : 0;
65 #if CONFIG_CONCAT_PROTOCOL
68 char *node_uri =
NULL;
81 for (
i = 0,
len = 1; uri[
i];
i++) {
95 for (
i = 0; *uri;
i++) {
105 &
h->interrupt_callback,
NULL,
h->protocol_whitelist,
h->protocol_blacklist,
h);
126 else if (!(nodes =
av_realloc(nodes,
data->length *
sizeof(*nodes)))) {
131 data->total_size = total_size;
141 size_t i =
data->current;
146 if (
i + 1 ==
data->length ||
152 return total ? total :
result;
158 return total ? total :
result;
169 return data->total_size;
177 for (
i = 0;
i !=
data->current;
i++)
199 #if CONFIG_CONCAT_PROTOCOL
202 .url_open = concat_open,
207 .default_whitelist =
"concat,file,subfile",
211 #if CONFIG_CONCATF_PROTOCOL
219 unsigned int nodes_size = 0;
233 NULL,
h->protocol_whitelist,
h->protocol_blacklist);
252 int leading_spaces = strspn(cursor,
" \n\t\r");
254 if (!cursor[leading_spaces])
265 if (++
len == SIZE_MAX /
sizeof(*nodes)) {
273 &
h->interrupt_callback,
NULL,
h->protocol_whitelist,
h->protocol_blacklist,
h);
306 data->total_size = total_size;
312 .url_open = concatf_open,
317 .default_whitelist =
"concatf,concat,file,subfile",
static int64_t ffurl_seek(URLContext *h, int64_t pos, int whence)
Change the position that will be used by the next read/write operation on the resource accessed by h.
int ffio_open_whitelist(AVIOContext **s, const char *filename, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options, const char *whitelist, const char *blacklist)
#define AV_BPRINT_SIZE_UNLIMITED
size_t length
number of cat'ed nodes
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
#define AVERROR_EOF
End of file.
#define AVSEEK_SIZE
ORing this as the "whence" parameter to a seek function causes it to return the filesize without seek...
int ffurl_close(URLContext *h)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int ffurl_open_whitelist(URLContext **puc, const char *filename, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options, const char *whitelist, const char *blacklist, URLContext *parent)
Create an URLContext for accessing to the resource indicated by url, and open it.
void * av_fast_realloc(void *ptr, unsigned int *size, size_t min_size)
Reallocate the given buffer if it is not large enough, otherwise do nothing.
int avio_read_to_bprint(AVIOContext *h, struct AVBPrint *pb, size_t max_size)
Read contents of h into print buffer, up to max_size bytes, or up to EOF.
void * av_realloc_array(void *ptr, size_t nmemb, size_t size)
const URLProtocol ff_concat_protocol
and forward the result(frame or status change) to the corresponding input. If nothing is possible
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
struct concat_nodes * nodes
list of nodes to concat
int av_reallocp(void *ptr, size_t size)
Allocate, reallocate, or free a block of memory through a pointer to a pointer.
static int concat_read(URLContext *h, unsigned char *buf, int size)
int av_strstart(const char *str, const char *pfx, const char **ptr)
Return non-zero if pfx is a prefix of str.
const URLProtocol ff_concatf_protocol
#define i(width, name, range_min, range_max)
size_t current
index of currently read node
int ffurl_closep(URLContext **hh)
Close the resource accessed by the URLContext h, and free the memory used by it.
static int64_t concat_seek(URLContext *h, int64_t pos, int whence)
URLContext * uc
node's URLContext
char * av_get_token(const char **buf, const char *term)
Unescape the given string until a non escaped terminating char, and return the token corresponding to...
#define AVIO_FLAG_READ
read-only
int avio_closep(AVIOContext **s)
Close the resource accessed by the AVIOContext *s, free it and set the pointer pointing to it to NULL...
#define flags(name, subs,...)
size_t av_strlcpy(char *dst, const char *src, size_t size)
Copy the string src to dst, but no more than size - 1 bytes, and null-terminate dst.
int64_t ffurl_size(URLContext *h)
Return the filesize of the resource accessed by h, AVERROR(ENOSYS) if the operation is not supported ...
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static av_cold int concat_close(URLContext *h)
void * av_realloc(void *ptr, size_t size)
Allocate, reallocate, or free a block of memory.
static int ffurl_read(URLContext *h, uint8_t *buf, int size)
Read up to size bytes from the resource accessed by h, and store the read bytes in buf.