| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 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 |
|
| 30 |
|
| 31 |
|
| 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 |
} |