description | ms.assetid | title | ms.topic | ms.date | topic_type | api_name | api_type | api_location | ms.custom | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The ChangeOutputFormat method dynamically changes the media type for the connection, and delivers new segment information. |
d1204ca0-a489-48a0-8fe5-3ade04f51c93 |
CDynamicOutputPin.ChangeOutputFormat method (Amfilter.h) |
reference |
4/26/2023 |
|
|
|
|
UpdateFrequency5 |
[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.]
The ChangeOutputFormat
method dynamically changes the media type for the connection, and delivers new segment information. The change can occur while the filter graph is running. Once this method is called, samples with the old media type cannot be delivered. The caller must ensure that no old samples are pending.
HRESULT ChangeOutputFormat(
const AM_MEDIA_TYPE *pmt,
REFERENCE_TIME tSegmentStart,
REFERENCE_TIME tSegmentStop,
double dSegmentRate
);
-
pmt
-
Pointer to an AM_MEDIA_TYPE structure that specifies the media type.
-
tSegmentStart
-
Start time of the segment.
-
tSegmentStop
-
Stop time of the segment.
-
dSegmentRate
-
Segment rate.
Returns an HRESULT value. Possible values include those shown in the following table.
Return code | Description |
---|---|
|
Success. |
|
Failure. Possibly the owning filter did not call CDynamicOutputPin::SetConfigInfo. |
|
The pin is not connected. |
This method changes the format type while the filter is running. If the downstream pin accepts the new format, no reconnection is necessary. Otherwise, the method attempts to reconnect the pin. If the method successfully changes the format, it delivers the new segment information. This method calls the CDynamicOutputPin::ChangeMediaType method to perform the format change.
You must call the CDynamicOutputPin::StartUsingOutputPin method before calling this method.
Requirement | Value |
---|---|
Header |
|
Library |
|