FFmpeg: libavformat/concatdec.c Source File
Go to the documentation of this file. 1 /*
2 * Copyright (c) 2012 Nicolas George
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 License
8 * 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
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with FFmpeg; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
36
41
46
62
63 typedef struct {
76
78 {
79 return memcmp(
probe->buf,
"ffconcat version 1.0", 20) ?
81 }
82
84 {
87 if (**cursor) {
88 *((*cursor)++) = 0;
90 }
92 }
93
95 {
96 const char *start =
f;
97
99 /* A-Za-z0-9_- */
100 if (!((
unsigned)((*
f | 32) -
'a') < 26 ||
101 (
unsigned)(*
f -
'0') < 10 || *
f ==
'_' || *
f ==
'-')) {
103 return 0;
107 return 0;
108 }
109 }
110 return 1;
111 }
112
113 #define FAIL(retcode) do { ret = (retcode); goto fail; } while(0)
114
116 unsigned *nb_files_alloc)
117 {
121 const char *proto;
122 const char *ptr;
123 size_t url_len;
125
129 }
130
133 (*ptr == ':' || *ptr == ',')) {
134 url = filename;
136 } else {
137 url_len = strlen(avf->
url) + strlen(filename) + 16;
142 }
143
144 if (
cat->nb_files >= *nb_files_alloc) {
145 size_t n =
FFMAX(*nb_files_alloc * 2, 16);
147 if (n <= cat->nb_files || n > SIZE_MAX /
sizeof(*
cat->files) ||
150 cat->files = new_files;
151 *nb_files_alloc = n;
152 }
153
154 file = &
cat->files[
cat->nb_files++];
155 memset(file, 0, sizeof(*file));
156 *rfile = file;
157
165
166 return 0;
167
172 }
173
175 {
177
184 }
188 return 0;
189 }
196
198 return 0;
199 }
200
202 {
209
214 return 0;
216 "Auto-inserting h264_mp4toannexb bitstream filter\n");
220 "required for H.264 streams\n");
222 }
227
231
235
239 }
240 return 0;
241 }
242
244 {
248
252 } else {
255 }
258 cat->cur_file->streams[
i].out_stream_index =
i;
259 }
260 return 0;
261 }
262
264 {
268
270 st =
cat->avf->streams[
i];
274 "Match slave stream #%d with stream #%d id 0x%x\n",
278 cat->cur_file->streams[
i].out_stream_index = j;
279 }
280 }
281 }
282 return 0;
283 }
284
286 {
290
291 if (
cat->cur_file->nb_streams >=
cat->avf->nb_streams)
292 return 0;
294 cat->avf->nb_streams *
sizeof(*
map));
297 cat->cur_file->streams =
map;
298 memset(
map +
cat->cur_file->nb_streams, 0,
299 (
cat->avf->nb_streams -
cat->cur_file->nb_streams) *
sizeof(*
map));
300
302 map[
i].out_stream_index = -1;
305 }
306 switch (
cat->stream_match_mode) {
309 break;
312 break;
313 default:
315 }
318 cat->cur_file->nb_streams =
cat->avf->nb_streams;
319 return 0;
320 }
321
323 {
333 }
334
336 {
341
344
348
351
354
358
365 }
368 /* TODO log unused options once we have a proper string API */
370 }
371 cat->cur_file = file;
373 cat->files[fileno - 1].start_time +
374 cat->files[fileno - 1].duration;
378
379 if (
cat->segment_time_metadata) {
383 }
384
390 }
391 return 0;
392 }
393
395 {
398
399 for (
i = 0;
i <
cat->nb_files;
i++) {
401 for (j = 0; j <
cat->files[
i].nb_streams; j++) {
402 if (
cat->files[
i].streams[j].bsf)
404 }
408 }
412 return 0;
413 }
414
416 #define NEEDS_UNSAFE (1 << 0)
417 #define NEEDS_FILE (1 << 1)
418 #define NEEDS_STREAM (1 << 2)
419
425
442
458 };
459
461 {
463 unsigned nb_files_alloc = 0;
464 AVBPrint bp;
465 uint8_t *cursor, *keyword;
475
477
480 cursor = bp.str;
482 if (!*keyword || *keyword == '#')
483 continue;
485 if (!strcmp(dir->
keyword, keyword))
486 break;
491 }
492
493 /* Flags check */
497 }
501 }
505 }
506
507 /* Arguments parsing */
510 case 'd': /* duration */
517 }
518 break;
519 case 'i': /* integer */
521 break;
522 case 'k': /* keyword */
524 break;
525 case 's': /* string */
530 if (!*arg_str[
arg]) {
533 }
534 break;
535 default:
537 }
538 }
539
540 /* Directive action */
542
544 if (strcmp(arg_kw[0], "version") || strcmp(arg_kw[1], "1.0")) {
547 }
548 break;
549
551 ret =
add_file(avf, arg_str[0], &file, &nb_files_alloc);
555 break;
556
559 break;
560
563 break;
564
567 break;
568
574 break;
575
580 }
582 "'file_packet_metadata key=value:key=value' is deprecated, "
583 "use multiple 'file_packet_meta key value' instead\n");
585 break;
586
592 break;
593
596 if (!stream)
598 break;
599
601 stream->
id = arg_int[0];
602 break;
608 break;
609
612 if (!codec) {
615 }
618 break;
619 }
620
627 break;
628 }
629
632 arg_int[1], arg_int[2],
NULL);
633 if (!chapter)
635 break;
636
637 default:
639 }
640 }
641
642 if (!file) {
645 }
646
651 }
652
658 }
659
661 {
666
670 if (!
cat->nb_files) {
673 }
674
675 for (
i = 0;
i <
cat->nb_files;
i++) {
677 cat->files[
i].start_time = time;
678 else
679 time =
cat->files[
i].start_time;
683 )
684 break;
685 cat->files[
i].user_duration =
cat->files[
i].outpoint -
cat->files[
i].inpoint;
686 }
687 cat->files[
i].duration =
cat->files[
i].user_duration;
688 if (time + (uint64_t)
cat->files[
i].user_duration > INT64_MAX)
690 time +=
cat->files[
i].user_duration;
691 }
692 if (
i ==
cat->nb_files) {
695 }
696
701
702 return 0;
703 }
704
706 {
708 unsigned fileno =
cat->cur_file -
cat->files;
709
711
712 if (++fileno >=
cat->nb_files) {
715 }
717 }
718
720 {
722
727 "failed to send input packet\n");
729 }
730
733
736 "failed to receive output packet\n");
738 }
739 }
740 return 0;
741 }
742
743 /* Returns true if the packet dts is greater or equal to the specified outpoint. */
745 {
749 }
750 return 0;
751 }
752
754 {
761
764
767
768 while (1) {
773 continue;
774 }
779 }
784 continue;
785 }
789 continue;
790 }
791 break;
792 }
795
802
813 if (
cat->cur_file->metadata) {
814 size_t metadata_len;
816 if (!packed_metadata)
819 packed_metadata, metadata_len);
823 }
824 }
825
829 cat->cur_file->next_dts = next_dts;
830 }
831 }
832
834 return 0;
835 }
836
839 {
841 int64_t t0 =
cat->cur_file->start_time -
cat->cur_file->file_inpoint;
842
843 ts -= t0;
844 min_ts = min_ts == INT64_MIN ? INT64_MIN : min_ts - t0;
845 max_ts = max_ts == INT64_MAX ? INT64_MAX : max_ts - t0;
846 if (stream >= 0) {
847 if (stream >=
cat->avf->nb_streams)
850 &min_ts, &ts, &max_ts);
851 }
853 }
854
857 {
860
861 if (stream >= 0) {
865 &min_ts, &ts, &max_ts);
866 }
867
869 right =
cat->nb_files;
870
871 /* Always support seek to start */
872 if (ts <= 0)
873 right = 1;
874 else if (!
cat->seekable)
875 return AVERROR(ESPIPE);
/* XXX: can we use it? */
876
877 while (right -
left > 1) {
878 int mid = (
left + right) / 2;
880 right = mid;
881 else
883 }
884
888 } else {
890 }
891
894 left < cat->nb_files - 1 &&
895 cat->files[
left + 1].start_time < max_ts) {
901 }
903 }
904
907 {
912
916 if ((
ret =
real_seek(avf, stream, min_ts, ts, max_ts,
flags, cur_avf_saved)) < 0) {
917 if (
cat->cur_file != cur_file_saved) {
920 }
921 cat->avf = cur_avf_saved;
922 cat->cur_file = cur_file_saved;
923 } else {
924 if (
cat->cur_file != cur_file_saved) {
926 }
928 }
930 }
931
932 #define OFFSET(x) offsetof(ConcatContext, x)
933 #define DEC AV_OPT_FLAG_DECODING_PARAM
934
936 { "safe", "enable safe mode",
938 { "auto_convert", "automatically convert bitstream format",
940 { "segment_time_metadata", "output file segment start time and duration as packet metadata",
943 };
944
950 };
951
952
964 };
AVChapter * avpriv_new_chapter(AVFormatContext *s, int64_t id, AVRational time_base, int64_t start, int64_t end, const char *title)
Add a new chapter.
static int add_file(AVFormatContext *avf, char *filename, ConcatFile **rfile, unsigned *nb_files_alloc)
static int real_seek(AVFormatContext *avf, int stream, int64_t min_ts, int64_t ts, int64_t max_ts, int flags, AVFormatContext *cur_avf)
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
AVCodecParameters * par_in
Parameters of the input stream.
#define AV_LOG_WARNING
Something somehow does not look correct.
#define AV_BPRINT_SIZE_UNLIMITED
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
static int packet_after_outpoint(ConcatContext *cat, AVPacket *pkt)
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
enum AVMediaType codec_type
General type of the encoded data.
int av_compare_ts(int64_t ts_a, AVRational tb_a, int64_t ts_b, AVRational tb_b)
Compare two timestamps each in its own time base.
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
int segment_time_metadata
AVStream * avformat_new_stream(AVFormatContext *s, const struct AVCodec *c)
Add a new stream to a media file.
#define AVERROR_EOF
End of file.
#define AV_TIME_BASE_Q
Internal time base represented as fractional value.
static int64_t get_best_effort_duration(ConcatFile *file, AVFormatContext *avf)
AVStream ** streams
A list of all streams in the file.
int64_t ff_read_line_to_bprint_overwrite(AVIOContext *s, struct AVBPrint *bp)
Read a whole line of text from AVIOContext to an AVBPrint buffer overwriting its contents.
AVRational avg_frame_rate
Average framerate.
ConcatMatchMode stream_match_mode
static int open_next_file(AVFormatContext *avf)
static int concat_parse_script(AVFormatContext *avf)
#define AV_LOG_VERBOSE
Detailed information.
static int concat_probe(const AVProbeData *probe)
void(* filter)(uint8_t *src, int stride, int qscale)
int av_read_frame(AVFormatContext *s, AVPacket *pkt)
Return the next frame of a stream.
void av_bsf_free(AVBSFContext **pctx)
Free a bitstream filter context and everything associated with it; write NULL into the supplied point...
The bitstream filter state.
void avformat_close_input(AVFormatContext **s)
Close an opened input AVFormatContext.
AVIOInterruptCB interrupt_callback
Custom interrupt callbacks for the I/O layer.
int av_packet_add_side_data(AVPacket *pkt, enum AVPacketSideDataType type, uint8_t *data, size_t size)
Wrap an existing array as a packet side data.
static int concat_read_header(AVFormatContext *avf)
static int match_streams_exact_id(AVFormatContext *avf)
static int filter_packet(AVFormatContext *avf, ConcatStream *cs, AVPacket *pkt)
static av_cold int read_close(AVFormatContext *ctx)
AVCodecParameters * par_out
Parameters of the output stream.
static int concat_read_packet(AVFormatContext *avf, AVPacket *pkt)
#define AV_DICT_DONT_STRDUP_VAL
Take ownership of a value that's been allocated with av_malloc() or another memory allocation functio...
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define FF_ARRAY_ELEMS(a)
static char * get_keyword(uint8_t **cursor)
int avformat_open_input(AVFormatContext **ps, const char *url, const AVInputFormat *fmt, AVDictionary **options)
Open an input stream and read the header.
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
This struct describes the properties of a single codec described by an AVCodecID.
static int copy_stream_props(AVStream *st, AVStream *source_st)
int flags
Flags modifying the (de)muxer behaviour.
#define av_assert0(cond)
assert() equivalent, that is always enabled.
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
int av_bsf_alloc(const AVBitStreamFilter *filter, AVBSFContext **pctx)
Allocate a context for a given bitstream filter.
#define FF_INFMT_FLAG_INIT_CLEANUP
For an FFInputFormat with this flag set read_close() needs to be called by the caller upon read_heade...
static const AVOption options[]
AVCodecParameters * codecpar
Codec parameters associated with this stream.
static int open_file(AVFormatContext *avf, unsigned fileno)
#define LIBAVUTIL_VERSION_INT
int av_bsf_init(AVBSFContext *ctx)
Prepare the filter for use, after all the parameters and options have been set.
Describe the class of an AVClass context structure.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
int av_bsf_receive_packet(AVBSFContext *ctx, AVPacket *pkt)
Retrieve a filtered packet.
const char * av_default_item_name(void *ptr)
Return the context name.
AVIOContext * pb
I/O context.
#define AVERROR_BSF_NOT_FOUND
Bitstream filter not found.
This structure contains the data a format has to probe a file.
void ff_rescale_interval(AVRational tb_in, AVRational tb_out, int64_t *min_ts, int64_t *ts, int64_t *max_ts)
Rescales a timestamp and the endpoints of an interval to which the temstamp belongs,...
int av_parse_time(int64_t *timeval, const char *timestr, int duration)
Parse timestr and return in *time a corresponding number of microseconds.
int extradata_size
Size of the extradata content in bytes.
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
Read packets of a media file to get stream information.
#define av_ts2timestr(ts, tb)
Convenience macro, the return value should be used only directly in function arguments but never stan...
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
AVFormatContext * avformat_alloc_context(void)
Allocate an AVFormatContext.
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt)
Submit a packet for filtering.
static int try_seek(AVFormatContext *avf, int stream, int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
static int64_t start_time
char * url
input or output URL.
int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
Seek to timestamp ts.
#define AV_NOPTS_VALUE
Undefined timestamp value.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_RB32
static int match_streams_one_to_one(AVFormatContext *avf)
static const AVClass concat_class
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown)
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed.
uint8_t * av_packet_pack_dictionary(AVDictionary *dict, size_t *size)
Pack a dictionary for use in side_data.
void av_dict_free(AVDictionary **pm)
Free all the memory allocated for an AVDictionary struct and all keys and values.
static int read_header(FFV1Context *f, RangeCoder *c)
int av_strstart(const char *str, const char *pfx, const char **ptr)
Return non-zero if pfx is a prefix of str.
#define AV_LOG_INFO
Standard information.
static int safe_filename(const char *f)
@ AV_PKT_DATA_STRINGS_METADATA
A list of zero terminated key/value strings.
#define i(width, name, range_min, range_max)
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
const FFInputFormat ff_concat_demuxer
Writing a table generator This documentation is preliminary Parts of the API are not good and should be changed Basic concepts A table generator consists of two files
int id
Format-specific stream ID.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
Tag MUST be and< 10hcoeff half pel interpolation filter coefficients, hcoeff[0] are the 2 middle coefficients[1] are the next outer ones and so on, resulting in a filter like:...eff[2], hcoeff[1], hcoeff[0], hcoeff[0], hcoeff[1], hcoeff[2] ... the sign of the coefficients is not explicitly stored but alternates after each coeff and coeff[0] is positive, so ...,+,-,+,-,+,+,-,+,-,+,... hcoeff[0] is not explicitly stored but found by subtracting the sum of all stored coefficients with signs from 32 hcoeff[0]=32 - hcoeff[1] - hcoeff[2] - ... a good choice for hcoeff and htaps is htaps=6 hcoeff={40,-10, 2} an alternative which requires more computations at both encoder and decoder side and may or may not be better is htaps=8 hcoeff={42,-14, 6,-2}ref_frames minimum of the number of available reference frames and max_ref_frames for example the first frame after a key frame always has ref_frames=1spatial_decomposition_type wavelet type 0 is a 9/7 symmetric compact integer wavelet 1 is a 5/3 symmetric compact integer wavelet others are reserved stored as delta from last, last is reset to 0 if always_reset||keyframeqlog quality(logarithmic quantizer scale) stored as delta from last, last is reset to 0 if always_reset||keyframemv_scale stored as delta from last, last is reset to 0 if always_reset||keyframe FIXME check that everything works fine if this changes between framesqbias dequantization bias stored as delta from last, last is reset to 0 if always_reset||keyframeblock_max_depth maximum depth of the block tree stored as delta from last, last is reset to 0 if always_reset||keyframequant_table quantization tableHighlevel bitstream structure:==============================--------------------------------------------|Header|--------------------------------------------|------------------------------------|||Block0||||split?||||yes no||||......... intra?||||:Block01 :yes no||||:Block02 :....... ..........||||:Block03 ::y DC ::ref index:||||:Block04 ::cb DC ::motion x :||||......... :cr DC ::motion y :||||....... ..........|||------------------------------------||------------------------------------|||Block1|||...|--------------------------------------------|------------ ------------ ------------|||Y subbands||Cb subbands||Cr subbands||||--- ---||--- ---||--- ---|||||LL0||HL0||||LL0||HL0||||LL0||HL0|||||--- ---||--- ---||--- ---||||--- ---||--- ---||--- ---|||||LH0||HH0||||LH0||HH0||||LH0||HH0|||||--- ---||--- ---||--- ---||||--- ---||--- ---||--- ---|||||HL1||LH1||||HL1||LH1||||HL1||LH1|||||--- ---||--- ---||--- ---||||--- ---||--- ---||--- ---|||||HH1||HL2||||HH1||HL2||||HH1||HL2|||||...||...||...|||------------ ------------ ------------|--------------------------------------------Decoding process:=================------------|||Subbands|------------||||------------|Intra DC||||LL0 subband prediction ------------|\ Dequantization ------------------- \||Reference frames|\ IDWT|------- -------|Motion \|||Frame 0||Frame 1||Compensation . OBMC v -------|------- -------|--------------. \------> Frame n output Frame Frame<----------------------------------/|...|------------------- Range Coder:============Binary Range Coder:------------------- The implemented range coder is an adapted version based upon "Range encoding: an algorithm for removing redundancy from a digitised message." by G. N. N. Martin. The symbols encoded by the Snow range coder are bits(0|1). The associated probabilities are not fix but change depending on the symbol mix seen so far. bit seen|new state ---------+----------------------------------------------- 0|256 - state_transition_table[256 - old_state];1|state_transition_table[old_state];state_transition_table={ 0, 0, 0, 0, 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 190, 191, 192, 194, 194, 195, 196, 197, 198, 199, 200, 201, 202, 202, 204, 205, 206, 207, 208, 209, 209, 210, 211, 212, 213, 215, 215, 216, 217, 218, 219, 220, 220, 222, 223, 224, 225, 226, 227, 227, 229, 229, 230, 231, 232, 234, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 248, 0, 0, 0, 0, 0, 0, 0};FIXME Range Coding of integers:------------------------- FIXME Neighboring Blocks:===================left and top are set to the respective blocks unless they are outside of the image in which case they are set to the Null block top-left is set to the top left block unless it is outside of the image in which case it is set to the left block if this block has no larger parent block or it is at the left side of its parent block and the top right block is not outside of the image then the top right block is used for top-right else the top-left block is used Null block y, cb, cr are 128 level, ref, mx and my are 0 Motion Vector Prediction:=========================1. the motion vectors of all the neighboring blocks are scaled to compensate for the difference of reference frames scaled_mv=(mv *(256 *(current_reference+1)/(mv.reference+1))+128)> the median of the scaled left
static const ParseSyntax syntax[]
static int probe(const AVProbeData *p)
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...
int av_dict_parse_string(AVDictionary **pm, const char *str, const char *key_val_sep, const char *pairs_sep, int flags)
Parse the key/value pairs list and add the parsed entries to a dictionary.
AVRational r_frame_rate
Real base framerate of the stream.
int64_t duration
Duration of the stream, in AV_TIME_BASE fractional seconds.
#define AVERROR_DECODER_NOT_FOUND
Decoder not found.
int av_dict_set_int(AVDictionary **pm, const char *key, int64_t value, int flags)
Convenience wrapper for av_dict_set() that converts the value to a string and stores it.
static int detect_stream_specific(AVFormatContext *avf, int idx)
static int read_probe(const AVProbeData *p)
const VDPAUPixFmtMap * map
int ff_make_absolute_url(char *buf, int size, const char *base, const char *rel)
Convert a relative url into an absolute url, given a base url.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
int av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags)
Copy entries from one AVDictionary struct into another.
const char * avio_find_protocol_name(const char *url)
Return the name of the protocol that will handle the passed URL.
#define AVERROR_BUG
Internal bug, also see AVERROR_BUG2.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define av_ts2str(ts)
Convenience macro, the return value should be used only directly in function arguments but never stan...
static int concat_seek(AVFormatContext *avf, int stream, int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_RB24
const AVCodecDescriptor * avcodec_descriptor_get_by_name(const char *name)
static int match_streams(AVFormatContext *avf)
void * priv_data
Format private data.
static int concat_read_close(AVFormatContext *avf)
int avcodec_parameters_copy(AVCodecParameters *dst, const AVCodecParameters *src)
Copy the contents of src to dst.
void * av_realloc(void *ptr, size_t size)
Allocate, reallocate, or free a block of memory.
const AVBitStreamFilter * av_bsf_get_by_name(const char *name)
Generated on Fri Oct 17 2025 19:23:19 for FFmpeg by
doxygen
1.8.17