This repository has been archived by the owner on Jul 30, 2022. It is now read-only.
mirrored from https://chromium.googlesource.com/webm/webmquicktime
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathWebMImport.r
156 lines (134 loc) · 3.76 KB
/
WebMImport.r
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
// Copyright (c) 2010 The WebM project authors. All Rights Reserved.
//
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file in the root of the source
// tree. An additional intellectual property rights grant can be found
// in the file PATENTS. All contributing project authors may
// be found in the AUTHORS file in the root of the source tree.
#define thng_RezTemplateVersion 2
#include <Carbon/Carbon.r>
#include <QuickTime/QuickTime.r>
#include "VP8CodecVersion.h"
//#include "WebMExportVersions.h"
#include "WebMImport.hpp"
//
// WebM Import component
//
// canMovieImportAvoidBlocking
// canMovieImportPartial
#define kImporterFlags canMovieImportFiles | canMovieImportInPlace | canMovieImportDataReferences | cmpThreadSafe | hasMovieImportMIMEList | canMovieImportWithIdle | \
canMovieImportValidateFile | canMovieImportValidateDataReferences | \
canMovieImportAvoidBlocking | canMovieImportPartial
resource 'STR ' (263) {
"WebM" "0.0.1" " see http://webmproject.org"
};
resource 'thng' (263) {
'eat ', // Type
'WebM', // SubType
'vide', // Manufacturer - for 'eat ' the media type supported by the component
0, // - use componentHasMultiplePlatforms
0,
0,
0,
'STR ', // Name Type
260, // Name ID
'STR ', // Info Type
263, // Info ID
0, // Icon Type
0, // Icon ID
kWebMImportVersion, // not kImporterFlags,
componentDoAutoVersion | componentHasMultiplePlatforms, // Registration Flags
0, // Resource ID of Icon Family
{
kImporterFlags,
'dlle',
263,
platformIA32NativeEntryPoint,
},
'thnr', 263;
};
// Code Entry Point for Mach-O and Windows
resource 'dlle' (263) {
"WebMImportComponentDispatch"
};
//thga
resource 'thga' (264) {
'eat ', // Type
'WEBM', // Subtype in ALL CAPS. It will match a suffix case insensitively.
'vide', // for 'eat ' the media type supported by the component
kImporterFlags |
movieImportSubTypeIsFileExtension,
0,
0,
0,
'STR ',
263,
0,
0,
0,
0,
'eat ',
'WebM',
'vide',
0,
0,
'thnr', 263,
cmpAliasOnlyThisFile
};
// thnr - public component resource
// same data that MovieImportGetMIMETypeList would return.
resource 'thnr' (263) {
{
'mime', 1, 0,
'mime', 263, 0,
'mcfg', 1, 0,
'mcfg', 263, 0
};
};
// mcfg - QT Media Configuration Resource
// If the kQTMediaConfigUsePluginByDefault flag is set, QuickTime will automatically register the MIME type for the QuickTime Plug-in with all browsers on both platforms.
resource 'mcfg' (263)
{
kVersionDoesntMatter,
{
// determine which group this MIME type will be listed under in MIME configuration panel
kQTMediaConfigVideoGroupID,
kQTMediaConfigUsePluginByDefault \
| kQTMediaConfigCanUseApp \
| kQTMediaConfigCanUsePlugin \
| kQTMediaConfigBinaryFile \
| kQTMediaConfigTakeFileAssociationByDefault,
'WebM', // MacOS file type when saved (OSType)
'TVOD',
// Component info used by QT plugin to find componet to open this type of file
'eat ',
'WebM',
'vide',
kImporterFlags,
0,
'WEBM', // filename extension (ALL CAPS)
kQTMediaInfoNetGroup,
{
},
{
"WebM Movie File",
"webm",
"QuickTime Player",
"WebM Movie Importer",
"Version 0.0.1, see http://webmproject.org"
},
// Array of MIME types that describe this media type
{
"video/webm";
},
}
};
// atom container resrouce to hold mime types.
// Component's GetMIMETypeList simply loads this resource and returns it.
resource 'mime' (263) {
{
kMimeInfoMimeTypeTag, 1, "video/webm";
kMimeInfoFileExtensionTag, 1, "webm";
kMimeInfoDescriptionTag, 1, "WebM";
};
};