diff options
author | hongteng <hongteng@google.com> | 2011-04-22 13:48:46 -0700 |
---|---|---|
committer | hongteng <hongteng@google.com> | 2011-04-22 13:48:46 -0700 |
commit | 0a389ab70db304fb840e33f33781ecc0503eae3c (patch) | |
tree | 85ef41c9a4b6a32c9647fe81c6330cb110aa94fa /libvideoeditor/vss/mcs/src/M4MCS_API.c | |
parent | 3b25fdc4a33b53cfcf67315c2d42ad699b8cefe2 (diff) | |
download | frameworks_av-0a389ab70db304fb840e33f33781ecc0503eae3c.zip frameworks_av-0a389ab70db304fb840e33f33781ecc0503eae3c.tar.gz frameworks_av-0a389ab70db304fb840e33f33781ecc0503eae3c.tar.bz2 |
Fix for issue 3385135 "source code cleanup" engine part
- Removed below unused functions
a. M4PTO3GPP_RegisterExternalVideoEncoder
b. M4VSS3GPP_editRegisterExternalVideoDecoder
c. M4VSS3GPP_editRegisterExternalVideoEncoder
d. M4VSS3GPP_extractPictureRegisterExternalVideoDecoder
e. M4VSS3GPP_editRegisterExternalCodec
f. M4VSS3GPP_editSubscribeExternalCodecs
g. M4VSS3GPP_intSubscribeExternalCodecs
h. M4VSS3GPP_intClipRegisterExternalVideoDecoder
i. M4xVSS_RegisterExternalVideoDecoder
j. M4xVSS_RegisterExternalVideoEncoder
k. M4MCS_registerExternalVideoDecoder
l. M4MCS_registerExternalVideoEncoder
m. M4MCS_registerExternalAudioDecoder
n. M4MCS_registerExternalAudioEncoder
o. M4DECODER_EXTERNAL_getInterface
- Also remove small code associated with these functions and Remove below unsused src + header files
a. M4CLOCK.h
b. M4MDP_API.h
c. M4VD_EXTERNAL_Internal.h
d. M4VD_HW_API.h
e. M4VE_API.h
f. M4_Logo.h
g. M4VD_EXTERNAL_Interface.c
h. LV_Types.h
i. M4OSA_FileAccess.h
j. M4OSA_FileCache.h
k. M4OSA_FileExtra.h
l. M4OSA_FileReaderRam.h
m. M4OSA_FileWriterRam.h
n. M4OSA_String.h
o. M4OSA_String_priv.h
p. M4OSA_FileCache.c
q. M4OSA_FileExtra.c
r. M4OSA_FileReader_RAM.c
s. M4OSA_FileWriter_RAM.c
t. M4OSA_String.c
u. M4OSA_String_priv.c
Change-Id: I7271cbe92168e665a8e5b7afe7c7fe1c331eaa1e
Diffstat (limited to 'libvideoeditor/vss/mcs/src/M4MCS_API.c')
-rwxr-xr-x | libvideoeditor/vss/mcs/src/M4MCS_API.c | 296 |
1 files changed, 0 insertions, 296 deletions
diff --git a/libvideoeditor/vss/mcs/src/M4MCS_API.c b/libvideoeditor/vss/mcs/src/M4MCS_API.c index 91e3b96..db6d92f 100755 --- a/libvideoeditor/vss/mcs/src/M4MCS_API.c +++ b/libvideoeditor/vss/mcs/src/M4MCS_API.c @@ -10799,299 +10799,3 @@ M4OSA_ERR M4MCS_open_normalMode(M4MCS_Context pContext, M4OSA_Void* pFileIn, return M4NO_ERROR; } - -M4OSA_ERR M4MCS_registerExternalVideoDecoder( M4MCS_Context pContext, - M4VD_VideoType decoderType, - M4VD_Interface *pDecoderInterface, - M4OSA_Void *pUserData ) -{ -#ifdef M4VSS_ENABLE_EXTERNAL_DECODERS - - M4OSA_ERR err = M4NO_ERROR; - M4DECODER_VideoInterface *shellInterface; - M4DECODER_VideoType nativeType; - M4DECODER_EXTERNAL_UserDataType shellUserData; - - switch( decoderType ) - { - case M4VD_kMpeg4VideoDec: - case M4VD_kH263VideoDec: - nativeType = M4DECODER_kVideoTypeMPEG4; - break; - - case M4VD_kH264VideoDec: - nativeType = M4DECODER_kVideoTypeAVC; - break; - - default: - M4OSA_TRACE1_1( - "M4MCS_registerExternalVideoDecoder: unknown decoderType %d", - decoderType); - return M4ERR_PARAMETER; - break; - } - - shellUserData = - (M4DECODER_EXTERNAL_UserDataType)M4OSA_32bitAlignedMalloc(sizeof(*shellUserData), - M4MCS, - (M4OSA_Char *)"userData structure for the external shell decoder"); - - if( M4OSA_NULL == shellUserData ) - { - M4OSA_TRACE1_0( - "M4MCS_registerExternalVideoDecoder:\ - failed to allocate userData structure for the external shell decoder"); - return M4ERR_ALLOC; - } - - shellUserData->externalFuncs = pDecoderInterface; - shellUserData->externalUserData = pUserData; - - err = M4DECODER_EXTERNAL_getInterface(&shellInterface); - - if( M4NO_ERROR != err ) - { - M4OSA_TRACE1_1( - "M4MCS_registerExternalVideoDecoder:\ - M4DECODER_EXTERNAL_getInterface failed with error 0x%08X", - err); - free(shellUserData); - return err; - } - - err = M4MCS_registerVideoDecoder(pContext, nativeType, shellInterface); - - if( M4NO_ERROR != err ) - { - M4OSA_TRACE1_1( - "M4MCS_registerExternalVideoDecoder:\ - M4MCS_registerVideoDecoder failed with error 0x%08X", - err); - free(shellInterface); - free(shellUserData); - return err; - } - - ( (M4MCS_InternalContext - *)pContext)->m_pVideoDecoderUserDataTable[nativeType] = shellUserData; - - return M4NO_ERROR; -#else - - return M4ERR_NOT_IMPLEMENTED; - -#endif /* M4VSS_ENABLE_EXTERNAL_DECODERS */ - -} - -M4OSA_ERR M4MCS_registerExternalVideoEncoder( M4MCS_Context pContext, - M4VE_EncoderType encoderType, - M4VE_Interface *pEncoderInterface, - M4OSA_Void *pUserData ) -{ -#ifdef M4VSS_ENABLE_EXTERNAL_ENCODERS - - M4OSA_ERR err = M4NO_ERROR; - M4ENCODER_GlobalInterface *shellInterface; - M4ENCODER_Format nativeType; - - switch( encoderType ) - { - case M4VE_kH263VideoEnc: - err = M4EGE_H263_getInterfaces(&nativeType, &shellInterface, - M4ENCODER_OPEN_ADVANCED); - - break; - - case M4VE_kMpeg4VideoEnc: - err = M4EGE_MPEG4_getInterfaces(&nativeType, &shellInterface, - M4ENCODER_OPEN_ADVANCED); - break; - - case M4VE_kH264VideoEnc: - M4OSA_TRACE1_0( - "M4MCS_registerExternalVideoEncoder: H264 encoder type not implemented yet"); - return M4ERR_NOT_IMPLEMENTED; - break; - - default: - M4OSA_TRACE1_1( - "M4MCS_registerExternalVideoEncoder: unknown encoderType %d", - encoderType); - return M4ERR_PARAMETER; - break; - } - - if( M4NO_ERROR != err ) - { - M4OSA_TRACE1_1( - "M4MCS_registerExternalVideoDecoder: M4EGE_getInterface failed with error 0x%08X", - err); - return err; - } - - err = M4MCS_registerVideoEncoder(pContext, nativeType, shellInterface); - - if( M4NO_ERROR != err ) - { - M4OSA_TRACE1_1( - "M4MCS_registerExternalVideoEncoder:\ - M4MCS_registerVideoEncoder failed with error 0x%08X", - err); - free(shellInterface); - return err; - } - - ( (M4MCS_InternalContext - *)pContext)->pVideoEncoderExternalAPITable[nativeType] - = pEncoderInterface; - ( (M4MCS_InternalContext - *)pContext)->pVideoEncoderUserDataTable[nativeType] = pUserData; - - return M4NO_ERROR; - -#else - - return M4ERR_NOT_IMPLEMENTED; - -#endif - -} - -/** - ************************************************************************ - * M4OSA_ERR M4MCS_registerExternalAudioDecoder(M4MCS_Context pContext, - * M4AD_Type decoderType, - * M4AD_Interface *pDecoderInterface); - * @brief This function will register a specific external audio decoder. - * @note According to the decoderType, this function will store in the internal context the - * decoder interface. - * @param context (IN/OUT) MCS context. - * @param decoderType (IN) Audio decoder type - * @param pDecoderInterface (IN) Audio decoder interface. - * @return M4NO_ERROR: No error - * @return M4ERR_PARAMETER: A parameter is null, or the decoder type is invalid - * (in DEBUG only) - ************************************************************************ - */ -M4OSA_ERR M4MCS_registerExternalAudioDecoder( M4MCS_Context pContext, - M4AD_Type decoderType, - M4AD_Interface *pDecoderInterface ) -{ - M4MCS_InternalContext *pC = (M4MCS_InternalContext *)pContext; - - M4OSA_DEBUG_IF1((M4OSA_NULL == pC), M4ERR_PARAMETER, - "M4MCS_registerExternalAudioDecoder: invalid context pointer"); - M4OSA_DEBUG_IF1((M4OSA_NULL == pDecoderInterface), M4ERR_PARAMETER, - "M4MCS_registerExternalAudioDecoder: invalid pointer on decoder interface"); - - if( M4MCS_kState_CREATED != pC->State ) - { - M4OSA_TRACE1_1( - "M4MCS_registerExternalAudioDecoder(): Wrong State (%d), returning M4ERR_STATE", - pC->State); - return M4ERR_STATE; - } - - if( decoderType >= M4AD_kType_NB ) - { - M4OSA_DEBUG_IF1(M4OSA_TRUE, M4ERR_PARAMETER, - "M4MCS_registerExternalAudioDecoder: Invalid audio decoder type"); - return M4ERR_PARAMETER; - } - - if( pC->m_pAudioDecoderFlagTable[decoderType] == M4OSA_TRUE - && pC->m_pAudioDecoderItTable[decoderType] != M4OSA_NULL ) - { - M4OSA_TRACE1_1( - "M4MCS_registerExternalAudioDecoder: error parameter: an external decoder of type\ - %i is already registered", - decoderType); - return M4ERR_PARAMETER; - } - - if( pC->m_pAudioDecoderItTable[decoderType] != M4OSA_NULL ) - { - free(pC->m_pAudioDecoderItTable[decoderType]); - pC->m_pAudioDecoderItTable[decoderType] = M4OSA_NULL; - } - - pC->m_pAudioDecoderItTable[decoderType] = pDecoderInterface; - pC->m_pAudioDecoderFlagTable[decoderType] = - M4OSA_TRUE; /* external decoder */ - - return M4NO_ERROR; -} - -/** - ****************************************************************************** - * M4OSA_ERR M4MCS_registerExternalAudioEncoder(M4MCS_Context pContext, - * M4ENCODER_AudioFormat mediaType, - * M4ENCODER_AudioGlobalInterface *pEncGlobalInterface) - * @brief This function will register a specific external audio encoder. - * @note According to the Mediatype, this function will store in the internal context the - * encoder context. - * @param pContext: (IN) Execution context. - * @param mediaType: (IN) The media type. - * @param pEncGlobalInterface: (OUT) the encoder interface functions. - * @return M4NO_ERROR: there is no error - * @return M4ERR_PARAMETER: pContext or pEncGlobalInterface is M4OSA_NULL (debug only) - ****************************************************************************** - */ -M4OSA_ERR M4MCS_registerExternalAudioEncoder( M4MCS_Context pContext, - M4ENCODER_AudioFormat MediaType, - M4ENCODER_AudioGlobalInterface *pEncGlobalInterface ) -{ - M4MCS_InternalContext *pC = (M4MCS_InternalContext *)pContext; - - /** - * Check input parameters */ - M4OSA_DEBUG_IF2((pC == M4OSA_NULL), M4ERR_PARAMETER, - "MCS: context is M4OSA_NULL in M4MCS_registerExternalAudioEncoder"); - M4OSA_DEBUG_IF2((pEncGlobalInterface == M4OSA_NULL), M4ERR_PARAMETER, - "pEncGlobalInterface is M4OSA_NULL in M4MCS_registerExternalAudioEncoder"); - - M4OSA_TRACE3_2( - "MCS: M4MCS_registerExternalAudioEncoder called with pContext=0x%x, \ - pEncGlobalInterface=0x%x", - pC, pEncGlobalInterface); - - if( M4MCS_kState_CREATED != pC->State ) - { - M4OSA_TRACE1_1( - "M4MCS_registerExternalAudioEncoder(): Wrong State (%d), returning M4ERR_STATE", - pC->State); - return M4ERR_STATE; - } - - if( MediaType >= M4ENCODER_kAudio_NB ) - { - M4OSA_DEBUG_IF1(M4OSA_TRUE, M4ERR_PARAMETER, - "M4MCS_registerExternalAudioEncoder(): Invalid audio encoder type"); - return M4ERR_PARAMETER; - } - - if( pC->pAudioEncoderFlag[MediaType] == M4OSA_TRUE - && pC->pAudioEncoderInterface[MediaType] != M4OSA_NULL ) - { - M4OSA_TRACE1_1( - "M4MCS_registerExternalAudioEncoder: error parameter:\ - an external encoder of type %i is already registered", - MediaType); - return M4ERR_PARAMETER; - } - - if( pC->pAudioEncoderInterface[MediaType] != M4OSA_NULL ) - { - free(pC->pAudioEncoderInterface[MediaType]); - pC->pAudioEncoderInterface[MediaType] = M4OSA_NULL; - } - - /* - * Save encoder interface in context */ - pC->pAudioEncoderInterface[MediaType] = pEncGlobalInterface; - pC->pAudioEncoderFlag[MediaType] = M4OSA_TRUE; /* external encoder */ - - return M4NO_ERROR; -} - |