Platforms to show: All Mac Windows Linux Cross-Platform
Back to DirectShowCaptureGraphBuilderMBS class.
DirectShowCaptureGraphBuilderMBS.AllocCapFile(FilePath as string, Size as UInt64)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DirectShow | MBS Win Plugin | 12.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
FilePath: a string that contains the name of the file to create or resize.
Size: Size of the file to allocate, in bytes.
Lasterror is set.
This method fails if the file is read-only.
It is best to allocate as much space as possible—ideally, more than needed. However, this can result in a very large file that contains relatively little data. For example, a 1-gigabyte (GB) capture file might contain a few megabytes of captured video. Use the CopyCaptureFile method to copy the data into a new file. That method copies only the data and ignores the empty portion of the original file.
If you use this method to preallocate the file, call SetMode on the file-writer filter with the value zero. If the filter is set to AM_FILE_OVERWRITE, it will delete the preallocated file. Note that some file-writer filters do not support mode 0.
DirectShowCaptureGraphBuilderMBS.Constructor
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DirectShow | MBS Win Plugin | 12.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
DirectShowCaptureGraphBuilderMBS.Crossbar(filter as DirectShowBaseFilterMBS) as DirectShowAMCrossbarMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DirectShow | MBS Win Plugin | 14.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
See also:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd390991(v=vs.85).aspx
This function implements the FindInterface call with LOOK_UPSTREAM_ONLY and the filter you provide.
DirectShowCaptureGraphBuilderMBS.FindPin(Source as DirectShowBaseFilterMBS, PinDirection as Integer, Category as DirectShowGUIDMBS = nil, Type as DirectShowGUIDMBS = nil, Unconnected as boolean = false, Num as Integer = 0) as DirectShowPinMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DirectShow | MBS Win Plugin | 21.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Source: an interface on a filter, or to an interface on a pin.
PinDirection: Specifies the pin direction (input or output). See constants in DirectShowPinMBS class.
Category: A GUID that specifies one of the pin categories listed in Pin Property Set. To match any pin, regardless of category, set this parameter to nil.
Type: A major type GUID that specifies the media type. Use nil to match any media type.
Unconnected: Boolean value that specifies whether the pin must be unconnected. If true, the pin must be unconnected. If false, the pin can be connected or unconnected.
num: Zero-based index of the pin to retrieve, from the set of matching pins. If Source is a filter, and more than one pin matches the search criteria, this parameter specifies which pin to retrieve. If Source is a pin, this parameter is ignored.
Returns the pin object.
Lasterror is set.
If Source is a filter, the method searches for the nth pin on that filter that matches the search criteria, where n is given by the num parameter. If the method finds a matching pin, it returns the pin.
If Source is a pin, the method tests that pin against the search criteria. If the pin matches the criteria, the method returns the pin. Otherwise, it returns nil.
Typically, an application will not need to use this method. It is provided for unusually complex tasks, when the RenderStream method cannot build the filter graph. Use this method to retrieve a desired pin from a capture filter, and then build the rest of the graph manually.
See also:
DirectShowCaptureGraphBuilderMBS.FindPin(Source as DirectShowPinMBS, PinDirection as Integer, Category as DirectShowGUIDMBS = nil, Type as DirectShowGUIDMBS = nil, Unconnected as boolean = false, Num as Integer = 0) as DirectShowPinMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DirectShow | MBS Win Plugin | 21.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Source: an interface on a filter, or to an interface on a pin.
PinDirection: Specifies the pin direction (input or output). See constants in DirectShowPinMBS class.
Category: A GUID that specifies one of the pin categories listed in Pin Property Set. To match any pin, regardless of category, set this parameter to nil.
Type: A major type GUID that specifies the media type. Use nil to match any media type.
Unconnected: Boolean value that specifies whether the pin must be unconnected. If true, the pin must be unconnected. If false, the pin can be connected or unconnected.
num: Zero-based index of the pin to retrieve, from the set of matching pins. If Source is a filter, and more than one pin matches the search criteria, this parameter specifies which pin to retrieve. If Source is a pin, this parameter is ignored.
Returns the pin object.
Lasterror is set.
If Source is a filter, the method searches for the nth pin on that filter that matches the search criteria, where n is given by the num parameter. If the method finds a matching pin, it returns the pin.
If Source is a pin, the method tests that pin against the search criteria. If the pin matches the criteria, the method returns the pin. Otherwise, it returns nil.
Typically, an application will not need to use this method. It is provided for unusually complex tasks, when the RenderStream method cannot build the filter graph. Use this method to retrieve a desired pin from a capture filter, and then build the rest of the graph manually.
See also:
DirectShowCaptureGraphBuilderMBS.GetFiltergraph as DirectShowGraphBuilderMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DirectShow | MBS Win Plugin | 12.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Sets lasterror.
DirectShowCaptureGraphBuilderMBS.GetStreamConfig(Category as DirectShowGUIDMBS, filter as DirectShowBaseFilterMBS) as DirectShowAMStreamConfigMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DirectShow | MBS Win Plugin | 21.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Lasterror is set.
e.g. pass PIN_CATEGORY_CAPTURE or PIN_CATEGORY_PREVIEW for category, as defined in PinMBS class.
See also:
Some examples using this method:
DirectShowCaptureGraphBuilderMBS.GetStreamConfig(preview as boolean, filter as DirectShowBaseFilterMBS) as DirectShowAMStreamConfigMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DirectShow | MBS Win Plugin | 13.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Lasterror is set.
Preview: Pass true to get the preview pin or pass false for the capture pin instead.
See also:
DirectShowCaptureGraphBuilderMBS.RenderStream(category as DirectShowGUIDMBS, Type as DirectShowGUIDMBS, Source as DirectShowBaseFilterMBS, Intermediate as DirectShowBaseFilterMBS = nil, Sink as DirectShowBaseFilterMBS = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DirectShow | MBS Win Plugin | 12.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Lasterror is set:
Category: A GUID that specifies one of the pin categories listed in Pin Property Set. To match any pin, regardless of category, set this parameter to nil. Typical values include the following. PIN_CATEGORY_CAPTURE, PIN_CATEGORY_PREVIEW, PIN_CATEGORY_CC.
Type: A major-type GUID that specifies the media type of the output pin; or nil to use any pin, regardless of media type.
Source: Specifies a pointer to the starting filter for the connection, or to an output pin.
Intermediate: BaseFilter interface of an intermediate filter, such as a compression filter. Can be nil.
Sink: BaseFilter interface of a sink filter, such as a renderer or mux filter. If the value is nil, the method uses a default renderer (see Remarks).
see also:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd311924(v=vs.85).aspx
See also:
Some examples using this method:
DirectShowCaptureGraphBuilderMBS.RenderStream(category as DirectShowGUIDMBS, Type as DirectShowGUIDMBS, Source as DirectShowPinMBS, Intermediate as DirectShowBaseFilterMBS = nil, Sink as DirectShowBaseFilterMBS = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DirectShow | MBS Win Plugin | 12.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Lasterror is set:
Category: A GUID that specifies one of the pin categories listed in Pin Property Set. To match any pin, regardless of category, set this parameter to nil. Typical values include the following. PIN_CATEGORY_CAPTURE, PIN_CATEGORY_PREVIEW, PIN_CATEGORY_CC.
Type: A major-type GUID that specifies the media type of the output pin; or nil to use any pin, regardless of media type.
Source: Specifies a pointer to the starting filter for the connection, or to an output pin.
Intermediate: BaseFilter interface of an intermediate filter, such as a compression filter. Can be nil.
Sink: BaseFilter interface of a sink filter, such as a renderer or mux filter. If the value is nil, the method uses a default renderer (see Remarks).
see also:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd311924(v=vs.85).aspx
See also:
DirectShowCaptureGraphBuilderMBS.SetFiltergraph(graph as DirectShowGraphBuilderMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DirectShow | MBS Win Plugin | 12.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Lasterror is set.
graph: specifies the filter graph to use for subsequent calls to the AddFilter method.
The graph builder will automatically create a filter graph if you don't call this method. If you call this method after the graph builder has created its own filter graph, the call will fail.
Some examples using this method:
DirectShowCaptureGraphBuilderMBS.SetOutputFileName(Type as DirectShowGUIDMBS, FilePath as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DirectShow | MBS Win Plugin | 12.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Lasterror is set.
Type: GUID representing the media subtype. Must be MEDIASUBTYPE_Avi.
FilePath: string containing the output file name.
filter: Optional, a filter representing the multiplexer filter.
Sink: Optional, a FileSinkFilter object representing the file writer.
This method inserts the multiplexer and the file writer into the filter graph and calls SetFileName to set the output file name.
See also:
Some examples using this method:
DirectShowCaptureGraphBuilderMBS.SetOutputFileName(Type as DirectShowGUIDMBS, FilePath as string, byref filter as DirectShowBaseFilterMBS, byref sink as DirectShowFileSinkFilterMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DirectShow | MBS Win Plugin | 12.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Lasterror is set.
Type: GUID representing the media subtype. Must be MEDIASUBTYPE_Avi.
FilePath: string containing the output file name.
filter: Optional, a filter representing the multiplexer filter.
Sink: Optional, a FileSinkFilter object representing the file writer.
This method inserts the multiplexer and the file writer into the filter graph and calls SetFileName to set the output file name.
See also:
DirectShowCaptureGraphBuilderMBS.SetupHighestResolution(videoInputFilter as DirectShowBaseFilterMBS, preview as boolean = false)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DirectShow | MBS Win Plugin | 18.4 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Queries internally GetStreamConfig, walks over all VideoCaps, picks best and sets it as format.
The items on this page are in the following plugins: MBS Win Plugin.