Home | History | Annotate | Download | only in libopencorehw
      1 /*
      2  * OMAP3430 support
      3  *
      4  * Author: Srini Gosangi <srini.gosangi (at) windriver.com>
      5  * Author: Michael Barabanov <michael.barabanov (at) windriver.com>
      6 
      7  * Licensed under the Apache License, Version 2.0 (the "License");
      8  * you may not use this file except in compliance with the License.
      9  * You may obtain a copy of the License at
     10  *
     11  *      http://www.apache.org/licenses/LICENSE-2.0
     12  *
     13  * Unless required by applicable law or agreed to in writing, software
     14  * distributed under the License is distributed on an "AS IS" BASIS,
     15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
     16  * express or implied.
     17  * See the License for the specific language governing permissions
     18  */
     19 
     20 /* ------------------------------------------------------------------
     21  * Copyright (C) 2008 PacketVideo
     22  *
     23  * Licensed under the Apache License, Version 2.0 (the "License");
     24  * you may not use this file except in compliance with the License.
     25  * You may obtain a copy of the License at
     26  *
     27  *      http://www.apache.org/licenses/LICENSE-2.0
     28  *
     29  * Unless required by applicable law or agreed to in writing, software
     30  * distributed under the License is distributed on an "AS IS" BASIS,
     31  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
     32  * express or implied.
     33  * See the License for the specific language governing permissions
     34  * and limitations under the License.
     35  * -------------------------------------------------------------------
     36  */
     37 
     38 #ifndef ANDROID_SURFACE_OUTPUT_OMAP34XXH_INCLUDED
     39 #define ANDROID_SURFACE_OUTPUT_OMAP34XXH_INCLUDED
     40 
     41 #include "android_surface_output.h"
     42 #include "buffer_alloc_omap34xx.h"
     43 
     44 // support for shared contiguous physical memory
     45 #include <ui/Overlay.h>
     46 
     47 
     48 class AndroidSurfaceOutputOmap34xx : public AndroidSurfaceOutput
     49 {
     50     public:
     51         AndroidSurfaceOutputOmap34xx();
     52 
     53         // frame buffer interface
     54         virtual bool initCheck();
     55         virtual void setParametersSync(PvmiMIOSession aSession, PvmiKvp* aParameters, int num_elements, PvmiKvp * & aRet_kvp);
     56         virtual PVMFStatus getParametersSync(PvmiMIOSession aSession, PvmiKeyType aIdentifier,
     57                 PvmiKvp*& aParameters, int& num_parameter_elements, PvmiCapabilityContext aContext);
     58         virtual PVMFStatus writeFrameBuf(uint8* aData, uint32 aDataLen, const PvmiMediaXferHeader& data_header_info);
     59 
     60         virtual void closeFrameBuf();
     61         virtual void postLastFrame();
     62 
     63         OSCL_IMPORT_REF ~AndroidSurfaceOutputOmap34xx();
     64     private:
     65         bool                    mUseOverlay;
     66         sp<Overlay>             mOverlay;
     67         int                     bufEnc;
     68 
     69         int32                   iNumberOfBuffers;
     70         int32                   iBufferSize;
     71         bool                    mIsFirstFrame;
     72         bool                    mConvert;
     73     public:
     74         BufferAllocOmap34xx     mbufferAlloc;
     75 };
     76 
     77 #endif // ANDROID_SURFACE_OUTPUT_OMAP34XX_H_INCLUDED
     78