1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
/*
* Copyright (C) 2010-2013 Hendrik Leppkes
* http://www.1f0.de
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "stdafx.h"
static const char *RAW_VIDEO = "rawvideo";
static const char *RAW_VIDEO_DESC = "raw video files";
static const char *RAW_AUDIO = "rawaudio";
static const char *RAW_AUDIO_DESC = "raw audio files";
struct lavf_iformat_map
{
const char *orig_format;
const char *new_format;
const char *new_description;
} lavf_input_formats[] = {
// Shorten these formats
{ "matroska,webm", "matroska", NULL },
{ "mov,mp4,m4a,3gp,3g2,mj2", "mp4", "MPEG-4/QuickTime format" },
// Raw Video formats (grouped into "rawvideo")
{ "dnxhd", RAW_VIDEO, RAW_VIDEO_DESC },
{ "h261", RAW_VIDEO, RAW_VIDEO_DESC },
{ "h263", RAW_VIDEO, RAW_VIDEO_DESC },
{ "h264", RAW_VIDEO, RAW_VIDEO_DESC },
{ "ingenient", RAW_VIDEO, RAW_VIDEO_DESC },
{ "mjpeg", RAW_VIDEO, RAW_VIDEO_DESC },
{ "vc1", RAW_VIDEO, RAW_VIDEO_DESC },
// Raw Audio Formats (grouped into "rawaudio")
{ "dirac", RAW_AUDIO, RAW_AUDIO_DESC },
{ "f32be", RAW_AUDIO, RAW_AUDIO_DESC },
{ "f32le", RAW_AUDIO, RAW_AUDIO_DESC },
{ "f64be", RAW_AUDIO, RAW_AUDIO_DESC },
{ "f64le", RAW_AUDIO, RAW_AUDIO_DESC },
{ "g722", RAW_AUDIO, RAW_AUDIO_DESC },
{ "gsm", RAW_AUDIO, RAW_AUDIO_DESC },
{ "s16be", RAW_AUDIO, RAW_AUDIO_DESC },
{ "s16le", RAW_AUDIO, RAW_AUDIO_DESC },
{ "s24be", RAW_AUDIO, RAW_AUDIO_DESC },
{ "s24le", RAW_AUDIO, RAW_AUDIO_DESC },
{ "s32be", RAW_AUDIO, RAW_AUDIO_DESC },
{ "s32le", RAW_AUDIO, RAW_AUDIO_DESC },
{ "s8", RAW_AUDIO, RAW_AUDIO_DESC },
{ "u16be", RAW_AUDIO, RAW_AUDIO_DESC },
{ "u16le", RAW_AUDIO, RAW_AUDIO_DESC },
{ "u24be", RAW_AUDIO, RAW_AUDIO_DESC },
{ "u24le", RAW_AUDIO, RAW_AUDIO_DESC },
{ "u32be", RAW_AUDIO, RAW_AUDIO_DESC },
{ "u32le", RAW_AUDIO, RAW_AUDIO_DESC },
{ "u8", RAW_AUDIO, RAW_AUDIO_DESC },
{ "image2", "image2", "Image Files" },
{ "image2pipe", "image2", "Image Files" },
// Disabled Formats
{ "applehttp", NULL, NULL },
{ "ass", NULL, NULL },
{ "ffm", NULL, NULL },
{ "ffmetadata", NULL, NULL },
{ "microdvd", NULL, NULL },
{ "mpegtsraw", NULL, NULL },
{ "spdif", NULL, NULL },
{ "srt", NULL, NULL },
{ "tty", NULL, NULL },
{ "vc1test", NULL, NULL },
{ "yuv4mpegpipe", NULL, NULL },
};
void lavf_get_iformat_infos(AVInputFormat *pFormat, const char **pszName, const char **pszDescription)
{
const char *name = pFormat->name;
const char *desc = pFormat->long_name;
for (int i=0; i<countof(lavf_input_formats); ++i) {
if (strcmp(lavf_input_formats[i].orig_format, name) == 0) {
name = lavf_input_formats[i].new_format;
if (lavf_input_formats[i].new_description)
desc = lavf_input_formats[i].new_description;
break;
}
}
if (pszName)
*pszName = name;
if (pszDescription)
*pszDescription = desc;
}
|