1/*
2 * Copyright (C) 2015 The Android Open Source Project
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
17package com.android.camera.data;
18
19/**
20 * Settable metadata class that is deferred loaded in other ways that
21 * may be slow or non-standard.
22 *
23 * TODO: Replace this with implementation specific values and code.
24 */
25public class Metadata {
26    // TODO: Consider replacing these with orientation manager values
27    // (Or having a central place to deal with the standard rotations)
28    private static final String ROTATE_90 = "90";
29    private static final String ROTATE_270 = "270";
30
31    private boolean mIsLoaded = false;
32
33    private String mVideoOrientation = "";
34    private int mVideoWidth = -1;
35    private int mVideoHeight = -1;
36
37    private boolean mIsPanorama = false;
38    private boolean mIsPanorama360 = false;
39    private boolean mUsePanoramaViewer = false;
40
41    private boolean mHasRgbzData = false;
42
43    public boolean isLoaded() {
44        return mIsLoaded;
45    }
46
47    public void setLoaded(boolean isLoaded) {
48        mIsLoaded = isLoaded;
49    }
50
51    public String getVideoOrientation() {
52        return mVideoOrientation;
53    }
54
55    public void setVideoOrientation(String videoOrientation) {
56        mVideoOrientation = videoOrientation;
57    }
58
59    public boolean isVideoRotated() {
60        return ROTATE_90.equals(mVideoOrientation) || ROTATE_270.equals(mVideoOrientation);
61    }
62
63    public int getVideoWidth() {
64        return mVideoWidth;
65    }
66
67    public void setVideoWidth(int videoWidth) {
68        mVideoWidth = videoWidth;
69    }
70
71    public int getVideoHeight() {
72        return mVideoHeight;
73    }
74
75    public void setVideoHeight(int videoHeight) {
76        mVideoHeight = videoHeight;
77    }
78
79    public boolean isPanorama() {
80        return mIsPanorama;
81    }
82
83    public void setPanorama(boolean isPanorama) {
84        mIsPanorama = isPanorama;
85    }
86
87    public boolean isPanorama360() {
88        return mIsPanorama360;
89    }
90
91    public void setPanorama360(boolean isPanorama360) {
92        mIsPanorama360 = isPanorama360;
93    }
94
95    public boolean isUsePanoramaViewer() {
96        return mUsePanoramaViewer;
97    }
98
99    public void setUsePanoramaViewer(boolean usePanoramaViewer) {
100        mUsePanoramaViewer = usePanoramaViewer;
101    }
102
103    public boolean isHasRgbzData() {
104        return mHasRgbzData;
105    }
106
107    public void setHasRgbzData(boolean hasRgbzData) {
108        mHasRgbzData = hasRgbzData;
109    }
110}