annotate rm.c @ 5836:2997c88028cd libavformat

Move the probe loop from av_open_input_file() into its own method av_probe_input_buffer() so that it can be reused. Here are a few differences to the original way things were probed: - maximum probe buffer size can be specified as a parameter. - offset within the stream to probe from can be specified as a parameter. - instead of seeking back to the start each time a probe fails, stream data is appended to the reallocated buffer. This lowers the amount of data read from the stream (there is no repetition) and results in fewer closed and reopened streams (when seeking fails). New attempt after r22296, which was revert in r22315 due to a FATE failure. See the thread: Subject: [FFmpeg-devel] [PATCH] Move av_open_input_file probe loop to its own method Date: 2010-03-05 03:23:57 GMT Patch by Micah F. Galizia printf("%s%s@%s.%s", "micah", "galizia", "gmail", "com").
author stefano
date Sun, 14 Mar 2010 22:40:16 +0000
parents 17ad184d14be
children 87e28edf7a98
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4522
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
1 /*
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
2 * "Real" compatible muxer and demuxer common code.
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
3 * Copyright (c) 2009 Aurelien Jacobs <aurel@gnuage.org>
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
4 *
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
5 * This file is part of FFmpeg.
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
6 *
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
7 * FFmpeg is free software; you can redistribute it and/or
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
8 * modify it under the terms of the GNU Lesser General Public
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
9 * License as published by the Free Software Foundation; either
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
10 * version 2.1 of the License, or (at your option) any later version.
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
11 *
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
12 * FFmpeg is distributed in the hope that it will be useful,
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
15 * Lesser General Public License for more details.
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
16 *
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
17 * You should have received a copy of the GNU Lesser General Public
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
18 * License along with FFmpeg; if not, write to the Free Software
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
20 */
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
21
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
22 #include "rm.h"
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
23
5161
17ad184d14be ff_rm_metadata is const.
reimar
parents: 4522
diff changeset
24 const char * const ff_rm_metadata[4] = {
4522
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
25 "title",
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
26 "author",
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
27 "copyright",
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
28 "comment"
aaf07b2acb3c use new metadata API in rm (de)muxer
aurel
parents:
diff changeset
29 };