| 1 | /*
|
|---|
| 2 | * Copyright 2002-2017 Drew Noakes
|
|---|
| 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 |
|
|---|
| 22 | package com.drew.metadata.exif.makernotes;
|
|---|
| 23 |
|
|---|
| 24 | import com.drew.lang.annotations.NotNull;
|
|---|
| 25 | import com.drew.metadata.Directory;
|
|---|
| 26 |
|
|---|
| 27 | import java.util.HashMap;
|
|---|
| 28 |
|
|---|
| 29 | /**
|
|---|
| 30 | * Describes tags specific to Reconyx HyperFire cameras.
|
|---|
| 31 | *
|
|---|
| 32 | * Reconyx uses a fixed makernote block. Tag values are the byte index of the tag within the makernote.
|
|---|
| 33 | * @author Todd West http://cascadescarnivoreproject.blogspot.com
|
|---|
| 34 | */
|
|---|
| 35 | @SuppressWarnings("WeakerAccess")
|
|---|
| 36 | public class ReconyxHyperFireMakernoteDirectory extends Directory
|
|---|
| 37 | {
|
|---|
| 38 | /**
|
|---|
| 39 | * Version number used for identifying makernotes from Reconyx HyperFire cameras.
|
|---|
| 40 | */
|
|---|
| 41 | public static final int MAKERNOTE_VERSION = 61697;
|
|---|
| 42 |
|
|---|
| 43 | public static final int TAG_MAKERNOTE_VERSION = 0;
|
|---|
| 44 | public static final int TAG_FIRMWARE_VERSION = 2;
|
|---|
| 45 | public static final int TAG_TRIGGER_MODE = 12;
|
|---|
| 46 | public static final int TAG_SEQUENCE = 14;
|
|---|
| 47 | public static final int TAG_EVENT_NUMBER = 18;
|
|---|
| 48 | public static final int TAG_DATE_TIME_ORIGINAL = 22;
|
|---|
| 49 | public static final int TAG_MOON_PHASE = 36;
|
|---|
| 50 | public static final int TAG_AMBIENT_TEMPERATURE_FAHRENHEIT = 38;
|
|---|
| 51 | public static final int TAG_AMBIENT_TEMPERATURE = 40;
|
|---|
| 52 | public static final int TAG_SERIAL_NUMBER = 42;
|
|---|
| 53 | public static final int TAG_CONTRAST = 72;
|
|---|
| 54 | public static final int TAG_BRIGHTNESS = 74;
|
|---|
| 55 | public static final int TAG_SHARPNESS = 76;
|
|---|
| 56 | public static final int TAG_SATURATION = 78;
|
|---|
| 57 | public static final int TAG_INFRARED_ILLUMINATOR = 80;
|
|---|
| 58 | public static final int TAG_MOTION_SENSITIVITY = 82;
|
|---|
| 59 | public static final int TAG_BATTERY_VOLTAGE = 84;
|
|---|
| 60 | public static final int TAG_USER_LABEL = 86;
|
|---|
| 61 |
|
|---|
| 62 | @NotNull
|
|---|
| 63 | protected static final HashMap<Integer, String> _tagNameMap = new HashMap<Integer, String>();
|
|---|
| 64 |
|
|---|
| 65 | static
|
|---|
| 66 | {
|
|---|
| 67 | _tagNameMap.put(TAG_MAKERNOTE_VERSION, "Makernote Version");
|
|---|
| 68 | _tagNameMap.put(TAG_FIRMWARE_VERSION, "Firmware Version");
|
|---|
| 69 | _tagNameMap.put(TAG_TRIGGER_MODE, "Trigger Mode");
|
|---|
| 70 | _tagNameMap.put(TAG_SEQUENCE, "Sequence");
|
|---|
| 71 | _tagNameMap.put(TAG_EVENT_NUMBER, "Event Number");
|
|---|
| 72 | _tagNameMap.put(TAG_DATE_TIME_ORIGINAL, "Date/Time Original");
|
|---|
| 73 | _tagNameMap.put(TAG_MOON_PHASE, "Moon Phase");
|
|---|
| 74 | _tagNameMap.put(TAG_AMBIENT_TEMPERATURE_FAHRENHEIT, "Ambient Temperature Fahrenheit");
|
|---|
| 75 | _tagNameMap.put(TAG_AMBIENT_TEMPERATURE, "Ambient Temperature");
|
|---|
| 76 | _tagNameMap.put(TAG_SERIAL_NUMBER, "Serial Number");
|
|---|
| 77 | _tagNameMap.put(TAG_CONTRAST, "Contrast");
|
|---|
| 78 | _tagNameMap.put(TAG_BRIGHTNESS, "Brightness");
|
|---|
| 79 | _tagNameMap.put(TAG_SHARPNESS, "Sharpness");
|
|---|
| 80 | _tagNameMap.put(TAG_SATURATION, "Saturation");
|
|---|
| 81 | _tagNameMap.put(TAG_INFRARED_ILLUMINATOR, "Infrared Illuminator");
|
|---|
| 82 | _tagNameMap.put(TAG_MOTION_SENSITIVITY, "Motion Sensitivity");
|
|---|
| 83 | _tagNameMap.put(TAG_BATTERY_VOLTAGE, "Battery Voltage");
|
|---|
| 84 | _tagNameMap.put(TAG_USER_LABEL, "User Label");
|
|---|
| 85 | }
|
|---|
| 86 |
|
|---|
| 87 | public ReconyxHyperFireMakernoteDirectory()
|
|---|
| 88 | {
|
|---|
| 89 | this.setDescriptor(new ReconyxHyperFireMakernoteDescriptor(this));
|
|---|
| 90 | }
|
|---|
| 91 |
|
|---|
| 92 | @Override
|
|---|
| 93 | @NotNull
|
|---|
| 94 | public String getName()
|
|---|
| 95 | {
|
|---|
| 96 | return "Reconyx HyperFire Makernote";
|
|---|
| 97 | }
|
|---|
| 98 |
|
|---|
| 99 | @Override
|
|---|
| 100 | @NotNull
|
|---|
| 101 | protected HashMap<Integer, String> getTagNameMap()
|
|---|
| 102 | {
|
|---|
| 103 | return _tagNameMap;
|
|---|
| 104 | }
|
|---|
| 105 | }
|
|---|