summaryrefslogtreecommitdiffstats
path: root/libvideoeditor/vss/mcs/inc
diff options
context:
space:
mode:
Diffstat (limited to 'libvideoeditor/vss/mcs/inc')
-rwxr-xr-xlibvideoeditor/vss/mcs/inc/M4MCS_API.h575
-rwxr-xr-xlibvideoeditor/vss/mcs/inc/M4MCS_ErrorCodes.h123
-rwxr-xr-xlibvideoeditor/vss/mcs/inc/M4MCS_InternalConfig.h75
-rwxr-xr-xlibvideoeditor/vss/mcs/inc/M4MCS_InternalFunctions.h344
-rwxr-xr-xlibvideoeditor/vss/mcs/inc/M4MCS_InternalTypes.h606
5 files changed, 0 insertions, 1723 deletions
diff --git a/libvideoeditor/vss/mcs/inc/M4MCS_API.h b/libvideoeditor/vss/mcs/inc/M4MCS_API.h
deleted file mode 100755
index a8987e2..0000000
--- a/libvideoeditor/vss/mcs/inc/M4MCS_API.h
+++ /dev/null
@@ -1,575 +0,0 @@
-/*
- * 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.
- */
-
-/**
- ******************************************************************************
- * @file M4MCS_API.h
- * @brief Media Conversion Service public API.
- * @note MCS allows transcoding a 3gp/mp4 file into a new 3gp/mp4 file changing the
- * video and audio encoding settings.
- * It is a straightforward and fully synchronous API.
- ******************************************************************************
- */
-
-#ifndef __M4MCS_API_H__
-#define __M4MCS_API_H__
-
-/**
- * OSAL basic types and errors */
-#include "M4OSA_Types.h"
-#include "M4OSA_Error.h"
-
-/**
- * OSAL types for file access */
-#include "M4OSA_FileReader.h"
-#include "M4OSA_FileWriter.h"
-
-/**
- * Definition of M4_VersionInfo */
-#include "M4TOOL_VersionInfo.h"
-
-/**
- * Common definitions of video editing components */
-#include "M4_VideoEditingCommon.h"
-
-/**
- * To enable external audio codecs registering*/
-#include "M4AD_Common.h"
-#include "M4ENCODER_AudioCommon.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Public type of the MCS context */
-typedef M4OSA_Void* M4MCS_Context;
-
-
-/**
- ******************************************************************************
- * enum M4MCS_MediaRendering
- * @brief This enum defines different media rendering
- ******************************************************************************
- */
-typedef enum
-{
- M4MCS_kResizing = 0, /**< The media is resized, the aspect ratio can be
- different from the original one.
- All of the media is rendered */
- M4MCS_kCropping, /**< The media is cropped, the aspect ratio is the
- same as the original one.
- The media is not rendered entirely */
- M4MCS_kBlackBorders /**< Black borders are rendered in order to keep the
- original aspect ratio. All the media is rendered */
-} M4MCS_MediaRendering;
-
-
-/**
- ******************************************************************************
- * struct M4MCS_ExternalProgress
- * @brief This structure contains information provided to the external Effect functions
- * @note The uiProgress value should be enough for most cases
- ******************************************************************************
- */
-typedef struct
-{
- M4OSA_UInt32 uiProgress; /**< Progress of the Effect from 0 to 1000 (one thousand) */
- M4OSA_UInt32 uiClipTime; /**< Current time, in milliseconds,
- in the current clip time-line */
- M4OSA_UInt32 uiOutputTime; /**< Current time, in milliseconds,
- in the output clip time-line */
-
-} M4MCS_ExternalProgress;
-
-
-/**
- ******************************************************************************
- * enum M4MCS_AudioEffectType
- * @brief This enumeration defines the audio effect types of the MCS
- ******************************************************************************
- */
-typedef enum
-{
- M4MCS_kAudioEffectType_None = 0,
- M4MCS_kAudioEffectType_FadeIn = 8, /**< Intended for begin effect */
- M4MCS_kAudioEffectType_FadeOut = 16, /**< Intended for end effect */
- M4MCS_kAudioEffectType_External = 256
-
-} M4MCS_AudioEffectType;
-
-
-/**
- ******************************************************************************
- * prototype M4MCS_editAudioEffectFct
- * @brief Audio effect functions implemented by the integrator
- * must match this prototype.
- * @note The function is provided with the original PCM data buffer and its size.
- * Audio effect have to be applied on it.
- * The progress of the effect is given, on a scale from 0 to 1000.
- * When the effect function is called, all the buffers are valid and
- * owned by the MCS.
- *
- * @param pFunctionContext (IN) The function context, previously set by the integrator
- * @param pPCMdata (IN/OUT) valid PCM data buffer
- * @param uiPCMsize (IN/OUT) PCM data buffer corresponding size
- * @param pProgress (IN) Set of information about the audio effect progress.
- *
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: At least one parameter is M4OSA_NULL (debug only)
- ******************************************************************************
- */
-typedef M4OSA_ERR (*M4MCS_editAudioEffectFct)
-(
- M4OSA_Void *pFunctionContext,
- M4OSA_Int16 *pPCMdata,
- M4OSA_UInt32 uiPCMsize,
- M4MCS_ExternalProgress *pProgress
-);
-
-
-/**
- ******************************************************************************
- * struct M4MCS_EffectSettings
- * @brief This structure defines an audio effect for the edition.
- ******************************************************************************
- */
-typedef struct
-{
- M4OSA_UInt32 uiStartTime; /**< In ms */
- M4OSA_UInt32 uiDuration; /**< In ms */
- M4MCS_editAudioEffectFct ExtAudioEffectFct; /**< External effect function */
- M4OSA_Void *pExtAudioEffectFctCtxt; /**< Context given to the external
- effect function */
- M4MCS_AudioEffectType AudioEffectType; /**< None, FadeIn, FadeOut */
-
-} M4MCS_EffectSettings;
-
-
-/**
- ******************************************************************************
- * struct M4MCS_OutputParams
- * @brief MCS Output parameters
- * @note Following parameters are used for still picture inputs :
- * - OutputFileType (must be set to M4VIDEOEDITING_kFileType_JPG)
- * - bDiscardExif must be set to M4OSA_TRUE or M4OSA_FALSE
- * - bAdjustOrientation must be set to M4OSA_TRUE or M4OSA_FALSE
- * - (MediaRendering is not handled : output image resolution is always
- set according to BestFit criteria)
- * bDiscardExif and bAdjustOrientation are still picture only parameters
- ******************************************************************************
- */
-typedef struct
-{
- /**< Format of the output file */
- M4VIDEOEDITING_FileType OutputFileType;
- /**< Output video compression format, see enum */
- M4VIDEOEDITING_VideoFormat OutputVideoFormat;
- /**< Output frame size : QQVGA, QCIF or SQCIF */
- M4VIDEOEDITING_VideoFrameSize OutputVideoFrameSize;
- /**< Targeted Output framerate, see enum */
- M4VIDEOEDITING_VideoFramerate OutputVideoFrameRate;
- /**< Format of the audio in the stream */
- M4VIDEOEDITING_AudioFormat OutputAudioFormat;
- /**< Sampling frequency of the audio in the stream */
- M4VIDEOEDITING_AudioSamplingFrequency OutputAudioSamplingFrequency;
- /**< Set to M4OSA_TRUE if the output audio is mono */
- M4OSA_Bool bAudioMono;
- /**< Output PCM file if not NULL */
- M4OSA_Char *pOutputPCMfile;
- /**< To crop, resize, or render black borders*/
- M4MCS_MediaRendering MediaRendering;
- /**< List of effects */
- M4MCS_EffectSettings *pEffects;
- /**< Number of effects in the above list */
- M4OSA_UInt8 nbEffects;
-
- /*--- STILL PICTURE ---*/
- /**< TRUE: Even if the input file contains an EXIF section,
- the output file won't contain any EXIF section.*/
- M4OSA_Bool bDiscardExif ;
-
- /**< =TRUE : picture must be rotated if Exif tags hold a rotation info
- (and rotation info is set to 0)*/
- M4OSA_Bool bAdjustOrientation ;
- /*--- STILL PICTURE ---*/
- M4OSA_Int32 outputVideoProfile;
- M4OSA_Int32 outputVideoLevel;
-} M4MCS_OutputParams;
-
-/*--- STILL PICTURE ---*/
-/**
- ******************************************************************************
- * enum M4MCS_SPOutputResolution
- * @brief Still picture specific : MCS output targeted file resolution
- ******************************************************************************
- */
-typedef enum
-{
- M4MCS_kResSameAsInput = 0x00, /*width x height*/
- M4MCS_kResQVGA = 0x01, /*320x240*/
- M4MCS_kResVGA = 0x02, /*640x480*/
- M4MCS_kResWQVGA = 0x03, /*400x240*/
- M4MCS_kResWVGA = 0x04, /*800x480*/
- M4MCS_kResXGA = 0x05, /*1024x768*/
- M4MCS_kResCustom = 0xFF /*Size is set via StillPictureCustomWidth/Height*/
-} M4MCS_SPOutputResolution ;
-
-
-/**
- ******************************************************************************
- * enum M4MCS_SPStrategy
- * @brief Still picture specific : MCS strategy to configure the encoding parameters
- ******************************************************************************
- */
-typedef enum
-{
- M4MCS_kFileSizeOnlyFixed = 0x00, /*StillPictureResolution and
- QualityFactor are ignored*/
- M4MCS_kFileSizeAndResFixed = 0x01, /*QualityFactor is ignored*/
- M4MCS_kQualityAndResFixed = 0x02 /*OutputFileSize is ignored*/
-} M4MCS_SPStrategy ;
-
-
-/**
- ******************************************************************************
- * enum M4MCS_SPCrop
- * @brief Still picture specific : indicate whether cropping should be done
- before changing the resolution
- ******************************************************************************
- */
-typedef enum
-{
- M4MCS_kNoCrop = 0x00, /*No Cropping is performed*/
- M4MCS_kCropBeforeResize = 0x01 /*Input image is cropped (before changing resolution)*/
-} M4MCS_SPCrop ;
-
-
-/**
- ******************************************************************************
- * struct M4MCS_EncodingParams
- * @brief MCS file size, bitrate and cut parameters
- * @note Following parameters are used for still picture inputs :
- * - OutputFileSize
- * - StillPictureResolution
- * - QualityFactor
- * - StillPictureStrategy
- * - StillPictureCustomWidth/Height (if StillPictureResolution==M4MCS_kResCustom)
- * Still picture only parameters : StillPictureResolution, QualityFactor,
- * StillPictureStrategy and StillPictureCustomWidth/Height
- ******************************************************************************
- */
-typedef struct
-{
- M4VIDEOEDITING_Bitrate OutputVideoBitrate; /**< Targeted video bitrate */
- M4VIDEOEDITING_Bitrate OutputAudioBitrate; /**< Targeted audio bitrate */
- M4OSA_UInt32 BeginCutTime; /**< Beginning cut time in input file */
- M4OSA_UInt32 EndCutTime; /**< End cut time in input file */
- M4OSA_UInt32 OutputFileSize; /**< Expected resulting file size */
- M4OSA_UInt32 OutputVideoTimescale; /**< Optional parameter used to fix a
- timescale during transcoding */
-
- /*--- STILL PICTURE ---*/
- M4OSA_Int32 QualityFactor ; /**< =-1 (undefined) or 0(lowest)..
- 50(best) : This parameter is the
- quality indication for the JPEG output
- file (if =-1 the MCS will set quality
- automatically)*/
- M4MCS_SPStrategy StillPictureStrategy ; /**< Defines which input parameters
- will be taken into account by MCS*/
- M4MCS_SPOutputResolution StillPictureResolution;/**< Desired output resolution for
- a still picture file */
- /**< (only if Resolution==M4MCS_kResCustom) : Custom output image width */
- M4OSA_UInt32 StillPictureCustomWidth;
- /**< (only if Resolution==M4MCS_kResCustom) : Custom output image height */
- M4OSA_UInt32 StillPictureCustomHeight;
- /**< Indicate whether Crop should be performed */
- M4MCS_SPCrop StillPictureCrop;
- /**< (only if cropping) X coordinate of topleft corner of the crop window */
- M4OSA_UInt32 StillPictureCrop_X;
- /**< (only if cropping) Y coordinate of topleft corner of the crop window */
- M4OSA_UInt32 StillPictureCrop_Y;
- /**< (only if cropping) Width of the crop window (in pixels) */
- M4OSA_UInt32 StillPictureCrop_W;
- /**< (only if cropping) Height of the crop window (in pixels) */
- M4OSA_UInt32 StillPictureCrop_H;
- /*--- STILL PICTURE ---*/
-} M4MCS_EncodingParams;
-
-/**
- ******************************************************************************
- * M4OSA_ERR M4MCS_getVersion(M4_VersionInfo* pVersionInfo);
- * @brief Get the MCS version.
- * @note Can be called anytime. Do not need any context.
- * @param pVersionInfo (OUT) Pointer to a version info structure
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: pVersionInfo is M4OSA_NULL (If Debug Level >= 2)
- ******************************************************************************
- */
-M4OSA_ERR M4MCS_getVersion(M4_VersionInfo* pVersionInfo);
-
-/**
- ******************************************************************************
- * M4OSA_ERR M4MCS_init(M4MCS_Context* pContext, M4OSA_FileReadPointer* pFileReadPtrFct,
- M4OSA_FileWriterPointer* pFileWritePtrFct);
- * @brief Initializes the MCS (allocates an execution context).
- * @note
- * @param pContext (OUT) Pointer on the MCS context to allocate
- * @param pFileReadPtrFct (IN) Pointer to OSAL file reader functions
- * @param pFileWritePtrFct (IN) Pointer to OSAL file writer functions
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: At least one parameter is M4OSA_NULL (If Debug Level >= 2)
- * @return M4ERR_ALLOC: There is no more available memory
- ******************************************************************************
- */
-M4OSA_ERR M4MCS_init(M4MCS_Context* pContext, M4OSA_FileReadPointer* pFileReadPtrFct,
- M4OSA_FileWriterPointer* pFileWritePtrFct);
-
-/**
- ******************************************************************************
- * M4OSA_ERR M4MCS_open(M4MCS_Context pContext, M4OSA_Void* pFileIn, M4OSA_Void* pFileOut,
- M4OSA_UInt32 uiMaxMetadataSize);
- * @brief Set the MCS input and output files.
- * @note It opens the input file, but the output file is not created yet.
- * In case of still picture, four InputFileType are possible
- * (M4VIDEOEDITING_kFileType_JPG/BMP/GIF/PNG
- * If one of them is set, the OutputFileType SHALL be set to M4VIDEOEDITING_kFileType_JPG
- * @param pContext (IN) MCS context
- * @param pFileIn (IN) Input file to transcode (The type of this parameter
- * (URL, pipe...) depends on the OSAL implementation).
- * @param mediaType (IN) Container type (.3gp,.amr, ...) of input file.
- * @param pFileOut (IN) Output file to create (The type of this parameter
- * (URL, pipe...) depends on the OSAL implementation).
- * @param pTempFile (IN) Temporary file for the constant memory writer to store
- * metadata ("moov.bin").
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: At least one parameter is M4OSA_NULL (debug only)
- * @return M4ERR_STATE: MCS is not in an appropriate state for this function to be called
- * @return M4ERR_ALLOC: There is no more available memory
- * @return M4ERR_FILE_NOT_FOUND: The input file has not been found
- * @return M4MCS_ERR_INVALID_INPUT_FILE: The input file is not a valid file, or is corrupted
- * @return M4MCS_ERR_INPUT_FILE_CONTAINS_NO_SUPPORTED_STREAM: The input file contains no
- * supported audio or video stream
- ******************************************************************************
- */
-M4OSA_ERR M4MCS_open(M4MCS_Context pContext, M4OSA_Void* pFileIn,
- M4VIDEOEDITING_FileType InputFileType,
- M4OSA_Void* pFileOut, M4OSA_Void* pTempFile);
-
-/**
- ******************************************************************************
- * M4OSA_ERR M4MCS_step(M4MCS_Context pContext, M4OSA_UInt8 *pProgress);
- * @brief Perform one step of trancoding.
- * @note
- * @param pContext (IN) MCS context
- * @param pProgress (OUT) Progress percentage (0 to 100) of the transcoding
- * @note pProgress must be a valid address.
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: One of the parameters is M4OSA_NULL (debug only)
- * @return M4ERR_STATE: MCS is not in an appropriate state for this function to be called
- * @return M4MCS_WAR_TRANSCODING_DONE: Transcoding is over, user should now call M4MCS_close()
- * @return M4MCS_ERR_AUDIO_CONVERSION_FAILED: The audio conversion (AAC to AMR-NB, MP3) failed
- * @return M4MCS_ERR_INVALID_AAC_SAMPLING_FREQUENCY: The input file contains an AAC audio track
- * with an invalid sampling frequency
- * (should never happen)
- * @return M4MCS_WAR_PICTURE_AUTO_RESIZE: Picture will be automatically resized to fit
- * into requirements
- ******************************************************************************
- */
-M4OSA_ERR M4MCS_step(M4MCS_Context pContext, M4OSA_UInt8 *pProgress);
-
-/**
- ******************************************************************************
- * M4OSA_ERR M4MCS_pause(M4MCS_Context pContext);
- * @brief Pause the transcoding i.e. release the (external hardware) video decoder.
- * @note This function is not needed if no hardware accelerators are used.
- * In that case, pausing the MCS is simply achieved by temporarily suspending
- * the M4MCS_step function calls.
- * @param pContext (IN) MCS context
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: pContext is M4OSA_NULL (debug only)
- * @return M4ERR_STATE: MCS is not in an appropriate state for this function to be called
- ******************************************************************************
- */
-M4OSA_ERR M4MCS_pause(M4MCS_Context pContext);
-
-/**
- ******************************************************************************
- * M4OSA_ERR M4MCS_resume(M4MCS_Context pContext);
- * @brief Resume the transcoding after a pause (see M4MCS_pause).
- * @note This function is not needed if no hardware accelerators are used.
- * In that case, resuming the MCS is simply achieved by calling
- * the M4MCS_step function.
- * @param pContext (IN) MCS context
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: pContext is M4OSA_NULL (debug only)
- * @return M4ERR_STATE: MCS is not in an appropriate state for this function to be called
- ******************************************************************************
- */
-M4OSA_ERR M4MCS_resume(M4MCS_Context pContext);
-
-/**
- ******************************************************************************
- * M4OSA_ERR M4MCS_close(M4MCS_Context pContext);
- * @brief Finish the MCS transcoding.
- * @note The output 3GPP file is ready to be played after this call
- * @param pContext (IN) MCS context
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: pContext is M4OSA_NULL (If Debug Level >= 2)
- * @return M4ERR_STATE: MCS is not in an appropriate state for this function to be called
- ******************************************************************************
- */
-M4OSA_ERR M4MCS_close(M4MCS_Context pContext);
-
-/**
- ******************************************************************************
- * M4OSA_ERR M4MCS_cleanUp(M4MCS_Context pContext);
- * @brief Free all resources used by the MCS.
- * @note The context is no more valid after this call
- * @param pContext (IN) MCS context
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: pContext is M4OSA_NULL (If Debug Level >= 2)
- * @return M4ERR_STATE: MCS is not in an appropriate state for this function to be called
- ******************************************************************************
- */
-M4OSA_ERR M4MCS_cleanUp(M4MCS_Context pContext);
-
-/**
- ******************************************************************************
- * M4OSA_ERR M4MCS_abort(M4MCS_Context pContext);
- * @brief Finish the MCS transcoding and free all resources used by the MCS
- * whatever the state is.
- * @note The context is no more valid after this call
- * @param pContext (IN) MCS context
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: pContext is M4OSA_NULL (debug only)
- ******************************************************************************
- */
-M4OSA_ERR M4MCS_abort(M4MCS_Context pContext);
-
-/**
- ******************************************************************************
- * M4OSA_ERR M4MCS_getInputFileProperties(M4MCS_Context pContext,
- * M4VIDEOEDITING_ClipProperties* pFileProperties);
- * @brief Retrieves the properties of the audio and video streams from the input file.
- * @param pContext (IN) MCS context
- * @param pProperties (OUT) Pointer on an allocated M4VIDEOEDITING_ClipProperties
- structure which is filled with the input stream properties.
- * @note The structure pProperties must be allocated and further de-allocated
- by the application. The function must be called in the opened state.
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: At least one parameter is M4OSA_NULL
- * @return M4ERR_STATE: MCS is not in an appropriate state for this function to be called
- ******************************************************************************
- */
-M4OSA_ERR M4MCS_getInputFileProperties(M4MCS_Context pContext,
- M4VIDEOEDITING_ClipProperties *pFileProperties);
-
-/**
- ******************************************************************************
- * M4OSA_ERR M4MCS_setOutputParams(M4MCS_Context pContext, M4MCS_OutputParams* pParams);
- * @brief Set the MCS video output parameters.
- * @note Must be called after M4MCS_open. Must be called before M4MCS_step.
- * @param pContext (IN) MCS context
- * @param pParams (IN/OUT) Transcoding parameters
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: At least one parameter is M4OSA_NULL (debug only)
- * @return M4ERR_STATE: MCS is not in an appropriate state for this function to be called
- * @return M4MCS_ERR_INVALID_VIDEO_FRAME_SIZE_FOR_H263 : Output video frame size parameter is
- * incompatible with H263 encoding
- * @return M4MCS_ERR_INVALID_VIDEO_FRAME_RATE_FOR_H263 : Output video frame size parameter is
- * incompatible with H263 encoding
- * @return M4MCS_ERR_UNDEFINED_OUTPUT_VIDEO_FORMAT : Undefined output video format parameter
- * @return M4MCS_ERR_UNDEFINED_OUTPUT_VIDEO_FRAME_SIZE : Undefined output video frame size
- * @return M4MCS_ERR_UNDEFINED_OUTPUT_VIDEO_FRAME_RATE : Undefined output video frame rate
- * @return M4MCS_ERR_UNDEFINED_OUTPUT_AUDIO_FORMAT : Undefined output audio format parameter
- * @return M4MCS_ERR_DURATION_IS_NULL : Specified output parameters define a null duration stream
- * (no audio and video)
- ******************************************************************************
- */
-M4OSA_ERR M4MCS_setOutputParams(M4MCS_Context pContext, M4MCS_OutputParams* pParams);
-
-/**
- ******************************************************************************
- * M4OSA_ERR M4MCS_setEncodingParams(M4MCS_Context pContext, M4MCS_EncodingParams* pRates)
- * @brief Set the values of the encoding parameters
- * @note Must be called before M4MCS_checkParamsAndStart().
- * @param pContext (IN) MCS context
- * @param pRates (IN) Transcoding parameters
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: At least one parameter is M4OSA_NULL (debug only)
- * @return M4ERR_STATE: MCS is not in an appropriate state for this function to be called
- * @return M4MCS_ERR_AUDIOBITRATE_TOO_HIGH: Audio bitrate too high (we limit to 96 kbps)
- * @return M4MCS_ERR_AUDIOBITRATE_TOO_LOW: Audio bitrate is too low (16 kbps min for aac,
- * 12.2 for amr, 8 for mp3)
- * @return M4MCS_ERR_BEGIN_CUT_EQUALS_END_CUT: Begin cut and End cut are equals
- * @return M4MCS_ERR_BEGIN_CUT_LARGER_THAN_DURATION: Begin cut time is larger than
- * the input clip duration
- * @return M4MCS_ERR_END_CUT_SMALLER_THAN_BEGIN_CUT: End cut time is smaller than begin cut time
- * @return M4MCS_ERR_MAXFILESIZE_TOO_SMALL: Not enough space to store whole output
- * file at given bitrates
- * @return M4MCS_ERR_VIDEOBITRATE_TOO_HIGH: Video bitrate too high (we limit to 800 kbps)
- * @return M4MCS_ERR_VIDEOBITRATE_TOO_LOW: Video bitrate too low
- ******************************************************************************
- */
-M4OSA_ERR M4MCS_setEncodingParams(M4MCS_Context pContext, M4MCS_EncodingParams* pRates);
-
-/**
- ******************************************************************************
- * M4OSA_ERR M4MCS_getExtendedEncodingParams(M4MCS_Context pContext, M4MCS_EncodingParams* pRates)
- * @brief Get the extended values of the encoding parameters
- * @note Could be called after M4MCS_setEncodingParams.
- * @param pContext (IN) MCS context
- * @param pRates (OUT) Transcoding parameters
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: At least one parameter is M4OSA_NULL (debug only)
- * @return M4ERR_STATE: MCS is not in an appropriate state for this function to be called
- * @return M4MCS_ERR_BEGIN_CUT_EQUALS_END_CUT: Encoding settings would produce a
- * null duration clip = encoding is impossible
- ******************************************************************************
- */
-M4OSA_ERR M4MCS_getExtendedEncodingParams(M4MCS_Context pContext, M4MCS_EncodingParams* pRates);
-
-/**
- ******************************************************************************
- * M4OSA_ERR M4MCS_checkParamsAndStart(M4MCS_Context pContext)
- * @brief
- * @note
- * @param pContext (IN) MCS context
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: At least one parameter is M4OSA_NULL (debug only)
- * @return M4ERR_STATE: MCS is not in an appropriate state for this function to be called
- * @return M4MCS_ERR_AUDIOBITRATE_TOO_HIGH: Audio bitrate too high (we limit to 96 kbps)
- * @return M4MCS_ERR_AUDIOBITRATE_TOO_LOW: Audio bitrate is too low (16 kbps min for aac,
- * 12.2 for amr, 8 for mp3)
- * @return M4MCS_ERR_BEGIN_CUT_EQUALS_END_CUT: Begin cut and End cut are equals
- * @return M4MCS_ERR_BEGIN_CUT_LARGER_THAN_DURATION: Begin cut time is larger than
- * the input clip duration
- * @return M4MCS_ERR_END_CUT_SMALLER_THAN_BEGIN_CUT: End cut time is smaller than begin cut time
- * @return M4MCS_ERR_MAXFILESIZE_TOO_SMALL: Not enough space to store whole output
- * file at given bitrates
- * @return M4MCS_ERR_VIDEOBITRATE_TOO_HIGH: Video bitrate too high (we limit to 800 kbps)
- * @return M4MCS_ERR_VIDEOBITRATE_TOO_LOW: Video bitrate too low
- ******************************************************************************
- */
-M4OSA_ERR M4MCS_checkParamsAndStart(M4MCS_Context pContext);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __M4MCS_API_H__ */
-
diff --git a/libvideoeditor/vss/mcs/inc/M4MCS_ErrorCodes.h b/libvideoeditor/vss/mcs/inc/M4MCS_ErrorCodes.h
deleted file mode 100755
index c042dbb..0000000
--- a/libvideoeditor/vss/mcs/inc/M4MCS_ErrorCodes.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * 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.
- */
-
-/**
- *************************************************************************
- * @file M4MCS_API.h
- * @brief MCS error codes definitions (Media Compressor Service)
- * @note
- *************************************************************************
- **/
-
-#ifndef __M4MCS_ErrorCodes_H__
-#define __M4MCS_ErrorCodes_H__
-
-/**
- * OSAL basic types and errors */
-#include "M4OSA_Types.h"
-#include "M4OSA_Error.h"
-
-/**
- * OSAL core ID definitions */
-#include "M4OSA_CoreID.h"
-
-
-/************************************************************************/
-/* Warning codes */
-/************************************************************************/
-
-/* End of processing, user should now call M4MCS_close() */
-#define M4MCS_WAR_TRANSCODING_DONE M4OSA_ERR_CREATE( M4_WAR, M4MCS, 0x1)
-/* Mediatype is not supported by the MCS */
-#define M4MCS_WAR_MEDIATYPE_NOT_SUPPORTED M4OSA_ERR_CREATE( M4_WAR, M4MCS, 0x2)
-/* Indicate that picture will be automatically resized to fit into the required
- parameters (file size) */
-#define M4MCS_WAR_PICTURE_AUTO_RESIZE M4OSA_ERR_CREATE( M4_WAR, M4MCS, 0x3)
-
-/************************************************************************/
-/* Error codes */
-/************************************************************************/
-
-
-/* ----- OPEN ERRORS ----- */
-
-/* The input file contains no supported stream (may be a corrupted file) */
-#define M4MCS_ERR_INPUT_FILE_CONTAINS_NO_SUPPORTED_STREAM M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x01)
-/* The input file is invalid/corrupted */
-#define M4MCS_ERR_INVALID_INPUT_FILE M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x02)
-/* The input video frame size parameter is undefined */
-#define M4MCS_ERR_INVALID_INPUT_VIDEO_FRAME_SIZE M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x03)
-/* The input video frame size is non multiple of 16 */
-#define M4MCS_ERR_INPUT_VIDEO_SIZE_NON_X16 M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x04)
-
-
-/* ----- SET OUTPUT PARAMS ERRORS ----- */
-
-/* The output video format parameter is undefined */
-#define M4MCS_ERR_UNDEFINED_OUTPUT_VIDEO_FORMAT M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x10)
-/* The output video frame size parameter is undefined */
-#define M4MCS_ERR_UNDEFINED_OUTPUT_VIDEO_FRAME_SIZE M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x11)
-/* The output video frame rate parameter is undefined */
-#define M4MCS_ERR_UNDEFINED_OUTPUT_VIDEO_FRAME_RATE M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x12)
-/* The output audio format parameter is undefined */
-#define M4MCS_ERR_UNDEFINED_OUTPUT_AUDIO_FORMAT M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x13)
-/* The output video frame size parameter is incompatible with H263 encoding */
-#define M4MCS_ERR_INVALID_VIDEO_FRAME_SIZE_FOR_H263 M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x14)
-/* The output video frame rate parameter is incompatible with H263 encoding
- (It can't happen in current version of MCS!) */
-#define M4MCS_ERR_INVALID_VIDEO_FRAME_RATE_FOR_H263 M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x15)
-/* A null clip duration as been computed, which is unvalid (should never happen!) */
-#define M4MCS_ERR_DURATION_IS_NULL M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x16)
-/* The .mp4 container cannot handle h263 codec */
-#define M4MCS_ERR_H263_FORBIDDEN_IN_MP4_FILE M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x17)
-
-
-/* ----- PREPARE DECODERS ERRORS ----- */
-
-/* H263 Profile (other than 0) is not supported */
-#define M4MCS_ERR_H263_PROFILE_NOT_SUPPORTED M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x20)
-/* The input file contains an AAC audio track with an invalid sampling frequency
- (should never happen) */
-#define M4MCS_ERR_INVALID_AAC_SAMPLING_FREQUENCY M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x21)
-/* The audio conversion (AAC to AMR-NB, or MP3) failed */
-#define M4MCS_ERR_AUDIO_CONVERSION_FAILED M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x22)
-
-
-/* ----- SET ENCODING PARAMS ERRORS ----- */
-
-/* Begin cut time is larger than the input clip duration */
-#define M4MCS_ERR_BEGIN_CUT_LARGER_THAN_DURATION M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x30)
-/* Begin cut and End cut are equals */
-#define M4MCS_ERR_BEGIN_CUT_EQUALS_END_CUT M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x31)
-/* End cut time is smaller than begin cut time */
-#define M4MCS_ERR_END_CUT_SMALLER_THAN_BEGIN_CUT M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x32)
-/* Not enough space to store whole output file at given bitrates */
-#define M4MCS_ERR_MAXFILESIZE_TOO_SMALL M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x33)
-/* Video bitrate is too low (avoid ugly video) */
-#define M4MCS_ERR_VIDEOBITRATE_TOO_LOW M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x34)
-/* Audio bitrate is too low (16 kbps min for aac, 12.2 for amr, 8 for mp3) */
-#define M4MCS_ERR_AUDIOBITRATE_TOO_LOW M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x35)
-/* Video bitrate too high (we limit to 800 kbps) */
-#define M4MCS_ERR_VIDEOBITRATE_TOO_HIGH M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x36)
-/* Audio bitrate too high (we limit to 96 kbps) */
-#define M4MCS_ERR_AUDIOBITRATE_TOO_HIGH M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x37)
-
-/* ----- OTHERS ERRORS ----- */
-#define M4MCS_ERR_OUTPUT_FILE_SIZE_TOO_SMALL M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x50)
-#define M4MCS_ERR_NOMORE_SPACE M4OSA_ERR_CREATE(M4_ERR, M4MCS, 0x51)
-#define M4MCS_ERR_FILE_DRM_PROTECTED M4OSA_ERR_CREATE(M4_ERR, M4MCS, 0x52)
-#endif /* __M4MCS_ErrorCodes_H__ */
-
diff --git a/libvideoeditor/vss/mcs/inc/M4MCS_InternalConfig.h b/libvideoeditor/vss/mcs/inc/M4MCS_InternalConfig.h
deleted file mode 100755
index efaf1e6..0000000
--- a/libvideoeditor/vss/mcs/inc/M4MCS_InternalConfig.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * 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.
- */
-
-/**
- *************************************************************************
- * @file M4MCS_API.h
- * @brief MCS internal constant values settings
- * @note This header file is not public
- *************************************************************************
- **/
-
-#ifndef __M4MCS_INTERNALCONFIG_H__
-#define __M4MCS_INTERNALCONFIG_H__
-
-
-/**
- * Definition of max AU size */
-#define M4MCS_AUDIO_MAX_CHUNK_SIZE 7168 /**< add mp3 encoder and writer,
- max bitrate is now 320kbps instead of 128kbps
- so this value has to be increased accordingly
- = ((sizeof(M4OSA_UInt8)*max_channel_number)+3
- to take a margin(after tests, 2 was not enough
- ))*MAX_PCM_GRANULARITY_SAMPLES*/
- /**< Before: 4000*//**< Magical */
-
-/**
- * Video max AU and fragment size */
-#define M4MCS_VIDEO_MIN_COMPRESSION_RATIO 0.8 /**< Magical. Used to define the max AU size */
-#define M4MCS_VIDEO_CHUNK_AU_SIZE_RATIO 1.2 /**< Magical. Used to define the max chunk size */
-
-/**
- * Various Magicals */
-#define M4MCS_WRITER_AUDIO_STREAM_ID 1
-#define M4MCS_WRITER_VIDEO_STREAM_ID 2
-
-/**
- * Granularity for audio encoder */
- /**< minimum number of samples to pass in AMR encoding case */
-#define M4MCS_PCM_AMR_GRANULARITY_SAMPLES 160
-/**< minimum number of samples to pass in AAC encoding case */
-#define M4MCS_PCM_AAC_GRANULARITY_SAMPLES 1024
-/**< minimum number of samples to pass in MP3 encoding case */
-#define M4MCS_PCM_MP3_GRANULARITY_SAMPLES 576
-
-#define M4MCS_AUDIO_MAX_AU_SIZE 1024 /**< add mp3 encoder and writer
- This value is not used anymore, now the max AU
- size is computed dynamically according to the
- number of channels,the max PCM granularity sample
- and a margin.*/
- /**< Before: 1024*//**< Magical */
-/**
- * Writer file and moov size estimation */
-#define M4MCS_MOOV_OVER_FILESIZE_RATIO 1.04 /**< magical moov size is less than 4%
- of file size in average */
-
-/**
- * If 3gp file does not contain an STSS table (no rap frames),
- jump backward to a specified limit */
-#define M4MCS_NO_STSS_JUMP_POINT 40000 /**< 40 s */
-
-#endif /* __M4MCS_INTERNALCONFIG_H__ */
-
diff --git a/libvideoeditor/vss/mcs/inc/M4MCS_InternalFunctions.h b/libvideoeditor/vss/mcs/inc/M4MCS_InternalFunctions.h
deleted file mode 100755
index 21c679e..0000000
--- a/libvideoeditor/vss/mcs/inc/M4MCS_InternalFunctions.h
+++ /dev/null
@@ -1,344 +0,0 @@
-/*
- * 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.
- */
-/**
- *************************************************************************
- * @file M4MCS_InternalFunctions.h
- * @brief This file contains all functions declarations internal
- * to the MCS.
- *************************************************************************
- */
-
-#ifndef __M4MCS_INTERNALFUNCTIONS_H__
-#define __M4MCS_INTERNALFUNCTIONS_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "M4VPP_API.h"
-#include "M4ENCODER_common.h"
-
-/**
- **************************************************************************
- * M4OSA_ERR M4MCS_intApplyVPP( M4VPP_Context pContext,
- * M4VIFI_ImagePlane* pPlaneIn,
- * M4VIFI_ImagePlane* pPlaneOut)
- * @brief Do the video rendering and the resize (if needed)
- * @note It is called by the video encoder
- * @param pContext (IN) VPP context, which actually is the MCS
- * internal context in our case
- * @param pPlaneIn (IN) Contains the image
- * @param pPlaneOut (IN/OUT) Pointer to an array of 3 planes that will
- * contain the output YUV420 image
- * @return M4NO_ERROR: No error
- * @return ERR_MCS_VIDEO_DECODE_ERROR: the video decoding failed
- * @return ERR_MCS_RESIZE_ERROR: the resizing failed
- * @return Any error returned by an underlaying module
- **************************************************************************
- */
-M4OSA_ERR M4MCS_intApplyVPP(M4VPP_Context pContext, M4VIFI_ImagePlane* pPlaneIn,
- M4VIFI_ImagePlane* pPlaneOut);
-
-/**
- **************************************************************************
- * M4OSA_ERR M4MCS_SubscribeMediaAndCodec(M4MCS_Context pContext);
- * @brief This function registers the reader, decoders, writers and encoders
- * in the MCS.
- * @note
- * @param pContext: (IN) Execution context.
- * @return M4NO_ERROR: there is no error
- * @return M4ERR_PARAMETER pContext is NULL
- **************************************************************************
- */
-M4OSA_ERR M4MCS_subscribeMediaAndCodec(M4MCS_Context pContext);
-
-/**
- **************************************************************************
- * @brief Clear encoders, decoders, reader and writers interfaces tables
- * @param pContext (IN/OUT) MCS context.
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: The context is null
- **************************************************************************
- */
-M4OSA_ERR M4MCS_clearInterfaceTables(M4MCS_Context pContext);
-
-/**
- **************************************************************************
- * M4OSA_ERR M4MCS_registerWriter(M4MCS_Context pContext,
- * M4VIDEOEDITING_FileType MediaType,
- * M4WRITER_GlobalInterface *pWtrGlobalInterface,
- * M4WRITER_DataInterface *pWtrDataInterface)
- * @brief This function will register a specific file format writer.
- * @note According to the Mediatype, this function will store in the internal
- * context the writer context.
- * @param pContext: (IN) Execution context.
- * @return M4NO_ERROR: there is no error
- * @return M4ERR_PARAMETER pContext,pWtrGlobalInterface or pWtrDataInterface
- * is M4OSA_NULL (debug only), or invalid MediaType
- **************************************************************************
- */
-M4OSA_ERR M4MCS_registerWriter(
- M4MCS_Context pContext,
- M4WRITER_OutputFileType MediaType,
- M4WRITER_GlobalInterface* pWtrGlobalInterface,
- M4WRITER_DataInterface* pWtrDataInterface);
-
-/**
- ******************************************************************************
- * M4OSA_ERR M4MCS_registerEncoder( M4MCS_Context pContext,
- * M4VIDEOEDITING_VideoFormat mediaType,
- * M4ENCODER_GlobalInterface *pEncGlobalInterface)
- * @brief This function will register a specific video encoder.
- * @note According to the Mediatype, this function will store in the internal
- * context the encoder context.
- * @param pContext: (IN) Execution context.
- * @return M4NO_ERROR: there is no error
- * @return M4ERR_PARAMETER pContext or pEncGlobalInterface is
- * M4OSA_NULL (debug only), or invalid MediaType
- ******************************************************************************
- */
-M4OSA_ERR M4MCS_registerVideoEncoder(
- M4MCS_Context pContext,
- M4ENCODER_Format MediaType,
- M4ENCODER_GlobalInterface *pEncGlobalInterface);
-
-/**
- ******************************************************************************
- * M4OSA_ERR M4MCS_registerAudioEncoder( M4MCS_Context pContext,
- * M4ENCODER_AudioFormat mediaType,
- * M4ENCODER_AudioGlobalInterface *pEncGlobalInterface)
- * @brief This function will register a specific 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_registerAudioEncoder(
- M4MCS_Context pContext,
- M4ENCODER_AudioFormat MediaType,
- M4ENCODER_AudioGlobalInterface *pEncGlobalInterface);
-
-/**
- **************************************************************************
- * @brief Register reader.
- * @param pContext (IN/OUT) MCS context.
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: A parameter is null (in DEBUG only)
- **************************************************************************
- */
-M4OSA_ERR M4MCS_registerReader( M4MCS_Context pContext,
- M4READER_MediaType mediaType,
- M4READER_GlobalInterface *pRdrGlobalInterface,
- M4READER_DataInterface *pRdrDataInterface);
-
-/**
- **************************************************************************
- * @brief Register video decoder
- * @param pContext (IN/OUT) MCS context.
- * @param decoderType (IN) Decoder type
- * @param pDecoderInterface (IN) Decoder interface.
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: A parameter is null (in DEBUG only),or the
- * decoder type is invalid
- **************************************************************************
- */
-M4OSA_ERR M4MCS_registerVideoDecoder( M4MCS_Context pContext,
- M4DECODER_VideoType decoderType,
- M4DECODER_VideoInterface *pDecoderInterface);
-
-/**
- ************************************************************************
- * @brief Register audio decoder
- * @note This function is used internaly by the MCS to register Core audio decoders,
- * @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_registerAudioDecoder(M4MCS_Context pContext, M4AD_Type decoderType,
- M4AD_Interface *pDecoderInterface);
-
-/**
- ************************************************************************
- * @brief Unregister writer
- * @param pContext (IN/OUT) MCS context.
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: A parameter is null (in DEBUG only)
- ************************************************************************
- */
-M4OSA_ERR M4MCS_unRegisterAllWriters(M4MCS_Context pContext);
-
-/**
- ************************************************************************
- * @brief Unregister the encoders
- * @param pContext (IN/OUT) MCS context.
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: A parameter is null (in DEBUG only)
- ************************************************************************
- */
-M4OSA_ERR M4MCS_unRegisterAllEncoders(M4MCS_Context pContext);
-
-/**
- ************************************************************************
- * @brief Unregister reader
- * @param pContext (IN/OUT) MCS context.
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: A parameter is null (in DEBUG only)
- ************************************************************************
- */
-M4OSA_ERR M4MCS_unRegisterAllReaders(M4MCS_Context pContext);
-
-/**
- ************************************************************************
- * @brief Unregister the decoders
- * @param pContext (IN/OUT) MCS context.
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: A parameter is null (in DEBUG only)
- ************************************************************************
- */
-M4OSA_ERR M4MCS_unRegisterAllDecoders(M4MCS_Context pContext);
-
-/**
- ************************************************************************
- * @brief Set current writer
- * @param pContext (IN/OUT) MCS context.
- * @param mediaType (IN) Media type.
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: A parameter is null (in DEBUG only)
- * @return M4WAR_MCS_MEDIATYPE_NOT_SUPPORTED: Media type not supported
- ************************************************************************
- */
-M4OSA_ERR M4MCS_setCurrentWriter( M4MCS_Context pContext,
- M4VIDEOEDITING_FileType mediaType);
-
-/**
- ************************************************************************
- * @brief Set a video encoder
- * @param pContext (IN/OUT) MCS context.
- * @param MediaType (IN) Encoder type
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: A parameter is null (in DEBUG only)
- * @return M4WAR_MCS_MEDIATYPE_NOT_SUPPORTED: Media type not supported
- ************************************************************************
- */
-M4OSA_ERR M4MCS_setCurrentVideoEncoder( M4MCS_Context pContext,
- M4VIDEOEDITING_VideoFormat mediaType);
-
-/**
- ************************************************************************
- * @brief Set an audio encoder
- * @param context (IN/OUT) MCS context.
- * @param MediaType (IN) Encoder type
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: A parameter is null (in DEBUG only)
- ************************************************************************
- */
-M4OSA_ERR M4MCS_setCurrentAudioEncoder( M4MCS_Context pContext,
- M4VIDEOEDITING_AudioFormat mediaType);
-
-/**
- ************************************************************************
- * @brief Set current reader
- * @param pContext (IN/OUT) MCS context.
- * @param mediaType (IN) Media type.
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: A parameter is null (in DEBUG only)
- * @return M4WAR_MCS_MEDIATYPE_NOT_SUPPORTED: Media type not supported
- ************************************************************************
- */
-M4OSA_ERR M4MCS_setCurrentReader( M4MCS_Context pContext,
- M4VIDEOEDITING_FileType mediaType);
-
-/**
- ************************************************************************
- * @brief Set a video decoder
- * @param pContext (IN/OUT) MCS context.
- * @param decoderType (IN) Decoder type
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: A parameter is null (in DEBUG only)
- * @return M4WAR_MCS_MEDIATYPE_NOT_SUPPORTED: Media type not supported
- ************************************************************************
- */
-M4OSA_ERR M4MCS_setCurrentVideoDecoder( M4MCS_Context pContext,
- M4_StreamType mediaType);
-
-/**
- ************************************************************************
- * @brief Set an audio decoder
- * @param context (IN/OUT) MCS context.
- * @param decoderType (IN) Decoder type
- * @return M4NO_ERROR: No error
- * @return M4ERR_PARAMETER: A parameter is null (in DEBUG only)
- ************************************************************************
- */
-M4OSA_ERR M4MCS_setCurrentAudioDecoder(M4MCS_Context pContext, M4_StreamType mediaType);
-
-/**
- ******************************************************************************
- * M4OSA_ERR M4MCS_intCheckAudioEffects(M4MCS_InternalContext* pContext)
- * @brief Check if an effect has to be applied currently
- * @note It is called by the stepEncoding function
- * @param pContext (IN) MCS internal context
- * @return M4NO_ERROR: No error
- ******************************************************************************
- */
-M4OSA_ERR M4MCS_intCheckAudioEffects(M4MCS_InternalContext* pC);
-
-/**
- ******************************************************************************
- * M4OSA_ERR M4MCS_editAudioEffectFct_FadeIn()
- * @brief Apply audio effect FadeIn to pPCMdata
- * @param pC (IN/OUT) Internal edit context
- * @param pPCMdata (IN/OUT) Input and Output PCM audio data
- * @param uiPCMsize (IN) Size of pPCMdata
- * @param pProgress (IN) Effect progress
- * @return M4NO_ERROR: No error
- ******************************************************************************
- */
-M4OSA_ERR M4MCS_editAudioEffectFct_FadeIn( M4OSA_Void *pFunctionContext,
- M4OSA_Int16 *pPCMdata,
- M4OSA_UInt32 uiPCMsize,
- M4MCS_ExternalProgress *pProgress);
-
-/**
- ******************************************************************************
- * M4OSA_ERR M4MCS_editAudioEffectFct_FadeIn()
- * @brief Apply audio effect FadeIn to pPCMdata
- * @param pC (IN/OUT) Internal edit context
- * @param pPCMdata (IN/OUT) Input and Output PCM audio data
- * @param uiPCMsize (IN) Size of pPCMdata
- * @param pProgress (IN) Effect progress
- * @return M4NO_ERROR: No error
- ******************************************************************************
- */
-M4OSA_ERR M4MCS_editAudioEffectFct_FadeOut( M4OSA_Void *pFunctionContext,
- M4OSA_Int16 *pPCMdata,
- M4OSA_UInt32 uiPCMsize,
- M4MCS_ExternalProgress *pProgress);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __M4MCS_INTERNALFUNCTIONS_H__ */
-
diff --git a/libvideoeditor/vss/mcs/inc/M4MCS_InternalTypes.h b/libvideoeditor/vss/mcs/inc/M4MCS_InternalTypes.h
deleted file mode 100755
index 5e4f236..0000000
--- a/libvideoeditor/vss/mcs/inc/M4MCS_InternalTypes.h
+++ /dev/null
@@ -1,606 +0,0 @@
-/*
- * 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.
- */
-/**
- *************************************************************************
- * @file M4MCS_API.h
- * @brief MCS internal types and structures definitions
- * @note This header file is not public
- *************************************************************************
- **/
-
-#ifndef __M4MCS_INTERNALTYPES_H__
-#define __M4MCS_INTERNALTYPES_H__
-
-/**
- * MCS public API and types */
-#include "M4MCS_API.h"
-#include "M4MCS_ErrorCodes.h"
-
-#include "NXPSW_CompilerSwitches.h"
-
-/** Determine absolute value of a. */
-#define M4MCS_ABS(a) ( ( (a) < (0) ) ? (-(a)) : (a) )
-
-
-#define Y_PLANE_BORDER_VALUE 0x00
-#define U_PLANE_BORDER_VALUE 0x80
-#define V_PLANE_BORDER_VALUE 0x80
-
-
-/**
- * Internally used modules */
-#include "M4READER_3gpCom.h" /**< Read 3GPP file */
-#include "M4DECODER_Common.h" /**< Decode video */
-#include "M4VIFI_FiltersAPI.h" /**< Video resize */
-#include "M4AD_Common.h" /**< Decoder audio */
-#include "SSRC.h" /**< SSRC */
-#include "From2iToMono_16.h" /**< Stereo to Mono */
-#include "MonoTo2I_16.h" /**< Mono to Stereo */
-#include "M4ENCODER_AudioCommon.h" /**< Encode audio */
-#include "M4WRITER_common.h" /**< Writer common interface */
-#include "M4ENCODER_common.h"
-
-/**
- * Instead of including AAC core properties, it is better to redefine the needed type
- * AAC_DEC_STREAM_PROPS
- * In case of external AAC decoder, it will be necessary to put this type as public
- */
-
-/**
- ******************************************************************************
- * struct AAC_DEC_STREAM_PROPS
- * @brief AAC Stream properties
- * @Note aNoChan and aSampFreq are used for parsing even the user parameters
- * are different. User parameters will be input for the output behaviour
- * of the decoder whereas for parsing bitstream properties are used.
- ******************************************************************************
- */
-typedef struct {
- M4OSA_Int32 aAudioObjectType; /**< Audio object type of the stream - in fact
- the type found in the Access Unit parsed */
- M4OSA_Int32 aNumChan; /**< number of channels (=1(mono) or =2(stereo))
- as indicated by input bitstream*/
- M4OSA_Int32 aSampFreq; /**< sampling frequency in Hz */
- M4OSA_Int32 aExtensionSampFreq; /**< extended sampling frequency in Hz, = 0 is
- no extended frequency */
- M4OSA_Int32 aSBRPresent; /**< presence=1/absence=0 of SBR */
- M4OSA_Int32 aPSPresent; /**< presence=1/absence=0 of PS */
- M4OSA_Int32 aMaxPCMSamplesPerCh; /**< max number of PCM samples per channel */
-} AAC_DEC_STREAM_PROPS;
-
-/**
- ******************************************************************************
- * @brief Codecs registration same as in VPS and VES, so less mapping
- * is required toward MCS api types
- ******************************************************************************
- */
-typedef struct
-{
- M4WRITER_GlobalInterface* pGlobalFcts; /**< open, close, setoption,etc... functions */
- M4WRITER_DataInterface* pDataFcts; /**< data manipulation functions */
-} M4MCS_WriterInterface;
-
-/**
- ******************************************************************************
- * enum M4MCS_States
- * @brief Main state machine of the MCS.
- ******************************************************************************
- */
-typedef enum
-{
- M4MCS_kState_CREATED, /**< M4MCS_init has been called */
- M4MCS_kState_OPENED, /**< M4MCS_open has been called */
- M4MCS_kState_SET, /**< All mandatory parameters have been set */
- M4MCS_kState_READY, /**< All optionnal parameters have been set */
- M4MCS_kState_BEGINVIDEOJUMP, /**< Must jump to the Iframe before the begin cut */
- M4MCS_kState_BEGINVIDEODECODE, /**< Must decode up to the begin cut */
- M4MCS_kState_PROCESSING, /**< Step can be called */
- M4MCS_kState_PAUSED, /**< Paused, Resume can be called */
- M4MCS_kState_FINISHED, /**< Transcoding is finished */
- M4MCS_kState_CLOSED /**< Output file has been created */
-} M4MCS_States;
-
-/**
- ******************************************************************************
- * enum M4MCS_StreamState
- * @brief State of a media stream encoding (audio or video).
- ******************************************************************************
- */
-typedef enum
-{
- M4MCS_kStreamState_NOSTREAM = 0, /**< No stream present */
- M4MCS_kStreamState_STARTED = 1, /**< The stream encoding is in progress */
- M4MCS_kStreamState_FINISHED = 2 /**< The stream has finished encoding */
-} M4MCS_StreamState;
-
-
-/**
- ******************************************************************************
- * enum anonymous enum
- * @brief enum to keep track of the encoder state
- ******************************************************************************
- */
-enum
-{
- M4MCS_kNoEncoder,
- M4MCS_kEncoderClosed,
- M4MCS_kEncoderStopped,
- M4MCS_kEncoderRunning
-};
-
-/**
- ******************************************************************************
- * structure M4MCS_InternalContext
- * @brief This structure defines the MCS context (private)
- * @note This structure is used for all MCS calls to store the context
- ******************************************************************************
- */
-typedef struct
-{
- M4OSA_UInt32 bitPos;
- /* bit count of number of bits used so far */
-
- M4OSA_UInt8 *streamBuffer;
- /* Bitstream Buffer */
-
- M4OSA_UInt32 byteCnt;
- /* Number of Bytes written in Bitstream buffer*/
-
- M4OSA_UInt32 currBuff;
- /* Current buffer holds, 4bytes of bitstream*/
-
- M4OSA_UInt8 prevByte;
- /* Previous byte written in the buffer */
-
- M4OSA_UInt8 prevPrevByte;
- /* Previous to previous byte written in the buffer */
-
-}NSWAVC_bitStream_t_MCS;
-
-#define _MAXnum_slice_groups 8
-#define _MAXnum_ref_frames_in_pic_order_cnt_cycle 256
-
-typedef struct
-{
- M4OSA_UInt32 level_idc_index;
- M4OSA_UInt32 MaxFrameNum;
- M4OSA_UInt32 expectedDeltaPerPicOrderCntCycle;
- M4OSA_Int32 MaxPicOrderCntLsb;
- M4OSA_Int32 max_dec_frame_buffering;
-
- /* (pic_order_cnt_type == 1) */
- M4OSA_Int32 offset_for_non_ref_pic;
- M4OSA_Int32 offset_for_top_to_bottom_field;
- M4OSA_Int32 frame_crop_left_offset;
- M4OSA_Int32 frame_crop_right_offset;
- M4OSA_Int32 frame_crop_top_offset;
- M4OSA_Int32 frame_crop_bottom_offset;
- M4OSA_Int32 offset_for_ref_frame[_MAXnum_ref_frames_in_pic_order_cnt_cycle];
-
- M4OSA_UInt16 PicWidthInMbs;
- M4OSA_UInt16 FrameHeightInMbs;
- M4OSA_UInt16 pic_width_in_mbs_minus1;
- M4OSA_UInt16 pic_height_in_map_units_minus1;
-
-#ifdef _CAP_FMO_
- M4OSA_UInt16 NumSliceGroupMapUnits;
- M4OSA_UInt16 MaxPicSizeInMbs;
-#endif /*_CAP_FMO_*/
-
- M4OSA_UInt8 profile_idc;
- M4OSA_UInt8 reserved_zero_4bits;
- M4OSA_UInt8 level_idc;
- M4OSA_UInt8 seq_parameter_set_id;
- M4OSA_UInt8 log2_max_frame_num_minus4;
- M4OSA_UInt8 pic_order_cnt_type;
- /* if(pic_order_cnt_type == 0) */
- M4OSA_UInt8 log2_max_pic_order_cnt_lsb_minus4;
-
- M4OSA_UInt8 num_ref_frames_in_pic_order_cnt_cycle;
- /* for( i = 0; i < num_ref_frames_in_pic_order_cnt_cycle; i++ ) */
- M4OSA_UInt8 num_ref_frames;
-
- M4OSA_Bool constraint_set0_flag;
- M4OSA_Bool constraint_set1_flag;
- M4OSA_Bool constraint_set2_flag;
- M4OSA_Bool constraint_set3_flag;
- M4OSA_Bool delta_pic_order_always_zero_flag;
- M4OSA_Bool gaps_in_frame_num_value_allowed_flag;
- M4OSA_Bool frame_mbs_only_flag;
- M4OSA_Bool mb_adaptive_frame_field_flag;
- M4OSA_Bool direct_8x8_inference_flag;
- M4OSA_Bool frame_cropping_flag;
- M4OSA_Bool vui_parameters_present_flag;
- M4OSA_Bool Active;
-
- /* vui_seq_parameters_t vui_seq_parameters; */
-} ComSequenceParameterSet_t_MCS;
-
-typedef struct
-{
- M4OSA_Int16 pic_init_qp_minus26;
- M4OSA_Int16 pic_init_qs_minus26;
- M4OSA_Int16 chroma_qp_index_offset;
-
-//#ifdef _CAP_FMO_
- /* if( slice_group_map_type = = 0 ) */
- M4OSA_UInt16 run_length_minus1[_MAXnum_slice_groups];
- /* else if( slice_group_map_type = = 2 ) */
- M4OSA_UInt16 top_left[_MAXnum_slice_groups];
- M4OSA_UInt16 bottom_right[_MAXnum_slice_groups];
- /* else if( slice_group_map_type = = 6 ) */
- M4OSA_UInt16 pic_size_in_map_units_minus1;
- M4OSA_UInt16 slice_group_change_rate_minus1;
-
- M4OSA_UInt16 FirstMbInSliceGroup[_MAXnum_slice_groups];
- M4OSA_UInt16 LastMbInSliceGroup[_MAXnum_slice_groups];
-
-
- M4OSA_UInt8 *slice_group_id;
- M4OSA_UInt8 *MapUnitToSliceGroupMap;
- M4OSA_UInt8 *MbToSliceGroupMap;
- M4OSA_UInt16 NumSliceGroupMapUnits;
-
- M4OSA_UInt8 slice_group_map_type;
- /* else if( slice_group_map_type = = 3 || 4 || 5 */
- M4OSA_Bool slice_group_change_direction_flag;
- M4OSA_Bool map_initialized;
-// #endif /*_CAP_FMO_*/
-
- M4OSA_UInt8 pic_parameter_set_id;
- M4OSA_UInt8 seq_parameter_set_id;
- M4OSA_UInt8 num_ref_idx_l0_active_minus1;
- M4OSA_UInt8 num_ref_idx_l1_active_minus1;
- M4OSA_UInt8 weighted_bipred_idc;
- M4OSA_UInt8 num_slice_groups_minus1;
-
- M4OSA_Bool entropy_coding_mode_flag;
- /* if( pic_order_cnt_type < 2 ) in the sequence parameter set */
- M4OSA_Bool pic_order_present_flag;
- M4OSA_Bool weighted_pred_flag;
- M4OSA_Bool deblocking_filter_control_present_flag;
- M4OSA_Bool constrained_intra_pred_flag;
- M4OSA_Bool redundant_pic_cnt_present_flag;
- M4OSA_Bool Active;
-
- ComSequenceParameterSet_t_MCS *p_active_sps;
-} ComPictureParameterSet_t_MCS;
-
-typedef struct
-{
- M4OSA_UInt32 bitPos; /*!< bit position in buffer */
- M4OSA_UInt32 totalBits; /*!< bit position in file (total bits read so far) */
-
- M4OSA_UInt32 lastTotalBits; /*!< bit position in file of the last VOP */
- M4OSA_UInt32 numBitsInBuffer; /*!< number of bits in buffer */
- M4OSA_UInt32 readableBytesInBuffer; /*!< number of bytes that can be read in decoder buffer*/
- M4OSA_UInt32 maxBufferSize; /*!< max buffer size in bit units */
- M4OSA_UInt8 *Buffer; /*!< char buffer at reading from file */
- M4OSA_Int32 i8BitCnt;
- M4OSA_UInt32 ui32TempBuff;
- M4OSA_Int8*pui8BfrPtr;
- M4OSA_UInt32 ui32LastTwoBytes; /*!< stores the last read two bytes */
-} ComBitStreamMCS_t;
-
-
-typedef struct
-{
-
- M4OSA_Int32 prev_frame_num;
- M4OSA_Int32 cur_frame_num;
- M4OSA_Int32 prev_new_frame_num;
- M4OSA_Int32 log2_max_frame_num_minus4;
- M4OSA_Int32 is_done;
- M4OSA_Int32 is_first;
- M4OSA_Int32 frame_count;
- M4OSA_Int32 frame_mod_count;
- M4OSA_Int32 POC_lsb;
- M4OSA_Int32 POC_lsb_mod;
-
-
- M4OSA_UInt32 m_Num_Bytes_NALUnitLength;
-
- M4OSA_UInt8* m_pDecoderSpecificInfo; /**< Pointer on specific information required
- to create a decoder */
- M4OSA_UInt32 m_decoderSpecificInfoSize;/**< Size of the specific information pointer above*/
-
- M4OSA_UInt8* m_pEncoderSPS;
- M4OSA_UInt32 m_encoderSPSSize;
-
- M4OSA_UInt8* m_pEncoderPPS;
- M4OSA_UInt32 m_encoderPPSSize;
-
- M4OSA_UInt8* m_pFinalDSI;
- M4OSA_UInt32 m_pFinalDSISize;
-
- M4OSA_UInt32 m_encoder_SPS_Cnt;
- ComSequenceParameterSet_t_MCS *p_clip_sps;
- M4OSA_UInt32 m_encoder_PPS_Cnt;
- ComPictureParameterSet_t_MCS *p_clip_pps;
-
- ComSequenceParameterSet_t_MCS *p_encoder_sps;
- ComPictureParameterSet_t_MCS *p_encoder_pps;
-
-
- ComSequenceParameterSet_t_MCS encoder_sps;
- ComPictureParameterSet_t_MCS encoder_pps;
- ComSequenceParameterSet_t_MCS clip_sps;
-
- /* Encoder SPS parameters */
- M4OSA_UInt32 enc_seq_parameter_set_id;
- M4OSA_UInt32 enc_log2_max_frame_num_minus4;
- M4OSA_UInt32 enc_pic_order_cnt_type;
- M4OSA_UInt32 enc_log2_max_pic_order_cnt_lsb_minus4; /* applicable when POC type = 0 */
- M4OSA_UInt32 enc_delta_pic_order_always_zero_flag;
- M4OSA_Int32 enc_offset_for_non_ref_pic;
- M4OSA_Int32 enc_offset_for_top_to_bottom_field;
- M4OSA_UInt32 enc_num_ref_frames_in_pic_order_cnt_cycle; /* range 0 to 255 */
- /* array of size num_ref_frames_in_pic_order_cnt_cycle */
- M4OSA_Int32 enc_offset_for_ref_frame[256];
- M4OSA_UInt32 enc_num_ref_frames;
- M4OSA_UInt32 enc_gaps_in_frame_num_value_allowed_flag;
-
-
- /* Input clip SPS parameters */
- M4OSA_UInt32 clip_seq_parameter_set_id;
- M4OSA_UInt32 clip_log2_max_frame_num_minus4;
- M4OSA_UInt32 clip_pic_order_cnt_type;
- M4OSA_UInt32 clip_log2_max_pic_order_cnt_lsb_minus4; /* applicable when POC type = 0 */
- M4OSA_UInt32 clip_delta_pic_order_always_zero_flag;
- M4OSA_Int32 clip_offset_for_non_ref_pic;
- M4OSA_Int32 clip_offset_for_top_to_bottom_field;
- M4OSA_UInt32 clip_num_ref_frames_in_pic_order_cnt_cycle; /* range 0 to 255 */
- /* array of size num_ref_frames_in_pic_order_cnt_cycle */
- M4OSA_Int32 clip_offset_for_ref_frame[256];
- M4OSA_UInt32 clip_num_ref_frames;
- M4OSA_UInt32 clip_gaps_in_frame_num_value_allowed_flag;
-
- M4OSA_UInt32 final_PPS_ID;
- M4OSA_UInt32 final_SPS_ID;
- NSWAVC_bitStream_t_MCS encbs;
-
-} NSWAVC_MCS_t;
-
-
-
-/**
- ******************************************************************************
- * structure M4MCS_InternalContext
- * @brief This structure defines the MCS context (private)
- * @note This structure is used for all MCS calls to store the context
- ******************************************************************************
- */
-typedef struct
-{
- /**
- * MCS State and settings stuff */
- M4MCS_States State; /**< MCS internal state */
- M4MCS_StreamState VideoState;/**< State of the video encoding */
- M4MCS_StreamState AudioState;/**< State of the audio encoding */
- M4OSA_Bool noaudio;/**< Flag to know if we have to deal with audio transcoding */
- M4OSA_Bool novideo;/**< Flag to know if we have to deal with video transcoding */
-
- M4VIDEOEDITING_ClipProperties InputFileProperties;/**< Input audio/video stream properties */
- M4OSA_Void* pInputFile; /**< Remember input file pointer between fast
- open and normal open */
- M4VIDEOEDITING_FileType InputFileType; /**< Remember input file type between fast
- open and normal open */
- M4OSA_Bool bFileOpenedInFastMode; /**< Flag to know if a particular reader
- supports fast open */
- M4OSA_UInt32 uiMaxMetadataSize; /**< Limitation on the max acceptable moov
- size of a 3gpp file */
-
- M4ENCODER_Format EncodingVideoFormat; /**< Output video format, set by the user */
- M4ENCODER_FrameWidth EncodingWidth; /**< Output video width, set by the user */
- M4ENCODER_FrameHeight EncodingHeight; /**< Output video height, set by the user */
- M4ENCODER_FrameRate EncodingVideoFramerate; /**< Output video framerate, set by the user*/
-
- M4OSA_UInt32 uiBeginCutTime; /**< Begin cut time, in milliseconds */
- M4OSA_UInt32 uiEndCutTime; /**< Begin cut time, in milliseconds */
- M4OSA_UInt32 uiMaxFileSize; /**< Maximum output file size, in bytes */
- M4OSA_UInt32 uiAudioBitrate; /**< Targeted audio bitrate in bps */
- M4OSA_UInt32 uiVideoBitrate; /**< Targeted video bitrate in bps */
-
- M4OSA_UInt8 uiProgress; /**< Progress information saved at each step to be able to
- return it in case of pause */
-
- /**
- * Reader stuff */
- M4OSA_Context pReaderContext; /**< Context of the reader module */
- M4_VideoStreamHandler* pReaderVideoStream; /**< Description of the read video stream */
- M4_AudioStreamHandler* pReaderAudioStream; /**< Description of the read audio stream */
- M4OSA_Bool bUnsupportedVideoFound; /**< True if an unsupported video stream
- type has been found */
- M4OSA_Bool bUnsupportedAudioFound; /**< True if an unsupported audio stream
- type has been found */
- M4_AccessUnit ReaderVideoAU; /**< Read video access unit */
- M4_AccessUnit ReaderVideoAU1; /**< Read video access unit */
- M4_AccessUnit ReaderVideoAU2; /**< Read video access unit */
- M4_AccessUnit ReaderAudioAU; /**< Read audio access unit */
- M4_AccessUnit ReaderAudioAU1; /**< Read audio access unit */
- M4_AccessUnit ReaderAudioAU2; /**< Read audio access unit */
- M4OSA_MemAddr8 m_pDataAddress1; /**< Temporary buffer for Access Unit */
- M4OSA_MemAddr8 m_pDataAddress2; /**< Temporary buffer for Access Unit */
- M4OSA_MemAddr8 m_pDataVideoAddress1; /**< Temporary buffer for Access Unit */
- M4OSA_MemAddr8 m_pDataVideoAddress2; /**< Temporary buffer for Access Unit */
- M4OSA_UInt32 m_audioAUDuration; /**< Audio AU duration */
- M4OSA_Int32 iAudioCtsOffset; /**< Audio AU CTS offset due to begin cut */
-
- /**
- * Video decoder stuff */
- M4OSA_Context pViDecCtxt; /**< Video decoder context */
- M4OSA_Double dViDecStartingCts; /**< Video CTS at which the decode/encode will start
- (used for begin cut and pause/resume) */
- M4OSA_Double dViDecCurrentCts; /**< Video CTS to decode */
- M4OSA_Int32 iVideoBeginDecIncr; /**< CTS step for the begin cut decode (doesn't
- need floating point precision) */
- M4OSA_Double dCtsIncrement; /**< Cts increment from one video frame to another*/
- M4OSA_Bool isRenderDup; /**< To handle duplicate frame rendering in case of
- external decoding */
- M4VIFI_ImagePlane* lastDecodedPlane; /**< Last decoded plane */
-
- /**
- * Video encoder stuff */
- M4OSA_Context pViEncCtxt; /**< Video encoder context */
- M4VIFI_ImagePlane* pPreResizeFrame; /**< The decoded image before resize
- (allocated if resize needed only)*/
- M4OSA_UInt32 uiEncVideoBitrate; /**< Actual video bitrate for the video encoder */
- M4OSA_UInt32 outputVideoTimescale;
- M4OSA_UInt32 encoderState;
-
- /**
- * Audio decoder stuff */
- M4OSA_Context pAudioDecCtxt; /**< Audio (AAC) decoder context */
- M4AD_Buffer AudioDecBufferIn; /**< Input structure for the audio decoder */
- M4AD_Buffer AudioDecBufferOut; /**< Output structure for the audio decoder */
- M4OSA_MemAddr8 pPosInDecBufferOut; /**< Position into the decoder buffer */
- AAC_DEC_STREAM_PROPS AacProperties; /**< Structure for new api to get AAC properties */
-
- /**
- * Sample Rate Convertor (SSRC) stuff */
- SSRC_Instance_t SsrcInstance; /**< Context of the Ssrc */
- SSRC_Scratch_t* SsrcScratch; /**< Working memory of the Ssrc */
- short iSsrcNbSamplIn; /**< Number of sample the Ssrc needs as input */
- short iSsrcNbSamplOut; /**< Number of sample the Ssrc outputs */
- M4OSA_MemAddr8 pSsrcBufferIn; /**< Input of the SSRC */
- M4OSA_MemAddr8 pSsrcBufferOut; /**< Output of the SSRC */
- M4OSA_MemAddr8 pPosInSsrcBufferIn; /**< Position into the SSRC in buffer */
- M4OSA_MemAddr8 pPosInSsrcBufferOut;/**< Position into the SSRC out buffer */
-
- M4OSA_Context pLVAudioResampler;
-
-
- /**
- * audio encoder stuff */
- M4OSA_Context pAudioEncCtxt; /**< Context of the audio encoder */
- M4ENCODER_AudioDecSpecificInfo pAudioEncDSI; /**< Decoder specific info built by the encoder*/
- M4ENCODER_AudioParams AudioEncParams;/**< Config of the audio encoder */
- M4OSA_MemAddr8 pAudioEncoderBuffer; /**< Input of the encoder */
- M4OSA_MemAddr8 pPosInAudioEncoderBuffer; /**< Position into the encoder buffer */
- M4OSA_UInt32 audioEncoderGranularity; /**< Minimum number of pcm samples needed
- to feed audio encoder */
-
- /**
- * Writer stuff */
- M4OSA_Context pWriterContext; /**< Context of the writer module */
- M4OSA_Void* pOutputFile; /**< Output file to be created */
- M4OSA_Void* pTemporaryFile; /**< Temporary file to be created to store
- metadata ("moov.bin") */
- M4SYS_StreamDescription WriterVideoStream; /**< Description of the written video stream */
- M4SYS_StreamDescription WriterAudioStream; /**< Description of the written audio stream */
- M4WRITER_StreamVideoInfos WriterVideoStreamInfo;/**< Video properties of the written video
- stream */
- M4SYS_AccessUnit WriterVideoAU; /**< Written video access unit */
- M4SYS_AccessUnit WriterAudioAU; /**< Written audio access unit */
- M4OSA_UInt32 uiVideoAUCount; /**< Number of video AU written in output
- file */
- M4OSA_UInt32 uiVideoMaxAuSize; /**< Max access unit size for the output
- video stream */
- M4OSA_UInt32 uiVideoMaxChunckSize; /**< Max chunck size for the output video
- stream */
- M4OSA_UInt32 uiAudioAUCount; /**< Number of audio AU written in output file */
- M4OSA_UInt32 uiAudioMaxAuSize; /**< Max access unit size for the output
- audio stream */
- M4OSA_UInt32 uiAudioCts; /**< Audio AU cts (when audio is transcoded) */
- M4OSA_Bool b_isRawWriter; /**< Boolean to know if the raw writer is
- registered or not */
- M4OSA_Context pOutputPCMfile; /**< Output PCM file if not NULL */
-
- /**
- * Filesystem functions */
- M4OSA_FileReadPointer* pOsaFileReadPtr; /**< OSAL file read functions,
- to be provided by user */
- M4OSA_FileWriterPointer* pOsaFileWritPtr; /**< OSAL file write functions,
- to be provided by user */
-
- /**
- * Media and Codec registration */
- /**< Table of M4VES_WriterInterface structures for avalaible Writers list */
- M4MCS_WriterInterface WriterInterface[M4WRITER_kType_NB];
- /**< open, close, setoption,etc... functions of the used writer*/
- M4WRITER_GlobalInterface* pWriterGlobalFcts;
- /**< data manipulation functions of the used writer */
- M4WRITER_DataInterface* pWriterDataFcts;
- /**< Table of M4ENCODER_GlobalInterface structures for avalaible encoders list */
- M4ENCODER_GlobalInterface* pVideoEncoderInterface[M4ENCODER_kVideo_NB];
- /**< Functions of the used encoder */
- M4ENCODER_GlobalInterface* pVideoEncoderGlobalFcts;
-
- M4OSA_Void* pVideoEncoderExternalAPITable[M4ENCODER_kVideo_NB];
- M4OSA_Void* pCurrentVideoEncoderExternalAPI;
- M4OSA_Void* pVideoEncoderUserDataTable[M4ENCODER_kVideo_NB];
- M4OSA_Void* pCurrentVideoEncoderUserData;
-
- /**< Table of M4ENCODER_AudioGlobalInterface structures for avalaible encoders list */
- M4ENCODER_AudioGlobalInterface* pAudioEncoderInterface[M4ENCODER_kAudio_NB];
- /**< Table of internal/external flags for avalaible encoders list */
- M4OSA_Bool pAudioEncoderFlag[M4ENCODER_kAudio_NB];
- /**< Functions of the used encoder */
- M4ENCODER_AudioGlobalInterface* pAudioEncoderGlobalFcts;
- M4OSA_Void* pAudioEncoderUserDataTable[M4ENCODER_kAudio_NB];
- M4OSA_Void* pCurrentAudioEncoderUserData;
-
- M4READER_GlobalInterface* m_pReaderGlobalItTable[M4READER_kMediaType_NB];
- M4READER_DataInterface* m_pReaderDataItTable[M4READER_kMediaType_NB];
- M4READER_GlobalInterface* m_pReader;
- M4READER_DataInterface* m_pReaderDataIt;
- M4OSA_UInt8 m_uiNbRegisteredReaders;
-
- M4DECODER_VideoInterface* m_pVideoDecoder;
- M4DECODER_VideoInterface* m_pVideoDecoderItTable[M4DECODER_kVideoType_NB];
-#ifdef M4VSS_ENABLE_EXTERNAL_DECODERS
- M4OSA_Void* m_pCurrentVideoDecoderUserData;
- M4OSA_Void* m_pVideoDecoderUserDataTable[M4DECODER_kVideoType_NB];
-#endif /* M4VSS_ENABLE_EXTERNAL_DECODERS */
- M4OSA_UInt8 m_uiNbRegisteredVideoDec;
-
- M4AD_Interface* m_pAudioDecoder;
- M4AD_Interface* m_pAudioDecoderItTable[M4AD_kType_NB];
- M4OSA_Bool m_pAudioDecoderFlagTable[M4AD_kType_NB]; /**< store indices of external
- decoders */
- M4OSA_Void* m_pAudioDecoderUserDataTable[M4AD_kType_NB];
- M4OSA_Void* m_pCurrentAudioDecoderUserData;
-
- M4MCS_MediaRendering MediaRendering; /**< FB: to crop, resize, or render black borders*/
- M4OSA_Context m_air_context;
- M4OSA_Bool bExtOMXAudDecoder; /* External OMX Audio decoder */
-
- /**< FlB 2009.03.04: Audio effects*/
- M4MCS_EffectSettings *pEffects; /**< List of effects */
- M4OSA_UInt8 nbEffects; /**< Number of effects in the above list */
- M4OSA_Int8 pActiveEffectNumber; /**< Effect ID to be applied, if -1,
- no effect has to be applied currently*/
-
-#ifdef M4MCS_SUPPORT_STILL_PICTURE
- M4OSA_Bool m_bIsStillPicture; /**< =TRUE if input file is a still picture
- (JPEG, PNG, BMP, GIF)*/
- M4MCS_Context m_pStillPictureContext; /**< Context of the still picture part of MCS*/
-#endif /*M4MCS_SUPPORT_STILL_PICTURE*/
- NSWAVC_MCS_t *m_pInstance;
- M4OSA_UInt8 *H264MCSTempBuffer;
- M4OSA_UInt32 H264MCSTempBufferSize;
- M4OSA_UInt32 H264MCSTempBufferDataSize;
- M4OSA_Bool bH264Trim;
- /* Flag when to get lastdecodedframeCTS */
- M4OSA_Bool bLastDecodedFrameCTS;
- M4OSA_Int32 encodingVideoProfile;
- M4OSA_Int32 encodingVideoLevel;
-
-} M4MCS_InternalContext;
-
-
-#endif /* __M4MCS_INTERNALTYPES_H__ */
-