VideoEditorMain.h revision 51f8eec23a2bcc2cc190373cdd1195972d9b8804
1/* 2 * Copyright (C) 2011 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17#ifndef __VIDEO_EDITOR_API_H__ 18#define __VIDEO_EDITOR_API_H__ 19 20#include "M4OSA_Types.h" 21 22typedef enum 23{ 24 MSG_TYPE_PROGRESS_INDICATION, // Playback progress indication event 25 MSG_TYPE_PLAYER_ERROR, // Playback error 26 MSG_TYPE_PREVIEW_END, // Preview of clips is complete 27 MSG_TYPE_OVERLAY_UPDATE, // update overlay during preview 28 MSG_TYPE_OVERLAY_CLEAR, // clear the overlay 29} progress_callback_msg_type; 30 31typedef struct { 32 int overlaySettingsIndex; 33 int clipIndex; 34} VideoEditorCurretEditInfo; 35 36typedef struct 37{ 38 M4OSA_Void *pFile; /** PCM file path */ 39 M4OSA_Bool bRemoveOriginal; /** If true, the original audio track 40 is not taken into account */ 41 M4OSA_UInt32 uiNbChannels; /** Number of channels (1=mono, 2=stereo) of BGM clip*/ 42 M4OSA_UInt32 uiSamplingFrequency; /** Sampling audio frequency (8000 for amr, 16000 or 43 more for aac) of BGM clip*/ 44 M4OSA_UInt32 uiExtendedSamplingFrequency; /** Extended frequency for AAC+, 45 eAAC+ streams of BGM clip*/ 46 M4OSA_UInt32 uiAddCts; /** Time, in milliseconds, at which the added 47 audio track is inserted */ 48 M4OSA_UInt32 uiAddVolume; /** Volume, in percentage, of the added audio track */ 49 M4OSA_UInt32 beginCutMs; 50 M4OSA_UInt32 endCutMs; 51 M4OSA_Int32 fileType; 52 M4OSA_Bool bLoop; /** Looping on/off **/ 53 /* Audio ducking */ 54 M4OSA_UInt32 uiInDucking_threshold; /** Threshold value at which 55 background music shall duck */ 56 M4OSA_UInt32 uiInDucking_lowVolume; /** lower the background track to 57 this factor of current level */ 58 M4OSA_Bool bInDucking_enable; /** enable ducking */ 59 M4OSA_UInt32 uiBTChannelCount; /** channel count for BT */ 60 M4OSA_Void *pPCMFilePath; 61} M4xVSS_AudioMixingSettings; 62 63typedef struct 64{ 65 M4OSA_Void *pBuffer; /* YUV420 buffer of frame to be rendered*/ 66 M4OSA_UInt32 timeMs; /* time stamp of the frame to be rendered*/ 67 M4OSA_UInt32 uiSurfaceWidth; /* Surface display width*/ 68 M4OSA_UInt32 uiSurfaceHeight; /* Surface display height*/ 69 M4OSA_UInt32 uiFrameWidth; /* Frame width*/ 70 M4OSA_UInt32 uiFrameHeight; /* Frame height*/ 71 M4OSA_Bool bApplyEffect; /* Apply video effects before render*/ 72 M4OSA_UInt32 clipBeginCutTime; /* Clip begin cut time relative to storyboard */ 73 M4OSA_UInt32 clipEndCutTime; /* Clip end cut time relative to storyboard */ 74 M4OSA_UInt32 videoRotationDegree; /* Video rotation degree */ 75 76} VideoEditor_renderPreviewFrameStr; 77#endif /*__VIDEO_EDITOR_API_H__*/ 78