1 /*
2 * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
23
26
27 /**
28 * @file
29 * Options definition for AVFormatContext.
30 */
31
35
37 {
41 else return "NULL";
42 }
43
45 {
54 }
55
57 {
60
61 if (!prev)
63
64 while ((ifmt = av_iformat_next(ifmt)))
66 break;
67
68 if (!ifmt)
69 while ((ofmt = av_oformat_next(ofmt)))
71 break;
72 if (!ofmt)
73 while (ifmt = av_iformat_next(ifmt))
76
77 while (ofmt = av_oformat_next(ofmt))
80
82 }
83
85 {
89 }
90
100 };
101
104 {
105 int loglevel;
106
107 if (!strcmp(url, s->
url) ||
110 ) {
112 } else
114
115 av_log(s, loglevel,
"Opening \'%s\' for %s\n", url, flags &
AVIO_FLAG_WRITE ?
"writing" :
"reading");
116
117 #if FF_API_OLD_OPEN_CALLBACKS
119 if (s->open_cb)
122 #endif
123
125 }
126
128 {
130 }
131
133 {
135
137
140
142 }
143
145 {
148 if (!ic) return ic;
150
155 }
159
160 return ic;
161 }
162
164 {
166 }
167
169 {
171 }
AVIOInterruptCB interrupt_callback
Custom interrupt callbacks for the I/O layer.
enum AVDurationEstimationMethod duration_estimation_method
The duration field can be estimated through various ways, and this field can be used to know how the ...
#define LIBAVUTIL_VERSION_INT
void av_opt_set_defaults(void *s)
Set the values of all AVOption fields to their default values.
AVFormatInternal * internal
An opaque field for libavformat internal usage.
#define AVIO_FLAG_WRITE
write-only
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
const AVClass * av_class
A class for private options.
AVFormatContext * avformat_alloc_context(void)
Allocate an AVFormatContext.
char * protocol_whitelist
',' separated list of allowed protocols.
const AVClass ff_avio_class
const AVClass * avformat_get_class(void)
Get the AVClass for AVFormatContext.
struct AVOutputFormat * oformat
The output container format.
int avio_close(AVIOContext *s)
Close the resource accessed by the AVIOContext s and free it.
char * url
input or output URL.
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
AVClassCategory category
Category used for visualization (like color) This is only set if the category is equal for all object...
common internal API header
static const uint16_t fc[]
static const AVOption options[]
#define AV_LOG_INFO
Standard information.
AVIOContext * pb
I/O context.
Describe the class of an AVClass context structure.
const AVClass * av_class
A class for logging and AVOptions.
void avformat_free_context(AVFormatContext *s)
Free an AVFormatContext and all its streams.
int ffio_open_whitelist(AVIOContext **s, const char *url, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options, const char *whitelist, const char *blacklist)
#define FF_DISABLE_DEPRECATION_WARNINGS
struct AVInputFormat * iformat
The input container format.
#define FF_ENABLE_DEPRECATION_WARNINGS
void * priv_data
Format private data.
char * protocol_blacklist
',' separated list of disallowed protocols.
int(* io_open)(struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags, AVDictionary **options)
A callback for opening new IO streams.
void(* io_close)(struct AVFormatContext *s, AVIOContext *pb)
A callback for closing the streams opened with AVFormatContext.io_open().
#define AV_NOPTS_VALUE
Undefined timestamp value.