Debian Codegraph @

src/com/drew/metadata/mov/QuickTimeDirectory.java

raw symbols SCIP
1 /*
2 * Copyright 2002-2019 Drew Noakes and contributors
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * More information about this project is available at:
17 *
18 * https://drewnoakes.com/code/exif/
19 * https://github.com/drewnoakes/metadata-extractor
20 */
21 package com.drew.metadata.mov;
22
23 import com.drew.lang.annotations.NotNull;
24 import com.drew.metadata.Directory;
25
26 import java.util.HashMap;
27
28 /**
29 * @author Payton Garland
30 */
31 public class QuickTimeDirectory extends Directory {
32
33 // Movie Header Atom (https://developer.apple.com/library/content/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html#//apple_ref/doc/uid/TP40000939-CH204-56313)
34 public static final int TAG_CREATION_TIME = 0x0100;
35 public static final int TAG_MODIFICATION_TIME = 0x0101;
36 public static final int TAG_TIME_SCALE = 0x0102;
37 public static final int TAG_DURATION = 0x0103;
38 public static final int TAG_DURATION_SECONDS = 0x0104;
39 public static final int TAG_PREFERRED_RATE = 0x0105;
40 public static final int TAG_PREFERRED_VOLUME = 0x0106;
41 public static final int TAG_PREVIEW_TIME = 0x0107;
42 public static final int TAG_PREVIEW_DURATION = 0x0108;
43 public static final int TAG_POSTER_TIME = 0x0109;
44 public static final int TAG_SELECTION_TIME = 0x010A;
45 public static final int TAG_SELECTION_DURATION = 0x010B;
46 public static final int TAG_CURRENT_TIME = 0x010C;
47 public static final int TAG_NEXT_TRACK_ID = 0x010D;
48 public static final int TAG_ROTATION = 0x010E;
49
50 public static final int TAG_MEDIA_TIME_SCALE = 0x0306;
51
52 public static final int TAG_MAJOR_BRAND = 0x1000;
53 public static final int TAG_MINOR_VERSION = 0x1001;
54 public static final int TAG_COMPATIBLE_BRANDS = 0x1002;
55
56 public static final int TAG_CANON_THUMBNAIL_DT = 0x2000;
57
58 public static final int TAG_ADOBE_XMP = 0x3000;
59
60 @NotNull
61 private static final HashMap<Integer, String> _tagNameMap = new HashMap<Integer, String>();
62
63 static {
64 _tagNameMap.put(TAG_MAJOR_BRAND, "Major Brand");
65 _tagNameMap.put(TAG_MINOR_VERSION, "Minor Version");
66 _tagNameMap.put(TAG_COMPATIBLE_BRANDS, "Compatible Brands");
67
68 _tagNameMap.put(TAG_CREATION_TIME, "Creation Time");
69 _tagNameMap.put(TAG_MODIFICATION_TIME, "Modification Time");
70 _tagNameMap.put(TAG_TIME_SCALE, "Media Time Scale");
71 _tagNameMap.put(TAG_DURATION, "Duration");
72 _tagNameMap.put(TAG_DURATION_SECONDS, "Duration in Seconds");
73 _tagNameMap.put(TAG_PREFERRED_RATE, "Preferred Rate");
74 _tagNameMap.put(TAG_PREFERRED_VOLUME, "Preferred Volume");
75 _tagNameMap.put(TAG_PREVIEW_TIME, "Preview Time");
76 _tagNameMap.put(TAG_PREVIEW_DURATION, "Preview Duration");
77 _tagNameMap.put(TAG_POSTER_TIME, "Poster Time");
78 _tagNameMap.put(TAG_SELECTION_TIME, "Selection Time");
79 _tagNameMap.put(TAG_SELECTION_DURATION, "Selection Duration");
80 _tagNameMap.put(TAG_CURRENT_TIME, "Current Time");
81 _tagNameMap.put(TAG_NEXT_TRACK_ID, "Next Track ID");
82 _tagNameMap.put(TAG_ROTATION, "Rotation");
83
84 _tagNameMap.put(TAG_MEDIA_TIME_SCALE, "Media Time Scale");
85
86 _tagNameMap.put(TAG_CANON_THUMBNAIL_DT, "Canon Thumbnail DateTime");
87
88 _tagNameMap.put(TAG_ADOBE_XMP, "Adobe Bridge XMP");
89 }
90
91 public QuickTimeDirectory()
92 {
93 this.setDescriptor(new QuickTimeDescriptor(this));
94 }
95
96 @Override
97 @NotNull
98 public String getName()
99 {
100 return "QuickTime";
101 }
102
103 @Override
104 @NotNull
105 protected HashMap<Integer, String> getTagNameMap()
106 {
107 return _tagNameMap;
108 }
109 }