Mercurial > libavformat.hg
comparison avformat.h @ 1858:7ce72baa2ce5 libavformat
Doxygenize the existing comments in avformat.h. The contents of the comments
were left unaltered.
author | takis |
---|---|
date | Mon, 05 Mar 2007 00:23:23 +0000 |
parents | 2c91663b3bc6 |
children | ae5e54fb2206 |
comparison
equal
deleted
inserted
replaced
1857:17893fe08372 | 1858:7ce72baa2ce5 |
---|---|
88 * @param size wanted payload size | 88 * @param size wanted payload size |
89 * @return >0 (read size) if OK. AVERROR_xxx otherwise. | 89 * @return >0 (read size) if OK. AVERROR_xxx otherwise. |
90 */ | 90 */ |
91 int av_get_packet(ByteIOContext *s, AVPacket *pkt, int size); | 91 int av_get_packet(ByteIOContext *s, AVPacket *pkt, int size); |
92 | 92 |
93 /* This is a hack - the packet memory allocation stuff is broken. The | 93 /** |
94 packet is allocated if it was not really allocated */ | 94 * @warning This is a hack - the packet memory allocation stuff is broken. The |
95 * packet is allocated if it was not really allocated | |
96 */ | |
95 int av_dup_packet(AVPacket *pkt); | 97 int av_dup_packet(AVPacket *pkt); |
96 | 98 |
97 /** | 99 /** |
98 * Free a packet | 100 * Free a packet |
99 * | 101 * |
120 | 122 |
121 struct AVCodecTag; | 123 struct AVCodecTag; |
122 | 124 |
123 struct AVFormatContext; | 125 struct AVFormatContext; |
124 | 126 |
125 /* this structure contains the data a format has to probe a file */ | 127 /** this structure contains the data a format has to probe a file */ |
126 typedef struct AVProbeData { | 128 typedef struct AVProbeData { |
127 const char *filename; | 129 const char *filename; |
128 unsigned char *buf; | 130 unsigned char *buf; |
129 int buf_size; | 131 int buf_size; |
130 } AVProbeData; | 132 } AVProbeData; |
136 int sample_rate; | 138 int sample_rate; |
137 int channels; | 139 int channels; |
138 int width; | 140 int width; |
139 int height; | 141 int height; |
140 enum PixelFormat pix_fmt; | 142 enum PixelFormat pix_fmt; |
141 int channel; /* used to select dv channel */ | 143 int channel; /**< used to select dv channel */ |
142 #if LIBAVFORMAT_VERSION_INT < (52<<16) | 144 #if LIBAVFORMAT_VERSION_INT < (52<<16) |
143 const char *device; /* video, audio or DV device */ | 145 const char *device; /**< video, audio or DV device */ |
144 #endif | 146 #endif |
145 const char *standard; /* tv standard, NTSC, PAL, SECAM */ | 147 const char *standard; /**< tv standard, NTSC, PAL, SECAM */ |
146 int mpeg2ts_raw:1; /* force raw MPEG2 transport stream output, if possible */ | 148 int mpeg2ts_raw:1; /**< force raw MPEG2 transport stream output, if possible */ |
147 int mpeg2ts_compute_pcr:1; /* compute exact PCR for each transport | 149 int mpeg2ts_compute_pcr:1; /**< compute exact PCR for each transport |
148 stream packet (only meaningful if | 150 stream packet (only meaningful if |
149 mpeg2ts_raw is TRUE */ | 151 mpeg2ts_raw is TRUE */ |
150 int initial_pause:1; /* do not begin to play the stream | 152 int initial_pause:1; /**< do not begin to play the stream |
151 immediately (RTSP only) */ | 153 immediately (RTSP only) */ |
152 int prealloced_context:1; | 154 int prealloced_context:1; |
153 enum CodecID video_codec_id; | 155 enum CodecID video_codec_id; |
154 enum CodecID audio_codec_id; | 156 enum CodecID audio_codec_id; |
155 } AVFormatParameters; | 157 } AVFormatParameters; |
156 | 158 |
157 //! demuxer will use url_fopen, no opened file should be provided by the caller | 159 //! demuxer will use url_fopen, no opened file should be provided by the caller |
158 #define AVFMT_NOFILE 0x0001 | 160 #define AVFMT_NOFILE 0x0001 |
159 #define AVFMT_NEEDNUMBER 0x0002 /* needs '%d' in filename */ | 161 #define AVFMT_NEEDNUMBER 0x0002 /**< needs '%d' in filename */ |
160 #define AVFMT_SHOW_IDS 0x0008 /* show format stream IDs numbers */ | 162 #define AVFMT_SHOW_IDS 0x0008 /**< show format stream IDs numbers */ |
161 #define AVFMT_RAWPICTURE 0x0020 /* format wants AVPicture structure for | 163 #define AVFMT_RAWPICTURE 0x0020 /**< format wants AVPicture structure for |
162 raw picture data */ | 164 raw picture data */ |
163 #define AVFMT_GLOBALHEADER 0x0040 /* format wants global header */ | 165 #define AVFMT_GLOBALHEADER 0x0040 /**< format wants global header */ |
164 #define AVFMT_NOTIMESTAMPS 0x0080 /* format doesnt need / has any timestamps */ | 166 #define AVFMT_NOTIMESTAMPS 0x0080 /**< format doesnt need / has any timestamps */ |
165 #define AVFMT_GENERIC_INDEX 0x0100 /* use generic index building code */ | 167 #define AVFMT_GENERIC_INDEX 0x0100 /**< use generic index building code */ |
166 | 168 |
167 typedef struct AVOutputFormat { | 169 typedef struct AVOutputFormat { |
168 const char *name; | 170 const char *name; |
169 const char *long_name; | 171 const char *long_name; |
170 const char *mime_type; | 172 const char *mime_type; |
171 const char *extensions; /* comma separated extensions */ | 173 const char *extensions; /**< comma separated extensions */ |
172 /* size of private data so that it can be allocated in the wrapper */ | 174 /** size of private data so that it can be allocated in the wrapper */ |
173 int priv_data_size; | 175 int priv_data_size; |
174 /* output support */ | 176 /* output support */ |
175 enum CodecID audio_codec; /* default audio codec */ | 177 enum CodecID audio_codec; /**< default audio codec */ |
176 enum CodecID video_codec; /* default video codec */ | 178 enum CodecID video_codec; /**< default video codec */ |
177 int (*write_header)(struct AVFormatContext *); | 179 int (*write_header)(struct AVFormatContext *); |
178 int (*write_packet)(struct AVFormatContext *, AVPacket *pkt); | 180 int (*write_packet)(struct AVFormatContext *, AVPacket *pkt); |
179 int (*write_trailer)(struct AVFormatContext *); | 181 int (*write_trailer)(struct AVFormatContext *); |
180 /* can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_GLOBALHEADER */ | 182 /** can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_GLOBALHEADER */ |
181 int flags; | 183 int flags; |
182 /* currently only used to set pixel format if not YUV420P */ | 184 /** currently only used to set pixel format if not YUV420P */ |
183 int (*set_parameters)(struct AVFormatContext *, AVFormatParameters *); | 185 int (*set_parameters)(struct AVFormatContext *, AVFormatParameters *); |
184 int (*interleave_packet)(struct AVFormatContext *, AVPacket *out, AVPacket *in, int flush); | 186 int (*interleave_packet)(struct AVFormatContext *, AVPacket *out, AVPacket *in, int flush); |
185 | 187 |
186 /** | 188 /** |
187 * list of supported codec_id-codec_tag pairs, ordered by "better choice first" | 189 * list of supported codec_id-codec_tag pairs, ordered by "better choice first" |
194 } AVOutputFormat; | 196 } AVOutputFormat; |
195 | 197 |
196 typedef struct AVInputFormat { | 198 typedef struct AVInputFormat { |
197 const char *name; | 199 const char *name; |
198 const char *long_name; | 200 const char *long_name; |
199 /* size of private data so that it can be allocated in the wrapper */ | 201 /** size of private data so that it can be allocated in the wrapper */ |
200 int priv_data_size; | 202 int priv_data_size; |
201 /* tell if a given file has a chance of being parsing by this format */ | 203 /** tell if a given file has a chance of being parsing by this format */ |
202 int (*read_probe)(AVProbeData *); | 204 int (*read_probe)(AVProbeData *); |
203 /* read the format header and initialize the AVFormatContext | 205 /** read the format header and initialize the AVFormatContext |
204 structure. Return 0 if OK. 'ap' if non NULL contains | 206 structure. Return 0 if OK. 'ap' if non NULL contains |
205 additionnal paramters. Only used in raw format right | 207 additionnal paramters. Only used in raw format right |
206 now. 'av_new_stream' should be called to create new streams. */ | 208 now. 'av_new_stream' should be called to create new streams. */ |
207 int (*read_header)(struct AVFormatContext *, | 209 int (*read_header)(struct AVFormatContext *, |
208 AVFormatParameters *ap); | 210 AVFormatParameters *ap); |
209 /* read one packet and put it in 'pkt'. pts and flags are also | 211 /** read one packet and put it in 'pkt'. pts and flags are also |
210 set. 'av_new_stream' can be called only if the flag | 212 set. 'av_new_stream' can be called only if the flag |
211 AVFMTCTX_NOHEADER is used. */ | 213 AVFMTCTX_NOHEADER is used. */ |
212 int (*read_packet)(struct AVFormatContext *, AVPacket *pkt); | 214 int (*read_packet)(struct AVFormatContext *, AVPacket *pkt); |
213 /* close the stream. The AVFormatContext and AVStreams are not | 215 /** close the stream. The AVFormatContext and AVStreams are not |
214 freed by this function */ | 216 freed by this function */ |
215 int (*read_close)(struct AVFormatContext *); | 217 int (*read_close)(struct AVFormatContext *); |
216 /** | 218 /** |
217 * seek to a given timestamp relative to the frames in | 219 * seek to a given timestamp relative to the frames in |
218 * stream component stream_index | 220 * stream component stream_index |
225 /** | 227 /** |
226 * gets the next timestamp in AV_TIME_BASE units. | 228 * gets the next timestamp in AV_TIME_BASE units. |
227 */ | 229 */ |
228 int64_t (*read_timestamp)(struct AVFormatContext *s, int stream_index, | 230 int64_t (*read_timestamp)(struct AVFormatContext *s, int stream_index, |
229 int64_t *pos, int64_t pos_limit); | 231 int64_t *pos, int64_t pos_limit); |
230 /* can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER */ | 232 /** can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER */ |
231 int flags; | 233 int flags; |
232 /* if extensions are defined, then no probe is done. You should | 234 /** if extensions are defined, then no probe is done. You should |
233 usually not use extension format guessing because it is not | 235 usually not use extension format guessing because it is not |
234 reliable enough */ | 236 reliable enough */ |
235 const char *extensions; | 237 const char *extensions; |
236 /* general purpose read only value that the format can use */ | 238 /** general purpose read only value that the format can use */ |
237 int value; | 239 int value; |
238 | 240 |
239 /* start/resume playing - only meaningful if using a network based format | 241 /** start/resume playing - only meaningful if using a network based format |
240 (RTSP) */ | 242 (RTSP) */ |
241 int (*read_play)(struct AVFormatContext *); | 243 int (*read_play)(struct AVFormatContext *); |
242 | 244 |
243 /* pause playing - only meaningful if using a network based format | 245 /** pause playing - only meaningful if using a network based format |
244 (RTSP) */ | 246 (RTSP) */ |
245 int (*read_pause)(struct AVFormatContext *); | 247 int (*read_pause)(struct AVFormatContext *); |
246 | 248 |
247 const struct AVCodecTag **codec_tag; | 249 const struct AVCodecTag **codec_tag; |
248 | 250 |
254 int64_t pos; | 256 int64_t pos; |
255 int64_t timestamp; | 257 int64_t timestamp; |
256 #define AVINDEX_KEYFRAME 0x0001 | 258 #define AVINDEX_KEYFRAME 0x0001 |
257 int flags:2; | 259 int flags:2; |
258 int size:30; //yeah trying to keep the size of this small to reduce memory requirements (its 24 vs 32 byte due to possible 8byte align) | 260 int size:30; //yeah trying to keep the size of this small to reduce memory requirements (its 24 vs 32 byte due to possible 8byte align) |
259 int min_distance; /* min distance between this and the previous keyframe, used to avoid unneeded searching */ | 261 int min_distance; /**< min distance between this and the previous keyframe, used to avoid unneeded searching */ |
260 } AVIndexEntry; | 262 } AVIndexEntry; |
261 | 263 |
262 typedef struct AVStream { | 264 typedef struct AVStream { |
263 int index; /* stream index in AVFormatContext */ | 265 int index; /**< stream index in AVFormatContext */ |
264 int id; /* format specific stream id */ | 266 int id; /**< format specific stream id */ |
265 AVCodecContext *codec; /* codec context */ | 267 AVCodecContext *codec; /**< codec context */ |
266 /** | 268 /** |
267 * real base frame rate of the stream. | 269 * real base frame rate of the stream. |
268 * this is the lowest framerate with which all timestamps can be | 270 * this is the lowest framerate with which all timestamps can be |
269 * represented accurately (its the least common multiple of all | 271 * represented accurately (its the least common multiple of all |
270 * framerates in the stream), Note, this value is just a guess! | 272 * framerates in the stream), Note, this value is just a guess! |
274 AVRational r_frame_rate; | 276 AVRational r_frame_rate; |
275 void *priv_data; | 277 void *priv_data; |
276 /* internal data used in av_find_stream_info() */ | 278 /* internal data used in av_find_stream_info() */ |
277 int64_t codec_info_duration; | 279 int64_t codec_info_duration; |
278 int codec_info_nb_frames; | 280 int codec_info_nb_frames; |
279 /* encoding: PTS generation when outputing stream */ | 281 /** encoding: PTS generation when outputing stream */ |
280 AVFrac pts; | 282 AVFrac pts; |
281 | 283 |
282 /** | 284 /** |
283 * this is the fundamental unit of time (in seconds) in terms | 285 * this is the fundamental unit of time (in seconds) in terms |
284 * of which frame timestamps are represented. for fixed-fps content, | 286 * of which frame timestamps are represented. for fixed-fps content, |
285 * timebase should be 1/framerate and timestamp increments should be | 287 * timebase should be 1/framerate and timestamp increments should be |
286 * identically 1. | 288 * identically 1. |
287 */ | 289 */ |
288 AVRational time_base; | 290 AVRational time_base; |
289 int pts_wrap_bits; /* number of bits in pts (used for wrapping control) */ | 291 int pts_wrap_bits; /**< number of bits in pts (used for wrapping control) */ |
290 /* ffmpeg.c private use */ | 292 /* ffmpeg.c private use */ |
291 int stream_copy; /* if TRUE, just copy stream */ | 293 int stream_copy; /* *<if TRUE, just copy stream */ |
292 enum AVDiscard discard; ///< selects which packets can be discarded at will and dont need to be demuxed | 294 enum AVDiscard discard; ///< selects which packets can be discarded at will and dont need to be demuxed |
293 //FIXME move stuff to a flags field? | 295 //FIXME move stuff to a flags field? |
294 /* quality, as it has been removed from AVCodecContext and put in AVVideoFrame | 296 /** quality, as it has been removed from AVCodecContext and put in AVVideoFrame |
295 * MN:dunno if thats the right place, for it */ | 297 * MN:dunno if thats the right place, for it */ |
296 float quality; | 298 float quality; |
297 /* decoding: position of the first frame of the component, in | 299 /** decoding: position of the first frame of the component, in |
298 AV_TIME_BASE fractional seconds. */ | 300 AV_TIME_BASE fractional seconds. */ |
299 int64_t start_time; | 301 int64_t start_time; |
300 /* decoding: duration of the stream, in AV_TIME_BASE fractional | 302 /** decoding: duration of the stream, in AV_TIME_BASE fractional |
301 seconds. */ | 303 seconds. */ |
302 int64_t duration; | 304 int64_t duration; |
303 | 305 |
304 char language[4]; /* ISO 639 3-letter language code (empty string if undefined) */ | 306 char language[4]; /** ISO 639 3-letter language code (empty string if undefined) */ |
305 | 307 |
306 /* av_read_frame() support */ | 308 /* av_read_frame() support */ |
307 int need_parsing; ///< 1->full parsing needed, 2->only parse headers dont repack | 309 int need_parsing; ///< 1->full parsing needed, 2->only parse headers dont repack |
308 struct AVCodecParserContext *parser; | 310 struct AVCodecParserContext *parser; |
309 | 311 |
310 int64_t cur_dts; | 312 int64_t cur_dts; |
311 int last_IP_duration; | 313 int last_IP_duration; |
312 int64_t last_IP_pts; | 314 int64_t last_IP_pts; |
313 /* av_seek_frame() support */ | 315 /* av_seek_frame() support */ |
314 AVIndexEntry *index_entries; /* only used if the format does not | 316 AVIndexEntry *index_entries; /**< only used if the format does not |
315 support seeking natively */ | 317 support seeking natively */ |
316 int nb_index_entries; | 318 int nb_index_entries; |
317 unsigned int index_entries_allocated_size; | 319 unsigned int index_entries_allocated_size; |
318 | 320 |
319 int64_t nb_frames; ///< number of frames in this stream if known or 0 | 321 int64_t nb_frames; ///< number of frames in this stream if known or 0 |
320 | 322 |
321 #define MAX_REORDER_DELAY 4 | 323 #define MAX_REORDER_DELAY 4 |
322 int64_t pts_buffer[MAX_REORDER_DELAY+1]; | 324 int64_t pts_buffer[MAX_REORDER_DELAY+1]; |
323 } AVStream; | 325 } AVStream; |
324 | 326 |
325 #define AVFMTCTX_NOHEADER 0x0001 /* signal that no header is present | 327 #define AVFMTCTX_NOHEADER 0x0001 /**< signal that no header is present |
326 (streams are added dynamically) */ | 328 (streams are added dynamically) */ |
327 | 329 |
328 #define MAX_STREAMS 20 | 330 #define MAX_STREAMS 20 |
329 | 331 |
330 /* format I/O context */ | 332 /* format I/O context */ |
331 typedef struct AVFormatContext { | 333 typedef struct AVFormatContext { |
332 const AVClass *av_class; /* set by av_alloc_format_context */ | 334 const AVClass *av_class; /**< set by av_alloc_format_context */ |
333 /* can only be iformat or oformat, not both at the same time */ | 335 /* can only be iformat or oformat, not both at the same time */ |
334 struct AVInputFormat *iformat; | 336 struct AVInputFormat *iformat; |
335 struct AVOutputFormat *oformat; | 337 struct AVOutputFormat *oformat; |
336 void *priv_data; | 338 void *priv_data; |
337 ByteIOContext pb; | 339 ByteIOContext pb; |
338 unsigned int nb_streams; | 340 unsigned int nb_streams; |
339 AVStream *streams[MAX_STREAMS]; | 341 AVStream *streams[MAX_STREAMS]; |
340 char filename[1024]; /* input or output filename */ | 342 char filename[1024]; /**< input or output filename */ |
341 /* stream info */ | 343 /* stream info */ |
342 int64_t timestamp; | 344 int64_t timestamp; |
343 char title[512]; | 345 char title[512]; |
344 char author[512]; | 346 char author[512]; |
345 char copyright[512]; | 347 char copyright[512]; |
346 char comment[512]; | 348 char comment[512]; |
347 char album[512]; | 349 char album[512]; |
348 int year; /* ID3 year, 0 if none */ | 350 int year; /**< ID3 year, 0 if none */ |
349 int track; /* track number, 0 if none */ | 351 int track; /**< track number, 0 if none */ |
350 char genre[32]; /* ID3 genre */ | 352 char genre[32]; /**< ID3 genre */ |
351 | 353 |
352 int ctx_flags; /* format specific flags, see AVFMTCTX_xx */ | 354 int ctx_flags; /**< format specific flags, see AVFMTCTX_xx */ |
353 /* private data for pts handling (do not modify directly) */ | 355 /* private data for pts handling (do not modify directly) */ |
354 /* This buffer is only needed when packets were already buffered but | 356 /** This buffer is only needed when packets were already buffered but |
355 not decoded, for example to get the codec parameters in mpeg | 357 not decoded, for example to get the codec parameters in mpeg |
356 streams */ | 358 streams */ |
357 struct AVPacketList *packet_buffer; | 359 struct AVPacketList *packet_buffer; |
358 | 360 |
359 /* decoding: position of the first frame of the component, in | 361 /** decoding: position of the first frame of the component, in |
360 AV_TIME_BASE fractional seconds. NEVER set this value directly: | 362 AV_TIME_BASE fractional seconds. NEVER set this value directly: |
361 it is deduced from the AVStream values. */ | 363 it is deduced from the AVStream values. */ |
362 int64_t start_time; | 364 int64_t start_time; |
363 /* decoding: duration of the stream, in AV_TIME_BASE fractional | 365 /** decoding: duration of the stream, in AV_TIME_BASE fractional |
364 seconds. NEVER set this value directly: it is deduced from the | 366 seconds. NEVER set this value directly: it is deduced from the |
365 AVStream values. */ | 367 AVStream values. */ |
366 int64_t duration; | 368 int64_t duration; |
367 /* decoding: total file size. 0 if unknown */ | 369 /** decoding: total file size. 0 if unknown */ |
368 int64_t file_size; | 370 int64_t file_size; |
369 /* decoding: total stream bitrate in bit/s, 0 if not | 371 /** decoding: total stream bitrate in bit/s, 0 if not |
370 available. Never set it directly if the file_size and the | 372 available. Never set it directly if the file_size and the |
371 duration are known as ffmpeg can compute it automatically. */ | 373 duration are known as ffmpeg can compute it automatically. */ |
372 int bit_rate; | 374 int bit_rate; |
373 | 375 |
374 /* av_read_frame() support */ | 376 /* av_read_frame() support */ |
376 const uint8_t *cur_ptr; | 378 const uint8_t *cur_ptr; |
377 int cur_len; | 379 int cur_len; |
378 AVPacket cur_pkt; | 380 AVPacket cur_pkt; |
379 | 381 |
380 /* av_seek_frame() support */ | 382 /* av_seek_frame() support */ |
381 int64_t data_offset; /* offset of the first packet */ | 383 int64_t data_offset; /** offset of the first packet */ |
382 int index_built; | 384 int index_built; |
383 | 385 |
384 int mux_rate; | 386 int mux_rate; |
385 int packet_size; | 387 int packet_size; |
386 int preload; | 388 int preload; |
387 int max_delay; | 389 int max_delay; |
388 | 390 |
389 #define AVFMT_NOOUTPUTLOOP -1 | 391 #define AVFMT_NOOUTPUTLOOP -1 |
390 #define AVFMT_INFINITEOUTPUTLOOP 0 | 392 #define AVFMT_INFINITEOUTPUTLOOP 0 |
391 /* number of times to loop output in formats that support it */ | 393 /** number of times to loop output in formats that support it */ |
392 int loop_output; | 394 int loop_output; |
393 | 395 |
394 int flags; | 396 int flags; |
395 #define AVFMT_FLAG_GENPTS 0x0001 ///< generate pts if missing even if it requires parsing future frames | 397 #define AVFMT_FLAG_GENPTS 0x0001 ///< generate pts if missing even if it requires parsing future frames |
396 #define AVFMT_FLAG_IGNIDX 0x0002 ///< ignore index | 398 #define AVFMT_FLAG_IGNIDX 0x0002 ///< ignore index |
397 | 399 |
398 int loop_input; | 400 int loop_input; |
399 /* decoding: size of data to probe; encoding unused */ | 401 /** decoding: size of data to probe; encoding unused */ |
400 unsigned int probesize; | 402 unsigned int probesize; |
401 | 403 |
402 /** | 404 /** |
403 * maximum duration in AV_TIME_BASE units over which the input should be analyzed in av_find_stream_info() | 405 * maximum duration in AV_TIME_BASE units over which the input should be analyzed in av_find_stream_info() |
404 */ | 406 */ |
455 */ | 457 */ |
456 void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload); | 458 void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload); |
457 | 459 |
458 void av_register_all(void); | 460 void av_register_all(void); |
459 | 461 |
460 /* codec tag <-> codec id */ | 462 /** codec tag <-> codec id */ |
461 enum CodecID av_codec_get_id(const struct AVCodecTag **tags, unsigned int tag); | 463 enum CodecID av_codec_get_id(const struct AVCodecTag **tags, unsigned int tag); |
462 unsigned int av_codec_get_tag(const struct AVCodecTag **tags, enum CodecID id); | 464 unsigned int av_codec_get_tag(const struct AVCodecTag **tags, enum CodecID id); |
463 | 465 |
464 /* media file input */ | 466 /* media file input */ |
465 | 467 |
497 */ | 499 */ |
498 int av_open_input_file(AVFormatContext **ic_ptr, const char *filename, | 500 int av_open_input_file(AVFormatContext **ic_ptr, const char *filename, |
499 AVInputFormat *fmt, | 501 AVInputFormat *fmt, |
500 int buf_size, | 502 int buf_size, |
501 AVFormatParameters *ap); | 503 AVFormatParameters *ap); |
502 /* no av_open for output, so applications will need this: */ | 504 /** no av_open for output, so applications will need this: */ |
503 AVFormatContext *av_alloc_format_context(void); | 505 AVFormatContext *av_alloc_format_context(void); |
504 | 506 |
505 /** | 507 /** |
506 * Read packets of a media file to get stream information. This | 508 * Read packets of a media file to get stream information. This |
507 * is useful for file formats with no headers such as MPEG. This | 509 * is useful for file formats with no headers such as MPEG. This |
654 * @param target_ts target timestamp in the time base of the given stream | 656 * @param target_ts target timestamp in the time base of the given stream |
655 * @param stream_index stream number | 657 * @param stream_index stream number |
656 */ | 658 */ |
657 int64_t av_gen_search(AVFormatContext *s, int stream_index, int64_t target_ts, int64_t pos_min, int64_t pos_max, int64_t pos_limit, int64_t ts_min, int64_t ts_max, int flags, int64_t *ts_ret, int64_t (*read_timestamp)(struct AVFormatContext *, int , int64_t *, int64_t )); | 659 int64_t av_gen_search(AVFormatContext *s, int stream_index, int64_t target_ts, int64_t pos_min, int64_t pos_max, int64_t pos_limit, int64_t ts_min, int64_t ts_max, int flags, int64_t *ts_ret, int64_t (*read_timestamp)(struct AVFormatContext *, int , int64_t *, int64_t )); |
658 | 660 |
659 /* media file output */ | 661 /** media file output */ |
660 int av_set_parameters(AVFormatContext *s, AVFormatParameters *ap); | 662 int av_set_parameters(AVFormatContext *s, AVFormatParameters *ap); |
661 | 663 |
662 /** | 664 /** |
663 * allocate the stream private data and write the stream header to an | 665 * allocate the stream private data and write the stream header to an |
664 * output media file | 666 * output media file |