Home | History | Annotate | Download | only in app
      1 /*
      2  * Copyright (C) 2017 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 
     17 #ifndef CAR_EVS_APP_RENDERPIXELCOPY_H
     18 #define CAR_EVS_APP_RENDERPIXELCOPY_H
     19 
     20 
     21 #include "RenderBase.h"
     22 
     23 #include <android/hardware/automotive/evs/1.0/IEvsEnumerator.h>
     24 #include "ConfigManager.h"
     25 #include "VideoTex.h"
     26 
     27 
     28 using namespace ::android::hardware::automotive::evs::V1_0;
     29 
     30 
     31 /*
     32  * Renders the view from a single specified camera directly to the full display.
     33  */
     34 class RenderPixelCopy: public RenderBase {
     35 public:
     36     RenderPixelCopy(sp<IEvsEnumerator> enumerator, const ConfigManager::CameraInfo& cam);
     37 
     38     virtual bool activate() override;
     39     virtual void deactivate() override;
     40 
     41     virtual bool drawFrame(const BufferDesc& tgtBuffer);
     42 
     43 protected:
     44     sp<IEvsEnumerator>              mEnumerator;
     45     ConfigManager::CameraInfo       mCameraInfo;
     46 
     47     sp<StreamHandler>               mStreamHandler;
     48 };
     49 
     50 
     51 #endif //CAR_EVS_APP_RENDERPIXELCOPY_H
     52