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 IVIDEO_PAYLOAD_MANAGER_H 17 #define IVIDEO_PAYLOAD_MANAGER_H 18 19 #include <hardware/hwcomposer.h> 20 21 namespace android { 22 namespace intel { 23 24 class BufferMapper; 25 26 class IVideoPayloadManager { 27 public: IVideoPayloadManager()28 IVideoPayloadManager() {} ~IVideoPayloadManager()29 virtual ~IVideoPayloadManager() {} 30 31 public: 32 struct Buffer { 33 buffer_handle_t khandle; 34 uint16_t width; 35 uint16_t height; 36 uint16_t bufWidth; 37 uint16_t bufHeight; 38 uint16_t lumaStride; 39 uint16_t chromaUStride; 40 uint16_t chromaVStride; 41 uint16_t offsetX; 42 uint16_t offsetY; 43 bool tiled; 44 }; 45 struct MetaData { 46 uint32_t format; 47 uint32_t transform; 48 int64_t timestamp; 49 Buffer normalBuffer; 50 Buffer scalingBuffer; 51 Buffer rotationBuffer; 52 }; 53 54 public: 55 virtual bool getMetaData(BufferMapper *mapper, MetaData *metadata) = 0; 56 virtual bool setRenderStatus(BufferMapper *mapper, bool renderStatus) = 0; 57 }; 58 59 } // namespace intel 60 } // namespace android 61 62 #endif /* IVIDEO_PAYLOAD_MANAGER_H */ 63