Debian Codegraph @

src/com/drew/metadata/avi/AviDirectory.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.avi;
22
23 import com.drew.lang.annotations.NotNull;
24 import com.drew.metadata.Directory;
25
26 import java.util.HashMap;
27
28 /**
29 * Holds basic metadata from Avi files
30 *
31 * @author Payton Garland
32 */
33 public class AviDirectory extends Directory
34 {
35
36 public static final int TAG_FRAMES_PER_SECOND = 1;
37 public static final int TAG_SAMPLES_PER_SECOND = 2;
38 public static final int TAG_DURATION = 3;
39 public static final int TAG_VIDEO_CODEC = 4;
40 public static final int TAG_AUDIO_CODEC = 5;
41 public static final int TAG_WIDTH = 6;
42 public static final int TAG_HEIGHT = 7;
43 public static final int TAG_STREAMS = 8;
44
45 public static final int TAG_DATETIME_ORIGINAL = 320;
46
47 public static final String CHUNK_STREAM_HEADER = "strh";
48 public static final String CHUNK_MAIN_HEADER = "avih";
49
50 public static final String CHUNK_DATETIME_ORIGINAL = "IDIT";
51
52 public static final String LIST_HEADER = "hdrl";
53 public static final String LIST_STREAM_HEADER = "strl";
54
55 public static final String FORMAT = "AVI ";
56
57 @NotNull
58 private static final HashMap<Integer, String> _tagNameMap = new HashMap<Integer, String>();
59
60 static {
61 _tagNameMap.put(TAG_FRAMES_PER_SECOND, "Frames Per Second");
62 _tagNameMap.put(TAG_SAMPLES_PER_SECOND, "Samples Per Second");
63 _tagNameMap.put(TAG_DURATION, "Duration");
64 _tagNameMap.put(TAG_VIDEO_CODEC, "Video Codec");
65 _tagNameMap.put(TAG_AUDIO_CODEC, "Audio Codec");
66 _tagNameMap.put(TAG_WIDTH, "Width");
67 _tagNameMap.put(TAG_HEIGHT, "Height");
68 _tagNameMap.put(TAG_STREAMS, "Stream Count");
69 _tagNameMap.put(TAG_DATETIME_ORIGINAL, "Date/Time Original");
70 }
71
72 public AviDirectory()
73 {
74 this.setDescriptor(new AviDescriptor(this));
75 }
76
77 @NotNull
78 @Override
79 public String getName() {
80 return "AVI";
81 }
82
83 @NotNull
84 @Override
85 protected HashMap<Integer, String> getTagNameMap() {
86 return _tagNameMap;
87 }
88 }