/* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __M4VSS3GPP_EXTENDED_API_H__ #define __M4VSS3GPP_EXTENDED_API_H__ /** ****************************************************************************** * @file M4VSS3GPP_Extended_API.h * @brief API of xVSS * @note ****************************************************************************** */ #ifndef M4VSS_SUPPORT_EXTENDED_FEATURES #error "*** the flag M4VSS_SUPPORT_EXTENDED_FEATURES should be activated in CompilerSwitches\ for VideoStudio ***" #endif /** ****************************************************************************** * prototype M4xVSS_getTextRgbBufferFct * @brief External text to RGB buffer functions implemented by the integrator * must match this prototype. * @note The function is provided with the renderingData, the text buffer and * its size. It must build the output RGB image plane containing the text. * * @param pRenderingData (IN) The data given by the user in M4xVSS_EffectSettings * @param pTextBuffer (IN) Text buffer given by the user in M4xVSS_EffectSettings * @param textBufferSize (IN) Text buffer size given by the user in M4xVSS_EffectSettings * @param pOutputPlane (IN/OUT) Output RGB565 image * @return M4NO_ERROR: No error * @return M4ERR_PARAMETER: At least one parameter is M4OSA_NULL (debug only) ****************************************************************************** */ typedef M4OSA_ERR (*M4xVSS_getTextRgbBufferFct) ( M4OSA_Void *pRenderingData, M4OSA_Void *pTextBuffer, M4OSA_UInt32 textBufferSize, M4VIFI_ImagePlane **pOutputPlane ); /** ****************************************************************************** * struct M4xVSS_BGMSettings * @brief This structure gathers all the information needed to add Background music to 3gp file ****************************************************************************** */ typedef struct { M4OSA_Void *pFile; /**< Input file path */ M4VIDEOEDITING_FileType FileType; /**< .3gp, .amr, .mp3 */ M4OSA_UInt32 uiAddCts; /**< Time, in milliseconds, at which the added audio track is inserted */ M4OSA_UInt32 uiAddVolume; /**< Volume, in percentage, of the added audio track */ M4OSA_UInt32 uiBeginLoop; /**< Describes in milli-second the start time of the loop */ M4OSA_UInt32 uiEndLoop; /**< Describes in milli-second the end time of the loop (0 means no loop) */ M4OSA_Bool b_DuckingNeedeed; M4OSA_Int32 InDucking_threshold; /**< Threshold value at which background music shall duck */ M4OSA_Float lowVolume; /**< lower the background track to this factor and increase the primary track to inverse of this factor */ M4OSA_Bool bLoop; M4OSA_UInt32 uiSamplingFrequency; M4OSA_UInt32 uiNumChannels; } M4xVSS_BGMSettings; /** ****************************************************************************** * enum M4VSS3GPP_VideoEffectType * @brief This enumeration defines the video effect types of the VSS3GPP ****************************************************************************** */ typedef enum { M4VSS3GPP_kRGB888 = 0, /**< RGB888 data type */ M4VSS3GPP_kRGB565 = 1 /**< RGB565 data type */ } M4VSS3GPP_RGBType; /** ****************************************************************************** * struct M4xVSS_EffectSettings * @brief This structure defines an audio/video effect for the edition. ****************************************************************************** */ typedef struct { /**< In percent of the cut clip duration */ M4OSA_UInt32 uiStartPercent; /**< In percent of the ((clip duration) - (effect starttime)) */ M4OSA_UInt32 uiDurationPercent; /**< Framing file path (GIF/PNG file), used only if VideoEffectType == framing */ M4OSA_Void *pFramingFilePath; /**< Framing RGB565 buffer, used only if VideoEffectType == framing */ M4VIFI_ImagePlane *pFramingBuffer; /**