Editing Engine Parameters
The following section describes the Parameter GUIDs declared in the PropID_EditingEngine.h header file to be used for tuning the SolveigMM Video Editing Engine filter by means of the IModuleConfig interface. The following tables provide an overview of the Parameter GUIDs for the SolveigMM Video Editing Engine.
Basic parameters can be specified either by the XTL task or as simplified parameters. You can not mix initialization with both methods at the same time.
Basic XTL task parameters:
Parameter GUID | Value type | Available values | Default | Description |
SMAT_XTLString | VT_BSTR | - | Specifies task in Batch XTL format | |
SMAT_BatchFileName | VT_BSTR | - | Specifies an input batch file name |
Basic Simplified parameters:
Parameter GUID | Value type | Available values | Default | Description |
SMAT_InputFile | VT_BSTR | - | Specifies an input media file name | |
SMAT_OutputFile | VT_BSTR | - | Specifies an output media file name | |
SMAT_Flags | VT_UI4 | [SMM_TrimFlags] | 0 | Sets trimming configuration flags to be set |
SMAT_ResetFlags | VT_UI4 | [SMM_TrimFlags] | Sets trimming configuration flags to be reset | |
SMAT_TrimList | VT_BYREF | VT_UI1 | 0 | Sets trimming parameters via TrimInfoList structure | |
SMAT_AudioStreamNumber | VT_I4 | [1 - n] | 1 | Sets a number of an audio stream to be trimmed |
SMAT_VideoStreamNumber | VT_I4 | [1 - n] | 1 | Sets a number of a video stream to be trimmed |
SMAT_OutputType | VT_UI4 | [SMM_OutputTypes] | input type | Specifies an output file type |
SMAT_TaskType | VT_UI4 | [SMM_TaskType] | 0 | The type of process to be performed |
SMAT_TrackInfo | VT_BYREF | VT_UI1 | - | Passes the parameters of the chosen files to Editing Engine | |
SMAT_MPEG2IndexFileName | VT_BSTR | - | Provides the name of MPEG2 index filename. |
Other initialization parameters:
Parameter GUID | Value type | Available values | Default | Description |
SMAT_SilentPath | VT_BSTR | - | Sets the registry path that stores paths of filters to use in silent mode | |
SMAT_CodecsSet | VT_BSTR | See below | Sets the set of codecs to use for files editing | |
SMAT_CodecsSet_GS | VT_BSTR | See below | Sets the set of codecs to use for files editing | |
SMAT_Progress | VT_I4 | [0 - 100] Read-only | - | Retrieves a progress of trimming process |
SMAT_Callback | VT_BYREF | VT_UI1 | - | Sets a callback COM interface: ITrimmerObjControlCB | |
SMAT_GetVersions2 | VT_BYREF | VT_UI1 | Read only | 0 | Retrieves all the objects versions being used by the engine |
SMAT_CurrentSize | VT_UI8 | Read only | - | Retrieves output AVI file size during trimming process |
SMAT_CurrentBatchTask | VT_UI4 | Read only | - | Retrieves a number of a current task being processed |
SMAT_BatchTasksNum | VT_UI4 | Read only | - | Retrieves a count of tasks a set batch file contains |
SMAT_GetFileType | *See below | [SMM_OutputTypes] | Returns the type of the file | |
SMAT_ValidateFiles | VT_I4 | HRESULT values | Validate the parameters of chosen files. | |
SMAT_ASFMarker | VT_BYREF | - | - | Sets or retrieves ASF marker with specified name and position |
SMAT_ASFMarkersCount | VT_I4 | Read only | - | Retrieves a count of markers contained in an input ASF |
SMAT_ASFMarkerRemove | VT_BSTR, VT_I4 | - | - | Removes a marker from an input ASF |
SMAT_OpenWithShareWriteMode | VT_BOOL | - | - | Opens input media in sharewrite mode. When it's required to edit TS file without stopping of writing it by capture software |
You need to call IModuleConfig::CommitChanges when you finish the initializations and set all required parameters, to apply the initialization parameters. Otherwise, they may not be applied.
SMAT_XTLString
GUID: {DF8E5A0D-6F85-42f6-A777-CB8C21A459F4}
Description: Set task in a Batch XTL format to the Video Editing Engine. For details please see BatchSplit sample application.
Type: VT_BSTR
SMAT_BatchFileName
GUID:
{909605C1-F9CE-4360-9AFA-0BAE16E95784}
Description:
Specifies an input batch file name (*.xtl). In this mode the Video Editing Engine process a batch file set. For details see BatchSplit sample application.
Type:
VT_BSTR
SMAT_InputFile
GUID:
{4890910-6B0B-465D-B507-2568710565FD}
Description:
Specifies an input media file name (AVI, WMV, ASF, MP3, MPA, WMA). For details please see SMM Trim C++ AVI, MP3, BatchSplit sample applications.
Type:
VT_BSTR
SMAT_OutputFile
GUID:
{45c2624-07e5-4905-A1A5-23DDD26EFC13}
Description:
Specifies an output media file name the Engine saves processed data to. For details please see SMM Trim C++ AVI, MP3, BatchSplit sample applications.
Type:
VT_BSTR
SMAT_Flags
GUID:
{AAF40DFF-0698-4424-87DC-3B1E2D60CDD8}
Description:
Set trimming configuration flags to the Video Editing Engine. For details please see SMM Trim C++ MP3 sample application.
Type:
VT_UI4
Note:
Value 0 means reset all flags.
SMAT_ResetFlags
GUID:
{19F90CB9-A5EA-4821-A8BA-AD6FB9422B9C}
Description:
Resets specified flags that were set before by means of SMAT_Flags paramater. For details please see SMM Trim C++ MP3 sample application.
Type:
VT_UI4
SMAT_TrimList
GUID:
{19F90CB9-A5EA-4821-A8BA-AD6FB9422B9C}
Description:
Specifies trimming parameters to be a pointer to TrimInfoList structure that contains start/stop time values of media fragments to kept. Time values are 100 nanosecond units. For details please see SMM Trim C++ AVI, MP3 sample applications.
Type:
VT_BYREF | VT_UI1
SMAT_Progress
GUID:
{AE82DE01-D84B-4EE5-90AA-052B108C4380}
Description:
Retrieves a progress of trimming process in percentage. For details please see SMM Trim C++ AVI, MP3 sample applications.
Type:
VT_I4
Available Values:
0 - 100 (%)
SMAT_AudioStreamNumber
GUID:
{5EB26970-133F-4ad1-BE21-A849618CA8F3}
Description:
Sets a number of an audio stream to be trimmed.
Type:
VT_I4
Available Values:
0 - do not pass an audio stream to output [1 - n] - number of an audio stream, an input media files contains, that must be trimmed and presented in output file
SMAT_VideoStreamNumber
GUID:
{D9898809-5987-4EBC-967D-C595465923A1}
Description:
Sets a number of a video stream to be trimmed
Type:
VT_I4
Available Values:
0 - do not pass a video stream to output [1 - n] - number of a video stream, an input media files contains, that must be trimmed and presented in output file
SMAT_Callback
GUID:
{DA1ED33F-9EF4-4c98-BCA5-66FF917FFCBE}
Description:
Sets a callback COM interface - ITrimmerObjControlCB. For details please see example code and BatchSplit, SMM Trim C++ AVI sample applications.
Example Code:
VARIANT var;
HRESULT hr = S_OK;
var.vt = ( VT_BYREF | VT_UI1 );
var.pbVal = (BYTE*) &m_pITrimmerObjControlCB;
hr = m_pIModuleConfig->SetValue( &SMAT_Callback, &var);
Type:
VT_BYREF | VT_UI1
SMAT_GetVersions2
GUID:
{DB90789E-8C00-4d40-B542-428C8DC20169}
Description:
Retrieves all the objects names and versions being used by the engine. The data is stored to FILE_VERSIONS_2 structure a pointer to that is an input parameter. Memory for FILE_VERSIONS_2
data has to be allocated by an application. First, application asks the Video Editing object count of objects by setting NULL to input parameter. For details please see an example code.
Available Values:
NULL - means the engine has to retrieve a byte size of structure
Example Code:
VARIANT var;
var.vt = ( VT_BYREF | VT_UI1 );
var.pbVal = NULL;
HRESULT hr = m_pIModuleConfig->GetValue( &SMAT_GetVersions2, &var );
FILE_VERSIONS_2 list;
list.count = var.llVal;
list.data = new VERSION_INFO_2[list.count];
var.vt = ( VT_BYREF | VT_UI1 );
var.pbVal = ( BYTE * )&list;
hr = m_pIModuleConfig->GetValue( &SMAT_GetVersions2, &var );
Type:
VT_BYREF | VT_UI1
SMAT_CurrentSize
GUID:
{BD62FD5E-B517-4f8f-976E-5FA1ACE4F9DC}
Description:
Retrieves an output AVI file byte size during trimming process.
Type:
VT_UI8
SMAT_CurrentBatchTask
GUID:
{7AF7B8FE-FA2F-44f2-915E-D668EE32E8A6}
Description:
Retrieves a number of a current task being processed by the Video Editing Engine in batch mode. For details see BatchSplit sample application.
Type:
VT_UI4
SMAT_OutputType
GUID:
{3F20F1D6-1132-4e28-AB6B-ED94700C2949}
Description:
Specifies output file type as SMM_OutputTypes paramater
Type:
VT_UI4
Available Values:
For details see SMM_OutputTypes available values
SMAT_BatchTasksNum
GUID:
{909605C1-F9CE-4360-9AFA-0BAE16E95784}
Description:
Retrieves count of tasks a batch file set contains. For details see BatchSplit sample application.
Type:
VT_UI4
SMAT_TaskType
GUID:
{A5E6000D-52D9-4f41-9091-11C4FDAE990B}
Type:
VT_UI4
Description:
Specifies which process is to be performed with chosen files( See SMM_TaskType ).
Available values:
see Editing Engine enumerations.
SMAT_TrackInfo
GUID:
{FA8BD847-4DC6-492d-9585-E86654CDAC1F}
Type:
VT_BYREF | VT_UI1
Description:
Passes the parameters of the chosen files to Editing Engine. Used for joining, the application should correctly fill in the SMM_TRACK_INFO's members and pass the pointer to the class to Editing Engine via IModuleConfig interface (for more information see Editing Engine structures, Editing Engine parameters).
SMAT_MPEG2IndexFileName
GUID:
{1ADE47B6-BB44-4820-A077-6116F861775B}
Description:
Sets the MPEG2 index file name to achieve maximum trimming precision.
Type:
VT_BSTR
SMAT_SilentPath
GUID:
{2E83B26B-65B3-4609-95B5-E918A96AE151}
Description:
Sets the registry path that stores paths of filters to use in silent mode (without registration).
Type:
VT_BSTR
SMAT_CodecsSet
GUID:
{17B25796-46AB-44a6-BBF4-9A3A160E63FB}
Description:
Sets the profile that shows which filter should be used for current operation.
Type:
VT_BSTR
Default value:
dmx<type:MPEG2>_EL__mux<type:MPEG2>_EL__enc<type:AVC>_EL__enc<type:MPEG2>_EL__dec<type:AVC>_EL__dec<type:MPEG2>_EL__ixr<type:MPEG2>_EL__dec<type:HEVC>_EL__dmx<type:MP4>_SM__mux<type:MP4>_SM__dmx<type:FLV>_SM__mux<type:FLV>_SM__dmx<type:MXF>_NB__mux<type:MXF>_NB
The current version of SDK uses Elecard muxer/splitter/encoder/decoder/index reader filters to edit MPEG2 and AVCHD files, Solveig Multimedia muxer/demuxer for MP4 and FLV files and nablet muxer/demuxer for MXF files editing.
SMAT_CodecsSet_GS
GUID:
{AB771641-C3FD-4B0B-BDBE-52197F3FCE45}
Description:
Sets the profile that shows which filter should be used for current operation in GStreamer Engine.
Type:
VT_BSTR
Default value:
dmx<type:MP4>_SM__dmx<type:TS>_NB__dec<type:AVC>_AV__enc<type:AVC>_VL__dec<type:AVC;fmt:MXF>_NB__enc<type:AVC;fmt:MXF>_NB__dec<type:MPEG2>_NB__enc<type:MPEG2>_NB__dec<type:HEVC>_AV__enc<type:HEVC>_MW__prs<type:HEVC>_GS
SMAT_GetFileType
GUID:
{534D4154-5F47-6574-4669-6C6554797065}
Description:
this function returns the type of the file. SMM_File_Type_NO means that the type is not supported or it is non-media file. For more information see SMM_OutputTypes available values.
Type:
Output parameter - VT_INT(intVal) - File type (should be casted to SMM_OutputTypes )
Example Code:
SMM_OutputTypes FileType = SMM_File_Type_NO;
VARIANT var = {0};
HRESULT hr = S_OK;
CString strFileName = /* Some file's name */
var.vt = VT_BSTR;
Var.bstrVal = strFileName.AllocSysString();
hr = m_pIModuleConfig->SetValue( $SMAT_InputFile, &var );
hr = m_pIModuleConfig->GetValue( &SMAT_GetFileType, &var);
if( FAILED(hr) )
{
// Place here the appropriate failure handler
}
FileType = ( SMM_OutputTypes ) var.intVal;
SMAT_ValidateFiles
GUID:
{534D4154-5661-6C69-6461-746546696C65}
Description:
This parameters can be applied only to the joining process using IModuleConfig interface.This is used to validate the parameters of chosen files. Files might have different parameters, and joining filter doesn't support reencoding. It means that before joining you should validate if the files are compatible. IModuleConfig::GetValue should be used.
Three results are possible:
- the files have equal parameters - Success, the joining can be started;
- the files have different secondary parameters (mostly applied for sound stream) - the joining still can be started, but there might be problems while playing an output file;
- the files have different critical parameters - the files are incompatible and the joining is impossible. The critical parameters - file type, video and audio compression, presence/absence of video/audio stream, video frame height and width.
Type:
Input - not applied; Output - VT_I4(lVal);
Example Code:
VARIANT var = {0};
HRESULT hr = S_OK;
hr = m_pIModuleConfig->GetValue( &SMAT_ValidateFiles, &var );
if( SUCCEEDED(hr) )
{
HRESULT hrValidationRes = (HRESULT) var.lVal;
if( SUCCEEDED(hrValidationRes) )
{
//Check if hrValidationRes == S_FALSE(see further)
//and use an appropriate handler( if needed )
//then start SMM Editing Engine
}
else
{
//Place here the appropriate error handler( if any )
//and return without starting
}
}
For more information on how to correctly tune SMM Editing Engine for joining, see the SMM Join C++ Sample source code and pay attention on the comments.
Available values:
The output parameter is a HRESULT of the files validation. The most important possible values are as follows:
E_INVALIDARG | Type of the output file or structure that describes TrackInfo wasn't set. |
VFW_E_INVALID_FILE_FORMAT | Some files have invalid or unsupported format. |
S_OK | SUCCESS, files can be joined. |
S_FALSE | The files have different secondary parameters, it may cause problems. |
E_FAIL | Some critical parameters are different. Further joining is ipossible and must be stopped here. |
Notes:
Files validation should be performed before starting the SMM Editing Engine (See ITrimmerObjControl::Start)
To check if the files are compatible, cast the result's lVal to HRESULT.
If you check the result with SUCCEEDED()
macro remember that it returns TRUE if HRESULT( lVal ) == S_FALSE
and FALSE if HRESULT( lVal ) == E_FAIL
or other errors. You can avoid using this automatic validation due to abcense of intermediate results that makes impossible to locate the incompatible files. Instead you may use your own, but in this case you should consider all the notes and features described above.
SMAT_ASFMarker
GUID:
{C022A53F-CE3D-4c03-BAED-11FCC7CCDED2}
Description:
Sets or retrieves ASF marker with specified name and position to an input file. An input parameter is a pointer to SMM_ASF_MARKER structure. For details please see ASFMarkers sample application.
Type:
VT_BYREF
Available Values:
Retrieving ASF marker data is possible by specifying a marker name (see SMM_ASF_MARKER::name
) or a marker index (SMM_ASF_MARKER::num_pos
)
SMAT_ASFMarkersCount
GUID:
{0B9C6AB5-F968-46a8-85E1-09FA8B8A734B}
Description:
Retrieves a count of markers contained in an input ASF file
Type:
VT_I4
SMAT_ASFMarkerRemove
GUID:
{72825BB9-B725-456a-8E2C-D650ACDFB674}
Description:
Removes a marker from an input ASF file by marker name or its index. An input parameter can be either marker name (VT_BSTR) or its zero-based index (VT_I4)
Type:
VT_BSTR, VT_I4
SMAT_OpenWithShareWriteMode
GUID:
{9D692A19-DE29-4055-8C4B-B4895ECD9B7E}
Description:
Opens input media in sharewrite mode. When it's required to edit TS file without stopping of writing it by capture software.
Type:
VT_BSTR, VT_I4
SMAT_EngineType
GUID:
{040F3B0F-362C-4E6A-A69D-6F185FE6F52B}
Description:
Specifies/Retrieves the engine type.
Type:
VT_BSTR
Notes:
Specified value will be used only if not set in the XTL. Retrieving the value is only possible after setting the SMAT_XTLString, otherwise returns E_FAIL.