CSourceStream.CSourceStream constructor
[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
Constructor method.
Syntax
CSourceStream(
TCHAR *pObjectName,
HRESULT *phr,
CSource *pms,
LPCWSTR pName
);
Parameters
-
pObjectName
-
Pointer to a string containing the debug name of the pin.
-
phr
-
Pointer to a variable that receives an HRESULT value indicating the success or failure of the method. Initialize the value to S_OK before creating the object. The value is changed only if an error occurs.
-
pms
-
Pointer to the CSource filter that created this pin.
-
pName
-
Pointer to a string that contains the name of the pin.
Remarks
The string given in the pObjectName parameter is used only for debugging purposes. For more information, see CBaseObject.
The string given in the pName parameter is the name returned by the IPin::QueryPinInfo method. The CSourceStream
class does not use this name for the pin identifier returned by the CSourceStream::QueryId method. Instead, QueryId calculates a pin identifier based on the pin number. (Pin identifiers support graph persistence. For more information, see IPin::QueryId.)
The constructor automatically adds the pin to the owning filter, by calling CSource::AddPin.
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|