10dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh/* 20dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * Copyright (C) 2015 The Android Open Source Project 30dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * 40dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * Licensed under the Apache License, Version 2.0 (the "License"); 50dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * you may not use this file except in compliance with the License. 60dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * You may obtain a copy of the License at 70dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * 80dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * http://www.apache.org/licenses/LICENSE-2.0 90dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * 100dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * Unless required by applicable law or agreed to in writing, software 110dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * distributed under the License is distributed on an "AS IS" BASIS, 120dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 130dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * See the License for the specific language governing permissions and 140dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * limitations under the License. 150dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh */ 160dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh#ifndef _ACAPTURE_REQUEST_H 170dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh#define _ACAPTURE_REQUEST_H 180dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 190dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh#include "NdkCaptureRequest.h" 200dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh#include <set> 210dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 220dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yehusing namespace android; 230dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 240dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yehstruct ACameraOutputTarget { 25d19d994770a04f02c204affd29985c5aeaa58baaChih-Hung Hsieh explicit ACameraOutputTarget(ANativeWindow* window) : mWindow(window) {}; 260dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 270dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh bool operator == (const ACameraOutputTarget& other) const { 280dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh return mWindow == other.mWindow; 290dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh } 300dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh bool operator != (const ACameraOutputTarget& other) const { 310dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh return mWindow != other.mWindow; 320dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh } 330dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh bool operator < (const ACameraOutputTarget& other) const { 340dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh return mWindow < other.mWindow; 350dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh } 360dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh bool operator > (const ACameraOutputTarget& other) const { 370dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh return mWindow > other.mWindow; 380dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh } 390dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 400dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh ANativeWindow* mWindow; 410dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh}; 420dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 430dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yehstruct ACameraOutputTargets { 440dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh std::set<ACameraOutputTarget> mOutputs; 450dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh}; 460dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 470dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yehstruct ACaptureRequest { 480dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh ACameraMetadata* settings; 490dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh ACameraOutputTargets* targets; 500dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh}; 510dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 520dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh#endif // _ACAPTURE_REQUEST_H 53