Original English URL: Click to open the link
Some functions are translated, because there are too many functions that do not translate.
1, Iamextdevice interface: This interface inherits the IUnKnown interface, the basic function of the control device, some of the methods are as follows:
2, Iamstreamconfig interface, set some output formats on the identified acquisition and compression filters, and set up audio/video. Users can use this interface to set some properties, such as: The number of video output and frame rate, audio sampling rate and channel count. Also inherit the IUnKnown interface, some of which are as follows:
Note that the filters need to get the Iamstreamconfig interface on their output ipin, so you need to enumerate the PIn of the filter before using the interface, or you can use the Capture Graph Builder object to create the filter graph , you can call the icapturegraphbuilder2::findinterface method . Note that you may want to distinguish between the acquisition pin and the preview pin when collecting.
The function prototype of the Iamstreamconfig::getnumberofcapabilities () method is as follows:
HRESULT getnumberofcapabilities ( int* picount, int* pisize);
The first parameter is used to save the number of all supported audio/video devices, and the second parameter is used to save the configurationAudio_stream_config_capsorVideo_stream_config_caps, the size of the structure body.
The function prototype of the Iamstreamconfig::getstreamcaps () method is as follows:
HRESULT getstreamcaps ( int iIndex, am_media_type** PMT, byte* PSCC);
This method acquires the type of structure on which audio, video, or other data streams depend, and is indicated in PSCC that the first parameter is the device designator in the picount corresponding to the Getnumberofcapabilities method. The second parameter is a pointer to the media type structure, and the third parameter points to the configuration structure body of the media stream .
About the configuration structure of media stream, the original page: Click the Open link
Members
-
-
Guid
-
-
GUID that identifies the format type. For example, format_videoinfo or Format_videoinfo2. For more information, see the formattype member of the Am_media_type structure.
-
-
Videostandard
-
-
The analog video standard supported. The value is a bitwise combination of flags from theAnalogvideostandard enumeration type, or zero.
-
-
Inputsize
-
-
Native size of the incoming video signal. For a compressor, the size was taken from the input pin. For a capture filter, the size was the largest signal the filter can digitize with every pixel remaining unique.
Note Deprecated.
-
-
Mincroppingsize
-
-
Smallest source rectangle allowed. The source rectangle is defined in the rcsource member of theVideoinfoheader or videoinfoheader2 structure.
Note Deprecated.
-
-
Maxcroppingsize
-
-
Largest source rectangle allowed.
Note Deprecated.
-
-
Cropgranularityx
-
-
Horizontal granularity of the source rectangle. This value specifies the increments is valid betweenmincroppingsize and maxcroppingsize.
Note Deprecated.
-
-
Cropgranularityy
-
-
Vertical granularity of the source rectangle. This value specifies the increments is valid betweenmincroppingsize and maxcroppingsize.
Note Deprecated.
-
-
Cropalignx
-
-
Required horizontal alignment of the source rectangle.
Note Deprecated.
-
-
Cropaligny
-
-
Required vertical alignment of the source rectangle.
Note Deprecated.
-
-
Minoutputsize
-
-
Minimum output size.
Note Deprecated.
-
-
Maxoutputsize
-
-
Maximum output size.
Note Deprecated.
-
-
Outputgranularityx
-
-
Granularity of the output width. This value specifies the increments is valid betweenminoutputsize and maxoutputsize.
Note Deprecated.
-
-
Outputgranularityy
-
-
Granularity of output height. This value specifies the increments is valid between minoutputsizeand maxoutputsize.
Note Deprecated.
-
-
Stretchtapsx
-
-
Indicates how well the filter can stretch the image horizontally.
Note Deprecated.
-
-
Stretchtapsy
-
-
Indicates how well the filter can stretch the image vertically.
Note Deprecated.
-
-
Shrinktapsx
-
-
Indicates how well the filter can shrink the image horizontally.
Note Deprecated.
-
-
Shrinktapsy
-
Indicates how well the filter can shrink the image vertically.
NoteDeprecated.
The previous four structure members use the following values:
Value |
meaning |
-
0
|
Does not support stretching/shrinking. |
-
1
|
Uses pixel doubling (stretching) or eliminates pixels (shrinking) |
-
2
|
Uses interpolation (2 taps) |
-
3 and higher
|
Uses interpolation (>2 taps) |
-
-
Minframeinterval
-
-
The minimum frame duration, in 100-nanosecond units. This value is applies only to capture filters.
-
-
Maxframeinterval
-
-
The maximum frame duration, in 100-nanosecond units. This value is applies only to capture filters.
-
-
Minbitspersecond
-
-
Minimum Data Rate this pin can produce.
Note Deprecated.
-
-
Maxbitspersecond
-
-
Maximum Data Rate this pin can produce.
3. Iamvideocontrol interface, this interface allows you to reverse a picture horizontally or vertically, you can set an external touch button to capture an image, the software simulates the external touch method, and lists the available frame rates. Also inherit the IUnknown interface, where the method is as follows:
Not finished.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
DirectShow interface in WebRTC Audio/video Module learning