Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
The CBaseStreamControlclass implements the IAMStreamControlinterface on input and output pins in a filter graph. This class provides control of the starting and stopping of various components of the stream. Various streams can be turned on or off without affecting the rest of the graph. For example, an audio stream can be turned off while a video stream continues, for muting. Or perhaps a capture stream can be turned off while preview continues to flow. This could be used to assist in frame accuracy when exact capture start or stop times are important.
CBaseStreamControlenables you to specify start and stop times in the StartAtand StopAtmember functions and provides stream information in the GetInfomember function. CBaseStreamControluses the StreamControlStateenumerated data type to describe the various states a stream is in. If a stream is flowing it is indicated by the STREAM_FLOWING setting, otherwise it is in a discarding state indicated by the STREAM_DISCARDING setting.
Filters that need to implement the interface on their own should typically inherit from CBaseStreamControlto obtain an implementation of the StartAt, StopAt, and GetInfomethods. The CBaseStreamControlclass also maintains state information and decides what to do with the sample. To implement your own filter with pins that support CBaseStreamControlyou must:
If you are implementing the IAMStreamControlinterface without using CBaseStreamControl, the last two preceding points do not apply.
For sample code, see the video capture sample in the Samples\Multimedia\DShow\src\vidcap subdirectory of the DirectX Media SDK.
Member Functions
CBaseStreamControl | Constructs a CBaseStreamControlobject. |
CheckStreamState | Retrieves a stream's current state. |
Flushing | Notifies the pin when the filter is flushing. |
GetInfo | Retrieves information about the current streaming settings. |
NotifyFilterState | Notifies the pin of what state your filter is in. |
SetFilterGraph | Sets the event sink notification that your filter graph is using. |
SetSyncSource | Identifies the reference clock being used by the graph your filter is in. |
StartAt | Informs the pin when to start sending streaming data. |
StopAt | Informs the pin when to stop processing data and discard any new samples. |