videoeditorengine/avcedit/inc/avcdapi.h
changeset 0 951a5db380a0
equal deleted inserted replaced
-1:000000000000 0:951a5db380a0
       
     1 /*
       
     2 * Copyright (c) 2010 Ixonos Plc.
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - Initial contribution
       
    11 *
       
    12 * Contributors:
       
    13 * Ixonos Plc
       
    14 *
       
    15 * Description:
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifdef __cplusplus
       
    21 extern "C" {
       
    22 #endif
       
    23 
       
    24 #ifndef _AVCDECODER_H_
       
    25 #define _AVCDECODER_H_
       
    26 
       
    27 //#include <e32std.h>
       
    28 #include <e32def.h>
       
    29 
       
    30 
       
    31 #define AVCD_ERROR                       -1
       
    32 #define AVCD_OK                          0
       
    33 #define AVCD_OK_STREAM_NOT_DECODED       1
       
    34 #define AVCD_OK_FRAME_NOT_AVAILABLE      2
       
    35 
       
    36 #define AVCD_PICTURE_TYPE_P              0
       
    37 #define AVCD_PICTURE_TYPE_I              1
       
    38 
       
    39 #define AVCD_PROFILE_BASELINE            66
       
    40 #define AVCD_PROFILE_MAIN                77
       
    41 #define AVCD_PROFILE_EXTENDED            88
       
    42 #define AVCD_PROFILE_HIGH                100
       
    43 #define AVCD_PROFILE_HIGH_10             110
       
    44 #define AVCD_PROFILE_HIGH_422            122
       
    45 #define AVCD_PROFILE_HIGH_444            144
       
    46 
       
    47 
       
    48 typedef void avcdDecoder_t;
       
    49 
       
    50 avcdDecoder_t *avcdOpen();
       
    51 
       
    52 void avcdClose(avcdDecoder_t *dec);
       
    53 
       
    54 TInt avcdParseLevel(avcdDecoder_t *dec, void *nalUnitBits, TUint* nalUnitLen, TInt& aLevel);
       
    55 
       
    56 TInt avcdParseResolution(avcdDecoder_t *dec, void *nalUnitBits, TUint* nalUnitLen, 
       
    57                          TInt& aWidth, TInt& aHeight);
       
    58 
       
    59 #ifdef VIDEOEDITORENGINE_AVC_EDITING
       
    60 
       
    61 TInt avcdParseParameterSet(avcdDecoder_t *dec, void *nalUnitBits, TUint* nalUnitLen);
       
    62                     
       
    63 TInt avcdParseOneNal(avcdDecoder_t *dec, void *nalUnitBits, TUint* nalUnitLen);
       
    64 
       
    65                     
       
    66 void FrameIsFromEncoder(avcdDecoder_t *dec, TUint aFromEncoder);
       
    67 
       
    68 
       
    69 
       
    70 TUint8* ReturnPPSSet(avcdDecoder_t *dec, TUint aIndex, TUint* aPPSLength);
       
    71 
       
    72 TUint ReturnNumPPS(avcdDecoder_t *dec);
       
    73 
       
    74 TUint8* ReturnSPSSet(avcdDecoder_t *dec, TUint aIndex, TUint* aSPSLength);
       
    75 
       
    76 TUint ReturnNumSPS(avcdDecoder_t *dec);
       
    77 
       
    78 TBool ReturnEncodeUntilIDR(avcdDecoder_t *dec);
       
    79 
       
    80 TInt avcdGenerateNotCodedFrame(avcdDecoder_t *dec, void *aNalUnitBits, TUint aNalUnitLen, TUint aFrameNumber);
       
    81 
       
    82 TInt avcdStoreCurrentPPSId(avcdDecoder_t *dec, TUint8 *nalUnitBits, TUint aNalUnitLen);
       
    83 
       
    84 void avcdModifyFrameNumber(avcdDecoder_t *dec, void *aNalUnitBits, TUint aNalUnitLen, TUint aFrameNumber);
       
    85 
       
    86 #endif // VIDEOEDITORENGINE_AVC_EDITING
       
    87 
       
    88 #endif
       
    89 
       
    90 
       
    91 #ifdef __cplusplus
       
    92 }
       
    93 #endif