Skip to content

Latest commit

 

History

History
82 lines (48 loc) · 2.73 KB

convertvideoinfotovideoinfo2.md

File metadata and controls

82 lines (48 loc) · 2.73 KB
description ms.assetid title ms.topic ms.date topic_type api_name api_type api_location ms.custom
The ConvertVideoInfoToVideoInfo2 function converts a media type that uses VIDEOINFOHEADER to one that uses VIDEOINFOHEADER2.
d938bfc0-a5ae-475b-b183-56ff39b4bae1
ConvertVideoInfoToVideoInfo2 function (Winutil.h)
reference
4/26/2023
APIRef
kbSyntax
ConvertVideoInfoToVideoInfo2
LibDef
Strmbase.lib
Strmbase.dll
Strmbasd.lib
Strmbasd.dll
UpdateFrequency5

ConvertVideoInfoToVideoInfo2 function

[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 ConvertVideoInfoToVideoInfo2 function converts a media type that uses VIDEOINFOHEADER to one that uses VIDEOINFOHEADER2.

Syntax

HRESULT STDAPI ConvertVideoInfoToVideoInfo2(
   AM_MEDIA_TYPE *pmt
);

Parameters

pmt

Pointer to the AM_MEDIA_TYPE structure to convert. The structure must have format type FORMAT_VideoInfo.

Return value

Returns S_OK or E_OUTOFMEMORY.

Remarks

This function allocates a new VIDEOINFOHEADER2 structure, copies the members of the VIDEOINFOHEADER structure into it, and replaces the old structure with the new structure in the format block of the media type.

Requirements

Requirement Value
Header
Winutil.h (include Streams.h)
Library
Strmbase.lib (retail builds);
Strmbasd.lib (debug builds)

See also

Video and Image Functions