Show / Hide Table of Contents

    Solveig Multimedia logo


    SolveigMM-Elecard MPEG2 Trimmer filter

    The MPEG2 trimmer filter is a DirectShow transform filter. It does GOP and frame accurate trimming of MPEG2 video streams and compatible audio streams.

    Filter Interfaces IBaseFilter, IModuleConfig, ISpecifyPropertyPages
    Input Pin Media Types MEDIATYPE_Video, MEDIASUBTYPE_MPEG2_VIDEO
    MEDIATYPE_Audio, MEDIASUBTYPE_NULL
    Input Pin Interfaces IPin, IMemInputPin
    Output Pin Media Types MEDIATYPE_Video, MEDIASUBTYPE_MPEG2_VIDEO
    MEDIATYPE_Audio, MEDIASUBTYPE_NULL
    Output Pin Interfaces IPin, IMemInputPin
    Filter CLSID CLSID_MP2_TRIM_FA
    Property Page CLSID CLSID_MP2_TRIM_FA_PPage,
    CLSID_MP2_TRIM_FA_About_PPage
    Executable SMM_MP2TrimmerFA.ax
    Merit MERIT_DO_NOT_USE
    Filter Category CLSID_LegacyAmFilterCategory
    Declared in PropID_MP2FATrimmer.h

    Requirements

    The filter initially have no audio pins, you should first create the necessary pins.

    Features

    The filter's property page is shown on fig. 1 and includes the following control elements:

    • Time intervals list and a set of buttons for its editing.
    • Edit boxes for specifying start and stop time of each time interval (in DirectShow Reference Time units).
    • Edit box for specifying the number of audio pins.
    • To get the frame accuracy, tick the "Use index" button and specify the full index file name.

    SolveigMM-Elecard MPEG2 Trimmer filter

    Usage

    NOTE: All changes must be applied (using either APPLY button in Graph Editor or Apply method of IPropertyPage interface) to take place, the default values are used otherwise.

    To use the filter manually:

    • Add filter to a graph.
    • Specify the appropriate audio pins number.
    • Set the start and stop positions of the interval and use "Add Time" button to add the interval into the list. Add all necessary intervals like this.
    • To get the frame accuracy, tick the "Use index" button and specify the full index file name.
    • Build and run the graph.

    To use programmatically not using property page:

    The following section describes the Parameter GUIDs declared in the PropID_MP2FATrimmer.h header file to be used for tuning the SolveigMM-Elecard MPEG2 Trimmer DirectShow Filter by means of the IModuleConfig interface.

    The following table provides an overview of the Parameter GUIDs of SolveigMM-Elecard MPEG2 Trimmer DirectShow Filter:

    Parameter GUID Value type Description
    SM2TFA_TrimList VT_BYREF | VT_UI1 Sets trimming parameters
    SM2TFA_AudioPinsNum VT_I4 Sets a number of audio pins to be created
    SM2TFA_Duration VT_I4 Gets stream duration
    SM2TFA_MPEG2IndexFileName VT_BSTR Specifies the index file name.
    SM2TFA_UseMPEG2Index VT_BOOL Specifies weather to use the MPEG2 Index file.
    SMAT_3rdParty VT_BSTR Specifies the unique GUID to activate the Elecard filters.
    SMAT_TrimAccuracy VT_I4 Sets/Gets the trim accuracy.
    SMAT_SilentPath VT_BSTR Sets the silent path.
    SMAT_CodecsSet VT_BSTR Sets the profile.

    SM2TFA_TrimList

    GUID:

    {DC273F41-3A44-425d-82C4-A042D104FE3A}

    Description:

    Used to set/retrieve the trimming intervals list. Poiter to the TrimInfoList structure is used as an input parameter.

    Type:

    VT_BYREF | VT_UI1 (pbVal)

    SM2TFA_AudioPinsNum

    GUID:

    {676545BA-D057-460a-BFD2-BF3F231F8094}

    Description:

    Used to set the desired quantity of audio pins. Default value is 0.

    Type:

    in - VT_I4 (lVal)


    SM2TFA_Duration

    GUID:

    {9B6F30DC-1E87-41f8-A328-5E8B7D5CAFCB}

    Description:

    Set/Retrieve the type of the output file (member of the SMM_OutputTypes enumeration). If this parameter isn't set the graph wouldn't start.

    Type:

    VT_INT (intVal)


    SM2TFA_MPEG2IndexFileName

    GUID:

    See SMAT_MPEG2IndexFileName

    Description:

    Set/Retrieve the MPEG2 index file name.

    Type:

    VT_BSTR (bstrVal)


    SM2TFA_UseMPEG2Index

    GUID:

    {65746723-2112-4ede-9326-F3AD9D658DC4}

    Description:

    Specifies weather to use the MPEG2 Index file.

    Type:

    VT_BOOL (boolVal)


    SMAT_3rdParty

    GUID:

    {69F77066-D77C-4c8e-A39B-966E5BD4D17F}

    Description:

    Specifies the unique GUID to activate the Elecard filters. The GUID should be a BSTR value like {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}.

    Type:

    VT_BSTR (bstrVal)


    SMAT_TrimAccuracy

    GUID:

    {4B07D80A-0FA6-4d69-8438-159CB1BC749F}

    Description:

    Sets/Gets trim accuracy mode.The parameter should be a member of SMM_TrimmAccuracyType.

    Type:

    VT_I4 (lVal)


    SMAT_SilentPath

    GUID:

    {2E83B26B-65B3-4609-95B5-E918A96AE151}

    Description:

    Sets the silent path (which is a registry key containing the information about silent filters).

    Type:

    VT_BSTR (bstrVal)


    SMAT_CodecsSet

    GUID:

    {17B25796-46AB-44a6-BBF4-9A3A160E63FB}

    Description:

    Sets the profile defining which filters should be used.

    Type:

    VT_BSTR (bstrVal)


    ©2005-2024 Solveig Multimedia. All rights reserved.

    Back to top Generated by DocFX