1/* 2// Copyright (c) 2014 Intel Corporation 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#ifndef GRALLOC_BUFFER_BASE_H 17#define GRALLOC_BUFFER_BASE_H 18 19#include <GraphicBuffer.h> 20#include <hal_public.h> 21// FIXME: remove it, why define NV12_VED based on OMX's value? 22#include <OMX_IVCommon.h> 23#include <OMX_IntelVideoExt.h> 24 25namespace android { 26namespace intel { 27 28class GrallocBufferBase : public GraphicBuffer { 29public: 30 GrallocBufferBase(buffer_handle_t handle); 31 virtual ~GrallocBufferBase() {} 32 virtual void resetBuffer(buffer_handle_t handle); 33 34protected: 35 // helper function to be invoked by the derived class 36 void initStride(); 37 38private: 39 void initBuffer(buffer_handle_t handle); 40}; 41 42} // namespace intel 43} // namespace android 44 45#endif /* GRALLOC_BUFFER_BASE_H */ 46