Debian Codegraph @

src/com/drew/metadata/mp4/Mp4Directory.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.mp4;
22
23 import com.drew.lang.annotations.NotNull;
24 import com.drew.metadata.Directory;
25
26 import java.util.HashMap;
27
28 public class Mp4Directory extends Directory {
29
30 public static final int TAG_CREATION_TIME = 0x0100;
31 public static final int TAG_MODIFICATION_TIME = 0x0101;
32 public static final int TAG_TIME_SCALE = 0x0102;
33 public static final int TAG_DURATION = 0x0103;
34 public static final int TAG_DURATION_SECONDS = 0x0104;
35 public static final int TAG_PREFERRED_RATE = 0x0105;
36 public static final int TAG_PREFERRED_VOLUME = 0x0106;
37 public static final int TAG_PREVIEW_TIME = 0x0108;
38 public static final int TAG_PREVIEW_DURATION = 0x0109;
39 public static final int TAG_POSTER_TIME = 0x010A;
40 public static final int TAG_SELECTION_TIME = 0x010B;
41 public static final int TAG_SELECTION_DURATION = 0x010C;
42 public static final int TAG_CURRENT_TIME = 0x010D;
43 public static final int TAG_NEXT_TRACK_ID = 0x010E;
44 public static final int TAG_TRANSFORMATION_MATRIX = 0x010F;
45 public static final int TAG_ROTATION = 0x0200;
46 public static final int TAG_LATITUDE = 0x2001;
47 public static final int TAG_LONGITUDE = 0x2002;
48 public static final int TAG_MEDIA_TIME_SCALE = 0x0306;
49
50 public static final int TAG_MAJOR_BRAND = 1;
51 public static final int TAG_MINOR_VERSION = 2;
52 public static final int TAG_COMPATIBLE_BRANDS = 3;
53
54 @NotNull
55 private static final HashMap<Integer, String> _tagNameMap = new HashMap<Integer, String>();
56
57
58 static {
59 _tagNameMap.put(TAG_MAJOR_BRAND, "Major Brand");
60 _tagNameMap.put(TAG_MINOR_VERSION, "Minor Version");
61 _tagNameMap.put(TAG_COMPATIBLE_BRANDS, "Compatible Brands");
62
63 _tagNameMap.put(TAG_CREATION_TIME, "Creation Time");
64 _tagNameMap.put(TAG_MODIFICATION_TIME, "Modification Time");
65 _tagNameMap.put(TAG_TIME_SCALE, "Media Time Scale");
66 _tagNameMap.put(TAG_DURATION, "Duration");
67 _tagNameMap.put(TAG_DURATION_SECONDS, "Duration in Seconds");
68 _tagNameMap.put(TAG_PREFERRED_RATE, "Preferred Rate");
69 _tagNameMap.put(TAG_PREFERRED_VOLUME, "Preferred Volume");
70 _tagNameMap.put(TAG_PREVIEW_TIME, "Preview Time");
71 _tagNameMap.put(TAG_PREVIEW_DURATION, "Preview Duration");
72 _tagNameMap.put(TAG_POSTER_TIME, "Poster Time");
73 _tagNameMap.put(TAG_SELECTION_TIME, "Selection Time");
74 _tagNameMap.put(TAG_SELECTION_DURATION, "Selection Duration");
75 _tagNameMap.put(TAG_CURRENT_TIME, "Current Time");
76 _tagNameMap.put(TAG_NEXT_TRACK_ID, "Next Track ID");
77 _tagNameMap.put(TAG_TRANSFORMATION_MATRIX, "Transformation Matrix");
78 _tagNameMap.put(TAG_ROTATION, "Rotation");
79 _tagNameMap.put(TAG_LATITUDE, "Latitude");
80 _tagNameMap.put(TAG_LONGITUDE, "Longitude");
81
82 _tagNameMap.put(TAG_MEDIA_TIME_SCALE, "Media Time Scale");
83 }
84
85 public Mp4Directory()
86 {
87 this.setDescriptor(new Mp4Descriptor(this));
88 }
89
90 @Override
91 @NotNull
92 public String getName()
93 {
94 return "MP4";
95 }
96
97 @Override
98 @NotNull
99 protected HashMap<Integer, String> getTagNameMap()
100 {
101 return _tagNameMap;
102 }
103 }