• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2014 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 package android.hardware.camera2.impl;
17 
18 import android.os.Parcel;
19 import android.os.Parcelable;
20 
21 /**
22  * @hide
23  */
24 public class CaptureResultExtras implements Parcelable {
25     private int requestId;
26     private int subsequenceId;
27     private int afTriggerId;
28     private int precaptureTriggerId;
29     private long frameNumber;
30     private int partialResultCount;
31     private int errorStreamId;
32 
33     public static final Parcelable.Creator<CaptureResultExtras> CREATOR =
34             new Parcelable.Creator<CaptureResultExtras>() {
35         @Override
36         public CaptureResultExtras createFromParcel(Parcel in) {
37             return new CaptureResultExtras(in);
38         }
39 
40         @Override
41         public CaptureResultExtras[] newArray(int size) {
42             return new CaptureResultExtras[size];
43         }
44     };
45 
CaptureResultExtras(Parcel in)46     private CaptureResultExtras(Parcel in) {
47         readFromParcel(in);
48     }
49 
CaptureResultExtras(int requestId, int subsequenceId, int afTriggerId, int precaptureTriggerId, long frameNumber, int partialResultCount, int errorStreamId)50     public CaptureResultExtras(int requestId, int subsequenceId, int afTriggerId,
51                                int precaptureTriggerId, long frameNumber,
52                                int partialResultCount, int errorStreamId) {
53         this.requestId = requestId;
54         this.subsequenceId = subsequenceId;
55         this.afTriggerId = afTriggerId;
56         this.precaptureTriggerId = precaptureTriggerId;
57         this.frameNumber = frameNumber;
58         this.partialResultCount = partialResultCount;
59         this.errorStreamId = errorStreamId;
60     }
61 
62     @Override
describeContents()63     public int describeContents() {
64         return 0;
65     }
66 
67     @Override
writeToParcel(Parcel dest, int flags)68     public void writeToParcel(Parcel dest, int flags) {
69         dest.writeInt(requestId);
70         dest.writeInt(subsequenceId);
71         dest.writeInt(afTriggerId);
72         dest.writeInt(precaptureTriggerId);
73         dest.writeLong(frameNumber);
74         dest.writeInt(partialResultCount);
75         dest.writeInt(errorStreamId);
76     }
77 
readFromParcel(Parcel in)78     public void readFromParcel(Parcel in) {
79         requestId = in.readInt();
80         subsequenceId = in.readInt();
81         afTriggerId = in.readInt();
82         precaptureTriggerId = in.readInt();
83         frameNumber = in.readLong();
84         partialResultCount = in.readInt();
85         errorStreamId = in.readInt();
86     }
87 
getRequestId()88     public int getRequestId() {
89         return requestId;
90     }
91 
getSubsequenceId()92     public int getSubsequenceId() {
93         return subsequenceId;
94     }
95 
getAfTriggerId()96     public int getAfTriggerId() {
97         return afTriggerId;
98     }
99 
getPrecaptureTriggerId()100     public int getPrecaptureTriggerId() {
101         return precaptureTriggerId;
102     }
103 
getFrameNumber()104     public long getFrameNumber() {
105         return frameNumber;
106     }
107 
getPartialResultCount()108     public int getPartialResultCount() {
109         return partialResultCount;
110     }
111 
getErrorStreamId()112     public int getErrorStreamId() {
113         return errorStreamId;
114     }
115 }
116