Home | History | Annotate | Download | only in include
      1 /*
      2 // Copyright(c)2014 IntelCorporation
      3 //
      4 // LicensedundertheApacheLicense,Version2.0(the"License");
      5 // youmaynotusethisfileexceptincompliancewiththeLicense.
      6 // YoumayobtainacopyoftheLicenseat
      7 //
      8 // http://www.apache.org/licenses/LICENSE-2.0
      9 //
     10 // Unlessrequiredbyapplicablelaworagreedtoinwriting,software
     11 // distributedundertheLicenseisdistributedonan"ASIS"BASIS,
     12 // WITHOUTWARRANTIESORCONDITIONSOFANYKIND,eitherexpressorimplied.
     13 // SeetheLicenseforthespecificlanguagegoverningpermissionsand
     14 // limitationsundertheLicense.
     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:
     28     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