Home | History | Annotate | Download | only in h264enc
      1 /*
      2  *
      3  * Copyright 2010 Samsung Electronics S.LSI Co. LTD
      4  *
      5  * Licensed under the Apache License, Version 2.0 (the "License");
      6  * you may not use this file except in compliance with the License.
      7  * You may obtain a copy of the License at
      8  *
      9  *      http://www.apache.org/licenses/LICENSE-2.0
     10  *
     11  * Unless required by applicable law or agreed to in writing, software
     12  * distributed under the License is distributed on an "AS IS" BASIS,
     13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14  * See the License for the specific language governing permissions and
     15  * limitations under the License.
     16  */
     17 
     18 /*
     19  * @file        SEC_OMX_H264enc.h
     20  * @brief
     21  * @author      SeungBeom Kim (sbcrux.kim (at) samsung.com)
     22  * @version     1.0
     23  * @history
     24  *   2010.7.15 : Create
     25  */
     26 
     27 #ifndef SEC_OMX_H264_ENC_COMPONENT
     28 #define SEC_OMX_H264_ENC_COMPONENT
     29 
     30 #include "SEC_OMX_Def.h"
     31 #include "OMX_Component.h"
     32 #include "OMX_Video.h"
     33 #include "SsbSipMfcApi.h"
     34 
     35 
     36 typedef struct _EXTRA_DATA
     37 {
     38     OMX_PTR pHeaderSPS;
     39     OMX_U32 SPSLen;
     40     OMX_PTR pHeaderPPS;
     41     OMX_U32 PPSLen;
     42 } EXTRA_DATA;
     43 
     44 typedef struct _SEC_MFC_H264ENC_HANDLE
     45 {
     46     OMX_HANDLETYPE hMFCHandle;
     47     SSBSIP_MFC_ENC_H264_PARAM mfcVideoAvc;
     48     SSBSIP_MFC_ENC_INPUT_INFO inputInfo;
     49 /*    SSBSIP_MFC_ENC_OUTPUT_INFO outputInfo; */
     50     OMX_U32 indexTimestamp;
     51     OMX_BOOL bConfiguredMFC;
     52     EXTRA_DATA headerData;
     53     OMX_S32 returnCodec;
     54 } SEC_MFC_H264ENC_HANDLE;
     55 
     56 typedef struct _SEC_H264ENC_HANDLE
     57 {
     58     /* OMX Codec specific */
     59     OMX_VIDEO_PARAM_AVCTYPE AVCComponent[ALL_PORT_NUM];
     60     OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE errorCorrectionType[ALL_PORT_NUM];
     61 
     62     /* SEC MFC Codec specific */
     63     SEC_MFC_H264ENC_HANDLE hMFCH264Handle;
     64 
     65     /* For Non-Block mode */
     66     SEC_MFC_NBENC_THREAD NBEncThread;
     67     OMX_BOOL bFirstFrame;
     68     MFC_ENC_INPUT_BUFFER MFCEncInputBuffer[MFC_INPUT_BUFFER_NUM_MAX];
     69     OMX_U32  indexInputBuffer;
     70 } SEC_H264ENC_HANDLE;
     71 
     72 #ifdef __cplusplus
     73 extern "C" {
     74 #endif
     75 
     76 OSCL_EXPORT_REF OMX_ERRORTYPE SEC_OMX_ComponentInit(OMX_HANDLETYPE hComponent, OMX_STRING componentName);
     77 OMX_ERRORTYPE SEC_OMX_ComponentDeinit(OMX_HANDLETYPE hComponent);
     78 
     79 #ifdef __cplusplus
     80 };
     81 #endif
     82 
     83 #endif
     84