#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
#[inline]
pub unsafe fn CreateNamedPropertyStore() -> windows_core::Result<super::super::UI::Shell::PropertiesSystem::INamedPropertyStore> {
windows_core::link!("mf.dll" "system" fn CreateNamedPropertyStore(ppstore : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
CreateNamedPropertyStore(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
#[inline]
pub unsafe fn CreatePropertyStore() -> windows_core::Result<super::super::UI::Shell::PropertiesSystem::IPropertyStore> {
windows_core::link!("mfplat.dll" "system" fn CreatePropertyStore(ppstore : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
CreatePropertyStore(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn DXVA2CreateDirect3DDeviceManager9(presettoken: *mut u32, ppdevicemanager: *mut Option<IDirect3DDeviceManager9>) -> windows_core::Result<()> {
windows_core::link!("dxva2.dll" "system" fn DXVA2CreateDirect3DDeviceManager9(presettoken : *mut u32, ppdevicemanager : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { DXVA2CreateDirect3DDeviceManager9(presettoken as _, core::mem::transmute(ppdevicemanager)).ok() }
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
#[inline]
pub unsafe fn DXVA2CreateVideoService<P0>(pdd: P0, riid: *const windows_core::GUID, ppservice: *mut *mut core::ffi::c_void) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Graphics::Direct3D9::IDirect3DDevice9>,
{
windows_core::link!("dxva2.dll" "system" fn DXVA2CreateVideoService(pdd : * mut core::ffi::c_void, riid : *const windows_core::GUID, ppservice : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { DXVA2CreateVideoService(pdd.param().abi(), riid, ppservice as _).ok() }
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
#[inline]
pub unsafe fn DXVAHD_CreateDevice<P0>(pd3ddevice: P0, pcontentdesc: *const DXVAHD_CONTENT_DESC, usage: DXVAHD_DEVICE_USAGE, pplugin: PDXVAHDSW_Plugin) -> windows_core::Result<IDXVAHD_Device>
where
P0: windows_core::Param<super::super::Graphics::Direct3D9::IDirect3DDevice9Ex>,
{
windows_core::link!("dxva2.dll" "system" fn DXVAHD_CreateDevice(pd3ddevice : * mut core::ffi::c_void, pcontentdesc : *const DXVAHD_CONTENT_DESC, usage : DXVAHD_DEVICE_USAGE, pplugin : PDXVAHDSW_Plugin, ppdevice : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
DXVAHD_CreateDevice(pd3ddevice.param().abi(), pcontentdesc, usage, pplugin, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFAddPeriodicCallback<P1>(callback: MFPERIODICCALLBACK, pcontext: P1, pdwkey: Option<*mut u32>) -> windows_core::Result<()>
where
P1: windows_core::Param<windows_core::IUnknown>,
{
windows_core::link!("mfplat.dll" "system" fn MFAddPeriodicCallback(callback : MFPERIODICCALLBACK, pcontext : * mut core::ffi::c_void, pdwkey : *mut u32) -> windows_core::HRESULT);
unsafe { MFAddPeriodicCallback(callback, pcontext.param().abi(), pdwkey.unwrap_or(core::mem::zeroed()) as _).ok() }
}
#[inline]
pub unsafe fn MFAllocateSerialWorkQueue(dwworkqueue: u32) -> windows_core::Result<u32> {
windows_core::link!("mfplat.dll" "system" fn MFAllocateSerialWorkQueue(dwworkqueue : u32, pdwworkqueue : *mut u32) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFAllocateSerialWorkQueue(dwworkqueue, &mut result__).map(|| result__)
}
}
#[inline]
pub unsafe fn MFAllocateWorkQueue() -> windows_core::Result<u32> {
windows_core::link!("mfplat.dll" "system" fn MFAllocateWorkQueue(pdwworkqueue : *mut u32) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFAllocateWorkQueue(&mut result__).map(|| result__)
}
}
#[inline]
pub unsafe fn MFAllocateWorkQueueEx(workqueuetype: MFASYNC_WORKQUEUE_TYPE) -> windows_core::Result<u32> {
windows_core::link!("mfplat.dll" "system" fn MFAllocateWorkQueueEx(workqueuetype : MFASYNC_WORKQUEUE_TYPE, pdwworkqueue : *mut u32) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFAllocateWorkQueueEx(workqueuetype, &mut result__).map(|| result__)
}
}
#[inline]
pub unsafe fn MFAverageTimePerFrameToFrameRate(unaveragetimeperframe: u64, punnumerator: *mut u32, pundenominator: *mut u32) -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFAverageTimePerFrameToFrameRate(unaveragetimeperframe : u64, punnumerator : *mut u32, pundenominator : *mut u32) -> windows_core::HRESULT);
unsafe { MFAverageTimePerFrameToFrameRate(unaveragetimeperframe, punnumerator as _, pundenominator as _).ok() }
}
#[inline]
pub unsafe fn MFBeginCreateFile<P3, P4, P5>(accessmode: MF_FILE_ACCESSMODE, openmode: MF_FILE_OPENMODE, fflags: MF_FILE_FLAGS, pwszfilepath: P3, pcallback: P4, pstate: P5) -> windows_core::Result<windows_core::IUnknown>
where
P3: windows_core::Param<windows_core::PCWSTR>,
P4: windows_core::Param<IMFAsyncCallback>,
P5: windows_core::Param<windows_core::IUnknown>,
{
windows_core::link!("mfplat.dll" "system" fn MFBeginCreateFile(accessmode : MF_FILE_ACCESSMODE, openmode : MF_FILE_OPENMODE, fflags : MF_FILE_FLAGS, pwszfilepath : windows_core::PCWSTR, pcallback : * mut core::ffi::c_void, pstate : * mut core::ffi::c_void, ppcancelcookie : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFBeginCreateFile(accessmode, openmode, fflags, pwszfilepath.param().abi(), pcallback.param().abi(), pstate.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFBeginRegisterWorkQueueWithMMCSS<P1, P3, P4>(dwworkqueueid: u32, wszclass: P1, dwtaskid: u32, pdonecallback: P3, pdonestate: P4) -> windows_core::Result<()>
where
P1: windows_core::Param<windows_core::PCWSTR>,
P3: windows_core::Param<IMFAsyncCallback>,
P4: windows_core::Param<windows_core::IUnknown>,
{
windows_core::link!("mfplat.dll" "system" fn MFBeginRegisterWorkQueueWithMMCSS(dwworkqueueid : u32, wszclass : windows_core::PCWSTR, dwtaskid : u32, pdonecallback : * mut core::ffi::c_void, pdonestate : * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFBeginRegisterWorkQueueWithMMCSS(dwworkqueueid, wszclass.param().abi(), dwtaskid, pdonecallback.param().abi(), pdonestate.param().abi()).ok() }
}
#[inline]
pub unsafe fn MFBeginRegisterWorkQueueWithMMCSSEx<P1, P4, P5>(dwworkqueueid: u32, wszclass: P1, dwtaskid: u32, lpriority: i32, pdonecallback: P4, pdonestate: P5) -> windows_core::Result<()>
where
P1: windows_core::Param<windows_core::PCWSTR>,
P4: windows_core::Param<IMFAsyncCallback>,
P5: windows_core::Param<windows_core::IUnknown>,
{
windows_core::link!("mfplat.dll" "system" fn MFBeginRegisterWorkQueueWithMMCSSEx(dwworkqueueid : u32, wszclass : windows_core::PCWSTR, dwtaskid : u32, lpriority : i32, pdonecallback : * mut core::ffi::c_void, pdonestate : * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFBeginRegisterWorkQueueWithMMCSSEx(dwworkqueueid, wszclass.param().abi(), dwtaskid, lpriority, pdonecallback.param().abi(), pdonestate.param().abi()).ok() }
}
#[inline]
pub unsafe fn MFBeginUnregisterWorkQueueWithMMCSS<P1, P2>(dwworkqueueid: u32, pdonecallback: P1, pdonestate: P2) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFAsyncCallback>,
P2: windows_core::Param<windows_core::IUnknown>,
{
windows_core::link!("mfplat.dll" "system" fn MFBeginUnregisterWorkQueueWithMMCSS(dwworkqueueid : u32, pdonecallback : * mut core::ffi::c_void, pdonestate : * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFBeginUnregisterWorkQueueWithMMCSS(dwworkqueueid, pdonecallback.param().abi(), pdonestate.param().abi()).ok() }
}
#[cfg(feature = "Win32_Graphics_Gdi")]
#[inline]
pub unsafe fn MFCalculateBitmapImageSize(pbmih: *const super::super::Graphics::Gdi::BITMAPINFOHEADER, cbbufsize: u32, pcbimagesize: *mut u32, pbknown: Option<*mut windows_core::BOOL>) -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFCalculateBitmapImageSize(pbmih : *const super::super::Graphics::Gdi:: BITMAPINFOHEADER, cbbufsize : u32, pcbimagesize : *mut u32, pbknown : *mut windows_core::BOOL) -> windows_core::HRESULT);
unsafe { MFCalculateBitmapImageSize(pbmih, cbbufsize, pcbimagesize as _, pbknown.unwrap_or(core::mem::zeroed()) as _).ok() }
}
#[inline]
pub unsafe fn MFCalculateImageSize(guidsubtype: *const windows_core::GUID, unwidth: u32, unheight: u32) -> windows_core::Result<u32> {
windows_core::link!("mfplat.dll" "system" fn MFCalculateImageSize(guidsubtype : *const windows_core::GUID, unwidth : u32, unheight : u32, pcbimagesize : *mut u32) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCalculateImageSize(guidsubtype, unwidth, unheight, &mut result__).map(|| result__)
}
}
#[inline]
pub unsafe fn MFCancelCreateFile<P0>(pcancelcookie: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
windows_core::link!("mfplat.dll" "system" fn MFCancelCreateFile(pcancelcookie : * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFCancelCreateFile(pcancelcookie.param().abi()).ok() }
}
#[inline]
pub unsafe fn MFCancelWorkItem(key: u64) -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFCancelWorkItem(key : u64) -> windows_core::HRESULT);
unsafe { MFCancelWorkItem(key).ok() }
}
#[inline]
pub unsafe fn MFCombineSamples<P0, P1>(psample: P0, psampletoadd: P1, dwmaxmergeddurationinms: u32) -> windows_core::Result<windows_core::BOOL>
where
P0: windows_core::Param<IMFSample>,
P1: windows_core::Param<IMFSample>,
{
windows_core::link!("mfplat.dll" "system" fn MFCombineSamples(psample : * mut core::ffi::c_void, psampletoadd : * mut core::ffi::c_void, dwmaxmergeddurationinms : u32, pmerged : *mut windows_core::BOOL) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCombineSamples(psample.param().abi(), psampletoadd.param().abi(), dwmaxmergeddurationinms, &mut result__).map(|| result__)
}
}
#[inline]
pub unsafe fn MFCompareFullToPartialMediaType<P0, P1>(pmftypefull: P0, pmftypepartial: P1) -> windows_core::BOOL
where
P0: windows_core::Param<IMFMediaType>,
P1: windows_core::Param<IMFMediaType>,
{
windows_core::link!("mfplat.dll" "system" fn MFCompareFullToPartialMediaType(pmftypefull : * mut core::ffi::c_void, pmftypepartial : * mut core::ffi::c_void) -> windows_core::BOOL);
unsafe { MFCompareFullToPartialMediaType(pmftypefull.param().abi(), pmftypepartial.param().abi()) }
}
#[inline]
pub unsafe fn MFConvertColorInfoFromDXVA(ptoformat: *mut MFVIDEOFORMAT, dwfromdxva: u32) -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFConvertColorInfoFromDXVA(ptoformat : *mut MFVIDEOFORMAT, dwfromdxva : u32) -> windows_core::HRESULT);
unsafe { MFConvertColorInfoFromDXVA(ptoformat as _, dwfromdxva).ok() }
}
#[inline]
pub unsafe fn MFConvertColorInfoToDXVA(pdwtodxva: *mut u32, pfromformat: *const MFVIDEOFORMAT) -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFConvertColorInfoToDXVA(pdwtodxva : *mut u32, pfromformat : *const MFVIDEOFORMAT) -> windows_core::HRESULT);
unsafe { MFConvertColorInfoToDXVA(pdwtodxva as _, pfromformat).ok() }
}
#[inline]
pub unsafe fn MFConvertFromFP16Array(pdest: *mut f32, psrc: *const u16, dwcount: u32) -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFConvertFromFP16Array(pdest : *mut f32, psrc : *const u16, dwcount : u32) -> windows_core::HRESULT);
unsafe { MFConvertFromFP16Array(pdest as _, psrc, dwcount).ok() }
}
#[inline]
pub unsafe fn MFConvertToFP16Array(pdest: *mut u16, psrc: *const f32, dwcount: u32) -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFConvertToFP16Array(pdest : *mut u16, psrc : *const f32, dwcount : u32) -> windows_core::HRESULT);
unsafe { MFConvertToFP16Array(pdest as _, psrc, dwcount).ok() }
}
#[inline]
pub unsafe fn MFCopyImage(pdest: *mut u8, ldeststride: i32, psrc: *const u8, lsrcstride: i32, dwwidthinbytes: u32, dwlines: u32) -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFCopyImage(pdest : *mut u8, ldeststride : i32, psrc : *const u8, lsrcstride : i32, dwwidthinbytes : u32, dwlines : u32) -> windows_core::HRESULT);
unsafe { MFCopyImage(pdest as _, ldeststride, psrc, lsrcstride, dwwidthinbytes, dwlines).ok() }
}
#[inline]
pub unsafe fn MFCreate2DMediaBuffer(dwwidth: u32, dwheight: u32, dwfourcc: u32, fbottomup: bool) -> windows_core::Result<IMFMediaBuffer> {
windows_core::link!("mfplat.dll" "system" fn MFCreate2DMediaBuffer(dwwidth : u32, dwheight : u32, dwfourcc : u32, fbottomup : windows_core::BOOL, ppbuffer : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreate2DMediaBuffer(dwwidth, dwheight, dwfourcc, fbottomup.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreate3GPMediaSink<P0, P1, P2>(pibytestream: P0, pvideomediatype: P1, paudiomediatype: P2) -> windows_core::Result<IMFMediaSink>
where
P0: windows_core::Param<IMFByteStream>,
P1: windows_core::Param<IMFMediaType>,
P2: windows_core::Param<IMFMediaType>,
{
windows_core::link!("mf.dll" "system" fn MFCreate3GPMediaSink(pibytestream : * mut core::ffi::c_void, pvideomediatype : * mut core::ffi::c_void, paudiomediatype : * mut core::ffi::c_void, ppimediasink : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreate3GPMediaSink(pibytestream.param().abi(), pvideomediatype.param().abi(), paudiomediatype.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateAC3MediaSink<P0, P1>(ptargetbytestream: P0, paudiomediatype: P1) -> windows_core::Result<IMFMediaSink>
where
P0: windows_core::Param<IMFByteStream>,
P1: windows_core::Param<IMFMediaType>,
{
windows_core::link!("mf.dll" "system" fn MFCreateAC3MediaSink(ptargetbytestream : * mut core::ffi::c_void, paudiomediatype : * mut core::ffi::c_void, ppmediasink : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateAC3MediaSink(ptargetbytestream.param().abi(), paudiomediatype.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateADTSMediaSink<P0, P1>(ptargetbytestream: P0, paudiomediatype: P1) -> windows_core::Result<IMFMediaSink>
where
P0: windows_core::Param<IMFByteStream>,
P1: windows_core::Param<IMFMediaType>,
{
windows_core::link!("mf.dll" "system" fn MFCreateADTSMediaSink(ptargetbytestream : * mut core::ffi::c_void, paudiomediatype : * mut core::ffi::c_void, ppmediasink : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateADTSMediaSink(ptargetbytestream.param().abi(), paudiomediatype.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateAMMediaTypeFromMFMediaType<P0>(pmftype: P0, guidformatblocktype: windows_core::GUID, ppamtype: *mut *mut AM_MEDIA_TYPE) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaType>,
{
windows_core::link!("mfplat.dll" "system" fn MFCreateAMMediaTypeFromMFMediaType(pmftype : * mut core::ffi::c_void, guidformatblocktype : windows_core::GUID, ppamtype : *mut *mut AM_MEDIA_TYPE) -> windows_core::HRESULT);
unsafe { MFCreateAMMediaTypeFromMFMediaType(pmftype.param().abi(), core::mem::transmute(guidformatblocktype), ppamtype as _).ok() }
}
#[inline]
pub unsafe fn MFCreateASFContentInfo() -> windows_core::Result<IMFASFContentInfo> {
windows_core::link!("mf.dll" "system" fn MFCreateASFContentInfo(ppicontentinfo : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateASFContentInfo(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateASFIndexer() -> windows_core::Result<IMFASFIndexer> {
windows_core::link!("mf.dll" "system" fn MFCreateASFIndexer(ppiindexer : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateASFIndexer(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateASFIndexerByteStream<P0>(picontentbytestream: P0, cbindexstartoffset: u64) -> windows_core::Result<IMFByteStream>
where
P0: windows_core::Param<IMFByteStream>,
{
windows_core::link!("mf.dll" "system" fn MFCreateASFIndexerByteStream(picontentbytestream : * mut core::ffi::c_void, cbindexstartoffset : u64, piindexbytestream : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateASFIndexerByteStream(picontentbytestream.param().abi(), cbindexstartoffset, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateASFMediaSink<P0>(pibytestream: P0) -> windows_core::Result<IMFMediaSink>
where
P0: windows_core::Param<IMFByteStream>,
{
windows_core::link!("mf.dll" "system" fn MFCreateASFMediaSink(pibytestream : * mut core::ffi::c_void, ppimediasink : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateASFMediaSink(pibytestream.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateASFMediaSinkActivate<P0, P1>(pwszfilename: P0, pcontentinfo: P1) -> windows_core::Result<IMFActivate>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<IMFASFContentInfo>,
{
windows_core::link!("mf.dll" "system" fn MFCreateASFMediaSinkActivate(pwszfilename : windows_core::PCWSTR, pcontentinfo : * mut core::ffi::c_void, ppiactivate : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateASFMediaSinkActivate(pwszfilename.param().abi(), pcontentinfo.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateASFMultiplexer() -> windows_core::Result<IMFASFMultiplexer> {
windows_core::link!("mf.dll" "system" fn MFCreateASFMultiplexer(ppimultiplexer : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateASFMultiplexer(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateASFProfile() -> windows_core::Result<IMFASFProfile> {
windows_core::link!("mf.dll" "system" fn MFCreateASFProfile(ppiprofile : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateASFProfile(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateASFProfileFromPresentationDescriptor<P0>(pipd: P0) -> windows_core::Result<IMFASFProfile>
where
P0: windows_core::Param<IMFPresentationDescriptor>,
{
windows_core::link!("mf.dll" "system" fn MFCreateASFProfileFromPresentationDescriptor(pipd : * mut core::ffi::c_void, ppiprofile : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateASFProfileFromPresentationDescriptor(pipd.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateASFSplitter() -> windows_core::Result<IMFASFSplitter> {
windows_core::link!("mf.dll" "system" fn MFCreateASFSplitter(ppisplitter : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateASFSplitter(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateASFStreamSelector<P0>(piasfprofile: P0) -> windows_core::Result<IMFASFStreamSelector>
where
P0: windows_core::Param<IMFASFProfile>,
{
windows_core::link!("mf.dll" "system" fn MFCreateASFStreamSelector(piasfprofile : * mut core::ffi::c_void, ppselector : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateASFStreamSelector(piasfprofile.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateASFStreamingMediaSink<P0>(pibytestream: P0) -> windows_core::Result<IMFMediaSink>
where
P0: windows_core::Param<IMFByteStream>,
{
windows_core::link!("mf.dll" "system" fn MFCreateASFStreamingMediaSink(pibytestream : * mut core::ffi::c_void, ppimediasink : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateASFStreamingMediaSink(pibytestream.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateASFStreamingMediaSinkActivate<P0, P1>(pbytestreamactivate: P0, pcontentinfo: P1) -> windows_core::Result<IMFActivate>
where
P0: windows_core::Param<IMFActivate>,
P1: windows_core::Param<IMFASFContentInfo>,
{
windows_core::link!("mf.dll" "system" fn MFCreateASFStreamingMediaSinkActivate(pbytestreamactivate : * mut core::ffi::c_void, pcontentinfo : * mut core::ffi::c_void, ppiactivate : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateASFStreamingMediaSinkActivate(pbytestreamactivate.param().abi(), pcontentinfo.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateAVIMediaSink<P0, P1, P2>(pibytestream: P0, pvideomediatype: P1, paudiomediatype: P2) -> windows_core::Result<IMFMediaSink>
where
P0: windows_core::Param<IMFByteStream>,
P1: windows_core::Param<IMFMediaType>,
P2: windows_core::Param<IMFMediaType>,
{
windows_core::link!("mfsrcsnk.dll" "system" fn MFCreateAVIMediaSink(pibytestream : * mut core::ffi::c_void, pvideomediatype : * mut core::ffi::c_void, paudiomediatype : * mut core::ffi::c_void, ppimediasink : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateAVIMediaSink(pibytestream.param().abi(), pvideomediatype.param().abi(), paudiomediatype.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateAggregateSource<P0>(psourcecollection: P0) -> windows_core::Result<IMFMediaSource>
where
P0: windows_core::Param<IMFCollection>,
{
windows_core::link!("mf.dll" "system" fn MFCreateAggregateSource(psourcecollection : * mut core::ffi::c_void, ppaggsource : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateAggregateSource(psourcecollection.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateAlignedMemoryBuffer(cbmaxlength: u32, cbaligment: u32) -> windows_core::Result<IMFMediaBuffer> {
windows_core::link!("mfplat.dll" "system" fn MFCreateAlignedMemoryBuffer(cbmaxlength : u32, cbaligment : u32, ppbuffer : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateAlignedMemoryBuffer(cbmaxlength, cbaligment, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateAsyncResult<P0, P1, P2>(punkobject: P0, pcallback: P1, punkstate: P2) -> windows_core::Result<IMFAsyncResult>
where
P0: windows_core::Param<windows_core::IUnknown>,
P1: windows_core::Param<IMFAsyncCallback>,
P2: windows_core::Param<windows_core::IUnknown>,
{
windows_core::link!("mfplat.dll" "system" fn MFCreateAsyncResult(punkobject : * mut core::ffi::c_void, pcallback : * mut core::ffi::c_void, punkstate : * mut core::ffi::c_void, ppasyncresult : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateAsyncResult(punkobject.param().abi(), pcallback.param().abi(), punkstate.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateAttributes(ppmfattributes: *mut Option<IMFAttributes>, cinitialsize: u32) -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFCreateAttributes(ppmfattributes : *mut * mut core::ffi::c_void, cinitialsize : u32) -> windows_core::HRESULT);
unsafe { MFCreateAttributes(core::mem::transmute(ppmfattributes), cinitialsize).ok() }
}
#[cfg(feature = "Win32_Media_Audio")]
#[inline]
pub unsafe fn MFCreateAudioMediaType(paudioformat: *const super::Audio::WAVEFORMATEX) -> windows_core::Result<IMFAudioMediaType> {
windows_core::link!("mfplat.dll" "system" fn MFCreateAudioMediaType(paudioformat : *const super::Audio:: WAVEFORMATEX, ppiaudiomediatype : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateAudioMediaType(paudioformat, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateAudioRenderer<P0>(paudioattributes: P0) -> windows_core::Result<IMFMediaSink>
where
P0: windows_core::Param<IMFAttributes>,
{
windows_core::link!("mf.dll" "system" fn MFCreateAudioRenderer(paudioattributes : * mut core::ffi::c_void, ppsink : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateAudioRenderer(paudioattributes.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateAudioRendererActivate() -> windows_core::Result<IMFActivate> {
windows_core::link!("mf.dll" "system" fn MFCreateAudioRendererActivate(ppactivate : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateAudioRendererActivate(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateCameraControlMonitor<P0, P1>(symboliclink: P0, callback: P1) -> windows_core::Result<IMFCameraControlMonitor>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<IMFCameraControlNotify>,
{
windows_core::link!("mfsensorgroup.dll" "system" fn MFCreateCameraControlMonitor(symboliclink : windows_core::PCWSTR, callback : * mut core::ffi::c_void, ppcameracontrolmonitor : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateCameraControlMonitor(symboliclink.param().abi(), callback.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateCameraOcclusionStateMonitor<P0, P1>(symboliclink: P0, callback: P1) -> windows_core::Result<IMFCameraOcclusionStateMonitor>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<IMFCameraOcclusionStateReportCallback>,
{
windows_core::link!("mfsensorgroup.dll" "system" fn MFCreateCameraOcclusionStateMonitor(symboliclink : windows_core::PCWSTR, callback : * mut core::ffi::c_void, occlusionstatemonitor : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateCameraOcclusionStateMonitor(symboliclink.param().abi(), callback.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateCollection() -> windows_core::Result<IMFCollection> {
windows_core::link!("mfplat.dll" "system" fn MFCreateCollection(ppimfcollection : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateCollection(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateContentDecryptorContext<P1, P2>(guidmediaprotectionsystemid: *const windows_core::GUID, pd3dmanager: P1, pcontentprotectiondevice: P2) -> windows_core::Result<IMFContentDecryptorContext>
where
P1: windows_core::Param<IMFDXGIDeviceManager>,
P2: windows_core::Param<IMFContentProtectionDevice>,
{
windows_core::link!("mfplat.dll" "system" fn MFCreateContentDecryptorContext(guidmediaprotectionsystemid : *const windows_core::GUID, pd3dmanager : * mut core::ffi::c_void, pcontentprotectiondevice : * mut core::ffi::c_void, ppcontentdecryptorcontext : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateContentDecryptorContext(guidmediaprotectionsystemid, pd3dmanager.param().abi(), pcontentprotectiondevice.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateContentProtectionDevice(protectionsystemid: *const windows_core::GUID) -> windows_core::Result<IMFContentProtectionDevice> {
windows_core::link!("mfplat.dll" "system" fn MFCreateContentProtectionDevice(protectionsystemid : *const windows_core::GUID, contentprotectiondevice : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateContentProtectionDevice(protectionsystemid, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateCredentialCache() -> windows_core::Result<IMFNetCredentialCache> {
windows_core::link!("mf.dll" "system" fn MFCreateCredentialCache(ppcache : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateCredentialCache(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[inline]
pub unsafe fn MFCreateD3D12SynchronizationObject<P0>(pdevice: P0, riid: *const windows_core::GUID, ppvsyncobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12Device>,
{
windows_core::link!("mfplat.dll" "system" fn MFCreateD3D12SynchronizationObject(pdevice : * mut core::ffi::c_void, riid : *const windows_core::GUID, ppvsyncobject : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFCreateD3D12SynchronizationObject(pdevice.param().abi(), riid, ppvsyncobject as _).ok() }
}
#[inline]
pub unsafe fn MFCreateDXGIDeviceManager(resettoken: *mut u32, ppdevicemanager: *mut Option<IMFDXGIDeviceManager>) -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFCreateDXGIDeviceManager(resettoken : *mut u32, ppdevicemanager : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFCreateDXGIDeviceManager(resettoken as _, core::mem::transmute(ppdevicemanager)).ok() }
}
#[inline]
pub unsafe fn MFCreateDXGISurfaceBuffer<P1>(riid: *const windows_core::GUID, punksurface: P1, usubresourceindex: u32, fbottomupwhenlinear: bool) -> windows_core::Result<IMFMediaBuffer>
where
P1: windows_core::Param<windows_core::IUnknown>,
{
windows_core::link!("mfplat.dll" "system" fn MFCreateDXGISurfaceBuffer(riid : *const windows_core::GUID, punksurface : * mut core::ffi::c_void, usubresourceindex : u32, fbottomupwhenlinear : windows_core::BOOL, ppbuffer : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateDXGISurfaceBuffer(riid, punksurface.param().abi(), usubresourceindex, fbottomupwhenlinear.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateDXSurfaceBuffer<P1>(riid: *const windows_core::GUID, punksurface: P1, fbottomupwhenlinear: bool) -> windows_core::Result<IMFMediaBuffer>
where
P1: windows_core::Param<windows_core::IUnknown>,
{
windows_core::link!("mfplat.dll" "system" fn MFCreateDXSurfaceBuffer(riid : *const windows_core::GUID, punksurface : * mut core::ffi::c_void, fbottomupwhenlinear : windows_core::BOOL, ppbuffer : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateDXSurfaceBuffer(riid, punksurface.param().abi(), fbottomupwhenlinear.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateDeviceSource<P0>(pattributes: P0) -> windows_core::Result<IMFMediaSource>
where
P0: windows_core::Param<IMFAttributes>,
{
windows_core::link!("mf.dll" "system" fn MFCreateDeviceSource(pattributes : * mut core::ffi::c_void, ppsource : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateDeviceSource(pattributes.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateDeviceSourceActivate<P0>(pattributes: P0) -> windows_core::Result<IMFActivate>
where
P0: windows_core::Param<IMFAttributes>,
{
windows_core::link!("mf.dll" "system" fn MFCreateDeviceSourceActivate(pattributes : * mut core::ffi::c_void, ppactivate : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateDeviceSourceActivate(pattributes.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Win32_System_Com")]
#[inline]
pub unsafe fn MFCreateEncryptedMediaExtensionsStoreActivate<P0, P1, P2>(pmphost: P0, objectstream: P1, classid: P2) -> windows_core::Result<IMFActivate>
where
P0: windows_core::Param<IMFPMPHostApp>,
P1: windows_core::Param<super::super::System::Com::IStream>,
P2: windows_core::Param<windows_core::PCWSTR>,
{
windows_core::link!("mf.dll" "system" fn MFCreateEncryptedMediaExtensionsStoreActivate(pmphost : * mut core::ffi::c_void, objectstream : * mut core::ffi::c_void, classid : windows_core::PCWSTR, activate : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateEncryptedMediaExtensionsStoreActivate(pmphost.param().abi(), objectstream.param().abi(), classid.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateEventQueue() -> windows_core::Result<IMFMediaEventQueue> {
windows_core::link!("mfplat.dll" "system" fn MFCreateEventQueue(ppmediaeventqueue : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateEventQueue(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateExtendedCameraIntrinsicModel(distortionmodeltype: MFCameraIntrinsic_DistortionModelType) -> windows_core::Result<IMFExtendedCameraIntrinsicModel> {
windows_core::link!("mfcore.dll" "system" fn MFCreateExtendedCameraIntrinsicModel(distortionmodeltype : MFCameraIntrinsic_DistortionModelType, ppextendedcameraintrinsicmodel : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateExtendedCameraIntrinsicModel(distortionmodeltype, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateExtendedCameraIntrinsics() -> windows_core::Result<IMFExtendedCameraIntrinsics> {
windows_core::link!("mfcore.dll" "system" fn MFCreateExtendedCameraIntrinsics(ppextendedcameraintrinsics : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateExtendedCameraIntrinsics(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateFMPEG4MediaSink<P0, P1, P2>(pibytestream: P0, pvideomediatype: P1, paudiomediatype: P2) -> windows_core::Result<IMFMediaSink>
where
P0: windows_core::Param<IMFByteStream>,
P1: windows_core::Param<IMFMediaType>,
P2: windows_core::Param<IMFMediaType>,
{
windows_core::link!("mf.dll" "system" fn MFCreateFMPEG4MediaSink(pibytestream : * mut core::ffi::c_void, pvideomediatype : * mut core::ffi::c_void, paudiomediatype : * mut core::ffi::c_void, ppimediasink : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateFMPEG4MediaSink(pibytestream.param().abi(), pvideomediatype.param().abi(), paudiomediatype.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateFile<P3>(accessmode: MF_FILE_ACCESSMODE, openmode: MF_FILE_OPENMODE, fflags: MF_FILE_FLAGS, pwszfileurl: P3) -> windows_core::Result<IMFByteStream>
where
P3: windows_core::Param<windows_core::PCWSTR>,
{
windows_core::link!("mfplat.dll" "system" fn MFCreateFile(accessmode : MF_FILE_ACCESSMODE, openmode : MF_FILE_OPENMODE, fflags : MF_FILE_FLAGS, pwszfileurl : windows_core::PCWSTR, ppibytestream : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateFile(accessmode, openmode, fflags, pwszfileurl.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Win32_Media_DxMediaObjects")]
#[inline]
pub unsafe fn MFCreateLegacyMediaBufferOnMFMediaBuffer<P0, P1>(psample: P0, pmfmediabuffer: P1, cboffset: u32) -> windows_core::Result<super::DxMediaObjects::IMediaBuffer>
where
P0: windows_core::Param<IMFSample>,
P1: windows_core::Param<IMFMediaBuffer>,
{
windows_core::link!("mfplat.dll" "system" fn MFCreateLegacyMediaBufferOnMFMediaBuffer(psample : * mut core::ffi::c_void, pmfmediabuffer : * mut core::ffi::c_void, cboffset : u32, ppmediabuffer : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateLegacyMediaBufferOnMFMediaBuffer(psample.param().abi(), pmfmediabuffer.param().abi(), cboffset, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Win32_System_Com")]
#[inline]
pub unsafe fn MFCreateMFByteStreamOnStream<P0>(pstream: P0) -> windows_core::Result<IMFByteStream>
where
P0: windows_core::Param<super::super::System::Com::IStream>,
{
windows_core::link!("mfplat.dll" "system" fn MFCreateMFByteStreamOnStream(pstream : * mut core::ffi::c_void, ppbytestream : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateMFByteStreamOnStream(pstream.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateMFByteStreamOnStreamEx<P0>(punkstream: P0) -> windows_core::Result<IMFByteStream>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
windows_core::link!("mfplat.dll" "system" fn MFCreateMFByteStreamOnStreamEx(punkstream : * mut core::ffi::c_void, ppbytestream : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateMFByteStreamOnStreamEx(punkstream.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateMFByteStreamWrapper<P0>(pstream: P0) -> windows_core::Result<IMFByteStream>
where
P0: windows_core::Param<IMFByteStream>,
{
windows_core::link!("mfplat.dll" "system" fn MFCreateMFByteStreamWrapper(pstream : * mut core::ffi::c_void, ppstreamwrapper : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateMFByteStreamWrapper(pstream.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateMFVideoFormatFromMFMediaType<P0>(pmftype: P0, ppmfvf: *mut *mut MFVIDEOFORMAT, pcbsize: Option<*mut u32>) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaType>,
{
windows_core::link!("mfplat.dll" "system" fn MFCreateMFVideoFormatFromMFMediaType(pmftype : * mut core::ffi::c_void, ppmfvf : *mut *mut MFVIDEOFORMAT, pcbsize : *mut u32) -> windows_core::HRESULT);
unsafe { MFCreateMFVideoFormatFromMFMediaType(pmftype.param().abi(), ppmfvf as _, pcbsize.unwrap_or(core::mem::zeroed()) as _).ok() }
}
#[inline]
pub unsafe fn MFCreateMP3MediaSink<P0>(ptargetbytestream: P0) -> windows_core::Result<IMFMediaSink>
where
P0: windows_core::Param<IMFByteStream>,
{
windows_core::link!("mf.dll" "system" fn MFCreateMP3MediaSink(ptargetbytestream : * mut core::ffi::c_void, ppmediasink : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateMP3MediaSink(ptargetbytestream.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateMPEG4MediaSink<P0, P1, P2>(pibytestream: P0, pvideomediatype: P1, paudiomediatype: P2) -> windows_core::Result<IMFMediaSink>
where
P0: windows_core::Param<IMFByteStream>,
P1: windows_core::Param<IMFMediaType>,
P2: windows_core::Param<IMFMediaType>,
{
windows_core::link!("mf.dll" "system" fn MFCreateMPEG4MediaSink(pibytestream : * mut core::ffi::c_void, pvideomediatype : * mut core::ffi::c_void, paudiomediatype : * mut core::ffi::c_void, ppimediasink : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateMPEG4MediaSink(pibytestream.param().abi(), pvideomediatype.param().abi(), paudiomediatype.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateMediaBufferFromMediaType<P0>(pmediatype: P0, llduration: i64, dwminlength: u32, dwminalignment: u32) -> windows_core::Result<IMFMediaBuffer>
where
P0: windows_core::Param<IMFMediaType>,
{
windows_core::link!("mfplat.dll" "system" fn MFCreateMediaBufferFromMediaType(pmediatype : * mut core::ffi::c_void, llduration : i64, dwminlength : u32, dwminalignment : u32, ppbuffer : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateMediaBufferFromMediaType(pmediatype.param().abi(), llduration, dwminlength, dwminalignment, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateMediaBufferWrapper<P0>(pbuffer: P0, cboffset: u32, dwlength: u32) -> windows_core::Result<IMFMediaBuffer>
where
P0: windows_core::Param<IMFMediaBuffer>,
{
windows_core::link!("mfplat.dll" "system" fn MFCreateMediaBufferWrapper(pbuffer : * mut core::ffi::c_void, cboffset : u32, dwlength : u32, ppbuffer : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateMediaBufferWrapper(pbuffer.param().abi(), cboffset, dwlength, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
#[inline]
pub unsafe fn MFCreateMediaEvent(met: u32, guidextendedtype: *const windows_core::GUID, hrstatus: windows_core::HRESULT, pvvalue: Option<*const super::super::System::Com::StructuredStorage::PROPVARIANT>) -> windows_core::Result<IMFMediaEvent> {
windows_core::link!("mfplat.dll" "system" fn MFCreateMediaEvent(met : u32, guidextendedtype : *const windows_core::GUID, hrstatus : windows_core::HRESULT, pvvalue : *const super::super::System::Com::StructuredStorage:: PROPVARIANT, ppevent : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateMediaEvent(met, guidextendedtype, hrstatus, pvvalue.unwrap_or(core::mem::zeroed()) as _, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateMediaExtensionActivate<P0, P1>(szactivatableclassid: P0, pconfiguration: P1, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<windows_core::IUnknown>,
{
windows_core::link!("mfplat.dll" "system" fn MFCreateMediaExtensionActivate(szactivatableclassid : windows_core::PCWSTR, pconfiguration : * mut core::ffi::c_void, riid : *const windows_core::GUID, ppvobject : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFCreateMediaExtensionActivate(szactivatableclassid.param().abi(), pconfiguration.param().abi(), riid, ppvobject as _).ok() }
}
#[inline]
pub unsafe fn MFCreateMediaSession<P0>(pconfiguration: P0) -> windows_core::Result<IMFMediaSession>
where
P0: windows_core::Param<IMFAttributes>,
{
windows_core::link!("mf.dll" "system" fn MFCreateMediaSession(pconfiguration : * mut core::ffi::c_void, ppmediasession : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateMediaSession(pconfiguration.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateMediaType() -> windows_core::Result<IMFMediaType> {
windows_core::link!("mfplat.dll" "system" fn MFCreateMediaType(ppmftype : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateMediaType(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateMediaTypeFromProperties<P0>(punkstream: P0) -> windows_core::Result<IMFMediaType>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
windows_core::link!("mfplat.dll" "system" fn MFCreateMediaTypeFromProperties(punkstream : * mut core::ffi::c_void, ppmediatype : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateMediaTypeFromProperties(punkstream.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateMediaTypeFromRepresentation(guidrepresentation: windows_core::GUID, pvrepresentation: *const core::ffi::c_void) -> windows_core::Result<IMFMediaType> {
windows_core::link!("mfplat.dll" "system" fn MFCreateMediaTypeFromRepresentation(guidrepresentation : windows_core::GUID, pvrepresentation : *const core::ffi::c_void, ppimediatype : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateMediaTypeFromRepresentation(core::mem::transmute(guidrepresentation), pvrepresentation, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateMemoryBuffer(cbmaxlength: u32) -> windows_core::Result<IMFMediaBuffer> {
windows_core::link!("mfplat.dll" "system" fn MFCreateMemoryBuffer(cbmaxlength : u32, ppbuffer : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateMemoryBuffer(cbmaxlength, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateMuxSink<P1, P2>(guidoutputsubtype: windows_core::GUID, poutputattributes: P1, poutputbytestream: P2) -> windows_core::Result<IMFMediaSink>
where
P1: windows_core::Param<IMFAttributes>,
P2: windows_core::Param<IMFByteStream>,
{
windows_core::link!("mf.dll" "system" fn MFCreateMuxSink(guidoutputsubtype : windows_core::GUID, poutputattributes : * mut core::ffi::c_void, poutputbytestream : * mut core::ffi::c_void, ppmuxsink : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateMuxSink(core::mem::transmute(guidoutputsubtype), poutputattributes.param().abi(), poutputbytestream.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateMuxStreamAttributes<P0>(pattributestomux: P0) -> windows_core::Result<IMFAttributes>
where
P0: windows_core::Param<IMFCollection>,
{
windows_core::link!("mfplat.dll" "system" fn MFCreateMuxStreamAttributes(pattributestomux : * mut core::ffi::c_void, ppmuxattribs : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateMuxStreamAttributes(pattributestomux.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateMuxStreamMediaType<P0>(pmediatypestomux: P0) -> windows_core::Result<IMFMediaType>
where
P0: windows_core::Param<IMFCollection>,
{
windows_core::link!("mfplat.dll" "system" fn MFCreateMuxStreamMediaType(pmediatypestomux : * mut core::ffi::c_void, ppmuxmediatype : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateMuxStreamMediaType(pmediatypestomux.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateMuxStreamSample<P0>(psamplestomux: P0) -> windows_core::Result<IMFSample>
where
P0: windows_core::Param<IMFCollection>,
{
windows_core::link!("mfplat.dll" "system" fn MFCreateMuxStreamSample(psamplestomux : * mut core::ffi::c_void, ppmuxsample : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateMuxStreamSample(psamplestomux.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateNetSchemePlugin(riid: *const windows_core::GUID, ppvhandler: *mut *mut core::ffi::c_void) -> windows_core::Result<()> {
windows_core::link!("mf.dll" "system" fn MFCreateNetSchemePlugin(riid : *const windows_core::GUID, ppvhandler : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFCreateNetSchemePlugin(riid, ppvhandler as _).ok() }
}
#[inline]
pub unsafe fn MFCreatePMPMediaSession<P1>(dwcreationflags: u32, pconfiguration: P1, ppmediasession: *mut Option<IMFMediaSession>, ppenableractivate: Option<*mut Option<IMFActivate>>) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFAttributes>,
{
windows_core::link!("mf.dll" "system" fn MFCreatePMPMediaSession(dwcreationflags : u32, pconfiguration : * mut core::ffi::c_void, ppmediasession : *mut * mut core::ffi::c_void, ppenableractivate : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFCreatePMPMediaSession(dwcreationflags, pconfiguration.param().abi(), core::mem::transmute(ppmediasession), ppenableractivate.unwrap_or(core::mem::zeroed()) as _).ok() }
}
#[inline]
pub unsafe fn MFCreatePMPServer(dwcreationflags: u32) -> windows_core::Result<IMFPMPServer> {
windows_core::link!("mf.dll" "system" fn MFCreatePMPServer(dwcreationflags : u32, pppmpserver : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreatePMPServer(dwcreationflags, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreatePresentationClock() -> windows_core::Result<IMFPresentationClock> {
windows_core::link!("mf.dll" "system" fn MFCreatePresentationClock(pppresentationclock : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreatePresentationClock(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreatePresentationDescriptor(apstreamdescriptors: Option<&[Option<IMFStreamDescriptor>]>) -> windows_core::Result<IMFPresentationDescriptor> {
windows_core::link!("mfplat.dll" "system" fn MFCreatePresentationDescriptor(cstreamdescriptors : u32, apstreamdescriptors : *const * mut core::ffi::c_void, pppresentationdescriptor : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreatePresentationDescriptor(apstreamdescriptors.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(apstreamdescriptors.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreatePresentationDescriptorFromASFProfile<P0>(piprofile: P0) -> windows_core::Result<IMFPresentationDescriptor>
where
P0: windows_core::Param<IMFASFProfile>,
{
windows_core::link!("mf.dll" "system" fn MFCreatePresentationDescriptorFromASFProfile(piprofile : * mut core::ffi::c_void, ppipd : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreatePresentationDescriptorFromASFProfile(piprofile.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreatePropertiesFromMediaType<P0>(pmediatype: P0, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaType>,
{
windows_core::link!("mfplat.dll" "system" fn MFCreatePropertiesFromMediaType(pmediatype : * mut core::ffi::c_void, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFCreatePropertiesFromMediaType(pmediatype.param().abi(), riid, ppv as _).ok() }
}
#[inline]
pub unsafe fn MFCreateProtectedEnvironmentAccess() -> windows_core::Result<IMFProtectedEnvironmentAccess> {
windows_core::link!("mf.dll" "system" fn MFCreateProtectedEnvironmentAccess(ppaccess : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateProtectedEnvironmentAccess(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
#[inline]
pub unsafe fn MFCreateProxyLocator<P0, P1>(pszprotocol: P0, pproxyconfig: P1) -> windows_core::Result<IMFNetProxyLocator>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<super::super::UI::Shell::PropertiesSystem::IPropertyStore>,
{
windows_core::link!("mf.dll" "system" fn MFCreateProxyLocator(pszprotocol : windows_core::PCWSTR, pproxyconfig : * mut core::ffi::c_void, ppproxylocator : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateProxyLocator(pszprotocol.param().abi(), pproxyconfig.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateRelativePanelWatcher<P0, P1>(videodeviceid: P0, displaymonitordeviceid: P1) -> windows_core::Result<IMFRelativePanelWatcher>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<windows_core::PCWSTR>,
{
windows_core::link!("mfsensorgroup.dll" "system" fn MFCreateRelativePanelWatcher(videodeviceid : windows_core::PCWSTR, displaymonitordeviceid : windows_core::PCWSTR, pprelativepanelwatcher : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateRelativePanelWatcher(videodeviceid.param().abi(), displaymonitordeviceid.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateRemoteDesktopPlugin() -> windows_core::Result<IMFRemoteDesktopPlugin> {
windows_core::link!("mf.dll" "system" fn MFCreateRemoteDesktopPlugin(ppplugin : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateRemoteDesktopPlugin(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateSample() -> windows_core::Result<IMFSample> {
windows_core::link!("mfplat.dll" "system" fn MFCreateSample(ppimfsample : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateSample(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateSampleCopierMFT() -> windows_core::Result<IMFTransform> {
windows_core::link!("mf.dll" "system" fn MFCreateSampleCopierMFT(ppcopiermft : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateSampleCopierMFT(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateSampleGrabberSinkActivate<P0, P1>(pimfmediatype: P0, pimfsamplegrabbersinkcallback: P1) -> windows_core::Result<IMFActivate>
where
P0: windows_core::Param<IMFMediaType>,
P1: windows_core::Param<IMFSampleGrabberSinkCallback>,
{
windows_core::link!("mf.dll" "system" fn MFCreateSampleGrabberSinkActivate(pimfmediatype : * mut core::ffi::c_void, pimfsamplegrabbersinkcallback : * mut core::ffi::c_void, ppiactivate : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateSampleGrabberSinkActivate(pimfmediatype.param().abi(), pimfsamplegrabbersinkcallback.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateSensorActivityMonitor<P0>(pcallback: P0) -> windows_core::Result<IMFSensorActivityMonitor>
where
P0: windows_core::Param<IMFSensorActivitiesReportCallback>,
{
windows_core::link!("mfsensorgroup.dll" "system" fn MFCreateSensorActivityMonitor(pcallback : * mut core::ffi::c_void, ppactivitymonitor : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateSensorActivityMonitor(pcallback.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateSensorGroup<P0>(sensorgroupsymboliclink: P0) -> windows_core::Result<IMFSensorGroup>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
windows_core::link!("mfsensorgroup.dll" "system" fn MFCreateSensorGroup(sensorgroupsymboliclink : windows_core::PCWSTR, ppsensorgroup : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateSensorGroup(sensorgroupsymboliclink.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateSensorProfile<P2>(profiletype: *const windows_core::GUID, profileindex: u32, constraints: P2) -> windows_core::Result<IMFSensorProfile>
where
P2: windows_core::Param<windows_core::PCWSTR>,
{
windows_core::link!("mfsensorgroup.dll" "system" fn MFCreateSensorProfile(profiletype : *const windows_core::GUID, profileindex : u32, constraints : windows_core::PCWSTR, ppprofile : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateSensorProfile(profiletype, profileindex, constraints.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateSensorProfileCollection() -> windows_core::Result<IMFSensorProfileCollection> {
windows_core::link!("mfsensorgroup.dll" "system" fn MFCreateSensorProfileCollection(ppsensorprofile : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateSensorProfileCollection(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateSensorStream<P1, P2>(streamid: u32, pattributes: P1, pmediatypecollection: P2) -> windows_core::Result<IMFSensorStream>
where
P1: windows_core::Param<IMFAttributes>,
P2: windows_core::Param<IMFCollection>,
{
windows_core::link!("mfsensorgroup.dll" "system" fn MFCreateSensorStream(streamid : u32, pattributes : * mut core::ffi::c_void, pmediatypecollection : * mut core::ffi::c_void, ppstream : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateSensorStream(streamid, pattributes.param().abi(), pmediatypecollection.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
#[inline]
pub unsafe fn MFCreateSequencerSegmentOffset(dwid: u32, hnsoffset: i64) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT> {
windows_core::link!("mf.dll" "system" fn MFCreateSequencerSegmentOffset(dwid : u32, hnsoffset : i64, pvarsegmentoffset : *mut super::super::System::Com::StructuredStorage:: PROPVARIANT) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateSequencerSegmentOffset(dwid, hnsoffset, &mut result__).map(|| core::mem::transmute(result__))
}
}
#[inline]
pub unsafe fn MFCreateSequencerSource<P0>(preserved: P0) -> windows_core::Result<IMFSequencerSource>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
windows_core::link!("mf.dll" "system" fn MFCreateSequencerSource(preserved : * mut core::ffi::c_void, ppsequencersource : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateSequencerSource(preserved.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateSimpleTypeHandler() -> windows_core::Result<IMFMediaTypeHandler> {
windows_core::link!("mf.dll" "system" fn MFCreateSimpleTypeHandler(pphandler : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateSimpleTypeHandler(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateSinkWriterFromMediaSink<P0, P1>(pmediasink: P0, pattributes: P1) -> windows_core::Result<IMFSinkWriter>
where
P0: windows_core::Param<IMFMediaSink>,
P1: windows_core::Param<IMFAttributes>,
{
windows_core::link!("mfreadwrite.dll" "system" fn MFCreateSinkWriterFromMediaSink(pmediasink : * mut core::ffi::c_void, pattributes : * mut core::ffi::c_void, ppsinkwriter : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateSinkWriterFromMediaSink(pmediasink.param().abi(), pattributes.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateSinkWriterFromURL<P0, P1, P2>(pwszoutputurl: P0, pbytestream: P1, pattributes: P2) -> windows_core::Result<IMFSinkWriter>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<IMFByteStream>,
P2: windows_core::Param<IMFAttributes>,
{
windows_core::link!("mfreadwrite.dll" "system" fn MFCreateSinkWriterFromURL(pwszoutputurl : windows_core::PCWSTR, pbytestream : * mut core::ffi::c_void, pattributes : * mut core::ffi::c_void, ppsinkwriter : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateSinkWriterFromURL(pwszoutputurl.param().abi(), pbytestream.param().abi(), pattributes.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateSourceReaderFromByteStream<P0, P1>(pbytestream: P0, pattributes: P1) -> windows_core::Result<IMFSourceReader>
where
P0: windows_core::Param<IMFByteStream>,
P1: windows_core::Param<IMFAttributes>,
{
windows_core::link!("mfreadwrite.dll" "system" fn MFCreateSourceReaderFromByteStream(pbytestream : * mut core::ffi::c_void, pattributes : * mut core::ffi::c_void, ppsourcereader : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateSourceReaderFromByteStream(pbytestream.param().abi(), pattributes.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateSourceReaderFromMediaSource<P0, P1>(pmediasource: P0, pattributes: P1) -> windows_core::Result<IMFSourceReader>
where
P0: windows_core::Param<IMFMediaSource>,
P1: windows_core::Param<IMFAttributes>,
{
windows_core::link!("mfreadwrite.dll" "system" fn MFCreateSourceReaderFromMediaSource(pmediasource : * mut core::ffi::c_void, pattributes : * mut core::ffi::c_void, ppsourcereader : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateSourceReaderFromMediaSource(pmediasource.param().abi(), pattributes.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateSourceReaderFromURL<P0, P1>(pwszurl: P0, pattributes: P1) -> windows_core::Result<IMFSourceReader>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<IMFAttributes>,
{
windows_core::link!("mfreadwrite.dll" "system" fn MFCreateSourceReaderFromURL(pwszurl : windows_core::PCWSTR, pattributes : * mut core::ffi::c_void, ppsourcereader : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateSourceReaderFromURL(pwszurl.param().abi(), pattributes.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateSourceResolver() -> windows_core::Result<IMFSourceResolver> {
windows_core::link!("mfplat.dll" "system" fn MFCreateSourceResolver(ppisourceresolver : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateSourceResolver(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateStandardQualityManager() -> windows_core::Result<IMFQualityManager> {
windows_core::link!("mf.dll" "system" fn MFCreateStandardQualityManager(ppqualitymanager : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateStandardQualityManager(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateStreamDescriptor(dwstreamidentifier: u32, apmediatypes: &[Option<IMFMediaType>]) -> windows_core::Result<IMFStreamDescriptor> {
windows_core::link!("mfplat.dll" "system" fn MFCreateStreamDescriptor(dwstreamidentifier : u32, cmediatypes : u32, apmediatypes : *const * mut core::ffi::c_void, ppdescriptor : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateStreamDescriptor(dwstreamidentifier, apmediatypes.len().try_into().unwrap(), core::mem::transmute(apmediatypes.as_ptr()), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Win32_System_Com")]
#[inline]
pub unsafe fn MFCreateStreamOnMFByteStream<P0>(pbytestream: P0) -> windows_core::Result<super::super::System::Com::IStream>
where
P0: windows_core::Param<IMFByteStream>,
{
windows_core::link!("mfplat.dll" "system" fn MFCreateStreamOnMFByteStream(pbytestream : * mut core::ffi::c_void, ppstream : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateStreamOnMFByteStream(pbytestream.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateStreamOnMFByteStreamEx<P0>(pbytestream: P0, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFByteStream>,
{
windows_core::link!("mfplat.dll" "system" fn MFCreateStreamOnMFByteStreamEx(pbytestream : * mut core::ffi::c_void, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFCreateStreamOnMFByteStreamEx(pbytestream.param().abi(), riid, ppv as _).ok() }
}
#[inline]
pub unsafe fn MFCreateSystemTimeSource() -> windows_core::Result<IMFPresentationTimeSource> {
windows_core::link!("mfplat.dll" "system" fn MFCreateSystemTimeSource(ppsystemtimesource : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateSystemTimeSource(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateTempFile(accessmode: MF_FILE_ACCESSMODE, openmode: MF_FILE_OPENMODE, fflags: MF_FILE_FLAGS) -> windows_core::Result<IMFByteStream> {
windows_core::link!("mfplat.dll" "system" fn MFCreateTempFile(accessmode : MF_FILE_ACCESSMODE, openmode : MF_FILE_OPENMODE, fflags : MF_FILE_FLAGS, ppibytestream : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateTempFile(accessmode, openmode, fflags, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateTopoLoader() -> windows_core::Result<IMFTopoLoader> {
windows_core::link!("mf.dll" "system" fn MFCreateTopoLoader(ppobj : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateTopoLoader(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateTopology() -> windows_core::Result<IMFTopology> {
windows_core::link!("mf.dll" "system" fn MFCreateTopology(pptopo : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateTopology(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateTopologyNode(nodetype: MF_TOPOLOGY_TYPE) -> windows_core::Result<IMFTopologyNode> {
windows_core::link!("mf.dll" "system" fn MFCreateTopologyNode(nodetype : MF_TOPOLOGY_TYPE, ppnode : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateTopologyNode(nodetype, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateTrackedSample() -> windows_core::Result<IMFTrackedSample> {
windows_core::link!("mfplat.dll" "system" fn MFCreateTrackedSample(ppmfsample : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateTrackedSample(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateTranscodeProfile() -> windows_core::Result<IMFTranscodeProfile> {
windows_core::link!("mf.dll" "system" fn MFCreateTranscodeProfile(pptranscodeprofile : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateTranscodeProfile(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateTranscodeSinkActivate() -> windows_core::Result<IMFActivate> {
windows_core::link!("mf.dll" "system" fn MFCreateTranscodeSinkActivate(ppactivate : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateTranscodeSinkActivate(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateTranscodeTopology<P0, P1, P2>(psrc: P0, pwszoutputfilepath: P1, pprofile: P2) -> windows_core::Result<IMFTopology>
where
P0: windows_core::Param<IMFMediaSource>,
P1: windows_core::Param<windows_core::PCWSTR>,
P2: windows_core::Param<IMFTranscodeProfile>,
{
windows_core::link!("mf.dll" "system" fn MFCreateTranscodeTopology(psrc : * mut core::ffi::c_void, pwszoutputfilepath : windows_core::PCWSTR, pprofile : * mut core::ffi::c_void, pptranscodetopo : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateTranscodeTopology(psrc.param().abi(), pwszoutputfilepath.param().abi(), pprofile.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateTranscodeTopologyFromByteStream<P0, P1, P2>(psrc: P0, poutputstream: P1, pprofile: P2) -> windows_core::Result<IMFTopology>
where
P0: windows_core::Param<IMFMediaSource>,
P1: windows_core::Param<IMFByteStream>,
P2: windows_core::Param<IMFTranscodeProfile>,
{
windows_core::link!("mf.dll" "system" fn MFCreateTranscodeTopologyFromByteStream(psrc : * mut core::ffi::c_void, poutputstream : * mut core::ffi::c_void, pprofile : * mut core::ffi::c_void, pptranscodetopo : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateTranscodeTopologyFromByteStream(psrc.param().abi(), poutputstream.param().abi(), pprofile.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateTransformActivate() -> windows_core::Result<IMFActivate> {
windows_core::link!("mfplat.dll" "system" fn MFCreateTransformActivate(ppactivate : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateTransformActivate(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateVideoMediaType(pvideoformat: *const MFVIDEOFORMAT) -> windows_core::Result<IMFVideoMediaType> {
windows_core::link!("mfplat.dll" "system" fn MFCreateVideoMediaType(pvideoformat : *const MFVIDEOFORMAT, ppivideomediatype : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateVideoMediaType(pvideoformat, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Win32_Graphics_Gdi")]
#[inline]
pub unsafe fn MFCreateVideoMediaTypeFromBitMapInfoHeader(pbmihbitmapinfoheader: *const super::super::Graphics::Gdi::BITMAPINFOHEADER, dwpixelaspectratiox: u32, dwpixelaspectratioy: u32, interlacemode: MFVideoInterlaceMode, videoflags: u64, qwframespersecondnumerator: u64, qwframesperseconddenominator: u64, dwmaxbitrate: u32) -> windows_core::Result<IMFVideoMediaType> {
windows_core::link!("mfplat.dll" "system" fn MFCreateVideoMediaTypeFromBitMapInfoHeader(pbmihbitmapinfoheader : *const super::super::Graphics::Gdi:: BITMAPINFOHEADER, dwpixelaspectratiox : u32, dwpixelaspectratioy : u32, interlacemode : MFVideoInterlaceMode, videoflags : u64, qwframespersecondnumerator : u64, qwframesperseconddenominator : u64, dwmaxbitrate : u32, ppivideomediatype : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateVideoMediaTypeFromBitMapInfoHeader(pbmihbitmapinfoheader, dwpixelaspectratiox, dwpixelaspectratioy, interlacemode, videoflags, qwframespersecondnumerator, qwframesperseconddenominator, dwmaxbitrate, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Win32_Graphics_Gdi")]
#[inline]
pub unsafe fn MFCreateVideoMediaTypeFromBitMapInfoHeaderEx(pbmihbitmapinfoheader: *const super::super::Graphics::Gdi::BITMAPINFOHEADER, cbbitmapinfoheader: u32, dwpixelaspectratiox: u32, dwpixelaspectratioy: u32, interlacemode: MFVideoInterlaceMode, videoflags: u64, dwframespersecondnumerator: u32, dwframesperseconddenominator: u32, dwmaxbitrate: u32) -> windows_core::Result<IMFVideoMediaType> {
windows_core::link!("mfplat.dll" "system" fn MFCreateVideoMediaTypeFromBitMapInfoHeaderEx(pbmihbitmapinfoheader : *const super::super::Graphics::Gdi:: BITMAPINFOHEADER, cbbitmapinfoheader : u32, dwpixelaspectratiox : u32, dwpixelaspectratioy : u32, interlacemode : MFVideoInterlaceMode, videoflags : u64, dwframespersecondnumerator : u32, dwframesperseconddenominator : u32, dwmaxbitrate : u32, ppivideomediatype : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateVideoMediaTypeFromBitMapInfoHeaderEx(pbmihbitmapinfoheader, cbbitmapinfoheader, dwpixelaspectratiox, dwpixelaspectratioy, interlacemode, videoflags, dwframespersecondnumerator, dwframesperseconddenominator, dwmaxbitrate, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateVideoMediaTypeFromSubtype(pamsubtype: *const windows_core::GUID) -> windows_core::Result<IMFVideoMediaType> {
windows_core::link!("mfplat.dll" "system" fn MFCreateVideoMediaTypeFromSubtype(pamsubtype : *const windows_core::GUID, ppivideomediatype : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateVideoMediaTypeFromSubtype(pamsubtype, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateVideoMixer<P0>(powner: P0, riiddevice: *const windows_core::GUID, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
windows_core::link!("evr.dll" "system" fn MFCreateVideoMixer(powner : * mut core::ffi::c_void, riiddevice : *const windows_core::GUID, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFCreateVideoMixer(powner.param().abi(), riiddevice, riid, ppv as _).ok() }
}
#[inline]
pub unsafe fn MFCreateVideoMixerAndPresenter<P0, P1>(pmixerowner: P0, ppresenterowner: P1, riidmixer: *const windows_core::GUID, ppvvideomixer: *mut *mut core::ffi::c_void, riidpresenter: *const windows_core::GUID, ppvvideopresenter: *mut *mut core::ffi::c_void) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
P1: windows_core::Param<windows_core::IUnknown>,
{
windows_core::link!("evr.dll" "system" fn MFCreateVideoMixerAndPresenter(pmixerowner : * mut core::ffi::c_void, ppresenterowner : * mut core::ffi::c_void, riidmixer : *const windows_core::GUID, ppvvideomixer : *mut *mut core::ffi::c_void, riidpresenter : *const windows_core::GUID, ppvvideopresenter : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFCreateVideoMixerAndPresenter(pmixerowner.param().abi(), ppresenterowner.param().abi(), riidmixer, ppvvideomixer as _, riidpresenter, ppvvideopresenter as _).ok() }
}
#[inline]
pub unsafe fn MFCreateVideoPresenter<P0>(powner: P0, riiddevice: *const windows_core::GUID, riid: *const windows_core::GUID, ppvideopresenter: *mut *mut core::ffi::c_void) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
windows_core::link!("evr.dll" "system" fn MFCreateVideoPresenter(powner : * mut core::ffi::c_void, riiddevice : *const windows_core::GUID, riid : *const windows_core::GUID, ppvideopresenter : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFCreateVideoPresenter(powner.param().abi(), riiddevice, riid, ppvideopresenter as _).ok() }
}
#[inline]
pub unsafe fn MFCreateVideoRenderer(riidrenderer: *const windows_core::GUID, ppvideorenderer: *mut *mut core::ffi::c_void) -> windows_core::Result<()> {
windows_core::link!("mf.dll" "system" fn MFCreateVideoRenderer(riidrenderer : *const windows_core::GUID, ppvideorenderer : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFCreateVideoRenderer(riidrenderer, ppvideorenderer as _).ok() }
}
#[inline]
pub unsafe fn MFCreateVideoRendererActivate(hwndvideo: super::super::Foundation::HWND) -> windows_core::Result<IMFActivate> {
windows_core::link!("mf.dll" "system" fn MFCreateVideoRendererActivate(hwndvideo : super::super::Foundation:: HWND, ppactivate : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateVideoRendererActivate(hwndvideo, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateVideoSampleAllocator(riid: *const windows_core::GUID, ppsampleallocator: *mut *mut core::ffi::c_void) -> windows_core::Result<()> {
windows_core::link!("evr.dll" "system" fn MFCreateVideoSampleAllocator(riid : *const windows_core::GUID, ppsampleallocator : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFCreateVideoSampleAllocator(riid, ppsampleallocator as _).ok() }
}
#[inline]
pub unsafe fn MFCreateVideoSampleAllocatorEx(riid: *const windows_core::GUID, ppsampleallocator: *mut *mut core::ffi::c_void) -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFCreateVideoSampleAllocatorEx(riid : *const windows_core::GUID, ppsampleallocator : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFCreateVideoSampleAllocatorEx(riid, ppsampleallocator as _).ok() }
}
#[inline]
pub unsafe fn MFCreateVideoSampleFromSurface<P0>(punksurface: P0) -> windows_core::Result<IMFSample>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
windows_core::link!("evr.dll" "system" fn MFCreateVideoSampleFromSurface(punksurface : * mut core::ffi::c_void, ppsample : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateVideoSampleFromSurface(punksurface.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateVirtualCamera<P3, P4>(r#type: MFVirtualCameraType, lifetime: MFVirtualCameraLifetime, access: MFVirtualCameraAccess, friendlyname: P3, sourceid: P4, categories: Option<&[windows_core::GUID]>) -> windows_core::Result<IMFVirtualCamera>
where
P3: windows_core::Param<windows_core::PCWSTR>,
P4: windows_core::Param<windows_core::PCWSTR>,
{
windows_core::link!("mfsensorgroup.dll" "system" fn MFCreateVirtualCamera(r#type : MFVirtualCameraType, lifetime : MFVirtualCameraLifetime, access : MFVirtualCameraAccess, friendlyname : windows_core::PCWSTR, sourceid : windows_core::PCWSTR, categories : *const windows_core::GUID, categorycount : u32, virtualcamera : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateVirtualCamera(r#type, lifetime, access, friendlyname.param().abi(), sourceid.param().abi(), core::mem::transmute(categories.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), categories.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateWAVEMediaSink<P0, P1>(ptargetbytestream: P0, paudiomediatype: P1) -> windows_core::Result<IMFMediaSink>
where
P0: windows_core::Param<IMFByteStream>,
P1: windows_core::Param<IMFMediaType>,
{
windows_core::link!("mfsrcsnk.dll" "system" fn MFCreateWAVEMediaSink(ptargetbytestream : * mut core::ffi::c_void, paudiomediatype : * mut core::ffi::c_void, ppmediasink : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateWAVEMediaSink(ptargetbytestream.param().abi(), paudiomediatype.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFCreateWICBitmapBuffer<P1>(riid: *const windows_core::GUID, punksurface: P1) -> windows_core::Result<IMFMediaBuffer>
where
P1: windows_core::Param<windows_core::IUnknown>,
{
windows_core::link!("mfplat.dll" "system" fn MFCreateWICBitmapBuffer(riid : *const windows_core::GUID, punksurface : * mut core::ffi::c_void, ppbuffer : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateWICBitmapBuffer(riid, punksurface.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
#[inline]
pub unsafe fn MFCreateWMAEncoderActivate<P0, P1>(pmediatype: P0, pencodingconfigurationproperties: P1) -> windows_core::Result<IMFActivate>
where
P0: windows_core::Param<IMFMediaType>,
P1: windows_core::Param<super::super::UI::Shell::PropertiesSystem::IPropertyStore>,
{
windows_core::link!("mf.dll" "system" fn MFCreateWMAEncoderActivate(pmediatype : * mut core::ffi::c_void, pencodingconfigurationproperties : * mut core::ffi::c_void, ppactivate : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateWMAEncoderActivate(pmediatype.param().abi(), pencodingconfigurationproperties.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
#[inline]
pub unsafe fn MFCreateWMVEncoderActivate<P0, P1>(pmediatype: P0, pencodingconfigurationproperties: P1) -> windows_core::Result<IMFActivate>
where
P0: windows_core::Param<IMFMediaType>,
P1: windows_core::Param<super::super::UI::Shell::PropertiesSystem::IPropertyStore>,
{
windows_core::link!("mf.dll" "system" fn MFCreateWMVEncoderActivate(pmediatype : * mut core::ffi::c_void, pencodingconfigurationproperties : * mut core::ffi::c_void, ppactivate : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFCreateWMVEncoderActivate(pmediatype.param().abi(), pencodingconfigurationproperties.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Win32_Media_Audio")]
#[inline]
pub unsafe fn MFCreateWaveFormatExFromMFMediaType<P0>(pmftype: P0, ppwf: *mut *mut super::Audio::WAVEFORMATEX, pcbsize: Option<*mut u32>, flags: u32) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaType>,
{
windows_core::link!("mfplat.dll" "system" fn MFCreateWaveFormatExFromMFMediaType(pmftype : * mut core::ffi::c_void, ppwf : *mut *mut super::Audio:: WAVEFORMATEX, pcbsize : *mut u32, flags : u32) -> windows_core::HRESULT);
unsafe { MFCreateWaveFormatExFromMFMediaType(pmftype.param().abi(), ppwf as _, pcbsize.unwrap_or(core::mem::zeroed()) as _, flags).ok() }
}
#[cfg(feature = "Win32_System_Com")]
#[inline]
pub unsafe fn MFDeserializeAttributesFromStream<P0, P2>(pattr: P0, dwoptions: u32, pstm: P2) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAttributes>,
P2: windows_core::Param<super::super::System::Com::IStream>,
{
windows_core::link!("mfplat.dll" "system" fn MFDeserializeAttributesFromStream(pattr : * mut core::ffi::c_void, dwoptions : u32, pstm : * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFDeserializeAttributesFromStream(pattr.param().abi(), dwoptions, pstm.param().abi()).ok() }
}
#[inline]
pub unsafe fn MFDeserializePresentationDescriptor(pbdata: &[u8]) -> windows_core::Result<IMFPresentationDescriptor> {
windows_core::link!("mfplat.dll" "system" fn MFDeserializePresentationDescriptor(cbdata : u32, pbdata : *const u8, pppd : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFDeserializePresentationDescriptor(pbdata.len().try_into().unwrap(), core::mem::transmute(pbdata.as_ptr()), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFEndCreateFile<P0>(presult: P0) -> windows_core::Result<IMFByteStream>
where
P0: windows_core::Param<IMFAsyncResult>,
{
windows_core::link!("mfplat.dll" "system" fn MFEndCreateFile(presult : * mut core::ffi::c_void, ppfile : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFEndCreateFile(presult.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFEndRegisterWorkQueueWithMMCSS<P0>(presult: P0) -> windows_core::Result<u32>
where
P0: windows_core::Param<IMFAsyncResult>,
{
windows_core::link!("mfplat.dll" "system" fn MFEndRegisterWorkQueueWithMMCSS(presult : * mut core::ffi::c_void, pdwtaskid : *mut u32) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFEndRegisterWorkQueueWithMMCSS(presult.param().abi(), &mut result__).map(|| result__)
}
}
#[inline]
pub unsafe fn MFEndUnregisterWorkQueueWithMMCSS<P0>(presult: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncResult>,
{
windows_core::link!("mfplat.dll" "system" fn MFEndUnregisterWorkQueueWithMMCSS(presult : * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFEndUnregisterWorkQueueWithMMCSS(presult.param().abi()).ok() }
}
#[inline]
pub unsafe fn MFEnumDeviceSources<P0>(pattributes: P0, pppsourceactivate: *mut *mut Option<IMFActivate>, pcsourceactivate: *mut u32) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAttributes>,
{
windows_core::link!("mf.dll" "system" fn MFEnumDeviceSources(pattributes : * mut core::ffi::c_void, pppsourceactivate : *mut *mut * mut core::ffi::c_void, pcsourceactivate : *mut u32) -> windows_core::HRESULT);
unsafe { MFEnumDeviceSources(pattributes.param().abi(), pppsourceactivate as _, pcsourceactivate as _).ok() }
}
#[inline]
pub unsafe fn MFFrameRateToAverageTimePerFrame(unnumerator: u32, undenominator: u32) -> windows_core::Result<u64> {
windows_core::link!("mfplat.dll" "system" fn MFFrameRateToAverageTimePerFrame(unnumerator : u32, undenominator : u32, punaveragetimeperframe : *mut u64) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFFrameRateToAverageTimePerFrame(unnumerator, undenominator, &mut result__).map(|| result__)
}
}
#[inline]
pub unsafe fn MFGetAttributesAsBlob<P0>(pattributes: P0, pbuf: &mut [u8]) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAttributes>,
{
windows_core::link!("mfplat.dll" "system" fn MFGetAttributesAsBlob(pattributes : * mut core::ffi::c_void, pbuf : *mut u8, cbbufsize : u32) -> windows_core::HRESULT);
unsafe { MFGetAttributesAsBlob(pattributes.param().abi(), core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap()).ok() }
}
#[inline]
pub unsafe fn MFGetAttributesAsBlobSize<P0>(pattributes: P0) -> windows_core::Result<u32>
where
P0: windows_core::Param<IMFAttributes>,
{
windows_core::link!("mfplat.dll" "system" fn MFGetAttributesAsBlobSize(pattributes : * mut core::ffi::c_void, pcbbufsize : *mut u32) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFGetAttributesAsBlobSize(pattributes.param().abi(), &mut result__).map(|| result__)
}
}
#[inline]
pub unsafe fn MFGetContentProtectionSystemCLSID(guidprotectionsystemid: *const windows_core::GUID) -> windows_core::Result<windows_core::GUID> {
windows_core::link!("mfplat.dll" "system" fn MFGetContentProtectionSystemCLSID(guidprotectionsystemid : *const windows_core::GUID, pclsid : *mut windows_core::GUID) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFGetContentProtectionSystemCLSID(guidprotectionsystemid, &mut result__).map(|| result__)
}
}
#[inline]
pub unsafe fn MFGetLocalId(verifier: &[u8]) -> windows_core::Result<windows_core::PWSTR> {
windows_core::link!("mf.dll" "system" fn MFGetLocalId(verifier : *const u8, size : u32, id : *mut windows_core::PWSTR) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFGetLocalId(core::mem::transmute(verifier.as_ptr()), verifier.len().try_into().unwrap(), &mut result__).map(|| result__)
}
}
#[inline]
pub unsafe fn MFGetMFTMerit<P0>(pmft: P0, verifier: &[u8]) -> windows_core::Result<u32>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
windows_core::link!("mfplat.dll" "system" fn MFGetMFTMerit(pmft : * mut core::ffi::c_void, cbverifier : u32, verifier : *const u8, merit : *mut u32) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFGetMFTMerit(pmft.param().abi(), verifier.len().try_into().unwrap(), core::mem::transmute(verifier.as_ptr()), &mut result__).map(|| result__)
}
}
#[inline]
pub unsafe fn MFGetPlaneSize(format: u32, dwwidth: u32, dwheight: u32) -> windows_core::Result<u32> {
windows_core::link!("evr.dll" "system" fn MFGetPlaneSize(format : u32, dwwidth : u32, dwheight : u32, pdwplanesize : *mut u32) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFGetPlaneSize(format, dwwidth, dwheight, &mut result__).map(|| result__)
}
}
#[inline]
pub unsafe fn MFGetPluginControl() -> windows_core::Result<IMFPluginControl> {
windows_core::link!("mfplat.dll" "system" fn MFGetPluginControl(ppplugincontrol : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFGetPluginControl(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFGetService<P0>(punkobject: P0, guidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
windows_core::link!("mf.dll" "system" fn MFGetService(punkobject : * mut core::ffi::c_void, guidservice : *const windows_core::GUID, riid : *const windows_core::GUID, ppvobject : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFGetService(punkobject.param().abi(), guidservice, riid, ppvobject as _).ok() }
}
#[inline]
pub unsafe fn MFGetStrideForBitmapInfoHeader(format: u32, dwwidth: u32) -> windows_core::Result<i32> {
windows_core::link!("mfplat.dll" "system" fn MFGetStrideForBitmapInfoHeader(format : u32, dwwidth : u32, pstride : *mut i32) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFGetStrideForBitmapInfoHeader(format, dwwidth, &mut result__).map(|| result__)
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
#[inline]
pub unsafe fn MFGetSupportedMimeTypes() -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT> {
windows_core::link!("mfplat.dll" "system" fn MFGetSupportedMimeTypes(ppropvarmimetypearray : *mut super::super::System::Com::StructuredStorage:: PROPVARIANT) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFGetSupportedMimeTypes(&mut result__).map(|| core::mem::transmute(result__))
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
#[inline]
pub unsafe fn MFGetSupportedSchemes() -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT> {
windows_core::link!("mfplat.dll" "system" fn MFGetSupportedSchemes(ppropvarschemearray : *mut super::super::System::Com::StructuredStorage:: PROPVARIANT) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFGetSupportedSchemes(&mut result__).map(|| core::mem::transmute(result__))
}
}
#[inline]
pub unsafe fn MFGetSystemId() -> windows_core::Result<IMFSystemId> {
windows_core::link!("mf.dll" "system" fn MFGetSystemId(ppid : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFGetSystemId(&mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFGetSystemTime() -> i64 {
windows_core::link!("mfplat.dll" "system" fn MFGetSystemTime() -> i64);
unsafe { MFGetSystemTime() }
}
#[inline]
pub unsafe fn MFGetTimerPeriodicity() -> windows_core::Result<u32> {
windows_core::link!("mfplat.dll" "system" fn MFGetTimerPeriodicity(periodicity : *mut u32) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFGetTimerPeriodicity(&mut result__).map(|| result__)
}
}
#[inline]
pub unsafe fn MFGetTopoNodeCurrentType<P0>(pnode: P0, dwstreamindex: u32, foutput: bool) -> windows_core::Result<IMFMediaType>
where
P0: windows_core::Param<IMFTopologyNode>,
{
windows_core::link!("mf.dll" "system" fn MFGetTopoNodeCurrentType(pnode : * mut core::ffi::c_void, dwstreamindex : u32, foutput : windows_core::BOOL, pptype : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFGetTopoNodeCurrentType(pnode.param().abi(), dwstreamindex, foutput.into(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFGetUncompressedVideoFormat(pvideoformat: *const MFVIDEOFORMAT) -> u32 {
windows_core::link!("mfplat.dll" "system" fn MFGetUncompressedVideoFormat(pvideoformat : *const MFVIDEOFORMAT) -> u32);
unsafe { MFGetUncompressedVideoFormat(pvideoformat) }
}
#[inline]
pub unsafe fn MFGetWorkQueueMMCSSClass(dwworkqueueid: u32, pwszclass: Option<windows_core::PWSTR>, pcchclass: *mut u32) -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFGetWorkQueueMMCSSClass(dwworkqueueid : u32, pwszclass : windows_core::PWSTR, pcchclass : *mut u32) -> windows_core::HRESULT);
unsafe { MFGetWorkQueueMMCSSClass(dwworkqueueid, pwszclass.unwrap_or(core::mem::zeroed()) as _, pcchclass as _).ok() }
}
#[inline]
pub unsafe fn MFGetWorkQueueMMCSSPriority(dwworkqueueid: u32) -> windows_core::Result<i32> {
windows_core::link!("mfplat.dll" "system" fn MFGetWorkQueueMMCSSPriority(dwworkqueueid : u32, lpriority : *mut i32) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFGetWorkQueueMMCSSPriority(dwworkqueueid, &mut result__).map(|| result__)
}
}
#[inline]
pub unsafe fn MFGetWorkQueueMMCSSTaskId(dwworkqueueid: u32) -> windows_core::Result<u32> {
windows_core::link!("mfplat.dll" "system" fn MFGetWorkQueueMMCSSTaskId(dwworkqueueid : u32, pdwtaskid : *mut u32) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFGetWorkQueueMMCSSTaskId(dwworkqueueid, &mut result__).map(|| result__)
}
}
#[inline]
pub unsafe fn MFHeapAlloc<P2>(nsize: usize, dwflags: u32, pszfile: P2, line: i32, eat: EAllocationType) -> *mut core::ffi::c_void
where
P2: windows_core::Param<windows_core::PCSTR>,
{
windows_core::link!("mfplat.dll" "system" fn MFHeapAlloc(nsize : usize, dwflags : u32, pszfile : windows_core::PCSTR, line : i32, eat : EAllocationType) -> *mut core::ffi::c_void);
unsafe { MFHeapAlloc(nsize, dwflags, pszfile.param().abi(), line, eat) }
}
#[inline]
pub unsafe fn MFHeapFree(pv: *mut core::ffi::c_void) {
windows_core::link!("mfplat.dll" "system" fn MFHeapFree(pv : *mut core::ffi::c_void));
unsafe { MFHeapFree(pv as _) }
}
#[inline]
pub unsafe fn MFInitAMMediaTypeFromMFMediaType<P0>(pmftype: P0, guidformatblocktype: windows_core::GUID, pamtype: *mut AM_MEDIA_TYPE) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaType>,
{
windows_core::link!("mfplat.dll" "system" fn MFInitAMMediaTypeFromMFMediaType(pmftype : * mut core::ffi::c_void, guidformatblocktype : windows_core::GUID, pamtype : *mut AM_MEDIA_TYPE) -> windows_core::HRESULT);
unsafe { MFInitAMMediaTypeFromMFMediaType(pmftype.param().abi(), core::mem::transmute(guidformatblocktype), core::mem::transmute(pamtype)).ok() }
}
#[inline]
pub unsafe fn MFInitAttributesFromBlob<P0>(pattributes: P0, pbuf: &[u8]) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAttributes>,
{
windows_core::link!("mfplat.dll" "system" fn MFInitAttributesFromBlob(pattributes : * mut core::ffi::c_void, pbuf : *const u8, cbbufsize : u32) -> windows_core::HRESULT);
unsafe { MFInitAttributesFromBlob(pattributes.param().abi(), core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap()).ok() }
}
#[inline]
pub unsafe fn MFInitMediaTypeFromAMMediaType<P0>(pmftype: P0, pamtype: *const AM_MEDIA_TYPE) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaType>,
{
windows_core::link!("mfplat.dll" "system" fn MFInitMediaTypeFromAMMediaType(pmftype : * mut core::ffi::c_void, pamtype : *const AM_MEDIA_TYPE) -> windows_core::HRESULT);
unsafe { MFInitMediaTypeFromAMMediaType(pmftype.param().abi(), core::mem::transmute(pamtype)).ok() }
}
#[inline]
pub unsafe fn MFInitMediaTypeFromMFVideoFormat<P0>(pmftype: P0, pmfvf: *const MFVIDEOFORMAT, cbbufsize: u32) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaType>,
{
windows_core::link!("mfplat.dll" "system" fn MFInitMediaTypeFromMFVideoFormat(pmftype : * mut core::ffi::c_void, pmfvf : *const MFVIDEOFORMAT, cbbufsize : u32) -> windows_core::HRESULT);
unsafe { MFInitMediaTypeFromMFVideoFormat(pmftype.param().abi(), pmfvf, cbbufsize).ok() }
}
#[cfg(feature = "Win32_Graphics_Gdi")]
#[inline]
pub unsafe fn MFInitMediaTypeFromMPEG1VideoInfo<P0>(pmftype: P0, pmp1vi: *const MPEG1VIDEOINFO, cbbufsize: u32, psubtype: Option<*const windows_core::GUID>) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaType>,
{
windows_core::link!("mfplat.dll" "system" fn MFInitMediaTypeFromMPEG1VideoInfo(pmftype : * mut core::ffi::c_void, pmp1vi : *const MPEG1VIDEOINFO, cbbufsize : u32, psubtype : *const windows_core::GUID) -> windows_core::HRESULT);
unsafe { MFInitMediaTypeFromMPEG1VideoInfo(pmftype.param().abi(), pmp1vi, cbbufsize, psubtype.unwrap_or(core::mem::zeroed()) as _).ok() }
}
#[cfg(feature = "Win32_Graphics_Gdi")]
#[inline]
pub unsafe fn MFInitMediaTypeFromMPEG2VideoInfo<P0>(pmftype: P0, pmp2vi: *const MPEG2VIDEOINFO, cbbufsize: u32, psubtype: Option<*const windows_core::GUID>) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaType>,
{
windows_core::link!("mfplat.dll" "system" fn MFInitMediaTypeFromMPEG2VideoInfo(pmftype : * mut core::ffi::c_void, pmp2vi : *const MPEG2VIDEOINFO, cbbufsize : u32, psubtype : *const windows_core::GUID) -> windows_core::HRESULT);
unsafe { MFInitMediaTypeFromMPEG2VideoInfo(pmftype.param().abi(), pmp2vi, cbbufsize, psubtype.unwrap_or(core::mem::zeroed()) as _).ok() }
}
#[cfg(feature = "Win32_Graphics_Gdi")]
#[inline]
pub unsafe fn MFInitMediaTypeFromVideoInfoHeader<P0>(pmftype: P0, pvih: *const VIDEOINFOHEADER, cbbufsize: u32, psubtype: Option<*const windows_core::GUID>) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaType>,
{
windows_core::link!("mfplat.dll" "system" fn MFInitMediaTypeFromVideoInfoHeader(pmftype : * mut core::ffi::c_void, pvih : *const VIDEOINFOHEADER, cbbufsize : u32, psubtype : *const windows_core::GUID) -> windows_core::HRESULT);
unsafe { MFInitMediaTypeFromVideoInfoHeader(pmftype.param().abi(), pvih, cbbufsize, psubtype.unwrap_or(core::mem::zeroed()) as _).ok() }
}
#[cfg(feature = "Win32_Graphics_Gdi")]
#[inline]
pub unsafe fn MFInitMediaTypeFromVideoInfoHeader2<P0>(pmftype: P0, pvih2: *const VIDEOINFOHEADER2, cbbufsize: u32, psubtype: Option<*const windows_core::GUID>) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaType>,
{
windows_core::link!("mfplat.dll" "system" fn MFInitMediaTypeFromVideoInfoHeader2(pmftype : * mut core::ffi::c_void, pvih2 : *const VIDEOINFOHEADER2, cbbufsize : u32, psubtype : *const windows_core::GUID) -> windows_core::HRESULT);
unsafe { MFInitMediaTypeFromVideoInfoHeader2(pmftype.param().abi(), pvih2, cbbufsize, psubtype.unwrap_or(core::mem::zeroed()) as _).ok() }
}
#[cfg(feature = "Win32_Media_Audio")]
#[inline]
pub unsafe fn MFInitMediaTypeFromWaveFormatEx<P0>(pmftype: P0, pwaveformat: *const super::Audio::WAVEFORMATEX, cbbufsize: u32) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaType>,
{
windows_core::link!("mfplat.dll" "system" fn MFInitMediaTypeFromWaveFormatEx(pmftype : * mut core::ffi::c_void, pwaveformat : *const super::Audio:: WAVEFORMATEX, cbbufsize : u32) -> windows_core::HRESULT);
unsafe { MFInitMediaTypeFromWaveFormatEx(pmftype.param().abi(), pwaveformat, cbbufsize).ok() }
}
#[inline]
pub unsafe fn MFInitVideoFormat(pvideoformat: *const MFVIDEOFORMAT, r#type: MFStandardVideoFormat) -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFInitVideoFormat(pvideoformat : *const MFVIDEOFORMAT, r#type : MFStandardVideoFormat) -> windows_core::HRESULT);
unsafe { MFInitVideoFormat(pvideoformat, r#type).ok() }
}
#[inline]
pub unsafe fn MFInitVideoFormat_RGB(pvideoformat: *const MFVIDEOFORMAT, dwwidth: u32, dwheight: u32, d3dfmt: u32) -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFInitVideoFormat_RGB(pvideoformat : *const MFVIDEOFORMAT, dwwidth : u32, dwheight : u32, d3dfmt : u32) -> windows_core::HRESULT);
unsafe { MFInitVideoFormat_RGB(pvideoformat, dwwidth, dwheight, d3dfmt).ok() }
}
#[inline]
pub unsafe fn MFInvokeCallback<P0>(pasyncresult: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncResult>,
{
windows_core::link!("mfplat.dll" "system" fn MFInvokeCallback(pasyncresult : * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFInvokeCallback(pasyncresult.param().abi()).ok() }
}
#[inline]
pub unsafe fn MFIsContentProtectionDeviceSupported(protectionsystemid: *const windows_core::GUID) -> windows_core::Result<windows_core::BOOL> {
windows_core::link!("mfplat.dll" "system" fn MFIsContentProtectionDeviceSupported(protectionsystemid : *const windows_core::GUID, issupported : *mut windows_core::BOOL) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFIsContentProtectionDeviceSupported(protectionsystemid, &mut result__).map(|| result__)
}
}
#[inline]
pub unsafe fn MFIsFormatYUV(format: u32) -> windows_core::BOOL {
windows_core::link!("evr.dll" "system" fn MFIsFormatYUV(format : u32) -> windows_core::BOOL);
unsafe { MFIsFormatYUV(format) }
}
#[inline]
pub unsafe fn MFIsVirtualCameraTypeSupported(r#type: MFVirtualCameraType) -> windows_core::Result<windows_core::BOOL> {
windows_core::link!("mfsensorgroup.dll" "system" fn MFIsVirtualCameraTypeSupported(r#type : MFVirtualCameraType, supported : *mut windows_core::BOOL) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFIsVirtualCameraTypeSupported(r#type, &mut result__).map(|| result__)
}
}
#[inline]
pub unsafe fn MFLoadSignedLibrary<P0>(pszname: P0) -> windows_core::Result<IMFSignedLibrary>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
windows_core::link!("mf.dll" "system" fn MFLoadSignedLibrary(pszname : windows_core::PCWSTR, pplib : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFLoadSignedLibrary(pszname.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFLockDXGIDeviceManager(presettoken: Option<*mut u32>, ppmanager: *mut Option<IMFDXGIDeviceManager>) -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFLockDXGIDeviceManager(presettoken : *mut u32, ppmanager : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFLockDXGIDeviceManager(presettoken.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(ppmanager)).ok() }
}
#[inline]
pub unsafe fn MFLockPlatform() -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFLockPlatform() -> windows_core::HRESULT);
unsafe { MFLockPlatform().ok() }
}
#[inline]
pub unsafe fn MFLockSharedWorkQueue<P0>(wszclass: P0, basepriority: i32, pdwtaskid: *mut u32, pid: *mut u32) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
windows_core::link!("mfplat.dll" "system" fn MFLockSharedWorkQueue(wszclass : windows_core::PCWSTR, basepriority : i32, pdwtaskid : *mut u32, pid : *mut u32) -> windows_core::HRESULT);
unsafe { MFLockSharedWorkQueue(wszclass.param().abi(), basepriority, pdwtaskid as _, pid as _).ok() }
}
#[inline]
pub unsafe fn MFLockWorkQueue(dwworkqueue: u32) -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFLockWorkQueue(dwworkqueue : u32) -> windows_core::HRESULT);
unsafe { MFLockWorkQueue(dwworkqueue).ok() }
}
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[inline]
pub unsafe fn MFMapDX9FormatToDXGIFormat(dx9: u32) -> super::super::Graphics::Dxgi::Common::DXGI_FORMAT {
windows_core::link!("mfplat.dll" "system" fn MFMapDX9FormatToDXGIFormat(dx9 : u32) -> super::super::Graphics::Dxgi::Common:: DXGI_FORMAT);
unsafe { MFMapDX9FormatToDXGIFormat(dx9) }
}
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[inline]
pub unsafe fn MFMapDXGIFormatToDX9Format(dx11: super::super::Graphics::Dxgi::Common::DXGI_FORMAT) -> u32 {
windows_core::link!("mfplat.dll" "system" fn MFMapDXGIFormatToDX9Format(dx11 : super::super::Graphics::Dxgi::Common:: DXGI_FORMAT) -> u32);
unsafe { MFMapDXGIFormatToDX9Format(dx11) }
}
#[inline]
pub unsafe fn MFPCreateMediaPlayer<P0, P3>(pwszurl: P0, fstartplayback: bool, creationoptions: MFP_CREATION_OPTIONS, pcallback: P3, hwnd: Option<super::super::Foundation::HWND>, ppmediaplayer: Option<*mut Option<IMFPMediaPlayer>>) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P3: windows_core::Param<IMFPMediaPlayerCallback>,
{
windows_core::link!("mfplay.dll" "system" fn MFPCreateMediaPlayer(pwszurl : windows_core::PCWSTR, fstartplayback : windows_core::BOOL, creationoptions : MFP_CREATION_OPTIONS, pcallback : * mut core::ffi::c_void, hwnd : super::super::Foundation:: HWND, ppmediaplayer : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFPCreateMediaPlayer(pwszurl.param().abi(), fstartplayback.into(), creationoptions, pcallback.param().abi(), hwnd.unwrap_or(core::mem::zeroed()) as _, ppmediaplayer.unwrap_or(core::mem::zeroed()) as _).ok() }
}
#[inline]
pub unsafe fn MFPutWaitingWorkItem<P2>(hevent: super::super::Foundation::HANDLE, priority: i32, presult: P2, pkey: Option<*mut u64>) -> windows_core::Result<()>
where
P2: windows_core::Param<IMFAsyncResult>,
{
windows_core::link!("mfplat.dll" "system" fn MFPutWaitingWorkItem(hevent : super::super::Foundation:: HANDLE, priority : i32, presult : * mut core::ffi::c_void, pkey : *mut u64) -> windows_core::HRESULT);
unsafe { MFPutWaitingWorkItem(hevent, priority, presult.param().abi(), pkey.unwrap_or(core::mem::zeroed()) as _).ok() }
}
#[inline]
pub unsafe fn MFPutWorkItem<P1, P2>(dwqueue: u32, pcallback: P1, pstate: P2) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFAsyncCallback>,
P2: windows_core::Param<windows_core::IUnknown>,
{
windows_core::link!("mfplat.dll" "system" fn MFPutWorkItem(dwqueue : u32, pcallback : * mut core::ffi::c_void, pstate : * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFPutWorkItem(dwqueue, pcallback.param().abi(), pstate.param().abi()).ok() }
}
#[inline]
pub unsafe fn MFPutWorkItem2<P2, P3>(dwqueue: u32, priority: i32, pcallback: P2, pstate: P3) -> windows_core::Result<()>
where
P2: windows_core::Param<IMFAsyncCallback>,
P3: windows_core::Param<windows_core::IUnknown>,
{
windows_core::link!("mfplat.dll" "system" fn MFPutWorkItem2(dwqueue : u32, priority : i32, pcallback : * mut core::ffi::c_void, pstate : * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFPutWorkItem2(dwqueue, priority, pcallback.param().abi(), pstate.param().abi()).ok() }
}
#[inline]
pub unsafe fn MFPutWorkItemEx<P1>(dwqueue: u32, presult: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFAsyncResult>,
{
windows_core::link!("mfplat.dll" "system" fn MFPutWorkItemEx(dwqueue : u32, presult : * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFPutWorkItemEx(dwqueue, presult.param().abi()).ok() }
}
#[inline]
pub unsafe fn MFPutWorkItemEx2<P2>(dwqueue: u32, priority: i32, presult: P2) -> windows_core::Result<()>
where
P2: windows_core::Param<IMFAsyncResult>,
{
windows_core::link!("mfplat.dll" "system" fn MFPutWorkItemEx2(dwqueue : u32, priority : i32, presult : * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFPutWorkItemEx2(dwqueue, priority, presult.param().abi()).ok() }
}
#[inline]
pub unsafe fn MFRegisterLocalByteStreamHandler<P0, P1, P2>(szfileextension: P0, szmimetype: P1, pactivate: P2) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<windows_core::PCWSTR>,
P2: windows_core::Param<IMFActivate>,
{
windows_core::link!("mfplat.dll" "system" fn MFRegisterLocalByteStreamHandler(szfileextension : windows_core::PCWSTR, szmimetype : windows_core::PCWSTR, pactivate : * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFRegisterLocalByteStreamHandler(szfileextension.param().abi(), szmimetype.param().abi(), pactivate.param().abi()).ok() }
}
#[inline]
pub unsafe fn MFRegisterLocalSchemeHandler<P0, P1>(szscheme: P0, pactivate: P1) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<IMFActivate>,
{
windows_core::link!("mfplat.dll" "system" fn MFRegisterLocalSchemeHandler(szscheme : windows_core::PCWSTR, pactivate : * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFRegisterLocalSchemeHandler(szscheme.param().abi(), pactivate.param().abi()).ok() }
}
#[inline]
pub unsafe fn MFRegisterPlatformWithMMCSS<P0>(wszclass: P0, pdwtaskid: *mut u32, lpriority: i32) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
windows_core::link!("mfplat.dll" "system" fn MFRegisterPlatformWithMMCSS(wszclass : windows_core::PCWSTR, pdwtaskid : *mut u32, lpriority : i32) -> windows_core::HRESULT);
unsafe { MFRegisterPlatformWithMMCSS(wszclass.param().abi(), pdwtaskid as _, lpriority).ok() }
}
#[inline]
pub unsafe fn MFRemovePeriodicCallback(dwkey: u32) -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFRemovePeriodicCallback(dwkey : u32) -> windows_core::HRESULT);
unsafe { MFRemovePeriodicCallback(dwkey).ok() }
}
#[inline]
pub unsafe fn MFRequireProtectedEnvironment<P0>(ppresentationdescriptor: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFPresentationDescriptor>,
{
windows_core::link!("mf.dll" "system" fn MFRequireProtectedEnvironment(ppresentationdescriptor : * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFRequireProtectedEnvironment(ppresentationdescriptor.param().abi()).ok() }
}
#[inline]
pub unsafe fn MFScheduleWorkItem<P0, P1>(pcallback: P0, pstate: P1, timeout: i64, pkey: Option<*mut u64>) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncCallback>,
P1: windows_core::Param<windows_core::IUnknown>,
{
windows_core::link!("mfplat.dll" "system" fn MFScheduleWorkItem(pcallback : * mut core::ffi::c_void, pstate : * mut core::ffi::c_void, timeout : i64, pkey : *mut u64) -> windows_core::HRESULT);
unsafe { MFScheduleWorkItem(pcallback.param().abi(), pstate.param().abi(), timeout, pkey.unwrap_or(core::mem::zeroed()) as _).ok() }
}
#[inline]
pub unsafe fn MFScheduleWorkItemEx<P0>(presult: P0, timeout: i64, pkey: Option<*mut u64>) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncResult>,
{
windows_core::link!("mfplat.dll" "system" fn MFScheduleWorkItemEx(presult : * mut core::ffi::c_void, timeout : i64, pkey : *mut u64) -> windows_core::HRESULT);
unsafe { MFScheduleWorkItemEx(presult.param().abi(), timeout, pkey.unwrap_or(core::mem::zeroed()) as _).ok() }
}
#[cfg(feature = "Win32_System_Com")]
#[inline]
pub unsafe fn MFSerializeAttributesToStream<P0, P2>(pattr: P0, dwoptions: u32, pstm: P2) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAttributes>,
P2: windows_core::Param<super::super::System::Com::IStream>,
{
windows_core::link!("mfplat.dll" "system" fn MFSerializeAttributesToStream(pattr : * mut core::ffi::c_void, dwoptions : u32, pstm : * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFSerializeAttributesToStream(pattr.param().abi(), dwoptions, pstm.param().abi()).ok() }
}
#[inline]
pub unsafe fn MFSerializePresentationDescriptor<P0>(ppd: P0, pcbdata: *mut u32, ppbdata: *mut *mut u8) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFPresentationDescriptor>,
{
windows_core::link!("mfplat.dll" "system" fn MFSerializePresentationDescriptor(ppd : * mut core::ffi::c_void, pcbdata : *mut u32, ppbdata : *mut *mut u8) -> windows_core::HRESULT);
unsafe { MFSerializePresentationDescriptor(ppd.param().abi(), pcbdata as _, ppbdata as _).ok() }
}
#[inline]
pub unsafe fn MFShutdown() -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFShutdown() -> windows_core::HRESULT);
unsafe { MFShutdown().ok() }
}
#[inline]
pub unsafe fn MFShutdownObject<P0>(punk: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
windows_core::link!("mf.dll" "system" fn MFShutdownObject(punk : * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFShutdownObject(punk.param().abi()).ok() }
}
#[inline]
pub unsafe fn MFSplitSample<P0>(psample: P0, poutputsamples: &mut [Option<IMFSample>], pdwoutputsamplecount: *mut u32) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFSample>,
{
windows_core::link!("mfplat.dll" "system" fn MFSplitSample(psample : * mut core::ffi::c_void, poutputsamples : *mut * mut core::ffi::c_void, dwoutputsamplemaxcount : u32, pdwoutputsamplecount : *mut u32) -> windows_core::HRESULT);
unsafe { MFSplitSample(psample.param().abi(), core::mem::transmute(poutputsamples.as_ptr()), poutputsamples.len().try_into().unwrap(), pdwoutputsamplecount as _).ok() }
}
#[inline]
pub unsafe fn MFStartup(version: u32, dwflags: u32) -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFStartup(version : u32, dwflags : u32) -> windows_core::HRESULT);
unsafe { MFStartup(version, dwflags).ok() }
}
#[inline]
pub unsafe fn MFTEnum<P4>(guidcategory: windows_core::GUID, flags: u32, pinputtype: Option<*const MFT_REGISTER_TYPE_INFO>, poutputtype: Option<*const MFT_REGISTER_TYPE_INFO>, pattributes: P4, ppclsidmft: *mut *mut windows_core::GUID, pcmfts: *mut u32) -> windows_core::Result<()>
where
P4: windows_core::Param<IMFAttributes>,
{
windows_core::link!("mfplat.dll" "system" fn MFTEnum(guidcategory : windows_core::GUID, flags : u32, pinputtype : *const MFT_REGISTER_TYPE_INFO, poutputtype : *const MFT_REGISTER_TYPE_INFO, pattributes : * mut core::ffi::c_void, ppclsidmft : *mut *mut windows_core::GUID, pcmfts : *mut u32) -> windows_core::HRESULT);
unsafe { MFTEnum(core::mem::transmute(guidcategory), flags, pinputtype.unwrap_or(core::mem::zeroed()) as _, poutputtype.unwrap_or(core::mem::zeroed()) as _, pattributes.param().abi(), ppclsidmft as _, pcmfts as _).ok() }
}
#[inline]
pub unsafe fn MFTEnum2<P4>(guidcategory: windows_core::GUID, flags: MFT_ENUM_FLAG, pinputtype: Option<*const MFT_REGISTER_TYPE_INFO>, poutputtype: Option<*const MFT_REGISTER_TYPE_INFO>, pattributes: P4, pppmftactivate: *mut *mut Option<IMFActivate>, pnummftactivate: *mut u32) -> windows_core::Result<()>
where
P4: windows_core::Param<IMFAttributes>,
{
windows_core::link!("mfplat.dll" "system" fn MFTEnum2(guidcategory : windows_core::GUID, flags : u32, pinputtype : *const MFT_REGISTER_TYPE_INFO, poutputtype : *const MFT_REGISTER_TYPE_INFO, pattributes : * mut core::ffi::c_void, pppmftactivate : *mut *mut * mut core::ffi::c_void, pnummftactivate : *mut u32) -> windows_core::HRESULT);
unsafe { MFTEnum2(core::mem::transmute(guidcategory), flags.0 as _, pinputtype.unwrap_or(core::mem::zeroed()) as _, poutputtype.unwrap_or(core::mem::zeroed()) as _, pattributes.param().abi(), pppmftactivate as _, pnummftactivate as _).ok() }
}
#[inline]
pub unsafe fn MFTEnumEx(guidcategory: windows_core::GUID, flags: MFT_ENUM_FLAG, pinputtype: Option<*const MFT_REGISTER_TYPE_INFO>, poutputtype: Option<*const MFT_REGISTER_TYPE_INFO>, pppmftactivate: *mut *mut Option<IMFActivate>, pnummftactivate: *mut u32) -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFTEnumEx(guidcategory : windows_core::GUID, flags : u32, pinputtype : *const MFT_REGISTER_TYPE_INFO, poutputtype : *const MFT_REGISTER_TYPE_INFO, pppmftactivate : *mut *mut * mut core::ffi::c_void, pnummftactivate : *mut u32) -> windows_core::HRESULT);
unsafe { MFTEnumEx(core::mem::transmute(guidcategory), flags.0 as _, pinputtype.unwrap_or(core::mem::zeroed()) as _, poutputtype.unwrap_or(core::mem::zeroed()) as _, pppmftactivate as _, pnummftactivate as _).ok() }
}
#[inline]
pub unsafe fn MFTGetInfo(clsidmft: windows_core::GUID, pszname: Option<*mut windows_core::PWSTR>, ppinputtypes: Option<*mut *mut MFT_REGISTER_TYPE_INFO>, pcinputtypes: Option<*mut u32>, ppoutputtypes: Option<*mut *mut MFT_REGISTER_TYPE_INFO>, pcoutputtypes: Option<*mut u32>, ppattributes: Option<*mut Option<IMFAttributes>>) -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFTGetInfo(clsidmft : windows_core::GUID, pszname : *mut windows_core::PWSTR, ppinputtypes : *mut *mut MFT_REGISTER_TYPE_INFO, pcinputtypes : *mut u32, ppoutputtypes : *mut *mut MFT_REGISTER_TYPE_INFO, pcoutputtypes : *mut u32, ppattributes : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFTGetInfo(core::mem::transmute(clsidmft), pszname.unwrap_or(core::mem::zeroed()) as _, ppinputtypes.unwrap_or(core::mem::zeroed()) as _, pcinputtypes.unwrap_or(core::mem::zeroed()) as _, ppoutputtypes.unwrap_or(core::mem::zeroed()) as _, pcoutputtypes.unwrap_or(core::mem::zeroed()) as _, ppattributes.unwrap_or(core::mem::zeroed()) as _).ok() }
}
#[inline]
pub unsafe fn MFTRegister<P2, P8>(clsidmft: windows_core::GUID, guidcategory: windows_core::GUID, pszname: P2, flags: u32, pinputtypes: Option<&[MFT_REGISTER_TYPE_INFO]>, poutputtypes: Option<&[MFT_REGISTER_TYPE_INFO]>, pattributes: P8) -> windows_core::Result<()>
where
P2: windows_core::Param<windows_core::PCWSTR>,
P8: windows_core::Param<IMFAttributes>,
{
windows_core::link!("mfplat.dll" "system" fn MFTRegister(clsidmft : windows_core::GUID, guidcategory : windows_core::GUID, pszname : windows_core::PCWSTR, flags : u32, cinputtypes : u32, pinputtypes : *const MFT_REGISTER_TYPE_INFO, coutputtypes : u32, poutputtypes : *const MFT_REGISTER_TYPE_INFO, pattributes : * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFTRegister(core::mem::transmute(clsidmft), core::mem::transmute(guidcategory), pszname.param().abi(), flags, pinputtypes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pinputtypes.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), poutputtypes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(poutputtypes.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pattributes.param().abi()).ok() }
}
#[cfg(feature = "Win32_System_Com")]
#[inline]
pub unsafe fn MFTRegisterLocal<P0, P2>(pclassfactory: P0, guidcategory: *const windows_core::GUID, pszname: P2, flags: u32, pinputtypes: Option<&[MFT_REGISTER_TYPE_INFO]>, poutputtypes: Option<&[MFT_REGISTER_TYPE_INFO]>) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::System::Com::IClassFactory>,
P2: windows_core::Param<windows_core::PCWSTR>,
{
windows_core::link!("mfplat.dll" "system" fn MFTRegisterLocal(pclassfactory : * mut core::ffi::c_void, guidcategory : *const windows_core::GUID, pszname : windows_core::PCWSTR, flags : u32, cinputtypes : u32, pinputtypes : *const MFT_REGISTER_TYPE_INFO, coutputtypes : u32, poutputtypes : *const MFT_REGISTER_TYPE_INFO) -> windows_core::HRESULT);
unsafe { MFTRegisterLocal(pclassfactory.param().abi(), guidcategory, pszname.param().abi(), flags, pinputtypes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pinputtypes.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), poutputtypes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(poutputtypes.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() }
}
#[inline]
pub unsafe fn MFTRegisterLocalByCLSID<P2>(clisdmft: *const windows_core::GUID, guidcategory: *const windows_core::GUID, pszname: P2, flags: u32, pinputtypes: Option<&[MFT_REGISTER_TYPE_INFO]>, poutputtypes: Option<&[MFT_REGISTER_TYPE_INFO]>) -> windows_core::Result<()>
where
P2: windows_core::Param<windows_core::PCWSTR>,
{
windows_core::link!("mfplat.dll" "system" fn MFTRegisterLocalByCLSID(clisdmft : *const windows_core::GUID, guidcategory : *const windows_core::GUID, pszname : windows_core::PCWSTR, flags : u32, cinputtypes : u32, pinputtypes : *const MFT_REGISTER_TYPE_INFO, coutputtypes : u32, poutputtypes : *const MFT_REGISTER_TYPE_INFO) -> windows_core::HRESULT);
unsafe { MFTRegisterLocalByCLSID(clisdmft, guidcategory, pszname.param().abi(), flags, pinputtypes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pinputtypes.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), poutputtypes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(poutputtypes.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() }
}
#[inline]
pub unsafe fn MFTUnregister(clsidmft: windows_core::GUID) -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFTUnregister(clsidmft : windows_core::GUID) -> windows_core::HRESULT);
unsafe { MFTUnregister(core::mem::transmute(clsidmft)).ok() }
}
#[cfg(feature = "Win32_System_Com")]
#[inline]
pub unsafe fn MFTUnregisterLocal<P0>(pclassfactory: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::System::Com::IClassFactory>,
{
windows_core::link!("mfplat.dll" "system" fn MFTUnregisterLocal(pclassfactory : * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { MFTUnregisterLocal(pclassfactory.param().abi()).ok() }
}
#[inline]
pub unsafe fn MFTUnregisterLocalByCLSID(clsidmft: windows_core::GUID) -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFTUnregisterLocalByCLSID(clsidmft : windows_core::GUID) -> windows_core::HRESULT);
unsafe { MFTUnregisterLocalByCLSID(core::mem::transmute(clsidmft)).ok() }
}
#[inline]
pub unsafe fn MFTranscodeGetAudioOutputAvailableTypes<P2>(guidsubtype: *const windows_core::GUID, dwmftflags: u32, pcodecconfig: P2) -> windows_core::Result<IMFCollection>
where
P2: windows_core::Param<IMFAttributes>,
{
windows_core::link!("mf.dll" "system" fn MFTranscodeGetAudioOutputAvailableTypes(guidsubtype : *const windows_core::GUID, dwmftflags : u32, pcodecconfig : * mut core::ffi::c_void, ppavailabletypes : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFTranscodeGetAudioOutputAvailableTypes(guidsubtype, dwmftflags, pcodecconfig.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFUnlockDXGIDeviceManager() -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFUnlockDXGIDeviceManager() -> windows_core::HRESULT);
unsafe { MFUnlockDXGIDeviceManager().ok() }
}
#[inline]
pub unsafe fn MFUnlockPlatform() -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFUnlockPlatform() -> windows_core::HRESULT);
unsafe { MFUnlockPlatform().ok() }
}
#[inline]
pub unsafe fn MFUnlockWorkQueue(dwworkqueue: u32) -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFUnlockWorkQueue(dwworkqueue : u32) -> windows_core::HRESULT);
unsafe { MFUnlockWorkQueue(dwworkqueue).ok() }
}
#[inline]
pub unsafe fn MFUnregisterPlatformFromMMCSS() -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFUnregisterPlatformFromMMCSS() -> windows_core::HRESULT);
unsafe { MFUnregisterPlatformFromMMCSS().ok() }
}
#[inline]
pub unsafe fn MFUnwrapMediaType<P0>(pwrap: P0) -> windows_core::Result<IMFMediaType>
where
P0: windows_core::Param<IMFMediaType>,
{
windows_core::link!("mfplat.dll" "system" fn MFUnwrapMediaType(pwrap : * mut core::ffi::c_void, pporig : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFUnwrapMediaType(pwrap.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFValidateMediaTypeSize(formattype: windows_core::GUID, pblock: Option<&[u8]>) -> windows_core::Result<()> {
windows_core::link!("mfplat.dll" "system" fn MFValidateMediaTypeSize(formattype : windows_core::GUID, pblock : *const u8, cbsize : u32) -> windows_core::HRESULT);
unsafe { MFValidateMediaTypeSize(core::mem::transmute(formattype), core::mem::transmute(pblock.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pblock.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() }
}
#[inline]
pub unsafe fn MFWrapMediaType<P0>(porig: P0, majortype: *const windows_core::GUID, subtype: *const windows_core::GUID) -> windows_core::Result<IMFMediaType>
where
P0: windows_core::Param<IMFMediaType>,
{
windows_core::link!("mfplat.dll" "system" fn MFWrapMediaType(porig : * mut core::ffi::c_void, majortype : *const windows_core::GUID, subtype : *const windows_core::GUID, ppwrap : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
MFWrapMediaType(porig.param().abi(), majortype, subtype, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn MFllMulDiv(a: i64, b: i64, c: i64, d: i64) -> i64 {
windows_core::link!("mfplat.dll" "system" fn MFllMulDiv(a : i64, b : i64, c : i64, d : i64) -> i64);
unsafe { MFllMulDiv(a, b, c, d) }
}
#[inline]
pub unsafe fn OPMGetVideoOutputForTarget(padapterluid: *const super::super::Foundation::LUID, vidpntarget: u32, vos: OPM_VIDEO_OUTPUT_SEMANTICS) -> windows_core::Result<IOPMVideoOutput> {
windows_core::link!("dxva2.dll" "system" fn OPMGetVideoOutputForTarget(padapterluid : *const super::super::Foundation:: LUID, vidpntarget : u32, vos : OPM_VIDEO_OUTPUT_SEMANTICS, ppopmvideooutput : *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
OPMGetVideoOutputForTarget(padapterluid, vidpntarget, vos, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Win32_Graphics_Gdi")]
#[inline]
pub unsafe fn OPMGetVideoOutputsFromHMONITOR(hmonitor: super::super::Graphics::Gdi::HMONITOR, vos: OPM_VIDEO_OUTPUT_SEMANTICS, pulnumvideooutputs: *mut u32, pppopmvideooutputarray: *mut *mut Option<IOPMVideoOutput>) -> windows_core::Result<()> {
windows_core::link!("dxva2.dll" "system" fn OPMGetVideoOutputsFromHMONITOR(hmonitor : super::super::Graphics::Gdi:: HMONITOR, vos : OPM_VIDEO_OUTPUT_SEMANTICS, pulnumvideooutputs : *mut u32, pppopmvideooutputarray : *mut *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { OPMGetVideoOutputsFromHMONITOR(hmonitor, vos, pulnumvideooutputs as _, pppopmvideooutputarray as _).ok() }
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
#[inline]
pub unsafe fn OPMGetVideoOutputsFromIDirect3DDevice9Object<P0>(pdirect3ddevice9: P0, vos: OPM_VIDEO_OUTPUT_SEMANTICS, pulnumvideooutputs: *mut u32, pppopmvideooutputarray: *mut *mut Option<IOPMVideoOutput>) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Graphics::Direct3D9::IDirect3DDevice9>,
{
windows_core::link!("dxva2.dll" "system" fn OPMGetVideoOutputsFromIDirect3DDevice9Object(pdirect3ddevice9 : * mut core::ffi::c_void, vos : OPM_VIDEO_OUTPUT_SEMANTICS, pulnumvideooutputs : *mut u32, pppopmvideooutputarray : *mut *mut * mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe { OPMGetVideoOutputsFromIDirect3DDevice9Object(pdirect3ddevice9.param().abi(), vos, pulnumvideooutputs as _, pppopmvideooutputarray as _).ok() }
}
#[inline]
pub unsafe fn OPMXboxEnableHDCP(hdcptype: OPM_HDCP_TYPE) -> windows_core::Result<()> {
windows_core::link!("opmxbox.dll" "system" fn OPMXboxEnableHDCP(hdcptype : OPM_HDCP_TYPE) -> windows_core::HRESULT);
unsafe { OPMXboxEnableHDCP(hdcptype).ok() }
}
#[inline]
pub unsafe fn OPMXboxGetHDCPStatus(phdcpstatus: *mut OPM_HDCP_STATUS) -> windows_core::Result<()> {
windows_core::link!("opmxbox.dll" "system" fn OPMXboxGetHDCPStatus(phdcpstatus : *mut OPM_HDCP_STATUS) -> windows_core::HRESULT);
unsafe { OPMXboxGetHDCPStatus(phdcpstatus as _).ok() }
}
#[inline]
pub unsafe fn OPMXboxGetHDCPStatusAndType(phdcpstatus: *mut OPM_HDCP_STATUS, phdcptype: *mut OPM_HDCP_TYPE) -> windows_core::Result<()> {
windows_core::link!("opmxbox.dll" "system" fn OPMXboxGetHDCPStatusAndType(phdcpstatus : *mut OPM_HDCP_STATUS, phdcptype : *mut OPM_HDCP_TYPE) -> windows_core::HRESULT);
unsafe { OPMXboxGetHDCPStatusAndType(phdcpstatus as _, phdcptype as _).ok() }
}
pub const AACMFTEncoder: windows_core::GUID = windows_core::GUID::from_u128(0x93af0c51_2275_45d2_a35b_f2ba21caed00);
pub const ACCESSMODE_READ: FILE_ACCESSMODE = FILE_ACCESSMODE(1i32);
pub const ACCESSMODE_READWRITE: FILE_ACCESSMODE = FILE_ACCESSMODE(3i32);
pub const ACCESSMODE_WRITE: FILE_ACCESSMODE = FILE_ACCESSMODE(2i32);
pub const ACCESSMODE_WRITE_EXCLUSIVE: FILE_ACCESSMODE = FILE_ACCESSMODE(4i32);
pub const ADAPTIVE_ARRAY_AND_AEC: AEC_SYSTEM_MODE = AEC_SYSTEM_MODE(3i32);
pub const ADAPTIVE_ARRAY_ONLY: AEC_SYSTEM_MODE = AEC_SYSTEM_MODE(1i32);
pub const AEC_CAPTURE_STREAM: AEC_INPUT_STREAM = AEC_INPUT_STREAM(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct AEC_INPUT_STREAM(pub i32);
pub const AEC_MAX_SYSTEM_MODES: u32 = 6u32;
pub const AEC_REFERENCE_STREAM: AEC_INPUT_STREAM = AEC_INPUT_STREAM(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct AEC_SYSTEM_MODE(pub i32);
pub const AEC_VAD_DISABLED: AEC_VAD_MODE = AEC_VAD_MODE(0i32);
pub const AEC_VAD_FOR_AGC: AEC_VAD_MODE = AEC_VAD_MODE(2i32);
pub const AEC_VAD_FOR_SILENCE_SUPPRESSION: AEC_VAD_MODE = AEC_VAD_MODE(3i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct AEC_VAD_MODE(pub i32);
pub const AEC_VAD_NORMAL: AEC_VAD_MODE = AEC_VAD_MODE(1i32);
pub const ALawCodecWrapper: windows_core::GUID = windows_core::GUID::from_u128(0x36cb6e0c_78c1_42b2_9943_846262f31786);
pub const AMMPEG2_27MhzTimebase: MPEG2VIDEOINFO_FLAGS = MPEG2VIDEOINFO_FLAGS(256u32);
pub const AMMPEG2_DSS_UserData: MPEG2VIDEOINFO_FLAGS = MPEG2VIDEOINFO_FLAGS(64u32);
pub const AMMPEG2_DVB_UserData: MPEG2VIDEOINFO_FLAGS = MPEG2VIDEOINFO_FLAGS(128u32);
pub const AMMPEG2_DVDLine21Field1: MPEG2VIDEOINFO_FLAGS = MPEG2VIDEOINFO_FLAGS(2u32);
pub const AMMPEG2_DVDLine21Field2: MPEG2VIDEOINFO_FLAGS = MPEG2VIDEOINFO_FLAGS(4u32);
pub const AMMPEG2_DoPanScan: MPEG2VIDEOINFO_FLAGS = MPEG2VIDEOINFO_FLAGS(1u32);
pub const AMMPEG2_FilmCameraMode: MPEG2VIDEOINFO_FLAGS = MPEG2VIDEOINFO_FLAGS(16u32);
pub const AMMPEG2_LetterboxAnalogOut: MPEG2VIDEOINFO_FLAGS = MPEG2VIDEOINFO_FLAGS(32u32);
pub const AMMPEG2_SourceIsLetterboxed: MPEG2VIDEOINFO_FLAGS = MPEG2VIDEOINFO_FLAGS(8u32);
pub const AMMPEG2_WidescreenAnalogOut: MPEG2VIDEOINFO_FLAGS = MPEG2VIDEOINFO_FLAGS(512u32);
pub const AMPROPSETID_Pin: windows_core::GUID = windows_core::GUID::from_u128(0x9b00f101_1567_11d1_b3f1_00aa003761c5);
#[repr(C)]
#[derive(Clone, Debug, PartialEq)]
pub struct AM_MEDIA_TYPE {
pub majortype: windows_core::GUID,
pub subtype: windows_core::GUID,
pub bFixedSizeSamples: windows_core::BOOL,
pub bTemporalCompression: windows_core::BOOL,
pub lSampleSize: u32,
pub formattype: windows_core::GUID,
pub pUnk: core::mem::ManuallyDrop<Option<windows_core::IUnknown>>,
pub cbFormat: u32,
pub pbFormat: *mut u8,
}
impl Default for AM_MEDIA_TYPE {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const AM_MEDIA_TYPE_REPRESENTATION: windows_core::GUID = windows_core::GUID::from_u128(0xe2e42ad2_132c_491e_a268_3c7c2dca181f);
#[repr(C, packed(1))]
#[derive(Clone, Copy, Default)]
pub struct ASF_FLAT_PICTURE {
pub bPictureType: u8,
pub dwDataLen: u32,
}
#[repr(C, packed(1))]
#[derive(Clone, Copy, Default)]
pub struct ASF_FLAT_SYNCHRONISED_LYRICS {
pub bTimeStampFormat: u8,
pub bContentType: u8,
pub dwLyricsLen: u32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct ASF_INDEX_DESCRIPTOR {
pub Identifier: ASF_INDEX_IDENTIFIER,
pub cPerEntryBytes: u16,
pub szDescription: [u16; 32],
pub dwInterval: u32,
}
impl Default for ASF_INDEX_DESCRIPTOR {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct ASF_INDEX_IDENTIFIER {
pub guidIndexType: windows_core::GUID,
pub wStreamNumber: u16,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct ASF_MUX_STATISTICS {
pub cFramesWritten: u32,
pub cFramesDropped: u32,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct ASF_SELECTION_STATUS(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct ASF_STATUSFLAGS(pub i32);
pub const ASF_STATUSFLAGS_INCOMPLETE: ASF_STATUSFLAGS = ASF_STATUSFLAGS(1i32);
pub const ASF_STATUSFLAGS_NONFATAL_ERROR: ASF_STATUSFLAGS = ASF_STATUSFLAGS(2i32);
pub const ASF_STATUS_ALLDATAUNITS: ASF_SELECTION_STATUS = ASF_SELECTION_STATUS(2i32);
pub const ASF_STATUS_CLEANPOINTSONLY: ASF_SELECTION_STATUS = ASF_SELECTION_STATUS(1i32);
pub const ASF_STATUS_NOTSELECTED: ASF_SELECTION_STATUS = ASF_SELECTION_STATUS(0i32);
pub const AVENC_H263V_LEVELCOUNT: u32 = 8u32;
pub const AVENC_H264V_LEVELCOUNT: u32 = 16u32;
pub const AVENC_H264V_MAX_MBBITS: u32 = 3200u32;
pub const AVEncAudioInputContent_Music: eAVEncAudioInputContent = eAVEncAudioInputContent(2i32);
pub const AVEncAudioInputContent_Unknown: eAVEncAudioInputContent = eAVEncAudioInputContent(0i32);
pub const AVEncAudioInputContent_Voice: eAVEncAudioInputContent = eAVEncAudioInputContent(1i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct AecQualityMetrics_Struct {
pub i64Timestamp: i64,
pub ConvergenceFlag: u8,
pub MicClippedFlag: u8,
pub MicSilenceFlag: u8,
pub PstvFeadbackFlag: u8,
pub SpkClippedFlag: u8,
pub SpkMuteFlag: u8,
pub GlitchFlag: u8,
pub DoubleTalkFlag: u8,
pub uGlitchCount: u32,
pub uMicClipCount: u32,
pub fDuration: f32,
pub fTSVariance: f32,
pub fTSDriftRate: f32,
pub fVoiceLevel: f32,
pub fNoiseLevel: f32,
pub fERLE: f32,
pub fAvgERLE: f32,
pub dwReserved: u32,
}
pub const CAC3DecMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0x03d7c802_ecfa_47d9_b268_5fb3e310dee4);
pub const CAPTION_FORMAT_ATSC: windows_core::GUID = windows_core::GUID::from_u128(0x3ed9cb31_fd10_4ade_bccc_fb9105d2f3ef);
pub const CAPTION_FORMAT_DIRECTV: windows_core::GUID = windows_core::GUID::from_u128(0xe9ca1ce7_915e_47be_9bb9_bf1d8a13a5ec);
pub const CAPTION_FORMAT_DVB: windows_core::GUID = windows_core::GUID::from_u128(0x12230db4_ff2a_447e_bb88_6841c416d068);
pub const CAPTION_FORMAT_ECHOSTAR: windows_core::GUID = windows_core::GUID::from_u128(0xebb1a262_1158_4b99_ae80_92ac776952c4);
pub const CClusterDetectorDmo: windows_core::GUID = windows_core::GUID::from_u128(0x36e820c4_165a_4521_863c_619e1160d4d4);
pub const CColorControlDmo: windows_core::GUID = windows_core::GUID::from_u128(0x798059f0_89ca_4160_b325_aeb48efe4f9a);
pub const CColorConvertDMO: windows_core::GUID = windows_core::GUID::from_u128(0x98230571_0087_4204_b020_3282538e57d3);
pub const CColorLegalizerDmo: windows_core::GUID = windows_core::GUID::from_u128(0xfdfaa753_e48e_4e33_9c74_98a27fc6726a);
pub const CDTVAudDecoderDS: windows_core::GUID = windows_core::GUID::from_u128(0x8e269032_fe03_4753_9b17_18253c21722e);
pub const CDTVVidDecoderDS: windows_core::GUID = windows_core::GUID::from_u128(0x64777dc8_4e24_4beb_9d19_60a35be1daaf);
pub const CDVDecoderMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0xe54709c5_1e17_4c8d_94e7_478940433584);
pub const CDVEncoderMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0xc82ae729_c327_4cce_914d_8171fefebefb);
pub const CDeColorConvMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0x49034c05_f43c_400f_84c1_90a683195a3a);
pub const CFrameInterpDMO: windows_core::GUID = windows_core::GUID::from_u128(0x0a7cfe1b_6ab5_4334_9ed8_3f97cb37daa1);
pub const CFrameRateConvertDmo: windows_core::GUID = windows_core::GUID::from_u128(0x01f36ce2_0907_4d8b_979d_f151be91c883);
pub const CInterlaceMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0xb5a89c80_4901_407b_9abc_90d9a644bb46);
pub const CLSID_ACMWrapper: windows_core::GUID = windows_core::GUID::from_u128(0x6a08cf80_0e18_11cf_a24d_0020afd79767);
pub const CLSID_ATSCNetworkPropertyPage: windows_core::GUID = windows_core::GUID::from_u128(0xe3444d16_5ac4_4386_88df_13fd230e1dda);
pub const CLSID_ATSCNetworkProvider: windows_core::GUID = windows_core::GUID::from_u128(0x0dad2fdd_5fd7_11d3_8f50_00c04f7971e2);
pub const CLSID_AVICo: windows_core::GUID = windows_core::GUID::from_u128(0xd76e2820_1563_11cf_ac98_00aa004c0fa9);
pub const CLSID_AVIDec: windows_core::GUID = windows_core::GUID::from_u128(0xcf49d4e0_1115_11ce_b03a_0020af0ba770);
pub const CLSID_AVIDoc: windows_core::GUID = windows_core::GUID::from_u128(0xd3588ab0_0781_11ce_b03a_0020af0ba770);
pub const CLSID_AVIDraw: windows_core::GUID = windows_core::GUID::from_u128(0xa888df60_1e90_11cf_ac98_00aa004c0fa9);
pub const CLSID_AVIMIDIRender: windows_core::GUID = windows_core::GUID::from_u128(0x07b65360_c445_11ce_afde_00aa006c14f4);
pub const CLSID_ActiveMovieCategories: windows_core::GUID = windows_core::GUID::from_u128(0xda4e3da0_d07d_11d0_bd50_00a0c911ce86);
pub const CLSID_AllocPresenter: windows_core::GUID = windows_core::GUID::from_u128(0x99d54f63_1a69_41ae_aa4d_c976eb3f0713);
pub const CLSID_AllocPresenterDDXclMode: windows_core::GUID = windows_core::GUID::from_u128(0x4444ac9e_242e_471b_a3c7_45dcd46352bc);
pub const CLSID_AnalogVideoDecoderPropertyPage: windows_core::GUID = windows_core::GUID::from_u128(0x71f96466_78f3_11d0_a18c_00a0c9118956);
pub const CLSID_AsyncReader: windows_core::GUID = windows_core::GUID::from_u128(0xe436ebb5_524f_11ce_9f53_0020af0ba770);
pub const CLSID_AudioCompressorCategory: windows_core::GUID = windows_core::GUID::from_u128(0x33d9a761_90c8_11d0_bd43_00a0c911ce86);
pub const CLSID_AudioInputDeviceCategory: windows_core::GUID = windows_core::GUID::from_u128(0x33d9a762_90c8_11d0_bd43_00a0c911ce86);
pub const CLSID_AudioInputMixerProperties: windows_core::GUID = windows_core::GUID::from_u128(0x2ca8ca52_3c3f_11d2_b73d_00c04fb6bd3d);
pub const CLSID_AudioProperties: windows_core::GUID = windows_core::GUID::from_u128(0x05589faf_c356_11ce_bf01_00aa0055595a);
pub const CLSID_AudioRecord: windows_core::GUID = windows_core::GUID::from_u128(0xe30629d2_27e5_11ce_875d_00608cb78066);
pub const CLSID_AudioRender: windows_core::GUID = windows_core::GUID::from_u128(0xe30629d1_27e5_11ce_875d_00608cb78066);
pub const CLSID_AudioRendererAdvancedProperties: windows_core::GUID = windows_core::GUID::from_u128(0x37e92a92_d9aa_11d2_bf84_8ef2b1555aed);
pub const CLSID_AudioRendererCategory: windows_core::GUID = windows_core::GUID::from_u128(0xe0f158e1_cb04_11d0_bd4e_00a0c911ce86);
pub const CLSID_AudioResamplerMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0xf447b69e_1884_4a7e_8055_346f74d6edb3);
pub const CLSID_AviDest: windows_core::GUID = windows_core::GUID::from_u128(0xe2510970_f137_11ce_8b67_00aa00a3f1a6);
pub const CLSID_AviMuxProptyPage: windows_core::GUID = windows_core::GUID::from_u128(0xc647b5c0_157c_11d0_bd23_00a0c911ce86);
pub const CLSID_AviMuxProptyPage1: windows_core::GUID = windows_core::GUID::from_u128(0x0a9ae910_85c0_11d0_bd42_00a0c911ce86);
pub const CLSID_AviReader: windows_core::GUID = windows_core::GUID::from_u128(0x1b544c21_fd0b_11ce_8c63_00aa0044b51e);
pub const CLSID_AviSplitter: windows_core::GUID = windows_core::GUID::from_u128(0x1b544c20_fd0b_11ce_8c63_00aa0044b51e);
pub const CLSID_CAcmCoClassManager: windows_core::GUID = windows_core::GUID::from_u128(0x33d9a761_90c8_11d0_bd43_00a0c911ce86);
pub const CLSID_CAsfTocParser: windows_core::GUID = windows_core::GUID::from_u128(0x9b77c0f2_8735_46c5_b90f_5f0b303ef6ab);
pub const CLSID_CAviTocParser: windows_core::GUID = windows_core::GUID::from_u128(0x3adce5cc_13c8_4573_b328_ed438eb694f9);
pub const CLSID_CCAFilter: windows_core::GUID = windows_core::GUID::from_u128(0x3d07a539_35ca_447c_9b05_8d85ce924f9e);
pub const CLSID_CClusterDetectorEx: windows_core::GUID = windows_core::GUID::from_u128(0x47354492_827e_4b8a_b318_c80eba1381f0);
pub const CLSID_CDeviceMoniker: windows_core::GUID = windows_core::GUID::from_u128(0x4315d437_5b8c_11d0_bd3b_00a0c911ce86);
pub const CLSID_CFileClient: windows_core::GUID = windows_core::GUID::from_u128(0xbfccd195_1244_4840_ab44_480975c4ffe4);
pub const CLSID_CFileIo: windows_core::GUID = windows_core::GUID::from_u128(0x11993195_1244_4840_ab44_480975c4ffe4);
pub const CLSID_CIcmCoClassManager: windows_core::GUID = windows_core::GUID::from_u128(0x33d9a760_90c8_11d0_bd43_00a0c911ce86);
pub const CLSID_CMidiOutClassManager: windows_core::GUID = windows_core::GUID::from_u128(0x4efe2452_168a_11d1_bc76_00c04fb9453b);
pub const CLSID_CMpegAudioCodec: windows_core::GUID = windows_core::GUID::from_u128(0x4a2286e0_7bef_11ce_9bd9_0000e202599c);
pub const CLSID_CMpegVideoCodec: windows_core::GUID = windows_core::GUID::from_u128(0xfeb50740_7bef_11ce_9bd9_0000e202599c);
pub const CLSID_CQzFilterClassManager: windows_core::GUID = windows_core::GUID::from_u128(0x083863f1_70de_11d0_bd40_00a0c911ce86);
pub const CLSID_CToc: windows_core::GUID = windows_core::GUID::from_u128(0x4fe24495_28ce_4920_a4c4_e556e1f0df2a);
pub const CLSID_CTocCollection: windows_core::GUID = windows_core::GUID::from_u128(0x5058292d_a244_4840_ab44_480975c4ffe4);
pub const CLSID_CTocEntry: windows_core::GUID = windows_core::GUID::from_u128(0xf22f5e05_585c_4def_8523_6555cfbc0cb3);
pub const CLSID_CTocEntryList: windows_core::GUID = windows_core::GUID::from_u128(0x3a8cccbc_0efd_43a3_b838_f38a552ba237);
pub const CLSID_CTocParser: windows_core::GUID = windows_core::GUID::from_u128(0x499eaeea_2737_4849_8bb6_47f107eaf358);
pub const CLSID_CVidCapClassManager: windows_core::GUID = windows_core::GUID::from_u128(0x860bb310_5d01_11d0_bd3b_00a0c911ce86);
pub const CLSID_CWaveOutClassManager: windows_core::GUID = windows_core::GUID::from_u128(0xe0f158e1_cb04_11d0_bd4e_00a0c911ce86);
pub const CLSID_CWaveinClassManager: windows_core::GUID = windows_core::GUID::from_u128(0x33d9a762_90c8_11d0_bd43_00a0c911ce86);
pub const CLSID_CameraConfigurationManager: windows_core::GUID = windows_core::GUID::from_u128(0x6c92b540_5854_4a17_92b6_ac89c96e9683);
pub const CLSID_CameraControlPropertyPage: windows_core::GUID = windows_core::GUID::from_u128(0x71f96465_78f3_11d0_a18c_00a0c9118956);
pub const CLSID_CaptionsFilter: windows_core::GUID = windows_core::GUID::from_u128(0x2f7ee4b6_6ff5_4eb4_b24a_2bfc41117171);
pub const CLSID_CaptureGraphBuilder: windows_core::GUID = windows_core::GUID::from_u128(0xbf87b6e0_8c27_11d0_b3f0_00aa003761c5);
pub const CLSID_CaptureGraphBuilder2: windows_core::GUID = windows_core::GUID::from_u128(0xbf87b6e1_8c27_11d0_b3f0_00aa003761c5);
pub const CLSID_CaptureProperties: windows_core::GUID = windows_core::GUID::from_u128(0x1b544c22_fd0b_11ce_8c63_00aa0044b51f);
pub const CLSID_Colour: windows_core::GUID = windows_core::GUID::from_u128(0x1643e180_90f5_11ce_97d5_00aa0055595a);
pub const CLSID_CreateMediaExtensionObject: windows_core::GUID = windows_core::GUID::from_u128(0xef65a54d_0788_45b8_8b14_bc0f6a6b5137);
pub const CLSID_CrossbarFilterPropertyPage: windows_core::GUID = windows_core::GUID::from_u128(0x71f96461_78f3_11d0_a18c_00a0c9118956);
pub const CLSID_DShowTVEFilter: windows_core::GUID = windows_core::GUID::from_u128(0x05500280_faa5_4df9_8246_bfc23ac5cea8);
pub const CLSID_DSoundRender: windows_core::GUID = windows_core::GUID::from_u128(0x79376820_07d0_11cf_a24d_0020afd79767);
pub const CLSID_DVBCNetworkProvider: windows_core::GUID = windows_core::GUID::from_u128(0xdc0c0fe7_0485_4266_b93f_68fbf80ed834);
pub const CLSID_DVBSNetworkProvider: windows_core::GUID = windows_core::GUID::from_u128(0xfa4b375a_45b4_4d45_8440_263957b11623);
pub const CLSID_DVBTNetworkProvider: windows_core::GUID = windows_core::GUID::from_u128(0x216c62df_6d7f_4e9a_8571_05f14edb766a);
pub const CLSID_DVDHWDecodersCategory: windows_core::GUID = windows_core::GUID::from_u128(0x2721ae20_7e70_11d0_a5d6_28db04c10000);
pub const CLSID_DVDNavigator: windows_core::GUID = windows_core::GUID::from_u128(0x9b8c4620_2c1a_11d0_8493_00a02438ad48);
pub const CLSID_DVDState: windows_core::GUID = windows_core::GUID::from_u128(0xf963c5cf_a659_4a93_9638_caf3cd277d13);
pub const CLSID_DVDecPropertiesPage: windows_core::GUID = windows_core::GUID::from_u128(0x101193c0_0bfe_11d0_af91_00aa00b67a42);
pub const CLSID_DVEncPropertiesPage: windows_core::GUID = windows_core::GUID::from_u128(0x4150f050_bb6f_11d0_afb9_00aa00b67a42);
pub const CLSID_DVMux: windows_core::GUID = windows_core::GUID::from_u128(0x129d7e40_c10d_11d0_afb9_00aa00b67a42);
pub const CLSID_DVMuxPropertyPage: windows_core::GUID = windows_core::GUID::from_u128(0x4db880e0_c10d_11d0_afb9_00aa00b67a42);
pub const CLSID_DVSplitter: windows_core::GUID = windows_core::GUID::from_u128(0x4eb31670_9fc6_11cf_af6e_00aa00b67a42);
pub const CLSID_DVVideoCodec: windows_core::GUID = windows_core::GUID::from_u128(0xb1b77c00_c3e4_11cf_af79_00aa00b67a42);
pub const CLSID_DVVideoEnc: windows_core::GUID = windows_core::GUID::from_u128(0x13aa3650_bb6f_11d0_afb9_00aa00b67a42);
pub const CLSID_DeviceControlCategory: windows_core::GUID = windows_core::GUID::from_u128(0xcc7bfb46_f175_11d1_a392_00e0291f3959);
pub const CLSID_DirectDrawProperties: windows_core::GUID = windows_core::GUID::from_u128(0x944d4c00_dd52_11ce_bf0e_00aa0055595a);
pub const CLSID_DirectShowPluginControl: windows_core::GUID = windows_core::GUID::from_u128(0x8670c736_f614_427b_8ada_bbadc587194b);
pub const CLSID_Dither: windows_core::GUID = windows_core::GUID::from_u128(0x1da08500_9edc_11cf_bc10_00aa00ac74f6);
pub const CLSID_DtvCcFilter: windows_core::GUID = windows_core::GUID::from_u128(0xfb056ba0_2502_45b9_8e86_2b40de84ad29);
pub const CLSID_DvdGraphBuilder: windows_core::GUID = windows_core::GUID::from_u128(0xfcc152b7_f372_11d0_8e00_00c04fd7c08b);
pub const CLSID_EVRPlaybackPipelineOptimizer: windows_core::GUID = windows_core::GUID::from_u128(0x62079164_233b_41f8_a80f_f01705f514a8);
pub const CLSID_EVRTearlessWindowPresenter9: windows_core::GUID = windows_core::GUID::from_u128(0xa0a7a57b_59b2_4919_a694_add0a526c373);
pub const CLSID_EnhancedVideoRenderer: windows_core::GUID = windows_core::GUID::from_u128(0xfa10746c_9b63_4b6c_bc49_fc300ea5f256);
pub const CLSID_FGControl: windows_core::GUID = windows_core::GUID::from_u128(0xe436ebb4_524f_11ce_9f53_0020af0ba770);
pub const CLSID_FileSource: windows_core::GUID = windows_core::GUID::from_u128(0x701722e0_8ae3_11ce_a85c_00aa002feab5);
pub const CLSID_FileWriter: windows_core::GUID = windows_core::GUID::from_u128(0x8596e5f0_0da5_11d0_bd21_00a0c911ce86);
pub const CLSID_FilterGraph: windows_core::GUID = windows_core::GUID::from_u128(0xe436ebb3_524f_11ce_9f53_0020af0ba770);
pub const CLSID_FilterGraphNoThread: windows_core::GUID = windows_core::GUID::from_u128(0xe436ebb8_524f_11ce_9f53_0020af0ba770);
pub const CLSID_FilterGraphPrivateThread: windows_core::GUID = windows_core::GUID::from_u128(0xa3ecbc41_581a_4476_b693_a63340462d8b);
pub const CLSID_FilterMapper: windows_core::GUID = windows_core::GUID::from_u128(0xe436ebb2_524f_11ce_9f53_0020af0ba770);
pub const CLSID_FilterMapper2: windows_core::GUID = windows_core::GUID::from_u128(0xcda42200_bd88_11d0_bd4e_00a0c911ce86);
pub const CLSID_FrameServerNetworkCameraSource: windows_core::GUID = windows_core::GUID::from_u128(0x7a213aa7_866f_414a_8c1a_275c7283a395);
pub const CLSID_HttpSchemePlugin: windows_core::GUID = windows_core::GUID::from_u128(0x44cb442b_9da9_49df_b3fd_023777b16e50);
pub const CLSID_ICodecAPIProxy: windows_core::GUID = windows_core::GUID::from_u128(0x7ff0997a_1999_4286_a73c_622b8814e7eb);
pub const CLSID_IVideoEncoderCodecAPIProxy: windows_core::GUID = windows_core::GUID::from_u128(0xb05dabd9_56e5_4fdc_afa4_8a47e91f1c9c);
pub const CLSID_IVideoEncoderProxy: windows_core::GUID = windows_core::GUID::from_u128(0xb43c4eec_8c32_4791_9102_508ada5ee8e7);
pub const CLSID_InfTee: windows_core::GUID = windows_core::GUID::from_u128(0xf8388a40_d5bb_11d0_be5a_0080c706568e);
pub const CLSID_LegacyAmFilterCategory: windows_core::GUID = windows_core::GUID::from_u128(0x083863f1_70de_11d0_bd40_00a0c911ce86);
pub const CLSID_Line21Decoder: windows_core::GUID = windows_core::GUID::from_u128(0x6e8d4a20_310c_11d0_b79a_00aa003767a7);
pub const CLSID_Line21Decoder2: windows_core::GUID = windows_core::GUID::from_u128(0xe4206432_01a1_4bee_b3e1_3702c8edc574);
pub const CLSID_MFByteStreamProxyClassFactory: windows_core::GUID = windows_core::GUID::from_u128(0x770e8e77_4916_441c_a9a7_b342d0eebc71);
pub const CLSID_MFCaptureEngine: windows_core::GUID = windows_core::GUID::from_u128(0xefce38d3_8914_4674_a7df_ae1b3d654b8a);
pub const CLSID_MFCaptureEngineClassFactory: windows_core::GUID = windows_core::GUID::from_u128(0xefce38d3_8914_4674_a7df_ae1b3d654b8a);
pub const CLSID_MFImageSharingEngineClassFactory: windows_core::GUID = windows_core::GUID::from_u128(0xb22c3339_87f3_4059_a0c5_037aa9707eaf);
pub const CLSID_MFMediaEngineClassFactory: windows_core::GUID = windows_core::GUID::from_u128(0xb44392da_499b_446b_a4cb_005fead0e6d5);
pub const CLSID_MFMediaSharingEngineClassFactory: windows_core::GUID = windows_core::GUID::from_u128(0xf8e307fb_6d45_4ad3_9993_66cd5a529659);
pub const CLSID_MFReadWriteClassFactory: windows_core::GUID = windows_core::GUID::from_u128(0x48e2ed0f_98c2_4a37_bed5_166312ddd83f);
pub const CLSID_MFSinkWriter: windows_core::GUID = windows_core::GUID::from_u128(0xa3bbfb17_8273_4e52_9e0e_9739dc887990);
pub const CLSID_MFSourceReader: windows_core::GUID = windows_core::GUID::from_u128(0x1777133c_0881_411b_a577_ad545f0714c4);
pub const CLSID_MFSourceResolver: windows_core::GUID = windows_core::GUID::from_u128(0x90eab60f_e43a_4188_bcc4_e47fdf04868c);
pub const CLSID_MFVideoMixer9: windows_core::GUID = windows_core::GUID::from_u128(0xe474e05a_ab65_4f6a_827c_218b1baaf31f);
pub const CLSID_MFVideoPresenter9: windows_core::GUID = windows_core::GUID::from_u128(0x98455561_5136_4d28_ab08_4cee40ea2781);
pub const CLSID_MJPGEnc: windows_core::GUID = windows_core::GUID::from_u128(0xb80ab0a0_7416_11d2_9eeb_006008039e37);
pub const CLSID_MMSPLITTER: windows_core::GUID = windows_core::GUID::from_u128(0x3ae86b20_7be8_11d1_abe6_00a0c905f375);
pub const CLSID_MOVReader: windows_core::GUID = windows_core::GUID::from_u128(0x44584800_f8ee_11ce_b2d4_00dd01101b85);
pub const CLSID_MP3DecMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0xbbeea841_0a63_4f52_a7ab_a9b3a84ed38a);
pub const CLSID_MPEG1Doc: windows_core::GUID = windows_core::GUID::from_u128(0xe4bbd160_4269_11ce_838d_00aa0055595a);
pub const CLSID_MPEG1PacketPlayer: windows_core::GUID = windows_core::GUID::from_u128(0x26c25940_4ca9_11ce_a828_00aa002feab5);
pub const CLSID_MPEG1Splitter: windows_core::GUID = windows_core::GUID::from_u128(0x336475d0_942a_11ce_a870_00aa002feab5);
pub const CLSID_MPEG2ByteStreamPlugin: windows_core::GUID = windows_core::GUID::from_u128(0x40871c59_ab40_471f_8dc3_1f259d862479);
pub const CLSID_MPEG2DLNASink: windows_core::GUID = windows_core::GUID::from_u128(0xfa5fe7c5_6a1d_4b11_b41f_f959d6c76500);
pub const CLSID_MPEG2Demultiplexer: windows_core::GUID = windows_core::GUID::from_u128(0xafb6c280_2c41_11d3_8a60_0000f81e0e4a);
pub const CLSID_MPEG2Demultiplexer_NoClock: windows_core::GUID = windows_core::GUID::from_u128(0x687d3367_3644_467a_adfe_6cd7a85c4a2c);
pub const CLSID_MSAACDecMFT: windows_core::GUID = windows_core::GUID::from_u128(0x32d186a7_218f_4c75_8876_dd77273a8999);
pub const CLSID_MSDDPlusDecMFT: windows_core::GUID = windows_core::GUID::from_u128(0x177c0afe_900b_48d4_9e4c_57add250b3d4);
pub const CLSID_MSH264DecoderMFT: windows_core::GUID = windows_core::GUID::from_u128(0x62ce7e72_4c71_4d20_b15d_452831a87d9d);
pub const CLSID_MSH264EncoderMFT: windows_core::GUID = windows_core::GUID::from_u128(0x6ca50344_051a_4ded_9779_a43305165e35);
pub const CLSID_MSH265DecoderMFT: windows_core::GUID = windows_core::GUID::from_u128(0x420a51a3_d605_430c_b4fc_45274fa6c562);
pub const CLSID_MSMPEGAudDecMFT: windows_core::GUID = windows_core::GUID::from_u128(0x70707b39_b2ca_4015_abea_f8447d22d88b);
pub const CLSID_MSMPEGDecoderMFT: windows_core::GUID = windows_core::GUID::from_u128(0x2d709e52_123f_49b5_9cbc_9af5cde28fb9);
pub const CLSID_MSOpusDecoder: windows_core::GUID = windows_core::GUID::from_u128(0x63e17c10_2d43_4c42_8fe3_8d8b63e46a6a);
pub const CLSID_MSVPxDecoder: windows_core::GUID = windows_core::GUID::from_u128(0xe3aaf548_c9a4_4c6e_234d_5ada374b0000);
pub const CLSID_MediaEncoderCategory: windows_core::GUID = windows_core::GUID::from_u128(0x7d22e920_5ca9_4787_8c2b_a6779bd11781);
pub const CLSID_MediaMultiplexerCategory: windows_core::GUID = windows_core::GUID::from_u128(0x236c9559_adce_4736_bf72_bab34e392196);
pub const CLSID_MediaPropertyBag: windows_core::GUID = windows_core::GUID::from_u128(0xcdbd8d00_c193_11d0_bd4e_00a0c911ce86);
pub const CLSID_MemoryAllocator: windows_core::GUID = windows_core::GUID::from_u128(0x1e651cc0_b199_11d0_8212_00c04fc32c45);
pub const CLSID_MidiRendererCategory: windows_core::GUID = windows_core::GUID::from_u128(0x4efe2452_168a_11d1_bc76_00c04fb9453b);
pub const CLSID_MjpegDec: windows_core::GUID = windows_core::GUID::from_u128(0x301056d0_6dff_11d2_9eeb_006008039e37);
pub const CLSID_ModexRenderer: windows_core::GUID = windows_core::GUID::from_u128(0x07167665_5011_11cf_bf33_00aa0055595a);
pub const CLSID_Mpeg2VideoStreamAnalyzer: windows_core::GUID = windows_core::GUID::from_u128(0x6cfad761_735d_4aa5_8afc_af91a7d61eba);
pub const CLSID_NetSchemePlugin: windows_core::GUID = windows_core::GUID::from_u128(0xe9f4ebab_d97b_463e_a2b1_c54ee3f9414d);
pub const CLSID_NetworkProvider: windows_core::GUID = windows_core::GUID::from_u128(0xb2f3a67c_29da_4c78_8831_091ed509a475);
pub const CLSID_OverlayMixer: windows_core::GUID = windows_core::GUID::from_u128(0xcd8743a1_3736_11d0_9e69_00c04fd7c15b);
pub const CLSID_PerformanceProperties: windows_core::GUID = windows_core::GUID::from_u128(0x59ce6880_acf8_11cf_b56e_0080c7c4b68a);
pub const CLSID_PersistMonikerPID: windows_core::GUID = windows_core::GUID::from_u128(0xe436ebb7_524f_11ce_9f53_0020af0ba770);
pub const CLSID_PlayToSourceClassFactory: windows_core::GUID = windows_core::GUID::from_u128(0xda17539a_3dc3_42c1_a749_a183b51f085e);
pub const CLSID_ProtoFilterGraph: windows_core::GUID = windows_core::GUID::from_u128(0xe436ebb0_524f_11ce_9f53_0020af0ba770);
pub const CLSID_QTDec: windows_core::GUID = windows_core::GUID::from_u128(0xfdfe9681_74a3_11d0_afa7_00aa00b67a42);
pub const CLSID_QualityProperties: windows_core::GUID = windows_core::GUID::from_u128(0x418afb70_f8b8_11ce_aac6_0020af0b99a3);
pub const CLSID_QuickTimeParser: windows_core::GUID = windows_core::GUID::from_u128(0xd51bd5a0_7548_11cf_a520_0080c77ef58a);
pub const CLSID_SBE2File: windows_core::GUID = windows_core::GUID::from_u128(0x93a094d7_51e8_485b_904a_8d6b97dc6b39);
pub const CLSID_SBE2FileScan: windows_core::GUID = windows_core::GUID::from_u128(0x3e458037_0ca6_41aa_a594_2aa6c02d709b);
pub const CLSID_SBE2MediaTypeProfile: windows_core::GUID = windows_core::GUID::from_u128(0x1f26a602_2b5c_4b63_b8e8_9ea5c1a7dc2e);
pub const CLSID_SBE2Sink: windows_core::GUID = windows_core::GUID::from_u128(0xe2448508_95da_4205_9a27_7ec81e723b1a);
pub const CLSID_SeekingPassThru: windows_core::GUID = windows_core::GUID::from_u128(0x060af76c_68dd_11d0_8fc1_00c04fd9189d);
pub const CLSID_SmartTee: windows_core::GUID = windows_core::GUID::from_u128(0xcc58e280_8aa1_11d1_b3f1_00aa003761c5);
pub const CLSID_StreamBufferComposeRecording: windows_core::GUID = windows_core::GUID::from_u128(0xd682c4ba_a90a_42fe_b9e1_03109849c423);
pub const CLSID_StreamBufferConfig: windows_core::GUID = windows_core::GUID::from_u128(0xfa8a68b2_c864_4ba2_ad53_d3876a87494b);
pub const CLSID_StreamBufferPropertyHandler: windows_core::GUID = windows_core::GUID::from_u128(0xe37a73f8_fb01_43dc_914e_aaee76095ab9);
pub const CLSID_StreamBufferRecordingAttributes: windows_core::GUID = windows_core::GUID::from_u128(0xccaa63ac_1057_4778_ae92_1206ab9acee6);
pub const CLSID_StreamBufferSink: windows_core::GUID = windows_core::GUID::from_u128(0x2db47ae5_cf39_43c2_b4d6_0cd8d90946f4);
pub const CLSID_StreamBufferSource: windows_core::GUID = windows_core::GUID::from_u128(0xc9f5fe02_f851_4eb5_99ee_ad602af1e619);
pub const CLSID_StreamBufferThumbnailHandler: windows_core::GUID = windows_core::GUID::from_u128(0x713790ee_5ee1_45ba_8070_a1337d2762fa);
pub const CLSID_SubtitlesFilter: windows_core::GUID = windows_core::GUID::from_u128(0x9f22cfea_ce07_41ab_8ba0_c7364af90af9);
pub const CLSID_SystemClock: windows_core::GUID = windows_core::GUID::from_u128(0xe436ebb1_524f_11ce_9f53_0020af0ba770);
pub const CLSID_SystemDeviceEnum: windows_core::GUID = windows_core::GUID::from_u128(0x62be5d10_60eb_11d0_bd3b_00a0c911ce86);
pub const CLSID_TVAudioFilterPropertyPage: windows_core::GUID = windows_core::GUID::from_u128(0x71f96463_78f3_11d0_a18c_00a0c9118956);
pub const CLSID_TVEFilterCCProperties: windows_core::GUID = windows_core::GUID::from_u128(0x05500282_faa5_4df9_8246_bfc23ac5cea8);
pub const CLSID_TVEFilterStatsProperties: windows_core::GUID = windows_core::GUID::from_u128(0x05500283_faa5_4df9_8246_bfc23ac5cea8);
pub const CLSID_TVEFilterTuneProperties: windows_core::GUID = windows_core::GUID::from_u128(0x05500281_faa5_4df9_8246_bfc23ac5cea8);
pub const CLSID_TVTunerFilterPropertyPage: windows_core::GUID = windows_core::GUID::from_u128(0x266eee41_6c63_11cf_8a03_00aa006ecb65);
pub const CLSID_TextRender: windows_core::GUID = windows_core::GUID::from_u128(0xe30629d3_27e5_11ce_875d_00608cb78066);
pub const CLSID_TransmitCategory: windows_core::GUID = windows_core::GUID::from_u128(0xcc7bfb41_f175_11d1_a392_00e0291f3959);
pub const CLSID_URLReader: windows_core::GUID = windows_core::GUID::from_u128(0xe436ebb6_524f_11ce_9f53_0020af0ba770);
pub const CLSID_UrlmonSchemePlugin: windows_core::GUID = windows_core::GUID::from_u128(0x9ec4b4f9_3029_45ad_947b_344de2a249e2);
pub const CLSID_VBISurfaces: windows_core::GUID = windows_core::GUID::from_u128(0x814b9800_1c88_11d1_bad9_00609744111a);
pub const CLSID_VPObject: windows_core::GUID = windows_core::GUID::from_u128(0xce292861_fc88_11d0_9e69_00c04fd7c15b);
pub const CLSID_VPVBIObject: windows_core::GUID = windows_core::GUID::from_u128(0x814b9801_1c88_11d1_bad9_00609744111a);
pub const CLSID_VfwCapture: windows_core::GUID = windows_core::GUID::from_u128(0x1b544c22_fd0b_11ce_8c63_00aa0044b51e);
pub const CLSID_VideoCompressorCategory: windows_core::GUID = windows_core::GUID::from_u128(0x33d9a760_90c8_11d0_bd43_00a0c911ce86);
pub const CLSID_VideoInputDeviceCategory: windows_core::GUID = windows_core::GUID::from_u128(0x860bb310_5d01_11d0_bd3b_00a0c911ce86);
pub const CLSID_VideoMixingRenderer: windows_core::GUID = windows_core::GUID::from_u128(0xb87beb7b_8d29_423f_ae4d_6582c10175ac);
pub const CLSID_VideoMixingRenderer9: windows_core::GUID = windows_core::GUID::from_u128(0x51b4abf3_748f_4e3b_a276_c828330e926a);
pub const CLSID_VideoPortManager: windows_core::GUID = windows_core::GUID::from_u128(0x6f26a6cd_967b_47fd_874a_7aed2c9d25a2);
pub const CLSID_VideoProcAmpPropertyPage: windows_core::GUID = windows_core::GUID::from_u128(0x71f96464_78f3_11d0_a18c_00a0c9118956);
pub const CLSID_VideoProcessorMFT: windows_core::GUID = windows_core::GUID::from_u128(0x88753b26_5b24_49bd_b2e7_0c445c78c982);
pub const CLSID_VideoRenderer: windows_core::GUID = windows_core::GUID::from_u128(0x70e102b0_5556_11ce_97c0_00aa0055595a);
pub const CLSID_VideoRendererDefault: windows_core::GUID = windows_core::GUID::from_u128(0x6bc1cffa_8fc1_4261_ac22_cfb4cc38db50);
pub const CLSID_VideoStreamConfigPropertyPage: windows_core::GUID = windows_core::GUID::from_u128(0x71f96467_78f3_11d0_a18c_00a0c9118956);
pub const CLSID_WMADecMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0x2eeb4adf_4578_4d10_bca7_bb955f56320a);
pub const CLSID_WMAsfReader: windows_core::GUID = windows_core::GUID::from_u128(0x187463a0_5bb7_11d3_acbe_0080c75e246e);
pub const CLSID_WMAsfWriter: windows_core::GUID = windows_core::GUID::from_u128(0x7c23220e_55bb_11d3_8b16_00c04fb6bd3d);
pub const CLSID_WMDRMSystemID: windows_core::GUID = windows_core::GUID::from_u128(0x8948bb22_11bd_4796_93e3_974d1b575678);
pub const CLSID_WMVDecoderMFT: windows_core::GUID = windows_core::GUID::from_u128(0x82d353df_90bd_4382_8bc2_3f6192b76e34);
pub const CLSID_WSTDecoder: windows_core::GUID = windows_core::GUID::from_u128(0x70bc06e0_5666_11d3_a184_00105aef9f33);
pub const CLSID_WstDecoderPropertyPage: windows_core::GUID = windows_core::GUID::from_u128(0x04e27f80_91e4_11d3_a184_00105aef9f33);
pub const CMP3DecMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0xbbeea841_0a63_4f52_a7ab_a9b3a84ed38a);
pub const CMPEG2AudDecoderDS: windows_core::GUID = windows_core::GUID::from_u128(0xe1f1a0b8_beee_490d_ba7c_066c40b5e2b9);
pub const CMPEG2AudioEncoderMFT: windows_core::GUID = windows_core::GUID::from_u128(0x46a4dd5c_73f8_4304_94df_308f760974f4);
pub const CMPEG2EncoderAudioDS: windows_core::GUID = windows_core::GUID::from_u128(0xacd453bc_c58a_44d1_bbf5_bfb325be2d78);
pub const CMPEG2EncoderDS: windows_core::GUID = windows_core::GUID::from_u128(0x5f5aff4a_2f7f_4279_88c2_cd88eb39d144);
pub const CMPEG2EncoderVideoDS: windows_core::GUID = windows_core::GUID::from_u128(0x42150cd9_ca9a_4ea5_9939_30ee037f6e74);
pub const CMPEG2VidDecoderDS: windows_core::GUID = windows_core::GUID::from_u128(0x212690fb_83e5_4526_8fd7_74478b7939cd);
pub const CMPEG2VideoEncoderMFT: windows_core::GUID = windows_core::GUID::from_u128(0xe6335f02_80b7_4dc4_adfa_dfe7210d20d5);
pub const CMPEGAACDecMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0x8dde1772_edad_41c3_b4be_1f30fb4ee0d6);
pub const CMSAACDecMFT: windows_core::GUID = windows_core::GUID::from_u128(0x32d186a7_218f_4c75_8876_dd77273a8999);
pub const CMSAC3Enc: windows_core::GUID = windows_core::GUID::from_u128(0xc6b400e2_20a7_4e58_a2fe_24619682ce6c);
pub const CMSALACDecMFT: windows_core::GUID = windows_core::GUID::from_u128(0xc0cd7d12_31fc_4bbc_b363_7322ee3e1879);
pub const CMSALACEncMFT: windows_core::GUID = windows_core::GUID::from_u128(0x9ab6a28c_748e_4b6a_bfff_cc443b8e8fb4);
pub const CMSDDPlusDecMFT: windows_core::GUID = windows_core::GUID::from_u128(0x177c0afe_900b_48d4_9e4c_57add250b3d4);
pub const CMSDolbyDigitalEncMFT: windows_core::GUID = windows_core::GUID::from_u128(0xac3315c9_f481_45d7_826c_0b406c1f64b8);
pub const CMSFLACDecMFT: windows_core::GUID = windows_core::GUID::from_u128(0x6b0b3e6b_a2c5_4514_8055_afe8a95242d9);
pub const CMSFLACEncMFT: windows_core::GUID = windows_core::GUID::from_u128(0x128509e9_c44e_45dc_95e9_c255b8f466a6);
pub const CMSH263EncoderMFT: windows_core::GUID = windows_core::GUID::from_u128(0xbc47fcfe_98a0_4f27_bb07_698af24f2b38);
pub const CMSH264DecoderMFT: windows_core::GUID = windows_core::GUID::from_u128(0x62ce7e72_4c71_4d20_b15d_452831a87d9d);
pub const CMSH264EncoderMFT: windows_core::GUID = windows_core::GUID::from_u128(0x6ca50344_051a_4ded_9779_a43305165e35);
pub const CMSH264RemuxMFT: windows_core::GUID = windows_core::GUID::from_u128(0x05a47ebb_8bf0_4cbf_ad2f_3b71d75866f5);
pub const CMSH265EncoderMFT: windows_core::GUID = windows_core::GUID::from_u128(0xf2f84074_8bca_40bd_9159_e880f673dd3b);
pub const CMSMPEGAudDecMFT: windows_core::GUID = windows_core::GUID::from_u128(0x70707b39_b2ca_4015_abea_f8447d22d88b);
pub const CMSMPEGDecoderMFT: windows_core::GUID = windows_core::GUID::from_u128(0x2d709e52_123f_49b5_9cbc_9af5cde28fb9);
pub const CMSOpusDecMFT: windows_core::GUID = windows_core::GUID::from_u128(0x63e17c10_2d43_4c42_8fe3_8d8b63e46a6a);
pub const CMSSCDecMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0x7bafb3b1_d8f4_4279_9253_27da423108de);
pub const CMSSCEncMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0x8cb9cc06_d139_4ae6_8bb4_41e612e141d5);
pub const CMSSCEncMediaObject2: windows_core::GUID = windows_core::GUID::from_u128(0xf7ffe0a0_a4f5_44b5_949e_15ed2bc66f9d);
pub const CMSVPXEncoderMFT: windows_core::GUID = windows_core::GUID::from_u128(0xaeb6c755_2546_4881_82cc_e15ae5ebff3d);
pub const CMSVideoDSPMFT: windows_core::GUID = windows_core::GUID::from_u128(0x51571744_7fe4_4ff2_a498_2dc34ff74f1b);
pub const CMpeg2DecMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0x863d66cd_cdce_4617_b47f_c8929cfc28a6);
pub const CMpeg43DecMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0xcba9e78b_49a3_49ea_93d4_6bcba8c4de07);
pub const CMpeg4DecMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0xf371728a_6052_4d47_827c_d039335dfe0a);
pub const CMpeg4EncMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0x24f258d8_c651_4042_93e4_ca654abb682c);
pub const CMpeg4sDecMFT: windows_core::GUID = windows_core::GUID::from_u128(0x5686a0d9_fe39_409f_9dff_3fdbc849f9f5);
pub const CMpeg4sDecMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0x2a11bae2_fe6e_4249_864b_9e9ed6e8dbc2);
pub const CMpeg4sEncMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0x6ec5a7be_d81e_4f9e_ada3_cd1bf262b6d8);
pub const CNokiaAACCCDecMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0xeabf7a6f_ccba_4d60_8620_b152cc977263);
pub const CNokiaAACDecMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0x3cb2bde4_4e29_4c44_a73e_2d7c2c46d6ec);
pub const CODECAPI_ALLSETTINGS: windows_core::GUID = windows_core::GUID::from_u128(0x6a577e92_83e1_4113_adc2_4fcec32f83a1);
pub const CODECAPI_AUDIO_ENCODER: windows_core::GUID = windows_core::GUID::from_u128(0xb9d19a3e_f897_429c_bc46_8138b7272b2d);
pub const CODECAPI_AVAudioChannelConfig: windows_core::GUID = windows_core::GUID::from_u128(0x17f89cb3_c38d_4368_9ede_63b94d177f9f);
pub const CODECAPI_AVAudioChannelCount: windows_core::GUID = windows_core::GUID::from_u128(0x1d3583c4_1583_474e_b71a_5ee463c198e4);
pub const CODECAPI_AVAudioSampleRate: windows_core::GUID = windows_core::GUID::from_u128(0x971d2723_1acb_42e7_855c_520a4b70a5f2);
pub const CODECAPI_AVDDSurroundMode: windows_core::GUID = windows_core::GUID::from_u128(0x99f2f386_98d1_4452_a163_abc78a6eb770);
pub const CODECAPI_AVDSPLoudnessEqualization: windows_core::GUID = windows_core::GUID::from_u128(0x8afd1a15_1812_4cbf_9319_433a5b2a3b27);
pub const CODECAPI_AVDSPSpeakerFill: windows_core::GUID = windows_core::GUID::from_u128(0x5612bca1_56da_4582_8da1_ca8090f92768);
pub const CODECAPI_AVDecAACDownmixMode: windows_core::GUID = windows_core::GUID::from_u128(0x01274475_f6bb_4017_b084_81a763c942d4);
pub const CODECAPI_AVDecAudioDualMono: windows_core::GUID = windows_core::GUID::from_u128(0x4a52cda8_30f8_4216_be0f_ba0b2025921d);
pub const CODECAPI_AVDecAudioDualMonoReproMode: windows_core::GUID = windows_core::GUID::from_u128(0xa5106186_cc94_4bc9_8cd9_aa2f61f6807e);
pub const CODECAPI_AVDecCommonInputFormat: windows_core::GUID = windows_core::GUID::from_u128(0xe5005239_bd89_4be3_9c0f_5dde317988cc);
pub const CODECAPI_AVDecCommonMeanBitRate: windows_core::GUID = windows_core::GUID::from_u128(0x59488217_007a_4f7a_8e41_5c48b1eac5c6);
pub const CODECAPI_AVDecCommonMeanBitRateInterval: windows_core::GUID = windows_core::GUID::from_u128(0x0ee437c6_38a7_4c5c_944c_68ab42116b85);
pub const CODECAPI_AVDecCommonOutputFormat: windows_core::GUID = windows_core::GUID::from_u128(0x3c790028_c0ce_4256_b1a2_1b0fc8b1dcdc);
pub const CODECAPI_AVDecDDDynamicRangeScaleHigh: windows_core::GUID = windows_core::GUID::from_u128(0x50196c21_1f33_4af5_b296_11426d6c8789);
pub const CODECAPI_AVDecDDDynamicRangeScaleLow: windows_core::GUID = windows_core::GUID::from_u128(0x044e62e4_11a5_42d5_a3b2_3bb2c7c2d7cf);
pub const CODECAPI_AVDecDDMatrixDecodingMode: windows_core::GUID = windows_core::GUID::from_u128(0xddc811a5_04ed_4bf3_a0ca_d00449f9355f);
pub const CODECAPI_AVDecDDOperationalMode: windows_core::GUID = windows_core::GUID::from_u128(0xd6d6c6d1_064e_4fdd_a40e_3ecbfcb7ebd0);
pub const CODECAPI_AVDecDDStereoDownMixMode: windows_core::GUID = windows_core::GUID::from_u128(0x6ce4122c_3ee9_4182_b4ae_c10fc088649d);
pub const CODECAPI_AVDecDisableVideoPostProcessing: windows_core::GUID = windows_core::GUID::from_u128(0xf8749193_667a_4f2c_a9e8_5d4af924f08f);
pub const CODECAPI_AVDecHEAACDynamicRangeControl: windows_core::GUID = windows_core::GUID::from_u128(0x287c8abe_69a4_4d39_8080_d3d9712178a0);
pub const CODECAPI_AVDecMmcssClass: windows_core::GUID = windows_core::GUID::from_u128(0xe0ad4828_df66_4893_9f33_788aa4ec4082);
pub const CODECAPI_AVDecNumWorkerThreads: windows_core::GUID = windows_core::GUID::from_u128(0x9561c3e8_ea9e_4435_9b1e_a93e691894d8);
pub const CODECAPI_AVDecSoftwareDynamicFormatChange: windows_core::GUID = windows_core::GUID::from_u128(0x862e2f0a_507b_47ff_af47_01e2624298b7);
pub const CODECAPI_AVDecVideoAcceleration_H264: windows_core::GUID = windows_core::GUID::from_u128(0xf7db8a2f_4f48_4ee8_ae31_8b6ebe558ae2);
pub const CODECAPI_AVDecVideoAcceleration_MPEG2: windows_core::GUID = windows_core::GUID::from_u128(0xf7db8a2e_4f48_4ee8_ae31_8b6ebe558ae2);
pub const CODECAPI_AVDecVideoAcceleration_VC1: windows_core::GUID = windows_core::GUID::from_u128(0xf7db8a30_4f48_4ee8_ae31_8b6ebe558ae2);
pub const CODECAPI_AVDecVideoCodecType: windows_core::GUID = windows_core::GUID::from_u128(0x434528e5_21f0_46b6_b62c_9b1b6b658cd1);
pub const CODECAPI_AVDecVideoDXVABusEncryption: windows_core::GUID = windows_core::GUID::from_u128(0x42153c8b_fd0b_4765_a462_ddd9e8bcc388);
pub const CODECAPI_AVDecVideoDXVAMode: windows_core::GUID = windows_core::GUID::from_u128(0xf758f09e_7337_4ae7_8387_73dc2d54e67d);
pub const CODECAPI_AVDecVideoDropPicWithMissingRef: windows_core::GUID = windows_core::GUID::from_u128(0xf8226383_14c2_4567_9734_5004e96ff887);
pub const CODECAPI_AVDecVideoFastDecodeMode: windows_core::GUID = windows_core::GUID::from_u128(0x6b529f7d_d3b1_49c6_a999_9ec6911bedbf);
pub const CODECAPI_AVDecVideoH264ErrorConcealment: windows_core::GUID = windows_core::GUID::from_u128(0xececace8_3436_462c_9294_cd7bacd758a9);
pub const CODECAPI_AVDecVideoImageSize: windows_core::GUID = windows_core::GUID::from_u128(0x5ee5747c_6801_4cab_aaf1_6248fa841ba4);
pub const CODECAPI_AVDecVideoInputScanType: windows_core::GUID = windows_core::GUID::from_u128(0x38477e1f_0ea7_42cd_8cd1_130ced57c580);
pub const CODECAPI_AVDecVideoMPEG2ErrorConcealment: windows_core::GUID = windows_core::GUID::from_u128(0x9d2bfe18_728d_48d2_b358_bc7e436c6674);
pub const CODECAPI_AVDecVideoMaxCodedHeight: windows_core::GUID = windows_core::GUID::from_u128(0x7262a16a_d2dc_4e75_9ba8_65c0c6d32b13);
pub const CODECAPI_AVDecVideoMaxCodedWidth: windows_core::GUID = windows_core::GUID::from_u128(0x5ae557b8_77af_41f5_9fa6_4db2fe1d4bca);
pub const CODECAPI_AVDecVideoPixelAspectRatio: windows_core::GUID = windows_core::GUID::from_u128(0xb0cf8245_f32d_41df_b02c_87bd304d12ab);
pub const CODECAPI_AVDecVideoProcDeinterlaceCSC: windows_core::GUID = windows_core::GUID::from_u128(0xf7db8a31_4f48_4ee8_ae31_8b6ebe558ae2);
pub const CODECAPI_AVDecVideoSWPowerLevel: windows_core::GUID = windows_core::GUID::from_u128(0xfb5d2347_4dd8_4509_aed0_db5fa9aa93f4);
pub const CODECAPI_AVDecVideoSoftwareDeinterlaceMode: windows_core::GUID = windows_core::GUID::from_u128(0x0c08d1ce_9ced_4540_bae3_ceb380141109);
pub const CODECAPI_AVDecVideoThumbnailGenerationMode: windows_core::GUID = windows_core::GUID::from_u128(0x2efd8eee_1150_4328_9cf5_66dce933fcf4);
pub const CODECAPI_AVEnableInLoopDeblockFilter: windows_core::GUID = windows_core::GUID::from_u128(0xd2e8e399_0623_4bf3_92a8_4d1818529ded);
pub const CODECAPI_AVEncAACEnableVBR: windows_core::GUID = windows_core::GUID::from_u128(0xe836bb98_fca3_44b6_9a39_24786be41be1);
pub const CODECAPI_AVEncAdaptiveMode: windows_core::GUID = windows_core::GUID::from_u128(0x4419b185_da1f_4f53_bc76_097d0c1efb1e);
pub const CODECAPI_AVEncAudioDualMono: windows_core::GUID = windows_core::GUID::from_u128(0x3648126b_a3e8_4329_9b3a_5ce566a43bd3);
pub const CODECAPI_AVEncAudioInputContent: windows_core::GUID = windows_core::GUID::from_u128(0x3e226c2b_60b9_4a39_b00b_a7b40f70d566);
pub const CODECAPI_AVEncAudioIntervalToEncode: windows_core::GUID = windows_core::GUID::from_u128(0x866e4b4d_725a_467c_bb01_b496b23b25f9);
pub const CODECAPI_AVEncAudioIntervalToSkip: windows_core::GUID = windows_core::GUID::from_u128(0x88c15f94_c38c_4796_a9e8_96e967983f26);
pub const CODECAPI_AVEncAudioMapDestChannel0: windows_core::GUID = windows_core::GUID::from_u128(0xbc5d0b60_df6a_4e16_9803_b82007a30c8d);
pub const CODECAPI_AVEncAudioMapDestChannel1: windows_core::GUID = windows_core::GUID::from_u128(0xbc5d0b61_df6a_4e16_9803_b82007a30c8d);
pub const CODECAPI_AVEncAudioMapDestChannel10: windows_core::GUID = windows_core::GUID::from_u128(0xbc5d0b6a_df6a_4e16_9803_b82007a30c8d);
pub const CODECAPI_AVEncAudioMapDestChannel11: windows_core::GUID = windows_core::GUID::from_u128(0xbc5d0b6b_df6a_4e16_9803_b82007a30c8d);
pub const CODECAPI_AVEncAudioMapDestChannel12: windows_core::GUID = windows_core::GUID::from_u128(0xbc5d0b6c_df6a_4e16_9803_b82007a30c8d);
pub const CODECAPI_AVEncAudioMapDestChannel13: windows_core::GUID = windows_core::GUID::from_u128(0xbc5d0b6d_df6a_4e16_9803_b82007a30c8d);
pub const CODECAPI_AVEncAudioMapDestChannel14: windows_core::GUID = windows_core::GUID::from_u128(0xbc5d0b6e_df6a_4e16_9803_b82007a30c8d);
pub const CODECAPI_AVEncAudioMapDestChannel15: windows_core::GUID = windows_core::GUID::from_u128(0xbc5d0b6f_df6a_4e16_9803_b82007a30c8d);
pub const CODECAPI_AVEncAudioMapDestChannel2: windows_core::GUID = windows_core::GUID::from_u128(0xbc5d0b62_df6a_4e16_9803_b82007a30c8d);
pub const CODECAPI_AVEncAudioMapDestChannel3: windows_core::GUID = windows_core::GUID::from_u128(0xbc5d0b63_df6a_4e16_9803_b82007a30c8d);
pub const CODECAPI_AVEncAudioMapDestChannel4: windows_core::GUID = windows_core::GUID::from_u128(0xbc5d0b64_df6a_4e16_9803_b82007a30c8d);
pub const CODECAPI_AVEncAudioMapDestChannel5: windows_core::GUID = windows_core::GUID::from_u128(0xbc5d0b65_df6a_4e16_9803_b82007a30c8d);
pub const CODECAPI_AVEncAudioMapDestChannel6: windows_core::GUID = windows_core::GUID::from_u128(0xbc5d0b66_df6a_4e16_9803_b82007a30c8d);
pub const CODECAPI_AVEncAudioMapDestChannel7: windows_core::GUID = windows_core::GUID::from_u128(0xbc5d0b67_df6a_4e16_9803_b82007a30c8d);
pub const CODECAPI_AVEncAudioMapDestChannel8: windows_core::GUID = windows_core::GUID::from_u128(0xbc5d0b68_df6a_4e16_9803_b82007a30c8d);
pub const CODECAPI_AVEncAudioMapDestChannel9: windows_core::GUID = windows_core::GUID::from_u128(0xbc5d0b69_df6a_4e16_9803_b82007a30c8d);
pub const CODECAPI_AVEncAudioMeanBitRate: windows_core::GUID = windows_core::GUID::from_u128(0x921295bb_4fca_4679_aab8_9e2a1d753384);
pub const CODECAPI_AVEncChromaEncodeMode: windows_core::GUID = windows_core::GUID::from_u128(0x8a47ab5a_4798_4c93_b5a5_554f9a3b9f50);
pub const CODECAPI_AVEncChromaUpdateTime: windows_core::GUID = windows_core::GUID::from_u128(0x4b4fd998_4274_40bb_8ee4_07553e7e2d3a);
pub const CODECAPI_AVEncCodecType: windows_core::GUID = windows_core::GUID::from_u128(0x08af4ac1_f3f2_4c74_9dcf_37f2ec79f826);
pub const CODECAPI_AVEncCommonAllowFrameDrops: windows_core::GUID = windows_core::GUID::from_u128(0xd8477dcb_9598_48e3_8d0c_752bf206093e);
pub const CODECAPI_AVEncCommonBufferInLevel: windows_core::GUID = windows_core::GUID::from_u128(0xd9c5c8db_fc74_4064_94e9_cd19f947ed45);
pub const CODECAPI_AVEncCommonBufferOutLevel: windows_core::GUID = windows_core::GUID::from_u128(0xccae7f49_d0bc_4e3d_a57e_fb5740140069);
pub const CODECAPI_AVEncCommonBufferSize: windows_core::GUID = windows_core::GUID::from_u128(0x0db96574_b6a4_4c8b_8106_3773de0310cd);
pub const CODECAPI_AVEncCommonFormatConstraint: windows_core::GUID = windows_core::GUID::from_u128(0x57cbb9b8_116f_4951_b40c_c2a035ed8f17);
pub const CODECAPI_AVEncCommonLowLatency: windows_core::GUID = windows_core::GUID::from_u128(0x9d3ecd55_89e8_490a_970a_0c9548d5a56e);
pub const CODECAPI_AVEncCommonMaxBitRate: windows_core::GUID = windows_core::GUID::from_u128(0x9651eae4_39b9_4ebf_85ef_d7f444ec7465);
pub const CODECAPI_AVEncCommonMeanBitRate: windows_core::GUID = windows_core::GUID::from_u128(0xf7222374_2144_4815_b550_a37f8e12ee52);
pub const CODECAPI_AVEncCommonMeanBitRateInterval: windows_core::GUID = windows_core::GUID::from_u128(0xbfaa2f0c_cb82_4bc0_8474_f06a8a0d0258);
pub const CODECAPI_AVEncCommonMinBitRate: windows_core::GUID = windows_core::GUID::from_u128(0x101405b2_2083_4034_a806_efbeddd7c9ff);
pub const CODECAPI_AVEncCommonMultipassMode: windows_core::GUID = windows_core::GUID::from_u128(0x22533d4c_47e1_41b5_9352_a2b7780e7ac4);
pub const CODECAPI_AVEncCommonPassEnd: windows_core::GUID = windows_core::GUID::from_u128(0x0e3d01bc_c85c_467d_8b60_c41012ee3bf6);
pub const CODECAPI_AVEncCommonPassStart: windows_core::GUID = windows_core::GUID::from_u128(0x6a67739f_4eb5_4385_9928_f276a939ef95);
pub const CODECAPI_AVEncCommonQuality: windows_core::GUID = windows_core::GUID::from_u128(0xfcbf57a3_7ea5_4b0c_9644_69b40c39c391);
pub const CODECAPI_AVEncCommonQualityVsSpeed: windows_core::GUID = windows_core::GUID::from_u128(0x98332df8_03cd_476b_89fa_3f9e442dec9f);
pub const CODECAPI_AVEncCommonRateControlMode: windows_core::GUID = windows_core::GUID::from_u128(0x1c0608e9_370c_4710_8a58_cb6181c42423);
pub const CODECAPI_AVEncCommonRealTime: windows_core::GUID = windows_core::GUID::from_u128(0x143a0ff6_a131_43da_b81e_98fbb8ec378e);
pub const CODECAPI_AVEncCommonStreamEndHandling: windows_core::GUID = windows_core::GUID::from_u128(0x6aad30af_6ba8_4ccc_8fca_18d19beaeb1c);
pub const CODECAPI_AVEncCommonTranscodeEncodingProfile: windows_core::GUID = windows_core::GUID::from_u128(0x6947787c_f508_4ea9_b1e9_a1fe3a49fbc9);
pub const CODECAPI_AVEncDDAtoDConverterType: windows_core::GUID = windows_core::GUID::from_u128(0x719f9612_81a1_47e0_9a05_d94ad5fca948);
pub const CODECAPI_AVEncDDCentreDownMixLevel: windows_core::GUID = windows_core::GUID::from_u128(0xe285072c_c958_4a81_afd2_e5e0daf1b148);
pub const CODECAPI_AVEncDDChannelBWLowPassFilter: windows_core::GUID = windows_core::GUID::from_u128(0xe197821d_d2e7_43e2_ad2c_00582f518545);
pub const CODECAPI_AVEncDDCopyright: windows_core::GUID = windows_core::GUID::from_u128(0x8694f076_cd75_481d_a5c6_a904dcc828f0);
pub const CODECAPI_AVEncDDDCHighPassFilter: windows_core::GUID = windows_core::GUID::from_u128(0x9565239f_861c_4ac8_bfda_e00cb4db8548);
pub const CODECAPI_AVEncDDDialogNormalization: windows_core::GUID = windows_core::GUID::from_u128(0xd7055acf_f125_437d_a704_79c79f0404a8);
pub const CODECAPI_AVEncDDDigitalDeemphasis: windows_core::GUID = windows_core::GUID::from_u128(0xe024a2c2_947c_45ac_87d8_f1030c5c0082);
pub const CODECAPI_AVEncDDDynamicRangeCompressionControl: windows_core::GUID = windows_core::GUID::from_u128(0xcfc2ff6d_79b8_4b8d_a8aa_a0c9bd1c2940);
pub const CODECAPI_AVEncDDHeadphoneMode: windows_core::GUID = windows_core::GUID::from_u128(0x4052dbec_52f5_42f5_9b00_d134b1341b9d);
pub const CODECAPI_AVEncDDLFELowPassFilter: windows_core::GUID = windows_core::GUID::from_u128(0xd3b80f6f_9d15_45e5_91be_019c3fab1f01);
pub const CODECAPI_AVEncDDLoRoCenterMixLvl_x10: windows_core::GUID = windows_core::GUID::from_u128(0x1cfba222_25b3_4bf4_9bfd_e7111267858c);
pub const CODECAPI_AVEncDDLoRoSurroundMixLvl_x10: windows_core::GUID = windows_core::GUID::from_u128(0xe725cff6_eb56_40c7_8450_2b9367e91555);
pub const CODECAPI_AVEncDDLtRtCenterMixLvl_x10: windows_core::GUID = windows_core::GUID::from_u128(0xdca128a2_491f_4600_b2da_76e3344b4197);
pub const CODECAPI_AVEncDDLtRtSurroundMixLvl_x10: windows_core::GUID = windows_core::GUID::from_u128(0x212246c7_3d2c_4dfa_bc21_652a9098690d);
pub const CODECAPI_AVEncDDOriginalBitstream: windows_core::GUID = windows_core::GUID::from_u128(0x966ae800_5bd3_4ff9_95b9_d30566273856);
pub const CODECAPI_AVEncDDPreferredStereoDownMixMode: windows_core::GUID = windows_core::GUID::from_u128(0x7f4e6b31_9185_403d_b0a2_763743e6f063);
pub const CODECAPI_AVEncDDProductionInfoExists: windows_core::GUID = windows_core::GUID::from_u128(0xb0b7fe5f_b6ab_4f40_964d_8d91f17c19e8);
pub const CODECAPI_AVEncDDProductionMixLevel: windows_core::GUID = windows_core::GUID::from_u128(0x301d103a_cbf9_4776_8899_7c15b461ab26);
pub const CODECAPI_AVEncDDProductionRoomType: windows_core::GUID = windows_core::GUID::from_u128(0xdad7ad60_23d8_4ab7_a284_556986d8a6fe);
pub const CODECAPI_AVEncDDRFPreEmphasisFilter: windows_core::GUID = windows_core::GUID::from_u128(0x21af44c0_244e_4f3d_a2cc_3d3068b2e73f);
pub const CODECAPI_AVEncDDService: windows_core::GUID = windows_core::GUID::from_u128(0xd2e1bec7_5172_4d2a_a50e_2f3b82b1ddf8);
pub const CODECAPI_AVEncDDSurround3dBAttenuation: windows_core::GUID = windows_core::GUID::from_u128(0x4d43b99d_31e2_48b9_bf2e_5cbf1a572784);
pub const CODECAPI_AVEncDDSurround90DegreeePhaseShift: windows_core::GUID = windows_core::GUID::from_u128(0x25ecec9d_3553_42c0_bb56_d25792104f80);
pub const CODECAPI_AVEncDDSurroundDownMixLevel: windows_core::GUID = windows_core::GUID::from_u128(0x7b20d6e5_0bcf_4273_a487_506b047997e9);
pub const CODECAPI_AVEncDDSurroundExMode: windows_core::GUID = windows_core::GUID::from_u128(0x91607cee_dbdd_4eb6_bca2_aadfafa3dd68);
pub const CODECAPI_AVEncEnableVideoProcessing: windows_core::GUID = windows_core::GUID::from_u128(0x006f4bf6_0ea3_4d42_8702_b5d8be0f7a92);
pub const CODECAPI_AVEncH264CABACEnable: windows_core::GUID = windows_core::GUID::from_u128(0xee6cad62_d305_4248_a50e_e1b255f7caf8);
pub const CODECAPI_AVEncH264PPSID: windows_core::GUID = windows_core::GUID::from_u128(0xbfe29ec2_056c_4d68_a38d_ae5944c8582e);
pub const CODECAPI_AVEncH264SPSID: windows_core::GUID = windows_core::GUID::from_u128(0x50f38f51_2b79_40e3_b39c_7e9fa0770501);
pub const CODECAPI_AVEncInputVideoSystem: windows_core::GUID = windows_core::GUID::from_u128(0xbede146d_b616_4dc7_92b2_f5d9fa9298f7);
pub const CODECAPI_AVEncLowPowerEncoder: windows_core::GUID = windows_core::GUID::from_u128(0xb668d582_8bad_4f6a_9141_375a95358b6d);
pub const CODECAPI_AVEncMP12MuxDVDNavPacks: windows_core::GUID = windows_core::GUID::from_u128(0xc7607ced_8cf1_4a99_83a1_ee5461be3574);
pub const CODECAPI_AVEncMP12MuxEarliestPTS: windows_core::GUID = windows_core::GUID::from_u128(0x157232b6_f809_474e_9464_a7f93014a817);
pub const CODECAPI_AVEncMP12MuxInitialSCR: windows_core::GUID = windows_core::GUID::from_u128(0x3433ad21_1b91_4a0b_b190_2b77063b63a4);
pub const CODECAPI_AVEncMP12MuxLargestPacketSize: windows_core::GUID = windows_core::GUID::from_u128(0x35ceb711_f461_4b92_a4ef_17b6841ed254);
pub const CODECAPI_AVEncMP12MuxMuxRate: windows_core::GUID = windows_core::GUID::from_u128(0xee047c72_4bdb_4a9d_8e21_41926c823da7);
pub const CODECAPI_AVEncMP12MuxNumStreams: windows_core::GUID = windows_core::GUID::from_u128(0xf7164a41_dced_4659_a8f2_fb693f2a4cd0);
pub const CODECAPI_AVEncMP12MuxPackSize: windows_core::GUID = windows_core::GUID::from_u128(0xf916053a_1ce8_4faf_aa0b_ba31c80034b8);
pub const CODECAPI_AVEncMP12MuxPacketOverhead: windows_core::GUID = windows_core::GUID::from_u128(0xe40bd720_3955_4453_acf9_b79132a38fa0);
pub const CODECAPI_AVEncMP12MuxSysAudioLock: windows_core::GUID = windows_core::GUID::from_u128(0x0fbb5752_1d43_47bf_bd79_f2293d8ce337);
pub const CODECAPI_AVEncMP12MuxSysCSPS: windows_core::GUID = windows_core::GUID::from_u128(0x7952ff45_9c0d_4822_bc82_8ad772e02993);
pub const CODECAPI_AVEncMP12MuxSysFixed: windows_core::GUID = windows_core::GUID::from_u128(0xcefb987e_894f_452e_8f89_a4ef8cec063a);
pub const CODECAPI_AVEncMP12MuxSysRateBound: windows_core::GUID = windows_core::GUID::from_u128(0x05f0428a_ee30_489d_ae28_205c72446710);
pub const CODECAPI_AVEncMP12MuxSysSTDBufferBound: windows_core::GUID = windows_core::GUID::from_u128(0x35746903_b545_43e7_bb35_c5e0a7d5093c);
pub const CODECAPI_AVEncMP12MuxSysVideoLock: windows_core::GUID = windows_core::GUID::from_u128(0xb8296408_2430_4d37_a2a1_95b3e435a91d);
pub const CODECAPI_AVEncMP12MuxTargetPacketizer: windows_core::GUID = windows_core::GUID::from_u128(0xd862212a_2015_45dd_9a32_1b3aa88205a0);
pub const CODECAPI_AVEncMP12PktzCopyright: windows_core::GUID = windows_core::GUID::from_u128(0xc8f4b0c1_094c_43c7_8e68_a595405a6ef8);
pub const CODECAPI_AVEncMP12PktzInitialPTS: windows_core::GUID = windows_core::GUID::from_u128(0x2a4f2065_9a63_4d20_ae22_0a1bc896a315);
pub const CODECAPI_AVEncMP12PktzOriginal: windows_core::GUID = windows_core::GUID::from_u128(0x6b178416_31b9_4964_94cb_6bff866cdf83);
pub const CODECAPI_AVEncMP12PktzPacketSize: windows_core::GUID = windows_core::GUID::from_u128(0xab71347a_1332_4dde_a0e5_ccf7da8a0f22);
pub const CODECAPI_AVEncMP12PktzSTDBuffer: windows_core::GUID = windows_core::GUID::from_u128(0x0b751bd0_819e_478c_9435_75208926b377);
pub const CODECAPI_AVEncMP12PktzStreamID: windows_core::GUID = windows_core::GUID::from_u128(0xc834d038_f5e8_4408_9b60_88f36493fedf);
pub const CODECAPI_AVEncMPACodingMode: windows_core::GUID = windows_core::GUID::from_u128(0xb16ade03_4b93_43d7_a550_90b4fe224537);
pub const CODECAPI_AVEncMPACopyright: windows_core::GUID = windows_core::GUID::from_u128(0xa6ae762a_d0a9_4454_b8ef_f2dbeefdd3bd);
pub const CODECAPI_AVEncMPAEmphasisType: windows_core::GUID = windows_core::GUID::from_u128(0x2d59fcda_bf4e_4ed6_b5df_5b03b36b0a1f);
pub const CODECAPI_AVEncMPAEnableRedundancyProtection: windows_core::GUID = windows_core::GUID::from_u128(0x5e54b09e_b2e7_4973_a89b_0b3650a3beda);
pub const CODECAPI_AVEncMPALayer: windows_core::GUID = windows_core::GUID::from_u128(0x9d377230_f91b_453d_9ce0_78445414c22d);
pub const CODECAPI_AVEncMPAOriginalBitstream: windows_core::GUID = windows_core::GUID::from_u128(0x3cfb7855_9cc9_47ff_b829_b36786c92346);
pub const CODECAPI_AVEncMPAPrivateUserBit: windows_core::GUID = windows_core::GUID::from_u128(0xafa505ce_c1e3_4e3d_851b_61b700e5e6cc);
pub const CODECAPI_AVEncMPVAddSeqEndCode: windows_core::GUID = windows_core::GUID::from_u128(0xa823178f_57df_4c7a_b8fd_e5ec8887708d);
pub const CODECAPI_AVEncMPVDefaultBPictureCount: windows_core::GUID = windows_core::GUID::from_u128(0x8d390aac_dc5c_4200_b57f_814d04babab2);
pub const CODECAPI_AVEncMPVFrameFieldMode: windows_core::GUID = windows_core::GUID::from_u128(0xacb5de96_7b93_4c2f_8825_b0295fa93bf4);
pub const CODECAPI_AVEncMPVGOPOpen: windows_core::GUID = windows_core::GUID::from_u128(0xb1d5d4a6_3300_49b1_ae61_a09937ab0e49);
pub const CODECAPI_AVEncMPVGOPSInSeq: windows_core::GUID = windows_core::GUID::from_u128(0x993410d4_2691_4192_9978_98dc2603669f);
pub const CODECAPI_AVEncMPVGOPSize: windows_core::GUID = windows_core::GUID::from_u128(0x95f31b26_95a4_41aa_9303_246a7fc6eef1);
pub const CODECAPI_AVEncMPVGOPSizeMax: windows_core::GUID = windows_core::GUID::from_u128(0xfe7de4c4_1936_4fe2_bdf7_1f18ca1d001f);
pub const CODECAPI_AVEncMPVGOPSizeMin: windows_core::GUID = windows_core::GUID::from_u128(0x7155cf20_d440_4852_ad0f_9c4abfe37a6a);
pub const CODECAPI_AVEncMPVGenerateHeaderPicDispExt: windows_core::GUID = windows_core::GUID::from_u128(0xc6412f84_c03f_4f40_a00c_4293df8395bb);
pub const CODECAPI_AVEncMPVGenerateHeaderPicExt: windows_core::GUID = windows_core::GUID::from_u128(0x1b8464ab_944f_45f0_b74e_3a58dad11f37);
pub const CODECAPI_AVEncMPVGenerateHeaderSeqDispExt: windows_core::GUID = windows_core::GUID::from_u128(0x6437aa6f_5a3c_4de9_8a16_53d9c4ad326f);
pub const CODECAPI_AVEncMPVGenerateHeaderSeqExt: windows_core::GUID = windows_core::GUID::from_u128(0xd5e78611_082d_4e6b_98af_0f51ab139222);
pub const CODECAPI_AVEncMPVGenerateHeaderSeqScaleExt: windows_core::GUID = windows_core::GUID::from_u128(0x0722d62f_dd59_4a86_9cd5_644f8e2653d8);
pub const CODECAPI_AVEncMPVIntraDCPrecision: windows_core::GUID = windows_core::GUID::from_u128(0xa0116151_cbc8_4af3_97dc_d00cceb82d79);
pub const CODECAPI_AVEncMPVIntraVLCTable: windows_core::GUID = windows_core::GUID::from_u128(0xa2b83ff5_1a99_405a_af95_c5997d558d3a);
pub const CODECAPI_AVEncMPVLevel: windows_core::GUID = windows_core::GUID::from_u128(0x6ee40c40_a60c_41ef_8f50_37c2249e2cb3);
pub const CODECAPI_AVEncMPVProfile: windows_core::GUID = windows_core::GUID::from_u128(0xdabb534a_1d99_4284_975a_d90e2239baa1);
pub const CODECAPI_AVEncMPVQScaleType: windows_core::GUID = windows_core::GUID::from_u128(0x2b79ebb7_f484_4af7_bb58_a2a188c5cbbe);
pub const CODECAPI_AVEncMPVQuantMatrixChromaIntra: windows_core::GUID = windows_core::GUID::from_u128(0x9eb9ecd4_018d_4ffd_8f2d_39e49f07b17a);
pub const CODECAPI_AVEncMPVQuantMatrixChromaNonIntra: windows_core::GUID = windows_core::GUID::from_u128(0x1415b6b1_362a_4338_ba9a_1ef58703c05b);
pub const CODECAPI_AVEncMPVQuantMatrixIntra: windows_core::GUID = windows_core::GUID::from_u128(0x9bea04f3_6621_442c_8ba1_3ac378979698);
pub const CODECAPI_AVEncMPVQuantMatrixNonIntra: windows_core::GUID = windows_core::GUID::from_u128(0x87f441d8_0997_4beb_a08e_8573d409cf75);
pub const CODECAPI_AVEncMPVScanPattern: windows_core::GUID = windows_core::GUID::from_u128(0x7f8a478e_7bbb_4ae2_b2fc_96d17fc4a2d6);
pub const CODECAPI_AVEncMPVSceneDetection: windows_core::GUID = windows_core::GUID::from_u128(0x552799f1_db4c_405b_8a3a_c93f2d0674dc);
pub const CODECAPI_AVEncMPVUseConcealmentMotionVectors: windows_core::GUID = windows_core::GUID::from_u128(0xec770cf3_6908_4b4b_aa30_7fb986214fea);
pub const CODECAPI_AVEncMaxFrameRate: windows_core::GUID = windows_core::GUID::from_u128(0xb98e1b31_19fa_4d4f_9931_d6a5b8aab93c);
pub const CODECAPI_AVEncMuxOutputStreamType: windows_core::GUID = windows_core::GUID::from_u128(0xcedd9e8f_34d3_44db_a1d8_f81520254f3e);
pub const CODECAPI_AVEncNoInputCopy: windows_core::GUID = windows_core::GUID::from_u128(0xd2b46a2a_e8ee_4ec5_869e_449b6c62c81a);
pub const CODECAPI_AVEncNumWorkerThreads: windows_core::GUID = windows_core::GUID::from_u128(0xb0c8bf60_16f7_4951_a30b_1db1609293d6);
pub const CODECAPI_AVEncProgressiveUpdateTime: windows_core::GUID = windows_core::GUID::from_u128(0x649faf66_afc6_4828_8fdc_0771cd9ab17d);
pub const CODECAPI_AVEncSliceControlMode: windows_core::GUID = windows_core::GUID::from_u128(0xe9e782ef_5f18_44c9_a90b_e9c3c2c17b0b);
pub const CODECAPI_AVEncSliceControlSize: windows_core::GUID = windows_core::GUID::from_u128(0x92f51df3_07a5_4172_aefe_c69ca3b60e35);
pub const CODECAPI_AVEncSliceGenerationMode: windows_core::GUID = windows_core::GUID::from_u128(0x8a6bc67f_9497_4286_b46b_02db8d60edbc);
pub const CODECAPI_AVEncStatAudioAverageBPS: windows_core::GUID = windows_core::GUID::from_u128(0xca6724db_7059_4351_8b43_f82198826a14);
pub const CODECAPI_AVEncStatAudioAveragePCMValue: windows_core::GUID = windows_core::GUID::from_u128(0x979272f8_d17f_4e32_bb73_4e731c68ba2d);
pub const CODECAPI_AVEncStatAudioPeakPCMValue: windows_core::GUID = windows_core::GUID::from_u128(0xdce7fd34_dc00_4c16_821b_35d9eb00fb1a);
pub const CODECAPI_AVEncStatAverageBPS: windows_core::GUID = windows_core::GUID::from_u128(0xca6724db_7059_4351_8b43_f82198826a14);
pub const CODECAPI_AVEncStatCommonCompletedPasses: windows_core::GUID = windows_core::GUID::from_u128(0x3e5de533_9df7_438c_854f_9f7dd3683d34);
pub const CODECAPI_AVEncStatHardwareBandwidthUtilitization: windows_core::GUID = windows_core::GUID::from_u128(0x0124ba9b_dc41_4826_b45f_18ac01b3d5a8);
pub const CODECAPI_AVEncStatHardwareProcessorUtilitization: windows_core::GUID = windows_core::GUID::from_u128(0x995dc027_cb95_49e6_b91b_5967753cdcb8);
pub const CODECAPI_AVEncStatMPVSkippedEmptyFrames: windows_core::GUID = windows_core::GUID::from_u128(0x32195fd3_590d_4812_a7ed_6d639a1f9711);
pub const CODECAPI_AVEncStatVideoCodedFrames: windows_core::GUID = windows_core::GUID::from_u128(0xd47f8d61_6f5a_4a26_bb9f_cd9518462bcd);
pub const CODECAPI_AVEncStatVideoOutputFrameRate: windows_core::GUID = windows_core::GUID::from_u128(0xbe747849_9ab4_4a63_98fe_f143f04f8ee9);
pub const CODECAPI_AVEncStatVideoTotalFrames: windows_core::GUID = windows_core::GUID::from_u128(0xfdaa9916_119a_4222_9ad6_3f7cab99cc8b);
pub const CODECAPI_AVEncStatWMVCBAvg: windows_core::GUID = windows_core::GUID::from_u128(0x6aa6229f_d602_4b9d_b68c_c1ad78884bef);
pub const CODECAPI_AVEncStatWMVCBMax: windows_core::GUID = windows_core::GUID::from_u128(0xe976bef8_00fe_44b4_b625_8f238bc03499);
pub const CODECAPI_AVEncStatWMVDecoderComplexityProfile: windows_core::GUID = windows_core::GUID::from_u128(0x89e69fc3_0f9b_436c_974a_df821227c90d);
pub const CODECAPI_AVEncTileColumns: windows_core::GUID = windows_core::GUID::from_u128(0xb4b31205_01e8_452c_b876_8c6506545925);
pub const CODECAPI_AVEncTileRows: windows_core::GUID = windows_core::GUID::from_u128(0xfbc650fc_41ab_4f9b_84b5_065be9cd99ee);
pub const CODECAPI_AVEncVideoCBRMotionTradeoff: windows_core::GUID = windows_core::GUID::from_u128(0x0d49451e_18d5_4367_a4ef_3240df1693c4);
pub const CODECAPI_AVEncVideoCTBSize: windows_core::GUID = windows_core::GUID::from_u128(0xd47db8b2_e73b_4cb9_8c3e_bd877d06d77b);
pub const CODECAPI_AVEncVideoCodedVideoAccessUnitSize: windows_core::GUID = windows_core::GUID::from_u128(0xb4b10c15_14a7_4ce8_b173_dc90a0b4fcdb);
pub const CODECAPI_AVEncVideoConsecutiveFramesForLayer: windows_core::GUID = windows_core::GUID::from_u128(0x0af35522_d984_45ae_bbb8_53933e0ab1b5);
pub const CODECAPI_AVEncVideoContentType: windows_core::GUID = windows_core::GUID::from_u128(0x66117aca_eb77_459d_930c_a48d9d0683fc);
pub const CODECAPI_AVEncVideoDefaultUpperFieldDominant: windows_core::GUID = windows_core::GUID::from_u128(0x810167c4_0bc1_47ca_8fc2_57055a1474a5);
pub const CODECAPI_AVEncVideoDirtyRectEnabled: windows_core::GUID = windows_core::GUID::from_u128(0x8acb8fdd_5e0c_4c66_8729_b8f629ab04fb);
pub const CODECAPI_AVEncVideoDisplayDimension: windows_core::GUID = windows_core::GUID::from_u128(0xde053668_f4ec_47a9_86d0_836770f0c1d5);
pub const CODECAPI_AVEncVideoEncodeDimension: windows_core::GUID = windows_core::GUID::from_u128(0x1074df28_7e0f_47a4_a453_cdd73870f5ce);
pub const CODECAPI_AVEncVideoEncodeFrameTypeQP: windows_core::GUID = windows_core::GUID::from_u128(0xaa70b610_e03f_450c_ad07_07314e639ce7);
pub const CODECAPI_AVEncVideoEncodeOffsetOrigin: windows_core::GUID = windows_core::GUID::from_u128(0x6bc098fe_a71a_4454_852e_4d2ddeb2cd24);
pub const CODECAPI_AVEncVideoEncodeQP: windows_core::GUID = windows_core::GUID::from_u128(0x2cb5696b_23fb_4ce1_a0f9_ef5b90fd55ca);
pub const CODECAPI_AVEncVideoFieldSwap: windows_core::GUID = windows_core::GUID::from_u128(0xfefd7569_4e0a_49f2_9f2b_360ea48c19a2);
pub const CODECAPI_AVEncVideoForceKeyFrame: windows_core::GUID = windows_core::GUID::from_u128(0x398c1b98_8353_475a_9ef2_8f265d260345);
pub const CODECAPI_AVEncVideoForceSourceScanType: windows_core::GUID = windows_core::GUID::from_u128(0x1ef2065f_058a_4765_a4fc_8a864c103012);
pub const CODECAPI_AVEncVideoGradualIntraRefresh: windows_core::GUID = windows_core::GUID::from_u128(0x8f347dee_cb0d_49ba_b462_db6927ee2101);
pub const CODECAPI_AVEncVideoHeaderDropFrame: windows_core::GUID = windows_core::GUID::from_u128(0x6ed9e124_7925_43fe_971b_e019f62222b4);
pub const CODECAPI_AVEncVideoHeaderFrames: windows_core::GUID = windows_core::GUID::from_u128(0xafd5f567_5c1b_4adc_bdaf_735610381436);
pub const CODECAPI_AVEncVideoHeaderHours: windows_core::GUID = windows_core::GUID::from_u128(0x2acc7702_e2da_4158_bf9b_88880129d740);
pub const CODECAPI_AVEncVideoHeaderMinutes: windows_core::GUID = windows_core::GUID::from_u128(0xdc1a99ce_0307_408b_880b_b8348ee8ca7f);
pub const CODECAPI_AVEncVideoHeaderSeconds: windows_core::GUID = windows_core::GUID::from_u128(0x4a2e1a05_a780_4f58_8120_9a449d69656b);
pub const CODECAPI_AVEncVideoInputChromaResolution: windows_core::GUID = windows_core::GUID::from_u128(0xbb0cec33_16f1_47b0_8a88_37815bee1739);
pub const CODECAPI_AVEncVideoInputChromaSubsampling: windows_core::GUID = windows_core::GUID::from_u128(0xa8e73a39_4435_4ec3_a6ea_98300f4b36f7);
pub const CODECAPI_AVEncVideoInputColorLighting: windows_core::GUID = windows_core::GUID::from_u128(0x46a99549_0015_4a45_9c30_1d5cfa258316);
pub const CODECAPI_AVEncVideoInputColorNominalRange: windows_core::GUID = windows_core::GUID::from_u128(0x16cf25c6_a2a6_48e9_ae80_21aec41d427e);
pub const CODECAPI_AVEncVideoInputColorPrimaries: windows_core::GUID = windows_core::GUID::from_u128(0xc24d783f_7ce6_4278_90ab_28a4f1e5f86c);
pub const CODECAPI_AVEncVideoInputColorTransferFunction: windows_core::GUID = windows_core::GUID::from_u128(0x8c056111_a9c3_4b08_a0a0_ce13f8a27c75);
pub const CODECAPI_AVEncVideoInputColorTransferMatrix: windows_core::GUID = windows_core::GUID::from_u128(0x52ed68b9_72d5_4089_958d_f5405d55081c);
pub const CODECAPI_AVEncVideoInstantTemporalUpSwitching: windows_core::GUID = windows_core::GUID::from_u128(0xa3308307_0d96_4ba4_b1f0_b91a5e49df10);
pub const CODECAPI_AVEncVideoIntraLayerPrediction: windows_core::GUID = windows_core::GUID::from_u128(0xd3af46b8_bf47_44bb_a283_69f0b0228ff9);
pub const CODECAPI_AVEncVideoInverseTelecineEnable: windows_core::GUID = windows_core::GUID::from_u128(0x2ea9098b_e76d_4ccd_a030_d3b889c1b64c);
pub const CODECAPI_AVEncVideoInverseTelecineThreshold: windows_core::GUID = windows_core::GUID::from_u128(0x40247d84_e895_497f_b44c_b74560acfe27);
pub const CODECAPI_AVEncVideoLTRBufferControl: windows_core::GUID = windows_core::GUID::from_u128(0xa4a0e93d_4cbc_444c_89f4_826d310e92a7);
pub const CODECAPI_AVEncVideoMarkLTRFrame: windows_core::GUID = windows_core::GUID::from_u128(0xe42f4748_a06d_4ef9_8cea_3d05fde3bd3b);
pub const CODECAPI_AVEncVideoMaxCTBSize: windows_core::GUID = windows_core::GUID::from_u128(0x822363ff_cec8_43e5_92fd_e097488485e9);
pub const CODECAPI_AVEncVideoMaxKeyframeDistance: windows_core::GUID = windows_core::GUID::from_u128(0x2987123a_ba93_4704_b489_ec1e5f25292c);
pub const CODECAPI_AVEncVideoMaxNumRefFrame: windows_core::GUID = windows_core::GUID::from_u128(0x964829ed_94f9_43b4_b74d_ef40944b69a0);
pub const CODECAPI_AVEncVideoMaxNumRefFrameForLayer: windows_core::GUID = windows_core::GUID::from_u128(0x3141c639_6329_40d1_b7e7_2f0e3ac18e02);
pub const CODECAPI_AVEncVideoMaxQP: windows_core::GUID = windows_core::GUID::from_u128(0x3daf6f66_a6a7_45e0_a8e5_f2743f46a3a2);
pub const CODECAPI_AVEncVideoMaxTemporalLayers: windows_core::GUID = windows_core::GUID::from_u128(0x9c668cfe_08e1_424a_934e_b764b064802a);
pub const CODECAPI_AVEncVideoMeanAbsoluteDifference: windows_core::GUID = windows_core::GUID::from_u128(0xe5c0c10f_81a4_422d_8c3f_b474a4581336);
pub const CODECAPI_AVEncVideoMinQP: windows_core::GUID = windows_core::GUID::from_u128(0x0ee22c6a_a37c_4568_b5f1_9d4c2b3ab886);
pub const CODECAPI_AVEncVideoNoOfFieldsToEncode: windows_core::GUID = windows_core::GUID::from_u128(0x61e4bbe2_4ee0_40e7_80ab_51ddeebe6291);
pub const CODECAPI_AVEncVideoNoOfFieldsToSkip: windows_core::GUID = windows_core::GUID::from_u128(0xa97e1240_1427_4c16_a7f7_3dcfd8ba4cc5);
pub const CODECAPI_AVEncVideoNumGOPsPerIDR: windows_core::GUID = windows_core::GUID::from_u128(0x83bc5bdb_5b89_4521_8f66_33151c373176);
pub const CODECAPI_AVEncVideoOutputChromaResolution: windows_core::GUID = windows_core::GUID::from_u128(0x6097b4c9_7c1d_4e64_bfcc_9e9765318ae7);
pub const CODECAPI_AVEncVideoOutputChromaSubsampling: windows_core::GUID = windows_core::GUID::from_u128(0xfa561c6c_7d17_44f0_83c9_32ed12e96343);
pub const CODECAPI_AVEncVideoOutputColorLighting: windows_core::GUID = windows_core::GUID::from_u128(0x0e5aaac6_ace6_4c5c_998e_1a8c9c6c0f89);
pub const CODECAPI_AVEncVideoOutputColorNominalRange: windows_core::GUID = windows_core::GUID::from_u128(0x972835ed_87b5_4e95_9500_c73958566e54);
pub const CODECAPI_AVEncVideoOutputColorPrimaries: windows_core::GUID = windows_core::GUID::from_u128(0xbe95907c_9d04_4921_8985_a6d6d87d1a6c);
pub const CODECAPI_AVEncVideoOutputColorTransferFunction: windows_core::GUID = windows_core::GUID::from_u128(0x4a7f884a_ea11_460d_bf57_b88bc75900de);
pub const CODECAPI_AVEncVideoOutputColorTransferMatrix: windows_core::GUID = windows_core::GUID::from_u128(0xa9b90444_af40_4310_8fbe_ed6d933f892b);
pub const CODECAPI_AVEncVideoOutputFrameRate: windows_core::GUID = windows_core::GUID::from_u128(0xea85e7c3_9567_4d99_87c4_02c1c278ca7c);
pub const CODECAPI_AVEncVideoOutputFrameRateConversion: windows_core::GUID = windows_core::GUID::from_u128(0x8c068bf4_369a_4ba3_82fd_b2518fb3396e);
pub const CODECAPI_AVEncVideoOutputScanType: windows_core::GUID = windows_core::GUID::from_u128(0x460b5576_842e_49ab_a62d_b36f7312c9db);
pub const CODECAPI_AVEncVideoPixelAspectRatio: windows_core::GUID = windows_core::GUID::from_u128(0x3cdc718f_b3e9_4eb6_a57f_cf1f1b321b87);
pub const CODECAPI_AVEncVideoROIEnabled: windows_core::GUID = windows_core::GUID::from_u128(0xd74f7f18_44dd_4b85_aba3_05d9f42a8280);
pub const CODECAPI_AVEncVideoRateControlParams: windows_core::GUID = windows_core::GUID::from_u128(0x87d43767_7645_44ec_b438_d3322fbca29f);
pub const CODECAPI_AVEncVideoSelectLayer: windows_core::GUID = windows_core::GUID::from_u128(0xeb1084f5_6aaa_4914_bb2f_6147227f12e7);
pub const CODECAPI_AVEncVideoSourceFilmContent: windows_core::GUID = windows_core::GUID::from_u128(0x1791c64b_ccfc_4827_a0ed_2557793b2b1c);
pub const CODECAPI_AVEncVideoSourceIsBW: windows_core::GUID = windows_core::GUID::from_u128(0x42ffc49b_1812_4fdc_8d24_7054c521e6eb);
pub const CODECAPI_AVEncVideoSupportedControls: windows_core::GUID = windows_core::GUID::from_u128(0xd3f40fdd_77b9_473d_8196_061259e69cff);
pub const CODECAPI_AVEncVideoTemporalLayerCount: windows_core::GUID = windows_core::GUID::from_u128(0x19caebff_b74d_4cfd_8c27_c2f9d97d5f52);
pub const CODECAPI_AVEncVideoUsage: windows_core::GUID = windows_core::GUID::from_u128(0x1f636849_5dc1_49f1_b1d8_ce3cf62ea385);
pub const CODECAPI_AVEncVideoUseLTRFrame: windows_core::GUID = windows_core::GUID::from_u128(0x00752db8_55f7_4f80_895b_27639195f2ad);
pub const CODECAPI_AVEncWMVDecoderComplexity: windows_core::GUID = windows_core::GUID::from_u128(0xf32c0dab_f3cb_4217_b79f_8762768b5f67);
pub const CODECAPI_AVEncWMVInterlacedEncoding: windows_core::GUID = windows_core::GUID::from_u128(0xe3d00f8a_c6f5_4e14_a588_0ec87a726f9b);
pub const CODECAPI_AVEncWMVKeyFrameBufferLevelMarker: windows_core::GUID = windows_core::GUID::from_u128(0x51ff1115_33ac_426c_a1b1_09321bdf96b4);
pub const CODECAPI_AVEncWMVKeyFrameDistance: windows_core::GUID = windows_core::GUID::from_u128(0x5569055e_e268_4771_b83e_9555ea28aed3);
pub const CODECAPI_AVEncWMVProduceDummyFrames: windows_core::GUID = windows_core::GUID::from_u128(0xd669d001_183c_42e3_a3ca_2f4586d2396c);
pub const CODECAPI_AVLowLatencyMode: windows_core::GUID = windows_core::GUID::from_u128(0x9c27891a_ed7a_40e1_88e8_b22727a024ee);
pub const CODECAPI_AVPriorityControl: windows_core::GUID = windows_core::GUID::from_u128(0x54ba3dc8_bdde_4329_b187_2018bc5c2ba1);
pub const CODECAPI_AVRealtimeControl: windows_core::GUID = windows_core::GUID::from_u128(0x6f440632_c4ad_4bf7_9e52_456942b454b0);
pub const CODECAPI_AVScenarioInfo: windows_core::GUID = windows_core::GUID::from_u128(0xb28a6e64_3ff9_446a_8a4b_0d7a53413236);
pub const CODECAPI_CHANGELISTS: windows_core::GUID = windows_core::GUID::from_u128(0x62b12acf_f6b0_47d9_9456_96f22c4e0b9d);
pub const CODECAPI_CURRENTCHANGELIST: windows_core::GUID = windows_core::GUID::from_u128(0x1cb14e83_7d72_4657_83fd_47a2c5b9d13d);
pub const CODECAPI_GUID_AVDecAudioInputAAC: windows_core::GUID = windows_core::GUID::from_u128(0x97df7828_b94a_47e2_a4bc_51194db22a4d);
pub const CODECAPI_GUID_AVDecAudioInputDTS: windows_core::GUID = windows_core::GUID::from_u128(0x600bc0ca_6a1f_4e91_b241_1bbeb1cb19e0);
pub const CODECAPI_GUID_AVDecAudioInputDolby: windows_core::GUID = windows_core::GUID::from_u128(0x8e4228a0_f000_4e0b_8f54_ab8d24ad61a2);
pub const CODECAPI_GUID_AVDecAudioInputDolbyDigitalPlus: windows_core::GUID = windows_core::GUID::from_u128(0x0803e185_8f5d_47f5_9908_19a5bbc9fe34);
pub const CODECAPI_GUID_AVDecAudioInputHEAAC: windows_core::GUID = windows_core::GUID::from_u128(0x16efb4aa_330e_4f5c_98a8_cf6ac55cbe60);
pub const CODECAPI_GUID_AVDecAudioInputMPEG: windows_core::GUID = windows_core::GUID::from_u128(0x91106f36_02c5_4f75_9719_3b7abf75e1f6);
pub const CODECAPI_GUID_AVDecAudioInputPCM: windows_core::GUID = windows_core::GUID::from_u128(0xf2421da5_bbb4_4cd5_a996_933c6b5d1347);
pub const CODECAPI_GUID_AVDecAudioInputWMA: windows_core::GUID = windows_core::GUID::from_u128(0xc95e8dcf_4058_4204_8c42_cb24d91e4b9b);
pub const CODECAPI_GUID_AVDecAudioInputWMAPro: windows_core::GUID = windows_core::GUID::from_u128(0x0128b7c7_da72_4fe3_bef8_5c52e3557704);
pub const CODECAPI_GUID_AVDecAudioOutputFormat_PCM: windows_core::GUID = windows_core::GUID::from_u128(0x696e1d31_548f_4036_825f_7026c60011bd);
pub const CODECAPI_GUID_AVDecAudioOutputFormat_PCM_Headphones: windows_core::GUID = windows_core::GUID::from_u128(0x696e1d34_548f_4036_825f_7026c60011bd);
pub const CODECAPI_GUID_AVDecAudioOutputFormat_PCM_Stereo_Auto: windows_core::GUID = windows_core::GUID::from_u128(0x696e1d35_548f_4036_825f_7026c60011bd);
pub const CODECAPI_GUID_AVDecAudioOutputFormat_PCM_Stereo_MatrixEncoded: windows_core::GUID = windows_core::GUID::from_u128(0x696e1d30_548f_4036_825f_7026c60011bd);
pub const CODECAPI_GUID_AVDecAudioOutputFormat_SPDIF_Bitstream: windows_core::GUID = windows_core::GUID::from_u128(0x696e1d33_548f_4036_825f_7026c60011bd);
pub const CODECAPI_GUID_AVDecAudioOutputFormat_SPDIF_PCM: windows_core::GUID = windows_core::GUID::from_u128(0x696e1d32_548f_4036_825f_7026c60011bd);
pub const CODECAPI_GUID_AVEncCommonFormatATSC: windows_core::GUID = windows_core::GUID::from_u128(0x8d7b897c_a019_4670_aa76_2edcac7ac296);
pub const CODECAPI_GUID_AVEncCommonFormatDVB: windows_core::GUID = windows_core::GUID::from_u128(0x71830d8f_6c33_430d_844b_c2705baae6db);
pub const CODECAPI_GUID_AVEncCommonFormatDVD_DashVR: windows_core::GUID = windows_core::GUID::from_u128(0xe55199d6_044c_4dae_a488_531ed306235b);
pub const CODECAPI_GUID_AVEncCommonFormatDVD_PlusVR: windows_core::GUID = windows_core::GUID::from_u128(0xe74c6f2e_ec37_478d_9af4_a5e135b6271c);
pub const CODECAPI_GUID_AVEncCommonFormatDVD_V: windows_core::GUID = windows_core::GUID::from_u128(0xcc9598c4_e7fe_451d_b1ca_761bc840b7f3);
pub const CODECAPI_GUID_AVEncCommonFormatHighMAT: windows_core::GUID = windows_core::GUID::from_u128(0x1eabe760_fb2b_4928_90d1_78db88eee889);
pub const CODECAPI_GUID_AVEncCommonFormatHighMPV: windows_core::GUID = windows_core::GUID::from_u128(0xa2d25db8_b8f9_42c2_8bc7_0b93cf604788);
pub const CODECAPI_GUID_AVEncCommonFormatMP3: windows_core::GUID = windows_core::GUID::from_u128(0x349733cd_eb08_4dc2_8197_e49835ef828b);
pub const CODECAPI_GUID_AVEncCommonFormatSVCD: windows_core::GUID = windows_core::GUID::from_u128(0x51d85818_8220_448c_8066_d69bed16c9ad);
pub const CODECAPI_GUID_AVEncCommonFormatUnSpecified: windows_core::GUID = windows_core::GUID::from_u128(0xaf46a35a_6024_4525_a48a_094b97f5b3c2);
pub const CODECAPI_GUID_AVEncCommonFormatVCD: windows_core::GUID = windows_core::GUID::from_u128(0x95035bf7_9d90_40ff_ad5c_5cf8cf71ca1d);
pub const CODECAPI_GUID_AVEncDTS: windows_core::GUID = windows_core::GUID::from_u128(0x45fbcaa2_5e6e_4ab0_8893_5903bee93acf);
pub const CODECAPI_GUID_AVEncDTSHD: windows_core::GUID = windows_core::GUID::from_u128(0x2052e630_469d_4bfb_80ca_1d656e7e918f);
pub const CODECAPI_GUID_AVEncDV: windows_core::GUID = windows_core::GUID::from_u128(0x09b769c7_3329_44fb_8954_fa30937d3d5a);
pub const CODECAPI_GUID_AVEncDolbyDigitalConsumer: windows_core::GUID = windows_core::GUID::from_u128(0xc1a7bf6c_0059_4bfa_94ef_ef747a768d52);
pub const CODECAPI_GUID_AVEncDolbyDigitalPlus: windows_core::GUID = windows_core::GUID::from_u128(0x698d1b80_f7dd_415c_971c_42492a2056c6);
pub const CODECAPI_GUID_AVEncDolbyDigitalPro: windows_core::GUID = windows_core::GUID::from_u128(0xf5be76cc_0ff8_40eb_9cb1_bba94004d44f);
pub const CODECAPI_GUID_AVEncH264Video: windows_core::GUID = windows_core::GUID::from_u128(0x95044eab_31b3_47de_8e75_38a42bb03e28);
pub const CODECAPI_GUID_AVEncMLP: windows_core::GUID = windows_core::GUID::from_u128(0x05f73e29_f0d1_431e_a41c_a47432ec5a66);
pub const CODECAPI_GUID_AVEncMPEG1Audio: windows_core::GUID = windows_core::GUID::from_u128(0xd4dd1362_cd4a_4cd6_8138_b94db4542b04);
pub const CODECAPI_GUID_AVEncMPEG1Video: windows_core::GUID = windows_core::GUID::from_u128(0xc8dafefe_da1e_4774_b27d_11830c16b1fe);
pub const CODECAPI_GUID_AVEncMPEG2Audio: windows_core::GUID = windows_core::GUID::from_u128(0xee4cbb1f_9c3f_4770_92b5_fcb7c2a8d381);
pub const CODECAPI_GUID_AVEncMPEG2Video: windows_core::GUID = windows_core::GUID::from_u128(0x046dc19a_6677_4aaa_a31d_c1ab716f4560);
pub const CODECAPI_GUID_AVEncPCM: windows_core::GUID = windows_core::GUID::from_u128(0x844be7f4_26cf_4779_b386_cc05d187990c);
pub const CODECAPI_GUID_AVEncSDDS: windows_core::GUID = windows_core::GUID::from_u128(0x1dc1b82f_11c8_4c71_b7b6_ee3eb9bc2b94);
pub const CODECAPI_GUID_AVEncWMALossless: windows_core::GUID = windows_core::GUID::from_u128(0x55ca7265_23d8_4761_9031_b74fbe12f4c1);
pub const CODECAPI_GUID_AVEncWMAPro: windows_core::GUID = windows_core::GUID::from_u128(0x1955f90c_33f7_4a68_ab81_53f5657125c4);
pub const CODECAPI_GUID_AVEncWMAVoice: windows_core::GUID = windows_core::GUID::from_u128(0x13ed18cb_50e8_4276_a288_a6aa228382d9);
pub const CODECAPI_GUID_AVEncWMV: windows_core::GUID = windows_core::GUID::from_u128(0x4e0fef9b_1d43_41bd_b8bd_4d7bf7457a2a);
pub const CODECAPI_GUID_AVEndMPEG4Video: windows_core::GUID = windows_core::GUID::from_u128(0xdd37b12a_9503_4f8b_b8d0_324a00c0a1cf);
pub const CODECAPI_GetOPMContext: windows_core::GUID = windows_core::GUID::from_u128(0x2f036c05_4c14_4689_8839_294c6d73e053);
pub const CODECAPI_SETALLDEFAULTS: windows_core::GUID = windows_core::GUID::from_u128(0x6c5e6a7c_acf8_4f55_a999_1a628109051b);
pub const CODECAPI_SUPPORTSEVENTS: windows_core::GUID = windows_core::GUID::from_u128(0x0581af97_7693_4dbd_9dca_3f9ebd6585a1);
pub const CODECAPI_SetHDCPManagerContext: windows_core::GUID = windows_core::GUID::from_u128(0x6d2d1fc8_3dc9_47eb_a1a2_471c80cd60d0);
pub const CODECAPI_VIDEO_ENCODER: windows_core::GUID = windows_core::GUID::from_u128(0x7112e8e1_3d03_47ef_8e60_03f1cf537301);
pub const CODECAPI_VideoEncoderDisplayContentType: windows_core::GUID = windows_core::GUID::from_u128(0x79b90b27_f4b1_42dc_9dd7_cdaf8135c400);
pub const COPP_ProtectionType_ACP: i32 = 2i32;
pub const COPP_ProtectionType_CGMSA: i32 = 4i32;
pub const COPP_ProtectionType_HDCP: i32 = 1i32;
pub const COPP_ProtectionType_Mask: i32 = -2147483641i32;
pub const COPP_ProtectionType_None: i32 = 0i32;
pub const COPP_ProtectionType_Reserved: i32 = 2147483640i32;
pub const COPP_ProtectionType_Unknown: i32 = -2147483648i32;
pub const CPK_DS_AC3Decoder: windows_core::GUID = windows_core::GUID::from_u128(0x6c9c69d6_0ffc_4481_afdb_cdf1c79c6f3e);
pub const CPK_DS_MPEG2Decoder: windows_core::GUID = windows_core::GUID::from_u128(0x9910c5cd_95c9_4e06_865a_efa1c8016bf4);
pub const CResamplerMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0xf447b69e_1884_4a7e_8055_346f74d6edb3);
pub const CResizerDMO: windows_core::GUID = windows_core::GUID::from_u128(0x1ea1ea14_48f4_4054_ad1a_e8aee10ac805);
pub const CResizerMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0xd3ec8b8b_7728_4fd8_9fe0_7b67d19f73a3);
pub const CShotDetectorDmo: windows_core::GUID = windows_core::GUID::from_u128(0x56aefacd_110c_4397_9292_b0a0c61b6750);
pub const CSmpteTransformsDmo: windows_core::GUID = windows_core::GUID::from_u128(0xbde6388b_da25_485d_ba7f_fabc28b20318);
pub const CThumbnailGeneratorDmo: windows_core::GUID = windows_core::GUID::from_u128(0x559c6bad_1ea8_4963_a087_8a6810f9218b);
pub const CTocGeneratorDmo: windows_core::GUID = windows_core::GUID::from_u128(0x4dda1941_77a0_4fb1_a518_e2185041d70c);
pub const CVodafoneAACCCDecMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0x7e76bf7f_c993_4e26_8fab_470a70c0d59c);
pub const CVodafoneAACDecMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0x7f36f942_dcf3_4d82_9289_5b1820278f7c);
pub const CWMADecMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0x2eeb4adf_4578_4d10_bca7_bb955f56320a);
pub const CWMAEncMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0x70f598e9_f4ab_495a_99e2_a7c4d3d89abf);
pub const CWMATransMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0xedcad9cb_3127_40df_b527_0152ccb3f6f5);
pub const CWMAudioAEC: windows_core::GUID = windows_core::GUID::from_u128(0x745057c7_f353_4f2d_a7ee_58434477730e);
pub const CWMAudioCAPXGFXAPO: windows_core::GUID = windows_core::GUID::from_u128(0x13ab3ebd_137e_4903_9d89_60be8277fd17);
pub const CWMAudioCAPXLFXAPO: windows_core::GUID = windows_core::GUID::from_u128(0xc9453e73_8c5c_4463_9984_af8bab2f5447);
pub const CWMAudioGFXAPO: windows_core::GUID = windows_core::GUID::from_u128(0x637c490d_eee3_4c0a_973f_371958802da2);
pub const CWMAudioLFXAPO: windows_core::GUID = windows_core::GUID::from_u128(0x62dc1a93_ae24_464c_a43e_452f824c4250);
pub const CWMAudioSpdTxDMO: windows_core::GUID = windows_core::GUID::from_u128(0x5210f8e4_b0bb_47c3_a8d9_7b2282cc79ed);
pub const CWMSPDecMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0x874131cb_4ecc_443b_8948_746b89595d20);
pub const CWMSPEncMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0x67841b03_c689_4188_ad3f_4c9ebeec710b);
pub const CWMSPEncMediaObject2: windows_core::GUID = windows_core::GUID::from_u128(0x1f1f4e1a_2252_4063_84bb_eee75f8856d5);
pub const CWMTDecMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0xf9dbc64e_2dd0_45dd_9b52_66642ef94431);
pub const CWMTEncMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0x60b67652_e46b_4e44_8609_f74bffdc083c);
pub const CWMV9EncMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0xd23b90d0_144f_46bd_841d_59e4eb19dc59);
pub const CWMVDecMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0x82d353df_90bd_4382_8bc2_3f6192b76e34);
pub const CWMVEncMediaObject2: windows_core::GUID = windows_core::GUID::from_u128(0x96b57cdd_8966_410c_bb1f_c97eea765c04);
pub const CWMVXEncMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0x7e320092_596a_41b2_bbeb_175d10504eb6);
pub const CWVC1DecMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0xc9bfbccf_e60e_4588_a3df_5a03b1fd9585);
pub const CWVC1EncMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0x44653d0d_8cca_41e7_baca_884337b747ac);
pub const CZuneAACCCDecMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0xa74e98f2_52d6_4b4e_885b_e0a6ca4f187a);
pub const CZuneM4S2DecMediaObject: windows_core::GUID = windows_core::GUID::from_u128(0xc56fc25c_0fc6_404a_9503_b10bf51a8ab9);
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct CodecAPIEventData {
pub guid: windows_core::GUID,
pub dataLength: u32,
pub reserved: [u32; 3],
}
impl Default for CodecAPIEventData {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_BITSTREAM_ENCRYPTION_TYPE(pub i32);
pub const D3D12_BITSTREAM_ENCRYPTION_TYPE_NONE: D3D12_BITSTREAM_ENCRYPTION_TYPE = D3D12_BITSTREAM_ENCRYPTION_TYPE(0i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_ARCHITECTURE {
pub IOCoherent: windows_core::BOOL,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_DECODER_HEAP_SIZE {
pub VideoDecoderHeapDesc: D3D12_VIDEO_DECODER_HEAP_DESC,
pub MemoryPoolL0Size: u64,
pub MemoryPoolL1Size: u64,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_DECODER_HEAP_SIZE1 {
pub VideoDecoderHeapDesc: D3D12_VIDEO_DECODER_HEAP_DESC,
pub Protected: windows_core::BOOL,
pub MemoryPoolL0Size: u64,
pub MemoryPoolL1Size: u64,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_DECODE_CONVERSION_SUPPORT {
pub NodeIndex: u32,
pub Configuration: D3D12_VIDEO_DECODE_CONFIGURATION,
pub DecodeSample: D3D12_VIDEO_SAMPLE,
pub OutputFormat: D3D12_VIDEO_FORMAT,
pub FrameRate: super::super::Graphics::Dxgi::Common::DXGI_RATIONAL,
pub BitRate: u32,
pub SupportFlags: D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAGS,
pub ScaleSupport: D3D12_VIDEO_SCALE_SUPPORT,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_DECODE_FORMATS {
pub NodeIndex: u32,
pub Configuration: D3D12_VIDEO_DECODE_CONFIGURATION,
pub FormatCount: u32,
pub pOutputFormats: *mut super::super::Graphics::Dxgi::Common::DXGI_FORMAT,
}
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
impl Default for D3D12_FEATURE_DATA_VIDEO_DECODE_FORMATS {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_DECODE_FORMAT_COUNT {
pub NodeIndex: u32,
pub Configuration: D3D12_VIDEO_DECODE_CONFIGURATION,
pub FormatCount: u32,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_DECODE_HISTOGRAM {
pub NodeIndex: u32,
pub DecodeProfile: windows_core::GUID,
pub Width: u32,
pub Height: u32,
pub DecodeFormat: super::super::Graphics::Dxgi::Common::DXGI_FORMAT,
pub Components: D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS,
pub BinCount: u32,
pub CounterBitDepth: u32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_DECODE_PROFILES {
pub NodeIndex: u32,
pub ProfileCount: u32,
pub pProfiles: *mut windows_core::GUID,
}
impl Default for D3D12_FEATURE_DATA_VIDEO_DECODE_PROFILES {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_DECODE_PROFILE_COUNT {
pub NodeIndex: u32,
pub ProfileCount: u32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_DECODE_PROTECTED_RESOURCES {
pub NodeIndex: u32,
pub Configuration: D3D12_VIDEO_DECODE_CONFIGURATION,
pub SupportFlags: D3D12_VIDEO_PROTECTED_RESOURCE_SUPPORT_FLAGS,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_DECODE_SUPPORT {
pub NodeIndex: u32,
pub Configuration: D3D12_VIDEO_DECODE_CONFIGURATION,
pub Width: u32,
pub Height: u32,
pub DecodeFormat: super::super::Graphics::Dxgi::Common::DXGI_FORMAT,
pub FrameRate: super::super::Graphics::Dxgi::Common::DXGI_RATIONAL,
pub BitRate: u32,
pub SupportFlags: D3D12_VIDEO_DECODE_SUPPORT_FLAGS,
pub ConfigurationFlags: D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS,
pub DecodeTier: D3D12_VIDEO_DECODE_TIER,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_ENCODER_CODEC {
pub NodeIndex: u32,
pub Codec: D3D12_VIDEO_ENCODER_CODEC,
pub IsSupported: windows_core::BOOL,
}
#[repr(C)]
#[derive(Clone, Copy)]
pub struct D3D12_FEATURE_DATA_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT {
pub NodeIndex: u32,
pub Codec: D3D12_VIDEO_ENCODER_CODEC,
pub Profile: D3D12_VIDEO_ENCODER_PROFILE_DESC,
pub IsSupported: windows_core::BOOL,
pub CodecSupportLimits: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT,
}
impl Default for D3D12_FEATURE_DATA_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub struct D3D12_FEATURE_DATA_VIDEO_ENCODER_CODEC_PICTURE_CONTROL_SUPPORT {
pub NodeIndex: u32,
pub Codec: D3D12_VIDEO_ENCODER_CODEC,
pub Profile: D3D12_VIDEO_ENCODER_PROFILE_DESC,
pub IsSupported: windows_core::BOOL,
pub PictureSupport: D3D12_VIDEO_ENCODER_CODEC_PICTURE_CONTROL_SUPPORT,
}
impl Default for D3D12_FEATURE_DATA_VIDEO_ENCODER_CODEC_PICTURE_CONTROL_SUPPORT {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub struct D3D12_FEATURE_DATA_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_CONFIG {
pub NodeIndex: u32,
pub Codec: D3D12_VIDEO_ENCODER_CODEC,
pub Profile: D3D12_VIDEO_ENCODER_PROFILE_DESC,
pub Level: D3D12_VIDEO_ENCODER_LEVEL_SETTING,
pub SubregionMode: D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE,
pub FrameResolution: D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC,
pub CodecSupport: D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_CONFIG_SUPPORT,
pub IsSupported: windows_core::BOOL,
}
impl Default for D3D12_FEATURE_DATA_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_CONFIG {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub struct D3D12_FEATURE_DATA_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE {
pub NodeIndex: u32,
pub Codec: D3D12_VIDEO_ENCODER_CODEC,
pub Profile: D3D12_VIDEO_ENCODER_PROFILE_DESC,
pub Level: D3D12_VIDEO_ENCODER_LEVEL_SETTING,
pub SubregionMode: D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE,
pub IsSupported: windows_core::BOOL,
}
impl Default for D3D12_FEATURE_DATA_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub struct D3D12_FEATURE_DATA_VIDEO_ENCODER_HEAP_SIZE {
pub HeapDesc: D3D12_VIDEO_ENCODER_HEAP_DESC,
pub IsSupported: windows_core::BOOL,
pub MemoryPoolL0Size: u64,
pub MemoryPoolL1Size: u64,
}
impl Default for D3D12_FEATURE_DATA_VIDEO_ENCODER_HEAP_SIZE {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[derive(Clone, Copy)]
pub struct D3D12_FEATURE_DATA_VIDEO_ENCODER_INPUT_FORMAT {
pub NodeIndex: u32,
pub Codec: D3D12_VIDEO_ENCODER_CODEC,
pub Profile: D3D12_VIDEO_ENCODER_PROFILE_DESC,
pub Format: super::super::Graphics::Dxgi::Common::DXGI_FORMAT,
pub IsSupported: windows_core::BOOL,
}
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
impl Default for D3D12_FEATURE_DATA_VIDEO_ENCODER_INPUT_FORMAT {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub struct D3D12_FEATURE_DATA_VIDEO_ENCODER_INTRA_REFRESH_MODE {
pub NodeIndex: u32,
pub Codec: D3D12_VIDEO_ENCODER_CODEC,
pub Profile: D3D12_VIDEO_ENCODER_PROFILE_DESC,
pub Level: D3D12_VIDEO_ENCODER_LEVEL_SETTING,
pub IntraRefreshMode: D3D12_VIDEO_ENCODER_INTRA_REFRESH_MODE,
pub IsSupported: windows_core::BOOL,
}
impl Default for D3D12_FEATURE_DATA_VIDEO_ENCODER_INTRA_REFRESH_MODE {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_ENCODER_OUTPUT_RESOLUTION {
pub NodeIndex: u32,
pub Codec: D3D12_VIDEO_ENCODER_CODEC,
pub ResolutionRatiosCount: u32,
pub IsSupported: windows_core::BOOL,
pub MinResolutionSupported: D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC,
pub MaxResolutionSupported: D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC,
pub ResolutionWidthMultipleRequirement: u32,
pub ResolutionHeightMultipleRequirement: u32,
pub pResolutionRatios: *mut D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_RATIO_DESC,
}
impl Default for D3D12_FEATURE_DATA_VIDEO_ENCODER_OUTPUT_RESOLUTION {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_ENCODER_OUTPUT_RESOLUTION_RATIOS_COUNT {
pub NodeIndex: u32,
pub Codec: D3D12_VIDEO_ENCODER_CODEC,
pub ResolutionRatiosCount: u32,
}
#[repr(C)]
#[derive(Clone, Copy)]
pub struct D3D12_FEATURE_DATA_VIDEO_ENCODER_PROFILE_LEVEL {
pub NodeIndex: u32,
pub Codec: D3D12_VIDEO_ENCODER_CODEC,
pub Profile: D3D12_VIDEO_ENCODER_PROFILE_DESC,
pub IsSupported: windows_core::BOOL,
pub MinSupportedLevel: D3D12_VIDEO_ENCODER_LEVEL_SETTING,
pub MaxSupportedLevel: D3D12_VIDEO_ENCODER_LEVEL_SETTING,
}
impl Default for D3D12_FEATURE_DATA_VIDEO_ENCODER_PROFILE_LEVEL {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_ENCODER_RATE_CONTROL_MODE {
pub NodeIndex: u32,
pub Codec: D3D12_VIDEO_ENCODER_CODEC,
pub RateControlMode: D3D12_VIDEO_ENCODER_RATE_CONTROL_MODE,
pub IsSupported: windows_core::BOOL,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_ENCODER_RESOLUTION_SUPPORT_LIMITS {
pub MaxSubregionsNumber: u32,
pub MaxIntraRefreshFrameDuration: u32,
pub SubregionBlockPixelsSize: u32,
pub QPMapRegionPixelsSize: u32,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[derive(Clone, Copy)]
pub struct D3D12_FEATURE_DATA_VIDEO_ENCODER_RESOURCE_REQUIREMENTS {
pub NodeIndex: u32,
pub Codec: D3D12_VIDEO_ENCODER_CODEC,
pub Profile: D3D12_VIDEO_ENCODER_PROFILE_DESC,
pub InputFormat: super::super::Graphics::Dxgi::Common::DXGI_FORMAT,
pub PictureTargetResolution: D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC,
pub IsSupported: windows_core::BOOL,
pub CompressedBitstreamBufferAccessAlignment: u32,
pub EncoderMetadataBufferAccessAlignment: u32,
pub MaxEncoderOutputMetadataBufferSize: u32,
}
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
impl Default for D3D12_FEATURE_DATA_VIDEO_ENCODER_RESOURCE_REQUIREMENTS {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[derive(Clone, Copy)]
pub struct D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT {
pub NodeIndex: u32,
pub Codec: D3D12_VIDEO_ENCODER_CODEC,
pub InputFormat: super::super::Graphics::Dxgi::Common::DXGI_FORMAT,
pub CodecConfiguration: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION,
pub CodecGopSequence: D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE,
pub RateControl: D3D12_VIDEO_ENCODER_RATE_CONTROL,
pub IntraRefresh: D3D12_VIDEO_ENCODER_INTRA_REFRESH_MODE,
pub SubregionFrameEncoding: D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE,
pub ResolutionsListCount: u32,
pub pResolutionList: *const D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC,
pub MaxReferenceFramesInDPB: u32,
pub ValidationFlags: D3D12_VIDEO_ENCODER_VALIDATION_FLAGS,
pub SupportFlags: D3D12_VIDEO_ENCODER_SUPPORT_FLAGS,
pub SuggestedProfile: D3D12_VIDEO_ENCODER_PROFILE_DESC,
pub SuggestedLevel: D3D12_VIDEO_ENCODER_LEVEL_SETTING,
pub pResolutionDependentSupport: *mut D3D12_FEATURE_DATA_VIDEO_ENCODER_RESOLUTION_SUPPORT_LIMITS,
}
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
impl Default for D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[derive(Clone, Copy)]
pub struct D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT1 {
pub NodeIndex: u32,
pub Codec: D3D12_VIDEO_ENCODER_CODEC,
pub InputFormat: super::super::Graphics::Dxgi::Common::DXGI_FORMAT,
pub CodecConfiguration: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION,
pub CodecGopSequence: D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE,
pub RateControl: D3D12_VIDEO_ENCODER_RATE_CONTROL,
pub IntraRefresh: D3D12_VIDEO_ENCODER_INTRA_REFRESH_MODE,
pub SubregionFrameEncoding: D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE,
pub ResolutionsListCount: u32,
pub pResolutionList: *const D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC,
pub MaxReferenceFramesInDPB: u32,
pub ValidationFlags: D3D12_VIDEO_ENCODER_VALIDATION_FLAGS,
pub SupportFlags: D3D12_VIDEO_ENCODER_SUPPORT_FLAGS,
pub SuggestedProfile: D3D12_VIDEO_ENCODER_PROFILE_DESC,
pub SuggestedLevel: D3D12_VIDEO_ENCODER_LEVEL_SETTING,
pub pResolutionDependentSupport: *mut D3D12_FEATURE_DATA_VIDEO_ENCODER_RESOLUTION_SUPPORT_LIMITS,
pub SubregionFrameEncodingData: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA,
pub MaxQualityVsSpeed: u32,
}
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
impl Default for D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT1 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMANDS {
pub NodeIndex: u32,
pub CommandCount: u32,
pub pCommandInfos: *mut D3D12_VIDEO_EXTENSION_COMMAND_INFO,
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl Default for D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMANDS {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMAND_COUNT {
pub NodeIndex: u32,
pub CommandCount: u32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMAND_PARAMETERS {
pub CommandId: windows_core::GUID,
pub Stage: D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_STAGE,
pub ParameterCount: u32,
pub pParameterInfos: *mut D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_INFO,
}
impl Default for D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMAND_PARAMETERS {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMAND_PARAMETER_COUNT {
pub CommandId: windows_core::GUID,
pub Stage: D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_STAGE,
pub ParameterCount: u32,
pub ParameterPacking: u32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMAND_SIZE {
pub NodeIndex: u32,
pub CommandId: windows_core::GUID,
pub pCreationParameters: *const core::ffi::c_void,
pub CreationParametersSizeInBytes: usize,
pub MemoryPoolL0Size: u64,
pub MemoryPoolL1Size: u64,
}
impl Default for D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMAND_SIZE {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMAND_SUPPORT {
pub NodeIndex: u32,
pub CommandId: windows_core::GUID,
pub pInputData: *const core::ffi::c_void,
pub InputDataSizeInBytes: usize,
pub pOutputData: *mut core::ffi::c_void,
pub OutputDataSizeInBytes: usize,
}
impl Default for D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMAND_SUPPORT {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_FEATURE_AREA_SUPPORT {
pub NodeIndex: u32,
pub VideoDecodeSupport: windows_core::BOOL,
pub VideoProcessSupport: windows_core::BOOL,
pub VideoEncodeSupport: windows_core::BOOL,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_MOTION_ESTIMATOR {
pub NodeIndex: u32,
pub InputFormat: super::super::Graphics::Dxgi::Common::DXGI_FORMAT,
pub BlockSizeFlags: D3D12_VIDEO_MOTION_ESTIMATOR_SEARCH_BLOCK_SIZE_FLAGS,
pub PrecisionFlags: D3D12_VIDEO_MOTION_ESTIMATOR_VECTOR_PRECISION_FLAGS,
pub SizeRange: D3D12_VIDEO_SIZE_RANGE,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_MOTION_ESTIMATOR_PROTECTED_RESOURCES {
pub NodeIndex: u32,
pub SupportFlags: D3D12_VIDEO_PROTECTED_RESOURCE_SUPPORT_FLAGS,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_MOTION_ESTIMATOR_SIZE {
pub NodeIndex: u32,
pub InputFormat: super::super::Graphics::Dxgi::Common::DXGI_FORMAT,
pub BlockSize: D3D12_VIDEO_MOTION_ESTIMATOR_SEARCH_BLOCK_SIZE,
pub Precision: D3D12_VIDEO_MOTION_ESTIMATOR_VECTOR_PRECISION,
pub SizeRange: D3D12_VIDEO_SIZE_RANGE,
pub Protected: windows_core::BOOL,
pub MotionVectorHeapMemoryPoolL0Size: u64,
pub MotionVectorHeapMemoryPoolL1Size: u64,
pub MotionEstimatorMemoryPoolL0Size: u64,
pub MotionEstimatorMemoryPoolL1Size: u64,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_PROCESSOR_SIZE {
pub NodeMask: u32,
pub pOutputStreamDesc: *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC,
pub NumInputStreamDescs: u32,
pub pInputStreamDescs: *const D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC,
pub MemoryPoolL0Size: u64,
pub MemoryPoolL1Size: u64,
}
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
impl Default for D3D12_FEATURE_DATA_VIDEO_PROCESSOR_SIZE {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_PROCESSOR_SIZE1 {
pub NodeMask: u32,
pub pOutputStreamDesc: *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC,
pub NumInputStreamDescs: u32,
pub pInputStreamDescs: *const D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC,
pub Protected: windows_core::BOOL,
pub MemoryPoolL0Size: u64,
pub MemoryPoolL1Size: u64,
}
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
impl Default for D3D12_FEATURE_DATA_VIDEO_PROCESSOR_SIZE1 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_PROCESS_MAX_INPUT_STREAMS {
pub NodeIndex: u32,
pub MaxInputStreams: u32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_PROCESS_PROTECTED_RESOURCES {
pub NodeIndex: u32,
pub SupportFlags: D3D12_VIDEO_PROTECTED_RESOURCE_SUPPORT_FLAGS,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_PROCESS_REFERENCE_INFO {
pub NodeIndex: u32,
pub DeinterlaceMode: D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS,
pub Filters: D3D12_VIDEO_PROCESS_FILTER_FLAGS,
pub FeatureSupport: D3D12_VIDEO_PROCESS_FEATURE_FLAGS,
pub InputFrameRate: super::super::Graphics::Dxgi::Common::DXGI_RATIONAL,
pub OutputFrameRate: super::super::Graphics::Dxgi::Common::DXGI_RATIONAL,
pub EnableAutoProcessing: windows_core::BOOL,
pub PastFrames: u32,
pub FutureFrames: u32,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_FEATURE_DATA_VIDEO_PROCESS_SUPPORT {
pub NodeIndex: u32,
pub InputSample: D3D12_VIDEO_SAMPLE,
pub InputFieldType: D3D12_VIDEO_FIELD_TYPE,
pub InputStereoFormat: D3D12_VIDEO_FRAME_STEREO_FORMAT,
pub InputFrameRate: super::super::Graphics::Dxgi::Common::DXGI_RATIONAL,
pub OutputFormat: D3D12_VIDEO_FORMAT,
pub OutputStereoFormat: D3D12_VIDEO_FRAME_STEREO_FORMAT,
pub OutputFrameRate: super::super::Graphics::Dxgi::Common::DXGI_RATIONAL,
pub SupportFlags: D3D12_VIDEO_PROCESS_SUPPORT_FLAGS,
pub ScaleSupport: D3D12_VIDEO_SCALE_SUPPORT,
pub FeatureSupport: D3D12_VIDEO_PROCESS_FEATURE_FLAGS,
pub DeinterlaceSupport: D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS,
pub AutoProcessingSupport: D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS,
pub FilterSupport: D3D12_VIDEO_PROCESS_FILTER_FLAGS,
pub FilterRangeSupport: [D3D12_VIDEO_PROCESS_FILTER_RANGE; 32],
}
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
impl Default for D3D12_FEATURE_DATA_VIDEO_PROCESS_SUPPORT {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_FEATURE_VIDEO(pub i32);
pub const D3D12_FEATURE_VIDEO_ARCHITECTURE: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(17i32);
pub const D3D12_FEATURE_VIDEO_DECODER_HEAP_SIZE: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(8i32);
pub const D3D12_FEATURE_VIDEO_DECODER_HEAP_SIZE1: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(31i32);
pub const D3D12_FEATURE_VIDEO_DECODE_CONVERSION_SUPPORT: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(3i32);
pub const D3D12_FEATURE_VIDEO_DECODE_FORMATS: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(2i32);
pub const D3D12_FEATURE_VIDEO_DECODE_FORMAT_COUNT: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(11i32);
pub const D3D12_FEATURE_VIDEO_DECODE_HISTOGRAM: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(18i32);
pub const D3D12_FEATURE_VIDEO_DECODE_PROFILES: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(1i32);
pub const D3D12_FEATURE_VIDEO_DECODE_PROFILE_COUNT: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(10i32);
pub const D3D12_FEATURE_VIDEO_DECODE_PROTECTED_RESOURCES: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(28i32);
pub const D3D12_FEATURE_VIDEO_DECODE_SUPPORT: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(0i32);
pub const D3D12_FEATURE_VIDEO_ENCODER_CODEC: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(33i32);
pub const D3D12_FEATURE_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(42i32);
pub const D3D12_FEATURE_VIDEO_ENCODER_CODEC_PICTURE_CONTROL_SUPPORT: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(44i32);
pub const D3D12_FEATURE_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_CONFIG: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(46i32);
pub const D3D12_FEATURE_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(40i32);
pub const D3D12_FEATURE_VIDEO_ENCODER_HEAP_SIZE: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(41i32);
pub const D3D12_FEATURE_VIDEO_ENCODER_INPUT_FORMAT: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(37i32);
pub const D3D12_FEATURE_VIDEO_ENCODER_INTRA_REFRESH_MODE: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(39i32);
pub const D3D12_FEATURE_VIDEO_ENCODER_OUTPUT_RESOLUTION: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(36i32);
pub const D3D12_FEATURE_VIDEO_ENCODER_OUTPUT_RESOLUTION_RATIOS_COUNT: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(35i32);
pub const D3D12_FEATURE_VIDEO_ENCODER_PROFILE_LEVEL: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(34i32);
pub const D3D12_FEATURE_VIDEO_ENCODER_RATE_CONTROL_MODE: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(38i32);
pub const D3D12_FEATURE_VIDEO_ENCODER_RESOURCE_REQUIREMENTS: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(45i32);
pub const D3D12_FEATURE_VIDEO_ENCODER_SUPPORT: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(43i32);
pub const D3D12_FEATURE_VIDEO_ENCODER_SUPPORT1: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(47i32);
pub const D3D12_FEATURE_VIDEO_EXTENSION_COMMANDS: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(23i32);
pub const D3D12_FEATURE_VIDEO_EXTENSION_COMMAND_COUNT: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(22i32);
pub const D3D12_FEATURE_VIDEO_EXTENSION_COMMAND_PARAMETERS: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(25i32);
pub const D3D12_FEATURE_VIDEO_EXTENSION_COMMAND_PARAMETER_COUNT: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(24i32);
pub const D3D12_FEATURE_VIDEO_EXTENSION_COMMAND_SIZE: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(27i32);
pub const D3D12_FEATURE_VIDEO_EXTENSION_COMMAND_SUPPORT: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(26i32);
pub const D3D12_FEATURE_VIDEO_FEATURE_AREA_SUPPORT: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(19i32);
pub const D3D12_FEATURE_VIDEO_MOTION_ESTIMATOR: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(20i32);
pub const D3D12_FEATURE_VIDEO_MOTION_ESTIMATOR_PROTECTED_RESOURCES: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(30i32);
pub const D3D12_FEATURE_VIDEO_MOTION_ESTIMATOR_SIZE: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(21i32);
pub const D3D12_FEATURE_VIDEO_PROCESSOR_SIZE: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(9i32);
pub const D3D12_FEATURE_VIDEO_PROCESSOR_SIZE1: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(32i32);
pub const D3D12_FEATURE_VIDEO_PROCESS_MAX_INPUT_STREAMS: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(6i32);
pub const D3D12_FEATURE_VIDEO_PROCESS_PROTECTED_RESOURCES: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(29i32);
pub const D3D12_FEATURE_VIDEO_PROCESS_REFERENCE_INFO: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(7i32);
pub const D3D12_FEATURE_VIDEO_PROCESS_SUPPORT: D3D12_FEATURE_VIDEO = D3D12_FEATURE_VIDEO(5i32);
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_QUERY_DATA_VIDEO_DECODE_STATISTICS {
pub Status: u64,
pub NumMacroblocksAffected: u64,
pub FrameRate: super::super::Graphics::Dxgi::Common::DXGI_RATIONAL,
pub BitRate: u32,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct D3D12_RESOLVE_VIDEO_MOTION_VECTOR_HEAP_INPUT {
pub pMotionVectorHeap: core::mem::ManuallyDrop<Option<ID3D12VideoMotionVectorHeap>>,
pub PixelWidth: u32,
pub PixelHeight: u32,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct D3D12_RESOLVE_VIDEO_MOTION_VECTOR_HEAP_OUTPUT {
pub pMotionVectorTexture2D: core::mem::ManuallyDrop<Option<super::super::Graphics::Direct3D12::ID3D12Resource>>,
pub MotionVectorCoordinate: D3D12_RESOURCE_COORDINATE,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_RESOURCE_COORDINATE {
pub X: u64,
pub Y: u32,
pub Z: u32,
pub SubresourceIndex: u32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_DECODER_DESC {
pub NodeMask: u32,
pub Configuration: D3D12_VIDEO_DECODE_CONFIGURATION,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_DECODER_HEAP_DESC {
pub NodeMask: u32,
pub Configuration: D3D12_VIDEO_DECODE_CONFIGURATION,
pub DecodeWidth: u32,
pub DecodeHeight: u32,
pub Format: super::super::Graphics::Dxgi::Common::DXGI_FORMAT,
pub FrameRate: super::super::Graphics::Dxgi::Common::DXGI_RATIONAL,
pub BitRate: u32,
pub MaxDecodePictureBufferCount: u32,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_DECODE_ARGUMENT_TYPE(pub i32);
pub const D3D12_VIDEO_DECODE_ARGUMENT_TYPE_HUFFMAN_TABLE: D3D12_VIDEO_DECODE_ARGUMENT_TYPE = D3D12_VIDEO_DECODE_ARGUMENT_TYPE(3i32);
pub const D3D12_VIDEO_DECODE_ARGUMENT_TYPE_INVERSE_QUANTIZATION_MATRIX: D3D12_VIDEO_DECODE_ARGUMENT_TYPE = D3D12_VIDEO_DECODE_ARGUMENT_TYPE(1i32);
pub const D3D12_VIDEO_DECODE_ARGUMENT_TYPE_PICTURE_PARAMETERS: D3D12_VIDEO_DECODE_ARGUMENT_TYPE = D3D12_VIDEO_DECODE_ARGUMENT_TYPE(0i32);
pub const D3D12_VIDEO_DECODE_ARGUMENT_TYPE_SLICE_CONTROL: D3D12_VIDEO_DECODE_ARGUMENT_TYPE = D3D12_VIDEO_DECODE_ARGUMENT_TYPE(2i32);
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_DECODE_COMPRESSED_BITSTREAM {
pub pBuffer: core::mem::ManuallyDrop<Option<super::super::Graphics::Direct3D12::ID3D12Resource>>,
pub Offset: u64,
pub Size: u64,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_DECODE_CONFIGURATION {
pub DecodeProfile: windows_core::GUID,
pub BitstreamEncryption: D3D12_BITSTREAM_ENCRYPTION_TYPE,
pub InterlaceType: D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS(pub i32);
impl D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_DECODE_CONFIGURATION_FLAG_ALLOW_RESOLUTION_CHANGE_ON_NON_KEY_FRAME: D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS = D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS(8i32);
pub const D3D12_VIDEO_DECODE_CONFIGURATION_FLAG_HEIGHT_ALIGNMENT_MULTIPLE_32_REQUIRED: D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS = D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS(1i32);
pub const D3D12_VIDEO_DECODE_CONFIGURATION_FLAG_NONE: D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS = D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS(0i32);
pub const D3D12_VIDEO_DECODE_CONFIGURATION_FLAG_POST_PROCESSING_SUPPORTED: D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS = D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS(2i32);
pub const D3D12_VIDEO_DECODE_CONFIGURATION_FLAG_REFERENCE_ONLY_ALLOCATIONS_REQUIRED: D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS = D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS(4i32);
#[repr(C)]
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_DECODE_CONVERSION_ARGUMENTS {
pub Enable: windows_core::BOOL,
pub pReferenceTexture2D: core::mem::ManuallyDrop<Option<super::super::Graphics::Direct3D12::ID3D12Resource>>,
pub ReferenceSubresource: u32,
pub OutputColorSpace: super::super::Graphics::Dxgi::Common::DXGI_COLOR_SPACE_TYPE,
pub DecodeColorSpace: super::super::Graphics::Dxgi::Common::DXGI_COLOR_SPACE_TYPE,
}
#[repr(C)]
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_DECODE_CONVERSION_ARGUMENTS1 {
pub Enable: windows_core::BOOL,
pub pReferenceTexture2D: core::mem::ManuallyDrop<Option<super::super::Graphics::Direct3D12::ID3D12Resource>>,
pub ReferenceSubresource: u32,
pub OutputColorSpace: super::super::Graphics::Dxgi::Common::DXGI_COLOR_SPACE_TYPE,
pub DecodeColorSpace: super::super::Graphics::Dxgi::Common::DXGI_COLOR_SPACE_TYPE,
pub OutputWidth: u32,
pub OutputHeight: u32,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAGS(pub i32);
impl D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAG_NONE: D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAGS = D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAGS(0i32);
pub const D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAG_SUPPORTED: D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAGS = D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAGS(1i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_VIDEO_DECODE_FRAME_ARGUMENT {
pub Type: D3D12_VIDEO_DECODE_ARGUMENT_TYPE,
pub Size: u32,
pub pData: *mut core::ffi::c_void,
}
impl Default for D3D12_VIDEO_DECODE_FRAME_ARGUMENT {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT(pub i32);
pub const D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_A: D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT = D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT(3i32);
pub const D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_B: D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT = D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS(pub i32);
impl D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAG_A: D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS = D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS(8i32);
pub const D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAG_B: D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS = D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS(4i32);
pub const D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAG_G: D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS = D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS(2i32);
pub const D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAG_NONE: D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS = D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS(0i32);
pub const D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAG_R: D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS = D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS(1i32);
pub const D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAG_U: D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS = D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS(2i32);
pub const D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAG_V: D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS = D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS(4i32);
pub const D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAG_Y: D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS = D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS(1i32);
pub const D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_G: D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT = D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT(1i32);
pub const D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_R: D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT = D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT(0i32);
pub const D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_U: D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT = D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT(1i32);
pub const D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_V: D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT = D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT(2i32);
pub const D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_Y: D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT = D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT(0i32);
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[derive(Clone, Debug, PartialEq)]
pub struct D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS {
pub NumFrameArguments: u32,
pub FrameArguments: [D3D12_VIDEO_DECODE_FRAME_ARGUMENT; 10],
pub ReferenceFrames: D3D12_VIDEO_DECODE_REFERENCE_FRAMES,
pub CompressedBitstream: D3D12_VIDEO_DECODE_COMPRESSED_BITSTREAM,
pub pHeap: core::mem::ManuallyDrop<Option<ID3D12VideoDecoderHeap>>,
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl Default for D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_DECODE_OUTPUT_HISTOGRAM {
pub Offset: u64,
pub pBuffer: core::mem::ManuallyDrop<Option<super::super::Graphics::Direct3D12::ID3D12Resource>>,
}
#[repr(C)]
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS {
pub pOutputTexture2D: core::mem::ManuallyDrop<Option<super::super::Graphics::Direct3D12::ID3D12Resource>>,
pub OutputSubresource: u32,
pub ConversionArguments: D3D12_VIDEO_DECODE_CONVERSION_ARGUMENTS,
}
#[repr(C)]
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
#[derive(Clone, Debug, PartialEq)]
pub struct D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS1 {
pub pOutputTexture2D: core::mem::ManuallyDrop<Option<super::super::Graphics::Direct3D12::ID3D12Resource>>,
pub OutputSubresource: u32,
pub ConversionArguments: D3D12_VIDEO_DECODE_CONVERSION_ARGUMENTS1,
pub Histograms: [D3D12_VIDEO_DECODE_OUTPUT_HISTOGRAM; 4],
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl Default for D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS1 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const D3D12_VIDEO_DECODE_PROFILE_AV1_12BIT_PROFILE2: windows_core::GUID = windows_core::GUID::from_u128(0x17127009_a00f_4ce1_994e_bf4081f6f3f0);
pub const D3D12_VIDEO_DECODE_PROFILE_AV1_12BIT_PROFILE2_420: windows_core::GUID = windows_core::GUID::from_u128(0x2d80bed6_9cac_4835_9e91_327bbc4f9ee8);
pub const D3D12_VIDEO_DECODE_PROFILE_AV1_PROFILE0: windows_core::GUID = windows_core::GUID::from_u128(0xb8be4ccb_cf53_46ba_8d59_d6b8a6da5d2a);
pub const D3D12_VIDEO_DECODE_PROFILE_AV1_PROFILE1: windows_core::GUID = windows_core::GUID::from_u128(0x6936ff0f_45b1_4163_9cc1_646ef6946108);
pub const D3D12_VIDEO_DECODE_PROFILE_AV1_PROFILE2: windows_core::GUID = windows_core::GUID::from_u128(0x0c5f2aa1_e541_4089_bb7b_98110a19d7c8);
pub const D3D12_VIDEO_DECODE_PROFILE_H264: windows_core::GUID = windows_core::GUID::from_u128(0x1b81be68_a0c7_11d3_b984_00c04f2e73c5);
pub const D3D12_VIDEO_DECODE_PROFILE_H264_MULTIVIEW: windows_core::GUID = windows_core::GUID::from_u128(0x705b9d82_76cf_49d6_b7e6_ac8872db013c);
pub const D3D12_VIDEO_DECODE_PROFILE_H264_STEREO: windows_core::GUID = windows_core::GUID::from_u128(0xf9aaccbb_c2b6_4cfc_8779_5707b1760552);
pub const D3D12_VIDEO_DECODE_PROFILE_H264_STEREO_PROGRESSIVE: windows_core::GUID = windows_core::GUID::from_u128(0xd79be8da_0cf1_4c81_b82a_69a4e236f43d);
pub const D3D12_VIDEO_DECODE_PROFILE_HEVC_MAIN: windows_core::GUID = windows_core::GUID::from_u128(0x5b11d51b_2f4c_4452_bcc3_09f2a1160cc0);
pub const D3D12_VIDEO_DECODE_PROFILE_HEVC_MAIN10: windows_core::GUID = windows_core::GUID::from_u128(0x107af0e0_ef1a_4d19_aba8_67a163073d13);
pub const D3D12_VIDEO_DECODE_PROFILE_HEVC_MAIN10_422: windows_core::GUID = windows_core::GUID::from_u128(0x0bac4fe5_1532_4429_a854_f84de04953db);
pub const D3D12_VIDEO_DECODE_PROFILE_HEVC_MAIN10_444: windows_core::GUID = windows_core::GUID::from_u128(0x0dabeffa_4458_4602_bc03_0795659d617c);
pub const D3D12_VIDEO_DECODE_PROFILE_HEVC_MAIN10_EXT: windows_core::GUID = windows_core::GUID::from_u128(0x9cc55490_e37c_4932_8684_4920f9f6409c);
pub const D3D12_VIDEO_DECODE_PROFILE_HEVC_MAIN12: windows_core::GUID = windows_core::GUID::from_u128(0x1a72925f_0c2c_4f15_96fb_b17d1473603f);
pub const D3D12_VIDEO_DECODE_PROFILE_HEVC_MAIN12_422: windows_core::GUID = windows_core::GUID::from_u128(0x55bcac81_f311_4093_a7d0_1cbc0b849bee);
pub const D3D12_VIDEO_DECODE_PROFILE_HEVC_MAIN12_444: windows_core::GUID = windows_core::GUID::from_u128(0x9798634d_fe9d_48e5_b4da_dbec45b3df01);
pub const D3D12_VIDEO_DECODE_PROFILE_HEVC_MAIN16: windows_core::GUID = windows_core::GUID::from_u128(0xa4fbdbb0_a113_482b_a232_635cc0697f6d);
pub const D3D12_VIDEO_DECODE_PROFILE_HEVC_MAIN_444: windows_core::GUID = windows_core::GUID::from_u128(0x4008018f_f537_4b36_98cf_61af8a2c1a33);
pub const D3D12_VIDEO_DECODE_PROFILE_HEVC_MONOCHROME: windows_core::GUID = windows_core::GUID::from_u128(0x0685b993_3d8c_43a0_8b28_d74c2d6899a4);
pub const D3D12_VIDEO_DECODE_PROFILE_HEVC_MONOCHROME10: windows_core::GUID = windows_core::GUID::from_u128(0x142a1d0f_69dd_4ec9_8591_b12ffcb91a29);
pub const D3D12_VIDEO_DECODE_PROFILE_JPEG_VLD_420: windows_core::GUID = windows_core::GUID::from_u128(0xcf782c83_bef5_4a2c_87cb_6019e7b175ac);
pub const D3D12_VIDEO_DECODE_PROFILE_JPEG_VLD_422: windows_core::GUID = windows_core::GUID::from_u128(0xf04df417_eee2_4067_a778_f35c15ab9721);
pub const D3D12_VIDEO_DECODE_PROFILE_JPEG_VLD_444: windows_core::GUID = windows_core::GUID::from_u128(0x4cd00e17_89ba_48ef_b9f9_edcb82713f65);
pub const D3D12_VIDEO_DECODE_PROFILE_MJPEG_VLD_420: windows_core::GUID = windows_core::GUID::from_u128(0x725cb506_0c29_43c4_9440_8e9397903a04);
pub const D3D12_VIDEO_DECODE_PROFILE_MJPEG_VLD_422: windows_core::GUID = windows_core::GUID::from_u128(0x5b77b9cd_1a35_4c30_9fd8_ef4b60c035dd);
pub const D3D12_VIDEO_DECODE_PROFILE_MJPEG_VLD_444: windows_core::GUID = windows_core::GUID::from_u128(0xd95161f9_0d44_47e6_bcf5_1bfbfb268f97);
pub const D3D12_VIDEO_DECODE_PROFILE_MJPEG_VLD_4444: windows_core::GUID = windows_core::GUID::from_u128(0xc91748d5_fd18_4aca_9db3_3a6634ab547d);
pub const D3D12_VIDEO_DECODE_PROFILE_MPEG1_AND_MPEG2: windows_core::GUID = windows_core::GUID::from_u128(0x86695f12_340e_4f04_9fd3_9253dd327460);
pub const D3D12_VIDEO_DECODE_PROFILE_MPEG2: windows_core::GUID = windows_core::GUID::from_u128(0xee27417f_5e28_4e65_beea_1d26b508adc9);
pub const D3D12_VIDEO_DECODE_PROFILE_MPEG4PT2_ADVSIMPLE_NOGMC: windows_core::GUID = windows_core::GUID::from_u128(0xed418a9f_010d_4eda_9ae3_9a65358d8d2e);
pub const D3D12_VIDEO_DECODE_PROFILE_MPEG4PT2_SIMPLE: windows_core::GUID = windows_core::GUID::from_u128(0xefd64d74_c9e8_41d7_a5e9_e9b0e39fa319);
pub const D3D12_VIDEO_DECODE_PROFILE_VC1: windows_core::GUID = windows_core::GUID::from_u128(0x1b81bea3_a0c7_11d3_b984_00c04f2e73c5);
pub const D3D12_VIDEO_DECODE_PROFILE_VC1_D2010: windows_core::GUID = windows_core::GUID::from_u128(0x1b81bea4_a0c7_11d3_b984_00c04f2e73c5);
pub const D3D12_VIDEO_DECODE_PROFILE_VP8: windows_core::GUID = windows_core::GUID::from_u128(0x90b899ea_3a62_4705_88b3_8df04b2744e7);
pub const D3D12_VIDEO_DECODE_PROFILE_VP9: windows_core::GUID = windows_core::GUID::from_u128(0x463707f8_a1d0_4585_876d_83aa6d60b89e);
pub const D3D12_VIDEO_DECODE_PROFILE_VP9_10BIT_PROFILE2: windows_core::GUID = windows_core::GUID::from_u128(0xa4c749ef_6ecf_48aa_8448_50a7a1165ff7);
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_VIDEO_DECODE_REFERENCE_FRAMES {
pub NumTexture2Ds: u32,
pub ppTexture2Ds: *mut Option<super::super::Graphics::Direct3D12::ID3D12Resource>,
pub pSubresources: *mut u32,
pub ppHeaps: *mut Option<ID3D12VideoDecoderHeap>,
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl Default for D3D12_VIDEO_DECODE_REFERENCE_FRAMES {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_DECODE_STATUS(pub i32);
pub const D3D12_VIDEO_DECODE_STATUS_CONTINUE: D3D12_VIDEO_DECODE_STATUS = D3D12_VIDEO_DECODE_STATUS(1i32);
pub const D3D12_VIDEO_DECODE_STATUS_CONTINUE_SKIP_DISPLAY: D3D12_VIDEO_DECODE_STATUS = D3D12_VIDEO_DECODE_STATUS(2i32);
pub const D3D12_VIDEO_DECODE_STATUS_OK: D3D12_VIDEO_DECODE_STATUS = D3D12_VIDEO_DECODE_STATUS(0i32);
pub const D3D12_VIDEO_DECODE_STATUS_RATE_EXCEEDED: D3D12_VIDEO_DECODE_STATUS = D3D12_VIDEO_DECODE_STATUS(4i32);
pub const D3D12_VIDEO_DECODE_STATUS_RESTART: D3D12_VIDEO_DECODE_STATUS = D3D12_VIDEO_DECODE_STATUS(3i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_DECODE_SUPPORT_FLAGS(pub i32);
impl D3D12_VIDEO_DECODE_SUPPORT_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_DECODE_SUPPORT_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_DECODE_SUPPORT_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_DECODE_SUPPORT_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_DECODE_SUPPORT_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_DECODE_SUPPORT_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_DECODE_SUPPORT_FLAG_NONE: D3D12_VIDEO_DECODE_SUPPORT_FLAGS = D3D12_VIDEO_DECODE_SUPPORT_FLAGS(0i32);
pub const D3D12_VIDEO_DECODE_SUPPORT_FLAG_SUPPORTED: D3D12_VIDEO_DECODE_SUPPORT_FLAGS = D3D12_VIDEO_DECODE_SUPPORT_FLAGS(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_DECODE_TIER(pub i32);
pub const D3D12_VIDEO_DECODE_TIER_1: D3D12_VIDEO_DECODE_TIER = D3D12_VIDEO_DECODE_TIER(1i32);
pub const D3D12_VIDEO_DECODE_TIER_2: D3D12_VIDEO_DECODE_TIER = D3D12_VIDEO_DECODE_TIER(2i32);
pub const D3D12_VIDEO_DECODE_TIER_3: D3D12_VIDEO_DECODE_TIER = D3D12_VIDEO_DECODE_TIER(3i32);
pub const D3D12_VIDEO_DECODE_TIER_NOT_SUPPORTED: D3D12_VIDEO_DECODE_TIER = D3D12_VIDEO_DECODE_TIER(0i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_CDEF_CONFIG {
pub CdefBits: u64,
pub CdefDampingMinus3: u64,
pub CdefYPriStrength: [u64; 8],
pub CdefUVPriStrength: [u64; 8],
pub CdefYSecStrength: [u64; 8],
pub CdefUVSecStrength: [u64; 8],
}
impl Default for D3D12_VIDEO_ENCODER_AV1_CDEF_CONFIG {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_CODEC_CONFIGURATION {
pub FeatureFlags: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS,
pub OrderHintBitsMinus1: u32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_CODEC_CONFIGURATION_SUPPORT {
pub SupportedFeatureFlags: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS,
pub RequiredFeatureFlags: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS,
pub SupportedInterpolationFilters: D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_FLAGS,
pub SupportedRestorationParams: [D3D12_VIDEO_ENCODER_AV1_RESTORATION_SUPPORT_FLAGS; 9],
pub SupportedSegmentationModes: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS,
pub SupportedTxModes: [D3D12_VIDEO_ENCODER_AV1_TX_MODE_FLAGS; 4],
pub SegmentationBlockSize: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_BLOCK_SIZE,
pub PostEncodeValuesFlags: D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS,
pub MaxTemporalLayers: u32,
pub MaxSpatialLayers: u32,
}
impl Default for D3D12_VIDEO_ENCODER_AV1_CODEC_CONFIGURATION_SUPPORT {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_COMP_PREDICTION_TYPE(pub i32);
pub const D3D12_VIDEO_ENCODER_AV1_COMP_PREDICTION_TYPE_COMPOUND_REFERENCE: D3D12_VIDEO_ENCODER_AV1_COMP_PREDICTION_TYPE = D3D12_VIDEO_ENCODER_AV1_COMP_PREDICTION_TYPE(1i32);
pub const D3D12_VIDEO_ENCODER_AV1_COMP_PREDICTION_TYPE_SINGLE_REFERENCE: D3D12_VIDEO_ENCODER_AV1_COMP_PREDICTION_TYPE = D3D12_VIDEO_ENCODER_AV1_COMP_PREDICTION_TYPE(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(pub i32);
impl D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAG_128x128_SUPERBLOCK: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(1i32);
pub const D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAG_ALLOW_HIGH_PRECISION_MV: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(8388608i32);
pub const D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAG_AUTO_SEGMENTATION: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(65536i32);
pub const D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAG_CDEF_FILTERING: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(4096i32);
pub const D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAG_CUSTOM_SEGMENTATION: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(131072i32);
pub const D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAG_DELTA_LF_PARAMS: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(33554432i32);
pub const D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAG_DUAL_FILTER: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(64i32);
pub const D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAG_FILTER_INTRA: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(2i32);
pub const D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAG_FORCED_INTEGER_MOTION_VECTORS: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(256i32);
pub const D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAG_FRAME_REFERENCE_MOTION_VECTORS: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(16384i32);
pub const D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAG_INTERINTRA_COMPOUND: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(8i32);
pub const D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAG_INTRA_BLOCK_COPY: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(8192i32);
pub const D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAG_INTRA_EDGE_FILTER: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(4i32);
pub const D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAG_JNT_COMP: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(128i32);
pub const D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAG_LOOP_FILTER_DELTAS: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(262144i32);
pub const D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAG_LOOP_RESTORATION_FILTER: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(1024i32);
pub const D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAG_MASKED_COMPOUND: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(16i32);
pub const D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAG_MOTION_MODE_SWITCHABLE: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(4194304i32);
pub const D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAG_NONE: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(0i32);
pub const D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAG_ORDER_HINT_TOOLS: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(32768i32);
pub const D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAG_PALETTE_ENCODING: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(2048i32);
pub const D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAG_QUANTIZATION_DELTAS: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(524288i32);
pub const D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAG_QUANTIZATION_MATRIX: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(1048576i32);
pub const D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAG_REDUCED_TX_SET: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(2097152i32);
pub const D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAG_SKIP_MODE_PRESENT: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(16777216i32);
pub const D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAG_SUPER_RESOLUTION: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(512i32);
pub const D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAG_WARPED_MOTION: D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FEATURE_FLAGS(32i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_SUPPORT {
pub Use128SuperBlocks: windows_core::BOOL,
pub TilesConfiguration: D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES,
pub ValidationFlags: D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS,
pub MinTileRows: u32,
pub MaxTileRows: u32,
pub MinTileCols: u32,
pub MaxTileCols: u32,
pub MinTileWidth: u32,
pub MaxTileWidth: u32,
pub MinTileArea: u32,
pub MaxTileArea: u32,
pub TileSizeBytesMinus1: u32,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS(pub i32);
impl D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAG_AREA: D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS = D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS(64i32);
pub const D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAG_CODEC_CONSTRAINT: D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS = D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS(2i32);
pub const D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAG_COLS_COUNT: D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS = D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS(16i32);
pub const D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAG_HARDWARE_CONSTRAINT: D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS = D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS(4i32);
pub const D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAG_NONE: D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS = D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS(0i32);
pub const D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAG_NOT_SPECIFIED: D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS = D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS(1i32);
pub const D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAG_ROWS_COUNT: D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS = D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS(8i32);
pub const D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAG_TOTAL_TILES: D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS = D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS(128i32);
pub const D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAG_WIDTH: D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS = D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_VALIDATION_FLAGS(32i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE_FLAGS(pub i32);
impl D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE_FLAG_INTER_FRAME: D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE_FLAGS(2i32);
pub const D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE_FLAG_INTRA_ONLY_FRAME: D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE_FLAGS(4i32);
pub const D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE_FLAG_KEY_FRAME: D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE_FLAGS(1i32);
pub const D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE_FLAG_NONE: D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE_FLAGS(0i32);
pub const D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE_FLAG_SWITCH_FRAME: D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE_FLAGS = D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE_FLAGS(8i32);
pub const D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE_INTER_FRAME: D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE = D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE(1i32);
pub const D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE_INTRA_ONLY_FRAME: D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE = D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE(2i32);
pub const D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE_KEY_FRAME: D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE = D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE(0i32);
pub const D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE_SWITCH_FRAME: D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE = D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE(3i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS(pub i32);
pub const D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_BILINEAR: D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS = D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS(3i32);
pub const D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_EIGHTTAP: D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS = D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS(0i32);
pub const D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_EIGHTTAP_SHARP: D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS = D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS(2i32);
pub const D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_EIGHTTAP_SMOOTH: D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS = D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_FLAGS(pub i32);
impl D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_FLAG_BILINEAR: D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_FLAGS = D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_FLAGS(8i32);
pub const D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_FLAG_EIGHTTAP: D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_FLAGS = D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_FLAGS(1i32);
pub const D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_FLAG_EIGHTTAP_SHARP: D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_FLAGS = D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_FLAGS(4i32);
pub const D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_FLAG_EIGHTTAP_SMOOTH: D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_FLAGS = D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_FLAGS(2i32);
pub const D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_FLAG_NONE: D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_FLAGS = D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_FLAGS(0i32);
pub const D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_FLAG_SWITCHABLE: D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_FLAGS = D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_FLAGS(16i32);
pub const D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS_SWITCHABLE: D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS = D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS(4i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_LEVELS(pub i32);
pub const D3D12_VIDEO_ENCODER_AV1_LEVELS_2_0: D3D12_VIDEO_ENCODER_AV1_LEVELS = D3D12_VIDEO_ENCODER_AV1_LEVELS(0i32);
pub const D3D12_VIDEO_ENCODER_AV1_LEVELS_2_1: D3D12_VIDEO_ENCODER_AV1_LEVELS = D3D12_VIDEO_ENCODER_AV1_LEVELS(1i32);
pub const D3D12_VIDEO_ENCODER_AV1_LEVELS_2_2: D3D12_VIDEO_ENCODER_AV1_LEVELS = D3D12_VIDEO_ENCODER_AV1_LEVELS(2i32);
pub const D3D12_VIDEO_ENCODER_AV1_LEVELS_2_3: D3D12_VIDEO_ENCODER_AV1_LEVELS = D3D12_VIDEO_ENCODER_AV1_LEVELS(3i32);
pub const D3D12_VIDEO_ENCODER_AV1_LEVELS_3_0: D3D12_VIDEO_ENCODER_AV1_LEVELS = D3D12_VIDEO_ENCODER_AV1_LEVELS(4i32);
pub const D3D12_VIDEO_ENCODER_AV1_LEVELS_3_1: D3D12_VIDEO_ENCODER_AV1_LEVELS = D3D12_VIDEO_ENCODER_AV1_LEVELS(5i32);
pub const D3D12_VIDEO_ENCODER_AV1_LEVELS_3_2: D3D12_VIDEO_ENCODER_AV1_LEVELS = D3D12_VIDEO_ENCODER_AV1_LEVELS(6i32);
pub const D3D12_VIDEO_ENCODER_AV1_LEVELS_3_3: D3D12_VIDEO_ENCODER_AV1_LEVELS = D3D12_VIDEO_ENCODER_AV1_LEVELS(7i32);
pub const D3D12_VIDEO_ENCODER_AV1_LEVELS_4_0: D3D12_VIDEO_ENCODER_AV1_LEVELS = D3D12_VIDEO_ENCODER_AV1_LEVELS(8i32);
pub const D3D12_VIDEO_ENCODER_AV1_LEVELS_4_1: D3D12_VIDEO_ENCODER_AV1_LEVELS = D3D12_VIDEO_ENCODER_AV1_LEVELS(9i32);
pub const D3D12_VIDEO_ENCODER_AV1_LEVELS_4_2: D3D12_VIDEO_ENCODER_AV1_LEVELS = D3D12_VIDEO_ENCODER_AV1_LEVELS(10i32);
pub const D3D12_VIDEO_ENCODER_AV1_LEVELS_4_3: D3D12_VIDEO_ENCODER_AV1_LEVELS = D3D12_VIDEO_ENCODER_AV1_LEVELS(11i32);
pub const D3D12_VIDEO_ENCODER_AV1_LEVELS_5_0: D3D12_VIDEO_ENCODER_AV1_LEVELS = D3D12_VIDEO_ENCODER_AV1_LEVELS(12i32);
pub const D3D12_VIDEO_ENCODER_AV1_LEVELS_5_1: D3D12_VIDEO_ENCODER_AV1_LEVELS = D3D12_VIDEO_ENCODER_AV1_LEVELS(13i32);
pub const D3D12_VIDEO_ENCODER_AV1_LEVELS_5_2: D3D12_VIDEO_ENCODER_AV1_LEVELS = D3D12_VIDEO_ENCODER_AV1_LEVELS(14i32);
pub const D3D12_VIDEO_ENCODER_AV1_LEVELS_5_3: D3D12_VIDEO_ENCODER_AV1_LEVELS = D3D12_VIDEO_ENCODER_AV1_LEVELS(15i32);
pub const D3D12_VIDEO_ENCODER_AV1_LEVELS_6_0: D3D12_VIDEO_ENCODER_AV1_LEVELS = D3D12_VIDEO_ENCODER_AV1_LEVELS(16i32);
pub const D3D12_VIDEO_ENCODER_AV1_LEVELS_6_1: D3D12_VIDEO_ENCODER_AV1_LEVELS = D3D12_VIDEO_ENCODER_AV1_LEVELS(17i32);
pub const D3D12_VIDEO_ENCODER_AV1_LEVELS_6_2: D3D12_VIDEO_ENCODER_AV1_LEVELS = D3D12_VIDEO_ENCODER_AV1_LEVELS(18i32);
pub const D3D12_VIDEO_ENCODER_AV1_LEVELS_6_3: D3D12_VIDEO_ENCODER_AV1_LEVELS = D3D12_VIDEO_ENCODER_AV1_LEVELS(19i32);
pub const D3D12_VIDEO_ENCODER_AV1_LEVELS_7_0: D3D12_VIDEO_ENCODER_AV1_LEVELS = D3D12_VIDEO_ENCODER_AV1_LEVELS(20i32);
pub const D3D12_VIDEO_ENCODER_AV1_LEVELS_7_1: D3D12_VIDEO_ENCODER_AV1_LEVELS = D3D12_VIDEO_ENCODER_AV1_LEVELS(21i32);
pub const D3D12_VIDEO_ENCODER_AV1_LEVELS_7_2: D3D12_VIDEO_ENCODER_AV1_LEVELS = D3D12_VIDEO_ENCODER_AV1_LEVELS(22i32);
pub const D3D12_VIDEO_ENCODER_AV1_LEVELS_7_3: D3D12_VIDEO_ENCODER_AV1_LEVELS = D3D12_VIDEO_ENCODER_AV1_LEVELS(23i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_LEVEL_TIER_CONSTRAINTS {
pub Level: D3D12_VIDEO_ENCODER_AV1_LEVELS,
pub Tier: D3D12_VIDEO_ENCODER_AV1_TIER,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_CODEC_DATA {
pub Flags: D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS,
pub FrameType: D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE,
pub CompoundPredictionType: D3D12_VIDEO_ENCODER_AV1_COMP_PREDICTION_TYPE,
pub InterpolationFilter: D3D12_VIDEO_ENCODER_AV1_INTERPOLATION_FILTERS,
pub FrameRestorationConfig: D3D12_VIDEO_ENCODER_AV1_RESTORATION_CONFIG,
pub TxMode: D3D12_VIDEO_ENCODER_AV1_TX_MODE,
pub SuperResDenominator: u32,
pub OrderHint: u32,
pub PictureIndex: u32,
pub TemporalLayerIndexPlus1: u32,
pub SpatialLayerIndexPlus1: u32,
pub ReferenceFramesReconPictureDescriptors: [D3D12_VIDEO_ENCODER_AV1_REFERENCE_PICTURE_DESCRIPTOR; 8],
pub ReferenceIndices: [u32; 7],
pub PrimaryRefFrame: u32,
pub RefreshFrameFlags: u32,
pub LoopFilter: D3D12_VIDEO_ENCODER_CODEC_AV1_LOOP_FILTER_CONFIG,
pub LoopFilterDelta: D3D12_VIDEO_ENCODER_CODEC_AV1_LOOP_FILTER_DELTA_CONFIG,
pub Quantization: D3D12_VIDEO_ENCODER_CODEC_AV1_QUANTIZATION_CONFIG,
pub QuantizationDelta: D3D12_VIDEO_ENCODER_CODEC_AV1_QUANTIZATION_DELTA_CONFIG,
pub CDEF: D3D12_VIDEO_ENCODER_AV1_CDEF_CONFIG,
pub QPMapValuesCount: u32,
pub pRateControlQPMap: *mut i16,
pub CustomSegmentation: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_CONFIG,
pub CustomSegmentsMap: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MAP,
}
impl Default for D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_CODEC_DATA {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS(pub i32);
impl D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAG_ALLOW_HIGH_PRECISION_MV: D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS(16384i32);
pub const D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAG_ALLOW_INTRA_BLOCK_COPY: D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS(64i32);
pub const D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAG_DISABLE_CDF_UPDATE: D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS(2i32);
pub const D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAG_DISABLE_FRAME_END_UPDATE_CDF: D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS(256i32);
pub const D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAG_ENABLE_ERROR_RESILIENT_MODE: D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS(1i32);
pub const D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAG_ENABLE_FRAME_SEGMENTATION_AUTO: D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS(512i32);
pub const D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAG_ENABLE_FRAME_SEGMENTATION_CUSTOM: D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS(1024i32);
pub const D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAG_ENABLE_PALETTE_ENCODING: D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS(4i32);
pub const D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAG_ENABLE_SKIP_MODE: D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS(8i32);
pub const D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAG_ENABLE_WARPED_MOTION: D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS(2048i32);
pub const D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAG_FORCE_INTEGER_MOTION_VECTORS: D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS(32i32);
pub const D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAG_FRAME_REFERENCE_MOTION_VECTORS: D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS(16i32);
pub const D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAG_MOTION_MODE_SWITCHABLE: D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS(8192i32);
pub const D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAG_NONE: D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS(0i32);
pub const D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAG_REDUCED_TX_SET: D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS(4096i32);
pub const D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAG_USE_SUPER_RESOLUTION: D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_FLAGS(128i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES {
pub RowCount: u64,
pub ColCount: u64,
pub RowHeights: [u64; 64],
pub ColWidths: [u64; 64],
pub ContextUpdateTileId: u64,
}
impl Default for D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES {
pub CompoundPredictionType: u64,
pub LoopFilter: D3D12_VIDEO_ENCODER_CODEC_AV1_LOOP_FILTER_CONFIG,
pub LoopFilterDelta: D3D12_VIDEO_ENCODER_CODEC_AV1_LOOP_FILTER_DELTA_CONFIG,
pub Quantization: D3D12_VIDEO_ENCODER_CODEC_AV1_QUANTIZATION_CONFIG,
pub QuantizationDelta: D3D12_VIDEO_ENCODER_CODEC_AV1_QUANTIZATION_DELTA_CONFIG,
pub CDEF: D3D12_VIDEO_ENCODER_AV1_CDEF_CONFIG,
pub SegmentationConfig: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_CONFIG,
pub PrimaryRefFrame: u64,
pub ReferenceIndices: [u64; 7],
}
impl Default for D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS(pub i32);
impl D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAG_CDEF_DATA: D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS = D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS(16i32);
pub const D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAG_COMPOUND_PREDICTION_MODE: D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS = D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS(64i32);
pub const D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAG_CONTEXT_UPDATE_TILE_ID: D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS = D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS(32i32);
pub const D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAG_LOOP_FILTER: D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS = D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS(4i32);
pub const D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAG_LOOP_FILTER_DELTA: D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS = D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS(8i32);
pub const D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAG_NONE: D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS = D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS(0i32);
pub const D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAG_PRIMARY_REF_FRAME: D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS = D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS(128i32);
pub const D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAG_QUANTIZATION: D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS = D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS(1i32);
pub const D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAG_QUANTIZATION_DELTA: D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS = D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS(2i32);
pub const D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAG_REFERENCE_INDICES: D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS = D3D12_VIDEO_ENCODER_AV1_POST_ENCODE_VALUES_FLAGS(256i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_PROFILE(pub i32);
pub const D3D12_VIDEO_ENCODER_AV1_PROFILE_HIGH: D3D12_VIDEO_ENCODER_AV1_PROFILE = D3D12_VIDEO_ENCODER_AV1_PROFILE(1i32);
pub const D3D12_VIDEO_ENCODER_AV1_PROFILE_MAIN: D3D12_VIDEO_ENCODER_AV1_PROFILE = D3D12_VIDEO_ENCODER_AV1_PROFILE(0i32);
pub const D3D12_VIDEO_ENCODER_AV1_PROFILE_PROFESSIONAL: D3D12_VIDEO_ENCODER_AV1_PROFILE = D3D12_VIDEO_ENCODER_AV1_PROFILE(2i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_REFERENCE_PICTURE_DESCRIPTOR {
pub ReconstructedPictureResourceIndex: u32,
pub TemporalLayerIndexPlus1: u32,
pub SpatialLayerIndexPlus1: u32,
pub FrameType: D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE,
pub WarpedMotionInfo: D3D12_VIDEO_ENCODER_AV1_REFERENCE_PICTURE_WARPED_MOTION_INFO,
pub OrderHint: u32,
pub PictureIndex: u32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_REFERENCE_PICTURE_WARPED_MOTION_INFO {
pub TransformationType: D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION,
pub TransformationMatrix: [i32; 8],
pub InvalidAffineSet: windows_core::BOOL,
}
impl Default for D3D12_VIDEO_ENCODER_AV1_REFERENCE_PICTURE_WARPED_MOTION_INFO {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION(pub i32);
pub const D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION_AFFINE: D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION = D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION(3i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION_FLAGS(pub i32);
impl D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION_FLAG_AFFINE: D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION_FLAGS = D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION_FLAGS(8i32);
pub const D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION_FLAG_IDENTITY: D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION_FLAGS = D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION_FLAGS(1i32);
pub const D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION_FLAG_NONE: D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION_FLAGS = D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION_FLAGS(0i32);
pub const D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION_FLAG_ROTZOOM: D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION_FLAGS = D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION_FLAGS(4i32);
pub const D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION_FLAG_TRANSLATION: D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION_FLAGS = D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION_FLAGS(2i32);
pub const D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION_IDENTITY: D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION = D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION(0i32);
pub const D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION_ROTZOOM: D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION = D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION(2i32);
pub const D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION_TRANSLATION: D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION = D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION(1i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_RESTORATION_CONFIG {
pub FrameRestorationType: [D3D12_VIDEO_ENCODER_AV1_RESTORATION_TYPE; 3],
pub LoopRestorationPixelSize: [D3D12_VIDEO_ENCODER_AV1_RESTORATION_TILESIZE; 3],
}
impl Default for D3D12_VIDEO_ENCODER_AV1_RESTORATION_CONFIG {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_RESTORATION_SUPPORT_FLAGS(pub i32);
impl D3D12_VIDEO_ENCODER_AV1_RESTORATION_SUPPORT_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_ENCODER_AV1_RESTORATION_SUPPORT_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_ENCODER_AV1_RESTORATION_SUPPORT_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_ENCODER_AV1_RESTORATION_SUPPORT_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_ENCODER_AV1_RESTORATION_SUPPORT_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_ENCODER_AV1_RESTORATION_SUPPORT_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_ENCODER_AV1_RESTORATION_SUPPORT_FLAG_128x128: D3D12_VIDEO_ENCODER_AV1_RESTORATION_SUPPORT_FLAGS = D3D12_VIDEO_ENCODER_AV1_RESTORATION_SUPPORT_FLAGS(4i32);
pub const D3D12_VIDEO_ENCODER_AV1_RESTORATION_SUPPORT_FLAG_256x256: D3D12_VIDEO_ENCODER_AV1_RESTORATION_SUPPORT_FLAGS = D3D12_VIDEO_ENCODER_AV1_RESTORATION_SUPPORT_FLAGS(8i32);
pub const D3D12_VIDEO_ENCODER_AV1_RESTORATION_SUPPORT_FLAG_32x32: D3D12_VIDEO_ENCODER_AV1_RESTORATION_SUPPORT_FLAGS = D3D12_VIDEO_ENCODER_AV1_RESTORATION_SUPPORT_FLAGS(1i32);
pub const D3D12_VIDEO_ENCODER_AV1_RESTORATION_SUPPORT_FLAG_64x64: D3D12_VIDEO_ENCODER_AV1_RESTORATION_SUPPORT_FLAGS = D3D12_VIDEO_ENCODER_AV1_RESTORATION_SUPPORT_FLAGS(2i32);
pub const D3D12_VIDEO_ENCODER_AV1_RESTORATION_SUPPORT_FLAG_NOT_SUPPORTED: D3D12_VIDEO_ENCODER_AV1_RESTORATION_SUPPORT_FLAGS = D3D12_VIDEO_ENCODER_AV1_RESTORATION_SUPPORT_FLAGS(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_RESTORATION_TILESIZE(pub i32);
pub const D3D12_VIDEO_ENCODER_AV1_RESTORATION_TILESIZE_128x128: D3D12_VIDEO_ENCODER_AV1_RESTORATION_TILESIZE = D3D12_VIDEO_ENCODER_AV1_RESTORATION_TILESIZE(3i32);
pub const D3D12_VIDEO_ENCODER_AV1_RESTORATION_TILESIZE_256x256: D3D12_VIDEO_ENCODER_AV1_RESTORATION_TILESIZE = D3D12_VIDEO_ENCODER_AV1_RESTORATION_TILESIZE(4i32);
pub const D3D12_VIDEO_ENCODER_AV1_RESTORATION_TILESIZE_32x32: D3D12_VIDEO_ENCODER_AV1_RESTORATION_TILESIZE = D3D12_VIDEO_ENCODER_AV1_RESTORATION_TILESIZE(1i32);
pub const D3D12_VIDEO_ENCODER_AV1_RESTORATION_TILESIZE_64x64: D3D12_VIDEO_ENCODER_AV1_RESTORATION_TILESIZE = D3D12_VIDEO_ENCODER_AV1_RESTORATION_TILESIZE(2i32);
pub const D3D12_VIDEO_ENCODER_AV1_RESTORATION_TILESIZE_DISABLED: D3D12_VIDEO_ENCODER_AV1_RESTORATION_TILESIZE = D3D12_VIDEO_ENCODER_AV1_RESTORATION_TILESIZE(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_RESTORATION_TYPE(pub i32);
pub const D3D12_VIDEO_ENCODER_AV1_RESTORATION_TYPE_DISABLED: D3D12_VIDEO_ENCODER_AV1_RESTORATION_TYPE = D3D12_VIDEO_ENCODER_AV1_RESTORATION_TYPE(0i32);
pub const D3D12_VIDEO_ENCODER_AV1_RESTORATION_TYPE_SGRPROJ: D3D12_VIDEO_ENCODER_AV1_RESTORATION_TYPE = D3D12_VIDEO_ENCODER_AV1_RESTORATION_TYPE(3i32);
pub const D3D12_VIDEO_ENCODER_AV1_RESTORATION_TYPE_SWITCHABLE: D3D12_VIDEO_ENCODER_AV1_RESTORATION_TYPE = D3D12_VIDEO_ENCODER_AV1_RESTORATION_TYPE(1i32);
pub const D3D12_VIDEO_ENCODER_AV1_RESTORATION_TYPE_WIENER: D3D12_VIDEO_ENCODER_AV1_RESTORATION_TYPE = D3D12_VIDEO_ENCODER_AV1_RESTORATION_TYPE(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_BLOCK_SIZE(pub i32);
pub const D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_BLOCK_SIZE_16x16: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_BLOCK_SIZE = D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_BLOCK_SIZE(2i32);
pub const D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_BLOCK_SIZE_32x32: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_BLOCK_SIZE = D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_BLOCK_SIZE(3i32);
pub const D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_BLOCK_SIZE_4x4: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_BLOCK_SIZE = D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_BLOCK_SIZE(0i32);
pub const D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_BLOCK_SIZE_64x64: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_BLOCK_SIZE = D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_BLOCK_SIZE(4i32);
pub const D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_BLOCK_SIZE_8x8: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_BLOCK_SIZE = D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_BLOCK_SIZE(1i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_CONFIG {
pub UpdateMap: u64,
pub TemporalUpdate: u64,
pub UpdateData: u64,
pub NumSegments: u64,
pub SegmentsData: [D3D12_VIDEO_ENCODER_AV1_SEGMENT_DATA; 8],
}
impl Default for D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_CONFIG {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MAP {
pub SegmentsMapByteSize: u32,
pub pSegmentsMap: *mut u8,
}
impl Default for D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MAP {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE(pub i32);
pub const D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_ALT_GLOBALMV: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE = D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE(8i32);
pub const D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_ALT_LF_U: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE = D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE(4i32);
pub const D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_ALT_LF_V: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE = D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE(5i32);
pub const D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_ALT_LF_Y_H: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE = D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE(3i32);
pub const D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_ALT_LF_Y_V: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE = D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE(2i32);
pub const D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_ALT_Q: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE = D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE(1i32);
pub const D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_ALT_REF_FRAME: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE = D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE(6i32);
pub const D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_ALT_SKIP: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE = D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE(7i32);
pub const D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_DISABLED: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE = D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS(pub i32);
impl D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAG_ALT_GLOBALMV: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS = D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS(256i32);
pub const D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAG_ALT_LF_U: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS = D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS(16i32);
pub const D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAG_ALT_LF_V: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS = D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS(32i32);
pub const D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAG_ALT_LF_Y_H: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS = D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS(8i32);
pub const D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAG_ALT_LF_Y_V: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS = D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS(4i32);
pub const D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAG_ALT_Q: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS = D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS(2i32);
pub const D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAG_ALT_SKIP: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS = D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS(128i32);
pub const D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAG_DISABLED: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS = D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS(1i32);
pub const D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAG_NONE: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS = D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS(0i32);
pub const D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAG_REF_FRAME: D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS = D3D12_VIDEO_ENCODER_AV1_SEGMENTATION_MODE_FLAGS(64i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_SEGMENT_DATA {
pub EnabledFeatures: u64,
pub FeatureValue: [i64; 8],
}
impl Default for D3D12_VIDEO_ENCODER_AV1_SEGMENT_DATA {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_SEQUENCE_STRUCTURE {
pub IntraDistance: u32,
pub InterFramePeriod: u32,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_TIER(pub i32);
pub const D3D12_VIDEO_ENCODER_AV1_TIER_HIGH: D3D12_VIDEO_ENCODER_AV1_TIER = D3D12_VIDEO_ENCODER_AV1_TIER(1i32);
pub const D3D12_VIDEO_ENCODER_AV1_TIER_MAIN: D3D12_VIDEO_ENCODER_AV1_TIER = D3D12_VIDEO_ENCODER_AV1_TIER(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_TX_MODE(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_AV1_TX_MODE_FLAGS(pub i32);
impl D3D12_VIDEO_ENCODER_AV1_TX_MODE_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_ENCODER_AV1_TX_MODE_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_ENCODER_AV1_TX_MODE_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_ENCODER_AV1_TX_MODE_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_ENCODER_AV1_TX_MODE_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_ENCODER_AV1_TX_MODE_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_ENCODER_AV1_TX_MODE_FLAG_LARGEST: D3D12_VIDEO_ENCODER_AV1_TX_MODE_FLAGS = D3D12_VIDEO_ENCODER_AV1_TX_MODE_FLAGS(2i32);
pub const D3D12_VIDEO_ENCODER_AV1_TX_MODE_FLAG_NONE: D3D12_VIDEO_ENCODER_AV1_TX_MODE_FLAGS = D3D12_VIDEO_ENCODER_AV1_TX_MODE_FLAGS(0i32);
pub const D3D12_VIDEO_ENCODER_AV1_TX_MODE_FLAG_ONLY4x4: D3D12_VIDEO_ENCODER_AV1_TX_MODE_FLAGS = D3D12_VIDEO_ENCODER_AV1_TX_MODE_FLAGS(1i32);
pub const D3D12_VIDEO_ENCODER_AV1_TX_MODE_FLAG_SELECT: D3D12_VIDEO_ENCODER_AV1_TX_MODE_FLAGS = D3D12_VIDEO_ENCODER_AV1_TX_MODE_FLAGS(4i32);
pub const D3D12_VIDEO_ENCODER_AV1_TX_MODE_LARGEST: D3D12_VIDEO_ENCODER_AV1_TX_MODE = D3D12_VIDEO_ENCODER_AV1_TX_MODE(1i32);
pub const D3D12_VIDEO_ENCODER_AV1_TX_MODE_ONLY4x4: D3D12_VIDEO_ENCODER_AV1_TX_MODE = D3D12_VIDEO_ENCODER_AV1_TX_MODE(0i32);
pub const D3D12_VIDEO_ENCODER_AV1_TX_MODE_SELECT: D3D12_VIDEO_ENCODER_AV1_TX_MODE = D3D12_VIDEO_ENCODER_AV1_TX_MODE(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_CODEC(pub i32);
pub const D3D12_VIDEO_ENCODER_CODEC_AV1: D3D12_VIDEO_ENCODER_CODEC = D3D12_VIDEO_ENCODER_CODEC(2i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_CODEC_AV1_LOOP_FILTER_CONFIG {
pub LoopFilterLevel: [u64; 2],
pub LoopFilterLevelU: u64,
pub LoopFilterLevelV: u64,
pub LoopFilterSharpnessLevel: u64,
pub LoopFilterDeltaEnabled: u64,
pub UpdateRefDelta: u64,
pub RefDeltas: [i64; 8],
pub UpdateModeDelta: u64,
pub ModeDeltas: [i64; 2],
}
impl Default for D3D12_VIDEO_ENCODER_CODEC_AV1_LOOP_FILTER_CONFIG {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_CODEC_AV1_LOOP_FILTER_DELTA_CONFIG {
pub DeltaLFPresent: u64,
pub DeltaLFMulti: u64,
pub DeltaLFRes: u64,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_CODEC_AV1_PICTURE_CONTROL_SUPPORT {
pub PredictionMode: D3D12_VIDEO_ENCODER_AV1_COMP_PREDICTION_TYPE,
pub MaxUniqueReferencesPerFrame: u32,
pub SupportedFrameTypes: D3D12_VIDEO_ENCODER_AV1_FRAME_TYPE_FLAGS,
pub SupportedReferenceWarpedMotionFlags: D3D12_VIDEO_ENCODER_AV1_REFERENCE_WARPED_MOTION_TRANSFORMATION_FLAGS,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_CODEC_AV1_QUANTIZATION_CONFIG {
pub BaseQIndex: u64,
pub YDCDeltaQ: i64,
pub UDCDeltaQ: i64,
pub UACDeltaQ: i64,
pub VDCDeltaQ: i64,
pub VACDeltaQ: i64,
pub UsingQMatrix: u64,
pub QMY: u64,
pub QMU: u64,
pub QMV: u64,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_CODEC_AV1_QUANTIZATION_DELTA_CONFIG {
pub DeltaQPresent: u64,
pub DeltaQRes: u64,
}
#[repr(C)]
#[derive(Clone, Copy)]
pub struct D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION {
pub DataSize: u32,
pub Anonymous: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_0,
}
impl Default for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub union D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_0 {
pub pH264Config: *mut D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264,
pub pHEVCConfig: *mut D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC,
pub pAV1Config: *mut D3D12_VIDEO_ENCODER_AV1_CODEC_CONFIGURATION,
}
impl Default for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_0 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264 {
pub ConfigurationFlags: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_FLAGS,
pub DirectModeConfig: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_DIRECT_MODES,
pub DisableDeblockingFilterConfig: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODES,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_DIRECT_MODES(pub i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_DIRECT_MODES_DISABLED: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_DIRECT_MODES = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_DIRECT_MODES(0i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_DIRECT_MODES_SPATIAL: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_DIRECT_MODES = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_DIRECT_MODES(2i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_DIRECT_MODES_TEMPORAL: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_DIRECT_MODES = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_DIRECT_MODES(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_FLAGS(pub i32);
impl D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_FLAG_ALLOW_REQUEST_INTRA_CONSTRAINED_SLICES: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_FLAGS(8i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_FLAG_ENABLE_CABAC_ENCODING: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_FLAGS(4i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_FLAG_NONE: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_FLAGS(0i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_FLAG_USE_ADAPTIVE_8x8_TRANSFORM: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_FLAGS(2i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_FLAG_USE_CONSTRAINED_INTRAPREDICTION: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_FLAGS(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODES(pub i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_0_ALL_LUMA_CHROMA_SLICE_BLOCK_EDGES_ALWAYS_FILTERED: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODES = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODES(0i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_1_DISABLE_ALL_SLICE_BLOCK_EDGES: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODES = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODES(1i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_2_DISABLE_SLICE_BOUNDARIES_BLOCKS: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODES = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODES(2i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_3_USE_TWO_STAGE_DEBLOCKING: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODES = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODES(3i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_4_DISABLE_CHROMA_BLOCK_EDGES: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODES = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODES(4i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_5_DISABLE_CHROMA_BLOCK_EDGES_AND_LUMA_BOUNDARIES: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODES = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODES(5i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_6_DISABLE_CHROMA_BLOCK_EDGES_AND_USE_LUMA_TWO_STAGE_DEBLOCKING: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODES = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODES(6i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAGS(pub i32);
impl D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAG_0_ALL_LUMA_CHROMA_SLICE_BLOCK_EDGES_ALWAYS_FILTERED: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAGS(1i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAG_1_DISABLE_ALL_SLICE_BLOCK_EDGES: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAGS(2i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAG_2_DISABLE_SLICE_BOUNDARIES_BLOCKS: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAGS(4i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAG_3_USE_TWO_STAGE_DEBLOCKING: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAGS(8i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAG_4_DISABLE_CHROMA_BLOCK_EDGES: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAGS(16i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAG_5_DISABLE_CHROMA_BLOCK_EDGES_AND_LUMA_BOUNDARIES: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAGS(32i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAG_6_DISABLE_CHROMA_BLOCK_EDGES_AND_USE_LUMA_TWO_STAGE_DEBLOCKING: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAGS(64i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAG_NONE: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAGS(0i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC {
pub ConfigurationFlags: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS,
pub MinLumaCodingUnitSize: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE,
pub MaxLumaCodingUnitSize: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE,
pub MinLumaTransformUnitSize: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE,
pub MaxLumaTransformUnitSize: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE,
pub max_transform_hierarchy_depth_inter: u8,
pub max_transform_hierarchy_depth_intra: u8,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE(pub i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE_16x16: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE(1i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE_32x32: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE(2i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE_64x64: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE(3i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE_8x8: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS(pub i32);
impl D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_ALLOW_REQUEST_INTRA_CONSTRAINED_SLICES: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS(2i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_CABAC_BYPASS_ALIGNMENT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS(32768i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_DISABLE_LOOP_FILTER_ACROSS_SLICES: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS(1i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_ENABLE_LONG_TERM_REFERENCES: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS(8i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_ENABLE_SAO_FILTER: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS(4i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_ENABLE_TRANSFORM_SKIPPING: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS(32i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_EXPLICIT_RDPCM: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS(1024i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_EXTENDED_PRECISION_PROCESSING: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS(2048i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_HIGH_PRECISION_OFFSETS: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS(8192i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_IMPLICIT_RDPCM: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS(512i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_INTRA_SMOOTHING_DISABLED: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS(4096i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_NONE: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS(0i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_PERSISTENT_RICE_ADAPTATION: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS(16384i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_SEPARATE_COLOUR_PLANE: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS(65536i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_TRANSFORM_SKIP_CONTEXT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS(256i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_TRANSFORM_SKIP_ROTATION: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS(128i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_USE_ASYMETRIC_MOTION_PARTITION: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS(16i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_USE_CONSTRAINED_INTRAPREDICTION: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAGS(64i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE(pub i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE_16x16: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE(2i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE_32x32: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE(3i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE_4x4: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE(0i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE_8x8: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE(1i32);
#[repr(C)]
#[derive(Clone, Copy)]
pub struct D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT {
pub DataSize: u32,
pub Anonymous: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_0,
}
impl Default for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub union D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_0 {
pub pH264Support: *mut D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264,
pub pHEVCSupport: *mut D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC,
pub pHEVCSupport1: *mut D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC1,
pub pAV1Support: *mut D3D12_VIDEO_ENCODER_AV1_CODEC_CONFIGURATION_SUPPORT,
}
impl Default for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_0 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264 {
pub SupportFlags: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAGS,
pub DisableDeblockingFilterSupportedModes: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264_SLICES_DEBLOCKING_MODE_FLAGS,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAGS(pub i32);
impl D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAG_ADAPTIVE_8x8_TRANSFORM_ENCODING_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAGS(8i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAG_BFRAME_LTR_COMBINED_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAGS(4i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAG_CABAC_ENCODING_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAGS(1i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAG_CONSTRAINED_INTRAPREDICTION_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAGS(64i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAG_DIRECT_SPATIAL_ENCODING_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAGS(16i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAG_DIRECT_TEMPORAL_ENCODING_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAGS(32i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAG_INTRA_SLICE_CONSTRAINED_ENCODING_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAGS(2i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAG_NONE: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAGS(0i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAG_NUM_REF_IDX_ACTIVE_OVERRIDE_FLAG_SLICE_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_FLAGS(128i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC {
pub SupportFlags: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS,
pub MinLumaCodingUnitSize: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE,
pub MaxLumaCodingUnitSize: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE,
pub MinLumaTransformUnitSize: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE,
pub MaxLumaTransformUnitSize: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE,
pub max_transform_hierarchy_depth_inter: u8,
pub max_transform_hierarchy_depth_intra: u8,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC1 {
pub SupportFlags: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS,
pub MinLumaCodingUnitSize: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE,
pub MaxLumaCodingUnitSize: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE,
pub MinLumaTransformUnitSize: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE,
pub MaxLumaTransformUnitSize: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE,
pub max_transform_hierarchy_depth_inter: u8,
pub max_transform_hierarchy_depth_intra: u8,
pub allowed_diff_cu_chroma_qp_offset_depth_values: u32,
pub allowed_log2_sao_offset_scale_luma_values: u32,
pub allowed_log2_sao_offset_scale_chroma_values: u32,
pub allowed_log2_max_transform_skip_block_size_minus2_values: u32,
pub allowed_chroma_qp_offset_list_len_minus1_values: u32,
pub allowed_cb_qp_offset_list_values: [u32; 6],
pub allowed_cr_qp_offset_list_values: [u32; 6],
pub SupportFlags1: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS1,
}
impl Default for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC1 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG1_NONE: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS1 = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS1(0i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG1_SEPARATE_COLOUR_PLANE_REQUIRED: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS1 = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS1(2i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG1_SEPARATE_COLOUR_PLANE_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS1 = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS1(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(pub i32);
impl D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS1(pub i32);
impl D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS1 {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS1 {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS1 {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS1 {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS1 {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS1 {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_ASYMETRIC_MOTION_PARTITION_REQUIRED: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(32i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_ASYMETRIC_MOTION_PARTITION_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(16i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_BFRAME_LTR_COMBINED_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(1i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_CABAC_BYPASS_ALIGNMENT_ENABLED_REQUIRED: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(134217728i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_CABAC_BYPASS_ALIGNMENT_ENABLED_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(67108864i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_CHROMA_QP_OFFSET_LIST_ENABLED_FLAG_REQUIRED: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(-2147483648i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_CHROMA_QP_OFFSET_LIST_ENABLED_FLAG_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(1073741824i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_CONSTRAINED_INTRAPREDICTION_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(4i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_CROSS_COMPONENT_PREDICTION_ENABLED_FLAG_REQUIRED: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(536870912i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_CROSS_COMPONENT_PREDICTION_ENABLED_FLAG_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(268435456i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_DISABLING_LOOP_FILTER_ACROSS_SLICES_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(128i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_EXPLICIT_RDPCM_ENABLED_REQUIRED: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(131072i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_EXPLICIT_RDPCM_ENABLED_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(65536i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_EXTENDED_PRECISION_PROCESSING_REQUIRED: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(524288i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_EXTENDED_PRECISION_PROCESSING_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(262144i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_HIGH_PRECISION_OFFSETS_ENABLED_REQUIRED: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(8388608i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_HIGH_PRECISION_OFFSETS_ENABLED_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(4194304i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_IMPLICIT_RDPCM_ENABLED_REQUIRED: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(32768i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_IMPLICIT_RDPCM_ENABLED_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(16384i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_INTRA_SLICE_CONSTRAINED_ENCODING_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(2i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_INTRA_SMOOTHING_DISABLED_REQUIRED: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(2097152i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_INTRA_SMOOTHING_DISABLED_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(1048576i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_NONE: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(0i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_NUM_REF_IDX_ACTIVE_OVERRIDE_FLAG_SLICE_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(512i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_PERSISTENT_RICE_ADAPTATION_ENABLED_REQUIRED: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(33554432i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_PERSISTENT_RICE_ADAPTATION_ENABLED_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(16777216i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_P_FRAMES_IMPLEMENTED_AS_LOW_DELAY_B_FRAMES: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(256i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_SAO_FILTER_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(8i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_TRANSFORM_SKIP_CONTEXT_ENABLED_REQUIRED: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(8192i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_TRANSFORM_SKIP_CONTEXT_ENABLED_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(4096i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_TRANSFORM_SKIP_ROTATION_ENABLED_REQUIRED: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(2048i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_TRANSFORM_SKIP_ROTATION_ENABLED_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(1024i32);
pub const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_TRANSFORM_SKIP_SUPPORT: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAGS(64i32);
pub const D3D12_VIDEO_ENCODER_CODEC_H264: D3D12_VIDEO_ENCODER_CODEC = D3D12_VIDEO_ENCODER_CODEC(0i32);
pub const D3D12_VIDEO_ENCODER_CODEC_HEVC: D3D12_VIDEO_ENCODER_CODEC = D3D12_VIDEO_ENCODER_CODEC(1i32);
#[repr(C)]
#[derive(Clone, Copy)]
pub struct D3D12_VIDEO_ENCODER_CODEC_PICTURE_CONTROL_SUPPORT {
pub DataSize: u32,
pub Anonymous: D3D12_VIDEO_ENCODER_CODEC_PICTURE_CONTROL_SUPPORT_0,
}
impl Default for D3D12_VIDEO_ENCODER_CODEC_PICTURE_CONTROL_SUPPORT {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub union D3D12_VIDEO_ENCODER_CODEC_PICTURE_CONTROL_SUPPORT_0 {
pub pH264Support: *mut D3D12_VIDEO_ENCODER_CODEC_PICTURE_CONTROL_SUPPORT_H264,
pub pHEVCSupport: *mut D3D12_VIDEO_ENCODER_CODEC_PICTURE_CONTROL_SUPPORT_HEVC,
pub pAV1Support: *mut D3D12_VIDEO_ENCODER_CODEC_AV1_PICTURE_CONTROL_SUPPORT,
}
impl Default for D3D12_VIDEO_ENCODER_CODEC_PICTURE_CONTROL_SUPPORT_0 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_CODEC_PICTURE_CONTROL_SUPPORT_H264 {
pub MaxL0ReferencesForP: u32,
pub MaxL0ReferencesForB: u32,
pub MaxL1ReferencesForB: u32,
pub MaxLongTermReferences: u32,
pub MaxDPBCapacity: u32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_CODEC_PICTURE_CONTROL_SUPPORT_HEVC {
pub MaxL0ReferencesForP: u32,
pub MaxL0ReferencesForB: u32,
pub MaxL1ReferencesForB: u32,
pub MaxLongTermReferences: u32,
pub MaxDPBCapacity: u32,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_COMPRESSED_BITSTREAM {
pub pBuffer: core::mem::ManuallyDrop<Option<super::super::Graphics::Direct3D12::ID3D12Resource>>,
pub FrameStartOffset: u64,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[derive(Clone, Copy)]
pub struct D3D12_VIDEO_ENCODER_DESC {
pub NodeMask: u32,
pub Flags: D3D12_VIDEO_ENCODER_FLAGS,
pub EncodeCodec: D3D12_VIDEO_ENCODER_CODEC,
pub EncodeProfile: D3D12_VIDEO_ENCODER_PROFILE_DESC,
pub InputFormat: super::super::Graphics::Dxgi::Common::DXGI_FORMAT,
pub CodecConfiguration: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION,
pub MaxMotionEstimationPrecision: D3D12_VIDEO_ENCODER_MOTION_ESTIMATION_PRECISION_MODE,
}
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
impl Default for D3D12_VIDEO_ENCODER_DESC {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub struct D3D12_VIDEO_ENCODER_ENCODEFRAME_INPUT_ARGUMENTS {
pub SequenceControlDesc: D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_DESC,
pub PictureControlDesc: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_DESC,
pub pInputFrame: core::mem::ManuallyDrop<Option<super::super::Graphics::Direct3D12::ID3D12Resource>>,
pub InputFrameSubresource: u32,
pub CurrentFrameBitstreamMetadataSize: u32,
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl Clone for D3D12_VIDEO_ENCODER_ENCODEFRAME_INPUT_ARGUMENTS {
fn clone(&self) -> Self {
unsafe { core::mem::transmute_copy(self) }
}
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl Default for D3D12_VIDEO_ENCODER_ENCODEFRAME_INPUT_ARGUMENTS {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_ENCODEFRAME_OUTPUT_ARGUMENTS {
pub Bitstream: D3D12_VIDEO_ENCODER_COMPRESSED_BITSTREAM,
pub ReconstructedPicture: D3D12_VIDEO_ENCODER_RECONSTRUCTED_PICTURE,
pub EncoderOutputMetadata: D3D12_VIDEO_ENCODER_ENCODE_OPERATION_METADATA_BUFFER,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_ENCODE_ERROR_FLAGS(pub i32);
impl D3D12_VIDEO_ENCODER_ENCODE_ERROR_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_ENCODER_ENCODE_ERROR_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_ENCODER_ENCODE_ERROR_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_ENCODER_ENCODE_ERROR_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_ENCODER_ENCODE_ERROR_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_ENCODER_ENCODE_ERROR_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_ENCODER_ENCODE_ERROR_FLAG_CODEC_PICTURE_CONTROL_NOT_SUPPORTED: D3D12_VIDEO_ENCODER_ENCODE_ERROR_FLAGS = D3D12_VIDEO_ENCODER_ENCODE_ERROR_FLAGS(1i32);
pub const D3D12_VIDEO_ENCODER_ENCODE_ERROR_FLAG_INVALID_METADATA_BUFFER_SOURCE: D3D12_VIDEO_ENCODER_ENCODE_ERROR_FLAGS = D3D12_VIDEO_ENCODER_ENCODE_ERROR_FLAGS(16i32);
pub const D3D12_VIDEO_ENCODER_ENCODE_ERROR_FLAG_INVALID_REFERENCE_PICTURES: D3D12_VIDEO_ENCODER_ENCODE_ERROR_FLAGS = D3D12_VIDEO_ENCODER_ENCODE_ERROR_FLAGS(4i32);
pub const D3D12_VIDEO_ENCODER_ENCODE_ERROR_FLAG_NO_ERROR: D3D12_VIDEO_ENCODER_ENCODE_ERROR_FLAGS = D3D12_VIDEO_ENCODER_ENCODE_ERROR_FLAGS(0i32);
pub const D3D12_VIDEO_ENCODER_ENCODE_ERROR_FLAG_RECONFIGURATION_REQUEST_NOT_SUPPORTED: D3D12_VIDEO_ENCODER_ENCODE_ERROR_FLAGS = D3D12_VIDEO_ENCODER_ENCODE_ERROR_FLAGS(8i32);
pub const D3D12_VIDEO_ENCODER_ENCODE_ERROR_FLAG_SUBREGION_LAYOUT_CONFIGURATION_NOT_SUPPORTED: D3D12_VIDEO_ENCODER_ENCODE_ERROR_FLAGS = D3D12_VIDEO_ENCODER_ENCODE_ERROR_FLAGS(2i32);
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_ENCODE_OPERATION_METADATA_BUFFER {
pub pBuffer: core::mem::ManuallyDrop<Option<super::super::Graphics::Direct3D12::ID3D12Resource>>,
pub Offset: u64,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_FLAGS(pub i32);
impl D3D12_VIDEO_ENCODER_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_ENCODER_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_ENCODER_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_ENCODER_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_ENCODER_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_ENCODER_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_ENCODER_FLAG_NONE: D3D12_VIDEO_ENCODER_FLAGS = D3D12_VIDEO_ENCODER_FLAGS(0i32);
#[repr(C)]
#[derive(Clone, Copy)]
pub struct D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_CONFIG_SUPPORT {
pub DataSize: u32,
pub Anonymous: D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_CONFIG_SUPPORT_0,
}
impl Default for D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_CONFIG_SUPPORT {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub union D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_CONFIG_SUPPORT_0 {
pub pAV1Support: *mut D3D12_VIDEO_ENCODER_AV1_FRAME_SUBREGION_LAYOUT_CONFIG_SUPPORT,
}
impl Default for D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_CONFIG_SUPPORT_0 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE(pub i32);
pub const D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE_BYTES_PER_SUBREGION: D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE = D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE(1i32);
pub const D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE_CONFIGURABLE_GRID_PARTITION: D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE = D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE(6i32);
pub const D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE_FULL_FRAME: D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE = D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE(0i32);
pub const D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE_SQUARE_UNITS_PER_SUBREGION_ROW_UNALIGNED: D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE = D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE(2i32);
pub const D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE_UNIFORM_GRID_PARTITION: D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE = D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE(5i32);
pub const D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE_UNIFORM_PARTITIONING_ROWS_PER_SUBREGION: D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE = D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE(3i32);
pub const D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE_UNIFORM_PARTITIONING_SUBREGIONS_PER_FRAME: D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE = D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE(4i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_FRAME_SUBREGION_METADATA {
pub bSize: u64,
pub bStartOffset: u64,
pub bHeaderSize: u64,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_FRAME_TYPE_H264(pub i32);
pub const D3D12_VIDEO_ENCODER_FRAME_TYPE_H264_B_FRAME: D3D12_VIDEO_ENCODER_FRAME_TYPE_H264 = D3D12_VIDEO_ENCODER_FRAME_TYPE_H264(2i32);
pub const D3D12_VIDEO_ENCODER_FRAME_TYPE_H264_IDR_FRAME: D3D12_VIDEO_ENCODER_FRAME_TYPE_H264 = D3D12_VIDEO_ENCODER_FRAME_TYPE_H264(3i32);
pub const D3D12_VIDEO_ENCODER_FRAME_TYPE_H264_I_FRAME: D3D12_VIDEO_ENCODER_FRAME_TYPE_H264 = D3D12_VIDEO_ENCODER_FRAME_TYPE_H264(0i32);
pub const D3D12_VIDEO_ENCODER_FRAME_TYPE_H264_P_FRAME: D3D12_VIDEO_ENCODER_FRAME_TYPE_H264 = D3D12_VIDEO_ENCODER_FRAME_TYPE_H264(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_FRAME_TYPE_HEVC(pub i32);
pub const D3D12_VIDEO_ENCODER_FRAME_TYPE_HEVC_B_FRAME: D3D12_VIDEO_ENCODER_FRAME_TYPE_HEVC = D3D12_VIDEO_ENCODER_FRAME_TYPE_HEVC(2i32);
pub const D3D12_VIDEO_ENCODER_FRAME_TYPE_HEVC_IDR_FRAME: D3D12_VIDEO_ENCODER_FRAME_TYPE_HEVC = D3D12_VIDEO_ENCODER_FRAME_TYPE_HEVC(3i32);
pub const D3D12_VIDEO_ENCODER_FRAME_TYPE_HEVC_I_FRAME: D3D12_VIDEO_ENCODER_FRAME_TYPE_HEVC = D3D12_VIDEO_ENCODER_FRAME_TYPE_HEVC(0i32);
pub const D3D12_VIDEO_ENCODER_FRAME_TYPE_HEVC_P_FRAME: D3D12_VIDEO_ENCODER_FRAME_TYPE_HEVC = D3D12_VIDEO_ENCODER_FRAME_TYPE_HEVC(1i32);
#[repr(C)]
#[derive(Clone, Copy)]
pub struct D3D12_VIDEO_ENCODER_HEAP_DESC {
pub NodeMask: u32,
pub Flags: D3D12_VIDEO_ENCODER_HEAP_FLAGS,
pub EncodeCodec: D3D12_VIDEO_ENCODER_CODEC,
pub EncodeProfile: D3D12_VIDEO_ENCODER_PROFILE_DESC,
pub EncodeLevel: D3D12_VIDEO_ENCODER_LEVEL_SETTING,
pub ResolutionsListCount: u32,
pub pResolutionList: *const D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC,
}
impl Default for D3D12_VIDEO_ENCODER_HEAP_DESC {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_HEAP_FLAGS(pub i32);
impl D3D12_VIDEO_ENCODER_HEAP_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_ENCODER_HEAP_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_ENCODER_HEAP_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_ENCODER_HEAP_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_ENCODER_HEAP_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_ENCODER_HEAP_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_ENCODER_HEAP_FLAG_NONE: D3D12_VIDEO_ENCODER_HEAP_FLAGS = D3D12_VIDEO_ENCODER_HEAP_FLAGS(0i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_INTRA_REFRESH {
pub Mode: D3D12_VIDEO_ENCODER_INTRA_REFRESH_MODE,
pub IntraRefreshDuration: u32,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_INTRA_REFRESH_MODE(pub i32);
pub const D3D12_VIDEO_ENCODER_INTRA_REFRESH_MODE_NONE: D3D12_VIDEO_ENCODER_INTRA_REFRESH_MODE = D3D12_VIDEO_ENCODER_INTRA_REFRESH_MODE(0i32);
pub const D3D12_VIDEO_ENCODER_INTRA_REFRESH_MODE_ROW_BASED: D3D12_VIDEO_ENCODER_INTRA_REFRESH_MODE = D3D12_VIDEO_ENCODER_INTRA_REFRESH_MODE(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_LEVELS_H264(pub i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_H264_1: D3D12_VIDEO_ENCODER_LEVELS_H264 = D3D12_VIDEO_ENCODER_LEVELS_H264(0i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_H264_11: D3D12_VIDEO_ENCODER_LEVELS_H264 = D3D12_VIDEO_ENCODER_LEVELS_H264(2i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_H264_12: D3D12_VIDEO_ENCODER_LEVELS_H264 = D3D12_VIDEO_ENCODER_LEVELS_H264(3i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_H264_13: D3D12_VIDEO_ENCODER_LEVELS_H264 = D3D12_VIDEO_ENCODER_LEVELS_H264(4i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_H264_1b: D3D12_VIDEO_ENCODER_LEVELS_H264 = D3D12_VIDEO_ENCODER_LEVELS_H264(1i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_H264_2: D3D12_VIDEO_ENCODER_LEVELS_H264 = D3D12_VIDEO_ENCODER_LEVELS_H264(5i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_H264_21: D3D12_VIDEO_ENCODER_LEVELS_H264 = D3D12_VIDEO_ENCODER_LEVELS_H264(6i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_H264_22: D3D12_VIDEO_ENCODER_LEVELS_H264 = D3D12_VIDEO_ENCODER_LEVELS_H264(7i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_H264_3: D3D12_VIDEO_ENCODER_LEVELS_H264 = D3D12_VIDEO_ENCODER_LEVELS_H264(8i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_H264_31: D3D12_VIDEO_ENCODER_LEVELS_H264 = D3D12_VIDEO_ENCODER_LEVELS_H264(9i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_H264_32: D3D12_VIDEO_ENCODER_LEVELS_H264 = D3D12_VIDEO_ENCODER_LEVELS_H264(10i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_H264_4: D3D12_VIDEO_ENCODER_LEVELS_H264 = D3D12_VIDEO_ENCODER_LEVELS_H264(11i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_H264_41: D3D12_VIDEO_ENCODER_LEVELS_H264 = D3D12_VIDEO_ENCODER_LEVELS_H264(12i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_H264_42: D3D12_VIDEO_ENCODER_LEVELS_H264 = D3D12_VIDEO_ENCODER_LEVELS_H264(13i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_H264_5: D3D12_VIDEO_ENCODER_LEVELS_H264 = D3D12_VIDEO_ENCODER_LEVELS_H264(14i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_H264_51: D3D12_VIDEO_ENCODER_LEVELS_H264 = D3D12_VIDEO_ENCODER_LEVELS_H264(15i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_H264_52: D3D12_VIDEO_ENCODER_LEVELS_H264 = D3D12_VIDEO_ENCODER_LEVELS_H264(16i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_H264_6: D3D12_VIDEO_ENCODER_LEVELS_H264 = D3D12_VIDEO_ENCODER_LEVELS_H264(17i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_H264_61: D3D12_VIDEO_ENCODER_LEVELS_H264 = D3D12_VIDEO_ENCODER_LEVELS_H264(18i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_H264_62: D3D12_VIDEO_ENCODER_LEVELS_H264 = D3D12_VIDEO_ENCODER_LEVELS_H264(19i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_LEVELS_HEVC(pub i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_HEVC_1: D3D12_VIDEO_ENCODER_LEVELS_HEVC = D3D12_VIDEO_ENCODER_LEVELS_HEVC(0i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_HEVC_2: D3D12_VIDEO_ENCODER_LEVELS_HEVC = D3D12_VIDEO_ENCODER_LEVELS_HEVC(1i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_HEVC_21: D3D12_VIDEO_ENCODER_LEVELS_HEVC = D3D12_VIDEO_ENCODER_LEVELS_HEVC(2i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_HEVC_3: D3D12_VIDEO_ENCODER_LEVELS_HEVC = D3D12_VIDEO_ENCODER_LEVELS_HEVC(3i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_HEVC_31: D3D12_VIDEO_ENCODER_LEVELS_HEVC = D3D12_VIDEO_ENCODER_LEVELS_HEVC(4i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_HEVC_4: D3D12_VIDEO_ENCODER_LEVELS_HEVC = D3D12_VIDEO_ENCODER_LEVELS_HEVC(5i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_HEVC_41: D3D12_VIDEO_ENCODER_LEVELS_HEVC = D3D12_VIDEO_ENCODER_LEVELS_HEVC(6i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_HEVC_5: D3D12_VIDEO_ENCODER_LEVELS_HEVC = D3D12_VIDEO_ENCODER_LEVELS_HEVC(7i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_HEVC_51: D3D12_VIDEO_ENCODER_LEVELS_HEVC = D3D12_VIDEO_ENCODER_LEVELS_HEVC(8i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_HEVC_52: D3D12_VIDEO_ENCODER_LEVELS_HEVC = D3D12_VIDEO_ENCODER_LEVELS_HEVC(9i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_HEVC_6: D3D12_VIDEO_ENCODER_LEVELS_HEVC = D3D12_VIDEO_ENCODER_LEVELS_HEVC(10i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_HEVC_61: D3D12_VIDEO_ENCODER_LEVELS_HEVC = D3D12_VIDEO_ENCODER_LEVELS_HEVC(11i32);
pub const D3D12_VIDEO_ENCODER_LEVELS_HEVC_62: D3D12_VIDEO_ENCODER_LEVELS_HEVC = D3D12_VIDEO_ENCODER_LEVELS_HEVC(12i32);
#[repr(C)]
#[derive(Clone, Copy)]
pub struct D3D12_VIDEO_ENCODER_LEVEL_SETTING {
pub DataSize: u32,
pub Anonymous: D3D12_VIDEO_ENCODER_LEVEL_SETTING_0,
}
impl Default for D3D12_VIDEO_ENCODER_LEVEL_SETTING {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub union D3D12_VIDEO_ENCODER_LEVEL_SETTING_0 {
pub pH264LevelSetting: *mut D3D12_VIDEO_ENCODER_LEVELS_H264,
pub pHEVCLevelSetting: *mut D3D12_VIDEO_ENCODER_LEVEL_TIER_CONSTRAINTS_HEVC,
pub pAV1LevelSetting: *mut D3D12_VIDEO_ENCODER_AV1_LEVEL_TIER_CONSTRAINTS,
}
impl Default for D3D12_VIDEO_ENCODER_LEVEL_SETTING_0 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_LEVEL_TIER_CONSTRAINTS_HEVC {
pub Level: D3D12_VIDEO_ENCODER_LEVELS_HEVC,
pub Tier: D3D12_VIDEO_ENCODER_TIER_HEVC,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_MOTION_ESTIMATION_PRECISION_MODE(pub i32);
pub const D3D12_VIDEO_ENCODER_MOTION_ESTIMATION_PRECISION_MODE_EIGHTH_PIXEL: D3D12_VIDEO_ENCODER_MOTION_ESTIMATION_PRECISION_MODE = D3D12_VIDEO_ENCODER_MOTION_ESTIMATION_PRECISION_MODE(4i32);
pub const D3D12_VIDEO_ENCODER_MOTION_ESTIMATION_PRECISION_MODE_FULL_PIXEL: D3D12_VIDEO_ENCODER_MOTION_ESTIMATION_PRECISION_MODE = D3D12_VIDEO_ENCODER_MOTION_ESTIMATION_PRECISION_MODE(1i32);
pub const D3D12_VIDEO_ENCODER_MOTION_ESTIMATION_PRECISION_MODE_HALF_PIXEL: D3D12_VIDEO_ENCODER_MOTION_ESTIMATION_PRECISION_MODE = D3D12_VIDEO_ENCODER_MOTION_ESTIMATION_PRECISION_MODE(2i32);
pub const D3D12_VIDEO_ENCODER_MOTION_ESTIMATION_PRECISION_MODE_MAXIMUM: D3D12_VIDEO_ENCODER_MOTION_ESTIMATION_PRECISION_MODE = D3D12_VIDEO_ENCODER_MOTION_ESTIMATION_PRECISION_MODE(0i32);
pub const D3D12_VIDEO_ENCODER_MOTION_ESTIMATION_PRECISION_MODE_QUARTER_PIXEL: D3D12_VIDEO_ENCODER_MOTION_ESTIMATION_PRECISION_MODE = D3D12_VIDEO_ENCODER_MOTION_ESTIMATION_PRECISION_MODE(3i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_OUTPUT_METADATA {
pub EncodeErrorFlags: u64,
pub EncodeStats: D3D12_VIDEO_ENCODER_OUTPUT_METADATA_STATISTICS,
pub EncodedBitstreamWrittenBytesCount: u64,
pub WrittenSubregionsCount: u64,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_OUTPUT_METADATA_STATISTICS {
pub AverageQP: u64,
pub IntraCodingUnitsCount: u64,
pub InterCodingUnitsCount: u64,
pub SkipCodingUnitsCount: u64,
pub AverageMotionEstimationXDirection: u64,
pub AverageMotionEstimationYDirection: u64,
}
#[repr(C)]
#[derive(Clone, Copy)]
pub struct D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA {
pub DataSize: u32,
pub Anonymous: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_0,
}
impl Default for D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub union D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_0 {
pub pH264PicData: *mut D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264,
pub pHEVCPicData: *mut D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC,
pub pHEVCPicData1: *mut D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC1,
pub pAV1PicData: *mut D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_CODEC_DATA,
}
impl Default for D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_0 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264 {
pub Flags: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_FLAGS,
pub FrameType: D3D12_VIDEO_ENCODER_FRAME_TYPE_H264,
pub pic_parameter_set_id: u32,
pub idr_pic_id: u32,
pub PictureOrderCountNumber: u32,
pub FrameDecodingOrderNumber: u32,
pub TemporalLayerIndex: u32,
pub List0ReferenceFramesCount: u32,
pub pList0ReferenceFrames: *mut u32,
pub List1ReferenceFramesCount: u32,
pub pList1ReferenceFrames: *mut u32,
pub ReferenceFramesReconPictureDescriptorsCount: u32,
pub pReferenceFramesReconPictureDescriptors: *mut D3D12_VIDEO_ENCODER_REFERENCE_PICTURE_DESCRIPTOR_H264,
pub adaptive_ref_pic_marking_mode_flag: u8,
pub RefPicMarkingOperationsCommandsCount: u32,
pub pRefPicMarkingOperationsCommands: *mut D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_REFERENCE_PICTURE_MARKING_OPERATION,
pub List0RefPicModificationsCount: u32,
pub pList0RefPicModifications: *mut D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_REFERENCE_PICTURE_LIST_MODIFICATION_OPERATION,
pub List1RefPicModificationsCount: u32,
pub pList1RefPicModifications: *mut D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_REFERENCE_PICTURE_LIST_MODIFICATION_OPERATION,
pub QPMapValuesCount: u32,
pub pRateControlQPMap: *mut i8,
}
impl Default for D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_FLAGS(pub i32);
impl D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_FLAG_NONE: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_FLAGS = D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_FLAGS(0i32);
pub const D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_FLAG_REQUEST_INTRA_CONSTRAINED_SLICES: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_FLAGS = D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_FLAGS(1i32);
pub const D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_FLAG_REQUEST_NUM_REF_IDX_ACTIVE_OVERRIDE_FLAG_SLICE: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_FLAGS = D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_FLAGS(2i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_REFERENCE_PICTURE_LIST_MODIFICATION_OPERATION {
pub modification_of_pic_nums_idc: u8,
pub abs_diff_pic_num_minus1: u32,
pub long_term_pic_num: u32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_REFERENCE_PICTURE_MARKING_OPERATION {
pub memory_management_control_operation: u8,
pub difference_of_pic_nums_minus1: u32,
pub long_term_pic_num: u32,
pub long_term_frame_idx: u32,
pub max_long_term_frame_idx_plus1: u32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC {
pub Flags: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC_FLAGS,
pub FrameType: D3D12_VIDEO_ENCODER_FRAME_TYPE_HEVC,
pub slice_pic_parameter_set_id: u32,
pub PictureOrderCountNumber: u32,
pub TemporalLayerIndex: u32,
pub List0ReferenceFramesCount: u32,
pub pList0ReferenceFrames: *mut u32,
pub List1ReferenceFramesCount: u32,
pub pList1ReferenceFrames: *mut u32,
pub ReferenceFramesReconPictureDescriptorsCount: u32,
pub pReferenceFramesReconPictureDescriptors: *mut D3D12_VIDEO_ENCODER_REFERENCE_PICTURE_DESCRIPTOR_HEVC,
pub List0RefPicModificationsCount: u32,
pub pList0RefPicModifications: *mut u32,
pub List1RefPicModificationsCount: u32,
pub pList1RefPicModifications: *mut u32,
pub QPMapValuesCount: u32,
pub pRateControlQPMap: *mut i8,
}
impl Default for D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC1 {
pub Flags: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC_FLAGS,
pub FrameType: D3D12_VIDEO_ENCODER_FRAME_TYPE_HEVC,
pub slice_pic_parameter_set_id: u32,
pub PictureOrderCountNumber: u32,
pub TemporalLayerIndex: u32,
pub List0ReferenceFramesCount: u32,
pub pList0ReferenceFrames: *mut u32,
pub List1ReferenceFramesCount: u32,
pub pList1ReferenceFrames: *mut u32,
pub ReferenceFramesReconPictureDescriptorsCount: u32,
pub pReferenceFramesReconPictureDescriptors: *mut D3D12_VIDEO_ENCODER_REFERENCE_PICTURE_DESCRIPTOR_HEVC,
pub List0RefPicModificationsCount: u32,
pub pList0RefPicModifications: *mut u32,
pub List1RefPicModificationsCount: u32,
pub pList1RefPicModifications: *mut u32,
pub QPMapValuesCount: u32,
pub pRateControlQPMap: *mut i8,
pub diff_cu_chroma_qp_offset_depth: u8,
pub log2_sao_offset_scale_luma: u8,
pub log2_sao_offset_scale_chroma: u8,
pub log2_max_transform_skip_block_size_minus2: u8,
pub chroma_qp_offset_list_len_minus1: u8,
pub cb_qp_offset_list: [i8; 6],
pub cr_qp_offset_list: [i8; 6],
}
impl Default for D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC1 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC_FLAGS(pub i32);
impl D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC_FLAG_CHROMA_QP_OFFSET_LIST: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC_FLAGS = D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC_FLAGS(8i32);
pub const D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC_FLAG_CROSS_COMPONENT_PREDICTION: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC_FLAGS = D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC_FLAGS(4i32);
pub const D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC_FLAG_NONE: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC_FLAGS = D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC_FLAGS(0i32);
pub const D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC_FLAG_REQUEST_INTRA_CONSTRAINED_SLICES: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC_FLAGS = D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC_FLAGS(1i32);
pub const D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC_FLAG_REQUEST_NUM_REF_IDX_ACTIVE_OVERRIDE_FLAG_SLICE: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC_FLAGS = D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC_FLAGS(2i32);
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[derive(Clone, Copy)]
pub struct D3D12_VIDEO_ENCODER_PICTURE_CONTROL_DESC {
pub IntraRefreshFrameIndex: u32,
pub Flags: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_FLAGS,
pub PictureControlCodecData: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA,
pub ReferenceFrames: D3D12_VIDEO_ENCODE_REFERENCE_FRAMES,
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl Default for D3D12_VIDEO_ENCODER_PICTURE_CONTROL_DESC {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_PICTURE_CONTROL_FLAGS(pub i32);
impl D3D12_VIDEO_ENCODER_PICTURE_CONTROL_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_ENCODER_PICTURE_CONTROL_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_ENCODER_PICTURE_CONTROL_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_ENCODER_PICTURE_CONTROL_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_ENCODER_PICTURE_CONTROL_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_ENCODER_PICTURE_CONTROL_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_ENCODER_PICTURE_CONTROL_FLAG_NONE: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_PICTURE_CONTROL_FLAGS(0i32);
pub const D3D12_VIDEO_ENCODER_PICTURE_CONTROL_FLAG_USED_AS_REFERENCE_PICTURE: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_PICTURE_CONTROL_FLAGS(1i32);
#[repr(C)]
#[derive(Clone, Copy)]
pub struct D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA {
pub DataSize: u32,
pub Anonymous: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_0,
}
impl Default for D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub union D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_0 {
pub pSlicesPartition_H264: *const D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_SLICES,
pub pSlicesPartition_HEVC: *const D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_SLICES,
pub pTilesPartition_AV1: *const D3D12_VIDEO_ENCODER_AV1_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_TILES,
}
impl Default for D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_0 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub struct D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_SLICES {
pub Anonymous: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_SLICES_0,
}
impl Default for D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_SLICES {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub union D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_SLICES_0 {
pub MaxBytesPerSlice: u32,
pub NumberOfCodingUnitsPerSlice: u32,
pub NumberOfRowsPerSlice: u32,
pub NumberOfSlicesPerFrame: u32,
}
impl Default for D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA_SLICES_0 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC {
pub Width: u32,
pub Height: u32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_RATIO_DESC {
pub WidthRatio: u32,
pub HeightRatio: u32,
}
#[repr(C)]
#[derive(Clone, Copy)]
pub struct D3D12_VIDEO_ENCODER_PROFILE_DESC {
pub DataSize: u32,
pub Anonymous: D3D12_VIDEO_ENCODER_PROFILE_DESC_0,
}
impl Default for D3D12_VIDEO_ENCODER_PROFILE_DESC {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub union D3D12_VIDEO_ENCODER_PROFILE_DESC_0 {
pub pH264Profile: *mut D3D12_VIDEO_ENCODER_PROFILE_H264,
pub pHEVCProfile: *mut D3D12_VIDEO_ENCODER_PROFILE_HEVC,
pub pAV1Profile: *mut D3D12_VIDEO_ENCODER_AV1_PROFILE,
}
impl Default for D3D12_VIDEO_ENCODER_PROFILE_DESC_0 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_PROFILE_H264(pub i32);
pub const D3D12_VIDEO_ENCODER_PROFILE_H264_HIGH: D3D12_VIDEO_ENCODER_PROFILE_H264 = D3D12_VIDEO_ENCODER_PROFILE_H264(1i32);
pub const D3D12_VIDEO_ENCODER_PROFILE_H264_HIGH_10: D3D12_VIDEO_ENCODER_PROFILE_H264 = D3D12_VIDEO_ENCODER_PROFILE_H264(2i32);
pub const D3D12_VIDEO_ENCODER_PROFILE_H264_MAIN: D3D12_VIDEO_ENCODER_PROFILE_H264 = D3D12_VIDEO_ENCODER_PROFILE_H264(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_PROFILE_HEVC(pub i32);
pub const D3D12_VIDEO_ENCODER_PROFILE_HEVC_MAIN: D3D12_VIDEO_ENCODER_PROFILE_HEVC = D3D12_VIDEO_ENCODER_PROFILE_HEVC(0i32);
pub const D3D12_VIDEO_ENCODER_PROFILE_HEVC_MAIN10: D3D12_VIDEO_ENCODER_PROFILE_HEVC = D3D12_VIDEO_ENCODER_PROFILE_HEVC(1i32);
pub const D3D12_VIDEO_ENCODER_PROFILE_HEVC_MAIN10_422: D3D12_VIDEO_ENCODER_PROFILE_HEVC = D3D12_VIDEO_ENCODER_PROFILE_HEVC(3i32);
pub const D3D12_VIDEO_ENCODER_PROFILE_HEVC_MAIN10_444: D3D12_VIDEO_ENCODER_PROFILE_HEVC = D3D12_VIDEO_ENCODER_PROFILE_HEVC(6i32);
pub const D3D12_VIDEO_ENCODER_PROFILE_HEVC_MAIN12: D3D12_VIDEO_ENCODER_PROFILE_HEVC = D3D12_VIDEO_ENCODER_PROFILE_HEVC(2i32);
pub const D3D12_VIDEO_ENCODER_PROFILE_HEVC_MAIN12_422: D3D12_VIDEO_ENCODER_PROFILE_HEVC = D3D12_VIDEO_ENCODER_PROFILE_HEVC(4i32);
pub const D3D12_VIDEO_ENCODER_PROFILE_HEVC_MAIN12_444: D3D12_VIDEO_ENCODER_PROFILE_HEVC = D3D12_VIDEO_ENCODER_PROFILE_HEVC(7i32);
pub const D3D12_VIDEO_ENCODER_PROFILE_HEVC_MAIN16_444: D3D12_VIDEO_ENCODER_PROFILE_HEVC = D3D12_VIDEO_ENCODER_PROFILE_HEVC(8i32);
pub const D3D12_VIDEO_ENCODER_PROFILE_HEVC_MAIN_444: D3D12_VIDEO_ENCODER_PROFILE_HEVC = D3D12_VIDEO_ENCODER_PROFILE_HEVC(5i32);
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[derive(Clone, Copy)]
pub struct D3D12_VIDEO_ENCODER_RATE_CONTROL {
pub Mode: D3D12_VIDEO_ENCODER_RATE_CONTROL_MODE,
pub Flags: D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAGS,
pub ConfigParams: D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS,
pub TargetFrameRate: super::super::Graphics::Dxgi::Common::DXGI_RATIONAL,
}
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
impl Default for D3D12_VIDEO_ENCODER_RATE_CONTROL {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_RATE_CONTROL_ABSOLUTE_QP_MAP {
pub QualityVsSpeed: u32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_RATE_CONTROL_CBR {
pub InitialQP: u32,
pub MinQP: u32,
pub MaxQP: u32,
pub MaxFrameBitSize: u64,
pub TargetBitRate: u64,
pub VBVCapacity: u64,
pub InitialVBVFullness: u64,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_RATE_CONTROL_CBR1 {
pub InitialQP: u32,
pub MinQP: u32,
pub MaxQP: u32,
pub MaxFrameBitSize: u64,
pub TargetBitRate: u64,
pub VBVCapacity: u64,
pub InitialVBVFullness: u64,
pub QualityVsSpeed: u32,
}
#[repr(C)]
#[derive(Clone, Copy)]
pub struct D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS {
pub DataSize: u32,
pub Anonymous: D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS_0,
}
impl Default for D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub union D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS_0 {
pub pConfiguration_CQP: *const D3D12_VIDEO_ENCODER_RATE_CONTROL_CQP,
pub pConfiguration_CBR: *const D3D12_VIDEO_ENCODER_RATE_CONTROL_CBR,
pub pConfiguration_VBR: *const D3D12_VIDEO_ENCODER_RATE_CONTROL_VBR,
pub pConfiguration_QVBR: *const D3D12_VIDEO_ENCODER_RATE_CONTROL_QVBR,
pub pConfiguration_CQP1: *const D3D12_VIDEO_ENCODER_RATE_CONTROL_CQP1,
pub pConfiguration_CBR1: *const D3D12_VIDEO_ENCODER_RATE_CONTROL_CBR1,
pub pConfiguration_VBR1: *const D3D12_VIDEO_ENCODER_RATE_CONTROL_VBR1,
pub pConfiguration_QVBR1: *const D3D12_VIDEO_ENCODER_RATE_CONTROL_QVBR1,
pub pConfiguration_AbsoluteQPMap: *const D3D12_VIDEO_ENCODER_RATE_CONTROL_ABSOLUTE_QP_MAP,
}
impl Default for D3D12_VIDEO_ENCODER_RATE_CONTROL_CONFIGURATION_PARAMS_0 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_RATE_CONTROL_CQP {
pub ConstantQP_FullIntracodedFrame: u32,
pub ConstantQP_InterPredictedFrame_PrevRefOnly: u32,
pub ConstantQP_InterPredictedFrame_BiDirectionalRef: u32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_RATE_CONTROL_CQP1 {
pub ConstantQP_FullIntracodedFrame: u32,
pub ConstantQP_InterPredictedFrame_PrevRefOnly: u32,
pub ConstantQP_InterPredictedFrame_BiDirectionalRef: u32,
pub QualityVsSpeed: u32,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAGS(pub i32);
impl D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAG_ENABLE_DELTA_QP: D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAGS(1i32);
pub const D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAG_ENABLE_EXTENSION1_SUPPORT: D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAGS(64i32);
pub const D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAG_ENABLE_FRAME_ANALYSIS: D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAGS(2i32);
pub const D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAG_ENABLE_INITIAL_QP: D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAGS(8i32);
pub const D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAG_ENABLE_MAX_FRAME_SIZE: D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAGS(16i32);
pub const D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAG_ENABLE_QP_RANGE: D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAGS(4i32);
pub const D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAG_ENABLE_QUALITY_VS_SPEED: D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAGS(128i32);
pub const D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAG_ENABLE_VBV_SIZES: D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAGS(32i32);
pub const D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAG_NONE: D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAGS(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_RATE_CONTROL_MODE(pub i32);
pub const D3D12_VIDEO_ENCODER_RATE_CONTROL_MODE_ABSOLUTE_QP_MAP: D3D12_VIDEO_ENCODER_RATE_CONTROL_MODE = D3D12_VIDEO_ENCODER_RATE_CONTROL_MODE(0i32);
pub const D3D12_VIDEO_ENCODER_RATE_CONTROL_MODE_CBR: D3D12_VIDEO_ENCODER_RATE_CONTROL_MODE = D3D12_VIDEO_ENCODER_RATE_CONTROL_MODE(2i32);
pub const D3D12_VIDEO_ENCODER_RATE_CONTROL_MODE_CQP: D3D12_VIDEO_ENCODER_RATE_CONTROL_MODE = D3D12_VIDEO_ENCODER_RATE_CONTROL_MODE(1i32);
pub const D3D12_VIDEO_ENCODER_RATE_CONTROL_MODE_QVBR: D3D12_VIDEO_ENCODER_RATE_CONTROL_MODE = D3D12_VIDEO_ENCODER_RATE_CONTROL_MODE(4i32);
pub const D3D12_VIDEO_ENCODER_RATE_CONTROL_MODE_VBR: D3D12_VIDEO_ENCODER_RATE_CONTROL_MODE = D3D12_VIDEO_ENCODER_RATE_CONTROL_MODE(3i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_RATE_CONTROL_QVBR {
pub InitialQP: u32,
pub MinQP: u32,
pub MaxQP: u32,
pub MaxFrameBitSize: u64,
pub TargetAvgBitRate: u64,
pub PeakBitRate: u64,
pub ConstantQualityTarget: u32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_RATE_CONTROL_QVBR1 {
pub InitialQP: u32,
pub MinQP: u32,
pub MaxQP: u32,
pub MaxFrameBitSize: u64,
pub TargetAvgBitRate: u64,
pub PeakBitRate: u64,
pub ConstantQualityTarget: u32,
pub VBVCapacity: u64,
pub InitialVBVFullness: u64,
pub QualityVsSpeed: u32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_RATE_CONTROL_VBR {
pub InitialQP: u32,
pub MinQP: u32,
pub MaxQP: u32,
pub MaxFrameBitSize: u64,
pub TargetAvgBitRate: u64,
pub PeakBitRate: u64,
pub VBVCapacity: u64,
pub InitialVBVFullness: u64,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_RATE_CONTROL_VBR1 {
pub InitialQP: u32,
pub MinQP: u32,
pub MaxQP: u32,
pub MaxFrameBitSize: u64,
pub TargetAvgBitRate: u64,
pub PeakBitRate: u64,
pub VBVCapacity: u64,
pub InitialVBVFullness: u64,
pub QualityVsSpeed: u32,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_RECONSTRUCTED_PICTURE {
pub pReconstructedPicture: core::mem::ManuallyDrop<Option<super::super::Graphics::Direct3D12::ID3D12Resource>>,
pub ReconstructedPictureSubresource: u32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_REFERENCE_PICTURE_DESCRIPTOR_H264 {
pub ReconstructedPictureResourceIndex: u32,
pub IsLongTermReference: windows_core::BOOL,
pub LongTermPictureIdx: u32,
pub PictureOrderCountNumber: u32,
pub FrameDecodingOrderNumber: u32,
pub TemporalLayerIndex: u32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_REFERENCE_PICTURE_DESCRIPTOR_HEVC {
pub ReconstructedPictureResourceIndex: u32,
pub IsRefUsedByCurrentPic: windows_core::BOOL,
pub IsLongTermReference: windows_core::BOOL,
pub PictureOrderCountNumber: u32,
pub TemporalLayerIndex: u32,
}
#[repr(C)]
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub struct D3D12_VIDEO_ENCODER_RESOLVE_METADATA_INPUT_ARGUMENTS {
pub EncoderCodec: D3D12_VIDEO_ENCODER_CODEC,
pub EncoderProfile: D3D12_VIDEO_ENCODER_PROFILE_DESC,
pub EncoderInputFormat: super::super::Graphics::Dxgi::Common::DXGI_FORMAT,
pub EncodedPictureEffectiveResolution: D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC,
pub HWLayoutMetadata: D3D12_VIDEO_ENCODER_ENCODE_OPERATION_METADATA_BUFFER,
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl Clone for D3D12_VIDEO_ENCODER_RESOLVE_METADATA_INPUT_ARGUMENTS {
fn clone(&self) -> Self {
unsafe { core::mem::transmute_copy(self) }
}
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl Default for D3D12_VIDEO_ENCODER_RESOLVE_METADATA_INPUT_ARGUMENTS {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_RESOLVE_METADATA_OUTPUT_ARGUMENTS {
pub ResolvedLayoutMetadata: D3D12_VIDEO_ENCODER_ENCODE_OPERATION_METADATA_BUFFER,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[derive(Clone, Copy)]
pub struct D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_DESC {
pub Flags: D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_FLAGS,
pub IntraRefreshConfig: D3D12_VIDEO_ENCODER_INTRA_REFRESH,
pub RateControl: D3D12_VIDEO_ENCODER_RATE_CONTROL,
pub PictureTargetResolution: D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC,
pub SelectedLayoutMode: D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE,
pub FrameSubregionsLayoutData: D3D12_VIDEO_ENCODER_PICTURE_CONTROL_SUBREGIONS_LAYOUT_DATA,
pub CodecGopSequence: D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE,
}
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
impl Default for D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_DESC {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_FLAGS(pub i32);
impl D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_FLAG_GOP_SEQUENCE_CHANGE: D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_FLAGS(16i32);
pub const D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_FLAG_NONE: D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_FLAGS(0i32);
pub const D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_FLAG_RATE_CONTROL_CHANGE: D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_FLAGS(2i32);
pub const D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_FLAG_REQUEST_INTRA_REFRESH: D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_FLAGS(8i32);
pub const D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_FLAG_RESOLUTION_CHANGE: D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_FLAGS(1i32);
pub const D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_FLAG_SUBREGION_LAYOUT_CHANGE: D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_FLAGS = D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_FLAGS(4i32);
#[repr(C)]
#[derive(Clone, Copy)]
pub struct D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE {
pub DataSize: u32,
pub Anonymous: D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE_0,
}
impl Default for D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub union D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE_0 {
pub pH264GroupOfPictures: *mut D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE_H264,
pub pHEVCGroupOfPictures: *mut D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE_HEVC,
pub pAV1SequenceStructure: *mut D3D12_VIDEO_ENCODER_AV1_SEQUENCE_STRUCTURE,
}
impl Default for D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE_0 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE_H264 {
pub GOPLength: u32,
pub PPicturePeriod: u32,
pub pic_order_cnt_type: u8,
pub log2_max_frame_num_minus4: u8,
pub log2_max_pic_order_cnt_lsb_minus4: u8,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE_HEVC {
pub GOPLength: u32,
pub PPicturePeriod: u32,
pub log2_max_pic_order_cnt_lsb_minus4: u8,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_SUPPORT_FLAGS(pub i32);
impl D3D12_VIDEO_ENCODER_SUPPORT_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_ENCODER_SUPPORT_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_ENCODER_SUPPORT_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_ENCODER_SUPPORT_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_ENCODER_SUPPORT_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_ENCODER_SUPPORT_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_ENCODER_SUPPORT_FLAG_GENERAL_SUPPORT_OK: D3D12_VIDEO_ENCODER_SUPPORT_FLAGS = D3D12_VIDEO_ENCODER_SUPPORT_FLAGS(1i32);
pub const D3D12_VIDEO_ENCODER_SUPPORT_FLAG_MOTION_ESTIMATION_PRECISION_MODE_LIMIT_AVAILABLE: D3D12_VIDEO_ENCODER_SUPPORT_FLAGS = D3D12_VIDEO_ENCODER_SUPPORT_FLAGS(4096i32);
pub const D3D12_VIDEO_ENCODER_SUPPORT_FLAG_NONE: D3D12_VIDEO_ENCODER_SUPPORT_FLAGS = D3D12_VIDEO_ENCODER_SUPPORT_FLAGS(0i32);
pub const D3D12_VIDEO_ENCODER_SUPPORT_FLAG_RATE_CONTROL_ADJUSTABLE_QP_RANGE_AVAILABLE: D3D12_VIDEO_ENCODER_SUPPORT_FLAGS = D3D12_VIDEO_ENCODER_SUPPORT_FLAGS(256i32);
pub const D3D12_VIDEO_ENCODER_SUPPORT_FLAG_RATE_CONTROL_DELTA_QP_AVAILABLE: D3D12_VIDEO_ENCODER_SUPPORT_FLAGS = D3D12_VIDEO_ENCODER_SUPPORT_FLAGS(64i32);
pub const D3D12_VIDEO_ENCODER_SUPPORT_FLAG_RATE_CONTROL_EXTENSION1_SUPPORT: D3D12_VIDEO_ENCODER_SUPPORT_FLAGS = D3D12_VIDEO_ENCODER_SUPPORT_FLAGS(8192i32);
pub const D3D12_VIDEO_ENCODER_SUPPORT_FLAG_RATE_CONTROL_FRAME_ANALYSIS_AVAILABLE: D3D12_VIDEO_ENCODER_SUPPORT_FLAGS = D3D12_VIDEO_ENCODER_SUPPORT_FLAGS(16i32);
pub const D3D12_VIDEO_ENCODER_SUPPORT_FLAG_RATE_CONTROL_INITIAL_QP_AVAILABLE: D3D12_VIDEO_ENCODER_SUPPORT_FLAGS = D3D12_VIDEO_ENCODER_SUPPORT_FLAGS(512i32);
pub const D3D12_VIDEO_ENCODER_SUPPORT_FLAG_RATE_CONTROL_MAX_FRAME_SIZE_AVAILABLE: D3D12_VIDEO_ENCODER_SUPPORT_FLAGS = D3D12_VIDEO_ENCODER_SUPPORT_FLAGS(1024i32);
pub const D3D12_VIDEO_ENCODER_SUPPORT_FLAG_RATE_CONTROL_QUALITY_VS_SPEED_AVAILABLE: D3D12_VIDEO_ENCODER_SUPPORT_FLAGS = D3D12_VIDEO_ENCODER_SUPPORT_FLAGS(16384i32);
pub const D3D12_VIDEO_ENCODER_SUPPORT_FLAG_RATE_CONTROL_RECONFIGURATION_AVAILABLE: D3D12_VIDEO_ENCODER_SUPPORT_FLAGS = D3D12_VIDEO_ENCODER_SUPPORT_FLAGS(2i32);
pub const D3D12_VIDEO_ENCODER_SUPPORT_FLAG_RATE_CONTROL_VBV_SIZE_CONFIG_AVAILABLE: D3D12_VIDEO_ENCODER_SUPPORT_FLAGS = D3D12_VIDEO_ENCODER_SUPPORT_FLAGS(8i32);
pub const D3D12_VIDEO_ENCODER_SUPPORT_FLAG_READABLE_RECONSTRUCTED_PICTURE_LAYOUT_AVAILABLE: D3D12_VIDEO_ENCODER_SUPPORT_FLAGS = D3D12_VIDEO_ENCODER_SUPPORT_FLAGS(32768i32);
pub const D3D12_VIDEO_ENCODER_SUPPORT_FLAG_RECONSTRUCTED_FRAMES_REQUIRE_TEXTURE_ARRAYS: D3D12_VIDEO_ENCODER_SUPPORT_FLAGS = D3D12_VIDEO_ENCODER_SUPPORT_FLAGS(32i32);
pub const D3D12_VIDEO_ENCODER_SUPPORT_FLAG_RESOLUTION_RECONFIGURATION_AVAILABLE: D3D12_VIDEO_ENCODER_SUPPORT_FLAGS = D3D12_VIDEO_ENCODER_SUPPORT_FLAGS(4i32);
pub const D3D12_VIDEO_ENCODER_SUPPORT_FLAG_SEQUENCE_GOP_RECONFIGURATION_AVAILABLE: D3D12_VIDEO_ENCODER_SUPPORT_FLAGS = D3D12_VIDEO_ENCODER_SUPPORT_FLAGS(2048i32);
pub const D3D12_VIDEO_ENCODER_SUPPORT_FLAG_SUBREGION_LAYOUT_RECONFIGURATION_AVAILABLE: D3D12_VIDEO_ENCODER_SUPPORT_FLAGS = D3D12_VIDEO_ENCODER_SUPPORT_FLAGS(128i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_TIER_HEVC(pub i32);
pub const D3D12_VIDEO_ENCODER_TIER_HEVC_HIGH: D3D12_VIDEO_ENCODER_TIER_HEVC = D3D12_VIDEO_ENCODER_TIER_HEVC(1i32);
pub const D3D12_VIDEO_ENCODER_TIER_HEVC_MAIN: D3D12_VIDEO_ENCODER_TIER_HEVC = D3D12_VIDEO_ENCODER_TIER_HEVC(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_ENCODER_VALIDATION_FLAGS(pub i32);
impl D3D12_VIDEO_ENCODER_VALIDATION_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_ENCODER_VALIDATION_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_ENCODER_VALIDATION_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_ENCODER_VALIDATION_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_ENCODER_VALIDATION_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_ENCODER_VALIDATION_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_ENCODER_VALIDATION_FLAG_CODEC_CONFIGURATION_NOT_SUPPORTED: D3D12_VIDEO_ENCODER_VALIDATION_FLAGS = D3D12_VIDEO_ENCODER_VALIDATION_FLAGS(16i32);
pub const D3D12_VIDEO_ENCODER_VALIDATION_FLAG_CODEC_NOT_SUPPORTED: D3D12_VIDEO_ENCODER_VALIDATION_FLAGS = D3D12_VIDEO_ENCODER_VALIDATION_FLAGS(1i32);
pub const D3D12_VIDEO_ENCODER_VALIDATION_FLAG_GOP_STRUCTURE_NOT_SUPPORTED: D3D12_VIDEO_ENCODER_VALIDATION_FLAGS = D3D12_VIDEO_ENCODER_VALIDATION_FLAGS(2048i32);
pub const D3D12_VIDEO_ENCODER_VALIDATION_FLAG_INPUT_FORMAT_NOT_SUPPORTED: D3D12_VIDEO_ENCODER_VALIDATION_FLAGS = D3D12_VIDEO_ENCODER_VALIDATION_FLAGS(8i32);
pub const D3D12_VIDEO_ENCODER_VALIDATION_FLAG_INTRA_REFRESH_MODE_NOT_SUPPORTED: D3D12_VIDEO_ENCODER_VALIDATION_FLAGS = D3D12_VIDEO_ENCODER_VALIDATION_FLAGS(128i32);
pub const D3D12_VIDEO_ENCODER_VALIDATION_FLAG_NONE: D3D12_VIDEO_ENCODER_VALIDATION_FLAGS = D3D12_VIDEO_ENCODER_VALIDATION_FLAGS(0i32);
pub const D3D12_VIDEO_ENCODER_VALIDATION_FLAG_RATE_CONTROL_CONFIGURATION_NOT_SUPPORTED: D3D12_VIDEO_ENCODER_VALIDATION_FLAGS = D3D12_VIDEO_ENCODER_VALIDATION_FLAGS(64i32);
pub const D3D12_VIDEO_ENCODER_VALIDATION_FLAG_RATE_CONTROL_MODE_NOT_SUPPORTED: D3D12_VIDEO_ENCODER_VALIDATION_FLAGS = D3D12_VIDEO_ENCODER_VALIDATION_FLAGS(32i32);
pub const D3D12_VIDEO_ENCODER_VALIDATION_FLAG_RESOLUTION_NOT_SUPPORTED_IN_LIST: D3D12_VIDEO_ENCODER_VALIDATION_FLAGS = D3D12_VIDEO_ENCODER_VALIDATION_FLAGS(512i32);
pub const D3D12_VIDEO_ENCODER_VALIDATION_FLAG_SUBREGION_LAYOUT_DATA_NOT_SUPPORTED: D3D12_VIDEO_ENCODER_VALIDATION_FLAGS = D3D12_VIDEO_ENCODER_VALIDATION_FLAGS(4096i32);
pub const D3D12_VIDEO_ENCODER_VALIDATION_FLAG_SUBREGION_LAYOUT_MODE_NOT_SUPPORTED: D3D12_VIDEO_ENCODER_VALIDATION_FLAGS = D3D12_VIDEO_ENCODER_VALIDATION_FLAGS(256i32);
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_VIDEO_ENCODE_REFERENCE_FRAMES {
pub NumTexture2Ds: u32,
pub ppTexture2Ds: *mut Option<super::super::Graphics::Direct3D12::ID3D12Resource>,
pub pSubresources: *mut u32,
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl Default for D3D12_VIDEO_ENCODE_REFERENCE_FRAMES {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_EXTENSION_COMMAND_DESC {
pub NodeMask: u32,
pub CommandId: windows_core::GUID,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_EXTENSION_COMMAND_INFO {
pub CommandId: windows_core::GUID,
pub Name: windows_core::PCWSTR,
pub CommandListSupportFlags: super::super::Graphics::Direct3D12::D3D12_COMMAND_LIST_SUPPORT_FLAGS,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_FLAGS(pub i32);
impl D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_FLAG_NONE: D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_FLAGS = D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_FLAGS(0i32);
pub const D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_FLAG_READ: D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_FLAGS = D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_FLAGS(1i32);
pub const D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_FLAG_WRITE: D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_FLAGS = D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_FLAGS(2i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_INFO {
pub Name: windows_core::PCWSTR,
pub Type: D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE,
pub Flags: D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_FLAGS,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_STAGE(pub i32);
pub const D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_STAGE_CAPS_INPUT: D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_STAGE = D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_STAGE(3i32);
pub const D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_STAGE_CAPS_OUTPUT: D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_STAGE = D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_STAGE(4i32);
pub const D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_STAGE_CREATION: D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_STAGE = D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_STAGE(0i32);
pub const D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_STAGE_DEVICE_EXECUTE_INPUT: D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_STAGE = D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_STAGE(5i32);
pub const D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_STAGE_DEVICE_EXECUTE_OUTPUT: D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_STAGE = D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_STAGE(6i32);
pub const D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_STAGE_EXECUTION: D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_STAGE = D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_STAGE(2i32);
pub const D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_STAGE_INITIALIZATION: D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_STAGE = D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_STAGE(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE(pub i32);
pub const D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE_DOUBLE: D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE = D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE(9i32);
pub const D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE_FLOAT: D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE = D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE(8i32);
pub const D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE_RESOURCE: D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE = D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE(10i32);
pub const D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE_SINT16: D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE = D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE(5i32);
pub const D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE_SINT32: D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE = D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE(6i32);
pub const D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE_SINT64: D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE = D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE(7i32);
pub const D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE_SINT8: D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE = D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE(4i32);
pub const D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE_UINT16: D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE = D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE(1i32);
pub const D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE_UINT32: D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE = D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE(2i32);
pub const D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE_UINT64: D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE = D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE(3i32);
pub const D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE_UINT8: D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE = D3D12_VIDEO_EXTENSION_COMMAND_PARAMETER_TYPE(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_FIELD_TYPE(pub i32);
pub const D3D12_VIDEO_FIELD_TYPE_INTERLACED_BOTTOM_FIELD_FIRST: D3D12_VIDEO_FIELD_TYPE = D3D12_VIDEO_FIELD_TYPE(2i32);
pub const D3D12_VIDEO_FIELD_TYPE_INTERLACED_TOP_FIELD_FIRST: D3D12_VIDEO_FIELD_TYPE = D3D12_VIDEO_FIELD_TYPE(1i32);
pub const D3D12_VIDEO_FIELD_TYPE_NONE: D3D12_VIDEO_FIELD_TYPE = D3D12_VIDEO_FIELD_TYPE(0i32);
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_FORMAT {
pub Format: super::super::Graphics::Dxgi::Common::DXGI_FORMAT,
pub ColorSpace: super::super::Graphics::Dxgi::Common::DXGI_COLOR_SPACE_TYPE,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE(pub i32);
pub const D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE_FIELD_BASED: D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE = D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE(1i32);
pub const D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE_NONE: D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE = D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_FRAME_STEREO_FORMAT(pub i32);
pub const D3D12_VIDEO_FRAME_STEREO_FORMAT_HORIZONTAL: D3D12_VIDEO_FRAME_STEREO_FORMAT = D3D12_VIDEO_FRAME_STEREO_FORMAT(2i32);
pub const D3D12_VIDEO_FRAME_STEREO_FORMAT_MONO: D3D12_VIDEO_FRAME_STEREO_FORMAT = D3D12_VIDEO_FRAME_STEREO_FORMAT(1i32);
pub const D3D12_VIDEO_FRAME_STEREO_FORMAT_NONE: D3D12_VIDEO_FRAME_STEREO_FORMAT = D3D12_VIDEO_FRAME_STEREO_FORMAT(0i32);
pub const D3D12_VIDEO_FRAME_STEREO_FORMAT_SEPARATE: D3D12_VIDEO_FRAME_STEREO_FORMAT = D3D12_VIDEO_FRAME_STEREO_FORMAT(4i32);
pub const D3D12_VIDEO_FRAME_STEREO_FORMAT_VERTICAL: D3D12_VIDEO_FRAME_STEREO_FORMAT = D3D12_VIDEO_FRAME_STEREO_FORMAT(3i32);
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_MOTION_ESTIMATOR_DESC {
pub NodeMask: u32,
pub InputFormat: super::super::Graphics::Dxgi::Common::DXGI_FORMAT,
pub BlockSize: D3D12_VIDEO_MOTION_ESTIMATOR_SEARCH_BLOCK_SIZE,
pub Precision: D3D12_VIDEO_MOTION_ESTIMATOR_VECTOR_PRECISION,
pub SizeRange: D3D12_VIDEO_SIZE_RANGE,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_MOTION_ESTIMATOR_INPUT {
pub pInputTexture2D: core::mem::ManuallyDrop<Option<super::super::Graphics::Direct3D12::ID3D12Resource>>,
pub InputSubresourceIndex: u32,
pub pReferenceTexture2D: core::mem::ManuallyDrop<Option<super::super::Graphics::Direct3D12::ID3D12Resource>>,
pub ReferenceSubresourceIndex: u32,
pub pHintMotionVectorHeap: core::mem::ManuallyDrop<Option<ID3D12VideoMotionVectorHeap>>,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_MOTION_ESTIMATOR_OUTPUT {
pub pMotionVectorHeap: core::mem::ManuallyDrop<Option<ID3D12VideoMotionVectorHeap>>,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_MOTION_ESTIMATOR_SEARCH_BLOCK_SIZE(pub i32);
pub const D3D12_VIDEO_MOTION_ESTIMATOR_SEARCH_BLOCK_SIZE_16X16: D3D12_VIDEO_MOTION_ESTIMATOR_SEARCH_BLOCK_SIZE = D3D12_VIDEO_MOTION_ESTIMATOR_SEARCH_BLOCK_SIZE(1i32);
pub const D3D12_VIDEO_MOTION_ESTIMATOR_SEARCH_BLOCK_SIZE_8X8: D3D12_VIDEO_MOTION_ESTIMATOR_SEARCH_BLOCK_SIZE = D3D12_VIDEO_MOTION_ESTIMATOR_SEARCH_BLOCK_SIZE(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_MOTION_ESTIMATOR_SEARCH_BLOCK_SIZE_FLAGS(pub i32);
impl D3D12_VIDEO_MOTION_ESTIMATOR_SEARCH_BLOCK_SIZE_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_MOTION_ESTIMATOR_SEARCH_BLOCK_SIZE_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_MOTION_ESTIMATOR_SEARCH_BLOCK_SIZE_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_MOTION_ESTIMATOR_SEARCH_BLOCK_SIZE_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_MOTION_ESTIMATOR_SEARCH_BLOCK_SIZE_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_MOTION_ESTIMATOR_SEARCH_BLOCK_SIZE_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_MOTION_ESTIMATOR_SEARCH_BLOCK_SIZE_FLAG_16X16: D3D12_VIDEO_MOTION_ESTIMATOR_SEARCH_BLOCK_SIZE_FLAGS = D3D12_VIDEO_MOTION_ESTIMATOR_SEARCH_BLOCK_SIZE_FLAGS(2i32);
pub const D3D12_VIDEO_MOTION_ESTIMATOR_SEARCH_BLOCK_SIZE_FLAG_8X8: D3D12_VIDEO_MOTION_ESTIMATOR_SEARCH_BLOCK_SIZE_FLAGS = D3D12_VIDEO_MOTION_ESTIMATOR_SEARCH_BLOCK_SIZE_FLAGS(1i32);
pub const D3D12_VIDEO_MOTION_ESTIMATOR_SEARCH_BLOCK_SIZE_FLAG_NONE: D3D12_VIDEO_MOTION_ESTIMATOR_SEARCH_BLOCK_SIZE_FLAGS = D3D12_VIDEO_MOTION_ESTIMATOR_SEARCH_BLOCK_SIZE_FLAGS(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_MOTION_ESTIMATOR_VECTOR_PRECISION(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_MOTION_ESTIMATOR_VECTOR_PRECISION_FLAGS(pub i32);
impl D3D12_VIDEO_MOTION_ESTIMATOR_VECTOR_PRECISION_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_MOTION_ESTIMATOR_VECTOR_PRECISION_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_MOTION_ESTIMATOR_VECTOR_PRECISION_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_MOTION_ESTIMATOR_VECTOR_PRECISION_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_MOTION_ESTIMATOR_VECTOR_PRECISION_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_MOTION_ESTIMATOR_VECTOR_PRECISION_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_MOTION_ESTIMATOR_VECTOR_PRECISION_FLAG_NONE: D3D12_VIDEO_MOTION_ESTIMATOR_VECTOR_PRECISION_FLAGS = D3D12_VIDEO_MOTION_ESTIMATOR_VECTOR_PRECISION_FLAGS(0i32);
pub const D3D12_VIDEO_MOTION_ESTIMATOR_VECTOR_PRECISION_FLAG_QUARTER_PEL: D3D12_VIDEO_MOTION_ESTIMATOR_VECTOR_PRECISION_FLAGS = D3D12_VIDEO_MOTION_ESTIMATOR_VECTOR_PRECISION_FLAGS(1i32);
pub const D3D12_VIDEO_MOTION_ESTIMATOR_VECTOR_PRECISION_QUARTER_PEL: D3D12_VIDEO_MOTION_ESTIMATOR_VECTOR_PRECISION = D3D12_VIDEO_MOTION_ESTIMATOR_VECTOR_PRECISION(0i32);
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_MOTION_VECTOR_HEAP_DESC {
pub NodeMask: u32,
pub InputFormat: super::super::Graphics::Dxgi::Common::DXGI_FORMAT,
pub BlockSize: D3D12_VIDEO_MOTION_ESTIMATOR_SEARCH_BLOCK_SIZE,
pub Precision: D3D12_VIDEO_MOTION_ESTIMATOR_VECTOR_PRECISION,
pub SizeRange: D3D12_VIDEO_SIZE_RANGE,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_PROCESS_ALPHA_BLENDING {
pub Enable: windows_core::BOOL,
pub Alpha: f32,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE(pub i32);
pub const D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE_BACKGROUND: D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE = D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE(1i32);
pub const D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE_DESTINATION: D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE = D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE(2i32);
pub const D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE_OPAQUE: D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE = D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE(0i32);
pub const D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE_SOURCE_STREAM: D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE = D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE(3i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS(pub u32);
impl D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_ANAMORPHIC_SCALING: D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS = D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS(128u32);
pub const D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_COLOR_CORRECTION: D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS = D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS(8u32);
pub const D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_CUSTOM: D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS = D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS(2147483648u32);
pub const D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_DENOISE: D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS = D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS(1u32);
pub const D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_DERINGING: D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS = D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS(2u32);
pub const D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_EDGE_ENHANCEMENT: D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS = D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS(4u32);
pub const D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_FLESH_TONE_MAPPING: D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS = D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS(16u32);
pub const D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_IMAGE_STABILIZATION: D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS = D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS(32u32);
pub const D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_NONE: D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS = D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS(0u32);
pub const D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_SUPER_RESOLUTION: D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS = D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS(64u32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS(pub u32);
impl D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_PROCESS_DEINTERLACE_FLAG_BOB: D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS = D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS(1u32);
pub const D3D12_VIDEO_PROCESS_DEINTERLACE_FLAG_CUSTOM: D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS = D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS(2147483648u32);
pub const D3D12_VIDEO_PROCESS_DEINTERLACE_FLAG_NONE: D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS = D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS(0u32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_PROCESS_FEATURE_FLAGS(pub i32);
impl D3D12_VIDEO_PROCESS_FEATURE_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_PROCESS_FEATURE_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_PROCESS_FEATURE_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_PROCESS_FEATURE_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_PROCESS_FEATURE_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_PROCESS_FEATURE_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_PROCESS_FEATURE_FLAG_ALPHA_BLENDING: D3D12_VIDEO_PROCESS_FEATURE_FLAGS = D3D12_VIDEO_PROCESS_FEATURE_FLAGS(32i32);
pub const D3D12_VIDEO_PROCESS_FEATURE_FLAG_ALPHA_FILL: D3D12_VIDEO_PROCESS_FEATURE_FLAGS = D3D12_VIDEO_PROCESS_FEATURE_FLAGS(1i32);
pub const D3D12_VIDEO_PROCESS_FEATURE_FLAG_FLIP: D3D12_VIDEO_PROCESS_FEATURE_FLAGS = D3D12_VIDEO_PROCESS_FEATURE_FLAGS(16i32);
pub const D3D12_VIDEO_PROCESS_FEATURE_FLAG_LUMA_KEY: D3D12_VIDEO_PROCESS_FEATURE_FLAGS = D3D12_VIDEO_PROCESS_FEATURE_FLAGS(2i32);
pub const D3D12_VIDEO_PROCESS_FEATURE_FLAG_NONE: D3D12_VIDEO_PROCESS_FEATURE_FLAGS = D3D12_VIDEO_PROCESS_FEATURE_FLAGS(0i32);
pub const D3D12_VIDEO_PROCESS_FEATURE_FLAG_PIXEL_ASPECT_RATIO: D3D12_VIDEO_PROCESS_FEATURE_FLAGS = D3D12_VIDEO_PROCESS_FEATURE_FLAGS(64i32);
pub const D3D12_VIDEO_PROCESS_FEATURE_FLAG_ROTATION: D3D12_VIDEO_PROCESS_FEATURE_FLAGS = D3D12_VIDEO_PROCESS_FEATURE_FLAGS(8i32);
pub const D3D12_VIDEO_PROCESS_FEATURE_FLAG_STEREO: D3D12_VIDEO_PROCESS_FEATURE_FLAGS = D3D12_VIDEO_PROCESS_FEATURE_FLAGS(4i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_PROCESS_FILTER(pub i32);
pub const D3D12_VIDEO_PROCESS_FILTER_ANAMORPHIC_SCALING: D3D12_VIDEO_PROCESS_FILTER = D3D12_VIDEO_PROCESS_FILTER(6i32);
pub const D3D12_VIDEO_PROCESS_FILTER_BRIGHTNESS: D3D12_VIDEO_PROCESS_FILTER = D3D12_VIDEO_PROCESS_FILTER(0i32);
pub const D3D12_VIDEO_PROCESS_FILTER_CONTRAST: D3D12_VIDEO_PROCESS_FILTER = D3D12_VIDEO_PROCESS_FILTER(1i32);
pub const D3D12_VIDEO_PROCESS_FILTER_EDGE_ENHANCEMENT: D3D12_VIDEO_PROCESS_FILTER = D3D12_VIDEO_PROCESS_FILTER(5i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_PROCESS_FILTER_FLAGS(pub i32);
impl D3D12_VIDEO_PROCESS_FILTER_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_PROCESS_FILTER_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_PROCESS_FILTER_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_PROCESS_FILTER_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_PROCESS_FILTER_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_PROCESS_FILTER_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_PROCESS_FILTER_FLAG_ANAMORPHIC_SCALING: D3D12_VIDEO_PROCESS_FILTER_FLAGS = D3D12_VIDEO_PROCESS_FILTER_FLAGS(64i32);
pub const D3D12_VIDEO_PROCESS_FILTER_FLAG_BRIGHTNESS: D3D12_VIDEO_PROCESS_FILTER_FLAGS = D3D12_VIDEO_PROCESS_FILTER_FLAGS(1i32);
pub const D3D12_VIDEO_PROCESS_FILTER_FLAG_CONTRAST: D3D12_VIDEO_PROCESS_FILTER_FLAGS = D3D12_VIDEO_PROCESS_FILTER_FLAGS(2i32);
pub const D3D12_VIDEO_PROCESS_FILTER_FLAG_EDGE_ENHANCEMENT: D3D12_VIDEO_PROCESS_FILTER_FLAGS = D3D12_VIDEO_PROCESS_FILTER_FLAGS(32i32);
pub const D3D12_VIDEO_PROCESS_FILTER_FLAG_HUE: D3D12_VIDEO_PROCESS_FILTER_FLAGS = D3D12_VIDEO_PROCESS_FILTER_FLAGS(4i32);
pub const D3D12_VIDEO_PROCESS_FILTER_FLAG_NOISE_REDUCTION: D3D12_VIDEO_PROCESS_FILTER_FLAGS = D3D12_VIDEO_PROCESS_FILTER_FLAGS(16i32);
pub const D3D12_VIDEO_PROCESS_FILTER_FLAG_NONE: D3D12_VIDEO_PROCESS_FILTER_FLAGS = D3D12_VIDEO_PROCESS_FILTER_FLAGS(0i32);
pub const D3D12_VIDEO_PROCESS_FILTER_FLAG_SATURATION: D3D12_VIDEO_PROCESS_FILTER_FLAGS = D3D12_VIDEO_PROCESS_FILTER_FLAGS(8i32);
pub const D3D12_VIDEO_PROCESS_FILTER_FLAG_STEREO_ADJUSTMENT: D3D12_VIDEO_PROCESS_FILTER_FLAGS = D3D12_VIDEO_PROCESS_FILTER_FLAGS(128i32);
pub const D3D12_VIDEO_PROCESS_FILTER_HUE: D3D12_VIDEO_PROCESS_FILTER = D3D12_VIDEO_PROCESS_FILTER(2i32);
pub const D3D12_VIDEO_PROCESS_FILTER_NOISE_REDUCTION: D3D12_VIDEO_PROCESS_FILTER = D3D12_VIDEO_PROCESS_FILTER(4i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_PROCESS_FILTER_RANGE {
pub Minimum: i32,
pub Maximum: i32,
pub Default: i32,
pub Multiplier: f32,
}
pub const D3D12_VIDEO_PROCESS_FILTER_SATURATION: D3D12_VIDEO_PROCESS_FILTER = D3D12_VIDEO_PROCESS_FILTER(3i32);
pub const D3D12_VIDEO_PROCESS_FILTER_STEREO_ADJUSTMENT: D3D12_VIDEO_PROCESS_FILTER = D3D12_VIDEO_PROCESS_FILTER(7i32);
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_PROCESS_INPUT_STREAM {
pub pTexture2D: core::mem::ManuallyDrop<Option<super::super::Graphics::Direct3D12::ID3D12Resource>>,
pub Subresource: u32,
pub ReferenceSet: D3D12_VIDEO_PROCESS_REFERENCE_SET,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[derive(Clone, Debug, PartialEq)]
pub struct D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS {
pub InputStream: [D3D12_VIDEO_PROCESS_INPUT_STREAM; 2],
pub Transform: D3D12_VIDEO_PROCESS_TRANSFORM,
pub Flags: D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS,
pub RateInfo: D3D12_VIDEO_PROCESS_INPUT_STREAM_RATE,
pub FilterLevels: [i32; 32],
pub AlphaBlending: D3D12_VIDEO_PROCESS_ALPHA_BLENDING,
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl Default for D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[derive(Clone, Debug, PartialEq)]
pub struct D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS1 {
pub InputStream: [D3D12_VIDEO_PROCESS_INPUT_STREAM; 2],
pub Transform: D3D12_VIDEO_PROCESS_TRANSFORM,
pub Flags: D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS,
pub RateInfo: D3D12_VIDEO_PROCESS_INPUT_STREAM_RATE,
pub FilterLevels: [i32; 32],
pub AlphaBlending: D3D12_VIDEO_PROCESS_ALPHA_BLENDING,
pub FieldType: D3D12_VIDEO_FIELD_TYPE,
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl Default for D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS1 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC {
pub Format: super::super::Graphics::Dxgi::Common::DXGI_FORMAT,
pub ColorSpace: super::super::Graphics::Dxgi::Common::DXGI_COLOR_SPACE_TYPE,
pub SourceAspectRatio: super::super::Graphics::Dxgi::Common::DXGI_RATIONAL,
pub DestinationAspectRatio: super::super::Graphics::Dxgi::Common::DXGI_RATIONAL,
pub FrameRate: super::super::Graphics::Dxgi::Common::DXGI_RATIONAL,
pub SourceSizeRange: D3D12_VIDEO_SIZE_RANGE,
pub DestinationSizeRange: D3D12_VIDEO_SIZE_RANGE,
pub EnableOrientation: windows_core::BOOL,
pub FilterFlags: D3D12_VIDEO_PROCESS_FILTER_FLAGS,
pub StereoFormat: D3D12_VIDEO_FRAME_STEREO_FORMAT,
pub FieldType: D3D12_VIDEO_FIELD_TYPE,
pub DeinterlaceMode: D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS,
pub EnableAlphaBlending: windows_core::BOOL,
pub LumaKey: D3D12_VIDEO_PROCESS_LUMA_KEY,
pub NumPastFrames: u32,
pub NumFutureFrames: u32,
pub EnableAutoProcessing: windows_core::BOOL,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS(pub i32);
impl D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAG_FRAME_DISCONTINUITY: D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS = D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS(1i32);
pub const D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAG_FRAME_REPEAT: D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS = D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS(2i32);
pub const D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAG_NONE: D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS = D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS(0i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_PROCESS_INPUT_STREAM_RATE {
pub OutputIndex: u32,
pub InputFrameOrField: u32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_PROCESS_LUMA_KEY {
pub Enable: windows_core::BOOL,
pub Lower: f32,
pub Upper: f32,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_PROCESS_ORIENTATION(pub i32);
pub const D3D12_VIDEO_PROCESS_ORIENTATION_CLOCKWISE_180: D3D12_VIDEO_PROCESS_ORIENTATION = D3D12_VIDEO_PROCESS_ORIENTATION(4i32);
pub const D3D12_VIDEO_PROCESS_ORIENTATION_CLOCKWISE_270: D3D12_VIDEO_PROCESS_ORIENTATION = D3D12_VIDEO_PROCESS_ORIENTATION(6i32);
pub const D3D12_VIDEO_PROCESS_ORIENTATION_CLOCKWISE_270_FLIP_HORIZONTAL: D3D12_VIDEO_PROCESS_ORIENTATION = D3D12_VIDEO_PROCESS_ORIENTATION(7i32);
pub const D3D12_VIDEO_PROCESS_ORIENTATION_CLOCKWISE_90: D3D12_VIDEO_PROCESS_ORIENTATION = D3D12_VIDEO_PROCESS_ORIENTATION(2i32);
pub const D3D12_VIDEO_PROCESS_ORIENTATION_CLOCKWISE_90_FLIP_HORIZONTAL: D3D12_VIDEO_PROCESS_ORIENTATION = D3D12_VIDEO_PROCESS_ORIENTATION(3i32);
pub const D3D12_VIDEO_PROCESS_ORIENTATION_DEFAULT: D3D12_VIDEO_PROCESS_ORIENTATION = D3D12_VIDEO_PROCESS_ORIENTATION(0i32);
pub const D3D12_VIDEO_PROCESS_ORIENTATION_FLIP_HORIZONTAL: D3D12_VIDEO_PROCESS_ORIENTATION = D3D12_VIDEO_PROCESS_ORIENTATION(1i32);
pub const D3D12_VIDEO_PROCESS_ORIENTATION_FLIP_VERTICAL: D3D12_VIDEO_PROCESS_ORIENTATION = D3D12_VIDEO_PROCESS_ORIENTATION(5i32);
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_PROCESS_OUTPUT_STREAM {
pub pTexture2D: core::mem::ManuallyDrop<Option<super::super::Graphics::Direct3D12::ID3D12Resource>>,
pub Subresource: u32,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[derive(Clone, Debug, PartialEq)]
pub struct D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS {
pub OutputStream: [D3D12_VIDEO_PROCESS_OUTPUT_STREAM; 2],
pub TargetRectangle: super::super::Foundation::RECT,
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl Default for D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC {
pub Format: super::super::Graphics::Dxgi::Common::DXGI_FORMAT,
pub ColorSpace: super::super::Graphics::Dxgi::Common::DXGI_COLOR_SPACE_TYPE,
pub AlphaFillMode: D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE,
pub AlphaFillModeSourceStreamIndex: u32,
pub BackgroundColor: [f32; 4],
pub FrameRate: super::super::Graphics::Dxgi::Common::DXGI_RATIONAL,
pub EnableStereo: windows_core::BOOL,
}
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
impl Default for D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct D3D12_VIDEO_PROCESS_REFERENCE_SET {
pub NumPastFrames: u32,
pub ppPastFrames: *mut Option<super::super::Graphics::Direct3D12::ID3D12Resource>,
pub pPastSubresources: *mut u32,
pub NumFutureFrames: u32,
pub ppFutureFrames: *mut Option<super::super::Graphics::Direct3D12::ID3D12Resource>,
pub pFutureSubresources: *mut u32,
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl Default for D3D12_VIDEO_PROCESS_REFERENCE_SET {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_PROCESS_SUPPORT_FLAGS(pub i32);
impl D3D12_VIDEO_PROCESS_SUPPORT_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_PROCESS_SUPPORT_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_PROCESS_SUPPORT_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_PROCESS_SUPPORT_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_PROCESS_SUPPORT_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_PROCESS_SUPPORT_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_PROCESS_SUPPORT_FLAG_NONE: D3D12_VIDEO_PROCESS_SUPPORT_FLAGS = D3D12_VIDEO_PROCESS_SUPPORT_FLAGS(0i32);
pub const D3D12_VIDEO_PROCESS_SUPPORT_FLAG_SUPPORTED: D3D12_VIDEO_PROCESS_SUPPORT_FLAGS = D3D12_VIDEO_PROCESS_SUPPORT_FLAGS(1i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_PROCESS_TRANSFORM {
pub SourceRectangle: super::super::Foundation::RECT,
pub DestinationRectangle: super::super::Foundation::RECT,
pub Orientation: D3D12_VIDEO_PROCESS_ORIENTATION,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_PROTECTED_RESOURCE_SUPPORT_FLAGS(pub i32);
impl D3D12_VIDEO_PROTECTED_RESOURCE_SUPPORT_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_PROTECTED_RESOURCE_SUPPORT_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_PROTECTED_RESOURCE_SUPPORT_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_PROTECTED_RESOURCE_SUPPORT_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_PROTECTED_RESOURCE_SUPPORT_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_PROTECTED_RESOURCE_SUPPORT_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_PROTECTED_RESOURCE_SUPPORT_FLAG_NONE: D3D12_VIDEO_PROTECTED_RESOURCE_SUPPORT_FLAGS = D3D12_VIDEO_PROTECTED_RESOURCE_SUPPORT_FLAGS(0i32);
pub const D3D12_VIDEO_PROTECTED_RESOURCE_SUPPORT_FLAG_SUPPORTED: D3D12_VIDEO_PROTECTED_RESOURCE_SUPPORT_FLAGS = D3D12_VIDEO_PROTECTED_RESOURCE_SUPPORT_FLAGS(1i32);
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_SAMPLE {
pub Width: u32,
pub Height: u32,
pub Format: D3D12_VIDEO_FORMAT,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_SCALE_SUPPORT {
pub OutputSizeRange: D3D12_VIDEO_SIZE_RANGE,
pub Flags: D3D12_VIDEO_SCALE_SUPPORT_FLAGS,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct D3D12_VIDEO_SCALE_SUPPORT_FLAGS(pub i32);
impl D3D12_VIDEO_SCALE_SUPPORT_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for D3D12_VIDEO_SCALE_SUPPORT_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for D3D12_VIDEO_SCALE_SUPPORT_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for D3D12_VIDEO_SCALE_SUPPORT_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for D3D12_VIDEO_SCALE_SUPPORT_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for D3D12_VIDEO_SCALE_SUPPORT_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const D3D12_VIDEO_SCALE_SUPPORT_FLAG_EVEN_DIMENSIONS_ONLY: D3D12_VIDEO_SCALE_SUPPORT_FLAGS = D3D12_VIDEO_SCALE_SUPPORT_FLAGS(2i32);
pub const D3D12_VIDEO_SCALE_SUPPORT_FLAG_NONE: D3D12_VIDEO_SCALE_SUPPORT_FLAGS = D3D12_VIDEO_SCALE_SUPPORT_FLAGS(0i32);
pub const D3D12_VIDEO_SCALE_SUPPORT_FLAG_POW2_ONLY: D3D12_VIDEO_SCALE_SUPPORT_FLAGS = D3D12_VIDEO_SCALE_SUPPORT_FLAGS(1i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3D12_VIDEO_SIZE_RANGE {
pub MaxWidth: u32,
pub MaxHeight: u32,
pub MinWidth: u32,
pub MinHeight: u32,
}
#[repr(C, packed(4))]
#[cfg(target_arch = "x86")]
#[derive(Clone, Copy, Default)]
pub struct D3DCONTENTPROTECTIONCAPS {
pub Caps: u32,
pub KeyExchangeType: windows_core::GUID,
pub BufferAlignmentStart: u32,
pub BlockAlignmentSize: u32,
pub ProtectedMemorySize: u64,
}
#[repr(C)]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3DCONTENTPROTECTIONCAPS {
pub Caps: u32,
pub KeyExchangeType: windows_core::GUID,
pub BufferAlignmentStart: u32,
pub BlockAlignmentSize: u32,
pub ProtectedMemorySize: u64,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct D3DOVERLAYCAPS {
pub Caps: u32,
pub MaxOverlayDisplayWidth: u32,
pub MaxOverlayDisplayHeight: u32,
}
#[repr(C)]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct DEVICE_INFO {
pub pFriendlyDeviceName: core::mem::ManuallyDrop<windows_core::BSTR>,
pub pUniqueDeviceName: core::mem::ManuallyDrop<windows_core::BSTR>,
pub pManufacturerName: core::mem::ManuallyDrop<windows_core::BSTR>,
pub pModelName: core::mem::ManuallyDrop<windows_core::BSTR>,
pub pIconURL: core::mem::ManuallyDrop<windows_core::BSTR>,
}
pub const DEVPKEY_DeviceInterface_IsVirtualCamera: super::super::Foundation::DEVPROPKEY = super::super::Foundation::DEVPROPKEY { fmtid: windows_core::GUID::from_u128(0x6edc630d_c2e3_43b7_b2d1_20525a1af120), pid: 3 };
pub const DEVPKEY_DeviceInterface_IsWindowsCameraEffectAvailable: super::super::Foundation::DEVPROPKEY = super::super::Foundation::DEVPROPKEY { fmtid: windows_core::GUID::from_u128(0x6edc630d_c2e3_43b7_b2d1_20525a1af120), pid: 4 };
pub const DEVPKEY_DeviceInterface_VirtualCameraAssociatedCameras: super::super::Foundation::DEVPROPKEY = super::super::Foundation::DEVPROPKEY { fmtid: windows_core::GUID::from_u128(0x6edc630d_c2e3_43b7_b2d1_20525a1af120), pid: 5 };
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct DIRTYRECT_INFO {
pub FrameNumber: u32,
pub NumDirtyRects: u32,
pub DirtyRects: [super::super::Foundation::RECT; 1],
}
impl Default for DIRTYRECT_INFO {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const DSATTRIB_CAPTURE_STREAMTIME: windows_core::GUID = windows_core::GUID::from_u128(0x0c1a5614_30cd_4f40_bcbf_d03e52306207);
pub const DSATTRIB_CC_CONTAINER_INFO: windows_core::GUID = windows_core::GUID::from_u128(0xe7e050fb_dd5d_40dd_9915_35dcb81bdc8a);
pub const DSATTRIB_DSHOW_STREAM_DESC: windows_core::GUID = windows_core::GUID::from_u128(0x5fb5673b_0a2a_4565_827b_6853fd75e611);
pub const DSATTRIB_OptionalVideoAttributes: windows_core::GUID = windows_core::GUID::from_u128(0x5a5f08ca_55c2_4033_92ab_55db8f781226);
pub const DSATTRIB_PBDATAG_ATTRIBUTE: windows_core::GUID = windows_core::GUID::from_u128(0xe0b56679_12b9_43cc_b7df_578caa5a7b63);
pub const DSATTRIB_PicSampleSeq: windows_core::GUID = windows_core::GUID::from_u128(0x2f5bae02_7b8f_4f60_82d6_e4ea2f1f4c99);
pub const DSATTRIB_SAMPLE_LIVE_STREAM_TIME: windows_core::GUID = windows_core::GUID::from_u128(0x892cd111_72f3_411d_8b91_a9e9123ac29a);
pub const DSATTRIB_TRANSPORT_PROPERTIES: windows_core::GUID = windows_core::GUID::from_u128(0xb622f612_47ad_4671_ad6c_05a98e65de3a);
pub const DSATTRIB_UDCRTag: windows_core::GUID = windows_core::GUID::from_u128(0xeb7836ca_14ff_4919_bce7_3af12319e50c);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVA2_AES_CTR_IV {
pub IV: u64,
pub Count: u64,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVA2_AYUVSample16 {
pub Cr: u16,
pub Cb: u16,
pub Y: u16,
pub Alpha: u16,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVA2_AYUVSample8 {
pub Cr: u8,
pub Cb: u8,
pub Y: u8,
pub Alpha: u8,
}
pub const DXVA2_BitStreamDateBufferType: DXVA2_BufferfType = DXVA2_BufferfType(6i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA2_BufferfType(pub i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVA2_ConfigPictureDecode {
pub guidConfigBitstreamEncryption: windows_core::GUID,
pub guidConfigMBcontrolEncryption: windows_core::GUID,
pub guidConfigResidDiffEncryption: windows_core::GUID,
pub ConfigBitstreamRaw: u32,
pub ConfigMBcontrolRasterOrder: u32,
pub ConfigResidDiffHost: u32,
pub ConfigSpatialResid8: u32,
pub ConfigResid8Subtraction: u32,
pub ConfigSpatialHost8or9Clipping: u32,
pub ConfigSpatialResidInterleaved: u32,
pub ConfigIntraResidUnsigned: u32,
pub ConfigResidDiffAccelerator: u32,
pub ConfigHostInverseScan: u32,
pub ConfigSpecificIDCT: u32,
pub Config4GroupedCoefs: u32,
pub ConfigMinRenderTargetBuffCount: u16,
pub ConfigDecoderSpecific: u16,
}
pub const DXVA2_DECODE_GET_DRIVER_HANDLE: u32 = 1829u32;
pub const DXVA2_DECODE_SPECIFY_ENCRYPTED_BLOCKS: u32 = 1828u32;
pub const DXVA2_DeblockingControlBufferType: DXVA2_BufferfType = DXVA2_BufferfType(3i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct DXVA2_DecodeBufferDesc {
pub CompressedBufferType: u32,
pub BufferIndex: u32,
pub DataOffset: u32,
pub DataSize: u32,
pub FirstMBaddress: u32,
pub NumMBsInBuffer: u32,
pub Width: u32,
pub Height: u32,
pub Stride: u32,
pub ReservedBits: u32,
pub pvPVPState: *mut core::ffi::c_void,
}
impl Default for DXVA2_DecodeBufferDesc {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct DXVA2_DecodeExecuteParams {
pub NumCompBuffers: u32,
pub pCompressedBuffers: *mut DXVA2_DecodeBufferDesc,
pub pExtensionData: *mut DXVA2_DecodeExtensionData,
}
impl Default for DXVA2_DecodeExecuteParams {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct DXVA2_DecodeExtensionData {
pub Function: u32,
pub pPrivateInputData: *mut core::ffi::c_void,
pub PrivateInputDataSize: u32,
pub pPrivateOutputData: *mut core::ffi::c_void,
pub PrivateOutputDataSize: u32,
}
impl Default for DXVA2_DecodeExtensionData {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA2_DeinterlaceTech(pub i32);
pub const DXVA2_DeinterlaceTech_BOBLineReplicate: DXVA2_DeinterlaceTech = DXVA2_DeinterlaceTech(1i32);
pub const DXVA2_DeinterlaceTech_BOBVerticalStretch: DXVA2_DeinterlaceTech = DXVA2_DeinterlaceTech(2i32);
pub const DXVA2_DeinterlaceTech_BOBVerticalStretch4Tap: DXVA2_DeinterlaceTech = DXVA2_DeinterlaceTech(4i32);
pub const DXVA2_DeinterlaceTech_EdgeFiltering: DXVA2_DeinterlaceTech = DXVA2_DeinterlaceTech(16i32);
pub const DXVA2_DeinterlaceTech_FieldAdaptive: DXVA2_DeinterlaceTech = DXVA2_DeinterlaceTech(32i32);
pub const DXVA2_DeinterlaceTech_InverseTelecine: DXVA2_DeinterlaceTech = DXVA2_DeinterlaceTech(256i32);
pub const DXVA2_DeinterlaceTech_Mask: DXVA2_DeinterlaceTech = DXVA2_DeinterlaceTech(511i32);
pub const DXVA2_DeinterlaceTech_MedianFiltering: DXVA2_DeinterlaceTech = DXVA2_DeinterlaceTech(8i32);
pub const DXVA2_DeinterlaceTech_MotionVectorSteered: DXVA2_DeinterlaceTech = DXVA2_DeinterlaceTech(128i32);
pub const DXVA2_DeinterlaceTech_PixelAdaptive: DXVA2_DeinterlaceTech = DXVA2_DeinterlaceTech(64i32);
pub const DXVA2_DeinterlaceTech_Unknown: DXVA2_DeinterlaceTech = DXVA2_DeinterlaceTech(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA2_DestData(pub i32);
pub const DXVA2_DestData_Mask: DXVA2_DestData = DXVA2_DestData(65535i32);
pub const DXVA2_DestData_RFF: DXVA2_DestData = DXVA2_DestData(1i32);
pub const DXVA2_DestData_RFF_TFF_Present: DXVA2_DestData = DXVA2_DestData(4i32);
pub const DXVA2_DestData_TFF: DXVA2_DestData = DXVA2_DestData(2i32);
pub const DXVA2_DetailFilterChromaLevel: DXVA2_FilterType = DXVA2_FilterType(10i32);
pub const DXVA2_DetailFilterChromaRadius: DXVA2_FilterType = DXVA2_FilterType(12i32);
pub const DXVA2_DetailFilterChromaThreshold: DXVA2_FilterType = DXVA2_FilterType(11i32);
pub const DXVA2_DetailFilterLumaLevel: DXVA2_FilterType = DXVA2_FilterType(7i32);
pub const DXVA2_DetailFilterLumaRadius: DXVA2_FilterType = DXVA2_FilterType(9i32);
pub const DXVA2_DetailFilterLumaThreshold: DXVA2_FilterType = DXVA2_FilterType(8i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA2_DetailFilterTech(pub i32);
pub const DXVA2_DetailFilterTech_Edge: DXVA2_DetailFilterTech = DXVA2_DetailFilterTech(2i32);
pub const DXVA2_DetailFilterTech_Mask: DXVA2_DetailFilterTech = DXVA2_DetailFilterTech(7i32);
pub const DXVA2_DetailFilterTech_Sharpening: DXVA2_DetailFilterTech = DXVA2_DetailFilterTech(4i32);
pub const DXVA2_DetailFilterTech_Unknown: DXVA2_DetailFilterTech = DXVA2_DetailFilterTech(1i32);
pub const DXVA2_DetailFilterTech_Unsupported: DXVA2_DetailFilterTech = DXVA2_DetailFilterTech(0i32);
pub const DXVA2_E_NEW_VIDEO_DEVICE: windows_core::HRESULT = windows_core::HRESULT(0x80041001_u32 as _);
pub const DXVA2_E_NOT_AVAILABLE: windows_core::HRESULT = windows_core::HRESULT(0x80041003_u32 as _);
pub const DXVA2_E_NOT_INITIALIZED: windows_core::HRESULT = windows_core::HRESULT(0x80041000_u32 as _);
pub const DXVA2_E_VIDEO_DEVICE_LOCKED: windows_core::HRESULT = windows_core::HRESULT(0x80041002_u32 as _);
#[repr(C)]
#[derive(Clone, Copy)]
pub struct DXVA2_ExtendedFormat {
pub Anonymous: DXVA2_ExtendedFormat_0,
}
impl Default for DXVA2_ExtendedFormat {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub union DXVA2_ExtendedFormat_0 {
pub Anonymous: DXVA2_ExtendedFormat_0_0,
pub value: u32,
}
impl Default for DXVA2_ExtendedFormat_0 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVA2_ExtendedFormat_0_0 {
pub _bitfield: u32,
}
pub const DXVA2_FilmGrainBuffer: DXVA2_BufferfType = DXVA2_BufferfType(8i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA2_FilterType(pub i32);
#[repr(C)]
#[derive(Clone, Copy)]
pub struct DXVA2_FilterValues {
pub Level: DXVA2_Fixed32,
pub Threshold: DXVA2_Fixed32,
pub Radius: DXVA2_Fixed32,
}
impl Default for DXVA2_FilterValues {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub struct DXVA2_Fixed32 {
pub Anonymous: DXVA2_Fixed32_0,
}
impl Default for DXVA2_Fixed32 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub union DXVA2_Fixed32_0 {
pub Anonymous: DXVA2_Fixed32_0_0,
pub ll: i32,
}
impl Default for DXVA2_Fixed32_0 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVA2_Fixed32_0_0 {
pub Fraction: u16,
pub Value: i16,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVA2_Frequency {
pub Numerator: u32,
pub Denominator: u32,
}
pub const DXVA2_InverseQuantizationMatrixBufferType: DXVA2_BufferfType = DXVA2_BufferfType(4i32);
pub const DXVA2_MacroBlockControlBufferType: DXVA2_BufferfType = DXVA2_BufferfType(1i32);
pub const DXVA2_ModeH264_A: windows_core::GUID = windows_core::GUID::from_u128(0x1b81be64_a0c7_11d3_b984_00c04f2e73c5);
pub const DXVA2_ModeH264_B: windows_core::GUID = windows_core::GUID::from_u128(0x1b81be65_a0c7_11d3_b984_00c04f2e73c5);
pub const DXVA2_ModeH264_C: windows_core::GUID = windows_core::GUID::from_u128(0x1b81be66_a0c7_11d3_b984_00c04f2e73c5);
pub const DXVA2_ModeH264_D: windows_core::GUID = windows_core::GUID::from_u128(0x1b81be67_a0c7_11d3_b984_00c04f2e73c5);
pub const DXVA2_ModeH264_E: windows_core::GUID = windows_core::GUID::from_u128(0x1b81be68_a0c7_11d3_b984_00c04f2e73c5);
pub const DXVA2_ModeH264_F: windows_core::GUID = windows_core::GUID::from_u128(0x1b81be69_a0c7_11d3_b984_00c04f2e73c5);
pub const DXVA2_ModeH264_VLD_Multiview_NoFGT: windows_core::GUID = windows_core::GUID::from_u128(0x705b9d82_76cf_49d6_b7e6_ac8872db013c);
pub const DXVA2_ModeH264_VLD_Stereo_NoFGT: windows_core::GUID = windows_core::GUID::from_u128(0xf9aaccbb_c2b6_4cfc_8779_5707b1760552);
pub const DXVA2_ModeH264_VLD_Stereo_Progressive_NoFGT: windows_core::GUID = windows_core::GUID::from_u128(0xd79be8da_0cf1_4c81_b82a_69a4e236f43d);
pub const DXVA2_ModeH264_VLD_WithFMOASO_NoFGT: windows_core::GUID = windows_core::GUID::from_u128(0xd5f04ff9_3418_45d8_9561_32a76aae2ddd);
pub const DXVA2_ModeHEVC_VLD_Main: windows_core::GUID = windows_core::GUID::from_u128(0x5b11d51b_2f4c_4452_bcc3_09f2a1160cc0);
pub const DXVA2_ModeHEVC_VLD_Main10: windows_core::GUID = windows_core::GUID::from_u128(0x107af0e0_ef1a_4d19_aba8_67a163073d13);
pub const DXVA2_ModeMPEG1_VLD: windows_core::GUID = windows_core::GUID::from_u128(0x6f3ec719_3735_42cc_8063_65cc3cb36616);
pub const DXVA2_ModeMPEG2_IDCT: windows_core::GUID = windows_core::GUID::from_u128(0xbf22ad00_03ea_4690_8077_473346209b7e);
pub const DXVA2_ModeMPEG2_MoComp: windows_core::GUID = windows_core::GUID::from_u128(0xe6a9f44b_61b0_4563_9ea4_63d2a3c6fe66);
pub const DXVA2_ModeMPEG2_VLD: windows_core::GUID = windows_core::GUID::from_u128(0xee27417f_5e28_4e65_beea_1d26b508adc9);
pub const DXVA2_ModeMPEG2and1_VLD: windows_core::GUID = windows_core::GUID::from_u128(0x86695f12_340e_4f04_9fd3_9253dd327460);
pub const DXVA2_ModeMPEG4pt2_VLD_AdvSimple_GMC: windows_core::GUID = windows_core::GUID::from_u128(0xab998b5b_4258_44a9_9feb_94e597a6baae);
pub const DXVA2_ModeMPEG4pt2_VLD_AdvSimple_NoGMC: windows_core::GUID = windows_core::GUID::from_u128(0xed418a9f_010d_4eda_9ae3_9a65358d8d2e);
pub const DXVA2_ModeMPEG4pt2_VLD_Simple: windows_core::GUID = windows_core::GUID::from_u128(0xefd64d74_c9e8_41d7_a5e9_e9b0e39fa319);
pub const DXVA2_ModeVC1_A: windows_core::GUID = windows_core::GUID::from_u128(0x1b81bea0_a0c7_11d3_b984_00c04f2e73c5);
pub const DXVA2_ModeVC1_B: windows_core::GUID = windows_core::GUID::from_u128(0x1b81bea1_a0c7_11d3_b984_00c04f2e73c5);
pub const DXVA2_ModeVC1_C: windows_core::GUID = windows_core::GUID::from_u128(0x1b81bea2_a0c7_11d3_b984_00c04f2e73c5);
pub const DXVA2_ModeVC1_D: windows_core::GUID = windows_core::GUID::from_u128(0x1b81bea3_a0c7_11d3_b984_00c04f2e73c5);
pub const DXVA2_ModeVC1_D2010: windows_core::GUID = windows_core::GUID::from_u128(0x1b81bea4_a0c7_11d3_b984_00c04f2e73c5);
pub const DXVA2_ModeVP8_VLD: windows_core::GUID = windows_core::GUID::from_u128(0x90b899ea_3a62_4705_88b3_8df04b2744e7);
pub const DXVA2_ModeVP9_VLD_10bit_Profile2: windows_core::GUID = windows_core::GUID::from_u128(0xa4c749ef_6ecf_48aa_8448_50a7a1165ff7);
pub const DXVA2_ModeVP9_VLD_Profile0: windows_core::GUID = windows_core::GUID::from_u128(0x463707f8_a1d0_4585_876d_83aa6d60b89e);
pub const DXVA2_ModeWMV8_A: windows_core::GUID = windows_core::GUID::from_u128(0x1b81be80_a0c7_11d3_b984_00c04f2e73c5);
pub const DXVA2_ModeWMV8_B: windows_core::GUID = windows_core::GUID::from_u128(0x1b81be81_a0c7_11d3_b984_00c04f2e73c5);
pub const DXVA2_ModeWMV9_A: windows_core::GUID = windows_core::GUID::from_u128(0x1b81be90_a0c7_11d3_b984_00c04f2e73c5);
pub const DXVA2_ModeWMV9_B: windows_core::GUID = windows_core::GUID::from_u128(0x1b81be91_a0c7_11d3_b984_00c04f2e73c5);
pub const DXVA2_ModeWMV9_C: windows_core::GUID = windows_core::GUID::from_u128(0x1b81be94_a0c7_11d3_b984_00c04f2e73c5);
pub const DXVA2_MotionVectorBuffer: DXVA2_BufferfType = DXVA2_BufferfType(7i32);
pub const DXVA2_NoEncrypt: windows_core::GUID = windows_core::GUID::from_u128(0x1b81bed0_a0c7_11d3_b984_00c04f2e73c5);
pub const DXVA2_NoiseFilterChromaLevel: DXVA2_FilterType = DXVA2_FilterType(4i32);
pub const DXVA2_NoiseFilterChromaRadius: DXVA2_FilterType = DXVA2_FilterType(6i32);
pub const DXVA2_NoiseFilterChromaThreshold: DXVA2_FilterType = DXVA2_FilterType(5i32);
pub const DXVA2_NoiseFilterLumaLevel: DXVA2_FilterType = DXVA2_FilterType(1i32);
pub const DXVA2_NoiseFilterLumaRadius: DXVA2_FilterType = DXVA2_FilterType(3i32);
pub const DXVA2_NoiseFilterLumaThreshold: DXVA2_FilterType = DXVA2_FilterType(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA2_NoiseFilterTech(pub i32);
pub const DXVA2_NoiseFilterTech_BlockNoise: DXVA2_NoiseFilterTech = DXVA2_NoiseFilterTech(8i32);
pub const DXVA2_NoiseFilterTech_Mask: DXVA2_NoiseFilterTech = DXVA2_NoiseFilterTech(31i32);
pub const DXVA2_NoiseFilterTech_Median: DXVA2_NoiseFilterTech = DXVA2_NoiseFilterTech(2i32);
pub const DXVA2_NoiseFilterTech_MosquitoNoise: DXVA2_NoiseFilterTech = DXVA2_NoiseFilterTech(16i32);
pub const DXVA2_NoiseFilterTech_Temporal: DXVA2_NoiseFilterTech = DXVA2_NoiseFilterTech(4i32);
pub const DXVA2_NoiseFilterTech_Unknown: DXVA2_NoiseFilterTech = DXVA2_NoiseFilterTech(1i32);
pub const DXVA2_NoiseFilterTech_Unsupported: DXVA2_NoiseFilterTech = DXVA2_NoiseFilterTech(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA2_NominalRange(pub i32);
pub const DXVA2_NominalRangeMask: DXVA2_NominalRange = DXVA2_NominalRange(7i32);
pub const DXVA2_NominalRange_0_255: DXVA2_NominalRange = DXVA2_NominalRange(1i32);
pub const DXVA2_NominalRange_16_235: DXVA2_NominalRange = DXVA2_NominalRange(2i32);
pub const DXVA2_NominalRange_48_208: DXVA2_NominalRange = DXVA2_NominalRange(3i32);
pub const DXVA2_NominalRange_Normal: DXVA2_NominalRange = DXVA2_NominalRange(1i32);
pub const DXVA2_NominalRange_Unknown: DXVA2_NominalRange = DXVA2_NominalRange(0i32);
pub const DXVA2_NominalRange_Wide: DXVA2_NominalRange = DXVA2_NominalRange(2i32);
pub const DXVA2_PictureParametersBufferType: DXVA2_BufferfType = DXVA2_BufferfType(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA2_ProcAmp(pub i32);
#[repr(C)]
#[derive(Clone, Copy)]
pub struct DXVA2_ProcAmpValues {
pub Brightness: DXVA2_Fixed32,
pub Contrast: DXVA2_Fixed32,
pub Hue: DXVA2_Fixed32,
pub Saturation: DXVA2_Fixed32,
}
impl Default for DXVA2_ProcAmpValues {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const DXVA2_ProcAmp_Brightness: DXVA2_ProcAmp = DXVA2_ProcAmp(1i32);
pub const DXVA2_ProcAmp_Contrast: DXVA2_ProcAmp = DXVA2_ProcAmp(2i32);
pub const DXVA2_ProcAmp_Hue: DXVA2_ProcAmp = DXVA2_ProcAmp(4i32);
pub const DXVA2_ProcAmp_Mask: DXVA2_ProcAmp = DXVA2_ProcAmp(15i32);
pub const DXVA2_ProcAmp_None: DXVA2_ProcAmp = DXVA2_ProcAmp(0i32);
pub const DXVA2_ProcAmp_Saturation: DXVA2_ProcAmp = DXVA2_ProcAmp(8i32);
pub const DXVA2_ResidualDifferenceBufferType: DXVA2_BufferfType = DXVA2_BufferfType(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA2_SampleData(pub i32);
pub const DXVA2_SampleData_Mask: DXVA2_SampleData = DXVA2_SampleData(65535i32);
pub const DXVA2_SampleData_RFF: DXVA2_SampleData = DXVA2_SampleData(1i32);
pub const DXVA2_SampleData_RFF_TFF_Present: DXVA2_SampleData = DXVA2_SampleData(4i32);
pub const DXVA2_SampleData_TFF: DXVA2_SampleData = DXVA2_SampleData(2i32);
pub const DXVA2_SampleFieldInterleavedEvenFirst: DXVA2_SampleFormat = DXVA2_SampleFormat(3i32);
pub const DXVA2_SampleFieldInterleavedOddFirst: DXVA2_SampleFormat = DXVA2_SampleFormat(4i32);
pub const DXVA2_SampleFieldSingleEven: DXVA2_SampleFormat = DXVA2_SampleFormat(5i32);
pub const DXVA2_SampleFieldSingleOdd: DXVA2_SampleFormat = DXVA2_SampleFormat(6i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA2_SampleFormat(pub i32);
pub const DXVA2_SampleFormatMask: DXVA2_SampleFormat = DXVA2_SampleFormat(255i32);
pub const DXVA2_SampleProgressiveFrame: DXVA2_SampleFormat = DXVA2_SampleFormat(2i32);
pub const DXVA2_SampleSubStream: DXVA2_SampleFormat = DXVA2_SampleFormat(7i32);
pub const DXVA2_SampleUnknown: DXVA2_SampleFormat = DXVA2_SampleFormat(0i32);
pub const DXVA2_SliceControlBufferType: DXVA2_BufferfType = DXVA2_BufferfType(5i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA2_SurfaceType(pub i32);
pub const DXVA2_SurfaceType_D3DRenderTargetTexture: DXVA2_SurfaceType = DXVA2_SurfaceType(2i32);
pub const DXVA2_SurfaceType_DecoderRenderTarget: DXVA2_SurfaceType = DXVA2_SurfaceType(0i32);
pub const DXVA2_SurfaceType_ProcessorRenderTarget: DXVA2_SurfaceType = DXVA2_SurfaceType(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA2_VPDev(pub i32);
pub const DXVA2_VPDev_EmulatedDXVA1: DXVA2_VPDev = DXVA2_VPDev(2i32);
pub const DXVA2_VPDev_HardwareDevice: DXVA2_VPDev = DXVA2_VPDev(1i32);
pub const DXVA2_VPDev_Mask: DXVA2_VPDev = DXVA2_VPDev(7i32);
pub const DXVA2_VPDev_SoftwareDevice: DXVA2_VPDev = DXVA2_VPDev(4i32);
#[repr(C)]
#[derive(Clone, Copy)]
pub struct DXVA2_ValueRange {
pub MinValue: DXVA2_Fixed32,
pub MaxValue: DXVA2_Fixed32,
pub DefaultValue: DXVA2_Fixed32,
pub StepSize: DXVA2_Fixed32,
}
impl Default for DXVA2_ValueRange {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA2_VideoChromaSubSampling(pub i32);
pub const DXVA2_VideoChromaSubsamplingMask: DXVA2_VideoChromaSubSampling = DXVA2_VideoChromaSubSampling(15i32);
pub const DXVA2_VideoChromaSubsampling_Cosited: DXVA2_VideoChromaSubSampling = DXVA2_VideoChromaSubSampling(7i32);
pub const DXVA2_VideoChromaSubsampling_DV_PAL: DXVA2_VideoChromaSubSampling = DXVA2_VideoChromaSubSampling(6i32);
pub const DXVA2_VideoChromaSubsampling_Horizontally_Cosited: DXVA2_VideoChromaSubSampling = DXVA2_VideoChromaSubSampling(4i32);
pub const DXVA2_VideoChromaSubsampling_MPEG1: DXVA2_VideoChromaSubSampling = DXVA2_VideoChromaSubSampling(1i32);
pub const DXVA2_VideoChromaSubsampling_MPEG2: DXVA2_VideoChromaSubSampling = DXVA2_VideoChromaSubSampling(5i32);
pub const DXVA2_VideoChromaSubsampling_ProgressiveChroma: DXVA2_VideoChromaSubSampling = DXVA2_VideoChromaSubSampling(8i32);
pub const DXVA2_VideoChromaSubsampling_Unknown: DXVA2_VideoChromaSubSampling = DXVA2_VideoChromaSubSampling(0i32);
pub const DXVA2_VideoChromaSubsampling_Vertically_AlignedChromaPlanes: DXVA2_VideoChromaSubSampling = DXVA2_VideoChromaSubSampling(1i32);
pub const DXVA2_VideoChromaSubsampling_Vertically_Cosited: DXVA2_VideoChromaSubSampling = DXVA2_VideoChromaSubSampling(2i32);
pub const DXVA2_VideoDecoderRenderTarget: DXVA2_VideoRenderTargetType = DXVA2_VideoRenderTargetType(0i32);
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D9")]
#[derive(Clone, Copy)]
pub struct DXVA2_VideoDesc {
pub SampleWidth: u32,
pub SampleHeight: u32,
pub SampleFormat: DXVA2_ExtendedFormat,
pub Format: super::super::Graphics::Direct3D9::D3DFORMAT,
pub InputSampleFreq: DXVA2_Frequency,
pub OutputFrameFreq: DXVA2_Frequency,
pub UABProtectionLevel: u32,
pub Reserved: u32,
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl Default for DXVA2_VideoDesc {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA2_VideoLighting(pub i32);
pub const DXVA2_VideoLightingMask: DXVA2_VideoLighting = DXVA2_VideoLighting(15i32);
pub const DXVA2_VideoLighting_Unknown: DXVA2_VideoLighting = DXVA2_VideoLighting(0i32);
pub const DXVA2_VideoLighting_bright: DXVA2_VideoLighting = DXVA2_VideoLighting(1i32);
pub const DXVA2_VideoLighting_dark: DXVA2_VideoLighting = DXVA2_VideoLighting(4i32);
pub const DXVA2_VideoLighting_dim: DXVA2_VideoLighting = DXVA2_VideoLighting(3i32);
pub const DXVA2_VideoLighting_office: DXVA2_VideoLighting = DXVA2_VideoLighting(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA2_VideoPrimaries(pub i32);
pub const DXVA2_VideoPrimariesMask: DXVA2_VideoPrimaries = DXVA2_VideoPrimaries(31i32);
pub const DXVA2_VideoPrimaries_BT470_2_SysBG: DXVA2_VideoPrimaries = DXVA2_VideoPrimaries(4i32);
pub const DXVA2_VideoPrimaries_BT470_2_SysM: DXVA2_VideoPrimaries = DXVA2_VideoPrimaries(3i32);
pub const DXVA2_VideoPrimaries_BT709: DXVA2_VideoPrimaries = DXVA2_VideoPrimaries(2i32);
pub const DXVA2_VideoPrimaries_EBU3213: DXVA2_VideoPrimaries = DXVA2_VideoPrimaries(7i32);
pub const DXVA2_VideoPrimaries_SMPTE170M: DXVA2_VideoPrimaries = DXVA2_VideoPrimaries(5i32);
pub const DXVA2_VideoPrimaries_SMPTE240M: DXVA2_VideoPrimaries = DXVA2_VideoPrimaries(6i32);
pub const DXVA2_VideoPrimaries_SMPTE_C: DXVA2_VideoPrimaries = DXVA2_VideoPrimaries(8i32);
pub const DXVA2_VideoPrimaries_Unknown: DXVA2_VideoPrimaries = DXVA2_VideoPrimaries(0i32);
pub const DXVA2_VideoPrimaries_reserved: DXVA2_VideoPrimaries = DXVA2_VideoPrimaries(1i32);
pub const DXVA2_VideoProcBobDevice: windows_core::GUID = windows_core::GUID::from_u128(0x335aa36e_7884_43a4_9c91_7f87faf3e37e);
pub const DXVA2_VideoProcProgressiveDevice: windows_core::GUID = windows_core::GUID::from_u128(0x5a54a0c9_c7ec_4bd9_8ede_f3c75dc4393b);
pub const DXVA2_VideoProcSoftwareDevice: windows_core::GUID = windows_core::GUID::from_u128(0x4553d47f_ee7e_4e3f_9475_dbf1376c4810);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA2_VideoProcess(pub i32);
#[repr(C)]
#[derive(Clone, Copy)]
pub struct DXVA2_VideoProcessBltParams {
pub TargetFrame: i64,
pub TargetRect: super::super::Foundation::RECT,
pub ConstrictionSize: super::super::Foundation::SIZE,
pub StreamingFlags: u32,
pub BackgroundColor: DXVA2_AYUVSample16,
pub DestFormat: DXVA2_ExtendedFormat,
pub ProcAmpValues: DXVA2_ProcAmpValues,
pub Alpha: DXVA2_Fixed32,
pub NoiseFilterLuma: DXVA2_FilterValues,
pub NoiseFilterChroma: DXVA2_FilterValues,
pub DetailFilterLuma: DXVA2_FilterValues,
pub DetailFilterChroma: DXVA2_FilterValues,
pub DestData: u32,
}
impl Default for DXVA2_VideoProcessBltParams {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const DXVA2_VideoProcess_AlphaBlend: DXVA2_VideoProcess = DXVA2_VideoProcess(8i32);
pub const DXVA2_VideoProcess_AlphaBlendExtended: DXVA2_VideoProcess = DXVA2_VideoProcess(256i32);
pub const DXVA2_VideoProcess_Constriction: DXVA2_VideoProcess = DXVA2_VideoProcess(512i32);
pub const DXVA2_VideoProcess_DetailFilter: DXVA2_VideoProcess = DXVA2_VideoProcess(2048i32);
pub const DXVA2_VideoProcess_GammaCompensated: DXVA2_VideoProcess = DXVA2_VideoProcess(16384i32);
pub const DXVA2_VideoProcess_LinearScaling: DXVA2_VideoProcess = DXVA2_VideoProcess(8192i32);
pub const DXVA2_VideoProcess_MaintainsOriginalFieldData: DXVA2_VideoProcess = DXVA2_VideoProcess(32768i32);
pub const DXVA2_VideoProcess_Mask: DXVA2_VideoProcess = DXVA2_VideoProcess(65535i32);
pub const DXVA2_VideoProcess_NoiseFilter: DXVA2_VideoProcess = DXVA2_VideoProcess(1024i32);
pub const DXVA2_VideoProcess_None: DXVA2_VideoProcess = DXVA2_VideoProcess(0i32);
pub const DXVA2_VideoProcess_PlanarAlpha: DXVA2_VideoProcess = DXVA2_VideoProcess(4096i32);
pub const DXVA2_VideoProcess_StretchX: DXVA2_VideoProcess = DXVA2_VideoProcess(2i32);
pub const DXVA2_VideoProcess_StretchY: DXVA2_VideoProcess = DXVA2_VideoProcess(4i32);
pub const DXVA2_VideoProcess_SubRects: DXVA2_VideoProcess = DXVA2_VideoProcess(16i32);
pub const DXVA2_VideoProcess_SubStreams: DXVA2_VideoProcess = DXVA2_VideoProcess(32i32);
pub const DXVA2_VideoProcess_SubStreamsExtended: DXVA2_VideoProcess = DXVA2_VideoProcess(64i32);
pub const DXVA2_VideoProcess_YUV2RGB: DXVA2_VideoProcess = DXVA2_VideoProcess(1i32);
pub const DXVA2_VideoProcess_YUV2RGBExtended: DXVA2_VideoProcess = DXVA2_VideoProcess(128i32);
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D9")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVA2_VideoProcessorCaps {
pub DeviceCaps: u32,
pub InputPool: super::super::Graphics::Direct3D9::D3DPOOL,
pub NumForwardRefSamples: u32,
pub NumBackwardRefSamples: u32,
pub Reserved: u32,
pub DeinterlaceTechnology: u32,
pub ProcAmpControlCaps: u32,
pub VideoProcessorOperations: u32,
pub NoiseFilterTechnology: u32,
pub DetailFilterTechnology: u32,
}
pub const DXVA2_VideoProcessorRenderTarget: DXVA2_VideoRenderTargetType = DXVA2_VideoRenderTargetType(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA2_VideoRenderTargetType(pub i32);
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub struct DXVA2_VideoSample {
pub Start: i64,
pub End: i64,
pub SampleFormat: DXVA2_ExtendedFormat,
pub SrcSurface: core::mem::ManuallyDrop<Option<super::super::Graphics::Direct3D9::IDirect3DSurface9>>,
pub SrcRect: super::super::Foundation::RECT,
pub DstRect: super::super::Foundation::RECT,
pub Pal: [DXVA2_AYUVSample8; 16],
pub PlanarAlpha: DXVA2_Fixed32,
pub SampleData: u32,
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl Clone for DXVA2_VideoSample {
fn clone(&self) -> Self {
unsafe { core::mem::transmute_copy(self) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl Default for DXVA2_VideoSample {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const DXVA2_VideoSoftwareRenderTarget: DXVA2_VideoRenderTargetType = DXVA2_VideoRenderTargetType(2i32);
pub const DXVA2_VideoTransFuncMask: DXVA2_VideoTransferFunction = DXVA2_VideoTransferFunction(31i32);
pub const DXVA2_VideoTransFunc_10: DXVA2_VideoTransferFunction = DXVA2_VideoTransferFunction(1i32);
pub const DXVA2_VideoTransFunc_18: DXVA2_VideoTransferFunction = DXVA2_VideoTransferFunction(2i32);
pub const DXVA2_VideoTransFunc_20: DXVA2_VideoTransferFunction = DXVA2_VideoTransferFunction(3i32);
pub const DXVA2_VideoTransFunc_22: DXVA2_VideoTransferFunction = DXVA2_VideoTransferFunction(4i32);
pub const DXVA2_VideoTransFunc_240M: DXVA2_VideoTransferFunction = DXVA2_VideoTransferFunction(6i32);
pub const DXVA2_VideoTransFunc_28: DXVA2_VideoTransferFunction = DXVA2_VideoTransferFunction(8i32);
pub const DXVA2_VideoTransFunc_709: DXVA2_VideoTransferFunction = DXVA2_VideoTransferFunction(5i32);
pub const DXVA2_VideoTransFunc_Unknown: DXVA2_VideoTransferFunction = DXVA2_VideoTransferFunction(0i32);
pub const DXVA2_VideoTransFunc_sRGB: DXVA2_VideoTransferFunction = DXVA2_VideoTransferFunction(7i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA2_VideoTransferFunction(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA2_VideoTransferMatrix(pub i32);
pub const DXVA2_VideoTransferMatrixMask: DXVA2_VideoTransferMatrix = DXVA2_VideoTransferMatrix(7i32);
pub const DXVA2_VideoTransferMatrix_BT601: DXVA2_VideoTransferMatrix = DXVA2_VideoTransferMatrix(2i32);
pub const DXVA2_VideoTransferMatrix_BT709: DXVA2_VideoTransferMatrix = DXVA2_VideoTransferMatrix(1i32);
pub const DXVA2_VideoTransferMatrix_SMPTE240M: DXVA2_VideoTransferMatrix = DXVA2_VideoTransferMatrix(3i32);
pub const DXVA2_VideoTransferMatrix_Unknown: DXVA2_VideoTransferMatrix = DXVA2_VideoTransferMatrix(0i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct DXVABufferInfo {
pub pCompSurface: *mut core::ffi::c_void,
pub DataOffset: u32,
pub DataSize: u32,
}
impl Default for DXVABufferInfo {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D9")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVACompBufferInfo {
pub NumCompBuffers: u32,
pub WidthToCreate: u32,
pub HeightToCreate: u32,
pub BytesToAllocate: u32,
pub Usage: u32,
pub Pool: super::super::Graphics::Direct3D9::D3DPOOL,
pub Format: super::super::Graphics::Direct3D9::D3DFORMAT,
}
pub const DXVAHDControlGuid: windows_core::GUID = windows_core::GUID::from_u128(0xa0386e75_f70c_464c_a9ce_33c44e091623);
pub const DXVAHDETWGUID_CREATEVIDEOPROCESSOR: windows_core::GUID = windows_core::GUID::from_u128(0x681e3d1e_5674_4fb3_a503_2f2055e91f60);
pub const DXVAHDETWGUID_DESTROYVIDEOPROCESSOR: windows_core::GUID = windows_core::GUID::from_u128(0xf943f0a0_3f16_43e0_8093_105a986aa5f1);
pub const DXVAHDETWGUID_VIDEOPROCESSBLTHD: windows_core::GUID = windows_core::GUID::from_u128(0xbef3d435_78c7_4de3_9707_cd1b083b160a);
pub const DXVAHDETWGUID_VIDEOPROCESSBLTHD_STREAM: windows_core::GUID = windows_core::GUID::from_u128(0x27ae473e_a5fc_4be5_b4e3_f24994d3c495);
pub const DXVAHDETWGUID_VIDEOPROCESSBLTSTATE: windows_core::GUID = windows_core::GUID::from_u128(0x76c94b5a_193f_4692_9484_a4d999da81a8);
pub const DXVAHDETWGUID_VIDEOPROCESSSTREAMSTATE: windows_core::GUID = windows_core::GUID::from_u128(0x262c0b02_209d_47ed_94d8_82ae02b84aa7);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHDETW_CREATEVIDEOPROCESSOR {
pub pObject: u64,
pub pD3D9Ex: u64,
pub VPGuid: windows_core::GUID,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHDETW_DESTROYVIDEOPROCESSOR {
pub pObject: u64,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D9")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHDETW_VIDEOPROCESSBLTHD {
pub pObject: u64,
pub pOutputSurface: u64,
pub TargetRect: super::super::Foundation::RECT,
pub OutputFormat: super::super::Graphics::Direct3D9::D3DFORMAT,
pub ColorSpace: u32,
pub OutputFrame: u32,
pub StreamCount: u32,
pub Enter: windows_core::BOOL,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D9")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHDETW_VIDEOPROCESSBLTHD_STREAM {
pub pObject: u64,
pub pInputSurface: u64,
pub SourceRect: super::super::Foundation::RECT,
pub DestinationRect: super::super::Foundation::RECT,
pub InputFormat: super::super::Graphics::Direct3D9::D3DFORMAT,
pub FrameFormat: DXVAHD_FRAME_FORMAT,
pub ColorSpace: u32,
pub StreamNumber: u32,
pub OutputIndex: u32,
pub InputFrameOrField: u32,
pub PastFrames: u32,
pub FutureFrames: u32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHDETW_VIDEOPROCESSBLTSTATE {
pub pObject: u64,
pub State: DXVAHD_BLT_STATE,
pub DataSize: u32,
pub SetState: windows_core::BOOL,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHDETW_VIDEOPROCESSSTREAMSTATE {
pub pObject: u64,
pub StreamNumber: u32,
pub State: DXVAHD_STREAM_STATE,
pub DataSize: u32,
pub SetState: windows_core::BOOL,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D9")]
#[derive(Clone, Copy, Debug, Default)]
pub struct DXVAHDSW_CALLBACKS {
pub CreateDevice: PDXVAHDSW_CreateDevice,
pub ProposeVideoPrivateFormat: PDXVAHDSW_ProposeVideoPrivateFormat,
pub GetVideoProcessorDeviceCaps: PDXVAHDSW_GetVideoProcessorDeviceCaps,
pub GetVideoProcessorOutputFormats: PDXVAHDSW_GetVideoProcessorOutputFormats,
pub GetVideoProcessorInputFormats: PDXVAHDSW_GetVideoProcessorInputFormats,
pub GetVideoProcessorCaps: PDXVAHDSW_GetVideoProcessorCaps,
pub GetVideoProcessorCustomRates: PDXVAHDSW_GetVideoProcessorCustomRates,
pub GetVideoProcessorFilterRange: PDXVAHDSW_GetVideoProcessorFilterRange,
pub DestroyDevice: PDXVAHDSW_DestroyDevice,
pub CreateVideoProcessor: PDXVAHDSW_CreateVideoProcessor,
pub SetVideoProcessBltState: PDXVAHDSW_SetVideoProcessBltState,
pub GetVideoProcessBltStatePrivate: PDXVAHDSW_GetVideoProcessBltStatePrivate,
pub SetVideoProcessStreamState: PDXVAHDSW_SetVideoProcessStreamState,
pub GetVideoProcessStreamStatePrivate: PDXVAHDSW_GetVideoProcessStreamStatePrivate,
pub VideoProcessBltHD: PDXVAHDSW_VideoProcessBltHD,
pub DestroyVideoProcessor: PDXVAHDSW_DestroyVideoProcessor,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVAHD_ALPHA_FILL_MODE(pub i32);
pub const DXVAHD_ALPHA_FILL_MODE_BACKGROUND: DXVAHD_ALPHA_FILL_MODE = DXVAHD_ALPHA_FILL_MODE(1i32);
pub const DXVAHD_ALPHA_FILL_MODE_DESTINATION: DXVAHD_ALPHA_FILL_MODE = DXVAHD_ALPHA_FILL_MODE(2i32);
pub const DXVAHD_ALPHA_FILL_MODE_OPAQUE: DXVAHD_ALPHA_FILL_MODE = DXVAHD_ALPHA_FILL_MODE(0i32);
pub const DXVAHD_ALPHA_FILL_MODE_SOURCE_STREAM: DXVAHD_ALPHA_FILL_MODE = DXVAHD_ALPHA_FILL_MODE(3i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVAHD_BLT_STATE(pub i32);
pub const DXVAHD_BLT_STATE_ALPHA_FILL: DXVAHD_BLT_STATE = DXVAHD_BLT_STATE(3i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHD_BLT_STATE_ALPHA_FILL_DATA {
pub Mode: DXVAHD_ALPHA_FILL_MODE,
pub StreamNumber: u32,
}
pub const DXVAHD_BLT_STATE_BACKGROUND_COLOR: DXVAHD_BLT_STATE = DXVAHD_BLT_STATE(1i32);
#[repr(C)]
#[derive(Clone, Copy)]
pub struct DXVAHD_BLT_STATE_BACKGROUND_COLOR_DATA {
pub YCbCr: windows_core::BOOL,
pub BackgroundColor: DXVAHD_COLOR,
}
impl Default for DXVAHD_BLT_STATE_BACKGROUND_COLOR_DATA {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const DXVAHD_BLT_STATE_CONSTRICTION: DXVAHD_BLT_STATE = DXVAHD_BLT_STATE(4i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHD_BLT_STATE_CONSTRICTION_DATA {
pub Enable: windows_core::BOOL,
pub Size: super::super::Foundation::SIZE,
}
pub const DXVAHD_BLT_STATE_OUTPUT_COLOR_SPACE: DXVAHD_BLT_STATE = DXVAHD_BLT_STATE(2i32);
#[repr(C)]
#[derive(Clone, Copy)]
pub struct DXVAHD_BLT_STATE_OUTPUT_COLOR_SPACE_DATA {
pub Anonymous: DXVAHD_BLT_STATE_OUTPUT_COLOR_SPACE_DATA_0,
}
impl Default for DXVAHD_BLT_STATE_OUTPUT_COLOR_SPACE_DATA {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub union DXVAHD_BLT_STATE_OUTPUT_COLOR_SPACE_DATA_0 {
pub Anonymous: DXVAHD_BLT_STATE_OUTPUT_COLOR_SPACE_DATA_0_0,
pub Value: u32,
}
impl Default for DXVAHD_BLT_STATE_OUTPUT_COLOR_SPACE_DATA_0 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHD_BLT_STATE_OUTPUT_COLOR_SPACE_DATA_0_0 {
pub _bitfield: u32,
}
pub const DXVAHD_BLT_STATE_PRIVATE: DXVAHD_BLT_STATE = DXVAHD_BLT_STATE(1000i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct DXVAHD_BLT_STATE_PRIVATE_DATA {
pub Guid: windows_core::GUID,
pub DataSize: u32,
pub pData: *mut core::ffi::c_void,
}
impl Default for DXVAHD_BLT_STATE_PRIVATE_DATA {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const DXVAHD_BLT_STATE_TARGET_RECT: DXVAHD_BLT_STATE = DXVAHD_BLT_STATE(0i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHD_BLT_STATE_TARGET_RECT_DATA {
pub Enable: windows_core::BOOL,
pub TargetRect: super::super::Foundation::RECT,
}
#[repr(C)]
#[derive(Clone, Copy)]
pub union DXVAHD_COLOR {
pub RGB: DXVAHD_COLOR_RGBA,
pub YCbCr: DXVAHD_COLOR_YCbCrA,
}
impl Default for DXVAHD_COLOR {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHD_COLOR_RGBA {
pub R: f32,
pub G: f32,
pub B: f32,
pub A: f32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHD_COLOR_YCbCrA {
pub Y: f32,
pub Cb: f32,
pub Cr: f32,
pub A: f32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHD_CONTENT_DESC {
pub InputFrameFormat: DXVAHD_FRAME_FORMAT,
pub InputFrameRate: DXVAHD_RATIONAL,
pub InputWidth: u32,
pub InputHeight: u32,
pub OutputFrameRate: DXVAHD_RATIONAL,
pub OutputWidth: u32,
pub OutputHeight: u32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHD_CUSTOM_RATE_DATA {
pub CustomRate: DXVAHD_RATIONAL,
pub OutputFrames: u32,
pub InputInterlaced: windows_core::BOOL,
pub InputFramesOrFields: u32,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVAHD_DEVICE_CAPS(pub i32);
pub const DXVAHD_DEVICE_CAPS_LINEAR_SPACE: DXVAHD_DEVICE_CAPS = DXVAHD_DEVICE_CAPS(1i32);
pub const DXVAHD_DEVICE_CAPS_RGB_RANGE_CONVERSION: DXVAHD_DEVICE_CAPS = DXVAHD_DEVICE_CAPS(4i32);
pub const DXVAHD_DEVICE_CAPS_YCbCr_MATRIX_CONVERSION: DXVAHD_DEVICE_CAPS = DXVAHD_DEVICE_CAPS(8i32);
pub const DXVAHD_DEVICE_CAPS_xvYCC: DXVAHD_DEVICE_CAPS = DXVAHD_DEVICE_CAPS(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVAHD_DEVICE_TYPE(pub i32);
pub const DXVAHD_DEVICE_TYPE_HARDWARE: DXVAHD_DEVICE_TYPE = DXVAHD_DEVICE_TYPE(0i32);
pub const DXVAHD_DEVICE_TYPE_OTHER: DXVAHD_DEVICE_TYPE = DXVAHD_DEVICE_TYPE(3i32);
pub const DXVAHD_DEVICE_TYPE_REFERENCE: DXVAHD_DEVICE_TYPE = DXVAHD_DEVICE_TYPE(2i32);
pub const DXVAHD_DEVICE_TYPE_SOFTWARE: DXVAHD_DEVICE_TYPE = DXVAHD_DEVICE_TYPE(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVAHD_DEVICE_USAGE(pub i32);
pub const DXVAHD_DEVICE_USAGE_OPTIMAL_QUALITY: DXVAHD_DEVICE_USAGE = DXVAHD_DEVICE_USAGE(2i32);
pub const DXVAHD_DEVICE_USAGE_OPTIMAL_SPEED: DXVAHD_DEVICE_USAGE = DXVAHD_DEVICE_USAGE(1i32);
pub const DXVAHD_DEVICE_USAGE_PLAYBACK_NORMAL: DXVAHD_DEVICE_USAGE = DXVAHD_DEVICE_USAGE(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVAHD_FEATURE_CAPS(pub i32);
pub const DXVAHD_FEATURE_CAPS_ALPHA_FILL: DXVAHD_FEATURE_CAPS = DXVAHD_FEATURE_CAPS(1i32);
pub const DXVAHD_FEATURE_CAPS_ALPHA_PALETTE: DXVAHD_FEATURE_CAPS = DXVAHD_FEATURE_CAPS(8i32);
pub const DXVAHD_FEATURE_CAPS_CONSTRICTION: DXVAHD_FEATURE_CAPS = DXVAHD_FEATURE_CAPS(2i32);
pub const DXVAHD_FEATURE_CAPS_LUMA_KEY: DXVAHD_FEATURE_CAPS = DXVAHD_FEATURE_CAPS(4i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVAHD_FILTER(pub i32);
pub const DXVAHD_FILTER_ANAMORPHIC_SCALING: DXVAHD_FILTER = DXVAHD_FILTER(6i32);
pub const DXVAHD_FILTER_BRIGHTNESS: DXVAHD_FILTER = DXVAHD_FILTER(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVAHD_FILTER_CAPS(pub i32);
pub const DXVAHD_FILTER_CAPS_ANAMORPHIC_SCALING: DXVAHD_FILTER_CAPS = DXVAHD_FILTER_CAPS(64i32);
pub const DXVAHD_FILTER_CAPS_BRIGHTNESS: DXVAHD_FILTER_CAPS = DXVAHD_FILTER_CAPS(1i32);
pub const DXVAHD_FILTER_CAPS_CONTRAST: DXVAHD_FILTER_CAPS = DXVAHD_FILTER_CAPS(2i32);
pub const DXVAHD_FILTER_CAPS_EDGE_ENHANCEMENT: DXVAHD_FILTER_CAPS = DXVAHD_FILTER_CAPS(32i32);
pub const DXVAHD_FILTER_CAPS_HUE: DXVAHD_FILTER_CAPS = DXVAHD_FILTER_CAPS(4i32);
pub const DXVAHD_FILTER_CAPS_NOISE_REDUCTION: DXVAHD_FILTER_CAPS = DXVAHD_FILTER_CAPS(16i32);
pub const DXVAHD_FILTER_CAPS_SATURATION: DXVAHD_FILTER_CAPS = DXVAHD_FILTER_CAPS(8i32);
pub const DXVAHD_FILTER_CONTRAST: DXVAHD_FILTER = DXVAHD_FILTER(1i32);
pub const DXVAHD_FILTER_EDGE_ENHANCEMENT: DXVAHD_FILTER = DXVAHD_FILTER(5i32);
pub const DXVAHD_FILTER_HUE: DXVAHD_FILTER = DXVAHD_FILTER(2i32);
pub const DXVAHD_FILTER_NOISE_REDUCTION: DXVAHD_FILTER = DXVAHD_FILTER(4i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHD_FILTER_RANGE_DATA {
pub Minimum: i32,
pub Maximum: i32,
pub Default: i32,
pub Multiplier: f32,
}
pub const DXVAHD_FILTER_SATURATION: DXVAHD_FILTER = DXVAHD_FILTER(3i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVAHD_FRAME_FORMAT(pub i32);
pub const DXVAHD_FRAME_FORMAT_INTERLACED_BOTTOM_FIELD_FIRST: DXVAHD_FRAME_FORMAT = DXVAHD_FRAME_FORMAT(2i32);
pub const DXVAHD_FRAME_FORMAT_INTERLACED_TOP_FIELD_FIRST: DXVAHD_FRAME_FORMAT = DXVAHD_FRAME_FORMAT(1i32);
pub const DXVAHD_FRAME_FORMAT_PROGRESSIVE: DXVAHD_FRAME_FORMAT = DXVAHD_FRAME_FORMAT(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVAHD_INPUT_FORMAT_CAPS(pub i32);
pub const DXVAHD_INPUT_FORMAT_CAPS_PALETTE_INTERLACED: DXVAHD_INPUT_FORMAT_CAPS = DXVAHD_INPUT_FORMAT_CAPS(8i32);
pub const DXVAHD_INPUT_FORMAT_CAPS_RGB_INTERLACED: DXVAHD_INPUT_FORMAT_CAPS = DXVAHD_INPUT_FORMAT_CAPS(1i32);
pub const DXVAHD_INPUT_FORMAT_CAPS_RGB_LUMA_KEY: DXVAHD_INPUT_FORMAT_CAPS = DXVAHD_INPUT_FORMAT_CAPS(4i32);
pub const DXVAHD_INPUT_FORMAT_CAPS_RGB_PROCAMP: DXVAHD_INPUT_FORMAT_CAPS = DXVAHD_INPUT_FORMAT_CAPS(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVAHD_ITELECINE_CAPS(pub i32);
pub const DXVAHD_ITELECINE_CAPS_22: DXVAHD_ITELECINE_CAPS = DXVAHD_ITELECINE_CAPS(2i32);
pub const DXVAHD_ITELECINE_CAPS_222222222223: DXVAHD_ITELECINE_CAPS = DXVAHD_ITELECINE_CAPS(256i32);
pub const DXVAHD_ITELECINE_CAPS_2224: DXVAHD_ITELECINE_CAPS = DXVAHD_ITELECINE_CAPS(4i32);
pub const DXVAHD_ITELECINE_CAPS_2332: DXVAHD_ITELECINE_CAPS = DXVAHD_ITELECINE_CAPS(8i32);
pub const DXVAHD_ITELECINE_CAPS_32: DXVAHD_ITELECINE_CAPS = DXVAHD_ITELECINE_CAPS(1i32);
pub const DXVAHD_ITELECINE_CAPS_32322: DXVAHD_ITELECINE_CAPS = DXVAHD_ITELECINE_CAPS(16i32);
pub const DXVAHD_ITELECINE_CAPS_55: DXVAHD_ITELECINE_CAPS = DXVAHD_ITELECINE_CAPS(32i32);
pub const DXVAHD_ITELECINE_CAPS_64: DXVAHD_ITELECINE_CAPS = DXVAHD_ITELECINE_CAPS(64i32);
pub const DXVAHD_ITELECINE_CAPS_87: DXVAHD_ITELECINE_CAPS = DXVAHD_ITELECINE_CAPS(128i32);
pub const DXVAHD_ITELECINE_CAPS_OTHER: DXVAHD_ITELECINE_CAPS = DXVAHD_ITELECINE_CAPS(-2147483648i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVAHD_OUTPUT_RATE(pub i32);
pub const DXVAHD_OUTPUT_RATE_CUSTOM: DXVAHD_OUTPUT_RATE = DXVAHD_OUTPUT_RATE(2i32);
pub const DXVAHD_OUTPUT_RATE_HALF: DXVAHD_OUTPUT_RATE = DXVAHD_OUTPUT_RATE(1i32);
pub const DXVAHD_OUTPUT_RATE_NORMAL: DXVAHD_OUTPUT_RATE = DXVAHD_OUTPUT_RATE(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVAHD_PROCESSOR_CAPS(pub i32);
pub const DXVAHD_PROCESSOR_CAPS_DEINTERLACE_ADAPTIVE: DXVAHD_PROCESSOR_CAPS = DXVAHD_PROCESSOR_CAPS(4i32);
pub const DXVAHD_PROCESSOR_CAPS_DEINTERLACE_BLEND: DXVAHD_PROCESSOR_CAPS = DXVAHD_PROCESSOR_CAPS(1i32);
pub const DXVAHD_PROCESSOR_CAPS_DEINTERLACE_BOB: DXVAHD_PROCESSOR_CAPS = DXVAHD_PROCESSOR_CAPS(2i32);
pub const DXVAHD_PROCESSOR_CAPS_DEINTERLACE_MOTION_COMPENSATION: DXVAHD_PROCESSOR_CAPS = DXVAHD_PROCESSOR_CAPS(8i32);
pub const DXVAHD_PROCESSOR_CAPS_FRAME_RATE_CONVERSION: DXVAHD_PROCESSOR_CAPS = DXVAHD_PROCESSOR_CAPS(32i32);
pub const DXVAHD_PROCESSOR_CAPS_INVERSE_TELECINE: DXVAHD_PROCESSOR_CAPS = DXVAHD_PROCESSOR_CAPS(16i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHD_RATIONAL {
pub Numerator: u32,
pub Denominator: u32,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D9")]
#[derive(Clone, Debug, PartialEq)]
pub struct DXVAHD_STREAM_DATA {
pub Enable: windows_core::BOOL,
pub OutputIndex: u32,
pub InputFrameOrField: u32,
pub PastFrames: u32,
pub FutureFrames: u32,
pub ppPastSurfaces: *mut Option<super::super::Graphics::Direct3D9::IDirect3DSurface9>,
pub pInputSurface: core::mem::ManuallyDrop<Option<super::super::Graphics::Direct3D9::IDirect3DSurface9>>,
pub ppFutureSurfaces: *mut Option<super::super::Graphics::Direct3D9::IDirect3DSurface9>,
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl Default for DXVAHD_STREAM_DATA {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVAHD_STREAM_STATE(pub i32);
pub const DXVAHD_STREAM_STATE_ALPHA: DXVAHD_STREAM_STATE = DXVAHD_STREAM_STATE(6i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHD_STREAM_STATE_ALPHA_DATA {
pub Enable: windows_core::BOOL,
pub Alpha: f32,
}
pub const DXVAHD_STREAM_STATE_ASPECT_RATIO: DXVAHD_STREAM_STATE = DXVAHD_STREAM_STATE(9i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHD_STREAM_STATE_ASPECT_RATIO_DATA {
pub Enable: windows_core::BOOL,
pub SourceAspectRatio: DXVAHD_RATIONAL,
pub DestinationAspectRatio: DXVAHD_RATIONAL,
}
pub const DXVAHD_STREAM_STATE_D3DFORMAT: DXVAHD_STREAM_STATE = DXVAHD_STREAM_STATE(0i32);
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D9")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHD_STREAM_STATE_D3DFORMAT_DATA {
pub Format: super::super::Graphics::Direct3D9::D3DFORMAT,
}
pub const DXVAHD_STREAM_STATE_DESTINATION_RECT: DXVAHD_STREAM_STATE = DXVAHD_STREAM_STATE(5i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHD_STREAM_STATE_DESTINATION_RECT_DATA {
pub Enable: windows_core::BOOL,
pub DestinationRect: super::super::Foundation::RECT,
}
pub const DXVAHD_STREAM_STATE_FILTER_ANAMORPHIC_SCALING: DXVAHD_STREAM_STATE = DXVAHD_STREAM_STATE(106i32);
pub const DXVAHD_STREAM_STATE_FILTER_BRIGHTNESS: DXVAHD_STREAM_STATE = DXVAHD_STREAM_STATE(100i32);
pub const DXVAHD_STREAM_STATE_FILTER_CONTRAST: DXVAHD_STREAM_STATE = DXVAHD_STREAM_STATE(101i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHD_STREAM_STATE_FILTER_DATA {
pub Enable: windows_core::BOOL,
pub Level: i32,
}
pub const DXVAHD_STREAM_STATE_FILTER_EDGE_ENHANCEMENT: DXVAHD_STREAM_STATE = DXVAHD_STREAM_STATE(105i32);
pub const DXVAHD_STREAM_STATE_FILTER_HUE: DXVAHD_STREAM_STATE = DXVAHD_STREAM_STATE(102i32);
pub const DXVAHD_STREAM_STATE_FILTER_NOISE_REDUCTION: DXVAHD_STREAM_STATE = DXVAHD_STREAM_STATE(104i32);
pub const DXVAHD_STREAM_STATE_FILTER_SATURATION: DXVAHD_STREAM_STATE = DXVAHD_STREAM_STATE(103i32);
pub const DXVAHD_STREAM_STATE_FRAME_FORMAT: DXVAHD_STREAM_STATE = DXVAHD_STREAM_STATE(1i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHD_STREAM_STATE_FRAME_FORMAT_DATA {
pub FrameFormat: DXVAHD_FRAME_FORMAT,
}
pub const DXVAHD_STREAM_STATE_INPUT_COLOR_SPACE: DXVAHD_STREAM_STATE = DXVAHD_STREAM_STATE(2i32);
#[repr(C)]
#[derive(Clone, Copy)]
pub struct DXVAHD_STREAM_STATE_INPUT_COLOR_SPACE_DATA {
pub Anonymous: DXVAHD_STREAM_STATE_INPUT_COLOR_SPACE_DATA_0,
}
impl Default for DXVAHD_STREAM_STATE_INPUT_COLOR_SPACE_DATA {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub union DXVAHD_STREAM_STATE_INPUT_COLOR_SPACE_DATA_0 {
pub Anonymous: DXVAHD_STREAM_STATE_INPUT_COLOR_SPACE_DATA_0_0,
pub Value: u32,
}
impl Default for DXVAHD_STREAM_STATE_INPUT_COLOR_SPACE_DATA_0 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHD_STREAM_STATE_INPUT_COLOR_SPACE_DATA_0_0 {
pub _bitfield: u32,
}
pub const DXVAHD_STREAM_STATE_LUMA_KEY: DXVAHD_STREAM_STATE = DXVAHD_STREAM_STATE(8i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHD_STREAM_STATE_LUMA_KEY_DATA {
pub Enable: windows_core::BOOL,
pub Lower: f32,
pub Upper: f32,
}
pub const DXVAHD_STREAM_STATE_OUTPUT_RATE: DXVAHD_STREAM_STATE = DXVAHD_STREAM_STATE(3i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHD_STREAM_STATE_OUTPUT_RATE_DATA {
pub RepeatFrame: windows_core::BOOL,
pub OutputRate: DXVAHD_OUTPUT_RATE,
pub CustomRate: DXVAHD_RATIONAL,
}
pub const DXVAHD_STREAM_STATE_PALETTE: DXVAHD_STREAM_STATE = DXVAHD_STREAM_STATE(7i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct DXVAHD_STREAM_STATE_PALETTE_DATA {
pub Count: u32,
pub pEntries: *mut u32,
}
impl Default for DXVAHD_STREAM_STATE_PALETTE_DATA {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const DXVAHD_STREAM_STATE_PRIVATE: DXVAHD_STREAM_STATE = DXVAHD_STREAM_STATE(1000i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct DXVAHD_STREAM_STATE_PRIVATE_DATA {
pub Guid: windows_core::GUID,
pub DataSize: u32,
pub pData: *mut core::ffi::c_void,
}
impl Default for DXVAHD_STREAM_STATE_PRIVATE_DATA {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const DXVAHD_STREAM_STATE_PRIVATE_IVTC: windows_core::GUID = windows_core::GUID::from_u128(0x9c601e3c_0f33_414c_a739_99540ee42da5);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHD_STREAM_STATE_PRIVATE_IVTC_DATA {
pub Enable: windows_core::BOOL,
pub ITelecineFlags: u32,
pub Frames: u32,
pub InputField: u32,
}
pub const DXVAHD_STREAM_STATE_SOURCE_RECT: DXVAHD_STREAM_STATE = DXVAHD_STREAM_STATE(4i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHD_STREAM_STATE_SOURCE_RECT_DATA {
pub Enable: windows_core::BOOL,
pub SourceRect: super::super::Foundation::RECT,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVAHD_SURFACE_TYPE(pub i32);
pub const DXVAHD_SURFACE_TYPE_VIDEO_INPUT: DXVAHD_SURFACE_TYPE = DXVAHD_SURFACE_TYPE(0i32);
pub const DXVAHD_SURFACE_TYPE_VIDEO_INPUT_PRIVATE: DXVAHD_SURFACE_TYPE = DXVAHD_SURFACE_TYPE(1i32);
pub const DXVAHD_SURFACE_TYPE_VIDEO_OUTPUT: DXVAHD_SURFACE_TYPE = DXVAHD_SURFACE_TYPE(2i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHD_VPCAPS {
pub VPGuid: windows_core::GUID,
pub PastFrames: u32,
pub FutureFrames: u32,
pub ProcessorCaps: u32,
pub ITelecineCaps: u32,
pub CustomRateCount: u32,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D9")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAHD_VPDEVCAPS {
pub DeviceType: DXVAHD_DEVICE_TYPE,
pub DeviceCaps: u32,
pub FeatureCaps: u32,
pub FilterCaps: u32,
pub InputFormatCaps: u32,
pub InputPool: super::super::Graphics::Direct3D9::D3DPOOL,
pub OutputFormatCount: u32,
pub InputFormatCount: u32,
pub VideoProcessorCount: u32,
pub MaxInputStreams: u32,
pub MaxStreamStates: u32,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D9")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVAUncompDataInfo {
pub UncompWidth: u32,
pub UncompHeight: u32,
pub UncompFormat: super::super::Graphics::Direct3D9::D3DFORMAT,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVA_AYUVsample2 {
pub bCrValue: u8,
pub bCbValue: u8,
pub bY_Value: u8,
pub bSampleAlpha8: u8,
}
#[repr(C, packed(1))]
#[derive(Clone, Copy, Default)]
pub struct DXVA_BufferDescription {
pub dwTypeIndex: u32,
pub dwBufferIndex: u32,
pub dwDataOffset: u32,
pub dwDataSize: u32,
pub dwFirstMBaddress: u32,
pub dwNumMBsInBuffer: u32,
pub dwWidth: u32,
pub dwHeight: u32,
pub dwStride: u32,
pub dwReservedBits: u32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct DXVA_COPPCommand {
pub macKDI: windows_core::GUID,
pub guidCommandID: windows_core::GUID,
pub dwSequence: u32,
pub cbSizeData: u32,
pub CommandData: [u8; 4056],
}
impl Default for DXVA_COPPCommand {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct DXVA_COPPSignature {
pub Signature: [u8; 256],
}
impl Default for DXVA_COPPSignature {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct DXVA_COPPStatusInput {
pub rApp: windows_core::GUID,
pub guidStatusRequestID: windows_core::GUID,
pub dwSequence: u32,
pub cbSizeData: u32,
pub StatusData: [u8; 4056],
}
impl Default for DXVA_COPPStatusInput {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct DXVA_COPPStatusOutput {
pub macKDI: windows_core::GUID,
pub cbSizeData: u32,
pub COPPStatus: [u8; 4076],
}
impl Default for DXVA_COPPStatusOutput {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C, packed(1))]
#[derive(Clone, Copy)]
pub struct DXVA_ConfigPictureDecode {
pub dwFunction: u32,
pub dwReservedBits: [u32; 3],
pub guidConfigBitstreamEncryption: windows_core::GUID,
pub guidConfigMBcontrolEncryption: windows_core::GUID,
pub guidConfigResidDiffEncryption: windows_core::GUID,
pub bConfigBitstreamRaw: u8,
pub bConfigMBcontrolRasterOrder: u8,
pub bConfigResidDiffHost: u8,
pub bConfigSpatialResid8: u8,
pub bConfigResid8Subtraction: u8,
pub bConfigSpatialHost8or9Clipping: u8,
pub bConfigSpatialResidInterleaved: u8,
pub bConfigIntraResidUnsigned: u8,
pub bConfigResidDiffAccelerator: u8,
pub bConfigHostInverseScan: u8,
pub bConfigSpecificIDCT: u8,
pub bConfig4GroupedCoefs: u8,
}
impl Default for DXVA_ConfigPictureDecode {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct DXVA_DeinterlaceBlt {
pub Size: u32,
pub Reserved: u32,
pub rtTarget: i64,
pub DstRect: super::super::Foundation::RECT,
pub SrcRect: super::super::Foundation::RECT,
pub NumSourceSurfaces: u32,
pub Alpha: f32,
pub Source: [DXVA_VideoSample; 32],
}
impl Default for DXVA_DeinterlaceBlt {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct DXVA_DeinterlaceBltEx {
pub Size: u32,
pub BackgroundColor: DXVA_AYUVsample2,
pub rcTarget: super::super::Foundation::RECT,
pub rtTarget: i64,
pub NumSourceSurfaces: u32,
pub Alpha: f32,
pub Source: [DXVA_VideoSample2; 32],
pub DestinationFormat: u32,
pub DestinationFlags: u32,
}
impl Default for DXVA_DeinterlaceBltEx {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct DXVA_DeinterlaceBltEx32 {
pub Size: u32,
pub BackgroundColor: DXVA_AYUVsample2,
pub rcTarget: super::super::Foundation::RECT,
pub rtTarget: i64,
pub NumSourceSurfaces: u32,
pub Alpha: f32,
pub Source: [DXVA_VideoSample32; 32],
pub DestinationFormat: u32,
pub DestinationFlags: u32,
}
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Default for DXVA_DeinterlaceBltEx32 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D9")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVA_DeinterlaceCaps {
pub Size: u32,
pub NumPreviousOutputFrames: u32,
pub InputPool: u32,
pub NumForwardRefSamples: u32,
pub NumBackwardRefSamples: u32,
pub d3dOutputFormat: super::super::Graphics::Direct3D9::D3DFORMAT,
pub VideoProcessingCaps: DXVA_VideoProcessCaps,
pub DeinterlaceTechnology: DXVA_DeinterlaceTech,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct DXVA_DeinterlaceQueryAvailableModes {
pub Size: u32,
pub NumGuids: u32,
pub Guids: [windows_core::GUID; 32],
}
impl Default for DXVA_DeinterlaceQueryAvailableModes {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D9")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVA_DeinterlaceQueryModeCaps {
pub Size: u32,
pub Guid: windows_core::GUID,
pub VideoDesc: DXVA_VideoDesc,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA_DeinterlaceTech(pub i32);
pub const DXVA_DeinterlaceTech_BOBLineReplicate: DXVA_DeinterlaceTech = DXVA_DeinterlaceTech(1i32);
pub const DXVA_DeinterlaceTech_BOBVerticalStretch: DXVA_DeinterlaceTech = DXVA_DeinterlaceTech(2i32);
pub const DXVA_DeinterlaceTech_BOBVerticalStretch4Tap: DXVA_DeinterlaceTech = DXVA_DeinterlaceTech(256i32);
pub const DXVA_DeinterlaceTech_EdgeFiltering: DXVA_DeinterlaceTech = DXVA_DeinterlaceTech(16i32);
pub const DXVA_DeinterlaceTech_FieldAdaptive: DXVA_DeinterlaceTech = DXVA_DeinterlaceTech(32i32);
pub const DXVA_DeinterlaceTech_MedianFiltering: DXVA_DeinterlaceTech = DXVA_DeinterlaceTech(4i32);
pub const DXVA_DeinterlaceTech_MotionVectorSteered: DXVA_DeinterlaceTech = DXVA_DeinterlaceTech(128i32);
pub const DXVA_DeinterlaceTech_PixelAdaptive: DXVA_DeinterlaceTech = DXVA_DeinterlaceTech(64i32);
pub const DXVA_DeinterlaceTech_Unknown: DXVA_DeinterlaceTech = DXVA_DeinterlaceTech(0i32);
pub const DXVA_DestinationFlagMask: DXVA_DestinationFlags = DXVA_DestinationFlags(15i32);
pub const DXVA_DestinationFlag_Alpha_Changed: DXVA_DestinationFlags = DXVA_DestinationFlags(8i32);
pub const DXVA_DestinationFlag_Background_Changed: DXVA_DestinationFlags = DXVA_DestinationFlags(1i32);
pub const DXVA_DestinationFlag_ColorData_Changed: DXVA_DestinationFlags = DXVA_DestinationFlags(4i32);
pub const DXVA_DestinationFlag_TargetRect_Changed: DXVA_DestinationFlags = DXVA_DestinationFlags(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA_DestinationFlags(pub i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVA_ExtendedFormat {
pub _bitfield: u32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVA_Frequency {
pub Numerator: u32,
pub Denominator: u32,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA_NominalRange(pub i32);
pub const DXVA_NominalRangeMask: DXVA_NominalRange = DXVA_NominalRange(28672i32);
pub const DXVA_NominalRangeShift: DXVA_NominalRange = DXVA_NominalRange(12i32);
pub const DXVA_NominalRange_0_255: DXVA_NominalRange = DXVA_NominalRange(1i32);
pub const DXVA_NominalRange_16_235: DXVA_NominalRange = DXVA_NominalRange(2i32);
pub const DXVA_NominalRange_48_208: DXVA_NominalRange = DXVA_NominalRange(3i32);
pub const DXVA_NominalRange_Normal: DXVA_NominalRange = DXVA_NominalRange(1i32);
pub const DXVA_NominalRange_Unknown: DXVA_NominalRange = DXVA_NominalRange(0i32);
pub const DXVA_NominalRange_Wide: DXVA_NominalRange = DXVA_NominalRange(2i32);
#[repr(C, packed(1))]
#[derive(Clone, Copy, Default)]
pub struct DXVA_PictureParameters {
pub wDecodedPictureIndex: u16,
pub wDeblockedPictureIndex: u16,
pub wForwardRefPictureIndex: u16,
pub wBackwardRefPictureIndex: u16,
pub wPicWidthInMBminus1: u16,
pub wPicHeightInMBminus1: u16,
pub bMacroblockWidthMinus1: u8,
pub bMacroblockHeightMinus1: u8,
pub bBlockWidthMinus1: u8,
pub bBlockHeightMinus1: u8,
pub bBPPminus1: u8,
pub bPicStructure: u8,
pub bSecondField: u8,
pub bPicIntra: u8,
pub bPicBackwardPrediction: u8,
pub bBidirectionalAveragingMode: u8,
pub bMVprecisionAndChromaRelation: u8,
pub bChromaFormat: u8,
pub bPicScanFixed: u8,
pub bPicScanMethod: u8,
pub bPicReadbackRequests: u8,
pub bRcontrol: u8,
pub bPicSpatialResid8: u8,
pub bPicOverflowBlocks: u8,
pub bPicExtrapolation: u8,
pub bPicDeblocked: u8,
pub bPicDeblockConfined: u8,
pub bPic4MVallowed: u8,
pub bPicOBMC: u8,
pub bPicBinPB: u8,
pub bMV_RPS: u8,
pub bReservedBits: u8,
pub wBitstreamFcodes: u16,
pub wBitstreamPCEelements: u16,
pub bBitstreamConcealmentNeed: u8,
pub bBitstreamConcealmentMethod: u8,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVA_ProcAmpControlBlt {
pub Size: u32,
pub DstRect: super::super::Foundation::RECT,
pub SrcRect: super::super::Foundation::RECT,
pub Alpha: f32,
pub Brightness: f32,
pub Contrast: f32,
pub Hue: f32,
pub Saturation: f32,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D9")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVA_ProcAmpControlCaps {
pub Size: u32,
pub InputPool: u32,
pub d3dOutputFormat: super::super::Graphics::Direct3D9::D3DFORMAT,
pub ProcAmpControlProps: u32,
pub VideoProcessingCaps: u32,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA_ProcAmpControlProp(pub i32);
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D9")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVA_ProcAmpControlQueryRange {
pub Size: u32,
pub ProcAmpControlProp: DXVA_ProcAmpControlProp,
pub VideoDesc: DXVA_VideoDesc,
}
pub const DXVA_ProcAmp_Brightness: DXVA_ProcAmpControlProp = DXVA_ProcAmpControlProp(1i32);
pub const DXVA_ProcAmp_Contrast: DXVA_ProcAmpControlProp = DXVA_ProcAmpControlProp(2i32);
pub const DXVA_ProcAmp_Hue: DXVA_ProcAmpControlProp = DXVA_ProcAmpControlProp(4i32);
pub const DXVA_ProcAmp_None: DXVA_ProcAmpControlProp = DXVA_ProcAmpControlProp(0i32);
pub const DXVA_ProcAmp_Saturation: DXVA_ProcAmpControlProp = DXVA_ProcAmpControlProp(8i32);
pub const DXVA_SampleFieldInterleavedEvenFirst: DXVA_SampleFormat = DXVA_SampleFormat(3i32);
pub const DXVA_SampleFieldInterleavedOddFirst: DXVA_SampleFormat = DXVA_SampleFormat(4i32);
pub const DXVA_SampleFieldSingleEven: DXVA_SampleFormat = DXVA_SampleFormat(5i32);
pub const DXVA_SampleFieldSingleOdd: DXVA_SampleFormat = DXVA_SampleFormat(6i32);
pub const DXVA_SampleFlag_ColorData_Changed: DXVA_SampleFlags = DXVA_SampleFlags(8i32);
pub const DXVA_SampleFlag_DstRect_Changed: DXVA_SampleFlags = DXVA_SampleFlags(4i32);
pub const DXVA_SampleFlag_Palette_Changed: DXVA_SampleFlags = DXVA_SampleFlags(1i32);
pub const DXVA_SampleFlag_SrcRect_Changed: DXVA_SampleFlags = DXVA_SampleFlags(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA_SampleFlags(pub i32);
pub const DXVA_SampleFlagsMask: DXVA_SampleFlags = DXVA_SampleFlags(15i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA_SampleFormat(pub i32);
pub const DXVA_SampleFormatMask: DXVA_SampleFormat = DXVA_SampleFormat(255i32);
pub const DXVA_SamplePreviousFrame: DXVA_SampleFormat = DXVA_SampleFormat(1i32);
pub const DXVA_SampleProgressiveFrame: DXVA_SampleFormat = DXVA_SampleFormat(2i32);
pub const DXVA_SampleSubStream: DXVA_SampleFormat = DXVA_SampleFormat(7i32);
pub const DXVA_SampleUnknown: DXVA_SampleFormat = DXVA_SampleFormat(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA_VideoChromaSubsampling(pub i32);
pub const DXVA_VideoChromaSubsamplingMask: DXVA_VideoChromaSubsampling = DXVA_VideoChromaSubsampling(3840i32);
pub const DXVA_VideoChromaSubsamplingShift: DXVA_VideoChromaSubsampling = DXVA_VideoChromaSubsampling(8i32);
pub const DXVA_VideoChromaSubsampling_Cosited: DXVA_VideoChromaSubsampling = DXVA_VideoChromaSubsampling(7i32);
pub const DXVA_VideoChromaSubsampling_DV_PAL: DXVA_VideoChromaSubsampling = DXVA_VideoChromaSubsampling(6i32);
pub const DXVA_VideoChromaSubsampling_Horizontally_Cosited: DXVA_VideoChromaSubsampling = DXVA_VideoChromaSubsampling(4i32);
pub const DXVA_VideoChromaSubsampling_MPEG1: DXVA_VideoChromaSubsampling = DXVA_VideoChromaSubsampling(1i32);
pub const DXVA_VideoChromaSubsampling_MPEG2: DXVA_VideoChromaSubsampling = DXVA_VideoChromaSubsampling(5i32);
pub const DXVA_VideoChromaSubsampling_ProgressiveChroma: DXVA_VideoChromaSubsampling = DXVA_VideoChromaSubsampling(8i32);
pub const DXVA_VideoChromaSubsampling_Unknown: DXVA_VideoChromaSubsampling = DXVA_VideoChromaSubsampling(0i32);
pub const DXVA_VideoChromaSubsampling_Vertically_AlignedChromaPlanes: DXVA_VideoChromaSubsampling = DXVA_VideoChromaSubsampling(1i32);
pub const DXVA_VideoChromaSubsampling_Vertically_Cosited: DXVA_VideoChromaSubsampling = DXVA_VideoChromaSubsampling(2i32);
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Direct3D9")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVA_VideoDesc {
pub Size: u32,
pub SampleWidth: u32,
pub SampleHeight: u32,
pub SampleFormat: u32,
pub d3dFormat: super::super::Graphics::Direct3D9::D3DFORMAT,
pub InputSampleFreq: DXVA_Frequency,
pub OutputFrameFreq: DXVA_Frequency,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA_VideoLighting(pub i32);
pub const DXVA_VideoLightingMask: DXVA_VideoLighting = DXVA_VideoLighting(3932160i32);
pub const DXVA_VideoLightingShift: DXVA_VideoLighting = DXVA_VideoLighting(18i32);
pub const DXVA_VideoLighting_Unknown: DXVA_VideoLighting = DXVA_VideoLighting(0i32);
pub const DXVA_VideoLighting_bright: DXVA_VideoLighting = DXVA_VideoLighting(1i32);
pub const DXVA_VideoLighting_dark: DXVA_VideoLighting = DXVA_VideoLighting(4i32);
pub const DXVA_VideoLighting_dim: DXVA_VideoLighting = DXVA_VideoLighting(3i32);
pub const DXVA_VideoLighting_office: DXVA_VideoLighting = DXVA_VideoLighting(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA_VideoPrimaries(pub i32);
pub const DXVA_VideoPrimariesMask: DXVA_VideoPrimaries = DXVA_VideoPrimaries(130023424i32);
pub const DXVA_VideoPrimariesShift: DXVA_VideoPrimaries = DXVA_VideoPrimaries(22i32);
pub const DXVA_VideoPrimaries_BT470_2_SysBG: DXVA_VideoPrimaries = DXVA_VideoPrimaries(4i32);
pub const DXVA_VideoPrimaries_BT470_2_SysM: DXVA_VideoPrimaries = DXVA_VideoPrimaries(3i32);
pub const DXVA_VideoPrimaries_BT709: DXVA_VideoPrimaries = DXVA_VideoPrimaries(2i32);
pub const DXVA_VideoPrimaries_EBU3213: DXVA_VideoPrimaries = DXVA_VideoPrimaries(7i32);
pub const DXVA_VideoPrimaries_SMPTE170M: DXVA_VideoPrimaries = DXVA_VideoPrimaries(5i32);
pub const DXVA_VideoPrimaries_SMPTE240M: DXVA_VideoPrimaries = DXVA_VideoPrimaries(6i32);
pub const DXVA_VideoPrimaries_SMPTE_C: DXVA_VideoPrimaries = DXVA_VideoPrimaries(8i32);
pub const DXVA_VideoPrimaries_Unknown: DXVA_VideoPrimaries = DXVA_VideoPrimaries(0i32);
pub const DXVA_VideoPrimaries_reserved: DXVA_VideoPrimaries = DXVA_VideoPrimaries(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA_VideoProcessCaps(pub i32);
pub const DXVA_VideoProcess_AlphaBlend: DXVA_VideoProcessCaps = DXVA_VideoProcessCaps(8i32);
pub const DXVA_VideoProcess_AlphaBlendExtended: DXVA_VideoProcessCaps = DXVA_VideoProcessCaps(256i32);
pub const DXVA_VideoProcess_None: DXVA_VideoProcessCaps = DXVA_VideoProcessCaps(0i32);
pub const DXVA_VideoProcess_StretchX: DXVA_VideoProcessCaps = DXVA_VideoProcessCaps(2i32);
pub const DXVA_VideoProcess_StretchY: DXVA_VideoProcessCaps = DXVA_VideoProcessCaps(4i32);
pub const DXVA_VideoProcess_SubRects: DXVA_VideoProcessCaps = DXVA_VideoProcessCaps(16i32);
pub const DXVA_VideoProcess_SubStreams: DXVA_VideoProcessCaps = DXVA_VideoProcessCaps(32i32);
pub const DXVA_VideoProcess_SubStreamsExtended: DXVA_VideoProcessCaps = DXVA_VideoProcessCaps(64i32);
pub const DXVA_VideoProcess_YUV2RGB: DXVA_VideoProcessCaps = DXVA_VideoProcessCaps(1i32);
pub const DXVA_VideoProcess_YUV2RGBExtended: DXVA_VideoProcessCaps = DXVA_VideoProcessCaps(128i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DXVA_VideoPropertyRange {
pub MinValue: f32,
pub MaxValue: f32,
pub DefaultValue: f32,
pub StepSize: f32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct DXVA_VideoSample {
pub rtStart: i64,
pub rtEnd: i64,
pub SampleFormat: DXVA_SampleFormat,
pub lpDDSSrcSurface: *mut core::ffi::c_void,
}
impl Default for DXVA_VideoSample {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[cfg(target_arch = "x86")]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct DXVA_VideoSample2 {
pub rtStart: i64,
pub rtEnd: i64,
pub SampleFormat: u32,
pub SampleFlags: u32,
pub lpDDSSrcSurface: *mut core::ffi::c_void,
pub rcSrc: super::super::Foundation::RECT,
pub rcDst: super::super::Foundation::RECT,
pub Palette: [DXVA_AYUVsample2; 16],
}
#[cfg(target_arch = "x86")]
impl Default for DXVA_VideoSample2 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct DXVA_VideoSample2 {
pub Size: u32,
pub Reserved: u32,
pub rtStart: i64,
pub rtEnd: i64,
pub SampleFormat: u32,
pub SampleFlags: u32,
pub lpDDSSrcSurface: *mut core::ffi::c_void,
pub rcSrc: super::super::Foundation::RECT,
pub rcDst: super::super::Foundation::RECT,
pub Palette: [DXVA_AYUVsample2; 16],
}
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Default for DXVA_VideoSample2 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct DXVA_VideoSample32 {
pub rtStart: i64,
pub rtEnd: i64,
pub SampleFormat: u32,
pub SampleFlags: u32,
pub lpDDSSrcSurface: u32,
pub rcSrc: super::super::Foundation::RECT,
pub rcDst: super::super::Foundation::RECT,
pub Palette: [DXVA_AYUVsample2; 16],
}
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))]
impl Default for DXVA_VideoSample32 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const DXVA_VideoTransFuncMask: DXVA_VideoTransferFunction = DXVA_VideoTransferFunction(-134217728i32);
pub const DXVA_VideoTransFuncShift: DXVA_VideoTransferFunction = DXVA_VideoTransferFunction(27i32);
pub const DXVA_VideoTransFunc_10: DXVA_VideoTransferFunction = DXVA_VideoTransferFunction(1i32);
pub const DXVA_VideoTransFunc_18: DXVA_VideoTransferFunction = DXVA_VideoTransferFunction(2i32);
pub const DXVA_VideoTransFunc_20: DXVA_VideoTransferFunction = DXVA_VideoTransferFunction(3i32);
pub const DXVA_VideoTransFunc_22: DXVA_VideoTransferFunction = DXVA_VideoTransferFunction(4i32);
pub const DXVA_VideoTransFunc_22_240M: DXVA_VideoTransferFunction = DXVA_VideoTransferFunction(6i32);
pub const DXVA_VideoTransFunc_22_709: DXVA_VideoTransferFunction = DXVA_VideoTransferFunction(5i32);
pub const DXVA_VideoTransFunc_22_8bit_sRGB: DXVA_VideoTransferFunction = DXVA_VideoTransferFunction(7i32);
pub const DXVA_VideoTransFunc_28: DXVA_VideoTransferFunction = DXVA_VideoTransferFunction(8i32);
pub const DXVA_VideoTransFunc_Unknown: DXVA_VideoTransferFunction = DXVA_VideoTransferFunction(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA_VideoTransferFunction(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DXVA_VideoTransferMatrix(pub i32);
pub const DXVA_VideoTransferMatrixMask: DXVA_VideoTransferMatrix = DXVA_VideoTransferMatrix(229376i32);
pub const DXVA_VideoTransferMatrixShift: DXVA_VideoTransferMatrix = DXVA_VideoTransferMatrix(15i32);
pub const DXVA_VideoTransferMatrix_BT601: DXVA_VideoTransferMatrix = DXVA_VideoTransferMatrix(2i32);
pub const DXVA_VideoTransferMatrix_BT709: DXVA_VideoTransferMatrix = DXVA_VideoTransferMatrix(1i32);
pub const DXVA_VideoTransferMatrix_SMPTE240M: DXVA_VideoTransferMatrix = DXVA_VideoTransferMatrix(3i32);
pub const DXVA_VideoTransferMatrix_Unknown: DXVA_VideoTransferMatrix = DXVA_VideoTransferMatrix(0i32);
pub const DXVAp_DeinterlaceBobDevice: windows_core::GUID = windows_core::GUID::from_u128(0x335aa36e_7884_43a4_9c91_7f87faf3e37e);
pub const DXVAp_DeinterlaceContainerDevice: windows_core::GUID = windows_core::GUID::from_u128(0x0e85cb93_3046_4ff0_aecc_d58cb5f035fd);
pub const DXVAp_ModeMPEG2_A: windows_core::GUID = windows_core::GUID::from_u128(0x1b81be0a_a0c7_11d3_b984_00c04f2e73c5);
pub const DXVAp_ModeMPEG2_C: windows_core::GUID = windows_core::GUID::from_u128(0x1b81be0c_a0c7_11d3_b984_00c04f2e73c5);
pub const DXVAp_NoEncrypt: windows_core::GUID = windows_core::GUID::from_u128(0x1b81bed0_a0c7_11d3_b984_00c04f2e73c5);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct DeviceStreamState(pub i32);
pub const DeviceStreamState_Disabled: DeviceStreamState = DeviceStreamState(3i32);
pub const DeviceStreamState_Pause: DeviceStreamState = DeviceStreamState(1i32);
pub const DeviceStreamState_Run: DeviceStreamState = DeviceStreamState(2i32);
pub const DeviceStreamState_Stop: DeviceStreamState = DeviceStreamState(0i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct DigitalWindowSetting {
pub OriginX: f64,
pub OriginY: f64,
pub WindowSize: f64,
}
pub const DistanceToFocalPlane: MFDepthMeasurement = MFDepthMeasurement(0i32);
pub const DistanceToOpticalCenter: MFDepthMeasurement = MFDepthMeasurement(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct EAllocationType(pub i32);
pub const ENCAPIPARAM_BITRATE: windows_core::GUID = windows_core::GUID::from_u128(0x49cc4c43_ca83_4ad4_a9af_f3696af666df);
pub const ENCAPIPARAM_BITRATE_MODE: windows_core::GUID = windows_core::GUID::from_u128(0xee5fb25c_c713_40d1_9d58_c0d7241e250f);
pub const ENCAPIPARAM_PEAK_BITRATE: windows_core::GUID = windows_core::GUID::from_u128(0x703f16a9_3d48_44a1_b077_018dff915d19);
pub const ENCAPIPARAM_SAP_MODE: windows_core::GUID = windows_core::GUID::from_u128(0x0c0171db_fefc_4af7_9991_a5657c191cd1);
pub const EVRConfig_ForceBatching: windows_core::GUID = windows_core::GUID::from_u128(0xe447df09_10ca_4d17_b17e_6a840f8a3a4c);
pub const EVRConfig_ForceBob: windows_core::GUID = windows_core::GUID::from_u128(0xe447df01_10ca_4d17_b17e_6a840f8a3a4c);
pub const EVRConfig_ForceHalfInterlace: windows_core::GUID = windows_core::GUID::from_u128(0xe447df05_10ca_4d17_b17e_6a840f8a3a4c);
pub const EVRConfig_ForceScaling: windows_core::GUID = windows_core::GUID::from_u128(0xe447df07_10ca_4d17_b17e_6a840f8a3a4c);
pub const EVRConfig_ForceThrottle: windows_core::GUID = windows_core::GUID::from_u128(0xe447df03_10ca_4d17_b17e_6a840f8a3a4c);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct EVRFilterConfigPrefs(pub i32);
pub const EVRFilterConfigPrefs_EnableQoS: EVRFilterConfigPrefs = EVRFilterConfigPrefs(1i32);
pub const EVRFilterConfigPrefs_Mask: EVRFilterConfigPrefs = EVRFilterConfigPrefs(1i32);
pub const E_TOCPARSER_INVALIDASFFILE: windows_core::HRESULT = windows_core::HRESULT(0x99000001_u32 as _);
pub const E_TOCPARSER_INVALIDRIFFFILE: windows_core::HRESULT = windows_core::HRESULT(0x99000002_u32 as _);
pub const FACILITY_MF: u32 = 13u32;
pub const FACILITY_MF_WIN32: u32 = 7u32;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct FILE_ACCESSMODE(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct FILE_OPENMODE(pub i32);
pub const FORMAT_525WSS: windows_core::GUID = windows_core::GUID::from_u128(0xc7ecf04d_4582_4869_9abb_bfb523b62edf);
pub const FORMAT_AnalogVideo: windows_core::GUID = windows_core::GUID::from_u128(0x0482dde0_7817_11cf_8a03_00aa006ecb65);
pub const FORMAT_CAPTIONED_H264VIDEO: windows_core::GUID = windows_core::GUID::from_u128(0xa4efc024_873e_4da3_898b_474ddbd79fd0);
pub const FORMAT_CAPTIONED_MPEG2VIDEO: windows_core::GUID = windows_core::GUID::from_u128(0x7ab2ada2_81b6_4f14_b3c8_d0c486393b67);
pub const FORMAT_CC_CONTAINER: windows_core::GUID = windows_core::GUID::from_u128(0x50997a4a_e508_4054_a2b2_10ff0ac1a69a);
pub const FORMAT_DvInfo: windows_core::GUID = windows_core::GUID::from_u128(0x05589f84_c356_11ce_bf01_00aa0055595a);
pub const FORMAT_MFVideoFormat: windows_core::GUID = windows_core::GUID::from_u128(0xaed4ab2d_7326_43cb_9464_c879cab9c43d);
pub const FORMAT_MPEGStreams: windows_core::GUID = windows_core::GUID::from_u128(0x05589f83_c356_11ce_bf01_00aa0055595a);
pub const FORMAT_MPEGVideo: windows_core::GUID = windows_core::GUID::from_u128(0x05589f82_c356_11ce_bf01_00aa0055595a);
pub const FORMAT_None: windows_core::GUID = windows_core::GUID::from_u128(0x0f6417d6_c318_11d0_a43f_00a0c9223196);
pub const FORMAT_VideoInfo: windows_core::GUID = windows_core::GUID::from_u128(0x05589f80_c356_11ce_bf01_00aa0055595a);
pub const FORMAT_VideoInfo2: windows_core::GUID = windows_core::GUID::from_u128(0xf72a76a0_eb0a_11d0_ace4_0000c0cc16ba);
pub const FORMAT_WaveFormatEx: windows_core::GUID = windows_core::GUID::from_u128(0x05589f81_c356_11ce_bf01_00aa0055595a);
pub const GUID_NativeDeviceService: windows_core::GUID = windows_core::GUID::from_u128(0xef71e53c_52f4_43c5_b86a_ad6cb216a61e);
pub const GUID_PlayToService: windows_core::GUID = windows_core::GUID::from_u128(0xf6a8ff9d_9e14_41c9_bf0f_120a2b3ce120);
windows_core::imp::define_interface!(IAdvancedMediaCapture, IAdvancedMediaCapture_Vtbl, 0xd0751585_d216_4344_b5bf_463b68f977bb);
windows_core::imp::interface_hierarchy!(IAdvancedMediaCapture, windows_core::IUnknown);
impl IAdvancedMediaCapture {
pub unsafe fn GetAdvancedMediaCaptureSettings(&self) -> windows_core::Result<IAdvancedMediaCaptureSettings> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetAdvancedMediaCaptureSettings)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IAdvancedMediaCapture_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetAdvancedMediaCaptureSettings: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IAdvancedMediaCapture_Impl: windows_core::IUnknownImpl {
fn GetAdvancedMediaCaptureSettings(&self) -> windows_core::Result<IAdvancedMediaCaptureSettings>;
}
impl IAdvancedMediaCapture_Vtbl {
pub const fn new<Identity: IAdvancedMediaCapture_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetAdvancedMediaCaptureSettings<Identity: IAdvancedMediaCapture_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, value: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IAdvancedMediaCapture_Impl::GetAdvancedMediaCaptureSettings(this) {
Ok(ok__) => {
value.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetAdvancedMediaCaptureSettings: GetAdvancedMediaCaptureSettings::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IAdvancedMediaCapture as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IAdvancedMediaCapture {}
windows_core::imp::define_interface!(IAdvancedMediaCaptureInitializationSettings, IAdvancedMediaCaptureInitializationSettings_Vtbl, 0x3de21209_8ba6_4f2a_a577_2819b56ff14d);
windows_core::imp::interface_hierarchy!(IAdvancedMediaCaptureInitializationSettings, windows_core::IUnknown);
impl IAdvancedMediaCaptureInitializationSettings {
pub unsafe fn SetDirectxDeviceManager<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFDXGIDeviceManager>,
{
unsafe { (windows_core::Interface::vtable(self).SetDirectxDeviceManager)(windows_core::Interface::as_raw(self), value.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IAdvancedMediaCaptureInitializationSettings_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetDirectxDeviceManager: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IAdvancedMediaCaptureInitializationSettings_Impl: windows_core::IUnknownImpl {
fn SetDirectxDeviceManager(&self, value: windows_core::Ref<IMFDXGIDeviceManager>) -> windows_core::Result<()>;
}
impl IAdvancedMediaCaptureInitializationSettings_Vtbl {
pub const fn new<Identity: IAdvancedMediaCaptureInitializationSettings_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetDirectxDeviceManager<Identity: IAdvancedMediaCaptureInitializationSettings_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IAdvancedMediaCaptureInitializationSettings_Impl::SetDirectxDeviceManager(this, core::mem::transmute_copy(&value)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), SetDirectxDeviceManager: SetDirectxDeviceManager::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IAdvancedMediaCaptureInitializationSettings as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IAdvancedMediaCaptureInitializationSettings {}
windows_core::imp::define_interface!(IAdvancedMediaCaptureSettings, IAdvancedMediaCaptureSettings_Vtbl, 0x24e0485f_a33e_4aa1_b564_6019b1d14f65);
windows_core::imp::interface_hierarchy!(IAdvancedMediaCaptureSettings, windows_core::IUnknown);
impl IAdvancedMediaCaptureSettings {
pub unsafe fn GetDirectxDeviceManager(&self) -> windows_core::Result<IMFDXGIDeviceManager> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDirectxDeviceManager)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IAdvancedMediaCaptureSettings_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetDirectxDeviceManager: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IAdvancedMediaCaptureSettings_Impl: windows_core::IUnknownImpl {
fn GetDirectxDeviceManager(&self) -> windows_core::Result<IMFDXGIDeviceManager>;
}
impl IAdvancedMediaCaptureSettings_Vtbl {
pub const fn new<Identity: IAdvancedMediaCaptureSettings_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetDirectxDeviceManager<Identity: IAdvancedMediaCaptureSettings_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, value: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IAdvancedMediaCaptureSettings_Impl::GetDirectxDeviceManager(this) {
Ok(ok__) => {
value.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetDirectxDeviceManager: GetDirectxDeviceManager::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IAdvancedMediaCaptureSettings as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IAdvancedMediaCaptureSettings {}
windows_core::imp::define_interface!(IAudioSourceProvider, IAudioSourceProvider_Vtbl, 0xebbaf249_afc2_4582_91c6_b60df2e84954);
windows_core::imp::interface_hierarchy!(IAudioSourceProvider, windows_core::IUnknown);
impl IAudioSourceProvider {
pub unsafe fn ProvideInput(&self, dwsamplecount: u32, pdwchannelcount: *mut u32, pinterleavedaudiodata: Option<*mut f32>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).ProvideInput)(windows_core::Interface::as_raw(self), dwsamplecount, pdwchannelcount as _, pinterleavedaudiodata.unwrap_or(core::mem::zeroed()) as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IAudioSourceProvider_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub ProvideInput: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u32, *mut f32) -> windows_core::HRESULT,
}
pub trait IAudioSourceProvider_Impl: windows_core::IUnknownImpl {
fn ProvideInput(&self, dwsamplecount: u32, pdwchannelcount: *mut u32, pinterleavedaudiodata: *mut f32) -> windows_core::Result<()>;
}
impl IAudioSourceProvider_Vtbl {
pub const fn new<Identity: IAudioSourceProvider_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn ProvideInput<Identity: IAudioSourceProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwsamplecount: u32, pdwchannelcount: *mut u32, pinterleavedaudiodata: *mut f32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IAudioSourceProvider_Impl::ProvideInput(this, core::mem::transmute_copy(&dwsamplecount), core::mem::transmute_copy(&pdwchannelcount), core::mem::transmute_copy(&pinterleavedaudiodata)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), ProvideInput: ProvideInput::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IAudioSourceProvider as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IAudioSourceProvider {}
windows_core::imp::define_interface!(IClusterDetector, IClusterDetector_Vtbl, 0x3f07f7b7_c680_41d9_9423_915107ec9ff9);
windows_core::imp::interface_hierarchy!(IClusterDetector, windows_core::IUnknown);
impl IClusterDetector {
pub unsafe fn Initialize(&self, wbaseentrylevel: u16, wclusterentrylevel: u16) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), wbaseentrylevel, wclusterentrylevel).ok() }
}
pub unsafe fn Detect<P3>(&self, dwmaxnumclusters: u32, fminclusterduration: f32, fmaxclusterduration: f32, psrctoc: P3) -> windows_core::Result<IToc>
where
P3: windows_core::Param<IToc>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).Detect)(windows_core::Interface::as_raw(self), dwmaxnumclusters, fminclusterduration, fmaxclusterduration, psrctoc.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IClusterDetector_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub Initialize: unsafe extern "system" fn(*mut core::ffi::c_void, u16, u16) -> windows_core::HRESULT,
pub Detect: unsafe extern "system" fn(*mut core::ffi::c_void, u32, f32, f32, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IClusterDetector_Impl: windows_core::IUnknownImpl {
fn Initialize(&self, wbaseentrylevel: u16, wclusterentrylevel: u16) -> windows_core::Result<()>;
fn Detect(&self, dwmaxnumclusters: u32, fminclusterduration: f32, fmaxclusterduration: f32, psrctoc: windows_core::Ref<IToc>) -> windows_core::Result<IToc>;
}
impl IClusterDetector_Vtbl {
pub const fn new<Identity: IClusterDetector_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Initialize<Identity: IClusterDetector_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, wbaseentrylevel: u16, wclusterentrylevel: u16) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IClusterDetector_Impl::Initialize(this, core::mem::transmute_copy(&wbaseentrylevel), core::mem::transmute_copy(&wclusterentrylevel)).into()
}
}
unsafe extern "system" fn Detect<Identity: IClusterDetector_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwmaxnumclusters: u32, fminclusterduration: f32, fmaxclusterduration: f32, psrctoc: *mut core::ffi::c_void, ppdsttoc: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IClusterDetector_Impl::Detect(this, core::mem::transmute_copy(&dwmaxnumclusters), core::mem::transmute_copy(&fminclusterduration), core::mem::transmute_copy(&fmaxclusterduration), core::mem::transmute_copy(&psrctoc)) {
Ok(ok__) => {
ppdsttoc.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), Initialize: Initialize::<Identity, OFFSET>, Detect: Detect::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IClusterDetector as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IClusterDetector {}
windows_core::imp::define_interface!(ICodecAPI, ICodecAPI_Vtbl, 0x901db4c7_31ce_41a2_85dc_8fa0bf41b8da);
windows_core::imp::interface_hierarchy!(ICodecAPI, windows_core::IUnknown);
impl ICodecAPI {
pub unsafe fn IsSupported(&self, api: *const windows_core::GUID) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).IsSupported)(windows_core::Interface::as_raw(self), api).ok() }
}
pub unsafe fn IsModifiable(&self, api: *const windows_core::GUID) -> windows_core::HRESULT {
unsafe { (windows_core::Interface::vtable(self).IsModifiable)(windows_core::Interface::as_raw(self), api) }
}
#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))]
pub unsafe fn GetParameterRange(&self, api: *const windows_core::GUID, valuemin: *mut super::super::System::Variant::VARIANT, valuemax: *mut super::super::System::Variant::VARIANT, steppingdelta: *mut super::super::System::Variant::VARIANT) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetParameterRange)(windows_core::Interface::as_raw(self), api, core::mem::transmute(valuemin), core::mem::transmute(valuemax), core::mem::transmute(steppingdelta)).ok() }
}
#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))]
pub unsafe fn GetParameterValues(&self, api: *const windows_core::GUID, values: *mut *mut super::super::System::Variant::VARIANT, valuescount: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetParameterValues)(windows_core::Interface::as_raw(self), api, values as _, valuescount as _).ok() }
}
#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))]
pub unsafe fn GetDefaultValue(&self, api: *const windows_core::GUID) -> windows_core::Result<super::super::System::Variant::VARIANT> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDefaultValue)(windows_core::Interface::as_raw(self), api, &mut result__).map(|| core::mem::transmute(result__))
}
}
#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))]
pub unsafe fn GetValue(&self, api: *const windows_core::GUID) -> windows_core::Result<super::super::System::Variant::VARIANT> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetValue)(windows_core::Interface::as_raw(self), api, &mut result__).map(|| core::mem::transmute(result__))
}
}
#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))]
pub unsafe fn SetValue(&self, api: *const windows_core::GUID, value: *const super::super::System::Variant::VARIANT) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetValue)(windows_core::Interface::as_raw(self), api, core::mem::transmute(value)).ok() }
}
pub unsafe fn RegisterForEvent(&self, api: *const windows_core::GUID, userdata: isize) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RegisterForEvent)(windows_core::Interface::as_raw(self), api, userdata).ok() }
}
pub unsafe fn UnregisterForEvent(&self, api: *const windows_core::GUID) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).UnregisterForEvent)(windows_core::Interface::as_raw(self), api).ok() }
}
pub unsafe fn SetAllDefaults(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetAllDefaults)(windows_core::Interface::as_raw(self)).ok() }
}
#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))]
pub unsafe fn SetValueWithNotify(&self, api: *const windows_core::GUID, value: *const super::super::System::Variant::VARIANT, changedparam: *mut *mut windows_core::GUID, changedparamcount: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetValueWithNotify)(windows_core::Interface::as_raw(self), api, core::mem::transmute(value), changedparam as _, changedparamcount as _).ok() }
}
pub unsafe fn SetAllDefaultsWithNotify(&self, changedparam: *mut *mut windows_core::GUID, changedparamcount: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetAllDefaultsWithNotify)(windows_core::Interface::as_raw(self), changedparam as _, changedparamcount as _).ok() }
}
#[cfg(feature = "Win32_System_Com")]
pub unsafe fn GetAllSettings<P0>(&self, __midl__icodecapi0000: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::System::Com::IStream>,
{
unsafe { (windows_core::Interface::vtable(self).GetAllSettings)(windows_core::Interface::as_raw(self), __midl__icodecapi0000.param().abi()).ok() }
}
#[cfg(feature = "Win32_System_Com")]
pub unsafe fn SetAllSettings<P0>(&self, __midl__icodecapi0001: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::System::Com::IStream>,
{
unsafe { (windows_core::Interface::vtable(self).SetAllSettings)(windows_core::Interface::as_raw(self), __midl__icodecapi0001.param().abi()).ok() }
}
#[cfg(feature = "Win32_System_Com")]
pub unsafe fn SetAllSettingsWithNotify<P0>(&self, __midl__icodecapi0002: P0, changedparam: *mut *mut windows_core::GUID, changedparamcount: *mut u32) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::System::Com::IStream>,
{
unsafe { (windows_core::Interface::vtable(self).SetAllSettingsWithNotify)(windows_core::Interface::as_raw(self), __midl__icodecapi0002.param().abi(), changedparam as _, changedparamcount as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct ICodecAPI_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub IsSupported: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID) -> windows_core::HRESULT,
pub IsModifiable: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID) -> windows_core::HRESULT,
#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))]
pub GetParameterRange: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut super::super::System::Variant::VARIANT, *mut super::super::System::Variant::VARIANT, *mut super::super::System::Variant::VARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant")))]
GetParameterRange: usize,
#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))]
pub GetParameterValues: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut *mut super::super::System::Variant::VARIANT, *mut u32) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant")))]
GetParameterValues: usize,
#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))]
pub GetDefaultValue: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut super::super::System::Variant::VARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant")))]
GetDefaultValue: usize,
#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))]
pub GetValue: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut super::super::System::Variant::VARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant")))]
GetValue: usize,
#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))]
pub SetValue: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const super::super::System::Variant::VARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant")))]
SetValue: usize,
pub RegisterForEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, isize) -> windows_core::HRESULT,
pub UnregisterForEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID) -> windows_core::HRESULT,
pub SetAllDefaults: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))]
pub SetValueWithNotify: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const super::super::System::Variant::VARIANT, *mut *mut windows_core::GUID, *mut u32) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant")))]
SetValueWithNotify: usize,
pub SetAllDefaultsWithNotify: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut windows_core::GUID, *mut u32) -> windows_core::HRESULT,
#[cfg(feature = "Win32_System_Com")]
pub GetAllSettings: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_System_Com"))]
GetAllSettings: usize,
#[cfg(feature = "Win32_System_Com")]
pub SetAllSettings: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_System_Com"))]
SetAllSettings: usize,
#[cfg(feature = "Win32_System_Com")]
pub SetAllSettingsWithNotify: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut windows_core::GUID, *mut u32) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_System_Com"))]
SetAllSettingsWithNotify: usize,
}
#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))]
pub trait ICodecAPI_Impl: windows_core::IUnknownImpl {
fn IsSupported(&self, api: *const windows_core::GUID) -> windows_core::Result<()>;
fn IsModifiable(&self, api: *const windows_core::GUID) -> windows_core::HRESULT;
fn GetParameterRange(&self, api: *const windows_core::GUID, valuemin: *mut super::super::System::Variant::VARIANT, valuemax: *mut super::super::System::Variant::VARIANT, steppingdelta: *mut super::super::System::Variant::VARIANT) -> windows_core::Result<()>;
fn GetParameterValues(&self, api: *const windows_core::GUID, values: *mut *mut super::super::System::Variant::VARIANT, valuescount: *mut u32) -> windows_core::Result<()>;
fn GetDefaultValue(&self, api: *const windows_core::GUID) -> windows_core::Result<super::super::System::Variant::VARIANT>;
fn GetValue(&self, api: *const windows_core::GUID) -> windows_core::Result<super::super::System::Variant::VARIANT>;
fn SetValue(&self, api: *const windows_core::GUID, value: *const super::super::System::Variant::VARIANT) -> windows_core::Result<()>;
fn RegisterForEvent(&self, api: *const windows_core::GUID, userdata: isize) -> windows_core::Result<()>;
fn UnregisterForEvent(&self, api: *const windows_core::GUID) -> windows_core::Result<()>;
fn SetAllDefaults(&self) -> windows_core::Result<()>;
fn SetValueWithNotify(&self, api: *const windows_core::GUID, value: *const super::super::System::Variant::VARIANT, changedparam: *mut *mut windows_core::GUID, changedparamcount: *mut u32) -> windows_core::Result<()>;
fn SetAllDefaultsWithNotify(&self, changedparam: *mut *mut windows_core::GUID, changedparamcount: *mut u32) -> windows_core::Result<()>;
fn GetAllSettings(&self, __midl__icodecapi0000: windows_core::Ref<super::super::System::Com::IStream>) -> windows_core::Result<()>;
fn SetAllSettings(&self, __midl__icodecapi0001: windows_core::Ref<super::super::System::Com::IStream>) -> windows_core::Result<()>;
fn SetAllSettingsWithNotify(&self, __midl__icodecapi0002: windows_core::Ref<super::super::System::Com::IStream>, changedparam: *mut *mut windows_core::GUID, changedparamcount: *mut u32) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))]
impl ICodecAPI_Vtbl {
pub const fn new<Identity: ICodecAPI_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn IsSupported<Identity: ICodecAPI_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, api: *const windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ICodecAPI_Impl::IsSupported(this, core::mem::transmute_copy(&api)).into()
}
}
unsafe extern "system" fn IsModifiable<Identity: ICodecAPI_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, api: *const windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ICodecAPI_Impl::IsModifiable(this, core::mem::transmute_copy(&api))
}
}
unsafe extern "system" fn GetParameterRange<Identity: ICodecAPI_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, api: *const windows_core::GUID, valuemin: *mut super::super::System::Variant::VARIANT, valuemax: *mut super::super::System::Variant::VARIANT, steppingdelta: *mut super::super::System::Variant::VARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ICodecAPI_Impl::GetParameterRange(this, core::mem::transmute_copy(&api), core::mem::transmute_copy(&valuemin), core::mem::transmute_copy(&valuemax), core::mem::transmute_copy(&steppingdelta)).into()
}
}
unsafe extern "system" fn GetParameterValues<Identity: ICodecAPI_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, api: *const windows_core::GUID, values: *mut *mut super::super::System::Variant::VARIANT, valuescount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ICodecAPI_Impl::GetParameterValues(this, core::mem::transmute_copy(&api), core::mem::transmute_copy(&values), core::mem::transmute_copy(&valuescount)).into()
}
}
unsafe extern "system" fn GetDefaultValue<Identity: ICodecAPI_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, api: *const windows_core::GUID, value: *mut super::super::System::Variant::VARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match ICodecAPI_Impl::GetDefaultValue(this, core::mem::transmute_copy(&api)) {
Ok(ok__) => {
value.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetValue<Identity: ICodecAPI_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, api: *const windows_core::GUID, value: *mut super::super::System::Variant::VARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match ICodecAPI_Impl::GetValue(this, core::mem::transmute_copy(&api)) {
Ok(ok__) => {
value.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetValue<Identity: ICodecAPI_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, api: *const windows_core::GUID, value: *const super::super::System::Variant::VARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ICodecAPI_Impl::SetValue(this, core::mem::transmute_copy(&api), core::mem::transmute_copy(&value)).into()
}
}
unsafe extern "system" fn RegisterForEvent<Identity: ICodecAPI_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, api: *const windows_core::GUID, userdata: isize) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ICodecAPI_Impl::RegisterForEvent(this, core::mem::transmute_copy(&api), core::mem::transmute_copy(&userdata)).into()
}
}
unsafe extern "system" fn UnregisterForEvent<Identity: ICodecAPI_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, api: *const windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ICodecAPI_Impl::UnregisterForEvent(this, core::mem::transmute_copy(&api)).into()
}
}
unsafe extern "system" fn SetAllDefaults<Identity: ICodecAPI_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ICodecAPI_Impl::SetAllDefaults(this).into()
}
}
unsafe extern "system" fn SetValueWithNotify<Identity: ICodecAPI_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, api: *const windows_core::GUID, value: *const super::super::System::Variant::VARIANT, changedparam: *mut *mut windows_core::GUID, changedparamcount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ICodecAPI_Impl::SetValueWithNotify(this, core::mem::transmute_copy(&api), core::mem::transmute_copy(&value), core::mem::transmute_copy(&changedparam), core::mem::transmute_copy(&changedparamcount)).into()
}
}
unsafe extern "system" fn SetAllDefaultsWithNotify<Identity: ICodecAPI_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, changedparam: *mut *mut windows_core::GUID, changedparamcount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ICodecAPI_Impl::SetAllDefaultsWithNotify(this, core::mem::transmute_copy(&changedparam), core::mem::transmute_copy(&changedparamcount)).into()
}
}
unsafe extern "system" fn GetAllSettings<Identity: ICodecAPI_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, __midl__icodecapi0000: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ICodecAPI_Impl::GetAllSettings(this, core::mem::transmute_copy(&__midl__icodecapi0000)).into()
}
}
unsafe extern "system" fn SetAllSettings<Identity: ICodecAPI_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, __midl__icodecapi0001: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ICodecAPI_Impl::SetAllSettings(this, core::mem::transmute_copy(&__midl__icodecapi0001)).into()
}
}
unsafe extern "system" fn SetAllSettingsWithNotify<Identity: ICodecAPI_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, __midl__icodecapi0002: *mut core::ffi::c_void, changedparam: *mut *mut windows_core::GUID, changedparamcount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ICodecAPI_Impl::SetAllSettingsWithNotify(this, core::mem::transmute_copy(&__midl__icodecapi0002), core::mem::transmute_copy(&changedparam), core::mem::transmute_copy(&changedparamcount)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
IsSupported: IsSupported::<Identity, OFFSET>,
IsModifiable: IsModifiable::<Identity, OFFSET>,
GetParameterRange: GetParameterRange::<Identity, OFFSET>,
GetParameterValues: GetParameterValues::<Identity, OFFSET>,
GetDefaultValue: GetDefaultValue::<Identity, OFFSET>,
GetValue: GetValue::<Identity, OFFSET>,
SetValue: SetValue::<Identity, OFFSET>,
RegisterForEvent: RegisterForEvent::<Identity, OFFSET>,
UnregisterForEvent: UnregisterForEvent::<Identity, OFFSET>,
SetAllDefaults: SetAllDefaults::<Identity, OFFSET>,
SetValueWithNotify: SetValueWithNotify::<Identity, OFFSET>,
SetAllDefaultsWithNotify: SetAllDefaultsWithNotify::<Identity, OFFSET>,
GetAllSettings: GetAllSettings::<Identity, OFFSET>,
SetAllSettings: SetAllSettings::<Identity, OFFSET>,
SetAllSettingsWithNotify: SetAllSettingsWithNotify::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ICodecAPI as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for ICodecAPI {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::define_interface!(ID3D12VideoDecodeCommandList, ID3D12VideoDecodeCommandList_Vtbl, 0x3b60536e_ad29_4e64_a269_f853837e5e53);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl core::ops::Deref for ID3D12VideoDecodeCommandList {
type Target = super::super::Graphics::Direct3D12::ID3D12CommandList;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::interface_hierarchy!(ID3D12VideoDecodeCommandList, windows_core::IUnknown, super::super::Graphics::Direct3D12::ID3D12Object, super::super::Graphics::Direct3D12::ID3D12DeviceChild, super::super::Graphics::Direct3D12::ID3D12CommandList);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoDecodeCommandList {
pub unsafe fn Close(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn Reset<P0>(&self, pallocator: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12CommandAllocator>,
{
unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self), pallocator.param().abi()).ok() }
}
pub unsafe fn ClearState(&self) {
unsafe { (windows_core::Interface::vtable(self).ClearState)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn ResourceBarrier(&self, pbarriers: &[super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER]) {
unsafe { (windows_core::Interface::vtable(self).ResourceBarrier)(windows_core::Interface::as_raw(self), pbarriers.len().try_into().unwrap(), core::mem::transmute(pbarriers.as_ptr())) }
}
pub unsafe fn DiscardResource<P0>(&self, presource: P0, pregion: Option<*const super::super::Graphics::Direct3D12::D3D12_DISCARD_REGION>)
where
P0: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12Resource>,
{
unsafe { (windows_core::Interface::vtable(self).DiscardResource)(windows_core::Interface::as_raw(self), presource.param().abi(), pregion.unwrap_or(core::mem::zeroed()) as _) }
}
pub unsafe fn BeginQuery<P0>(&self, pqueryheap: P0, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32)
where
P0: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12QueryHeap>,
{
unsafe { (windows_core::Interface::vtable(self).BeginQuery)(windows_core::Interface::as_raw(self), pqueryheap.param().abi(), r#type, index) }
}
pub unsafe fn EndQuery<P0>(&self, pqueryheap: P0, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32)
where
P0: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12QueryHeap>,
{
unsafe { (windows_core::Interface::vtable(self).EndQuery)(windows_core::Interface::as_raw(self), pqueryheap.param().abi(), r#type, index) }
}
pub unsafe fn ResolveQueryData<P0, P4>(&self, pqueryheap: P0, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, startindex: u32, numqueries: u32, pdestinationbuffer: P4, aligneddestinationbufferoffset: u64)
where
P0: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12QueryHeap>,
P4: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12Resource>,
{
unsafe { (windows_core::Interface::vtable(self).ResolveQueryData)(windows_core::Interface::as_raw(self), pqueryheap.param().abi(), r#type, startindex, numqueries, pdestinationbuffer.param().abi(), aligneddestinationbufferoffset) }
}
pub unsafe fn SetPredication<P0>(&self, pbuffer: P0, alignedbufferoffset: u64, operation: super::super::Graphics::Direct3D12::D3D12_PREDICATION_OP)
where
P0: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12Resource>,
{
unsafe { (windows_core::Interface::vtable(self).SetPredication)(windows_core::Interface::as_raw(self), pbuffer.param().abi(), alignedbufferoffset, operation) }
}
pub unsafe fn SetMarker(&self, metadata: u32, pdata: Option<*const core::ffi::c_void>, size: u32) {
unsafe { (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), metadata, pdata.unwrap_or(core::mem::zeroed()) as _, size) }
}
pub unsafe fn BeginEvent(&self, metadata: u32, pdata: Option<*const core::ffi::c_void>, size: u32) {
unsafe { (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), metadata, pdata.unwrap_or(core::mem::zeroed()) as _, size) }
}
pub unsafe fn EndEvent(&self) {
unsafe { (windows_core::Interface::vtable(self).EndEvent)(windows_core::Interface::as_raw(self)) }
}
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
pub unsafe fn DecodeFrame<P0>(&self, pdecoder: P0, poutputarguments: *const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS, pinputarguments: *const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS)
where
P0: windows_core::Param<ID3D12VideoDecoder>,
{
unsafe { (windows_core::Interface::vtable(self).DecodeFrame)(windows_core::Interface::as_raw(self), pdecoder.param().abi(), core::mem::transmute(poutputarguments), core::mem::transmute(pinputarguments)) }
}
pub unsafe fn WriteBufferImmediate(&self, count: u32, pparams: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_PARAMETER, pmodes: Option<*const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_MODE>) {
unsafe { (windows_core::Interface::vtable(self).WriteBufferImmediate)(windows_core::Interface::as_raw(self), count, pparams, pmodes.unwrap_or(core::mem::zeroed()) as _) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[repr(C)]
#[doc(hidden)]
pub struct ID3D12VideoDecodeCommandList_Vtbl {
pub base__: super::super::Graphics::Direct3D12::ID3D12CommandList_Vtbl,
pub Close: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Reset: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ClearState: unsafe extern "system" fn(*mut core::ffi::c_void),
pub ResourceBarrier: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER),
pub DiscardResource: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const super::super::Graphics::Direct3D12::D3D12_DISCARD_REGION),
pub BeginQuery: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, u32),
pub EndQuery: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, u32),
pub ResolveQueryData: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, u32, u32, *mut core::ffi::c_void, u64),
pub SetPredication: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u64, super::super::Graphics::Direct3D12::D3D12_PREDICATION_OP),
pub SetMarker: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const core::ffi::c_void, u32),
pub BeginEvent: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const core::ffi::c_void, u32),
pub EndEvent: unsafe extern "system" fn(*mut core::ffi::c_void),
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
pub DecodeFrame: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS, *const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS),
#[cfg(not(feature = "Win32_Graphics_Dxgi_Common"))]
DecodeFrame: usize,
pub WriteBufferImmediate: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_PARAMETER, *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_MODE),
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Send for ID3D12VideoDecodeCommandList {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Sync for ID3D12VideoDecodeCommandList {}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoDecodeCommandList_Impl: super::super::Graphics::Direct3D12::ID3D12CommandList_Impl {
fn Close(&self) -> windows_core::Result<()>;
fn Reset(&self, pallocator: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12CommandAllocator>) -> windows_core::Result<()>;
fn ClearState(&self);
fn ResourceBarrier(&self, numbarriers: u32, pbarriers: *const super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER);
fn DiscardResource(&self, presource: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12Resource>, pregion: *const super::super::Graphics::Direct3D12::D3D12_DISCARD_REGION);
fn BeginQuery(&self, pqueryheap: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32);
fn EndQuery(&self, pqueryheap: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32);
fn ResolveQueryData(&self, pqueryheap: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, startindex: u32, numqueries: u32, pdestinationbuffer: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12Resource>, aligneddestinationbufferoffset: u64);
fn SetPredication(&self, pbuffer: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12Resource>, alignedbufferoffset: u64, operation: super::super::Graphics::Direct3D12::D3D12_PREDICATION_OP);
fn SetMarker(&self, metadata: u32, pdata: *const core::ffi::c_void, size: u32);
fn BeginEvent(&self, metadata: u32, pdata: *const core::ffi::c_void, size: u32);
fn EndEvent(&self);
fn DecodeFrame(&self, pdecoder: windows_core::Ref<ID3D12VideoDecoder>, poutputarguments: *const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS, pinputarguments: *const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS);
fn WriteBufferImmediate(&self, count: u32, pparams: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_PARAMETER, pmodes: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_MODE);
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoDecodeCommandList_Vtbl {
pub const fn new<Identity: ID3D12VideoDecodeCommandList_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Close<Identity: ID3D12VideoDecodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDecodeCommandList_Impl::Close(this).into()
}
}
unsafe extern "system" fn Reset<Identity: ID3D12VideoDecodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pallocator: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDecodeCommandList_Impl::Reset(this, core::mem::transmute_copy(&pallocator)).into()
}
}
unsafe extern "system" fn ClearState<Identity: ID3D12VideoDecodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDecodeCommandList_Impl::ClearState(this)
}
}
unsafe extern "system" fn ResourceBarrier<Identity: ID3D12VideoDecodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, numbarriers: u32, pbarriers: *const super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDecodeCommandList_Impl::ResourceBarrier(this, core::mem::transmute_copy(&numbarriers), core::mem::transmute_copy(&pbarriers))
}
}
unsafe extern "system" fn DiscardResource<Identity: ID3D12VideoDecodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, pregion: *const super::super::Graphics::Direct3D12::D3D12_DISCARD_REGION) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDecodeCommandList_Impl::DiscardResource(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&pregion))
}
}
unsafe extern "system" fn BeginQuery<Identity: ID3D12VideoDecodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pqueryheap: *mut core::ffi::c_void, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDecodeCommandList_Impl::BeginQuery(this, core::mem::transmute_copy(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&index))
}
}
unsafe extern "system" fn EndQuery<Identity: ID3D12VideoDecodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pqueryheap: *mut core::ffi::c_void, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDecodeCommandList_Impl::EndQuery(this, core::mem::transmute_copy(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&index))
}
}
unsafe extern "system" fn ResolveQueryData<Identity: ID3D12VideoDecodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pqueryheap: *mut core::ffi::c_void, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, startindex: u32, numqueries: u32, pdestinationbuffer: *mut core::ffi::c_void, aligneddestinationbufferoffset: u64) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDecodeCommandList_Impl::ResolveQueryData(this, core::mem::transmute_copy(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&startindex), core::mem::transmute_copy(&numqueries), core::mem::transmute_copy(&pdestinationbuffer), core::mem::transmute_copy(&aligneddestinationbufferoffset))
}
}
unsafe extern "system" fn SetPredication<Identity: ID3D12VideoDecodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbuffer: *mut core::ffi::c_void, alignedbufferoffset: u64, operation: super::super::Graphics::Direct3D12::D3D12_PREDICATION_OP) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDecodeCommandList_Impl::SetPredication(this, core::mem::transmute_copy(&pbuffer), core::mem::transmute_copy(&alignedbufferoffset), core::mem::transmute_copy(&operation))
}
}
unsafe extern "system" fn SetMarker<Identity: ID3D12VideoDecodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, metadata: u32, pdata: *const core::ffi::c_void, size: u32) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDecodeCommandList_Impl::SetMarker(this, core::mem::transmute_copy(&metadata), core::mem::transmute_copy(&pdata), core::mem::transmute_copy(&size))
}
}
unsafe extern "system" fn BeginEvent<Identity: ID3D12VideoDecodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, metadata: u32, pdata: *const core::ffi::c_void, size: u32) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDecodeCommandList_Impl::BeginEvent(this, core::mem::transmute_copy(&metadata), core::mem::transmute_copy(&pdata), core::mem::transmute_copy(&size))
}
}
unsafe extern "system" fn EndEvent<Identity: ID3D12VideoDecodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDecodeCommandList_Impl::EndEvent(this)
}
}
unsafe extern "system" fn DecodeFrame<Identity: ID3D12VideoDecodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdecoder: *mut core::ffi::c_void, poutputarguments: *const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS, pinputarguments: *const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDecodeCommandList_Impl::DecodeFrame(this, core::mem::transmute_copy(&pdecoder), core::mem::transmute_copy(&poutputarguments), core::mem::transmute_copy(&pinputarguments))
}
}
unsafe extern "system" fn WriteBufferImmediate<Identity: ID3D12VideoDecodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, count: u32, pparams: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_PARAMETER, pmodes: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_MODE) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDecodeCommandList_Impl::WriteBufferImmediate(this, core::mem::transmute_copy(&count), core::mem::transmute_copy(&pparams), core::mem::transmute_copy(&pmodes))
}
}
Self {
base__: super::super::Graphics::Direct3D12::ID3D12CommandList_Vtbl::new::<Identity, OFFSET>(),
Close: Close::<Identity, OFFSET>,
Reset: Reset::<Identity, OFFSET>,
ClearState: ClearState::<Identity, OFFSET>,
ResourceBarrier: ResourceBarrier::<Identity, OFFSET>,
DiscardResource: DiscardResource::<Identity, OFFSET>,
BeginQuery: BeginQuery::<Identity, OFFSET>,
EndQuery: EndQuery::<Identity, OFFSET>,
ResolveQueryData: ResolveQueryData::<Identity, OFFSET>,
SetPredication: SetPredication::<Identity, OFFSET>,
SetMarker: SetMarker::<Identity, OFFSET>,
BeginEvent: BeginEvent::<Identity, OFFSET>,
EndEvent: EndEvent::<Identity, OFFSET>,
DecodeFrame: DecodeFrame::<Identity, OFFSET>,
WriteBufferImmediate: WriteBufferImmediate::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ID3D12VideoDecodeCommandList as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12CommandList as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl windows_core::RuntimeName for ID3D12VideoDecodeCommandList {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::define_interface!(ID3D12VideoDecodeCommandList1, ID3D12VideoDecodeCommandList1_Vtbl, 0xd52f011b_b56e_453c_a05a_a7f311c8f472);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl core::ops::Deref for ID3D12VideoDecodeCommandList1 {
type Target = ID3D12VideoDecodeCommandList;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::interface_hierarchy!(ID3D12VideoDecodeCommandList1, windows_core::IUnknown, super::super::Graphics::Direct3D12::ID3D12Object, super::super::Graphics::Direct3D12::ID3D12DeviceChild, super::super::Graphics::Direct3D12::ID3D12CommandList, ID3D12VideoDecodeCommandList);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoDecodeCommandList1 {
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
pub unsafe fn DecodeFrame1<P0>(&self, pdecoder: P0, poutputarguments: *const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS1, pinputarguments: *const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS)
where
P0: windows_core::Param<ID3D12VideoDecoder>,
{
unsafe { (windows_core::Interface::vtable(self).DecodeFrame1)(windows_core::Interface::as_raw(self), pdecoder.param().abi(), core::mem::transmute(poutputarguments), core::mem::transmute(pinputarguments)) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[repr(C)]
#[doc(hidden)]
pub struct ID3D12VideoDecodeCommandList1_Vtbl {
pub base__: ID3D12VideoDecodeCommandList_Vtbl,
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
pub DecodeFrame1: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS1, *const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS),
#[cfg(not(feature = "Win32_Graphics_Dxgi_Common"))]
DecodeFrame1: usize,
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Send for ID3D12VideoDecodeCommandList1 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Sync for ID3D12VideoDecodeCommandList1 {}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoDecodeCommandList1_Impl: ID3D12VideoDecodeCommandList_Impl {
fn DecodeFrame1(&self, pdecoder: windows_core::Ref<ID3D12VideoDecoder>, poutputarguments: *const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS1, pinputarguments: *const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS);
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoDecodeCommandList1_Vtbl {
pub const fn new<Identity: ID3D12VideoDecodeCommandList1_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn DecodeFrame1<Identity: ID3D12VideoDecodeCommandList1_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdecoder: *mut core::ffi::c_void, poutputarguments: *const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS1, pinputarguments: *const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDecodeCommandList1_Impl::DecodeFrame1(this, core::mem::transmute_copy(&pdecoder), core::mem::transmute_copy(&poutputarguments), core::mem::transmute_copy(&pinputarguments))
}
}
Self { base__: ID3D12VideoDecodeCommandList_Vtbl::new::<Identity, OFFSET>(), DecodeFrame1: DecodeFrame1::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ID3D12VideoDecodeCommandList1 as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12CommandList as windows_core::Interface>::IID || iid == &<ID3D12VideoDecodeCommandList as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl windows_core::RuntimeName for ID3D12VideoDecodeCommandList1 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::define_interface!(ID3D12VideoDecodeCommandList2, ID3D12VideoDecodeCommandList2_Vtbl, 0x6e120880_c114_4153_8036_d247051e1729);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl core::ops::Deref for ID3D12VideoDecodeCommandList2 {
type Target = ID3D12VideoDecodeCommandList1;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::interface_hierarchy!(ID3D12VideoDecodeCommandList2, windows_core::IUnknown, super::super::Graphics::Direct3D12::ID3D12Object, super::super::Graphics::Direct3D12::ID3D12DeviceChild, super::super::Graphics::Direct3D12::ID3D12CommandList, ID3D12VideoDecodeCommandList, ID3D12VideoDecodeCommandList1);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoDecodeCommandList2 {
pub unsafe fn SetProtectedResourceSession<P0>(&self, pprotectedresourcesession: P0)
where
P0: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>,
{
unsafe { (windows_core::Interface::vtable(self).SetProtectedResourceSession)(windows_core::Interface::as_raw(self), pprotectedresourcesession.param().abi()) }
}
pub unsafe fn InitializeExtensionCommand<P0>(&self, pextensioncommand: P0, pinitializationparameters: *const core::ffi::c_void, initializationparameterssizeinbytes: usize)
where
P0: windows_core::Param<ID3D12VideoExtensionCommand>,
{
unsafe { (windows_core::Interface::vtable(self).InitializeExtensionCommand)(windows_core::Interface::as_raw(self), pextensioncommand.param().abi(), pinitializationparameters, initializationparameterssizeinbytes) }
}
pub unsafe fn ExecuteExtensionCommand<P0>(&self, pextensioncommand: P0, pexecutionparameters: *const core::ffi::c_void, executionparameterssizeinbytes: usize)
where
P0: windows_core::Param<ID3D12VideoExtensionCommand>,
{
unsafe { (windows_core::Interface::vtable(self).ExecuteExtensionCommand)(windows_core::Interface::as_raw(self), pextensioncommand.param().abi(), pexecutionparameters, executionparameterssizeinbytes) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[repr(C)]
#[doc(hidden)]
pub struct ID3D12VideoDecodeCommandList2_Vtbl {
pub base__: ID3D12VideoDecodeCommandList1_Vtbl,
pub SetProtectedResourceSession: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void),
pub InitializeExtensionCommand: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const core::ffi::c_void, usize),
pub ExecuteExtensionCommand: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const core::ffi::c_void, usize),
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Send for ID3D12VideoDecodeCommandList2 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Sync for ID3D12VideoDecodeCommandList2 {}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoDecodeCommandList2_Impl: ID3D12VideoDecodeCommandList1_Impl {
fn SetProtectedResourceSession(&self, pprotectedresourcesession: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>);
fn InitializeExtensionCommand(&self, pextensioncommand: windows_core::Ref<ID3D12VideoExtensionCommand>, pinitializationparameters: *const core::ffi::c_void, initializationparameterssizeinbytes: usize);
fn ExecuteExtensionCommand(&self, pextensioncommand: windows_core::Ref<ID3D12VideoExtensionCommand>, pexecutionparameters: *const core::ffi::c_void, executionparameterssizeinbytes: usize);
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoDecodeCommandList2_Vtbl {
pub const fn new<Identity: ID3D12VideoDecodeCommandList2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetProtectedResourceSession<Identity: ID3D12VideoDecodeCommandList2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pprotectedresourcesession: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDecodeCommandList2_Impl::SetProtectedResourceSession(this, core::mem::transmute_copy(&pprotectedresourcesession))
}
}
unsafe extern "system" fn InitializeExtensionCommand<Identity: ID3D12VideoDecodeCommandList2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pextensioncommand: *mut core::ffi::c_void, pinitializationparameters: *const core::ffi::c_void, initializationparameterssizeinbytes: usize) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDecodeCommandList2_Impl::InitializeExtensionCommand(this, core::mem::transmute_copy(&pextensioncommand), core::mem::transmute_copy(&pinitializationparameters), core::mem::transmute_copy(&initializationparameterssizeinbytes))
}
}
unsafe extern "system" fn ExecuteExtensionCommand<Identity: ID3D12VideoDecodeCommandList2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pextensioncommand: *mut core::ffi::c_void, pexecutionparameters: *const core::ffi::c_void, executionparameterssizeinbytes: usize) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDecodeCommandList2_Impl::ExecuteExtensionCommand(this, core::mem::transmute_copy(&pextensioncommand), core::mem::transmute_copy(&pexecutionparameters), core::mem::transmute_copy(&executionparameterssizeinbytes))
}
}
Self {
base__: ID3D12VideoDecodeCommandList1_Vtbl::new::<Identity, OFFSET>(),
SetProtectedResourceSession: SetProtectedResourceSession::<Identity, OFFSET>,
InitializeExtensionCommand: InitializeExtensionCommand::<Identity, OFFSET>,
ExecuteExtensionCommand: ExecuteExtensionCommand::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ID3D12VideoDecodeCommandList2 as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12CommandList as windows_core::Interface>::IID || iid == &<ID3D12VideoDecodeCommandList as windows_core::Interface>::IID || iid == &<ID3D12VideoDecodeCommandList1 as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl windows_core::RuntimeName for ID3D12VideoDecodeCommandList2 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::define_interface!(ID3D12VideoDecodeCommandList3, ID3D12VideoDecodeCommandList3_Vtbl, 0x2aee8c37_9562_42da_8abf_61efeb2e4513);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl core::ops::Deref for ID3D12VideoDecodeCommandList3 {
type Target = ID3D12VideoDecodeCommandList2;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::interface_hierarchy!(ID3D12VideoDecodeCommandList3, windows_core::IUnknown, super::super::Graphics::Direct3D12::ID3D12Object, super::super::Graphics::Direct3D12::ID3D12DeviceChild, super::super::Graphics::Direct3D12::ID3D12CommandList, ID3D12VideoDecodeCommandList, ID3D12VideoDecodeCommandList1, ID3D12VideoDecodeCommandList2);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoDecodeCommandList3 {
pub unsafe fn Barrier(&self, pbarriergroups: &[super::super::Graphics::Direct3D12::D3D12_BARRIER_GROUP]) {
unsafe { (windows_core::Interface::vtable(self).Barrier)(windows_core::Interface::as_raw(self), pbarriergroups.len().try_into().unwrap(), core::mem::transmute(pbarriergroups.as_ptr())) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[repr(C)]
#[doc(hidden)]
pub struct ID3D12VideoDecodeCommandList3_Vtbl {
pub base__: ID3D12VideoDecodeCommandList2_Vtbl,
pub Barrier: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const super::super::Graphics::Direct3D12::D3D12_BARRIER_GROUP),
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Send for ID3D12VideoDecodeCommandList3 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Sync for ID3D12VideoDecodeCommandList3 {}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoDecodeCommandList3_Impl: ID3D12VideoDecodeCommandList2_Impl {
fn Barrier(&self, numbarriergroups: u32, pbarriergroups: *const super::super::Graphics::Direct3D12::D3D12_BARRIER_GROUP);
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoDecodeCommandList3_Vtbl {
pub const fn new<Identity: ID3D12VideoDecodeCommandList3_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Barrier<Identity: ID3D12VideoDecodeCommandList3_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, numbarriergroups: u32, pbarriergroups: *const super::super::Graphics::Direct3D12::D3D12_BARRIER_GROUP) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDecodeCommandList3_Impl::Barrier(this, core::mem::transmute_copy(&numbarriergroups), core::mem::transmute_copy(&pbarriergroups))
}
}
Self { base__: ID3D12VideoDecodeCommandList2_Vtbl::new::<Identity, OFFSET>(), Barrier: Barrier::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ID3D12VideoDecodeCommandList3 as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12CommandList as windows_core::Interface>::IID || iid == &<ID3D12VideoDecodeCommandList as windows_core::Interface>::IID || iid == &<ID3D12VideoDecodeCommandList1 as windows_core::Interface>::IID || iid == &<ID3D12VideoDecodeCommandList2 as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl windows_core::RuntimeName for ID3D12VideoDecodeCommandList3 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::define_interface!(ID3D12VideoDecoder, ID3D12VideoDecoder_Vtbl, 0xc59b6bdc_7720_4074_a136_17a156037470);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl core::ops::Deref for ID3D12VideoDecoder {
type Target = super::super::Graphics::Direct3D12::ID3D12Pageable;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::interface_hierarchy!(ID3D12VideoDecoder, windows_core::IUnknown, super::super::Graphics::Direct3D12::ID3D12Object, super::super::Graphics::Direct3D12::ID3D12DeviceChild, super::super::Graphics::Direct3D12::ID3D12Pageable);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoDecoder {
pub unsafe fn GetDesc(&self) -> D3D12_VIDEO_DECODER_DESC {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), &mut result__);
result__
}
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[repr(C)]
#[doc(hidden)]
pub struct ID3D12VideoDecoder_Vtbl {
pub base__: super::super::Graphics::Direct3D12::ID3D12Pageable_Vtbl,
pub GetDesc: unsafe extern "system" fn(*mut core::ffi::c_void, *mut D3D12_VIDEO_DECODER_DESC),
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Send for ID3D12VideoDecoder {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Sync for ID3D12VideoDecoder {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
pub trait ID3D12VideoDecoder_Impl: super::super::Graphics::Direct3D12::ID3D12Pageable_Impl {
fn GetDesc(&self) -> D3D12_VIDEO_DECODER_DESC;
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoDecoder_Vtbl {
pub const fn new<Identity: ID3D12VideoDecoder_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetDesc<Identity: ID3D12VideoDecoder_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut D3D12_VIDEO_DECODER_DESC) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
*result__ = ID3D12VideoDecoder_Impl::GetDesc(this)
}
}
Self { base__: super::super::Graphics::Direct3D12::ID3D12Pageable_Vtbl::new::<Identity, OFFSET>(), GetDesc: GetDesc::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ID3D12VideoDecoder as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Pageable as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl windows_core::RuntimeName for ID3D12VideoDecoder {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::define_interface!(ID3D12VideoDecoder1, ID3D12VideoDecoder1_Vtbl, 0x79a2e5fb_ccd2_469a_9fde_195d10951f7e);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl core::ops::Deref for ID3D12VideoDecoder1 {
type Target = ID3D12VideoDecoder;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::interface_hierarchy!(ID3D12VideoDecoder1, windows_core::IUnknown, super::super::Graphics::Direct3D12::ID3D12Object, super::super::Graphics::Direct3D12::ID3D12DeviceChild, super::super::Graphics::Direct3D12::ID3D12Pageable, ID3D12VideoDecoder);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoDecoder1 {
pub unsafe fn GetProtectedResourceSession<T>(&self, result__: *mut Option<T>) -> windows_core::Result<()>
where
T: windows_core::Interface,
{
unsafe { (windows_core::Interface::vtable(self).GetProtectedResourceSession)(windows_core::Interface::as_raw(self), &T::IID, result__ as *mut _ as *mut _).ok() }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[repr(C)]
#[doc(hidden)]
pub struct ID3D12VideoDecoder1_Vtbl {
pub base__: ID3D12VideoDecoder_Vtbl,
pub GetProtectedResourceSession: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Send for ID3D12VideoDecoder1 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Sync for ID3D12VideoDecoder1 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
pub trait ID3D12VideoDecoder1_Impl: ID3D12VideoDecoder_Impl {
fn GetProtectedResourceSession(&self, riid: *const windows_core::GUID, ppprotectedsession: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoDecoder1_Vtbl {
pub const fn new<Identity: ID3D12VideoDecoder1_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetProtectedResourceSession<Identity: ID3D12VideoDecoder1_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppprotectedsession: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDecoder1_Impl::GetProtectedResourceSession(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppprotectedsession)).into()
}
}
Self { base__: ID3D12VideoDecoder_Vtbl::new::<Identity, OFFSET>(), GetProtectedResourceSession: GetProtectedResourceSession::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ID3D12VideoDecoder1 as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Pageable as windows_core::Interface>::IID || iid == &<ID3D12VideoDecoder as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl windows_core::RuntimeName for ID3D12VideoDecoder1 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::define_interface!(ID3D12VideoDecoderHeap, ID3D12VideoDecoderHeap_Vtbl, 0x0946b7c9_ebf6_4047_bb73_8683e27dbb1f);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl core::ops::Deref for ID3D12VideoDecoderHeap {
type Target = super::super::Graphics::Direct3D12::ID3D12Pageable;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::interface_hierarchy!(ID3D12VideoDecoderHeap, windows_core::IUnknown, super::super::Graphics::Direct3D12::ID3D12Object, super::super::Graphics::Direct3D12::ID3D12DeviceChild, super::super::Graphics::Direct3D12::ID3D12Pageable);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoDecoderHeap {
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
pub unsafe fn GetDesc(&self) -> D3D12_VIDEO_DECODER_HEAP_DESC {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), &mut result__);
result__
}
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[repr(C)]
#[doc(hidden)]
pub struct ID3D12VideoDecoderHeap_Vtbl {
pub base__: super::super::Graphics::Direct3D12::ID3D12Pageable_Vtbl,
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
pub GetDesc: unsafe extern "system" fn(*mut core::ffi::c_void, *mut D3D12_VIDEO_DECODER_HEAP_DESC),
#[cfg(not(feature = "Win32_Graphics_Dxgi_Common"))]
GetDesc: usize,
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Send for ID3D12VideoDecoderHeap {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Sync for ID3D12VideoDecoderHeap {}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoDecoderHeap_Impl: super::super::Graphics::Direct3D12::ID3D12Pageable_Impl {
fn GetDesc(&self) -> D3D12_VIDEO_DECODER_HEAP_DESC;
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoDecoderHeap_Vtbl {
pub const fn new<Identity: ID3D12VideoDecoderHeap_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetDesc<Identity: ID3D12VideoDecoderHeap_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut D3D12_VIDEO_DECODER_HEAP_DESC) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
*result__ = ID3D12VideoDecoderHeap_Impl::GetDesc(this)
}
}
Self { base__: super::super::Graphics::Direct3D12::ID3D12Pageable_Vtbl::new::<Identity, OFFSET>(), GetDesc: GetDesc::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ID3D12VideoDecoderHeap as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Pageable as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl windows_core::RuntimeName for ID3D12VideoDecoderHeap {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::define_interface!(ID3D12VideoDecoderHeap1, ID3D12VideoDecoderHeap1_Vtbl, 0xda1d98c5_539f_41b2_bf6b_1198a03b6d26);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl core::ops::Deref for ID3D12VideoDecoderHeap1 {
type Target = ID3D12VideoDecoderHeap;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::interface_hierarchy!(ID3D12VideoDecoderHeap1, windows_core::IUnknown, super::super::Graphics::Direct3D12::ID3D12Object, super::super::Graphics::Direct3D12::ID3D12DeviceChild, super::super::Graphics::Direct3D12::ID3D12Pageable, ID3D12VideoDecoderHeap);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoDecoderHeap1 {
pub unsafe fn GetProtectedResourceSession<T>(&self, result__: *mut Option<T>) -> windows_core::Result<()>
where
T: windows_core::Interface,
{
unsafe { (windows_core::Interface::vtable(self).GetProtectedResourceSession)(windows_core::Interface::as_raw(self), &T::IID, result__ as *mut _ as *mut _).ok() }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[repr(C)]
#[doc(hidden)]
pub struct ID3D12VideoDecoderHeap1_Vtbl {
pub base__: ID3D12VideoDecoderHeap_Vtbl,
pub GetProtectedResourceSession: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Send for ID3D12VideoDecoderHeap1 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Sync for ID3D12VideoDecoderHeap1 {}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoDecoderHeap1_Impl: ID3D12VideoDecoderHeap_Impl {
fn GetProtectedResourceSession(&self, riid: *const windows_core::GUID, ppprotectedsession: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoDecoderHeap1_Vtbl {
pub const fn new<Identity: ID3D12VideoDecoderHeap1_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetProtectedResourceSession<Identity: ID3D12VideoDecoderHeap1_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppprotectedsession: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDecoderHeap1_Impl::GetProtectedResourceSession(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppprotectedsession)).into()
}
}
Self { base__: ID3D12VideoDecoderHeap_Vtbl::new::<Identity, OFFSET>(), GetProtectedResourceSession: GetProtectedResourceSession::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ID3D12VideoDecoderHeap1 as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Pageable as windows_core::Interface>::IID || iid == &<ID3D12VideoDecoderHeap as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl windows_core::RuntimeName for ID3D12VideoDecoderHeap1 {}
windows_core::imp::define_interface!(ID3D12VideoDevice, ID3D12VideoDevice_Vtbl, 0x1f052807_0b46_4acc_8a89_364f793718a4);
windows_core::imp::interface_hierarchy!(ID3D12VideoDevice, windows_core::IUnknown);
impl ID3D12VideoDevice {
pub unsafe fn CheckFeatureSupport(&self, featurevideo: D3D12_FEATURE_VIDEO, pfeaturesupportdata: *mut core::ffi::c_void, featuresupportdatasize: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).CheckFeatureSupport)(windows_core::Interface::as_raw(self), featurevideo, pfeaturesupportdata as _, featuresupportdatasize).ok() }
}
pub unsafe fn CreateVideoDecoder<T>(&self, pdesc: *const D3D12_VIDEO_DECODER_DESC) -> windows_core::Result<T>
where
T: windows_core::Interface,
{
let mut result__ = core::ptr::null_mut();
unsafe { (windows_core::Interface::vtable(self).CreateVideoDecoder)(windows_core::Interface::as_raw(self), pdesc, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) }
}
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
pub unsafe fn CreateVideoDecoderHeap<T>(&self, pvideodecoderheapdesc: *const D3D12_VIDEO_DECODER_HEAP_DESC) -> windows_core::Result<T>
where
T: windows_core::Interface,
{
let mut result__ = core::ptr::null_mut();
unsafe { (windows_core::Interface::vtable(self).CreateVideoDecoderHeap)(windows_core::Interface::as_raw(self), pvideodecoderheapdesc, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) }
}
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
pub unsafe fn CreateVideoProcessor<T>(&self, nodemask: u32, poutputstreamdesc: *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC, pinputstreamdescs: &[D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC]) -> windows_core::Result<T>
where
T: windows_core::Interface,
{
let mut result__ = core::ptr::null_mut();
unsafe { (windows_core::Interface::vtable(self).CreateVideoProcessor)(windows_core::Interface::as_raw(self), nodemask, poutputstreamdesc, pinputstreamdescs.len().try_into().unwrap(), core::mem::transmute(pinputstreamdescs.as_ptr()), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct ID3D12VideoDevice_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub CheckFeatureSupport: unsafe extern "system" fn(*mut core::ffi::c_void, D3D12_FEATURE_VIDEO, *mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub CreateVideoDecoder: unsafe extern "system" fn(*mut core::ffi::c_void, *const D3D12_VIDEO_DECODER_DESC, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
pub CreateVideoDecoderHeap: unsafe extern "system" fn(*mut core::ffi::c_void, *const D3D12_VIDEO_DECODER_HEAP_DESC, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Dxgi_Common"))]
CreateVideoDecoderHeap: usize,
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
pub CreateVideoProcessor: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC, u32, *const D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Dxgi_Common"))]
CreateVideoProcessor: usize,
}
unsafe impl Send for ID3D12VideoDevice {}
unsafe impl Sync for ID3D12VideoDevice {}
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
pub trait ID3D12VideoDevice_Impl: windows_core::IUnknownImpl {
fn CheckFeatureSupport(&self, featurevideo: D3D12_FEATURE_VIDEO, pfeaturesupportdata: *mut core::ffi::c_void, featuresupportdatasize: u32) -> windows_core::Result<()>;
fn CreateVideoDecoder(&self, pdesc: *const D3D12_VIDEO_DECODER_DESC, riid: *const windows_core::GUID, ppvideodecoder: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
fn CreateVideoDecoderHeap(&self, pvideodecoderheapdesc: *const D3D12_VIDEO_DECODER_HEAP_DESC, riid: *const windows_core::GUID, ppvideodecoderheap: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
fn CreateVideoProcessor(&self, nodemask: u32, poutputstreamdesc: *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC, numinputstreamdescs: u32, pinputstreamdescs: *const D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC, riid: *const windows_core::GUID, ppvideoprocessor: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
}
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
impl ID3D12VideoDevice_Vtbl {
pub const fn new<Identity: ID3D12VideoDevice_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CheckFeatureSupport<Identity: ID3D12VideoDevice_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, featurevideo: D3D12_FEATURE_VIDEO, pfeaturesupportdata: *mut core::ffi::c_void, featuresupportdatasize: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDevice_Impl::CheckFeatureSupport(this, core::mem::transmute_copy(&featurevideo), core::mem::transmute_copy(&pfeaturesupportdata), core::mem::transmute_copy(&featuresupportdatasize)).into()
}
}
unsafe extern "system" fn CreateVideoDecoder<Identity: ID3D12VideoDevice_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdesc: *const D3D12_VIDEO_DECODER_DESC, riid: *const windows_core::GUID, ppvideodecoder: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDevice_Impl::CreateVideoDecoder(this, core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvideodecoder)).into()
}
}
unsafe extern "system" fn CreateVideoDecoderHeap<Identity: ID3D12VideoDevice_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pvideodecoderheapdesc: *const D3D12_VIDEO_DECODER_HEAP_DESC, riid: *const windows_core::GUID, ppvideodecoderheap: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDevice_Impl::CreateVideoDecoderHeap(this, core::mem::transmute_copy(&pvideodecoderheapdesc), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvideodecoderheap)).into()
}
}
unsafe extern "system" fn CreateVideoProcessor<Identity: ID3D12VideoDevice_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, nodemask: u32, poutputstreamdesc: *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC, numinputstreamdescs: u32, pinputstreamdescs: *const D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC, riid: *const windows_core::GUID, ppvideoprocessor: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDevice_Impl::CreateVideoProcessor(this, core::mem::transmute_copy(&nodemask), core::mem::transmute_copy(&poutputstreamdesc), core::mem::transmute_copy(&numinputstreamdescs), core::mem::transmute_copy(&pinputstreamdescs), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvideoprocessor)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CheckFeatureSupport: CheckFeatureSupport::<Identity, OFFSET>,
CreateVideoDecoder: CreateVideoDecoder::<Identity, OFFSET>,
CreateVideoDecoderHeap: CreateVideoDecoderHeap::<Identity, OFFSET>,
CreateVideoProcessor: CreateVideoProcessor::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ID3D12VideoDevice as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
impl windows_core::RuntimeName for ID3D12VideoDevice {}
windows_core::imp::define_interface!(ID3D12VideoDevice1, ID3D12VideoDevice1_Vtbl, 0x981611ad_a144_4c83_9890_f30e26d658ab);
impl core::ops::Deref for ID3D12VideoDevice1 {
type Target = ID3D12VideoDevice;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(ID3D12VideoDevice1, windows_core::IUnknown, ID3D12VideoDevice);
impl ID3D12VideoDevice1 {
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub unsafe fn CreateVideoMotionEstimator<P1, T>(&self, pdesc: *const D3D12_VIDEO_MOTION_ESTIMATOR_DESC, pprotectedresourcesession: P1) -> windows_core::Result<T>
where
P1: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>,
T: windows_core::Interface,
{
let mut result__ = core::ptr::null_mut();
unsafe { (windows_core::Interface::vtable(self).CreateVideoMotionEstimator)(windows_core::Interface::as_raw(self), pdesc, pprotectedresourcesession.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) }
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub unsafe fn CreateVideoMotionVectorHeap<P1, T>(&self, pdesc: *const D3D12_VIDEO_MOTION_VECTOR_HEAP_DESC, pprotectedresourcesession: P1) -> windows_core::Result<T>
where
P1: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>,
T: windows_core::Interface,
{
let mut result__ = core::ptr::null_mut();
unsafe { (windows_core::Interface::vtable(self).CreateVideoMotionVectorHeap)(windows_core::Interface::as_raw(self), pdesc, pprotectedresourcesession.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct ID3D12VideoDevice1_Vtbl {
pub base__: ID3D12VideoDevice_Vtbl,
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub CreateVideoMotionEstimator: unsafe extern "system" fn(*mut core::ffi::c_void, *const D3D12_VIDEO_MOTION_ESTIMATOR_DESC, *mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common")))]
CreateVideoMotionEstimator: usize,
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub CreateVideoMotionVectorHeap: unsafe extern "system" fn(*mut core::ffi::c_void, *const D3D12_VIDEO_MOTION_VECTOR_HEAP_DESC, *mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common")))]
CreateVideoMotionVectorHeap: usize,
}
unsafe impl Send for ID3D12VideoDevice1 {}
unsafe impl Sync for ID3D12VideoDevice1 {}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoDevice1_Impl: ID3D12VideoDevice_Impl {
fn CreateVideoMotionEstimator(&self, pdesc: *const D3D12_VIDEO_MOTION_ESTIMATOR_DESC, pprotectedresourcesession: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>, riid: *const windows_core::GUID, ppvideomotionestimator: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
fn CreateVideoMotionVectorHeap(&self, pdesc: *const D3D12_VIDEO_MOTION_VECTOR_HEAP_DESC, pprotectedresourcesession: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>, riid: *const windows_core::GUID, ppvideomotionvectorheap: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoDevice1_Vtbl {
pub const fn new<Identity: ID3D12VideoDevice1_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateVideoMotionEstimator<Identity: ID3D12VideoDevice1_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdesc: *const D3D12_VIDEO_MOTION_ESTIMATOR_DESC, pprotectedresourcesession: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvideomotionestimator: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDevice1_Impl::CreateVideoMotionEstimator(this, core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&pprotectedresourcesession), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvideomotionestimator)).into()
}
}
unsafe extern "system" fn CreateVideoMotionVectorHeap<Identity: ID3D12VideoDevice1_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdesc: *const D3D12_VIDEO_MOTION_VECTOR_HEAP_DESC, pprotectedresourcesession: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvideomotionvectorheap: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDevice1_Impl::CreateVideoMotionVectorHeap(this, core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&pprotectedresourcesession), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvideomotionvectorheap)).into()
}
}
Self {
base__: ID3D12VideoDevice_Vtbl::new::<Identity, OFFSET>(),
CreateVideoMotionEstimator: CreateVideoMotionEstimator::<Identity, OFFSET>,
CreateVideoMotionVectorHeap: CreateVideoMotionVectorHeap::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ID3D12VideoDevice1 as windows_core::Interface>::IID || iid == &<ID3D12VideoDevice as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl windows_core::RuntimeName for ID3D12VideoDevice1 {}
windows_core::imp::define_interface!(ID3D12VideoDevice2, ID3D12VideoDevice2_Vtbl, 0xf019ac49_f838_4a95_9b17_579437c8f513);
impl core::ops::Deref for ID3D12VideoDevice2 {
type Target = ID3D12VideoDevice1;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(ID3D12VideoDevice2, windows_core::IUnknown, ID3D12VideoDevice, ID3D12VideoDevice1);
impl ID3D12VideoDevice2 {
#[cfg(feature = "Win32_Graphics_Direct3D12")]
pub unsafe fn CreateVideoDecoder1<P1, T>(&self, pdesc: *const D3D12_VIDEO_DECODER_DESC, pprotectedresourcesession: P1) -> windows_core::Result<T>
where
P1: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>,
T: windows_core::Interface,
{
let mut result__ = core::ptr::null_mut();
unsafe { (windows_core::Interface::vtable(self).CreateVideoDecoder1)(windows_core::Interface::as_raw(self), pdesc, pprotectedresourcesession.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) }
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub unsafe fn CreateVideoDecoderHeap1<P1, T>(&self, pvideodecoderheapdesc: *const D3D12_VIDEO_DECODER_HEAP_DESC, pprotectedresourcesession: P1) -> windows_core::Result<T>
where
P1: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>,
T: windows_core::Interface,
{
let mut result__ = core::ptr::null_mut();
unsafe { (windows_core::Interface::vtable(self).CreateVideoDecoderHeap1)(windows_core::Interface::as_raw(self), pvideodecoderheapdesc, pprotectedresourcesession.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) }
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub unsafe fn CreateVideoProcessor1<P4, T>(&self, nodemask: u32, poutputstreamdesc: *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC, pinputstreamdescs: &[D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC], pprotectedresourcesession: P4) -> windows_core::Result<T>
where
P4: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>,
T: windows_core::Interface,
{
let mut result__ = core::ptr::null_mut();
unsafe { (windows_core::Interface::vtable(self).CreateVideoProcessor1)(windows_core::Interface::as_raw(self), nodemask, poutputstreamdesc, pinputstreamdescs.len().try_into().unwrap(), core::mem::transmute(pinputstreamdescs.as_ptr()), pprotectedresourcesession.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) }
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
pub unsafe fn CreateVideoExtensionCommand<P3, T>(&self, pdesc: *const D3D12_VIDEO_EXTENSION_COMMAND_DESC, pcreationparameters: *const core::ffi::c_void, creationparametersdatasizeinbytes: usize, pprotectedresourcesession: P3) -> windows_core::Result<T>
where
P3: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>,
T: windows_core::Interface,
{
let mut result__ = core::ptr::null_mut();
unsafe { (windows_core::Interface::vtable(self).CreateVideoExtensionCommand)(windows_core::Interface::as_raw(self), pdesc, pcreationparameters, creationparametersdatasizeinbytes, pprotectedresourcesession.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) }
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
pub unsafe fn ExecuteExtensionCommand<P0>(&self, pextensioncommand: P0, pexecutionparameters: *const core::ffi::c_void, executionparameterssizeinbytes: usize, poutputdata: *mut core::ffi::c_void, outputdatasizeinbytes: usize) -> windows_core::Result<()>
where
P0: windows_core::Param<ID3D12VideoExtensionCommand>,
{
unsafe { (windows_core::Interface::vtable(self).ExecuteExtensionCommand)(windows_core::Interface::as_raw(self), pextensioncommand.param().abi(), pexecutionparameters, executionparameterssizeinbytes, poutputdata as _, outputdatasizeinbytes).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct ID3D12VideoDevice2_Vtbl {
pub base__: ID3D12VideoDevice1_Vtbl,
#[cfg(feature = "Win32_Graphics_Direct3D12")]
pub CreateVideoDecoder1: unsafe extern "system" fn(*mut core::ffi::c_void, *const D3D12_VIDEO_DECODER_DESC, *mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D12"))]
CreateVideoDecoder1: usize,
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub CreateVideoDecoderHeap1: unsafe extern "system" fn(*mut core::ffi::c_void, *const D3D12_VIDEO_DECODER_HEAP_DESC, *mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common")))]
CreateVideoDecoderHeap1: usize,
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub CreateVideoProcessor1: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC, u32, *const D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC, *mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common")))]
CreateVideoProcessor1: usize,
#[cfg(feature = "Win32_Graphics_Direct3D12")]
pub CreateVideoExtensionCommand: unsafe extern "system" fn(*mut core::ffi::c_void, *const D3D12_VIDEO_EXTENSION_COMMAND_DESC, *const core::ffi::c_void, usize, *mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D12"))]
CreateVideoExtensionCommand: usize,
#[cfg(feature = "Win32_Graphics_Direct3D12")]
pub ExecuteExtensionCommand: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const core::ffi::c_void, usize, *mut core::ffi::c_void, usize) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D12"))]
ExecuteExtensionCommand: usize,
}
unsafe impl Send for ID3D12VideoDevice2 {}
unsafe impl Sync for ID3D12VideoDevice2 {}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoDevice2_Impl: ID3D12VideoDevice1_Impl {
fn CreateVideoDecoder1(&self, pdesc: *const D3D12_VIDEO_DECODER_DESC, pprotectedresourcesession: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>, riid: *const windows_core::GUID, ppvideodecoder: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
fn CreateVideoDecoderHeap1(&self, pvideodecoderheapdesc: *const D3D12_VIDEO_DECODER_HEAP_DESC, pprotectedresourcesession: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>, riid: *const windows_core::GUID, ppvideodecoderheap: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
fn CreateVideoProcessor1(&self, nodemask: u32, poutputstreamdesc: *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC, numinputstreamdescs: u32, pinputstreamdescs: *const D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC, pprotectedresourcesession: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>, riid: *const windows_core::GUID, ppvideoprocessor: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
fn CreateVideoExtensionCommand(&self, pdesc: *const D3D12_VIDEO_EXTENSION_COMMAND_DESC, pcreationparameters: *const core::ffi::c_void, creationparametersdatasizeinbytes: usize, pprotectedresourcesession: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>, riid: *const windows_core::GUID, ppvideoextensioncommand: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
fn ExecuteExtensionCommand(&self, pextensioncommand: windows_core::Ref<ID3D12VideoExtensionCommand>, pexecutionparameters: *const core::ffi::c_void, executionparameterssizeinbytes: usize, poutputdata: *mut core::ffi::c_void, outputdatasizeinbytes: usize) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoDevice2_Vtbl {
pub const fn new<Identity: ID3D12VideoDevice2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateVideoDecoder1<Identity: ID3D12VideoDevice2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdesc: *const D3D12_VIDEO_DECODER_DESC, pprotectedresourcesession: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvideodecoder: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDevice2_Impl::CreateVideoDecoder1(this, core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&pprotectedresourcesession), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvideodecoder)).into()
}
}
unsafe extern "system" fn CreateVideoDecoderHeap1<Identity: ID3D12VideoDevice2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pvideodecoderheapdesc: *const D3D12_VIDEO_DECODER_HEAP_DESC, pprotectedresourcesession: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvideodecoderheap: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDevice2_Impl::CreateVideoDecoderHeap1(this, core::mem::transmute_copy(&pvideodecoderheapdesc), core::mem::transmute_copy(&pprotectedresourcesession), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvideodecoderheap)).into()
}
}
unsafe extern "system" fn CreateVideoProcessor1<Identity: ID3D12VideoDevice2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, nodemask: u32, poutputstreamdesc: *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC, numinputstreamdescs: u32, pinputstreamdescs: *const D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC, pprotectedresourcesession: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvideoprocessor: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDevice2_Impl::CreateVideoProcessor1(this, core::mem::transmute_copy(&nodemask), core::mem::transmute_copy(&poutputstreamdesc), core::mem::transmute_copy(&numinputstreamdescs), core::mem::transmute_copy(&pinputstreamdescs), core::mem::transmute_copy(&pprotectedresourcesession), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvideoprocessor)).into()
}
}
unsafe extern "system" fn CreateVideoExtensionCommand<Identity: ID3D12VideoDevice2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdesc: *const D3D12_VIDEO_EXTENSION_COMMAND_DESC, pcreationparameters: *const core::ffi::c_void, creationparametersdatasizeinbytes: usize, pprotectedresourcesession: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvideoextensioncommand: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDevice2_Impl::CreateVideoExtensionCommand(this, core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&pcreationparameters), core::mem::transmute_copy(&creationparametersdatasizeinbytes), core::mem::transmute_copy(&pprotectedresourcesession), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvideoextensioncommand)).into()
}
}
unsafe extern "system" fn ExecuteExtensionCommand<Identity: ID3D12VideoDevice2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pextensioncommand: *mut core::ffi::c_void, pexecutionparameters: *const core::ffi::c_void, executionparameterssizeinbytes: usize, poutputdata: *mut core::ffi::c_void, outputdatasizeinbytes: usize) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDevice2_Impl::ExecuteExtensionCommand(this, core::mem::transmute_copy(&pextensioncommand), core::mem::transmute_copy(&pexecutionparameters), core::mem::transmute_copy(&executionparameterssizeinbytes), core::mem::transmute_copy(&poutputdata), core::mem::transmute_copy(&outputdatasizeinbytes)).into()
}
}
Self {
base__: ID3D12VideoDevice1_Vtbl::new::<Identity, OFFSET>(),
CreateVideoDecoder1: CreateVideoDecoder1::<Identity, OFFSET>,
CreateVideoDecoderHeap1: CreateVideoDecoderHeap1::<Identity, OFFSET>,
CreateVideoProcessor1: CreateVideoProcessor1::<Identity, OFFSET>,
CreateVideoExtensionCommand: CreateVideoExtensionCommand::<Identity, OFFSET>,
ExecuteExtensionCommand: ExecuteExtensionCommand::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ID3D12VideoDevice2 as windows_core::Interface>::IID || iid == &<ID3D12VideoDevice as windows_core::Interface>::IID || iid == &<ID3D12VideoDevice1 as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl windows_core::RuntimeName for ID3D12VideoDevice2 {}
windows_core::imp::define_interface!(ID3D12VideoDevice3, ID3D12VideoDevice3_Vtbl, 0x4243adb4_3a32_4666_973c_0ccc5625dc44);
impl core::ops::Deref for ID3D12VideoDevice3 {
type Target = ID3D12VideoDevice2;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(ID3D12VideoDevice3, windows_core::IUnknown, ID3D12VideoDevice, ID3D12VideoDevice1, ID3D12VideoDevice2);
impl ID3D12VideoDevice3 {
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
pub unsafe fn CreateVideoEncoder<T>(&self, pdesc: *const D3D12_VIDEO_ENCODER_DESC) -> windows_core::Result<T>
where
T: windows_core::Interface,
{
let mut result__ = core::ptr::null_mut();
unsafe { (windows_core::Interface::vtable(self).CreateVideoEncoder)(windows_core::Interface::as_raw(self), pdesc, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) }
}
pub unsafe fn CreateVideoEncoderHeap<T>(&self, pdesc: *const D3D12_VIDEO_ENCODER_HEAP_DESC) -> windows_core::Result<T>
where
T: windows_core::Interface,
{
let mut result__ = core::ptr::null_mut();
unsafe { (windows_core::Interface::vtable(self).CreateVideoEncoderHeap)(windows_core::Interface::as_raw(self), pdesc, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct ID3D12VideoDevice3_Vtbl {
pub base__: ID3D12VideoDevice2_Vtbl,
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
pub CreateVideoEncoder: unsafe extern "system" fn(*mut core::ffi::c_void, *const D3D12_VIDEO_ENCODER_DESC, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Dxgi_Common"))]
CreateVideoEncoder: usize,
pub CreateVideoEncoderHeap: unsafe extern "system" fn(*mut core::ffi::c_void, *const D3D12_VIDEO_ENCODER_HEAP_DESC, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
unsafe impl Send for ID3D12VideoDevice3 {}
unsafe impl Sync for ID3D12VideoDevice3 {}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoDevice3_Impl: ID3D12VideoDevice2_Impl {
fn CreateVideoEncoder(&self, pdesc: *const D3D12_VIDEO_ENCODER_DESC, riid: *const windows_core::GUID, ppvideoencoder: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
fn CreateVideoEncoderHeap(&self, pdesc: *const D3D12_VIDEO_ENCODER_HEAP_DESC, riid: *const windows_core::GUID, ppvideoencoderheap: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoDevice3_Vtbl {
pub const fn new<Identity: ID3D12VideoDevice3_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateVideoEncoder<Identity: ID3D12VideoDevice3_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdesc: *const D3D12_VIDEO_ENCODER_DESC, riid: *const windows_core::GUID, ppvideoencoder: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDevice3_Impl::CreateVideoEncoder(this, core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvideoencoder)).into()
}
}
unsafe extern "system" fn CreateVideoEncoderHeap<Identity: ID3D12VideoDevice3_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdesc: *const D3D12_VIDEO_ENCODER_HEAP_DESC, riid: *const windows_core::GUID, ppvideoencoderheap: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoDevice3_Impl::CreateVideoEncoderHeap(this, core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvideoencoderheap)).into()
}
}
Self {
base__: ID3D12VideoDevice2_Vtbl::new::<Identity, OFFSET>(),
CreateVideoEncoder: CreateVideoEncoder::<Identity, OFFSET>,
CreateVideoEncoderHeap: CreateVideoEncoderHeap::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ID3D12VideoDevice3 as windows_core::Interface>::IID || iid == &<ID3D12VideoDevice as windows_core::Interface>::IID || iid == &<ID3D12VideoDevice1 as windows_core::Interface>::IID || iid == &<ID3D12VideoDevice2 as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl windows_core::RuntimeName for ID3D12VideoDevice3 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::define_interface!(ID3D12VideoEncodeCommandList, ID3D12VideoEncodeCommandList_Vtbl, 0x8455293a_0cbd_4831_9b39_fbdbab724723);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl core::ops::Deref for ID3D12VideoEncodeCommandList {
type Target = super::super::Graphics::Direct3D12::ID3D12CommandList;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::interface_hierarchy!(ID3D12VideoEncodeCommandList, windows_core::IUnknown, super::super::Graphics::Direct3D12::ID3D12Object, super::super::Graphics::Direct3D12::ID3D12DeviceChild, super::super::Graphics::Direct3D12::ID3D12CommandList);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoEncodeCommandList {
pub unsafe fn Close(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn Reset<P0>(&self, pallocator: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12CommandAllocator>,
{
unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self), pallocator.param().abi()).ok() }
}
pub unsafe fn ClearState(&self) {
unsafe { (windows_core::Interface::vtable(self).ClearState)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn ResourceBarrier(&self, pbarriers: &[super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER]) {
unsafe { (windows_core::Interface::vtable(self).ResourceBarrier)(windows_core::Interface::as_raw(self), pbarriers.len().try_into().unwrap(), core::mem::transmute(pbarriers.as_ptr())) }
}
pub unsafe fn DiscardResource<P0>(&self, presource: P0, pregion: Option<*const super::super::Graphics::Direct3D12::D3D12_DISCARD_REGION>)
where
P0: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12Resource>,
{
unsafe { (windows_core::Interface::vtable(self).DiscardResource)(windows_core::Interface::as_raw(self), presource.param().abi(), pregion.unwrap_or(core::mem::zeroed()) as _) }
}
pub unsafe fn BeginQuery<P0>(&self, pqueryheap: P0, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32)
where
P0: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12QueryHeap>,
{
unsafe { (windows_core::Interface::vtable(self).BeginQuery)(windows_core::Interface::as_raw(self), pqueryheap.param().abi(), r#type, index) }
}
pub unsafe fn EndQuery<P0>(&self, pqueryheap: P0, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32)
where
P0: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12QueryHeap>,
{
unsafe { (windows_core::Interface::vtable(self).EndQuery)(windows_core::Interface::as_raw(self), pqueryheap.param().abi(), r#type, index) }
}
pub unsafe fn ResolveQueryData<P0, P4>(&self, pqueryheap: P0, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, startindex: u32, numqueries: u32, pdestinationbuffer: P4, aligneddestinationbufferoffset: u64)
where
P0: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12QueryHeap>,
P4: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12Resource>,
{
unsafe { (windows_core::Interface::vtable(self).ResolveQueryData)(windows_core::Interface::as_raw(self), pqueryheap.param().abi(), r#type, startindex, numqueries, pdestinationbuffer.param().abi(), aligneddestinationbufferoffset) }
}
pub unsafe fn SetPredication<P0>(&self, pbuffer: P0, alignedbufferoffset: u64, operation: super::super::Graphics::Direct3D12::D3D12_PREDICATION_OP)
where
P0: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12Resource>,
{
unsafe { (windows_core::Interface::vtable(self).SetPredication)(windows_core::Interface::as_raw(self), pbuffer.param().abi(), alignedbufferoffset, operation) }
}
pub unsafe fn SetMarker(&self, metadata: u32, pdata: Option<*const core::ffi::c_void>, size: u32) {
unsafe { (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), metadata, pdata.unwrap_or(core::mem::zeroed()) as _, size) }
}
pub unsafe fn BeginEvent(&self, metadata: u32, pdata: Option<*const core::ffi::c_void>, size: u32) {
unsafe { (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), metadata, pdata.unwrap_or(core::mem::zeroed()) as _, size) }
}
pub unsafe fn EndEvent(&self) {
unsafe { (windows_core::Interface::vtable(self).EndEvent)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn EstimateMotion<P0>(&self, pmotionestimator: P0, poutputarguments: *const D3D12_VIDEO_MOTION_ESTIMATOR_OUTPUT, pinputarguments: *const D3D12_VIDEO_MOTION_ESTIMATOR_INPUT)
where
P0: windows_core::Param<ID3D12VideoMotionEstimator>,
{
unsafe { (windows_core::Interface::vtable(self).EstimateMotion)(windows_core::Interface::as_raw(self), pmotionestimator.param().abi(), core::mem::transmute(poutputarguments), core::mem::transmute(pinputarguments)) }
}
pub unsafe fn ResolveMotionVectorHeap(&self, poutputarguments: *const D3D12_RESOLVE_VIDEO_MOTION_VECTOR_HEAP_OUTPUT, pinputarguments: *const D3D12_RESOLVE_VIDEO_MOTION_VECTOR_HEAP_INPUT) {
unsafe { (windows_core::Interface::vtable(self).ResolveMotionVectorHeap)(windows_core::Interface::as_raw(self), core::mem::transmute(poutputarguments), core::mem::transmute(pinputarguments)) }
}
pub unsafe fn WriteBufferImmediate(&self, count: u32, pparams: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_PARAMETER, pmodes: Option<*const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_MODE>) {
unsafe { (windows_core::Interface::vtable(self).WriteBufferImmediate)(windows_core::Interface::as_raw(self), count, pparams, pmodes.unwrap_or(core::mem::zeroed()) as _) }
}
pub unsafe fn SetProtectedResourceSession<P0>(&self, pprotectedresourcesession: P0)
where
P0: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>,
{
unsafe { (windows_core::Interface::vtable(self).SetProtectedResourceSession)(windows_core::Interface::as_raw(self), pprotectedresourcesession.param().abi()) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[repr(C)]
#[doc(hidden)]
pub struct ID3D12VideoEncodeCommandList_Vtbl {
pub base__: super::super::Graphics::Direct3D12::ID3D12CommandList_Vtbl,
pub Close: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Reset: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ClearState: unsafe extern "system" fn(*mut core::ffi::c_void),
pub ResourceBarrier: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER),
pub DiscardResource: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const super::super::Graphics::Direct3D12::D3D12_DISCARD_REGION),
pub BeginQuery: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, u32),
pub EndQuery: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, u32),
pub ResolveQueryData: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, u32, u32, *mut core::ffi::c_void, u64),
pub SetPredication: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u64, super::super::Graphics::Direct3D12::D3D12_PREDICATION_OP),
pub SetMarker: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const core::ffi::c_void, u32),
pub BeginEvent: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const core::ffi::c_void, u32),
pub EndEvent: unsafe extern "system" fn(*mut core::ffi::c_void),
pub EstimateMotion: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const D3D12_VIDEO_MOTION_ESTIMATOR_OUTPUT, *const D3D12_VIDEO_MOTION_ESTIMATOR_INPUT),
pub ResolveMotionVectorHeap: unsafe extern "system" fn(*mut core::ffi::c_void, *const D3D12_RESOLVE_VIDEO_MOTION_VECTOR_HEAP_OUTPUT, *const D3D12_RESOLVE_VIDEO_MOTION_VECTOR_HEAP_INPUT),
pub WriteBufferImmediate: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_PARAMETER, *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_MODE),
pub SetProtectedResourceSession: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void),
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Send for ID3D12VideoEncodeCommandList {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Sync for ID3D12VideoEncodeCommandList {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
pub trait ID3D12VideoEncodeCommandList_Impl: super::super::Graphics::Direct3D12::ID3D12CommandList_Impl {
fn Close(&self) -> windows_core::Result<()>;
fn Reset(&self, pallocator: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12CommandAllocator>) -> windows_core::Result<()>;
fn ClearState(&self);
fn ResourceBarrier(&self, numbarriers: u32, pbarriers: *const super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER);
fn DiscardResource(&self, presource: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12Resource>, pregion: *const super::super::Graphics::Direct3D12::D3D12_DISCARD_REGION);
fn BeginQuery(&self, pqueryheap: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32);
fn EndQuery(&self, pqueryheap: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32);
fn ResolveQueryData(&self, pqueryheap: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, startindex: u32, numqueries: u32, pdestinationbuffer: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12Resource>, aligneddestinationbufferoffset: u64);
fn SetPredication(&self, pbuffer: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12Resource>, alignedbufferoffset: u64, operation: super::super::Graphics::Direct3D12::D3D12_PREDICATION_OP);
fn SetMarker(&self, metadata: u32, pdata: *const core::ffi::c_void, size: u32);
fn BeginEvent(&self, metadata: u32, pdata: *const core::ffi::c_void, size: u32);
fn EndEvent(&self);
fn EstimateMotion(&self, pmotionestimator: windows_core::Ref<ID3D12VideoMotionEstimator>, poutputarguments: *const D3D12_VIDEO_MOTION_ESTIMATOR_OUTPUT, pinputarguments: *const D3D12_VIDEO_MOTION_ESTIMATOR_INPUT);
fn ResolveMotionVectorHeap(&self, poutputarguments: *const D3D12_RESOLVE_VIDEO_MOTION_VECTOR_HEAP_OUTPUT, pinputarguments: *const D3D12_RESOLVE_VIDEO_MOTION_VECTOR_HEAP_INPUT);
fn WriteBufferImmediate(&self, count: u32, pparams: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_PARAMETER, pmodes: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_MODE);
fn SetProtectedResourceSession(&self, pprotectedresourcesession: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>);
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoEncodeCommandList_Vtbl {
pub const fn new<Identity: ID3D12VideoEncodeCommandList_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Close<Identity: ID3D12VideoEncodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncodeCommandList_Impl::Close(this).into()
}
}
unsafe extern "system" fn Reset<Identity: ID3D12VideoEncodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pallocator: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncodeCommandList_Impl::Reset(this, core::mem::transmute_copy(&pallocator)).into()
}
}
unsafe extern "system" fn ClearState<Identity: ID3D12VideoEncodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncodeCommandList_Impl::ClearState(this)
}
}
unsafe extern "system" fn ResourceBarrier<Identity: ID3D12VideoEncodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, numbarriers: u32, pbarriers: *const super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncodeCommandList_Impl::ResourceBarrier(this, core::mem::transmute_copy(&numbarriers), core::mem::transmute_copy(&pbarriers))
}
}
unsafe extern "system" fn DiscardResource<Identity: ID3D12VideoEncodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, pregion: *const super::super::Graphics::Direct3D12::D3D12_DISCARD_REGION) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncodeCommandList_Impl::DiscardResource(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&pregion))
}
}
unsafe extern "system" fn BeginQuery<Identity: ID3D12VideoEncodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pqueryheap: *mut core::ffi::c_void, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncodeCommandList_Impl::BeginQuery(this, core::mem::transmute_copy(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&index))
}
}
unsafe extern "system" fn EndQuery<Identity: ID3D12VideoEncodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pqueryheap: *mut core::ffi::c_void, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncodeCommandList_Impl::EndQuery(this, core::mem::transmute_copy(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&index))
}
}
unsafe extern "system" fn ResolveQueryData<Identity: ID3D12VideoEncodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pqueryheap: *mut core::ffi::c_void, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, startindex: u32, numqueries: u32, pdestinationbuffer: *mut core::ffi::c_void, aligneddestinationbufferoffset: u64) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncodeCommandList_Impl::ResolveQueryData(this, core::mem::transmute_copy(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&startindex), core::mem::transmute_copy(&numqueries), core::mem::transmute_copy(&pdestinationbuffer), core::mem::transmute_copy(&aligneddestinationbufferoffset))
}
}
unsafe extern "system" fn SetPredication<Identity: ID3D12VideoEncodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbuffer: *mut core::ffi::c_void, alignedbufferoffset: u64, operation: super::super::Graphics::Direct3D12::D3D12_PREDICATION_OP) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncodeCommandList_Impl::SetPredication(this, core::mem::transmute_copy(&pbuffer), core::mem::transmute_copy(&alignedbufferoffset), core::mem::transmute_copy(&operation))
}
}
unsafe extern "system" fn SetMarker<Identity: ID3D12VideoEncodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, metadata: u32, pdata: *const core::ffi::c_void, size: u32) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncodeCommandList_Impl::SetMarker(this, core::mem::transmute_copy(&metadata), core::mem::transmute_copy(&pdata), core::mem::transmute_copy(&size))
}
}
unsafe extern "system" fn BeginEvent<Identity: ID3D12VideoEncodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, metadata: u32, pdata: *const core::ffi::c_void, size: u32) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncodeCommandList_Impl::BeginEvent(this, core::mem::transmute_copy(&metadata), core::mem::transmute_copy(&pdata), core::mem::transmute_copy(&size))
}
}
unsafe extern "system" fn EndEvent<Identity: ID3D12VideoEncodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncodeCommandList_Impl::EndEvent(this)
}
}
unsafe extern "system" fn EstimateMotion<Identity: ID3D12VideoEncodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pmotionestimator: *mut core::ffi::c_void, poutputarguments: *const D3D12_VIDEO_MOTION_ESTIMATOR_OUTPUT, pinputarguments: *const D3D12_VIDEO_MOTION_ESTIMATOR_INPUT) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncodeCommandList_Impl::EstimateMotion(this, core::mem::transmute_copy(&pmotionestimator), core::mem::transmute_copy(&poutputarguments), core::mem::transmute_copy(&pinputarguments))
}
}
unsafe extern "system" fn ResolveMotionVectorHeap<Identity: ID3D12VideoEncodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, poutputarguments: *const D3D12_RESOLVE_VIDEO_MOTION_VECTOR_HEAP_OUTPUT, pinputarguments: *const D3D12_RESOLVE_VIDEO_MOTION_VECTOR_HEAP_INPUT) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncodeCommandList_Impl::ResolveMotionVectorHeap(this, core::mem::transmute_copy(&poutputarguments), core::mem::transmute_copy(&pinputarguments))
}
}
unsafe extern "system" fn WriteBufferImmediate<Identity: ID3D12VideoEncodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, count: u32, pparams: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_PARAMETER, pmodes: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_MODE) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncodeCommandList_Impl::WriteBufferImmediate(this, core::mem::transmute_copy(&count), core::mem::transmute_copy(&pparams), core::mem::transmute_copy(&pmodes))
}
}
unsafe extern "system" fn SetProtectedResourceSession<Identity: ID3D12VideoEncodeCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pprotectedresourcesession: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncodeCommandList_Impl::SetProtectedResourceSession(this, core::mem::transmute_copy(&pprotectedresourcesession))
}
}
Self {
base__: super::super::Graphics::Direct3D12::ID3D12CommandList_Vtbl::new::<Identity, OFFSET>(),
Close: Close::<Identity, OFFSET>,
Reset: Reset::<Identity, OFFSET>,
ClearState: ClearState::<Identity, OFFSET>,
ResourceBarrier: ResourceBarrier::<Identity, OFFSET>,
DiscardResource: DiscardResource::<Identity, OFFSET>,
BeginQuery: BeginQuery::<Identity, OFFSET>,
EndQuery: EndQuery::<Identity, OFFSET>,
ResolveQueryData: ResolveQueryData::<Identity, OFFSET>,
SetPredication: SetPredication::<Identity, OFFSET>,
SetMarker: SetMarker::<Identity, OFFSET>,
BeginEvent: BeginEvent::<Identity, OFFSET>,
EndEvent: EndEvent::<Identity, OFFSET>,
EstimateMotion: EstimateMotion::<Identity, OFFSET>,
ResolveMotionVectorHeap: ResolveMotionVectorHeap::<Identity, OFFSET>,
WriteBufferImmediate: WriteBufferImmediate::<Identity, OFFSET>,
SetProtectedResourceSession: SetProtectedResourceSession::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ID3D12VideoEncodeCommandList as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12CommandList as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl windows_core::RuntimeName for ID3D12VideoEncodeCommandList {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::define_interface!(ID3D12VideoEncodeCommandList1, ID3D12VideoEncodeCommandList1_Vtbl, 0x94971eca_2bdb_4769_88cf_3675ea757ebc);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl core::ops::Deref for ID3D12VideoEncodeCommandList1 {
type Target = ID3D12VideoEncodeCommandList;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::interface_hierarchy!(ID3D12VideoEncodeCommandList1, windows_core::IUnknown, super::super::Graphics::Direct3D12::ID3D12Object, super::super::Graphics::Direct3D12::ID3D12DeviceChild, super::super::Graphics::Direct3D12::ID3D12CommandList, ID3D12VideoEncodeCommandList);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoEncodeCommandList1 {
pub unsafe fn InitializeExtensionCommand<P0>(&self, pextensioncommand: P0, pinitializationparameters: *const core::ffi::c_void, initializationparameterssizeinbytes: usize)
where
P0: windows_core::Param<ID3D12VideoExtensionCommand>,
{
unsafe { (windows_core::Interface::vtable(self).InitializeExtensionCommand)(windows_core::Interface::as_raw(self), pextensioncommand.param().abi(), pinitializationparameters, initializationparameterssizeinbytes) }
}
pub unsafe fn ExecuteExtensionCommand<P0>(&self, pextensioncommand: P0, pexecutionparameters: *const core::ffi::c_void, executionparameterssizeinbytes: usize)
where
P0: windows_core::Param<ID3D12VideoExtensionCommand>,
{
unsafe { (windows_core::Interface::vtable(self).ExecuteExtensionCommand)(windows_core::Interface::as_raw(self), pextensioncommand.param().abi(), pexecutionparameters, executionparameterssizeinbytes) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[repr(C)]
#[doc(hidden)]
pub struct ID3D12VideoEncodeCommandList1_Vtbl {
pub base__: ID3D12VideoEncodeCommandList_Vtbl,
pub InitializeExtensionCommand: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const core::ffi::c_void, usize),
pub ExecuteExtensionCommand: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const core::ffi::c_void, usize),
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Send for ID3D12VideoEncodeCommandList1 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Sync for ID3D12VideoEncodeCommandList1 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
pub trait ID3D12VideoEncodeCommandList1_Impl: ID3D12VideoEncodeCommandList_Impl {
fn InitializeExtensionCommand(&self, pextensioncommand: windows_core::Ref<ID3D12VideoExtensionCommand>, pinitializationparameters: *const core::ffi::c_void, initializationparameterssizeinbytes: usize);
fn ExecuteExtensionCommand(&self, pextensioncommand: windows_core::Ref<ID3D12VideoExtensionCommand>, pexecutionparameters: *const core::ffi::c_void, executionparameterssizeinbytes: usize);
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoEncodeCommandList1_Vtbl {
pub const fn new<Identity: ID3D12VideoEncodeCommandList1_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn InitializeExtensionCommand<Identity: ID3D12VideoEncodeCommandList1_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pextensioncommand: *mut core::ffi::c_void, pinitializationparameters: *const core::ffi::c_void, initializationparameterssizeinbytes: usize) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncodeCommandList1_Impl::InitializeExtensionCommand(this, core::mem::transmute_copy(&pextensioncommand), core::mem::transmute_copy(&pinitializationparameters), core::mem::transmute_copy(&initializationparameterssizeinbytes))
}
}
unsafe extern "system" fn ExecuteExtensionCommand<Identity: ID3D12VideoEncodeCommandList1_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pextensioncommand: *mut core::ffi::c_void, pexecutionparameters: *const core::ffi::c_void, executionparameterssizeinbytes: usize) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncodeCommandList1_Impl::ExecuteExtensionCommand(this, core::mem::transmute_copy(&pextensioncommand), core::mem::transmute_copy(&pexecutionparameters), core::mem::transmute_copy(&executionparameterssizeinbytes))
}
}
Self {
base__: ID3D12VideoEncodeCommandList_Vtbl::new::<Identity, OFFSET>(),
InitializeExtensionCommand: InitializeExtensionCommand::<Identity, OFFSET>,
ExecuteExtensionCommand: ExecuteExtensionCommand::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ID3D12VideoEncodeCommandList1 as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12CommandList as windows_core::Interface>::IID || iid == &<ID3D12VideoEncodeCommandList as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl windows_core::RuntimeName for ID3D12VideoEncodeCommandList1 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::define_interface!(ID3D12VideoEncodeCommandList2, ID3D12VideoEncodeCommandList2_Vtbl, 0x895491e2_e701_46a9_9a1f_8d3480ed867a);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl core::ops::Deref for ID3D12VideoEncodeCommandList2 {
type Target = ID3D12VideoEncodeCommandList1;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::interface_hierarchy!(ID3D12VideoEncodeCommandList2, windows_core::IUnknown, super::super::Graphics::Direct3D12::ID3D12Object, super::super::Graphics::Direct3D12::ID3D12DeviceChild, super::super::Graphics::Direct3D12::ID3D12CommandList, ID3D12VideoEncodeCommandList, ID3D12VideoEncodeCommandList1);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoEncodeCommandList2 {
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
pub unsafe fn EncodeFrame<P0, P1>(&self, pencoder: P0, pheap: P1, pinputarguments: *const D3D12_VIDEO_ENCODER_ENCODEFRAME_INPUT_ARGUMENTS, poutputarguments: *const D3D12_VIDEO_ENCODER_ENCODEFRAME_OUTPUT_ARGUMENTS)
where
P0: windows_core::Param<ID3D12VideoEncoder>,
P1: windows_core::Param<ID3D12VideoEncoderHeap>,
{
unsafe { (windows_core::Interface::vtable(self).EncodeFrame)(windows_core::Interface::as_raw(self), pencoder.param().abi(), pheap.param().abi(), core::mem::transmute(pinputarguments), core::mem::transmute(poutputarguments)) }
}
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
pub unsafe fn ResolveEncoderOutputMetadata(&self, pinputarguments: *const D3D12_VIDEO_ENCODER_RESOLVE_METADATA_INPUT_ARGUMENTS, poutputarguments: *const D3D12_VIDEO_ENCODER_RESOLVE_METADATA_OUTPUT_ARGUMENTS) {
unsafe { (windows_core::Interface::vtable(self).ResolveEncoderOutputMetadata)(windows_core::Interface::as_raw(self), core::mem::transmute(pinputarguments), core::mem::transmute(poutputarguments)) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[repr(C)]
#[doc(hidden)]
pub struct ID3D12VideoEncodeCommandList2_Vtbl {
pub base__: ID3D12VideoEncodeCommandList1_Vtbl,
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
pub EncodeFrame: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *const D3D12_VIDEO_ENCODER_ENCODEFRAME_INPUT_ARGUMENTS, *const D3D12_VIDEO_ENCODER_ENCODEFRAME_OUTPUT_ARGUMENTS),
#[cfg(not(feature = "Win32_Graphics_Dxgi_Common"))]
EncodeFrame: usize,
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
pub ResolveEncoderOutputMetadata: unsafe extern "system" fn(*mut core::ffi::c_void, *const D3D12_VIDEO_ENCODER_RESOLVE_METADATA_INPUT_ARGUMENTS, *const D3D12_VIDEO_ENCODER_RESOLVE_METADATA_OUTPUT_ARGUMENTS),
#[cfg(not(feature = "Win32_Graphics_Dxgi_Common"))]
ResolveEncoderOutputMetadata: usize,
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Send for ID3D12VideoEncodeCommandList2 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Sync for ID3D12VideoEncodeCommandList2 {}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoEncodeCommandList2_Impl: ID3D12VideoEncodeCommandList1_Impl {
fn EncodeFrame(&self, pencoder: windows_core::Ref<ID3D12VideoEncoder>, pheap: windows_core::Ref<ID3D12VideoEncoderHeap>, pinputarguments: *const D3D12_VIDEO_ENCODER_ENCODEFRAME_INPUT_ARGUMENTS, poutputarguments: *const D3D12_VIDEO_ENCODER_ENCODEFRAME_OUTPUT_ARGUMENTS);
fn ResolveEncoderOutputMetadata(&self, pinputarguments: *const D3D12_VIDEO_ENCODER_RESOLVE_METADATA_INPUT_ARGUMENTS, poutputarguments: *const D3D12_VIDEO_ENCODER_RESOLVE_METADATA_OUTPUT_ARGUMENTS);
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoEncodeCommandList2_Vtbl {
pub const fn new<Identity: ID3D12VideoEncodeCommandList2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn EncodeFrame<Identity: ID3D12VideoEncodeCommandList2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pencoder: *mut core::ffi::c_void, pheap: *mut core::ffi::c_void, pinputarguments: *const D3D12_VIDEO_ENCODER_ENCODEFRAME_INPUT_ARGUMENTS, poutputarguments: *const D3D12_VIDEO_ENCODER_ENCODEFRAME_OUTPUT_ARGUMENTS) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncodeCommandList2_Impl::EncodeFrame(this, core::mem::transmute_copy(&pencoder), core::mem::transmute_copy(&pheap), core::mem::transmute_copy(&pinputarguments), core::mem::transmute_copy(&poutputarguments))
}
}
unsafe extern "system" fn ResolveEncoderOutputMetadata<Identity: ID3D12VideoEncodeCommandList2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pinputarguments: *const D3D12_VIDEO_ENCODER_RESOLVE_METADATA_INPUT_ARGUMENTS, poutputarguments: *const D3D12_VIDEO_ENCODER_RESOLVE_METADATA_OUTPUT_ARGUMENTS) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncodeCommandList2_Impl::ResolveEncoderOutputMetadata(this, core::mem::transmute_copy(&pinputarguments), core::mem::transmute_copy(&poutputarguments))
}
}
Self {
base__: ID3D12VideoEncodeCommandList1_Vtbl::new::<Identity, OFFSET>(),
EncodeFrame: EncodeFrame::<Identity, OFFSET>,
ResolveEncoderOutputMetadata: ResolveEncoderOutputMetadata::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ID3D12VideoEncodeCommandList2 as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12CommandList as windows_core::Interface>::IID || iid == &<ID3D12VideoEncodeCommandList as windows_core::Interface>::IID || iid == &<ID3D12VideoEncodeCommandList1 as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl windows_core::RuntimeName for ID3D12VideoEncodeCommandList2 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::define_interface!(ID3D12VideoEncodeCommandList3, ID3D12VideoEncodeCommandList3_Vtbl, 0x7f027b22_1515_4e85_aa0d_026486580576);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl core::ops::Deref for ID3D12VideoEncodeCommandList3 {
type Target = ID3D12VideoEncodeCommandList2;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::interface_hierarchy!(ID3D12VideoEncodeCommandList3, windows_core::IUnknown, super::super::Graphics::Direct3D12::ID3D12Object, super::super::Graphics::Direct3D12::ID3D12DeviceChild, super::super::Graphics::Direct3D12::ID3D12CommandList, ID3D12VideoEncodeCommandList, ID3D12VideoEncodeCommandList1, ID3D12VideoEncodeCommandList2);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoEncodeCommandList3 {
pub unsafe fn Barrier(&self, pbarriergroups: &[super::super::Graphics::Direct3D12::D3D12_BARRIER_GROUP]) {
unsafe { (windows_core::Interface::vtable(self).Barrier)(windows_core::Interface::as_raw(self), pbarriergroups.len().try_into().unwrap(), core::mem::transmute(pbarriergroups.as_ptr())) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[repr(C)]
#[doc(hidden)]
pub struct ID3D12VideoEncodeCommandList3_Vtbl {
pub base__: ID3D12VideoEncodeCommandList2_Vtbl,
pub Barrier: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const super::super::Graphics::Direct3D12::D3D12_BARRIER_GROUP),
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Send for ID3D12VideoEncodeCommandList3 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Sync for ID3D12VideoEncodeCommandList3 {}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoEncodeCommandList3_Impl: ID3D12VideoEncodeCommandList2_Impl {
fn Barrier(&self, numbarriergroups: u32, pbarriergroups: *const super::super::Graphics::Direct3D12::D3D12_BARRIER_GROUP);
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoEncodeCommandList3_Vtbl {
pub const fn new<Identity: ID3D12VideoEncodeCommandList3_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Barrier<Identity: ID3D12VideoEncodeCommandList3_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, numbarriergroups: u32, pbarriergroups: *const super::super::Graphics::Direct3D12::D3D12_BARRIER_GROUP) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncodeCommandList3_Impl::Barrier(this, core::mem::transmute_copy(&numbarriergroups), core::mem::transmute_copy(&pbarriergroups))
}
}
Self { base__: ID3D12VideoEncodeCommandList2_Vtbl::new::<Identity, OFFSET>(), Barrier: Barrier::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ID3D12VideoEncodeCommandList3 as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12CommandList as windows_core::Interface>::IID || iid == &<ID3D12VideoEncodeCommandList as windows_core::Interface>::IID || iid == &<ID3D12VideoEncodeCommandList1 as windows_core::Interface>::IID || iid == &<ID3D12VideoEncodeCommandList2 as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl windows_core::RuntimeName for ID3D12VideoEncodeCommandList3 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::define_interface!(ID3D12VideoEncoder, ID3D12VideoEncoder_Vtbl, 0x2e0d212d_8df9_44a6_a770_bb289b182737);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl core::ops::Deref for ID3D12VideoEncoder {
type Target = super::super::Graphics::Direct3D12::ID3D12Pageable;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::interface_hierarchy!(ID3D12VideoEncoder, windows_core::IUnknown, super::super::Graphics::Direct3D12::ID3D12Object, super::super::Graphics::Direct3D12::ID3D12DeviceChild, super::super::Graphics::Direct3D12::ID3D12Pageable);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoEncoder {
pub unsafe fn GetNodeMask(&self) -> u32 {
unsafe { (windows_core::Interface::vtable(self).GetNodeMask)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetEncoderFlags(&self) -> D3D12_VIDEO_ENCODER_FLAGS {
unsafe { (windows_core::Interface::vtable(self).GetEncoderFlags)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetCodec(&self) -> D3D12_VIDEO_ENCODER_CODEC {
unsafe { (windows_core::Interface::vtable(self).GetCodec)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetCodecProfile(&self, dstprofile: D3D12_VIDEO_ENCODER_PROFILE_DESC) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetCodecProfile)(windows_core::Interface::as_raw(self), core::mem::transmute(dstprofile)).ok() }
}
pub unsafe fn GetCodecConfiguration(&self, dstcodecconfig: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetCodecConfiguration)(windows_core::Interface::as_raw(self), core::mem::transmute(dstcodecconfig)).ok() }
}
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
pub unsafe fn GetInputFormat(&self) -> super::super::Graphics::Dxgi::Common::DXGI_FORMAT {
unsafe { (windows_core::Interface::vtable(self).GetInputFormat)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetMaxMotionEstimationPrecision(&self) -> D3D12_VIDEO_ENCODER_MOTION_ESTIMATION_PRECISION_MODE {
unsafe { (windows_core::Interface::vtable(self).GetMaxMotionEstimationPrecision)(windows_core::Interface::as_raw(self)) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[repr(C)]
#[doc(hidden)]
pub struct ID3D12VideoEncoder_Vtbl {
pub base__: super::super::Graphics::Direct3D12::ID3D12Pageable_Vtbl,
pub GetNodeMask: unsafe extern "system" fn(*mut core::ffi::c_void) -> u32,
pub GetEncoderFlags: unsafe extern "system" fn(*mut core::ffi::c_void) -> D3D12_VIDEO_ENCODER_FLAGS,
pub GetCodec: unsafe extern "system" fn(*mut core::ffi::c_void) -> D3D12_VIDEO_ENCODER_CODEC,
pub GetCodecProfile: unsafe extern "system" fn(*mut core::ffi::c_void, D3D12_VIDEO_ENCODER_PROFILE_DESC) -> windows_core::HRESULT,
pub GetCodecConfiguration: unsafe extern "system" fn(*mut core::ffi::c_void, D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION) -> windows_core::HRESULT,
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
pub GetInputFormat: unsafe extern "system" fn(*mut core::ffi::c_void) -> super::super::Graphics::Dxgi::Common::DXGI_FORMAT,
#[cfg(not(feature = "Win32_Graphics_Dxgi_Common"))]
GetInputFormat: usize,
pub GetMaxMotionEstimationPrecision: unsafe extern "system" fn(*mut core::ffi::c_void) -> D3D12_VIDEO_ENCODER_MOTION_ESTIMATION_PRECISION_MODE,
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Send for ID3D12VideoEncoder {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Sync for ID3D12VideoEncoder {}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoEncoder_Impl: super::super::Graphics::Direct3D12::ID3D12Pageable_Impl {
fn GetNodeMask(&self) -> u32;
fn GetEncoderFlags(&self) -> D3D12_VIDEO_ENCODER_FLAGS;
fn GetCodec(&self) -> D3D12_VIDEO_ENCODER_CODEC;
fn GetCodecProfile(&self, dstprofile: &D3D12_VIDEO_ENCODER_PROFILE_DESC) -> windows_core::Result<()>;
fn GetCodecConfiguration(&self, dstcodecconfig: &D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION) -> windows_core::Result<()>;
fn GetInputFormat(&self) -> super::super::Graphics::Dxgi::Common::DXGI_FORMAT;
fn GetMaxMotionEstimationPrecision(&self) -> D3D12_VIDEO_ENCODER_MOTION_ESTIMATION_PRECISION_MODE;
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoEncoder_Vtbl {
pub const fn new<Identity: ID3D12VideoEncoder_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetNodeMask<Identity: ID3D12VideoEncoder_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> u32 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncoder_Impl::GetNodeMask(this)
}
}
unsafe extern "system" fn GetEncoderFlags<Identity: ID3D12VideoEncoder_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> D3D12_VIDEO_ENCODER_FLAGS {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncoder_Impl::GetEncoderFlags(this)
}
}
unsafe extern "system" fn GetCodec<Identity: ID3D12VideoEncoder_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> D3D12_VIDEO_ENCODER_CODEC {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncoder_Impl::GetCodec(this)
}
}
unsafe extern "system" fn GetCodecProfile<Identity: ID3D12VideoEncoder_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dstprofile: D3D12_VIDEO_ENCODER_PROFILE_DESC) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncoder_Impl::GetCodecProfile(this, core::mem::transmute(&dstprofile)).into()
}
}
unsafe extern "system" fn GetCodecConfiguration<Identity: ID3D12VideoEncoder_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dstcodecconfig: D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncoder_Impl::GetCodecConfiguration(this, core::mem::transmute(&dstcodecconfig)).into()
}
}
unsafe extern "system" fn GetInputFormat<Identity: ID3D12VideoEncoder_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> super::super::Graphics::Dxgi::Common::DXGI_FORMAT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncoder_Impl::GetInputFormat(this)
}
}
unsafe extern "system" fn GetMaxMotionEstimationPrecision<Identity: ID3D12VideoEncoder_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> D3D12_VIDEO_ENCODER_MOTION_ESTIMATION_PRECISION_MODE {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncoder_Impl::GetMaxMotionEstimationPrecision(this)
}
}
Self {
base__: super::super::Graphics::Direct3D12::ID3D12Pageable_Vtbl::new::<Identity, OFFSET>(),
GetNodeMask: GetNodeMask::<Identity, OFFSET>,
GetEncoderFlags: GetEncoderFlags::<Identity, OFFSET>,
GetCodec: GetCodec::<Identity, OFFSET>,
GetCodecProfile: GetCodecProfile::<Identity, OFFSET>,
GetCodecConfiguration: GetCodecConfiguration::<Identity, OFFSET>,
GetInputFormat: GetInputFormat::<Identity, OFFSET>,
GetMaxMotionEstimationPrecision: GetMaxMotionEstimationPrecision::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ID3D12VideoEncoder as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Pageable as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl windows_core::RuntimeName for ID3D12VideoEncoder {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::define_interface!(ID3D12VideoEncoderHeap, ID3D12VideoEncoderHeap_Vtbl, 0x22b35d96_876a_44c0_b25e_fb8c9c7f1c4a);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl core::ops::Deref for ID3D12VideoEncoderHeap {
type Target = super::super::Graphics::Direct3D12::ID3D12Pageable;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::interface_hierarchy!(ID3D12VideoEncoderHeap, windows_core::IUnknown, super::super::Graphics::Direct3D12::ID3D12Object, super::super::Graphics::Direct3D12::ID3D12DeviceChild, super::super::Graphics::Direct3D12::ID3D12Pageable);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoEncoderHeap {
pub unsafe fn GetNodeMask(&self) -> u32 {
unsafe { (windows_core::Interface::vtable(self).GetNodeMask)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetEncoderHeapFlags(&self) -> D3D12_VIDEO_ENCODER_HEAP_FLAGS {
unsafe { (windows_core::Interface::vtable(self).GetEncoderHeapFlags)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetCodec(&self) -> D3D12_VIDEO_ENCODER_CODEC {
unsafe { (windows_core::Interface::vtable(self).GetCodec)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetCodecProfile(&self, dstprofile: D3D12_VIDEO_ENCODER_PROFILE_DESC) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetCodecProfile)(windows_core::Interface::as_raw(self), core::mem::transmute(dstprofile)).ok() }
}
pub unsafe fn GetCodecLevel(&self, dstlevel: D3D12_VIDEO_ENCODER_LEVEL_SETTING) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetCodecLevel)(windows_core::Interface::as_raw(self), core::mem::transmute(dstlevel)).ok() }
}
pub unsafe fn GetResolutionListCount(&self) -> u32 {
unsafe { (windows_core::Interface::vtable(self).GetResolutionListCount)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetResolutionList(&self, presolutionlist: &mut [D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC]) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetResolutionList)(windows_core::Interface::as_raw(self), presolutionlist.len().try_into().unwrap(), core::mem::transmute(presolutionlist.as_ptr())).ok() }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[repr(C)]
#[doc(hidden)]
pub struct ID3D12VideoEncoderHeap_Vtbl {
pub base__: super::super::Graphics::Direct3D12::ID3D12Pageable_Vtbl,
pub GetNodeMask: unsafe extern "system" fn(*mut core::ffi::c_void) -> u32,
pub GetEncoderHeapFlags: unsafe extern "system" fn(*mut core::ffi::c_void) -> D3D12_VIDEO_ENCODER_HEAP_FLAGS,
pub GetCodec: unsafe extern "system" fn(*mut core::ffi::c_void) -> D3D12_VIDEO_ENCODER_CODEC,
pub GetCodecProfile: unsafe extern "system" fn(*mut core::ffi::c_void, D3D12_VIDEO_ENCODER_PROFILE_DESC) -> windows_core::HRESULT,
pub GetCodecLevel: unsafe extern "system" fn(*mut core::ffi::c_void, D3D12_VIDEO_ENCODER_LEVEL_SETTING) -> windows_core::HRESULT,
pub GetResolutionListCount: unsafe extern "system" fn(*mut core::ffi::c_void) -> u32,
pub GetResolutionList: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC) -> windows_core::HRESULT,
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Send for ID3D12VideoEncoderHeap {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Sync for ID3D12VideoEncoderHeap {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
pub trait ID3D12VideoEncoderHeap_Impl: super::super::Graphics::Direct3D12::ID3D12Pageable_Impl {
fn GetNodeMask(&self) -> u32;
fn GetEncoderHeapFlags(&self) -> D3D12_VIDEO_ENCODER_HEAP_FLAGS;
fn GetCodec(&self) -> D3D12_VIDEO_ENCODER_CODEC;
fn GetCodecProfile(&self, dstprofile: &D3D12_VIDEO_ENCODER_PROFILE_DESC) -> windows_core::Result<()>;
fn GetCodecLevel(&self, dstlevel: &D3D12_VIDEO_ENCODER_LEVEL_SETTING) -> windows_core::Result<()>;
fn GetResolutionListCount(&self) -> u32;
fn GetResolutionList(&self, resolutionslistcount: u32, presolutionlist: *mut D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC) -> windows_core::Result<()>;
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoEncoderHeap_Vtbl {
pub const fn new<Identity: ID3D12VideoEncoderHeap_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetNodeMask<Identity: ID3D12VideoEncoderHeap_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> u32 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncoderHeap_Impl::GetNodeMask(this)
}
}
unsafe extern "system" fn GetEncoderHeapFlags<Identity: ID3D12VideoEncoderHeap_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> D3D12_VIDEO_ENCODER_HEAP_FLAGS {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncoderHeap_Impl::GetEncoderHeapFlags(this)
}
}
unsafe extern "system" fn GetCodec<Identity: ID3D12VideoEncoderHeap_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> D3D12_VIDEO_ENCODER_CODEC {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncoderHeap_Impl::GetCodec(this)
}
}
unsafe extern "system" fn GetCodecProfile<Identity: ID3D12VideoEncoderHeap_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dstprofile: D3D12_VIDEO_ENCODER_PROFILE_DESC) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncoderHeap_Impl::GetCodecProfile(this, core::mem::transmute(&dstprofile)).into()
}
}
unsafe extern "system" fn GetCodecLevel<Identity: ID3D12VideoEncoderHeap_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dstlevel: D3D12_VIDEO_ENCODER_LEVEL_SETTING) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncoderHeap_Impl::GetCodecLevel(this, core::mem::transmute(&dstlevel)).into()
}
}
unsafe extern "system" fn GetResolutionListCount<Identity: ID3D12VideoEncoderHeap_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> u32 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncoderHeap_Impl::GetResolutionListCount(this)
}
}
unsafe extern "system" fn GetResolutionList<Identity: ID3D12VideoEncoderHeap_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, resolutionslistcount: u32, presolutionlist: *mut D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoEncoderHeap_Impl::GetResolutionList(this, core::mem::transmute_copy(&resolutionslistcount), core::mem::transmute_copy(&presolutionlist)).into()
}
}
Self {
base__: super::super::Graphics::Direct3D12::ID3D12Pageable_Vtbl::new::<Identity, OFFSET>(),
GetNodeMask: GetNodeMask::<Identity, OFFSET>,
GetEncoderHeapFlags: GetEncoderHeapFlags::<Identity, OFFSET>,
GetCodec: GetCodec::<Identity, OFFSET>,
GetCodecProfile: GetCodecProfile::<Identity, OFFSET>,
GetCodecLevel: GetCodecLevel::<Identity, OFFSET>,
GetResolutionListCount: GetResolutionListCount::<Identity, OFFSET>,
GetResolutionList: GetResolutionList::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ID3D12VideoEncoderHeap as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Pageable as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl windows_core::RuntimeName for ID3D12VideoEncoderHeap {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::define_interface!(ID3D12VideoExtensionCommand, ID3D12VideoExtensionCommand_Vtbl, 0x554e41e8_ae8e_4a8c_b7d2_5b4f274a30e4);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl core::ops::Deref for ID3D12VideoExtensionCommand {
type Target = super::super::Graphics::Direct3D12::ID3D12Pageable;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::interface_hierarchy!(ID3D12VideoExtensionCommand, windows_core::IUnknown, super::super::Graphics::Direct3D12::ID3D12Object, super::super::Graphics::Direct3D12::ID3D12DeviceChild, super::super::Graphics::Direct3D12::ID3D12Pageable);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoExtensionCommand {
pub unsafe fn GetDesc(&self) -> D3D12_VIDEO_EXTENSION_COMMAND_DESC {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), &mut result__);
result__
}
}
pub unsafe fn GetProtectedResourceSession<T>(&self, result__: *mut Option<T>) -> windows_core::Result<()>
where
T: windows_core::Interface,
{
unsafe { (windows_core::Interface::vtable(self).GetProtectedResourceSession)(windows_core::Interface::as_raw(self), &T::IID, result__ as *mut _ as *mut _).ok() }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[repr(C)]
#[doc(hidden)]
pub struct ID3D12VideoExtensionCommand_Vtbl {
pub base__: super::super::Graphics::Direct3D12::ID3D12Pageable_Vtbl,
pub GetDesc: unsafe extern "system" fn(*mut core::ffi::c_void, *mut D3D12_VIDEO_EXTENSION_COMMAND_DESC),
pub GetProtectedResourceSession: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Send for ID3D12VideoExtensionCommand {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Sync for ID3D12VideoExtensionCommand {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
pub trait ID3D12VideoExtensionCommand_Impl: super::super::Graphics::Direct3D12::ID3D12Pageable_Impl {
fn GetDesc(&self) -> D3D12_VIDEO_EXTENSION_COMMAND_DESC;
fn GetProtectedResourceSession(&self, riid: *const windows_core::GUID, ppprotectedsession: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoExtensionCommand_Vtbl {
pub const fn new<Identity: ID3D12VideoExtensionCommand_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetDesc<Identity: ID3D12VideoExtensionCommand_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut D3D12_VIDEO_EXTENSION_COMMAND_DESC) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
*result__ = ID3D12VideoExtensionCommand_Impl::GetDesc(this)
}
}
unsafe extern "system" fn GetProtectedResourceSession<Identity: ID3D12VideoExtensionCommand_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppprotectedsession: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoExtensionCommand_Impl::GetProtectedResourceSession(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppprotectedsession)).into()
}
}
Self {
base__: super::super::Graphics::Direct3D12::ID3D12Pageable_Vtbl::new::<Identity, OFFSET>(),
GetDesc: GetDesc::<Identity, OFFSET>,
GetProtectedResourceSession: GetProtectedResourceSession::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ID3D12VideoExtensionCommand as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Pageable as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl windows_core::RuntimeName for ID3D12VideoExtensionCommand {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::define_interface!(ID3D12VideoMotionEstimator, ID3D12VideoMotionEstimator_Vtbl, 0x33fdae0e_098b_428f_87bb_34b695de08f8);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl core::ops::Deref for ID3D12VideoMotionEstimator {
type Target = super::super::Graphics::Direct3D12::ID3D12Pageable;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::interface_hierarchy!(ID3D12VideoMotionEstimator, windows_core::IUnknown, super::super::Graphics::Direct3D12::ID3D12Object, super::super::Graphics::Direct3D12::ID3D12DeviceChild, super::super::Graphics::Direct3D12::ID3D12Pageable);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoMotionEstimator {
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
pub unsafe fn GetDesc(&self) -> D3D12_VIDEO_MOTION_ESTIMATOR_DESC {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), &mut result__);
result__
}
}
pub unsafe fn GetProtectedResourceSession<T>(&self, result__: *mut Option<T>) -> windows_core::Result<()>
where
T: windows_core::Interface,
{
unsafe { (windows_core::Interface::vtable(self).GetProtectedResourceSession)(windows_core::Interface::as_raw(self), &T::IID, result__ as *mut _ as *mut _).ok() }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[repr(C)]
#[doc(hidden)]
pub struct ID3D12VideoMotionEstimator_Vtbl {
pub base__: super::super::Graphics::Direct3D12::ID3D12Pageable_Vtbl,
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
pub GetDesc: unsafe extern "system" fn(*mut core::ffi::c_void, *mut D3D12_VIDEO_MOTION_ESTIMATOR_DESC),
#[cfg(not(feature = "Win32_Graphics_Dxgi_Common"))]
GetDesc: usize,
pub GetProtectedResourceSession: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Send for ID3D12VideoMotionEstimator {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Sync for ID3D12VideoMotionEstimator {}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoMotionEstimator_Impl: super::super::Graphics::Direct3D12::ID3D12Pageable_Impl {
fn GetDesc(&self) -> D3D12_VIDEO_MOTION_ESTIMATOR_DESC;
fn GetProtectedResourceSession(&self, riid: *const windows_core::GUID, ppprotectedsession: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoMotionEstimator_Vtbl {
pub const fn new<Identity: ID3D12VideoMotionEstimator_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetDesc<Identity: ID3D12VideoMotionEstimator_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut D3D12_VIDEO_MOTION_ESTIMATOR_DESC) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
*result__ = ID3D12VideoMotionEstimator_Impl::GetDesc(this)
}
}
unsafe extern "system" fn GetProtectedResourceSession<Identity: ID3D12VideoMotionEstimator_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppprotectedsession: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoMotionEstimator_Impl::GetProtectedResourceSession(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppprotectedsession)).into()
}
}
Self {
base__: super::super::Graphics::Direct3D12::ID3D12Pageable_Vtbl::new::<Identity, OFFSET>(),
GetDesc: GetDesc::<Identity, OFFSET>,
GetProtectedResourceSession: GetProtectedResourceSession::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ID3D12VideoMotionEstimator as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Pageable as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl windows_core::RuntimeName for ID3D12VideoMotionEstimator {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::define_interface!(ID3D12VideoMotionVectorHeap, ID3D12VideoMotionVectorHeap_Vtbl, 0x5be17987_743a_4061_834b_23d22daea505);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl core::ops::Deref for ID3D12VideoMotionVectorHeap {
type Target = super::super::Graphics::Direct3D12::ID3D12Pageable;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::interface_hierarchy!(ID3D12VideoMotionVectorHeap, windows_core::IUnknown, super::super::Graphics::Direct3D12::ID3D12Object, super::super::Graphics::Direct3D12::ID3D12DeviceChild, super::super::Graphics::Direct3D12::ID3D12Pageable);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoMotionVectorHeap {
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
pub unsafe fn GetDesc(&self) -> D3D12_VIDEO_MOTION_VECTOR_HEAP_DESC {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDesc)(windows_core::Interface::as_raw(self), &mut result__);
result__
}
}
pub unsafe fn GetProtectedResourceSession<T>(&self, result__: *mut Option<T>) -> windows_core::Result<()>
where
T: windows_core::Interface,
{
unsafe { (windows_core::Interface::vtable(self).GetProtectedResourceSession)(windows_core::Interface::as_raw(self), &T::IID, result__ as *mut _ as *mut _).ok() }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[repr(C)]
#[doc(hidden)]
pub struct ID3D12VideoMotionVectorHeap_Vtbl {
pub base__: super::super::Graphics::Direct3D12::ID3D12Pageable_Vtbl,
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
pub GetDesc: unsafe extern "system" fn(*mut core::ffi::c_void, *mut D3D12_VIDEO_MOTION_VECTOR_HEAP_DESC),
#[cfg(not(feature = "Win32_Graphics_Dxgi_Common"))]
GetDesc: usize,
pub GetProtectedResourceSession: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Send for ID3D12VideoMotionVectorHeap {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Sync for ID3D12VideoMotionVectorHeap {}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoMotionVectorHeap_Impl: super::super::Graphics::Direct3D12::ID3D12Pageable_Impl {
fn GetDesc(&self) -> D3D12_VIDEO_MOTION_VECTOR_HEAP_DESC;
fn GetProtectedResourceSession(&self, riid: *const windows_core::GUID, ppprotectedsession: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoMotionVectorHeap_Vtbl {
pub const fn new<Identity: ID3D12VideoMotionVectorHeap_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetDesc<Identity: ID3D12VideoMotionVectorHeap_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut D3D12_VIDEO_MOTION_VECTOR_HEAP_DESC) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
*result__ = ID3D12VideoMotionVectorHeap_Impl::GetDesc(this)
}
}
unsafe extern "system" fn GetProtectedResourceSession<Identity: ID3D12VideoMotionVectorHeap_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppprotectedsession: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoMotionVectorHeap_Impl::GetProtectedResourceSession(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppprotectedsession)).into()
}
}
Self {
base__: super::super::Graphics::Direct3D12::ID3D12Pageable_Vtbl::new::<Identity, OFFSET>(),
GetDesc: GetDesc::<Identity, OFFSET>,
GetProtectedResourceSession: GetProtectedResourceSession::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ID3D12VideoMotionVectorHeap as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Pageable as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl windows_core::RuntimeName for ID3D12VideoMotionVectorHeap {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::define_interface!(ID3D12VideoProcessCommandList, ID3D12VideoProcessCommandList_Vtbl, 0xaeb2543a_167f_4682_acc8_d159ed4a6209);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl core::ops::Deref for ID3D12VideoProcessCommandList {
type Target = super::super::Graphics::Direct3D12::ID3D12CommandList;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::interface_hierarchy!(ID3D12VideoProcessCommandList, windows_core::IUnknown, super::super::Graphics::Direct3D12::ID3D12Object, super::super::Graphics::Direct3D12::ID3D12DeviceChild, super::super::Graphics::Direct3D12::ID3D12CommandList);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoProcessCommandList {
pub unsafe fn Close(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn Reset<P0>(&self, pallocator: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12CommandAllocator>,
{
unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self), pallocator.param().abi()).ok() }
}
pub unsafe fn ClearState(&self) {
unsafe { (windows_core::Interface::vtable(self).ClearState)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn ResourceBarrier(&self, pbarriers: &[super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER]) {
unsafe { (windows_core::Interface::vtable(self).ResourceBarrier)(windows_core::Interface::as_raw(self), pbarriers.len().try_into().unwrap(), core::mem::transmute(pbarriers.as_ptr())) }
}
pub unsafe fn DiscardResource<P0>(&self, presource: P0, pregion: Option<*const super::super::Graphics::Direct3D12::D3D12_DISCARD_REGION>)
where
P0: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12Resource>,
{
unsafe { (windows_core::Interface::vtable(self).DiscardResource)(windows_core::Interface::as_raw(self), presource.param().abi(), pregion.unwrap_or(core::mem::zeroed()) as _) }
}
pub unsafe fn BeginQuery<P0>(&self, pqueryheap: P0, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32)
where
P0: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12QueryHeap>,
{
unsafe { (windows_core::Interface::vtable(self).BeginQuery)(windows_core::Interface::as_raw(self), pqueryheap.param().abi(), r#type, index) }
}
pub unsafe fn EndQuery<P0>(&self, pqueryheap: P0, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32)
where
P0: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12QueryHeap>,
{
unsafe { (windows_core::Interface::vtable(self).EndQuery)(windows_core::Interface::as_raw(self), pqueryheap.param().abi(), r#type, index) }
}
pub unsafe fn ResolveQueryData<P0, P4>(&self, pqueryheap: P0, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, startindex: u32, numqueries: u32, pdestinationbuffer: P4, aligneddestinationbufferoffset: u64)
where
P0: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12QueryHeap>,
P4: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12Resource>,
{
unsafe { (windows_core::Interface::vtable(self).ResolveQueryData)(windows_core::Interface::as_raw(self), pqueryheap.param().abi(), r#type, startindex, numqueries, pdestinationbuffer.param().abi(), aligneddestinationbufferoffset) }
}
pub unsafe fn SetPredication<P0>(&self, pbuffer: P0, alignedbufferoffset: u64, operation: super::super::Graphics::Direct3D12::D3D12_PREDICATION_OP)
where
P0: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12Resource>,
{
unsafe { (windows_core::Interface::vtable(self).SetPredication)(windows_core::Interface::as_raw(self), pbuffer.param().abi(), alignedbufferoffset, operation) }
}
pub unsafe fn SetMarker(&self, metadata: u32, pdata: Option<*const core::ffi::c_void>, size: u32) {
unsafe { (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), metadata, pdata.unwrap_or(core::mem::zeroed()) as _, size) }
}
pub unsafe fn BeginEvent(&self, metadata: u32, pdata: Option<*const core::ffi::c_void>, size: u32) {
unsafe { (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), metadata, pdata.unwrap_or(core::mem::zeroed()) as _, size) }
}
pub unsafe fn EndEvent(&self) {
unsafe { (windows_core::Interface::vtable(self).EndEvent)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn ProcessFrames<P0>(&self, pvideoprocessor: P0, poutputarguments: *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS, pinputarguments: &[D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS])
where
P0: windows_core::Param<ID3D12VideoProcessor>,
{
unsafe { (windows_core::Interface::vtable(self).ProcessFrames)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(poutputarguments), pinputarguments.len().try_into().unwrap(), core::mem::transmute(pinputarguments.as_ptr())) }
}
pub unsafe fn WriteBufferImmediate(&self, count: u32, pparams: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_PARAMETER, pmodes: Option<*const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_MODE>) {
unsafe { (windows_core::Interface::vtable(self).WriteBufferImmediate)(windows_core::Interface::as_raw(self), count, pparams, pmodes.unwrap_or(core::mem::zeroed()) as _) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[repr(C)]
#[doc(hidden)]
pub struct ID3D12VideoProcessCommandList_Vtbl {
pub base__: super::super::Graphics::Direct3D12::ID3D12CommandList_Vtbl,
pub Close: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Reset: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ClearState: unsafe extern "system" fn(*mut core::ffi::c_void),
pub ResourceBarrier: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER),
pub DiscardResource: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const super::super::Graphics::Direct3D12::D3D12_DISCARD_REGION),
pub BeginQuery: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, u32),
pub EndQuery: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, u32),
pub ResolveQueryData: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, u32, u32, *mut core::ffi::c_void, u64),
pub SetPredication: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u64, super::super::Graphics::Direct3D12::D3D12_PREDICATION_OP),
pub SetMarker: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const core::ffi::c_void, u32),
pub BeginEvent: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const core::ffi::c_void, u32),
pub EndEvent: unsafe extern "system" fn(*mut core::ffi::c_void),
pub ProcessFrames: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS, u32, *const D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS),
pub WriteBufferImmediate: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_PARAMETER, *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_MODE),
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Send for ID3D12VideoProcessCommandList {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Sync for ID3D12VideoProcessCommandList {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
pub trait ID3D12VideoProcessCommandList_Impl: super::super::Graphics::Direct3D12::ID3D12CommandList_Impl {
fn Close(&self) -> windows_core::Result<()>;
fn Reset(&self, pallocator: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12CommandAllocator>) -> windows_core::Result<()>;
fn ClearState(&self);
fn ResourceBarrier(&self, numbarriers: u32, pbarriers: *const super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER);
fn DiscardResource(&self, presource: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12Resource>, pregion: *const super::super::Graphics::Direct3D12::D3D12_DISCARD_REGION);
fn BeginQuery(&self, pqueryheap: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32);
fn EndQuery(&self, pqueryheap: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32);
fn ResolveQueryData(&self, pqueryheap: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, startindex: u32, numqueries: u32, pdestinationbuffer: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12Resource>, aligneddestinationbufferoffset: u64);
fn SetPredication(&self, pbuffer: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12Resource>, alignedbufferoffset: u64, operation: super::super::Graphics::Direct3D12::D3D12_PREDICATION_OP);
fn SetMarker(&self, metadata: u32, pdata: *const core::ffi::c_void, size: u32);
fn BeginEvent(&self, metadata: u32, pdata: *const core::ffi::c_void, size: u32);
fn EndEvent(&self);
fn ProcessFrames(&self, pvideoprocessor: windows_core::Ref<ID3D12VideoProcessor>, poutputarguments: *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS, numinputstreams: u32, pinputarguments: *const D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS);
fn WriteBufferImmediate(&self, count: u32, pparams: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_PARAMETER, pmodes: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_MODE);
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoProcessCommandList_Vtbl {
pub const fn new<Identity: ID3D12VideoProcessCommandList_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Close<Identity: ID3D12VideoProcessCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoProcessCommandList_Impl::Close(this).into()
}
}
unsafe extern "system" fn Reset<Identity: ID3D12VideoProcessCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pallocator: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoProcessCommandList_Impl::Reset(this, core::mem::transmute_copy(&pallocator)).into()
}
}
unsafe extern "system" fn ClearState<Identity: ID3D12VideoProcessCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoProcessCommandList_Impl::ClearState(this)
}
}
unsafe extern "system" fn ResourceBarrier<Identity: ID3D12VideoProcessCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, numbarriers: u32, pbarriers: *const super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoProcessCommandList_Impl::ResourceBarrier(this, core::mem::transmute_copy(&numbarriers), core::mem::transmute_copy(&pbarriers))
}
}
unsafe extern "system" fn DiscardResource<Identity: ID3D12VideoProcessCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, pregion: *const super::super::Graphics::Direct3D12::D3D12_DISCARD_REGION) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoProcessCommandList_Impl::DiscardResource(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&pregion))
}
}
unsafe extern "system" fn BeginQuery<Identity: ID3D12VideoProcessCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pqueryheap: *mut core::ffi::c_void, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoProcessCommandList_Impl::BeginQuery(this, core::mem::transmute_copy(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&index))
}
}
unsafe extern "system" fn EndQuery<Identity: ID3D12VideoProcessCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pqueryheap: *mut core::ffi::c_void, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoProcessCommandList_Impl::EndQuery(this, core::mem::transmute_copy(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&index))
}
}
unsafe extern "system" fn ResolveQueryData<Identity: ID3D12VideoProcessCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pqueryheap: *mut core::ffi::c_void, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, startindex: u32, numqueries: u32, pdestinationbuffer: *mut core::ffi::c_void, aligneddestinationbufferoffset: u64) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoProcessCommandList_Impl::ResolveQueryData(this, core::mem::transmute_copy(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&startindex), core::mem::transmute_copy(&numqueries), core::mem::transmute_copy(&pdestinationbuffer), core::mem::transmute_copy(&aligneddestinationbufferoffset))
}
}
unsafe extern "system" fn SetPredication<Identity: ID3D12VideoProcessCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbuffer: *mut core::ffi::c_void, alignedbufferoffset: u64, operation: super::super::Graphics::Direct3D12::D3D12_PREDICATION_OP) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoProcessCommandList_Impl::SetPredication(this, core::mem::transmute_copy(&pbuffer), core::mem::transmute_copy(&alignedbufferoffset), core::mem::transmute_copy(&operation))
}
}
unsafe extern "system" fn SetMarker<Identity: ID3D12VideoProcessCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, metadata: u32, pdata: *const core::ffi::c_void, size: u32) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoProcessCommandList_Impl::SetMarker(this, core::mem::transmute_copy(&metadata), core::mem::transmute_copy(&pdata), core::mem::transmute_copy(&size))
}
}
unsafe extern "system" fn BeginEvent<Identity: ID3D12VideoProcessCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, metadata: u32, pdata: *const core::ffi::c_void, size: u32) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoProcessCommandList_Impl::BeginEvent(this, core::mem::transmute_copy(&metadata), core::mem::transmute_copy(&pdata), core::mem::transmute_copy(&size))
}
}
unsafe extern "system" fn EndEvent<Identity: ID3D12VideoProcessCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoProcessCommandList_Impl::EndEvent(this)
}
}
unsafe extern "system" fn ProcessFrames<Identity: ID3D12VideoProcessCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, poutputarguments: *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS, numinputstreams: u32, pinputarguments: *const D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoProcessCommandList_Impl::ProcessFrames(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&poutputarguments), core::mem::transmute_copy(&numinputstreams), core::mem::transmute_copy(&pinputarguments))
}
}
unsafe extern "system" fn WriteBufferImmediate<Identity: ID3D12VideoProcessCommandList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, count: u32, pparams: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_PARAMETER, pmodes: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_MODE) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoProcessCommandList_Impl::WriteBufferImmediate(this, core::mem::transmute_copy(&count), core::mem::transmute_copy(&pparams), core::mem::transmute_copy(&pmodes))
}
}
Self {
base__: super::super::Graphics::Direct3D12::ID3D12CommandList_Vtbl::new::<Identity, OFFSET>(),
Close: Close::<Identity, OFFSET>,
Reset: Reset::<Identity, OFFSET>,
ClearState: ClearState::<Identity, OFFSET>,
ResourceBarrier: ResourceBarrier::<Identity, OFFSET>,
DiscardResource: DiscardResource::<Identity, OFFSET>,
BeginQuery: BeginQuery::<Identity, OFFSET>,
EndQuery: EndQuery::<Identity, OFFSET>,
ResolveQueryData: ResolveQueryData::<Identity, OFFSET>,
SetPredication: SetPredication::<Identity, OFFSET>,
SetMarker: SetMarker::<Identity, OFFSET>,
BeginEvent: BeginEvent::<Identity, OFFSET>,
EndEvent: EndEvent::<Identity, OFFSET>,
ProcessFrames: ProcessFrames::<Identity, OFFSET>,
WriteBufferImmediate: WriteBufferImmediate::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ID3D12VideoProcessCommandList as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12CommandList as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl windows_core::RuntimeName for ID3D12VideoProcessCommandList {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::define_interface!(ID3D12VideoProcessCommandList1, ID3D12VideoProcessCommandList1_Vtbl, 0x542c5c4d_7596_434f_8c93_4efa6766f267);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl core::ops::Deref for ID3D12VideoProcessCommandList1 {
type Target = ID3D12VideoProcessCommandList;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::interface_hierarchy!(ID3D12VideoProcessCommandList1, windows_core::IUnknown, super::super::Graphics::Direct3D12::ID3D12Object, super::super::Graphics::Direct3D12::ID3D12DeviceChild, super::super::Graphics::Direct3D12::ID3D12CommandList, ID3D12VideoProcessCommandList);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoProcessCommandList1 {
pub unsafe fn ProcessFrames1<P0>(&self, pvideoprocessor: P0, poutputarguments: *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS, pinputarguments: &[D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS1])
where
P0: windows_core::Param<ID3D12VideoProcessor>,
{
unsafe { (windows_core::Interface::vtable(self).ProcessFrames1)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), core::mem::transmute(poutputarguments), pinputarguments.len().try_into().unwrap(), core::mem::transmute(pinputarguments.as_ptr())) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[repr(C)]
#[doc(hidden)]
pub struct ID3D12VideoProcessCommandList1_Vtbl {
pub base__: ID3D12VideoProcessCommandList_Vtbl,
pub ProcessFrames1: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS, u32, *const D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS1),
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Send for ID3D12VideoProcessCommandList1 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Sync for ID3D12VideoProcessCommandList1 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
pub trait ID3D12VideoProcessCommandList1_Impl: ID3D12VideoProcessCommandList_Impl {
fn ProcessFrames1(&self, pvideoprocessor: windows_core::Ref<ID3D12VideoProcessor>, poutputarguments: *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS, numinputstreams: u32, pinputarguments: *const D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS1);
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoProcessCommandList1_Vtbl {
pub const fn new<Identity: ID3D12VideoProcessCommandList1_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn ProcessFrames1<Identity: ID3D12VideoProcessCommandList1_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, poutputarguments: *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS, numinputstreams: u32, pinputarguments: *const D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS1) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoProcessCommandList1_Impl::ProcessFrames1(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&poutputarguments), core::mem::transmute_copy(&numinputstreams), core::mem::transmute_copy(&pinputarguments))
}
}
Self { base__: ID3D12VideoProcessCommandList_Vtbl::new::<Identity, OFFSET>(), ProcessFrames1: ProcessFrames1::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ID3D12VideoProcessCommandList1 as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12CommandList as windows_core::Interface>::IID || iid == &<ID3D12VideoProcessCommandList as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl windows_core::RuntimeName for ID3D12VideoProcessCommandList1 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::define_interface!(ID3D12VideoProcessCommandList2, ID3D12VideoProcessCommandList2_Vtbl, 0xdb525ae4_6ad6_473c_baa7_59b2e37082e4);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl core::ops::Deref for ID3D12VideoProcessCommandList2 {
type Target = ID3D12VideoProcessCommandList1;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::interface_hierarchy!(ID3D12VideoProcessCommandList2, windows_core::IUnknown, super::super::Graphics::Direct3D12::ID3D12Object, super::super::Graphics::Direct3D12::ID3D12DeviceChild, super::super::Graphics::Direct3D12::ID3D12CommandList, ID3D12VideoProcessCommandList, ID3D12VideoProcessCommandList1);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoProcessCommandList2 {
pub unsafe fn SetProtectedResourceSession<P0>(&self, pprotectedresourcesession: P0)
where
P0: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>,
{
unsafe { (windows_core::Interface::vtable(self).SetProtectedResourceSession)(windows_core::Interface::as_raw(self), pprotectedresourcesession.param().abi()) }
}
pub unsafe fn InitializeExtensionCommand<P0>(&self, pextensioncommand: P0, pinitializationparameters: *const core::ffi::c_void, initializationparameterssizeinbytes: usize)
where
P0: windows_core::Param<ID3D12VideoExtensionCommand>,
{
unsafe { (windows_core::Interface::vtable(self).InitializeExtensionCommand)(windows_core::Interface::as_raw(self), pextensioncommand.param().abi(), pinitializationparameters, initializationparameterssizeinbytes) }
}
pub unsafe fn ExecuteExtensionCommand<P0>(&self, pextensioncommand: P0, pexecutionparameters: *const core::ffi::c_void, executionparameterssizeinbytes: usize)
where
P0: windows_core::Param<ID3D12VideoExtensionCommand>,
{
unsafe { (windows_core::Interface::vtable(self).ExecuteExtensionCommand)(windows_core::Interface::as_raw(self), pextensioncommand.param().abi(), pexecutionparameters, executionparameterssizeinbytes) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[repr(C)]
#[doc(hidden)]
pub struct ID3D12VideoProcessCommandList2_Vtbl {
pub base__: ID3D12VideoProcessCommandList1_Vtbl,
pub SetProtectedResourceSession: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void),
pub InitializeExtensionCommand: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const core::ffi::c_void, usize),
pub ExecuteExtensionCommand: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const core::ffi::c_void, usize),
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Send for ID3D12VideoProcessCommandList2 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Sync for ID3D12VideoProcessCommandList2 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
pub trait ID3D12VideoProcessCommandList2_Impl: ID3D12VideoProcessCommandList1_Impl {
fn SetProtectedResourceSession(&self, pprotectedresourcesession: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>);
fn InitializeExtensionCommand(&self, pextensioncommand: windows_core::Ref<ID3D12VideoExtensionCommand>, pinitializationparameters: *const core::ffi::c_void, initializationparameterssizeinbytes: usize);
fn ExecuteExtensionCommand(&self, pextensioncommand: windows_core::Ref<ID3D12VideoExtensionCommand>, pexecutionparameters: *const core::ffi::c_void, executionparameterssizeinbytes: usize);
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoProcessCommandList2_Vtbl {
pub const fn new<Identity: ID3D12VideoProcessCommandList2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetProtectedResourceSession<Identity: ID3D12VideoProcessCommandList2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pprotectedresourcesession: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoProcessCommandList2_Impl::SetProtectedResourceSession(this, core::mem::transmute_copy(&pprotectedresourcesession))
}
}
unsafe extern "system" fn InitializeExtensionCommand<Identity: ID3D12VideoProcessCommandList2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pextensioncommand: *mut core::ffi::c_void, pinitializationparameters: *const core::ffi::c_void, initializationparameterssizeinbytes: usize) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoProcessCommandList2_Impl::InitializeExtensionCommand(this, core::mem::transmute_copy(&pextensioncommand), core::mem::transmute_copy(&pinitializationparameters), core::mem::transmute_copy(&initializationparameterssizeinbytes))
}
}
unsafe extern "system" fn ExecuteExtensionCommand<Identity: ID3D12VideoProcessCommandList2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pextensioncommand: *mut core::ffi::c_void, pexecutionparameters: *const core::ffi::c_void, executionparameterssizeinbytes: usize) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoProcessCommandList2_Impl::ExecuteExtensionCommand(this, core::mem::transmute_copy(&pextensioncommand), core::mem::transmute_copy(&pexecutionparameters), core::mem::transmute_copy(&executionparameterssizeinbytes))
}
}
Self {
base__: ID3D12VideoProcessCommandList1_Vtbl::new::<Identity, OFFSET>(),
SetProtectedResourceSession: SetProtectedResourceSession::<Identity, OFFSET>,
InitializeExtensionCommand: InitializeExtensionCommand::<Identity, OFFSET>,
ExecuteExtensionCommand: ExecuteExtensionCommand::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ID3D12VideoProcessCommandList2 as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12CommandList as windows_core::Interface>::IID || iid == &<ID3D12VideoProcessCommandList as windows_core::Interface>::IID || iid == &<ID3D12VideoProcessCommandList1 as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl windows_core::RuntimeName for ID3D12VideoProcessCommandList2 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::define_interface!(ID3D12VideoProcessCommandList3, ID3D12VideoProcessCommandList3_Vtbl, 0x1a0a4ca4_9f08_40ce_9558_b411fd2666ff);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl core::ops::Deref for ID3D12VideoProcessCommandList3 {
type Target = ID3D12VideoProcessCommandList2;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::interface_hierarchy!(ID3D12VideoProcessCommandList3, windows_core::IUnknown, super::super::Graphics::Direct3D12::ID3D12Object, super::super::Graphics::Direct3D12::ID3D12DeviceChild, super::super::Graphics::Direct3D12::ID3D12CommandList, ID3D12VideoProcessCommandList, ID3D12VideoProcessCommandList1, ID3D12VideoProcessCommandList2);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoProcessCommandList3 {
pub unsafe fn Barrier(&self, pbarriergroups: &[super::super::Graphics::Direct3D12::D3D12_BARRIER_GROUP]) {
unsafe { (windows_core::Interface::vtable(self).Barrier)(windows_core::Interface::as_raw(self), pbarriergroups.len().try_into().unwrap(), core::mem::transmute(pbarriergroups.as_ptr())) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[repr(C)]
#[doc(hidden)]
pub struct ID3D12VideoProcessCommandList3_Vtbl {
pub base__: ID3D12VideoProcessCommandList2_Vtbl,
pub Barrier: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const super::super::Graphics::Direct3D12::D3D12_BARRIER_GROUP),
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Send for ID3D12VideoProcessCommandList3 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Sync for ID3D12VideoProcessCommandList3 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
pub trait ID3D12VideoProcessCommandList3_Impl: ID3D12VideoProcessCommandList2_Impl {
fn Barrier(&self, numbarriergroups: u32, pbarriergroups: *const super::super::Graphics::Direct3D12::D3D12_BARRIER_GROUP);
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoProcessCommandList3_Vtbl {
pub const fn new<Identity: ID3D12VideoProcessCommandList3_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Barrier<Identity: ID3D12VideoProcessCommandList3_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, numbarriergroups: u32, pbarriergroups: *const super::super::Graphics::Direct3D12::D3D12_BARRIER_GROUP) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoProcessCommandList3_Impl::Barrier(this, core::mem::transmute_copy(&numbarriergroups), core::mem::transmute_copy(&pbarriergroups))
}
}
Self { base__: ID3D12VideoProcessCommandList2_Vtbl::new::<Identity, OFFSET>(), Barrier: Barrier::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ID3D12VideoProcessCommandList3 as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12CommandList as windows_core::Interface>::IID || iid == &<ID3D12VideoProcessCommandList as windows_core::Interface>::IID || iid == &<ID3D12VideoProcessCommandList1 as windows_core::Interface>::IID || iid == &<ID3D12VideoProcessCommandList2 as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl windows_core::RuntimeName for ID3D12VideoProcessCommandList3 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::define_interface!(ID3D12VideoProcessor, ID3D12VideoProcessor_Vtbl, 0x304fdb32_bede_410a_8545_943ac6a46138);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl core::ops::Deref for ID3D12VideoProcessor {
type Target = super::super::Graphics::Direct3D12::ID3D12Pageable;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::interface_hierarchy!(ID3D12VideoProcessor, windows_core::IUnknown, super::super::Graphics::Direct3D12::ID3D12Object, super::super::Graphics::Direct3D12::ID3D12DeviceChild, super::super::Graphics::Direct3D12::ID3D12Pageable);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoProcessor {
pub unsafe fn GetNodeMask(&self) -> u32 {
unsafe { (windows_core::Interface::vtable(self).GetNodeMask)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetNumInputStreamDescs(&self) -> u32 {
unsafe { (windows_core::Interface::vtable(self).GetNumInputStreamDescs)(windows_core::Interface::as_raw(self)) }
}
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
pub unsafe fn GetInputStreamDescs(&self, pinputstreamdescs: &mut [D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC]) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetInputStreamDescs)(windows_core::Interface::as_raw(self), pinputstreamdescs.len().try_into().unwrap(), core::mem::transmute(pinputstreamdescs.as_ptr())).ok() }
}
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
pub unsafe fn GetOutputStreamDesc(&self) -> D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOutputStreamDesc)(windows_core::Interface::as_raw(self), &mut result__);
result__
}
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[repr(C)]
#[doc(hidden)]
pub struct ID3D12VideoProcessor_Vtbl {
pub base__: super::super::Graphics::Direct3D12::ID3D12Pageable_Vtbl,
pub GetNodeMask: unsafe extern "system" fn(*mut core::ffi::c_void) -> u32,
pub GetNumInputStreamDescs: unsafe extern "system" fn(*mut core::ffi::c_void) -> u32,
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
pub GetInputStreamDescs: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Dxgi_Common"))]
GetInputStreamDescs: usize,
#[cfg(feature = "Win32_Graphics_Dxgi_Common")]
pub GetOutputStreamDesc: unsafe extern "system" fn(*mut core::ffi::c_void, *mut D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC),
#[cfg(not(feature = "Win32_Graphics_Dxgi_Common"))]
GetOutputStreamDesc: usize,
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Send for ID3D12VideoProcessor {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Sync for ID3D12VideoProcessor {}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoProcessor_Impl: super::super::Graphics::Direct3D12::ID3D12Pageable_Impl {
fn GetNodeMask(&self) -> u32;
fn GetNumInputStreamDescs(&self) -> u32;
fn GetInputStreamDescs(&self, numinputstreamdescs: u32, pinputstreamdescs: *mut D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC) -> windows_core::Result<()>;
fn GetOutputStreamDesc(&self) -> D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC;
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoProcessor_Vtbl {
pub const fn new<Identity: ID3D12VideoProcessor_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetNodeMask<Identity: ID3D12VideoProcessor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> u32 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoProcessor_Impl::GetNodeMask(this)
}
}
unsafe extern "system" fn GetNumInputStreamDescs<Identity: ID3D12VideoProcessor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> u32 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoProcessor_Impl::GetNumInputStreamDescs(this)
}
}
unsafe extern "system" fn GetInputStreamDescs<Identity: ID3D12VideoProcessor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, numinputstreamdescs: u32, pinputstreamdescs: *mut D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoProcessor_Impl::GetInputStreamDescs(this, core::mem::transmute_copy(&numinputstreamdescs), core::mem::transmute_copy(&pinputstreamdescs)).into()
}
}
unsafe extern "system" fn GetOutputStreamDesc<Identity: ID3D12VideoProcessor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
*result__ = ID3D12VideoProcessor_Impl::GetOutputStreamDesc(this)
}
}
Self {
base__: super::super::Graphics::Direct3D12::ID3D12Pageable_Vtbl::new::<Identity, OFFSET>(),
GetNodeMask: GetNodeMask::<Identity, OFFSET>,
GetNumInputStreamDescs: GetNumInputStreamDescs::<Identity, OFFSET>,
GetInputStreamDescs: GetInputStreamDescs::<Identity, OFFSET>,
GetOutputStreamDesc: GetOutputStreamDesc::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ID3D12VideoProcessor as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Pageable as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl windows_core::RuntimeName for ID3D12VideoProcessor {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::define_interface!(ID3D12VideoProcessor1, ID3D12VideoProcessor1_Vtbl, 0xf3cfe615_553f_425c_86d8_ee8c1b1fb01c);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl core::ops::Deref for ID3D12VideoProcessor1 {
type Target = ID3D12VideoProcessor;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
windows_core::imp::interface_hierarchy!(ID3D12VideoProcessor1, windows_core::IUnknown, super::super::Graphics::Direct3D12::ID3D12Object, super::super::Graphics::Direct3D12::ID3D12DeviceChild, super::super::Graphics::Direct3D12::ID3D12Pageable, ID3D12VideoProcessor);
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl ID3D12VideoProcessor1 {
pub unsafe fn GetProtectedResourceSession<T>(&self, result__: *mut Option<T>) -> windows_core::Result<()>
where
T: windows_core::Interface,
{
unsafe { (windows_core::Interface::vtable(self).GetProtectedResourceSession)(windows_core::Interface::as_raw(self), &T::IID, result__ as *mut _ as *mut _).ok() }
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
#[repr(C)]
#[doc(hidden)]
pub struct ID3D12VideoProcessor1_Vtbl {
pub base__: ID3D12VideoProcessor_Vtbl,
pub GetProtectedResourceSession: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Send for ID3D12VideoProcessor1 {}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
unsafe impl Sync for ID3D12VideoProcessor1 {}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
pub trait ID3D12VideoProcessor1_Impl: ID3D12VideoProcessor_Impl {
fn GetProtectedResourceSession(&self, riid: *const windows_core::GUID, ppprotectedsession: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl ID3D12VideoProcessor1_Vtbl {
pub const fn new<Identity: ID3D12VideoProcessor1_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetProtectedResourceSession<Identity: ID3D12VideoProcessor1_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppprotectedsession: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ID3D12VideoProcessor1_Impl::GetProtectedResourceSession(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppprotectedsession)).into()
}
}
Self { base__: ID3D12VideoProcessor_Vtbl::new::<Identity, OFFSET>(), GetProtectedResourceSession: GetProtectedResourceSession::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ID3D12VideoProcessor1 as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Object as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12DeviceChild as windows_core::Interface>::IID || iid == &<super::super::Graphics::Direct3D12::ID3D12Pageable as windows_core::Interface>::IID || iid == &<ID3D12VideoProcessor as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))]
impl windows_core::RuntimeName for ID3D12VideoProcessor1 {}
windows_core::imp::define_interface!(IDXVAHD_Device, IDXVAHD_Device_Vtbl, 0x95f12dfd_d77e_49be_815f_57d579634d6d);
windows_core::imp::interface_hierarchy!(IDXVAHD_Device, windows_core::IUnknown);
impl IDXVAHD_Device {
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn CreateVideoSurface(&self, width: u32, height: u32, format: super::super::Graphics::Direct3D9::D3DFORMAT, pool: super::super::Graphics::Direct3D9::D3DPOOL, usage: u32, r#type: DXVAHD_SURFACE_TYPE, ppsurfaces: &mut [Option<super::super::Graphics::Direct3D9::IDirect3DSurface9>], psharedhandle: Option<*mut super::super::Foundation::HANDLE>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).CreateVideoSurface)(windows_core::Interface::as_raw(self), width, height, format, pool, usage, r#type, ppsurfaces.len().try_into().unwrap(), core::mem::transmute(ppsurfaces.as_ptr()), psharedhandle.unwrap_or(core::mem::zeroed()) as _).ok() }
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn GetVideoProcessorDeviceCaps(&self, pcaps: *mut DXVAHD_VPDEVCAPS) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorDeviceCaps)(windows_core::Interface::as_raw(self), pcaps as _).ok() }
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn GetVideoProcessorOutputFormats(&self, pformats: &mut [super::super::Graphics::Direct3D9::D3DFORMAT]) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorOutputFormats)(windows_core::Interface::as_raw(self), pformats.len().try_into().unwrap(), core::mem::transmute(pformats.as_ptr())).ok() }
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn GetVideoProcessorInputFormats(&self, pformats: &mut [super::super::Graphics::Direct3D9::D3DFORMAT]) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorInputFormats)(windows_core::Interface::as_raw(self), pformats.len().try_into().unwrap(), core::mem::transmute(pformats.as_ptr())).ok() }
}
pub unsafe fn GetVideoProcessorCaps(&self, pcaps: &mut [DXVAHD_VPCAPS]) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorCaps)(windows_core::Interface::as_raw(self), pcaps.len().try_into().unwrap(), core::mem::transmute(pcaps.as_ptr())).ok() }
}
pub unsafe fn GetVideoProcessorCustomRates(&self, pvpguid: *const windows_core::GUID, prates: &mut [DXVAHD_CUSTOM_RATE_DATA]) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorCustomRates)(windows_core::Interface::as_raw(self), pvpguid, prates.len().try_into().unwrap(), core::mem::transmute(prates.as_ptr())).ok() }
}
pub unsafe fn GetVideoProcessorFilterRange(&self, filter: DXVAHD_FILTER) -> windows_core::Result<DXVAHD_FILTER_RANGE_DATA> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetVideoProcessorFilterRange)(windows_core::Interface::as_raw(self), filter, &mut result__).map(|| result__)
}
}
pub unsafe fn CreateVideoProcessor(&self, pvpguid: *const windows_core::GUID) -> windows_core::Result<IDXVAHD_VideoProcessor> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateVideoProcessor)(windows_core::Interface::as_raw(self), pvpguid, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IDXVAHD_Device_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub CreateVideoSurface: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, super::super::Graphics::Direct3D9::D3DFORMAT, super::super::Graphics::Direct3D9::D3DPOOL, u32, DXVAHD_SURFACE_TYPE, u32, *mut *mut core::ffi::c_void, *mut super::super::Foundation::HANDLE) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
CreateVideoSurface: usize,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub GetVideoProcessorDeviceCaps: unsafe extern "system" fn(*mut core::ffi::c_void, *mut DXVAHD_VPDEVCAPS) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
GetVideoProcessorDeviceCaps: usize,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub GetVideoProcessorOutputFormats: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
GetVideoProcessorOutputFormats: usize,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub GetVideoProcessorInputFormats: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
GetVideoProcessorInputFormats: usize,
pub GetVideoProcessorCaps: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut DXVAHD_VPCAPS) -> windows_core::HRESULT,
pub GetVideoProcessorCustomRates: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, u32, *mut DXVAHD_CUSTOM_RATE_DATA) -> windows_core::HRESULT,
pub GetVideoProcessorFilterRange: unsafe extern "system" fn(*mut core::ffi::c_void, DXVAHD_FILTER, *mut DXVAHD_FILTER_RANGE_DATA) -> windows_core::HRESULT,
pub CreateVideoProcessor: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub trait IDXVAHD_Device_Impl: windows_core::IUnknownImpl {
fn CreateVideoSurface(&self, width: u32, height: u32, format: super::super::Graphics::Direct3D9::D3DFORMAT, pool: super::super::Graphics::Direct3D9::D3DPOOL, usage: u32, r#type: DXVAHD_SURFACE_TYPE, numsurfaces: u32, ppsurfaces: *mut Option<super::super::Graphics::Direct3D9::IDirect3DSurface9>, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>;
fn GetVideoProcessorDeviceCaps(&self, pcaps: *mut DXVAHD_VPDEVCAPS) -> windows_core::Result<()>;
fn GetVideoProcessorOutputFormats(&self, count: u32, pformats: *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> windows_core::Result<()>;
fn GetVideoProcessorInputFormats(&self, count: u32, pformats: *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> windows_core::Result<()>;
fn GetVideoProcessorCaps(&self, count: u32, pcaps: *mut DXVAHD_VPCAPS) -> windows_core::Result<()>;
fn GetVideoProcessorCustomRates(&self, pvpguid: *const windows_core::GUID, count: u32, prates: *mut DXVAHD_CUSTOM_RATE_DATA) -> windows_core::Result<()>;
fn GetVideoProcessorFilterRange(&self, filter: DXVAHD_FILTER) -> windows_core::Result<DXVAHD_FILTER_RANGE_DATA>;
fn CreateVideoProcessor(&self, pvpguid: *const windows_core::GUID) -> windows_core::Result<IDXVAHD_VideoProcessor>;
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl IDXVAHD_Device_Vtbl {
pub const fn new<Identity: IDXVAHD_Device_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateVideoSurface<Identity: IDXVAHD_Device_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, width: u32, height: u32, format: super::super::Graphics::Direct3D9::D3DFORMAT, pool: super::super::Graphics::Direct3D9::D3DPOOL, usage: u32, r#type: DXVAHD_SURFACE_TYPE, numsurfaces: u32, ppsurfaces: *mut *mut core::ffi::c_void, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDXVAHD_Device_Impl::CreateVideoSurface(this, core::mem::transmute_copy(&width), core::mem::transmute_copy(&height), core::mem::transmute_copy(&format), core::mem::transmute_copy(&pool), core::mem::transmute_copy(&usage), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&numsurfaces), core::mem::transmute_copy(&ppsurfaces), core::mem::transmute_copy(&psharedhandle)).into()
}
}
unsafe extern "system" fn GetVideoProcessorDeviceCaps<Identity: IDXVAHD_Device_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcaps: *mut DXVAHD_VPDEVCAPS) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDXVAHD_Device_Impl::GetVideoProcessorDeviceCaps(this, core::mem::transmute_copy(&pcaps)).into()
}
}
unsafe extern "system" fn GetVideoProcessorOutputFormats<Identity: IDXVAHD_Device_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, count: u32, pformats: *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDXVAHD_Device_Impl::GetVideoProcessorOutputFormats(this, core::mem::transmute_copy(&count), core::mem::transmute_copy(&pformats)).into()
}
}
unsafe extern "system" fn GetVideoProcessorInputFormats<Identity: IDXVAHD_Device_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, count: u32, pformats: *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDXVAHD_Device_Impl::GetVideoProcessorInputFormats(this, core::mem::transmute_copy(&count), core::mem::transmute_copy(&pformats)).into()
}
}
unsafe extern "system" fn GetVideoProcessorCaps<Identity: IDXVAHD_Device_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, count: u32, pcaps: *mut DXVAHD_VPCAPS) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDXVAHD_Device_Impl::GetVideoProcessorCaps(this, core::mem::transmute_copy(&count), core::mem::transmute_copy(&pcaps)).into()
}
}
unsafe extern "system" fn GetVideoProcessorCustomRates<Identity: IDXVAHD_Device_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pvpguid: *const windows_core::GUID, count: u32, prates: *mut DXVAHD_CUSTOM_RATE_DATA) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDXVAHD_Device_Impl::GetVideoProcessorCustomRates(this, core::mem::transmute_copy(&pvpguid), core::mem::transmute_copy(&count), core::mem::transmute_copy(&prates)).into()
}
}
unsafe extern "system" fn GetVideoProcessorFilterRange<Identity: IDXVAHD_Device_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, filter: DXVAHD_FILTER, prange: *mut DXVAHD_FILTER_RANGE_DATA) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IDXVAHD_Device_Impl::GetVideoProcessorFilterRange(this, core::mem::transmute_copy(&filter)) {
Ok(ok__) => {
prange.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn CreateVideoProcessor<Identity: IDXVAHD_Device_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pvpguid: *const windows_core::GUID, ppvideoprocessor: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IDXVAHD_Device_Impl::CreateVideoProcessor(this, core::mem::transmute_copy(&pvpguid)) {
Ok(ok__) => {
ppvideoprocessor.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CreateVideoSurface: CreateVideoSurface::<Identity, OFFSET>,
GetVideoProcessorDeviceCaps: GetVideoProcessorDeviceCaps::<Identity, OFFSET>,
GetVideoProcessorOutputFormats: GetVideoProcessorOutputFormats::<Identity, OFFSET>,
GetVideoProcessorInputFormats: GetVideoProcessorInputFormats::<Identity, OFFSET>,
GetVideoProcessorCaps: GetVideoProcessorCaps::<Identity, OFFSET>,
GetVideoProcessorCustomRates: GetVideoProcessorCustomRates::<Identity, OFFSET>,
GetVideoProcessorFilterRange: GetVideoProcessorFilterRange::<Identity, OFFSET>,
CreateVideoProcessor: CreateVideoProcessor::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IDXVAHD_Device as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl windows_core::RuntimeName for IDXVAHD_Device {}
windows_core::imp::define_interface!(IDXVAHD_VideoProcessor, IDXVAHD_VideoProcessor_Vtbl, 0x95f4edf4_6e03_4cd7_be1b_3075d665aa52);
windows_core::imp::interface_hierarchy!(IDXVAHD_VideoProcessor, windows_core::IUnknown);
impl IDXVAHD_VideoProcessor {
pub unsafe fn SetVideoProcessBltState(&self, state: DXVAHD_BLT_STATE, datasize: u32, pdata: *const core::ffi::c_void) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetVideoProcessBltState)(windows_core::Interface::as_raw(self), state, datasize, pdata).ok() }
}
pub unsafe fn GetVideoProcessBltState(&self, state: DXVAHD_BLT_STATE, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetVideoProcessBltState)(windows_core::Interface::as_raw(self), state, datasize, pdata as _).ok() }
}
pub unsafe fn SetVideoProcessStreamState(&self, streamnumber: u32, state: DXVAHD_STREAM_STATE, datasize: u32, pdata: *const core::ffi::c_void) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetVideoProcessStreamState)(windows_core::Interface::as_raw(self), streamnumber, state, datasize, pdata).ok() }
}
pub unsafe fn GetVideoProcessStreamState(&self, streamnumber: u32, state: DXVAHD_STREAM_STATE, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetVideoProcessStreamState)(windows_core::Interface::as_raw(self), streamnumber, state, datasize, pdata as _).ok() }
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn VideoProcessBltHD<P0>(&self, poutputsurface: P0, outputframe: u32, pstreams: &[DXVAHD_STREAM_DATA]) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Graphics::Direct3D9::IDirect3DSurface9>,
{
unsafe { (windows_core::Interface::vtable(self).VideoProcessBltHD)(windows_core::Interface::as_raw(self), poutputsurface.param().abi(), outputframe, pstreams.len().try_into().unwrap(), core::mem::transmute(pstreams.as_ptr())).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IDXVAHD_VideoProcessor_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetVideoProcessBltState: unsafe extern "system" fn(*mut core::ffi::c_void, DXVAHD_BLT_STATE, u32, *const core::ffi::c_void) -> windows_core::HRESULT,
pub GetVideoProcessBltState: unsafe extern "system" fn(*mut core::ffi::c_void, DXVAHD_BLT_STATE, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetVideoProcessStreamState: unsafe extern "system" fn(*mut core::ffi::c_void, u32, DXVAHD_STREAM_STATE, u32, *const core::ffi::c_void) -> windows_core::HRESULT,
pub GetVideoProcessStreamState: unsafe extern "system" fn(*mut core::ffi::c_void, u32, DXVAHD_STREAM_STATE, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub VideoProcessBltHD: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, u32, *const DXVAHD_STREAM_DATA) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
VideoProcessBltHD: usize,
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub trait IDXVAHD_VideoProcessor_Impl: windows_core::IUnknownImpl {
fn SetVideoProcessBltState(&self, state: DXVAHD_BLT_STATE, datasize: u32, pdata: *const core::ffi::c_void) -> windows_core::Result<()>;
fn GetVideoProcessBltState(&self, state: DXVAHD_BLT_STATE, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()>;
fn SetVideoProcessStreamState(&self, streamnumber: u32, state: DXVAHD_STREAM_STATE, datasize: u32, pdata: *const core::ffi::c_void) -> windows_core::Result<()>;
fn GetVideoProcessStreamState(&self, streamnumber: u32, state: DXVAHD_STREAM_STATE, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()>;
fn VideoProcessBltHD(&self, poutputsurface: windows_core::Ref<super::super::Graphics::Direct3D9::IDirect3DSurface9>, outputframe: u32, streamcount: u32, pstreams: *const DXVAHD_STREAM_DATA) -> windows_core::Result<()>;
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl IDXVAHD_VideoProcessor_Vtbl {
pub const fn new<Identity: IDXVAHD_VideoProcessor_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetVideoProcessBltState<Identity: IDXVAHD_VideoProcessor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, state: DXVAHD_BLT_STATE, datasize: u32, pdata: *const core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDXVAHD_VideoProcessor_Impl::SetVideoProcessBltState(this, core::mem::transmute_copy(&state), core::mem::transmute_copy(&datasize), core::mem::transmute_copy(&pdata)).into()
}
}
unsafe extern "system" fn GetVideoProcessBltState<Identity: IDXVAHD_VideoProcessor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, state: DXVAHD_BLT_STATE, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDXVAHD_VideoProcessor_Impl::GetVideoProcessBltState(this, core::mem::transmute_copy(&state), core::mem::transmute_copy(&datasize), core::mem::transmute_copy(&pdata)).into()
}
}
unsafe extern "system" fn SetVideoProcessStreamState<Identity: IDXVAHD_VideoProcessor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, streamnumber: u32, state: DXVAHD_STREAM_STATE, datasize: u32, pdata: *const core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDXVAHD_VideoProcessor_Impl::SetVideoProcessStreamState(this, core::mem::transmute_copy(&streamnumber), core::mem::transmute_copy(&state), core::mem::transmute_copy(&datasize), core::mem::transmute_copy(&pdata)).into()
}
}
unsafe extern "system" fn GetVideoProcessStreamState<Identity: IDXVAHD_VideoProcessor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, streamnumber: u32, state: DXVAHD_STREAM_STATE, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDXVAHD_VideoProcessor_Impl::GetVideoProcessStreamState(this, core::mem::transmute_copy(&streamnumber), core::mem::transmute_copy(&state), core::mem::transmute_copy(&datasize), core::mem::transmute_copy(&pdata)).into()
}
}
unsafe extern "system" fn VideoProcessBltHD<Identity: IDXVAHD_VideoProcessor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, poutputsurface: *mut core::ffi::c_void, outputframe: u32, streamcount: u32, pstreams: *const DXVAHD_STREAM_DATA) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDXVAHD_VideoProcessor_Impl::VideoProcessBltHD(this, core::mem::transmute_copy(&poutputsurface), core::mem::transmute_copy(&outputframe), core::mem::transmute_copy(&streamcount), core::mem::transmute_copy(&pstreams)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetVideoProcessBltState: SetVideoProcessBltState::<Identity, OFFSET>,
GetVideoProcessBltState: GetVideoProcessBltState::<Identity, OFFSET>,
SetVideoProcessStreamState: SetVideoProcessStreamState::<Identity, OFFSET>,
GetVideoProcessStreamState: GetVideoProcessStreamState::<Identity, OFFSET>,
VideoProcessBltHD: VideoProcessBltHD::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IDXVAHD_VideoProcessor as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl windows_core::RuntimeName for IDXVAHD_VideoProcessor {}
windows_core::imp::define_interface!(IDirect3D9ExOverlayExtension, IDirect3D9ExOverlayExtension_Vtbl, 0x187aeb13_aaf5_4c59_876d_e059088c0df8);
windows_core::imp::interface_hierarchy!(IDirect3D9ExOverlayExtension, windows_core::IUnknown);
impl IDirect3D9ExOverlayExtension {
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn CheckDeviceOverlayType(&self, adapter: u32, devtype: super::super::Graphics::Direct3D9::D3DDEVTYPE, overlaywidth: u32, overlayheight: u32, overlayformat: super::super::Graphics::Direct3D9::D3DFORMAT, pdisplaymode: *mut super::super::Graphics::Direct3D9::D3DDISPLAYMODEEX, displayrotation: super::super::Graphics::Direct3D9::D3DDISPLAYROTATION, poverlaycaps: *mut D3DOVERLAYCAPS) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).CheckDeviceOverlayType)(windows_core::Interface::as_raw(self), adapter, devtype, overlaywidth, overlayheight, overlayformat, pdisplaymode as _, displayrotation, poverlaycaps as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IDirect3D9ExOverlayExtension_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub CheckDeviceOverlayType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, super::super::Graphics::Direct3D9::D3DDEVTYPE, u32, u32, super::super::Graphics::Direct3D9::D3DFORMAT, *mut super::super::Graphics::Direct3D9::D3DDISPLAYMODEEX, super::super::Graphics::Direct3D9::D3DDISPLAYROTATION, *mut D3DOVERLAYCAPS) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
CheckDeviceOverlayType: usize,
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub trait IDirect3D9ExOverlayExtension_Impl: windows_core::IUnknownImpl {
fn CheckDeviceOverlayType(&self, adapter: u32, devtype: super::super::Graphics::Direct3D9::D3DDEVTYPE, overlaywidth: u32, overlayheight: u32, overlayformat: super::super::Graphics::Direct3D9::D3DFORMAT, pdisplaymode: *mut super::super::Graphics::Direct3D9::D3DDISPLAYMODEEX, displayrotation: super::super::Graphics::Direct3D9::D3DDISPLAYROTATION, poverlaycaps: *mut D3DOVERLAYCAPS) -> windows_core::Result<()>;
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl IDirect3D9ExOverlayExtension_Vtbl {
pub const fn new<Identity: IDirect3D9ExOverlayExtension_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CheckDeviceOverlayType<Identity: IDirect3D9ExOverlayExtension_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, adapter: u32, devtype: super::super::Graphics::Direct3D9::D3DDEVTYPE, overlaywidth: u32, overlayheight: u32, overlayformat: super::super::Graphics::Direct3D9::D3DFORMAT, pdisplaymode: *mut super::super::Graphics::Direct3D9::D3DDISPLAYMODEEX, displayrotation: super::super::Graphics::Direct3D9::D3DDISPLAYROTATION, poverlaycaps: *mut D3DOVERLAYCAPS) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirect3D9ExOverlayExtension_Impl::CheckDeviceOverlayType(this, core::mem::transmute_copy(&adapter), core::mem::transmute_copy(&devtype), core::mem::transmute_copy(&overlaywidth), core::mem::transmute_copy(&overlayheight), core::mem::transmute_copy(&overlayformat), core::mem::transmute_copy(&pdisplaymode), core::mem::transmute_copy(&displayrotation), core::mem::transmute_copy(&poverlaycaps)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), CheckDeviceOverlayType: CheckDeviceOverlayType::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IDirect3D9ExOverlayExtension as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl windows_core::RuntimeName for IDirect3D9ExOverlayExtension {}
windows_core::imp::define_interface!(IDirect3DAuthenticatedChannel9, IDirect3DAuthenticatedChannel9_Vtbl, 0xff24beee_da21_4beb_98b5_d2f899f98af9);
windows_core::imp::interface_hierarchy!(IDirect3DAuthenticatedChannel9, windows_core::IUnknown);
impl IDirect3DAuthenticatedChannel9 {
pub unsafe fn GetCertificateSize(&self, pcertificatesize: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetCertificateSize)(windows_core::Interface::as_raw(self), pcertificatesize as _).ok() }
}
pub unsafe fn GetCertificate(&self, certifactesize: u32, ppcertificate: *mut u8) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetCertificate)(windows_core::Interface::as_raw(self), certifactesize, ppcertificate as _).ok() }
}
pub unsafe fn NegotiateKeyExchange(&self, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).NegotiateKeyExchange)(windows_core::Interface::as_raw(self), datasize, pdata as _).ok() }
}
pub unsafe fn Query(&self, inputsize: u32, pinput: *const core::ffi::c_void, outputsize: u32, poutput: *mut core::ffi::c_void) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Query)(windows_core::Interface::as_raw(self), inputsize, pinput, outputsize, poutput as _).ok() }
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn Configure(&self, inputsize: u32, pinput: *const core::ffi::c_void, poutput: *mut super::super::Graphics::Direct3D9::D3DAUTHENTICATEDCHANNEL_CONFIGURE_OUTPUT) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Configure)(windows_core::Interface::as_raw(self), inputsize, pinput, poutput as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IDirect3DAuthenticatedChannel9_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetCertificateSize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetCertificate: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u8) -> windows_core::HRESULT,
pub NegotiateKeyExchange: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Query: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub Configure: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const core::ffi::c_void, *mut super::super::Graphics::Direct3D9::D3DAUTHENTICATEDCHANNEL_CONFIGURE_OUTPUT) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
Configure: usize,
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub trait IDirect3DAuthenticatedChannel9_Impl: windows_core::IUnknownImpl {
fn GetCertificateSize(&self, pcertificatesize: *mut u32) -> windows_core::Result<()>;
fn GetCertificate(&self, certifactesize: u32, ppcertificate: *mut u8) -> windows_core::Result<()>;
fn NegotiateKeyExchange(&self, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()>;
fn Query(&self, inputsize: u32, pinput: *const core::ffi::c_void, outputsize: u32, poutput: *mut core::ffi::c_void) -> windows_core::Result<()>;
fn Configure(&self, inputsize: u32, pinput: *const core::ffi::c_void, poutput: *mut super::super::Graphics::Direct3D9::D3DAUTHENTICATEDCHANNEL_CONFIGURE_OUTPUT) -> windows_core::Result<()>;
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl IDirect3DAuthenticatedChannel9_Vtbl {
pub const fn new<Identity: IDirect3DAuthenticatedChannel9_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetCertificateSize<Identity: IDirect3DAuthenticatedChannel9_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcertificatesize: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirect3DAuthenticatedChannel9_Impl::GetCertificateSize(this, core::mem::transmute_copy(&pcertificatesize)).into()
}
}
unsafe extern "system" fn GetCertificate<Identity: IDirect3DAuthenticatedChannel9_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, certifactesize: u32, ppcertificate: *mut u8) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirect3DAuthenticatedChannel9_Impl::GetCertificate(this, core::mem::transmute_copy(&certifactesize), core::mem::transmute_copy(&ppcertificate)).into()
}
}
unsafe extern "system" fn NegotiateKeyExchange<Identity: IDirect3DAuthenticatedChannel9_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirect3DAuthenticatedChannel9_Impl::NegotiateKeyExchange(this, core::mem::transmute_copy(&datasize), core::mem::transmute_copy(&pdata)).into()
}
}
unsafe extern "system" fn Query<Identity: IDirect3DAuthenticatedChannel9_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, inputsize: u32, pinput: *const core::ffi::c_void, outputsize: u32, poutput: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirect3DAuthenticatedChannel9_Impl::Query(this, core::mem::transmute_copy(&inputsize), core::mem::transmute_copy(&pinput), core::mem::transmute_copy(&outputsize), core::mem::transmute_copy(&poutput)).into()
}
}
unsafe extern "system" fn Configure<Identity: IDirect3DAuthenticatedChannel9_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, inputsize: u32, pinput: *const core::ffi::c_void, poutput: *mut super::super::Graphics::Direct3D9::D3DAUTHENTICATEDCHANNEL_CONFIGURE_OUTPUT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirect3DAuthenticatedChannel9_Impl::Configure(this, core::mem::transmute_copy(&inputsize), core::mem::transmute_copy(&pinput), core::mem::transmute_copy(&poutput)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetCertificateSize: GetCertificateSize::<Identity, OFFSET>,
GetCertificate: GetCertificate::<Identity, OFFSET>,
NegotiateKeyExchange: NegotiateKeyExchange::<Identity, OFFSET>,
Query: Query::<Identity, OFFSET>,
Configure: Configure::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IDirect3DAuthenticatedChannel9 as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl windows_core::RuntimeName for IDirect3DAuthenticatedChannel9 {}
windows_core::imp::define_interface!(IDirect3DCryptoSession9, IDirect3DCryptoSession9_Vtbl, 0xfa0ab799_7a9c_48ca_8c5b_237e71a54434);
windows_core::imp::interface_hierarchy!(IDirect3DCryptoSession9, windows_core::IUnknown);
impl IDirect3DCryptoSession9 {
pub unsafe fn GetCertificateSize(&self, pcertificatesize: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetCertificateSize)(windows_core::Interface::as_raw(self), pcertificatesize as _).ok() }
}
pub unsafe fn GetCertificate(&self, certifactesize: u32, ppcertificate: *mut u8) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetCertificate)(windows_core::Interface::as_raw(self), certifactesize, ppcertificate as _).ok() }
}
pub unsafe fn NegotiateKeyExchange(&self, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).NegotiateKeyExchange)(windows_core::Interface::as_raw(self), datasize, pdata as _).ok() }
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn EncryptionBlt<P0, P1>(&self, psrcsurface: P0, pdstsurface: P1, dstsurfacesize: u32, piv: *mut core::ffi::c_void) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Graphics::Direct3D9::IDirect3DSurface9>,
P1: windows_core::Param<super::super::Graphics::Direct3D9::IDirect3DSurface9>,
{
unsafe { (windows_core::Interface::vtable(self).EncryptionBlt)(windows_core::Interface::as_raw(self), psrcsurface.param().abi(), pdstsurface.param().abi(), dstsurfacesize, piv as _).ok() }
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn DecryptionBlt<P0, P1>(&self, psrcsurface: P0, pdstsurface: P1, srcsurfacesize: u32, pencryptedblockinfo: *mut super::super::Graphics::Direct3D9::D3DENCRYPTED_BLOCK_INFO, pcontentkey: *mut core::ffi::c_void, piv: *mut core::ffi::c_void) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Graphics::Direct3D9::IDirect3DSurface9>,
P1: windows_core::Param<super::super::Graphics::Direct3D9::IDirect3DSurface9>,
{
unsafe { (windows_core::Interface::vtable(self).DecryptionBlt)(windows_core::Interface::as_raw(self), psrcsurface.param().abi(), pdstsurface.param().abi(), srcsurfacesize, pencryptedblockinfo as _, pcontentkey as _, piv as _).ok() }
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn GetSurfacePitch<P0>(&self, psrcsurface: P0, psurfacepitch: *mut u32) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Graphics::Direct3D9::IDirect3DSurface9>,
{
unsafe { (windows_core::Interface::vtable(self).GetSurfacePitch)(windows_core::Interface::as_raw(self), psrcsurface.param().abi(), psurfacepitch as _).ok() }
}
pub unsafe fn StartSessionKeyRefresh(&self, prandomnumber: *mut core::ffi::c_void, randomnumbersize: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).StartSessionKeyRefresh)(windows_core::Interface::as_raw(self), prandomnumber as _, randomnumbersize).ok() }
}
pub unsafe fn FinishSessionKeyRefresh(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).FinishSessionKeyRefresh)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn GetEncryptionBltKey(&self, preadbackkey: *mut core::ffi::c_void, keysize: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetEncryptionBltKey)(windows_core::Interface::as_raw(self), preadbackkey as _, keysize).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IDirect3DCryptoSession9_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetCertificateSize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetCertificate: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u8) -> windows_core::HRESULT,
pub NegotiateKeyExchange: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub EncryptionBlt: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
EncryptionBlt: usize,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub DecryptionBlt: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, u32, *mut super::super::Graphics::Direct3D9::D3DENCRYPTED_BLOCK_INFO, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
DecryptionBlt: usize,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub GetSurfacePitch: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
GetSurfacePitch: usize,
pub StartSessionKeyRefresh: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub FinishSessionKeyRefresh: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetEncryptionBltKey: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32) -> windows_core::HRESULT,
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub trait IDirect3DCryptoSession9_Impl: windows_core::IUnknownImpl {
fn GetCertificateSize(&self, pcertificatesize: *mut u32) -> windows_core::Result<()>;
fn GetCertificate(&self, certifactesize: u32, ppcertificate: *mut u8) -> windows_core::Result<()>;
fn NegotiateKeyExchange(&self, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()>;
fn EncryptionBlt(&self, psrcsurface: windows_core::Ref<super::super::Graphics::Direct3D9::IDirect3DSurface9>, pdstsurface: windows_core::Ref<super::super::Graphics::Direct3D9::IDirect3DSurface9>, dstsurfacesize: u32, piv: *mut core::ffi::c_void) -> windows_core::Result<()>;
fn DecryptionBlt(&self, psrcsurface: windows_core::Ref<super::super::Graphics::Direct3D9::IDirect3DSurface9>, pdstsurface: windows_core::Ref<super::super::Graphics::Direct3D9::IDirect3DSurface9>, srcsurfacesize: u32, pencryptedblockinfo: *mut super::super::Graphics::Direct3D9::D3DENCRYPTED_BLOCK_INFO, pcontentkey: *mut core::ffi::c_void, piv: *mut core::ffi::c_void) -> windows_core::Result<()>;
fn GetSurfacePitch(&self, psrcsurface: windows_core::Ref<super::super::Graphics::Direct3D9::IDirect3DSurface9>, psurfacepitch: *mut u32) -> windows_core::Result<()>;
fn StartSessionKeyRefresh(&self, prandomnumber: *mut core::ffi::c_void, randomnumbersize: u32) -> windows_core::Result<()>;
fn FinishSessionKeyRefresh(&self) -> windows_core::Result<()>;
fn GetEncryptionBltKey(&self, preadbackkey: *mut core::ffi::c_void, keysize: u32) -> windows_core::Result<()>;
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl IDirect3DCryptoSession9_Vtbl {
pub const fn new<Identity: IDirect3DCryptoSession9_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetCertificateSize<Identity: IDirect3DCryptoSession9_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcertificatesize: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirect3DCryptoSession9_Impl::GetCertificateSize(this, core::mem::transmute_copy(&pcertificatesize)).into()
}
}
unsafe extern "system" fn GetCertificate<Identity: IDirect3DCryptoSession9_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, certifactesize: u32, ppcertificate: *mut u8) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirect3DCryptoSession9_Impl::GetCertificate(this, core::mem::transmute_copy(&certifactesize), core::mem::transmute_copy(&ppcertificate)).into()
}
}
unsafe extern "system" fn NegotiateKeyExchange<Identity: IDirect3DCryptoSession9_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirect3DCryptoSession9_Impl::NegotiateKeyExchange(this, core::mem::transmute_copy(&datasize), core::mem::transmute_copy(&pdata)).into()
}
}
unsafe extern "system" fn EncryptionBlt<Identity: IDirect3DCryptoSession9_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, psrcsurface: *mut core::ffi::c_void, pdstsurface: *mut core::ffi::c_void, dstsurfacesize: u32, piv: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirect3DCryptoSession9_Impl::EncryptionBlt(this, core::mem::transmute_copy(&psrcsurface), core::mem::transmute_copy(&pdstsurface), core::mem::transmute_copy(&dstsurfacesize), core::mem::transmute_copy(&piv)).into()
}
}
unsafe extern "system" fn DecryptionBlt<Identity: IDirect3DCryptoSession9_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, psrcsurface: *mut core::ffi::c_void, pdstsurface: *mut core::ffi::c_void, srcsurfacesize: u32, pencryptedblockinfo: *mut super::super::Graphics::Direct3D9::D3DENCRYPTED_BLOCK_INFO, pcontentkey: *mut core::ffi::c_void, piv: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirect3DCryptoSession9_Impl::DecryptionBlt(this, core::mem::transmute_copy(&psrcsurface), core::mem::transmute_copy(&pdstsurface), core::mem::transmute_copy(&srcsurfacesize), core::mem::transmute_copy(&pencryptedblockinfo), core::mem::transmute_copy(&pcontentkey), core::mem::transmute_copy(&piv)).into()
}
}
unsafe extern "system" fn GetSurfacePitch<Identity: IDirect3DCryptoSession9_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, psrcsurface: *mut core::ffi::c_void, psurfacepitch: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirect3DCryptoSession9_Impl::GetSurfacePitch(this, core::mem::transmute_copy(&psrcsurface), core::mem::transmute_copy(&psurfacepitch)).into()
}
}
unsafe extern "system" fn StartSessionKeyRefresh<Identity: IDirect3DCryptoSession9_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, prandomnumber: *mut core::ffi::c_void, randomnumbersize: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirect3DCryptoSession9_Impl::StartSessionKeyRefresh(this, core::mem::transmute_copy(&prandomnumber), core::mem::transmute_copy(&randomnumbersize)).into()
}
}
unsafe extern "system" fn FinishSessionKeyRefresh<Identity: IDirect3DCryptoSession9_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirect3DCryptoSession9_Impl::FinishSessionKeyRefresh(this).into()
}
}
unsafe extern "system" fn GetEncryptionBltKey<Identity: IDirect3DCryptoSession9_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, preadbackkey: *mut core::ffi::c_void, keysize: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirect3DCryptoSession9_Impl::GetEncryptionBltKey(this, core::mem::transmute_copy(&preadbackkey), core::mem::transmute_copy(&keysize)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetCertificateSize: GetCertificateSize::<Identity, OFFSET>,
GetCertificate: GetCertificate::<Identity, OFFSET>,
NegotiateKeyExchange: NegotiateKeyExchange::<Identity, OFFSET>,
EncryptionBlt: EncryptionBlt::<Identity, OFFSET>,
DecryptionBlt: DecryptionBlt::<Identity, OFFSET>,
GetSurfacePitch: GetSurfacePitch::<Identity, OFFSET>,
StartSessionKeyRefresh: StartSessionKeyRefresh::<Identity, OFFSET>,
FinishSessionKeyRefresh: FinishSessionKeyRefresh::<Identity, OFFSET>,
GetEncryptionBltKey: GetEncryptionBltKey::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IDirect3DCryptoSession9 as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl windows_core::RuntimeName for IDirect3DCryptoSession9 {}
windows_core::imp::define_interface!(IDirect3DDevice9Video, IDirect3DDevice9Video_Vtbl, 0x26dc4561_a1ee_4ae7_96da_118a36c0ec95);
windows_core::imp::interface_hierarchy!(IDirect3DDevice9Video, windows_core::IUnknown);
impl IDirect3DDevice9Video {
pub unsafe fn GetContentProtectionCaps(&self, pcryptotype: *const windows_core::GUID, pdecodeprofile: *const windows_core::GUID, pcaps: *mut D3DCONTENTPROTECTIONCAPS) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetContentProtectionCaps)(windows_core::Interface::as_raw(self), pcryptotype, pdecodeprofile, pcaps as _).ok() }
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn CreateAuthenticatedChannel(&self, channeltype: super::super::Graphics::Direct3D9::D3DAUTHENTICATEDCHANNELTYPE, ppauthenticatedchannel: *mut Option<IDirect3DAuthenticatedChannel9>, pchannelhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).CreateAuthenticatedChannel)(windows_core::Interface::as_raw(self), channeltype, core::mem::transmute(ppauthenticatedchannel), pchannelhandle as _).ok() }
}
pub unsafe fn CreateCryptoSession(&self, pcryptotype: *const windows_core::GUID, pdecodeprofile: *const windows_core::GUID, ppcryptosession: *mut Option<IDirect3DCryptoSession9>, pcryptohandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).CreateCryptoSession)(windows_core::Interface::as_raw(self), pcryptotype, pdecodeprofile, core::mem::transmute(ppcryptosession), pcryptohandle as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IDirect3DDevice9Video_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetContentProtectionCaps: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const windows_core::GUID, *mut D3DCONTENTPROTECTIONCAPS) -> windows_core::HRESULT,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub CreateAuthenticatedChannel: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Graphics::Direct3D9::D3DAUTHENTICATEDCHANNELTYPE, *mut *mut core::ffi::c_void, *mut super::super::Foundation::HANDLE) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
CreateAuthenticatedChannel: usize,
pub CreateCryptoSession: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const windows_core::GUID, *mut *mut core::ffi::c_void, *mut super::super::Foundation::HANDLE) -> windows_core::HRESULT,
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub trait IDirect3DDevice9Video_Impl: windows_core::IUnknownImpl {
fn GetContentProtectionCaps(&self, pcryptotype: *const windows_core::GUID, pdecodeprofile: *const windows_core::GUID, pcaps: *mut D3DCONTENTPROTECTIONCAPS) -> windows_core::Result<()>;
fn CreateAuthenticatedChannel(&self, channeltype: super::super::Graphics::Direct3D9::D3DAUTHENTICATEDCHANNELTYPE, ppauthenticatedchannel: windows_core::OutRef<IDirect3DAuthenticatedChannel9>, pchannelhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>;
fn CreateCryptoSession(&self, pcryptotype: *const windows_core::GUID, pdecodeprofile: *const windows_core::GUID, ppcryptosession: windows_core::OutRef<IDirect3DCryptoSession9>, pcryptohandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>;
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl IDirect3DDevice9Video_Vtbl {
pub const fn new<Identity: IDirect3DDevice9Video_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetContentProtectionCaps<Identity: IDirect3DDevice9Video_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcryptotype: *const windows_core::GUID, pdecodeprofile: *const windows_core::GUID, pcaps: *mut D3DCONTENTPROTECTIONCAPS) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirect3DDevice9Video_Impl::GetContentProtectionCaps(this, core::mem::transmute_copy(&pcryptotype), core::mem::transmute_copy(&pdecodeprofile), core::mem::transmute_copy(&pcaps)).into()
}
}
unsafe extern "system" fn CreateAuthenticatedChannel<Identity: IDirect3DDevice9Video_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, channeltype: super::super::Graphics::Direct3D9::D3DAUTHENTICATEDCHANNELTYPE, ppauthenticatedchannel: *mut *mut core::ffi::c_void, pchannelhandle: *mut super::super::Foundation::HANDLE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirect3DDevice9Video_Impl::CreateAuthenticatedChannel(this, core::mem::transmute_copy(&channeltype), core::mem::transmute_copy(&ppauthenticatedchannel), core::mem::transmute_copy(&pchannelhandle)).into()
}
}
unsafe extern "system" fn CreateCryptoSession<Identity: IDirect3DDevice9Video_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcryptotype: *const windows_core::GUID, pdecodeprofile: *const windows_core::GUID, ppcryptosession: *mut *mut core::ffi::c_void, pcryptohandle: *mut super::super::Foundation::HANDLE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirect3DDevice9Video_Impl::CreateCryptoSession(this, core::mem::transmute_copy(&pcryptotype), core::mem::transmute_copy(&pdecodeprofile), core::mem::transmute_copy(&ppcryptosession), core::mem::transmute_copy(&pcryptohandle)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetContentProtectionCaps: GetContentProtectionCaps::<Identity, OFFSET>,
CreateAuthenticatedChannel: CreateAuthenticatedChannel::<Identity, OFFSET>,
CreateCryptoSession: CreateCryptoSession::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IDirect3DDevice9Video as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl windows_core::RuntimeName for IDirect3DDevice9Video {}
windows_core::imp::define_interface!(IDirect3DDeviceManager9, IDirect3DDeviceManager9_Vtbl, 0xa0cade0f_06d5_4cf4_a1c7_f3cdd725aa75);
windows_core::imp::interface_hierarchy!(IDirect3DDeviceManager9, windows_core::IUnknown);
impl IDirect3DDeviceManager9 {
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn ResetDevice<P0>(&self, pdevice: P0, resettoken: u32) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Graphics::Direct3D9::IDirect3DDevice9>,
{
unsafe { (windows_core::Interface::vtable(self).ResetDevice)(windows_core::Interface::as_raw(self), pdevice.param().abi(), resettoken).ok() }
}
pub unsafe fn OpenDeviceHandle(&self) -> windows_core::Result<super::super::Foundation::HANDLE> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).OpenDeviceHandle)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn CloseDeviceHandle(&self, hdevice: super::super::Foundation::HANDLE) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).CloseDeviceHandle)(windows_core::Interface::as_raw(self), hdevice).ok() }
}
pub unsafe fn TestDevice(&self, hdevice: super::super::Foundation::HANDLE) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).TestDevice)(windows_core::Interface::as_raw(self), hdevice).ok() }
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn LockDevice(&self, hdevice: super::super::Foundation::HANDLE, ppdevice: *mut Option<super::super::Graphics::Direct3D9::IDirect3DDevice9>, fblock: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).LockDevice)(windows_core::Interface::as_raw(self), hdevice, core::mem::transmute(ppdevice), fblock.into()).ok() }
}
pub unsafe fn UnlockDevice(&self, hdevice: super::super::Foundation::HANDLE, fsavestate: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).UnlockDevice)(windows_core::Interface::as_raw(self), hdevice, fsavestate.into()).ok() }
}
pub unsafe fn GetVideoService(&self, hdevice: super::super::Foundation::HANDLE, riid: *const windows_core::GUID, ppservice: *mut *mut core::ffi::c_void) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetVideoService)(windows_core::Interface::as_raw(self), hdevice, riid, ppservice as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IDirect3DDeviceManager9_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub ResetDevice: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
ResetDevice: usize,
pub OpenDeviceHandle: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::HANDLE) -> windows_core::HRESULT,
pub CloseDeviceHandle: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::HANDLE) -> windows_core::HRESULT,
pub TestDevice: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::HANDLE) -> windows_core::HRESULT,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub LockDevice: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::HANDLE, *mut *mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
LockDevice: usize,
pub UnlockDevice: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::HANDLE, windows_core::BOOL) -> windows_core::HRESULT,
pub GetVideoService: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::HANDLE, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub trait IDirect3DDeviceManager9_Impl: windows_core::IUnknownImpl {
fn ResetDevice(&self, pdevice: windows_core::Ref<super::super::Graphics::Direct3D9::IDirect3DDevice9>, resettoken: u32) -> windows_core::Result<()>;
fn OpenDeviceHandle(&self) -> windows_core::Result<super::super::Foundation::HANDLE>;
fn CloseDeviceHandle(&self, hdevice: super::super::Foundation::HANDLE) -> windows_core::Result<()>;
fn TestDevice(&self, hdevice: super::super::Foundation::HANDLE) -> windows_core::Result<()>;
fn LockDevice(&self, hdevice: super::super::Foundation::HANDLE, ppdevice: windows_core::OutRef<super::super::Graphics::Direct3D9::IDirect3DDevice9>, fblock: windows_core::BOOL) -> windows_core::Result<()>;
fn UnlockDevice(&self, hdevice: super::super::Foundation::HANDLE, fsavestate: windows_core::BOOL) -> windows_core::Result<()>;
fn GetVideoService(&self, hdevice: super::super::Foundation::HANDLE, riid: *const windows_core::GUID, ppservice: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl IDirect3DDeviceManager9_Vtbl {
pub const fn new<Identity: IDirect3DDeviceManager9_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn ResetDevice<Identity: IDirect3DDeviceManager9_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void, resettoken: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirect3DDeviceManager9_Impl::ResetDevice(this, core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&resettoken)).into()
}
}
unsafe extern "system" fn OpenDeviceHandle<Identity: IDirect3DDeviceManager9_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, phdevice: *mut super::super::Foundation::HANDLE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IDirect3DDeviceManager9_Impl::OpenDeviceHandle(this) {
Ok(ok__) => {
phdevice.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn CloseDeviceHandle<Identity: IDirect3DDeviceManager9_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hdevice: super::super::Foundation::HANDLE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirect3DDeviceManager9_Impl::CloseDeviceHandle(this, core::mem::transmute_copy(&hdevice)).into()
}
}
unsafe extern "system" fn TestDevice<Identity: IDirect3DDeviceManager9_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hdevice: super::super::Foundation::HANDLE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirect3DDeviceManager9_Impl::TestDevice(this, core::mem::transmute_copy(&hdevice)).into()
}
}
unsafe extern "system" fn LockDevice<Identity: IDirect3DDeviceManager9_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hdevice: super::super::Foundation::HANDLE, ppdevice: *mut *mut core::ffi::c_void, fblock: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirect3DDeviceManager9_Impl::LockDevice(this, core::mem::transmute_copy(&hdevice), core::mem::transmute_copy(&ppdevice), core::mem::transmute_copy(&fblock)).into()
}
}
unsafe extern "system" fn UnlockDevice<Identity: IDirect3DDeviceManager9_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hdevice: super::super::Foundation::HANDLE, fsavestate: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirect3DDeviceManager9_Impl::UnlockDevice(this, core::mem::transmute_copy(&hdevice), core::mem::transmute_copy(&fsavestate)).into()
}
}
unsafe extern "system" fn GetVideoService<Identity: IDirect3DDeviceManager9_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hdevice: super::super::Foundation::HANDLE, riid: *const windows_core::GUID, ppservice: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirect3DDeviceManager9_Impl::GetVideoService(this, core::mem::transmute_copy(&hdevice), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppservice)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
ResetDevice: ResetDevice::<Identity, OFFSET>,
OpenDeviceHandle: OpenDeviceHandle::<Identity, OFFSET>,
CloseDeviceHandle: CloseDeviceHandle::<Identity, OFFSET>,
TestDevice: TestDevice::<Identity, OFFSET>,
LockDevice: LockDevice::<Identity, OFFSET>,
UnlockDevice: UnlockDevice::<Identity, OFFSET>,
GetVideoService: GetVideoService::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IDirect3DDeviceManager9 as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl windows_core::RuntimeName for IDirect3DDeviceManager9 {}
windows_core::imp::define_interface!(IDirectXVideoAccelerationService, IDirectXVideoAccelerationService_Vtbl, 0xfc51a550_d5e7_11d9_af55_00054e43ff02);
windows_core::imp::interface_hierarchy!(IDirectXVideoAccelerationService, windows_core::IUnknown);
impl IDirectXVideoAccelerationService {
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn CreateSurface(&self, width: u32, height: u32, backbuffers: u32, format: super::super::Graphics::Direct3D9::D3DFORMAT, pool: super::super::Graphics::Direct3D9::D3DPOOL, usage: u32, dxvatype: DXVA2_VideoRenderTargetType, ppsurface: *mut Option<super::super::Graphics::Direct3D9::IDirect3DSurface9>, psharedhandle: Option<*mut super::super::Foundation::HANDLE>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).CreateSurface)(windows_core::Interface::as_raw(self), width, height, backbuffers, format, pool, usage, dxvatype.0 as _, core::mem::transmute(ppsurface), psharedhandle.unwrap_or(core::mem::zeroed()) as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IDirectXVideoAccelerationService_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub CreateSurface: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, u32, super::super::Graphics::Direct3D9::D3DFORMAT, super::super::Graphics::Direct3D9::D3DPOOL, u32, u32, *mut *mut core::ffi::c_void, *mut super::super::Foundation::HANDLE) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
CreateSurface: usize,
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub trait IDirectXVideoAccelerationService_Impl: windows_core::IUnknownImpl {
fn CreateSurface(&self, width: u32, height: u32, backbuffers: u32, format: super::super::Graphics::Direct3D9::D3DFORMAT, pool: super::super::Graphics::Direct3D9::D3DPOOL, usage: u32, dxvatype: &DXVA2_VideoRenderTargetType, ppsurface: windows_core::OutRef<super::super::Graphics::Direct3D9::IDirect3DSurface9>, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>;
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl IDirectXVideoAccelerationService_Vtbl {
pub const fn new<Identity: IDirectXVideoAccelerationService_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateSurface<Identity: IDirectXVideoAccelerationService_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, width: u32, height: u32, backbuffers: u32, format: super::super::Graphics::Direct3D9::D3DFORMAT, pool: super::super::Graphics::Direct3D9::D3DPOOL, usage: u32, dxvatype: u32, ppsurface: *mut *mut core::ffi::c_void, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirectXVideoAccelerationService_Impl::CreateSurface(this, core::mem::transmute_copy(&width), core::mem::transmute_copy(&height), core::mem::transmute_copy(&backbuffers), core::mem::transmute_copy(&format), core::mem::transmute_copy(&pool), core::mem::transmute_copy(&usage), core::mem::transmute(&dxvatype), core::mem::transmute_copy(&ppsurface), core::mem::transmute_copy(&psharedhandle)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), CreateSurface: CreateSurface::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IDirectXVideoAccelerationService as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl windows_core::RuntimeName for IDirectXVideoAccelerationService {}
windows_core::imp::define_interface!(IDirectXVideoDecoder, IDirectXVideoDecoder_Vtbl, 0xf2b0810a_fd00_43c9_918c_df94e2d8ef7d);
windows_core::imp::interface_hierarchy!(IDirectXVideoDecoder, windows_core::IUnknown);
impl IDirectXVideoDecoder {
pub unsafe fn GetVideoDecoderService(&self) -> windows_core::Result<IDirectXVideoDecoderService> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetVideoDecoderService)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn GetCreationParameters(&self, pdeviceguid: Option<*mut windows_core::GUID>, pvideodesc: Option<*mut DXVA2_VideoDesc>, pconfig: Option<*mut DXVA2_ConfigPictureDecode>, pdecoderrendertargets: *mut *mut Option<super::super::Graphics::Direct3D9::IDirect3DSurface9>, pnumsurfaces: Option<*mut u32>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetCreationParameters)(windows_core::Interface::as_raw(self), pdeviceguid.unwrap_or(core::mem::zeroed()) as _, pvideodesc.unwrap_or(core::mem::zeroed()) as _, pconfig.unwrap_or(core::mem::zeroed()) as _, pdecoderrendertargets as _, pnumsurfaces.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn GetBuffer(&self, buffertype: DXVA2_BufferfType, ppbuffer: *mut *mut core::ffi::c_void, pbuffersize: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), buffertype.0 as _, ppbuffer as _, pbuffersize as _).ok() }
}
pub unsafe fn ReleaseBuffer(&self, buffertype: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).ReleaseBuffer)(windows_core::Interface::as_raw(self), buffertype).ok() }
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn BeginFrame<P0>(&self, prendertarget: P0, pvpvpdata: Option<*const core::ffi::c_void>) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Graphics::Direct3D9::IDirect3DSurface9>,
{
unsafe { (windows_core::Interface::vtable(self).BeginFrame)(windows_core::Interface::as_raw(self), prendertarget.param().abi(), pvpvpdata.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn EndFrame(&self, phandlecomplete: Option<*mut super::super::Foundation::HANDLE>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).EndFrame)(windows_core::Interface::as_raw(self), phandlecomplete.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn Execute(&self, pexecuteparams: *const DXVA2_DecodeExecuteParams) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Execute)(windows_core::Interface::as_raw(self), pexecuteparams).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IDirectXVideoDecoder_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetVideoDecoderService: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub GetCreationParameters: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID, *mut DXVA2_VideoDesc, *mut DXVA2_ConfigPictureDecode, *mut *mut *mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
GetCreationParameters: usize,
pub GetBuffer: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub ReleaseBuffer: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub BeginFrame: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
BeginFrame: usize,
pub EndFrame: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::HANDLE) -> windows_core::HRESULT,
pub Execute: unsafe extern "system" fn(*mut core::ffi::c_void, *const DXVA2_DecodeExecuteParams) -> windows_core::HRESULT,
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub trait IDirectXVideoDecoder_Impl: windows_core::IUnknownImpl {
fn GetVideoDecoderService(&self) -> windows_core::Result<IDirectXVideoDecoderService>;
fn GetCreationParameters(&self, pdeviceguid: *mut windows_core::GUID, pvideodesc: *mut DXVA2_VideoDesc, pconfig: *mut DXVA2_ConfigPictureDecode, pdecoderrendertargets: *mut *mut Option<super::super::Graphics::Direct3D9::IDirect3DSurface9>, pnumsurfaces: *mut u32) -> windows_core::Result<()>;
fn GetBuffer(&self, buffertype: &DXVA2_BufferfType, ppbuffer: *mut *mut core::ffi::c_void, pbuffersize: *mut u32) -> windows_core::Result<()>;
fn ReleaseBuffer(&self, buffertype: u32) -> windows_core::Result<()>;
fn BeginFrame(&self, prendertarget: windows_core::Ref<super::super::Graphics::Direct3D9::IDirect3DSurface9>, pvpvpdata: *const core::ffi::c_void) -> windows_core::Result<()>;
fn EndFrame(&self, phandlecomplete: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>;
fn Execute(&self, pexecuteparams: *const DXVA2_DecodeExecuteParams) -> windows_core::Result<()>;
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl IDirectXVideoDecoder_Vtbl {
pub const fn new<Identity: IDirectXVideoDecoder_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetVideoDecoderService<Identity: IDirectXVideoDecoder_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppservice: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IDirectXVideoDecoder_Impl::GetVideoDecoderService(this) {
Ok(ok__) => {
ppservice.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetCreationParameters<Identity: IDirectXVideoDecoder_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdeviceguid: *mut windows_core::GUID, pvideodesc: *mut DXVA2_VideoDesc, pconfig: *mut DXVA2_ConfigPictureDecode, pdecoderrendertargets: *mut *mut *mut core::ffi::c_void, pnumsurfaces: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirectXVideoDecoder_Impl::GetCreationParameters(this, core::mem::transmute_copy(&pdeviceguid), core::mem::transmute_copy(&pvideodesc), core::mem::transmute_copy(&pconfig), core::mem::transmute_copy(&pdecoderrendertargets), core::mem::transmute_copy(&pnumsurfaces)).into()
}
}
unsafe extern "system" fn GetBuffer<Identity: IDirectXVideoDecoder_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, buffertype: u32, ppbuffer: *mut *mut core::ffi::c_void, pbuffersize: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirectXVideoDecoder_Impl::GetBuffer(this, core::mem::transmute(&buffertype), core::mem::transmute_copy(&ppbuffer), core::mem::transmute_copy(&pbuffersize)).into()
}
}
unsafe extern "system" fn ReleaseBuffer<Identity: IDirectXVideoDecoder_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, buffertype: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirectXVideoDecoder_Impl::ReleaseBuffer(this, core::mem::transmute_copy(&buffertype)).into()
}
}
unsafe extern "system" fn BeginFrame<Identity: IDirectXVideoDecoder_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, prendertarget: *mut core::ffi::c_void, pvpvpdata: *const core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirectXVideoDecoder_Impl::BeginFrame(this, core::mem::transmute_copy(&prendertarget), core::mem::transmute_copy(&pvpvpdata)).into()
}
}
unsafe extern "system" fn EndFrame<Identity: IDirectXVideoDecoder_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, phandlecomplete: *mut super::super::Foundation::HANDLE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirectXVideoDecoder_Impl::EndFrame(this, core::mem::transmute_copy(&phandlecomplete)).into()
}
}
unsafe extern "system" fn Execute<Identity: IDirectXVideoDecoder_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pexecuteparams: *const DXVA2_DecodeExecuteParams) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirectXVideoDecoder_Impl::Execute(this, core::mem::transmute_copy(&pexecuteparams)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetVideoDecoderService: GetVideoDecoderService::<Identity, OFFSET>,
GetCreationParameters: GetCreationParameters::<Identity, OFFSET>,
GetBuffer: GetBuffer::<Identity, OFFSET>,
ReleaseBuffer: ReleaseBuffer::<Identity, OFFSET>,
BeginFrame: BeginFrame::<Identity, OFFSET>,
EndFrame: EndFrame::<Identity, OFFSET>,
Execute: Execute::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IDirectXVideoDecoder as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl windows_core::RuntimeName for IDirectXVideoDecoder {}
windows_core::imp::define_interface!(IDirectXVideoDecoderService, IDirectXVideoDecoderService_Vtbl, 0xfc51a551_d5e7_11d9_af55_00054e43ff02);
impl core::ops::Deref for IDirectXVideoDecoderService {
type Target = IDirectXVideoAccelerationService;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IDirectXVideoDecoderService, windows_core::IUnknown, IDirectXVideoAccelerationService);
impl IDirectXVideoDecoderService {
pub unsafe fn GetDecoderDeviceGuids(&self, pcount: *mut u32, pguids: *mut *mut windows_core::GUID) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetDecoderDeviceGuids)(windows_core::Interface::as_raw(self), pcount as _, pguids as _).ok() }
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn GetDecoderRenderTargets(&self, guid: *const windows_core::GUID, pcount: *mut u32, pformats: *mut *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetDecoderRenderTargets)(windows_core::Interface::as_raw(self), guid, pcount as _, pformats as _).ok() }
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn GetDecoderConfigurations(&self, guid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, preserved: Option<*const core::ffi::c_void>, pcount: *mut u32, ppconfigs: *mut *mut DXVA2_ConfigPictureDecode) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetDecoderConfigurations)(windows_core::Interface::as_raw(self), guid, pvideodesc, preserved.unwrap_or(core::mem::zeroed()) as _, pcount as _, ppconfigs as _).ok() }
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn CreateVideoDecoder(&self, guid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, pconfig: *const DXVA2_ConfigPictureDecode, ppdecoderrendertargets: &[Option<super::super::Graphics::Direct3D9::IDirect3DSurface9>]) -> windows_core::Result<IDirectXVideoDecoder> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateVideoDecoder)(windows_core::Interface::as_raw(self), guid, pvideodesc, pconfig, core::mem::transmute(ppdecoderrendertargets.as_ptr()), ppdecoderrendertargets.len().try_into().unwrap(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IDirectXVideoDecoderService_Vtbl {
pub base__: IDirectXVideoAccelerationService_Vtbl,
pub GetDecoderDeviceGuids: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut *mut windows_core::GUID) -> windows_core::HRESULT,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub GetDecoderRenderTargets: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut u32, *mut *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
GetDecoderRenderTargets: usize,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub GetDecoderConfigurations: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const DXVA2_VideoDesc, *const core::ffi::c_void, *mut u32, *mut *mut DXVA2_ConfigPictureDecode) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
GetDecoderConfigurations: usize,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub CreateVideoDecoder: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const DXVA2_VideoDesc, *const DXVA2_ConfigPictureDecode, *const *mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
CreateVideoDecoder: usize,
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub trait IDirectXVideoDecoderService_Impl: IDirectXVideoAccelerationService_Impl {
fn GetDecoderDeviceGuids(&self, pcount: *mut u32, pguids: *mut *mut windows_core::GUID) -> windows_core::Result<()>;
fn GetDecoderRenderTargets(&self, guid: *const windows_core::GUID, pcount: *mut u32, pformats: *mut *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> windows_core::Result<()>;
fn GetDecoderConfigurations(&self, guid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, preserved: *const core::ffi::c_void, pcount: *mut u32, ppconfigs: *mut *mut DXVA2_ConfigPictureDecode) -> windows_core::Result<()>;
fn CreateVideoDecoder(&self, guid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, pconfig: *const DXVA2_ConfigPictureDecode, ppdecoderrendertargets: *const Option<super::super::Graphics::Direct3D9::IDirect3DSurface9>, numrendertargets: u32) -> windows_core::Result<IDirectXVideoDecoder>;
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl IDirectXVideoDecoderService_Vtbl {
pub const fn new<Identity: IDirectXVideoDecoderService_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetDecoderDeviceGuids<Identity: IDirectXVideoDecoderService_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcount: *mut u32, pguids: *mut *mut windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirectXVideoDecoderService_Impl::GetDecoderDeviceGuids(this, core::mem::transmute_copy(&pcount), core::mem::transmute_copy(&pguids)).into()
}
}
unsafe extern "system" fn GetDecoderRenderTargets<Identity: IDirectXVideoDecoderService_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guid: *const windows_core::GUID, pcount: *mut u32, pformats: *mut *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirectXVideoDecoderService_Impl::GetDecoderRenderTargets(this, core::mem::transmute_copy(&guid), core::mem::transmute_copy(&pcount), core::mem::transmute_copy(&pformats)).into()
}
}
unsafe extern "system" fn GetDecoderConfigurations<Identity: IDirectXVideoDecoderService_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, preserved: *const core::ffi::c_void, pcount: *mut u32, ppconfigs: *mut *mut DXVA2_ConfigPictureDecode) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirectXVideoDecoderService_Impl::GetDecoderConfigurations(this, core::mem::transmute_copy(&guid), core::mem::transmute_copy(&pvideodesc), core::mem::transmute_copy(&preserved), core::mem::transmute_copy(&pcount), core::mem::transmute_copy(&ppconfigs)).into()
}
}
unsafe extern "system" fn CreateVideoDecoder<Identity: IDirectXVideoDecoderService_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, pconfig: *const DXVA2_ConfigPictureDecode, ppdecoderrendertargets: *const *mut core::ffi::c_void, numrendertargets: u32, ppdecode: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IDirectXVideoDecoderService_Impl::CreateVideoDecoder(this, core::mem::transmute_copy(&guid), core::mem::transmute_copy(&pvideodesc), core::mem::transmute_copy(&pconfig), core::mem::transmute_copy(&ppdecoderrendertargets), core::mem::transmute_copy(&numrendertargets)) {
Ok(ok__) => {
ppdecode.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IDirectXVideoAccelerationService_Vtbl::new::<Identity, OFFSET>(),
GetDecoderDeviceGuids: GetDecoderDeviceGuids::<Identity, OFFSET>,
GetDecoderRenderTargets: GetDecoderRenderTargets::<Identity, OFFSET>,
GetDecoderConfigurations: GetDecoderConfigurations::<Identity, OFFSET>,
CreateVideoDecoder: CreateVideoDecoder::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IDirectXVideoDecoderService as windows_core::Interface>::IID || iid == &<IDirectXVideoAccelerationService as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl windows_core::RuntimeName for IDirectXVideoDecoderService {}
windows_core::imp::define_interface!(IDirectXVideoMemoryConfiguration, IDirectXVideoMemoryConfiguration_Vtbl, 0xb7f916dd_db3b_49c1_84d7_e45ef99ec726);
windows_core::imp::interface_hierarchy!(IDirectXVideoMemoryConfiguration, windows_core::IUnknown);
impl IDirectXVideoMemoryConfiguration {
pub unsafe fn GetAvailableSurfaceTypeByIndex(&self, dwtypeindex: u32) -> windows_core::Result<DXVA2_SurfaceType> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetAvailableSurfaceTypeByIndex)(windows_core::Interface::as_raw(self), dwtypeindex, &mut result__).map(|| result__)
}
}
pub unsafe fn SetSurfaceType(&self, dwtype: DXVA2_SurfaceType) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetSurfaceType)(windows_core::Interface::as_raw(self), dwtype).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IDirectXVideoMemoryConfiguration_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetAvailableSurfaceTypeByIndex: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut DXVA2_SurfaceType) -> windows_core::HRESULT,
pub SetSurfaceType: unsafe extern "system" fn(*mut core::ffi::c_void, DXVA2_SurfaceType) -> windows_core::HRESULT,
}
pub trait IDirectXVideoMemoryConfiguration_Impl: windows_core::IUnknownImpl {
fn GetAvailableSurfaceTypeByIndex(&self, dwtypeindex: u32) -> windows_core::Result<DXVA2_SurfaceType>;
fn SetSurfaceType(&self, dwtype: DXVA2_SurfaceType) -> windows_core::Result<()>;
}
impl IDirectXVideoMemoryConfiguration_Vtbl {
pub const fn new<Identity: IDirectXVideoMemoryConfiguration_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetAvailableSurfaceTypeByIndex<Identity: IDirectXVideoMemoryConfiguration_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwtypeindex: u32, pdwtype: *mut DXVA2_SurfaceType) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IDirectXVideoMemoryConfiguration_Impl::GetAvailableSurfaceTypeByIndex(this, core::mem::transmute_copy(&dwtypeindex)) {
Ok(ok__) => {
pdwtype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetSurfaceType<Identity: IDirectXVideoMemoryConfiguration_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwtype: DXVA2_SurfaceType) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirectXVideoMemoryConfiguration_Impl::SetSurfaceType(this, core::mem::transmute_copy(&dwtype)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetAvailableSurfaceTypeByIndex: GetAvailableSurfaceTypeByIndex::<Identity, OFFSET>,
SetSurfaceType: SetSurfaceType::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IDirectXVideoMemoryConfiguration as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IDirectXVideoMemoryConfiguration {}
windows_core::imp::define_interface!(IDirectXVideoProcessor, IDirectXVideoProcessor_Vtbl, 0x8c3a39f0_916e_4690_804f_4c8001355d25);
windows_core::imp::interface_hierarchy!(IDirectXVideoProcessor, windows_core::IUnknown);
impl IDirectXVideoProcessor {
pub unsafe fn GetVideoProcessorService(&self) -> windows_core::Result<IDirectXVideoProcessorService> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetVideoProcessorService)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn GetCreationParameters(&self, pdeviceguid: Option<*mut windows_core::GUID>, pvideodesc: Option<*mut DXVA2_VideoDesc>, prendertargetformat: Option<*mut super::super::Graphics::Direct3D9::D3DFORMAT>, pmaxnumsubstreams: Option<*mut u32>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetCreationParameters)(windows_core::Interface::as_raw(self), pdeviceguid.unwrap_or(core::mem::zeroed()) as _, pvideodesc.unwrap_or(core::mem::zeroed()) as _, prendertargetformat.unwrap_or(core::mem::zeroed()) as _, pmaxnumsubstreams.unwrap_or(core::mem::zeroed()) as _).ok() }
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn GetVideoProcessorCaps(&self, pcaps: *mut DXVA2_VideoProcessorCaps) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorCaps)(windows_core::Interface::as_raw(self), pcaps as _).ok() }
}
pub unsafe fn GetProcAmpRange(&self, procampcap: u32) -> windows_core::Result<DXVA2_ValueRange> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetProcAmpRange)(windows_core::Interface::as_raw(self), procampcap, &mut result__).map(|| result__)
}
}
pub unsafe fn GetFilterPropertyRange(&self, filtersetting: u32) -> windows_core::Result<DXVA2_ValueRange> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetFilterPropertyRange)(windows_core::Interface::as_raw(self), filtersetting, &mut result__).map(|| result__)
}
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn VideoProcessBlt<P0>(&self, prendertarget: P0, pbltparams: *const DXVA2_VideoProcessBltParams, psamples: &[DXVA2_VideoSample], phandlecomplete: Option<*mut super::super::Foundation::HANDLE>) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Graphics::Direct3D9::IDirect3DSurface9>,
{
unsafe { (windows_core::Interface::vtable(self).VideoProcessBlt)(windows_core::Interface::as_raw(self), prendertarget.param().abi(), pbltparams, core::mem::transmute(psamples.as_ptr()), psamples.len().try_into().unwrap(), phandlecomplete.unwrap_or(core::mem::zeroed()) as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IDirectXVideoProcessor_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetVideoProcessorService: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub GetCreationParameters: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID, *mut DXVA2_VideoDesc, *mut super::super::Graphics::Direct3D9::D3DFORMAT, *mut u32) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
GetCreationParameters: usize,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub GetVideoProcessorCaps: unsafe extern "system" fn(*mut core::ffi::c_void, *mut DXVA2_VideoProcessorCaps) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
GetVideoProcessorCaps: usize,
pub GetProcAmpRange: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut DXVA2_ValueRange) -> windows_core::HRESULT,
pub GetFilterPropertyRange: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut DXVA2_ValueRange) -> windows_core::HRESULT,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub VideoProcessBlt: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const DXVA2_VideoProcessBltParams, *const DXVA2_VideoSample, u32, *mut super::super::Foundation::HANDLE) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
VideoProcessBlt: usize,
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub trait IDirectXVideoProcessor_Impl: windows_core::IUnknownImpl {
fn GetVideoProcessorService(&self) -> windows_core::Result<IDirectXVideoProcessorService>;
fn GetCreationParameters(&self, pdeviceguid: *mut windows_core::GUID, pvideodesc: *mut DXVA2_VideoDesc, prendertargetformat: *mut super::super::Graphics::Direct3D9::D3DFORMAT, pmaxnumsubstreams: *mut u32) -> windows_core::Result<()>;
fn GetVideoProcessorCaps(&self, pcaps: *mut DXVA2_VideoProcessorCaps) -> windows_core::Result<()>;
fn GetProcAmpRange(&self, procampcap: u32) -> windows_core::Result<DXVA2_ValueRange>;
fn GetFilterPropertyRange(&self, filtersetting: u32) -> windows_core::Result<DXVA2_ValueRange>;
fn VideoProcessBlt(&self, prendertarget: windows_core::Ref<super::super::Graphics::Direct3D9::IDirect3DSurface9>, pbltparams: *const DXVA2_VideoProcessBltParams, psamples: *const DXVA2_VideoSample, numsamples: u32, phandlecomplete: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>;
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl IDirectXVideoProcessor_Vtbl {
pub const fn new<Identity: IDirectXVideoProcessor_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetVideoProcessorService<Identity: IDirectXVideoProcessor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppservice: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IDirectXVideoProcessor_Impl::GetVideoProcessorService(this) {
Ok(ok__) => {
ppservice.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetCreationParameters<Identity: IDirectXVideoProcessor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdeviceguid: *mut windows_core::GUID, pvideodesc: *mut DXVA2_VideoDesc, prendertargetformat: *mut super::super::Graphics::Direct3D9::D3DFORMAT, pmaxnumsubstreams: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirectXVideoProcessor_Impl::GetCreationParameters(this, core::mem::transmute_copy(&pdeviceguid), core::mem::transmute_copy(&pvideodesc), core::mem::transmute_copy(&prendertargetformat), core::mem::transmute_copy(&pmaxnumsubstreams)).into()
}
}
unsafe extern "system" fn GetVideoProcessorCaps<Identity: IDirectXVideoProcessor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcaps: *mut DXVA2_VideoProcessorCaps) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirectXVideoProcessor_Impl::GetVideoProcessorCaps(this, core::mem::transmute_copy(&pcaps)).into()
}
}
unsafe extern "system" fn GetProcAmpRange<Identity: IDirectXVideoProcessor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, procampcap: u32, prange: *mut DXVA2_ValueRange) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IDirectXVideoProcessor_Impl::GetProcAmpRange(this, core::mem::transmute_copy(&procampcap)) {
Ok(ok__) => {
prange.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetFilterPropertyRange<Identity: IDirectXVideoProcessor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, filtersetting: u32, prange: *mut DXVA2_ValueRange) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IDirectXVideoProcessor_Impl::GetFilterPropertyRange(this, core::mem::transmute_copy(&filtersetting)) {
Ok(ok__) => {
prange.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn VideoProcessBlt<Identity: IDirectXVideoProcessor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, prendertarget: *mut core::ffi::c_void, pbltparams: *const DXVA2_VideoProcessBltParams, psamples: *const DXVA2_VideoSample, numsamples: u32, phandlecomplete: *mut super::super::Foundation::HANDLE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirectXVideoProcessor_Impl::VideoProcessBlt(this, core::mem::transmute_copy(&prendertarget), core::mem::transmute_copy(&pbltparams), core::mem::transmute_copy(&psamples), core::mem::transmute_copy(&numsamples), core::mem::transmute_copy(&phandlecomplete)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetVideoProcessorService: GetVideoProcessorService::<Identity, OFFSET>,
GetCreationParameters: GetCreationParameters::<Identity, OFFSET>,
GetVideoProcessorCaps: GetVideoProcessorCaps::<Identity, OFFSET>,
GetProcAmpRange: GetProcAmpRange::<Identity, OFFSET>,
GetFilterPropertyRange: GetFilterPropertyRange::<Identity, OFFSET>,
VideoProcessBlt: VideoProcessBlt::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IDirectXVideoProcessor as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl windows_core::RuntimeName for IDirectXVideoProcessor {}
windows_core::imp::define_interface!(IDirectXVideoProcessorService, IDirectXVideoProcessorService_Vtbl, 0xfc51a552_d5e7_11d9_af55_00054e43ff02);
impl core::ops::Deref for IDirectXVideoProcessorService {
type Target = IDirectXVideoAccelerationService;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IDirectXVideoProcessorService, windows_core::IUnknown, IDirectXVideoAccelerationService);
impl IDirectXVideoProcessorService {
pub unsafe fn RegisterVideoProcessorSoftwareDevice(&self, pcallbacks: *const core::ffi::c_void) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RegisterVideoProcessorSoftwareDevice)(windows_core::Interface::as_raw(self), pcallbacks).ok() }
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn GetVideoProcessorDeviceGuids(&self, pvideodesc: *const DXVA2_VideoDesc, pcount: *mut u32, pguids: *mut *mut windows_core::GUID) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorDeviceGuids)(windows_core::Interface::as_raw(self), pvideodesc, pcount as _, pguids as _).ok() }
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn GetVideoProcessorRenderTargets(&self, videoprocdeviceguid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, pcount: *mut u32, pformats: *mut *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorRenderTargets)(windows_core::Interface::as_raw(self), videoprocdeviceguid, pvideodesc, pcount as _, pformats as _).ok() }
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn GetVideoProcessorSubStreamFormats(&self, videoprocdeviceguid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, rendertargetformat: super::super::Graphics::Direct3D9::D3DFORMAT, pcount: *mut u32, pformats: *mut *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorSubStreamFormats)(windows_core::Interface::as_raw(self), videoprocdeviceguid, pvideodesc, rendertargetformat, pcount as _, pformats as _).ok() }
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn GetVideoProcessorCaps(&self, videoprocdeviceguid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, rendertargetformat: super::super::Graphics::Direct3D9::D3DFORMAT, pcaps: *mut DXVA2_VideoProcessorCaps) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorCaps)(windows_core::Interface::as_raw(self), videoprocdeviceguid, pvideodesc, rendertargetformat, pcaps as _).ok() }
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn GetProcAmpRange(&self, videoprocdeviceguid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, rendertargetformat: super::super::Graphics::Direct3D9::D3DFORMAT, procampcap: u32) -> windows_core::Result<DXVA2_ValueRange> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetProcAmpRange)(windows_core::Interface::as_raw(self), videoprocdeviceguid, pvideodesc, rendertargetformat, procampcap, &mut result__).map(|| result__)
}
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn GetFilterPropertyRange(&self, videoprocdeviceguid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, rendertargetformat: super::super::Graphics::Direct3D9::D3DFORMAT, filtersetting: u32) -> windows_core::Result<DXVA2_ValueRange> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetFilterPropertyRange)(windows_core::Interface::as_raw(self), videoprocdeviceguid, pvideodesc, rendertargetformat, filtersetting, &mut result__).map(|| result__)
}
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn CreateVideoProcessor(&self, videoprocdeviceguid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, rendertargetformat: super::super::Graphics::Direct3D9::D3DFORMAT, maxnumsubstreams: u32) -> windows_core::Result<IDirectXVideoProcessor> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateVideoProcessor)(windows_core::Interface::as_raw(self), videoprocdeviceguid, pvideodesc, rendertargetformat, maxnumsubstreams, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IDirectXVideoProcessorService_Vtbl {
pub base__: IDirectXVideoAccelerationService_Vtbl,
pub RegisterVideoProcessorSoftwareDevice: unsafe extern "system" fn(*mut core::ffi::c_void, *const core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub GetVideoProcessorDeviceGuids: unsafe extern "system" fn(*mut core::ffi::c_void, *const DXVA2_VideoDesc, *mut u32, *mut *mut windows_core::GUID) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
GetVideoProcessorDeviceGuids: usize,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub GetVideoProcessorRenderTargets: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const DXVA2_VideoDesc, *mut u32, *mut *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
GetVideoProcessorRenderTargets: usize,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub GetVideoProcessorSubStreamFormats: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const DXVA2_VideoDesc, super::super::Graphics::Direct3D9::D3DFORMAT, *mut u32, *mut *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
GetVideoProcessorSubStreamFormats: usize,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub GetVideoProcessorCaps: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const DXVA2_VideoDesc, super::super::Graphics::Direct3D9::D3DFORMAT, *mut DXVA2_VideoProcessorCaps) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
GetVideoProcessorCaps: usize,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub GetProcAmpRange: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const DXVA2_VideoDesc, super::super::Graphics::Direct3D9::D3DFORMAT, u32, *mut DXVA2_ValueRange) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
GetProcAmpRange: usize,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub GetFilterPropertyRange: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const DXVA2_VideoDesc, super::super::Graphics::Direct3D9::D3DFORMAT, u32, *mut DXVA2_ValueRange) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
GetFilterPropertyRange: usize,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub CreateVideoProcessor: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const DXVA2_VideoDesc, super::super::Graphics::Direct3D9::D3DFORMAT, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
CreateVideoProcessor: usize,
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub trait IDirectXVideoProcessorService_Impl: IDirectXVideoAccelerationService_Impl {
fn RegisterVideoProcessorSoftwareDevice(&self, pcallbacks: *const core::ffi::c_void) -> windows_core::Result<()>;
fn GetVideoProcessorDeviceGuids(&self, pvideodesc: *const DXVA2_VideoDesc, pcount: *mut u32, pguids: *mut *mut windows_core::GUID) -> windows_core::Result<()>;
fn GetVideoProcessorRenderTargets(&self, videoprocdeviceguid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, pcount: *mut u32, pformats: *mut *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> windows_core::Result<()>;
fn GetVideoProcessorSubStreamFormats(&self, videoprocdeviceguid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, rendertargetformat: super::super::Graphics::Direct3D9::D3DFORMAT, pcount: *mut u32, pformats: *mut *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> windows_core::Result<()>;
fn GetVideoProcessorCaps(&self, videoprocdeviceguid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, rendertargetformat: super::super::Graphics::Direct3D9::D3DFORMAT, pcaps: *mut DXVA2_VideoProcessorCaps) -> windows_core::Result<()>;
fn GetProcAmpRange(&self, videoprocdeviceguid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, rendertargetformat: super::super::Graphics::Direct3D9::D3DFORMAT, procampcap: u32) -> windows_core::Result<DXVA2_ValueRange>;
fn GetFilterPropertyRange(&self, videoprocdeviceguid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, rendertargetformat: super::super::Graphics::Direct3D9::D3DFORMAT, filtersetting: u32) -> windows_core::Result<DXVA2_ValueRange>;
fn CreateVideoProcessor(&self, videoprocdeviceguid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, rendertargetformat: super::super::Graphics::Direct3D9::D3DFORMAT, maxnumsubstreams: u32) -> windows_core::Result<IDirectXVideoProcessor>;
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl IDirectXVideoProcessorService_Vtbl {
pub const fn new<Identity: IDirectXVideoProcessorService_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn RegisterVideoProcessorSoftwareDevice<Identity: IDirectXVideoProcessorService_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcallbacks: *const core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirectXVideoProcessorService_Impl::RegisterVideoProcessorSoftwareDevice(this, core::mem::transmute_copy(&pcallbacks)).into()
}
}
unsafe extern "system" fn GetVideoProcessorDeviceGuids<Identity: IDirectXVideoProcessorService_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pvideodesc: *const DXVA2_VideoDesc, pcount: *mut u32, pguids: *mut *mut windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirectXVideoProcessorService_Impl::GetVideoProcessorDeviceGuids(this, core::mem::transmute_copy(&pvideodesc), core::mem::transmute_copy(&pcount), core::mem::transmute_copy(&pguids)).into()
}
}
unsafe extern "system" fn GetVideoProcessorRenderTargets<Identity: IDirectXVideoProcessorService_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, videoprocdeviceguid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, pcount: *mut u32, pformats: *mut *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirectXVideoProcessorService_Impl::GetVideoProcessorRenderTargets(this, core::mem::transmute_copy(&videoprocdeviceguid), core::mem::transmute_copy(&pvideodesc), core::mem::transmute_copy(&pcount), core::mem::transmute_copy(&pformats)).into()
}
}
unsafe extern "system" fn GetVideoProcessorSubStreamFormats<Identity: IDirectXVideoProcessorService_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, videoprocdeviceguid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, rendertargetformat: super::super::Graphics::Direct3D9::D3DFORMAT, pcount: *mut u32, pformats: *mut *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirectXVideoProcessorService_Impl::GetVideoProcessorSubStreamFormats(this, core::mem::transmute_copy(&videoprocdeviceguid), core::mem::transmute_copy(&pvideodesc), core::mem::transmute_copy(&rendertargetformat), core::mem::transmute_copy(&pcount), core::mem::transmute_copy(&pformats)).into()
}
}
unsafe extern "system" fn GetVideoProcessorCaps<Identity: IDirectXVideoProcessorService_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, videoprocdeviceguid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, rendertargetformat: super::super::Graphics::Direct3D9::D3DFORMAT, pcaps: *mut DXVA2_VideoProcessorCaps) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IDirectXVideoProcessorService_Impl::GetVideoProcessorCaps(this, core::mem::transmute_copy(&videoprocdeviceguid), core::mem::transmute_copy(&pvideodesc), core::mem::transmute_copy(&rendertargetformat), core::mem::transmute_copy(&pcaps)).into()
}
}
unsafe extern "system" fn GetProcAmpRange<Identity: IDirectXVideoProcessorService_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, videoprocdeviceguid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, rendertargetformat: super::super::Graphics::Direct3D9::D3DFORMAT, procampcap: u32, prange: *mut DXVA2_ValueRange) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IDirectXVideoProcessorService_Impl::GetProcAmpRange(this, core::mem::transmute_copy(&videoprocdeviceguid), core::mem::transmute_copy(&pvideodesc), core::mem::transmute_copy(&rendertargetformat), core::mem::transmute_copy(&procampcap)) {
Ok(ok__) => {
prange.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetFilterPropertyRange<Identity: IDirectXVideoProcessorService_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, videoprocdeviceguid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, rendertargetformat: super::super::Graphics::Direct3D9::D3DFORMAT, filtersetting: u32, prange: *mut DXVA2_ValueRange) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IDirectXVideoProcessorService_Impl::GetFilterPropertyRange(this, core::mem::transmute_copy(&videoprocdeviceguid), core::mem::transmute_copy(&pvideodesc), core::mem::transmute_copy(&rendertargetformat), core::mem::transmute_copy(&filtersetting)) {
Ok(ok__) => {
prange.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn CreateVideoProcessor<Identity: IDirectXVideoProcessorService_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, videoprocdeviceguid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, rendertargetformat: super::super::Graphics::Direct3D9::D3DFORMAT, maxnumsubstreams: u32, ppvidprocess: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IDirectXVideoProcessorService_Impl::CreateVideoProcessor(this, core::mem::transmute_copy(&videoprocdeviceguid), core::mem::transmute_copy(&pvideodesc), core::mem::transmute_copy(&rendertargetformat), core::mem::transmute_copy(&maxnumsubstreams)) {
Ok(ok__) => {
ppvidprocess.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IDirectXVideoAccelerationService_Vtbl::new::<Identity, OFFSET>(),
RegisterVideoProcessorSoftwareDevice: RegisterVideoProcessorSoftwareDevice::<Identity, OFFSET>,
GetVideoProcessorDeviceGuids: GetVideoProcessorDeviceGuids::<Identity, OFFSET>,
GetVideoProcessorRenderTargets: GetVideoProcessorRenderTargets::<Identity, OFFSET>,
GetVideoProcessorSubStreamFormats: GetVideoProcessorSubStreamFormats::<Identity, OFFSET>,
GetVideoProcessorCaps: GetVideoProcessorCaps::<Identity, OFFSET>,
GetProcAmpRange: GetProcAmpRange::<Identity, OFFSET>,
GetFilterPropertyRange: GetFilterPropertyRange::<Identity, OFFSET>,
CreateVideoProcessor: CreateVideoProcessor::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IDirectXVideoProcessorService as windows_core::Interface>::IID || iid == &<IDirectXVideoAccelerationService as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl windows_core::RuntimeName for IDirectXVideoProcessorService {}
windows_core::imp::define_interface!(IEVRFilterConfig, IEVRFilterConfig_Vtbl, 0x83e91e85_82c1_4ea7_801d_85dc50b75086);
windows_core::imp::interface_hierarchy!(IEVRFilterConfig, windows_core::IUnknown);
impl IEVRFilterConfig {
pub unsafe fn SetNumberOfStreams(&self, dwmaxstreams: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetNumberOfStreams)(windows_core::Interface::as_raw(self), dwmaxstreams).ok() }
}
pub unsafe fn GetNumberOfStreams(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetNumberOfStreams)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IEVRFilterConfig_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetNumberOfStreams: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub GetNumberOfStreams: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
}
pub trait IEVRFilterConfig_Impl: windows_core::IUnknownImpl {
fn SetNumberOfStreams(&self, dwmaxstreams: u32) -> windows_core::Result<()>;
fn GetNumberOfStreams(&self) -> windows_core::Result<u32>;
}
impl IEVRFilterConfig_Vtbl {
pub const fn new<Identity: IEVRFilterConfig_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetNumberOfStreams<Identity: IEVRFilterConfig_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwmaxstreams: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IEVRFilterConfig_Impl::SetNumberOfStreams(this, core::mem::transmute_copy(&dwmaxstreams)).into()
}
}
unsafe extern "system" fn GetNumberOfStreams<Identity: IEVRFilterConfig_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwmaxstreams: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IEVRFilterConfig_Impl::GetNumberOfStreams(this) {
Ok(ok__) => {
pdwmaxstreams.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetNumberOfStreams: SetNumberOfStreams::<Identity, OFFSET>,
GetNumberOfStreams: GetNumberOfStreams::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IEVRFilterConfig as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IEVRFilterConfig {}
windows_core::imp::define_interface!(IEVRFilterConfigEx, IEVRFilterConfigEx_Vtbl, 0xaea36028_796d_454f_beee_b48071e24304);
impl core::ops::Deref for IEVRFilterConfigEx {
type Target = IEVRFilterConfig;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IEVRFilterConfigEx, windows_core::IUnknown, IEVRFilterConfig);
impl IEVRFilterConfigEx {
pub unsafe fn SetConfigPrefs(&self, dwconfigflags: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetConfigPrefs)(windows_core::Interface::as_raw(self), dwconfigflags).ok() }
}
pub unsafe fn GetConfigPrefs(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetConfigPrefs)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IEVRFilterConfigEx_Vtbl {
pub base__: IEVRFilterConfig_Vtbl,
pub SetConfigPrefs: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub GetConfigPrefs: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
}
pub trait IEVRFilterConfigEx_Impl: IEVRFilterConfig_Impl {
fn SetConfigPrefs(&self, dwconfigflags: u32) -> windows_core::Result<()>;
fn GetConfigPrefs(&self) -> windows_core::Result<u32>;
}
impl IEVRFilterConfigEx_Vtbl {
pub const fn new<Identity: IEVRFilterConfigEx_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetConfigPrefs<Identity: IEVRFilterConfigEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwconfigflags: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IEVRFilterConfigEx_Impl::SetConfigPrefs(this, core::mem::transmute_copy(&dwconfigflags)).into()
}
}
unsafe extern "system" fn GetConfigPrefs<Identity: IEVRFilterConfigEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwconfigflags: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IEVRFilterConfigEx_Impl::GetConfigPrefs(this) {
Ok(ok__) => {
pdwconfigflags.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IEVRFilterConfig_Vtbl::new::<Identity, OFFSET>(),
SetConfigPrefs: SetConfigPrefs::<Identity, OFFSET>,
GetConfigPrefs: GetConfigPrefs::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IEVRFilterConfigEx as windows_core::Interface>::IID || iid == &<IEVRFilterConfig as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IEVRFilterConfigEx {}
windows_core::imp::define_interface!(IEVRTrustedVideoPlugin, IEVRTrustedVideoPlugin_Vtbl, 0x83a4ce40_7710_494b_a893_a472049af630);
windows_core::imp::interface_hierarchy!(IEVRTrustedVideoPlugin, windows_core::IUnknown);
impl IEVRTrustedVideoPlugin {
pub unsafe fn IsInTrustedVideoMode(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).IsInTrustedVideoMode)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn CanConstrict(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CanConstrict)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetConstriction(&self, dwkpix: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetConstriction)(windows_core::Interface::as_raw(self), dwkpix).ok() }
}
pub unsafe fn DisableImageExport(&self, bdisable: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).DisableImageExport)(windows_core::Interface::as_raw(self), bdisable.into()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IEVRTrustedVideoPlugin_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub IsInTrustedVideoMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub CanConstrict: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub SetConstriction: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub DisableImageExport: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT,
}
pub trait IEVRTrustedVideoPlugin_Impl: windows_core::IUnknownImpl {
fn IsInTrustedVideoMode(&self) -> windows_core::Result<windows_core::BOOL>;
fn CanConstrict(&self) -> windows_core::Result<windows_core::BOOL>;
fn SetConstriction(&self, dwkpix: u32) -> windows_core::Result<()>;
fn DisableImageExport(&self, bdisable: windows_core::BOOL) -> windows_core::Result<()>;
}
impl IEVRTrustedVideoPlugin_Vtbl {
pub const fn new<Identity: IEVRTrustedVideoPlugin_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn IsInTrustedVideoMode<Identity: IEVRTrustedVideoPlugin_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pyes: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IEVRTrustedVideoPlugin_Impl::IsInTrustedVideoMode(this) {
Ok(ok__) => {
pyes.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn CanConstrict<Identity: IEVRTrustedVideoPlugin_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pyes: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IEVRTrustedVideoPlugin_Impl::CanConstrict(this) {
Ok(ok__) => {
pyes.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetConstriction<Identity: IEVRTrustedVideoPlugin_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwkpix: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IEVRTrustedVideoPlugin_Impl::SetConstriction(this, core::mem::transmute_copy(&dwkpix)).into()
}
}
unsafe extern "system" fn DisableImageExport<Identity: IEVRTrustedVideoPlugin_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, bdisable: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IEVRTrustedVideoPlugin_Impl::DisableImageExport(this, core::mem::transmute_copy(&bdisable)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
IsInTrustedVideoMode: IsInTrustedVideoMode::<Identity, OFFSET>,
CanConstrict: CanConstrict::<Identity, OFFSET>,
SetConstriction: SetConstriction::<Identity, OFFSET>,
DisableImageExport: DisableImageExport::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IEVRTrustedVideoPlugin as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IEVRTrustedVideoPlugin {}
windows_core::imp::define_interface!(IEVRVideoStreamControl, IEVRVideoStreamControl_Vtbl, 0xd0cfe38b_93e7_4772_8957_0400c49a4485);
windows_core::imp::interface_hierarchy!(IEVRVideoStreamControl, windows_core::IUnknown);
impl IEVRVideoStreamControl {
pub unsafe fn SetStreamActiveState(&self, factive: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetStreamActiveState)(windows_core::Interface::as_raw(self), factive.into()).ok() }
}
pub unsafe fn GetStreamActiveState(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamActiveState)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IEVRVideoStreamControl_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetStreamActiveState: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT,
pub GetStreamActiveState: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
}
pub trait IEVRVideoStreamControl_Impl: windows_core::IUnknownImpl {
fn SetStreamActiveState(&self, factive: windows_core::BOOL) -> windows_core::Result<()>;
fn GetStreamActiveState(&self) -> windows_core::Result<windows_core::BOOL>;
}
impl IEVRVideoStreamControl_Vtbl {
pub const fn new<Identity: IEVRVideoStreamControl_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetStreamActiveState<Identity: IEVRVideoStreamControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, factive: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IEVRVideoStreamControl_Impl::SetStreamActiveState(this, core::mem::transmute_copy(&factive)).into()
}
}
unsafe extern "system" fn GetStreamActiveState<Identity: IEVRVideoStreamControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, lpfactive: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IEVRVideoStreamControl_Impl::GetStreamActiveState(this) {
Ok(ok__) => {
lpfactive.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetStreamActiveState: SetStreamActiveState::<Identity, OFFSET>,
GetStreamActiveState: GetStreamActiveState::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IEVRVideoStreamControl as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IEVRVideoStreamControl {}
windows_core::imp::define_interface!(IFileClient, IFileClient_Vtbl, 0xbfccd196_1244_4840_ab44_480975c4ffe4);
windows_core::imp::interface_hierarchy!(IFileClient, windows_core::IUnknown);
impl IFileClient {
pub unsafe fn GetObjectDiskSize(&self, pqwsize: *mut u64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetObjectDiskSize)(windows_core::Interface::as_raw(self), pqwsize as _).ok() }
}
pub unsafe fn Write<P0>(&self, pfio: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IFileIo>,
{
unsafe { (windows_core::Interface::vtable(self).Write)(windows_core::Interface::as_raw(self), pfio.param().abi()).ok() }
}
pub unsafe fn Read<P0>(&self, pfio: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IFileIo>,
{
unsafe { (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), pfio.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFileClient_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetObjectDiskSize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
pub Write: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Read: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IFileClient_Impl: windows_core::IUnknownImpl {
fn GetObjectDiskSize(&self, pqwsize: *mut u64) -> windows_core::Result<()>;
fn Write(&self, pfio: windows_core::Ref<IFileIo>) -> windows_core::Result<()>;
fn Read(&self, pfio: windows_core::Ref<IFileIo>) -> windows_core::Result<()>;
}
impl IFileClient_Vtbl {
pub const fn new<Identity: IFileClient_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetObjectDiskSize<Identity: IFileClient_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pqwsize: *mut u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFileClient_Impl::GetObjectDiskSize(this, core::mem::transmute_copy(&pqwsize)).into()
}
}
unsafe extern "system" fn Write<Identity: IFileClient_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pfio: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFileClient_Impl::Write(this, core::mem::transmute_copy(&pfio)).into()
}
}
unsafe extern "system" fn Read<Identity: IFileClient_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pfio: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFileClient_Impl::Read(this, core::mem::transmute_copy(&pfio)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetObjectDiskSize: GetObjectDiskSize::<Identity, OFFSET>,
Write: Write::<Identity, OFFSET>,
Read: Read::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFileClient as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IFileClient {}
windows_core::imp::define_interface!(IFileIo, IFileIo_Vtbl, 0x11993196_1244_4840_ab44_480975c4ffe4);
windows_core::imp::interface_hierarchy!(IFileIo, windows_core::IUnknown);
impl IFileIo {
pub unsafe fn Initialize<P2>(&self, eaccessmode: FILE_ACCESSMODE, eopenmode: FILE_OPENMODE, pwszfilename: P2) -> windows_core::Result<()>
where
P2: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), eaccessmode, eopenmode, pwszfilename.param().abi()).ok() }
}
pub unsafe fn GetLength(&self, pqwlength: *mut u64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetLength)(windows_core::Interface::as_raw(self), pqwlength as _).ok() }
}
pub unsafe fn SetLength(&self, qwlength: u64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetLength)(windows_core::Interface::as_raw(self), qwlength).ok() }
}
pub unsafe fn GetCurrentPosition(&self, pqwposition: *mut u64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetCurrentPosition)(windows_core::Interface::as_raw(self), pqwposition as _).ok() }
}
pub unsafe fn SetCurrentPosition(&self, qwposition: u64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetCurrentPosition)(windows_core::Interface::as_raw(self), qwposition).ok() }
}
pub unsafe fn IsEndOfStream(&self, pbendofstream: *mut windows_core::BOOL) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).IsEndOfStream)(windows_core::Interface::as_raw(self), pbendofstream as _).ok() }
}
pub unsafe fn Read(&self, pbt: *mut u8, ul: u32, pulread: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), pbt as _, ul, pulread as _).ok() }
}
pub unsafe fn Write(&self, pbt: *mut u8, ul: u32, pulwritten: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Write)(windows_core::Interface::as_raw(self), pbt as _, ul, pulwritten as _).ok() }
}
pub unsafe fn Seek(&self, eseekorigin: SEEK_ORIGIN, qwseekoffset: u64, dwseekflags: u32, pqwcurrentposition: *mut u64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Seek)(windows_core::Interface::as_raw(self), eseekorigin, qwseekoffset, dwseekflags, pqwcurrentposition as _).ok() }
}
pub unsafe fn Close(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFileIo_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub Initialize: unsafe extern "system" fn(*mut core::ffi::c_void, FILE_ACCESSMODE, FILE_OPENMODE, windows_core::PCWSTR) -> windows_core::HRESULT,
pub GetLength: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
pub SetLength: unsafe extern "system" fn(*mut core::ffi::c_void, u64) -> windows_core::HRESULT,
pub GetCurrentPosition: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
pub SetCurrentPosition: unsafe extern "system" fn(*mut core::ffi::c_void, u64) -> windows_core::HRESULT,
pub IsEndOfStream: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub Read: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u8, u32, *mut u32) -> windows_core::HRESULT,
pub Write: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u8, u32, *mut u32) -> windows_core::HRESULT,
pub Seek: unsafe extern "system" fn(*mut core::ffi::c_void, SEEK_ORIGIN, u64, u32, *mut u64) -> windows_core::HRESULT,
pub Close: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IFileIo_Impl: windows_core::IUnknownImpl {
fn Initialize(&self, eaccessmode: FILE_ACCESSMODE, eopenmode: FILE_OPENMODE, pwszfilename: &windows_core::PCWSTR) -> windows_core::Result<()>;
fn GetLength(&self, pqwlength: *mut u64) -> windows_core::Result<()>;
fn SetLength(&self, qwlength: u64) -> windows_core::Result<()>;
fn GetCurrentPosition(&self, pqwposition: *mut u64) -> windows_core::Result<()>;
fn SetCurrentPosition(&self, qwposition: u64) -> windows_core::Result<()>;
fn IsEndOfStream(&self, pbendofstream: *mut windows_core::BOOL) -> windows_core::Result<()>;
fn Read(&self, pbt: *mut u8, ul: u32, pulread: *mut u32) -> windows_core::Result<()>;
fn Write(&self, pbt: *mut u8, ul: u32, pulwritten: *mut u32) -> windows_core::Result<()>;
fn Seek(&self, eseekorigin: SEEK_ORIGIN, qwseekoffset: u64, dwseekflags: u32, pqwcurrentposition: *mut u64) -> windows_core::Result<()>;
fn Close(&self) -> windows_core::Result<()>;
}
impl IFileIo_Vtbl {
pub const fn new<Identity: IFileIo_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Initialize<Identity: IFileIo_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, eaccessmode: FILE_ACCESSMODE, eopenmode: FILE_OPENMODE, pwszfilename: windows_core::PCWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFileIo_Impl::Initialize(this, core::mem::transmute_copy(&eaccessmode), core::mem::transmute_copy(&eopenmode), core::mem::transmute(&pwszfilename)).into()
}
}
unsafe extern "system" fn GetLength<Identity: IFileIo_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pqwlength: *mut u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFileIo_Impl::GetLength(this, core::mem::transmute_copy(&pqwlength)).into()
}
}
unsafe extern "system" fn SetLength<Identity: IFileIo_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, qwlength: u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFileIo_Impl::SetLength(this, core::mem::transmute_copy(&qwlength)).into()
}
}
unsafe extern "system" fn GetCurrentPosition<Identity: IFileIo_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pqwposition: *mut u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFileIo_Impl::GetCurrentPosition(this, core::mem::transmute_copy(&pqwposition)).into()
}
}
unsafe extern "system" fn SetCurrentPosition<Identity: IFileIo_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, qwposition: u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFileIo_Impl::SetCurrentPosition(this, core::mem::transmute_copy(&qwposition)).into()
}
}
unsafe extern "system" fn IsEndOfStream<Identity: IFileIo_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbendofstream: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFileIo_Impl::IsEndOfStream(this, core::mem::transmute_copy(&pbendofstream)).into()
}
}
unsafe extern "system" fn Read<Identity: IFileIo_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbt: *mut u8, ul: u32, pulread: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFileIo_Impl::Read(this, core::mem::transmute_copy(&pbt), core::mem::transmute_copy(&ul), core::mem::transmute_copy(&pulread)).into()
}
}
unsafe extern "system" fn Write<Identity: IFileIo_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbt: *mut u8, ul: u32, pulwritten: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFileIo_Impl::Write(this, core::mem::transmute_copy(&pbt), core::mem::transmute_copy(&ul), core::mem::transmute_copy(&pulwritten)).into()
}
}
unsafe extern "system" fn Seek<Identity: IFileIo_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, eseekorigin: SEEK_ORIGIN, qwseekoffset: u64, dwseekflags: u32, pqwcurrentposition: *mut u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFileIo_Impl::Seek(this, core::mem::transmute_copy(&eseekorigin), core::mem::transmute_copy(&qwseekoffset), core::mem::transmute_copy(&dwseekflags), core::mem::transmute_copy(&pqwcurrentposition)).into()
}
}
unsafe extern "system" fn Close<Identity: IFileIo_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFileIo_Impl::Close(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Initialize: Initialize::<Identity, OFFSET>,
GetLength: GetLength::<Identity, OFFSET>,
SetLength: SetLength::<Identity, OFFSET>,
GetCurrentPosition: GetCurrentPosition::<Identity, OFFSET>,
SetCurrentPosition: SetCurrentPosition::<Identity, OFFSET>,
IsEndOfStream: IsEndOfStream::<Identity, OFFSET>,
Read: Read::<Identity, OFFSET>,
Write: Write::<Identity, OFFSET>,
Seek: Seek::<Identity, OFFSET>,
Close: Close::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFileIo as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IFileIo {}
windows_core::imp::define_interface!(IMF2DBuffer, IMF2DBuffer_Vtbl, 0x7dc9d5f9_9ed9_44ec_9bbf_0600bb589fbb);
windows_core::imp::interface_hierarchy!(IMF2DBuffer, windows_core::IUnknown);
impl IMF2DBuffer {
pub unsafe fn Lock2D(&self, ppbscanline0: *mut *mut u8, plpitch: *mut i32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Lock2D)(windows_core::Interface::as_raw(self), ppbscanline0 as _, plpitch as _).ok() }
}
pub unsafe fn Unlock2D(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Unlock2D)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn GetScanline0AndPitch(&self, pbscanline0: *mut *mut u8, plpitch: *mut i32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetScanline0AndPitch)(windows_core::Interface::as_raw(self), pbscanline0 as _, plpitch as _).ok() }
}
pub unsafe fn IsContiguousFormat(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).IsContiguousFormat)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetContiguousLength(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetContiguousLength)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn ContiguousCopyTo(&self, pbdestbuffer: &mut [u8]) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).ContiguousCopyTo)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdestbuffer.as_ptr()), pbdestbuffer.len().try_into().unwrap()).ok() }
}
pub unsafe fn ContiguousCopyFrom(&self, pbsrcbuffer: &[u8]) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).ContiguousCopyFrom)(windows_core::Interface::as_raw(self), core::mem::transmute(pbsrcbuffer.as_ptr()), pbsrcbuffer.len().try_into().unwrap()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMF2DBuffer_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub Lock2D: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut u8, *mut i32) -> windows_core::HRESULT,
pub Unlock2D: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetScanline0AndPitch: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut u8, *mut i32) -> windows_core::HRESULT,
pub IsContiguousFormat: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub GetContiguousLength: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub ContiguousCopyTo: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u8, u32) -> windows_core::HRESULT,
pub ContiguousCopyFrom: unsafe extern "system" fn(*mut core::ffi::c_void, *const u8, u32) -> windows_core::HRESULT,
}
pub trait IMF2DBuffer_Impl: windows_core::IUnknownImpl {
fn Lock2D(&self, ppbscanline0: *mut *mut u8, plpitch: *mut i32) -> windows_core::Result<()>;
fn Unlock2D(&self) -> windows_core::Result<()>;
fn GetScanline0AndPitch(&self, pbscanline0: *mut *mut u8, plpitch: *mut i32) -> windows_core::Result<()>;
fn IsContiguousFormat(&self) -> windows_core::Result<windows_core::BOOL>;
fn GetContiguousLength(&self) -> windows_core::Result<u32>;
fn ContiguousCopyTo(&self, pbdestbuffer: *mut u8, cbdestbuffer: u32) -> windows_core::Result<()>;
fn ContiguousCopyFrom(&self, pbsrcbuffer: *const u8, cbsrcbuffer: u32) -> windows_core::Result<()>;
}
impl IMF2DBuffer_Vtbl {
pub const fn new<Identity: IMF2DBuffer_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Lock2D<Identity: IMF2DBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppbscanline0: *mut *mut u8, plpitch: *mut i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMF2DBuffer_Impl::Lock2D(this, core::mem::transmute_copy(&ppbscanline0), core::mem::transmute_copy(&plpitch)).into()
}
}
unsafe extern "system" fn Unlock2D<Identity: IMF2DBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMF2DBuffer_Impl::Unlock2D(this).into()
}
}
unsafe extern "system" fn GetScanline0AndPitch<Identity: IMF2DBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbscanline0: *mut *mut u8, plpitch: *mut i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMF2DBuffer_Impl::GetScanline0AndPitch(this, core::mem::transmute_copy(&pbscanline0), core::mem::transmute_copy(&plpitch)).into()
}
}
unsafe extern "system" fn IsContiguousFormat<Identity: IMF2DBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pfiscontiguous: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMF2DBuffer_Impl::IsContiguousFormat(this) {
Ok(ok__) => {
pfiscontiguous.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetContiguousLength<Identity: IMF2DBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcblength: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMF2DBuffer_Impl::GetContiguousLength(this) {
Ok(ok__) => {
pcblength.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn ContiguousCopyTo<Identity: IMF2DBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbdestbuffer: *mut u8, cbdestbuffer: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMF2DBuffer_Impl::ContiguousCopyTo(this, core::mem::transmute_copy(&pbdestbuffer), core::mem::transmute_copy(&cbdestbuffer)).into()
}
}
unsafe extern "system" fn ContiguousCopyFrom<Identity: IMF2DBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbsrcbuffer: *const u8, cbsrcbuffer: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMF2DBuffer_Impl::ContiguousCopyFrom(this, core::mem::transmute_copy(&pbsrcbuffer), core::mem::transmute_copy(&cbsrcbuffer)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Lock2D: Lock2D::<Identity, OFFSET>,
Unlock2D: Unlock2D::<Identity, OFFSET>,
GetScanline0AndPitch: GetScanline0AndPitch::<Identity, OFFSET>,
IsContiguousFormat: IsContiguousFormat::<Identity, OFFSET>,
GetContiguousLength: GetContiguousLength::<Identity, OFFSET>,
ContiguousCopyTo: ContiguousCopyTo::<Identity, OFFSET>,
ContiguousCopyFrom: ContiguousCopyFrom::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMF2DBuffer as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMF2DBuffer {}
windows_core::imp::define_interface!(IMF2DBuffer2, IMF2DBuffer2_Vtbl, 0x33ae5ea6_4316_436f_8ddd_d73d22f829ec);
impl core::ops::Deref for IMF2DBuffer2 {
type Target = IMF2DBuffer;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMF2DBuffer2, windows_core::IUnknown, IMF2DBuffer);
impl IMF2DBuffer2 {
pub unsafe fn Lock2DSize(&self, lockflags: MF2DBuffer_LockFlags, ppbscanline0: *mut *mut u8, plpitch: *mut i32, ppbbufferstart: *mut *mut u8, pcbbufferlength: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Lock2DSize)(windows_core::Interface::as_raw(self), lockflags, ppbscanline0 as _, plpitch as _, ppbbufferstart as _, pcbbufferlength as _).ok() }
}
pub unsafe fn Copy2DTo<P0>(&self, pdestbuffer: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMF2DBuffer2>,
{
unsafe { (windows_core::Interface::vtable(self).Copy2DTo)(windows_core::Interface::as_raw(self), pdestbuffer.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMF2DBuffer2_Vtbl {
pub base__: IMF2DBuffer_Vtbl,
pub Lock2DSize: unsafe extern "system" fn(*mut core::ffi::c_void, MF2DBuffer_LockFlags, *mut *mut u8, *mut i32, *mut *mut u8, *mut u32) -> windows_core::HRESULT,
pub Copy2DTo: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMF2DBuffer2_Impl: IMF2DBuffer_Impl {
fn Lock2DSize(&self, lockflags: MF2DBuffer_LockFlags, ppbscanline0: *mut *mut u8, plpitch: *mut i32, ppbbufferstart: *mut *mut u8, pcbbufferlength: *mut u32) -> windows_core::Result<()>;
fn Copy2DTo(&self, pdestbuffer: windows_core::Ref<IMF2DBuffer2>) -> windows_core::Result<()>;
}
impl IMF2DBuffer2_Vtbl {
pub const fn new<Identity: IMF2DBuffer2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Lock2DSize<Identity: IMF2DBuffer2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, lockflags: MF2DBuffer_LockFlags, ppbscanline0: *mut *mut u8, plpitch: *mut i32, ppbbufferstart: *mut *mut u8, pcbbufferlength: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMF2DBuffer2_Impl::Lock2DSize(this, core::mem::transmute_copy(&lockflags), core::mem::transmute_copy(&ppbscanline0), core::mem::transmute_copy(&plpitch), core::mem::transmute_copy(&ppbbufferstart), core::mem::transmute_copy(&pcbbufferlength)).into()
}
}
unsafe extern "system" fn Copy2DTo<Identity: IMF2DBuffer2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdestbuffer: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMF2DBuffer2_Impl::Copy2DTo(this, core::mem::transmute_copy(&pdestbuffer)).into()
}
}
Self { base__: IMF2DBuffer_Vtbl::new::<Identity, OFFSET>(), Lock2DSize: Lock2DSize::<Identity, OFFSET>, Copy2DTo: Copy2DTo::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMF2DBuffer2 as windows_core::Interface>::IID || iid == &<IMF2DBuffer as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMF2DBuffer2 {}
windows_core::imp::define_interface!(IMFASFContentInfo, IMFASFContentInfo_Vtbl, 0xb1dca5cd_d5da_4451_8e9e_db5c59914ead);
windows_core::imp::interface_hierarchy!(IMFASFContentInfo, windows_core::IUnknown);
impl IMFASFContentInfo {
pub unsafe fn GetHeaderSize<P0>(&self, pistartofcontent: P0) -> windows_core::Result<u64>
where
P0: windows_core::Param<IMFMediaBuffer>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetHeaderSize)(windows_core::Interface::as_raw(self), pistartofcontent.param().abi(), &mut result__).map(|| result__)
}
}
pub unsafe fn ParseHeader<P0>(&self, piheaderbuffer: P0, cboffsetwithinheader: u64) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaBuffer>,
{
unsafe { (windows_core::Interface::vtable(self).ParseHeader)(windows_core::Interface::as_raw(self), piheaderbuffer.param().abi(), cboffsetwithinheader).ok() }
}
pub unsafe fn GenerateHeader<P0>(&self, piheader: P0) -> windows_core::Result<u32>
where
P0: windows_core::Param<IMFMediaBuffer>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GenerateHeader)(windows_core::Interface::as_raw(self), piheader.param().abi(), &mut result__).map(|| result__)
}
}
pub unsafe fn GetProfile(&self) -> windows_core::Result<IMFASFProfile> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetProfile)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn SetProfile<P0>(&self, piprofile: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFASFProfile>,
{
unsafe { (windows_core::Interface::vtable(self).SetProfile)(windows_core::Interface::as_raw(self), piprofile.param().abi()).ok() }
}
pub unsafe fn GeneratePresentationDescriptor(&self) -> windows_core::Result<IMFPresentationDescriptor> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GeneratePresentationDescriptor)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn GetEncodingConfigurationPropertyStore(&self, wstreamnumber: u16) -> windows_core::Result<super::super::UI::Shell::PropertiesSystem::IPropertyStore> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetEncodingConfigurationPropertyStore)(windows_core::Interface::as_raw(self), wstreamnumber, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFASFContentInfo_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetHeaderSize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
pub ParseHeader: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u64) -> windows_core::HRESULT,
pub GenerateHeader: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetProfile: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetProfile: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GeneratePresentationDescriptor: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub GetEncodingConfigurationPropertyStore: unsafe extern "system" fn(*mut core::ffi::c_void, u16, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))]
GetEncodingConfigurationPropertyStore: usize,
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub trait IMFASFContentInfo_Impl: windows_core::IUnknownImpl {
fn GetHeaderSize(&self, pistartofcontent: windows_core::Ref<IMFMediaBuffer>) -> windows_core::Result<u64>;
fn ParseHeader(&self, piheaderbuffer: windows_core::Ref<IMFMediaBuffer>, cboffsetwithinheader: u64) -> windows_core::Result<()>;
fn GenerateHeader(&self, piheader: windows_core::Ref<IMFMediaBuffer>) -> windows_core::Result<u32>;
fn GetProfile(&self) -> windows_core::Result<IMFASFProfile>;
fn SetProfile(&self, piprofile: windows_core::Ref<IMFASFProfile>) -> windows_core::Result<()>;
fn GeneratePresentationDescriptor(&self) -> windows_core::Result<IMFPresentationDescriptor>;
fn GetEncodingConfigurationPropertyStore(&self, wstreamnumber: u16) -> windows_core::Result<super::super::UI::Shell::PropertiesSystem::IPropertyStore>;
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl IMFASFContentInfo_Vtbl {
pub const fn new<Identity: IMFASFContentInfo_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetHeaderSize<Identity: IMFASFContentInfo_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pistartofcontent: *mut core::ffi::c_void, cbheadersize: *mut u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFContentInfo_Impl::GetHeaderSize(this, core::mem::transmute_copy(&pistartofcontent)) {
Ok(ok__) => {
cbheadersize.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn ParseHeader<Identity: IMFASFContentInfo_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, piheaderbuffer: *mut core::ffi::c_void, cboffsetwithinheader: u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFContentInfo_Impl::ParseHeader(this, core::mem::transmute_copy(&piheaderbuffer), core::mem::transmute_copy(&cboffsetwithinheader)).into()
}
}
unsafe extern "system" fn GenerateHeader<Identity: IMFASFContentInfo_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, piheader: *mut core::ffi::c_void, pcbheader: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFContentInfo_Impl::GenerateHeader(this, core::mem::transmute_copy(&piheader)) {
Ok(ok__) => {
pcbheader.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetProfile<Identity: IMFASFContentInfo_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppiprofile: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFContentInfo_Impl::GetProfile(this) {
Ok(ok__) => {
ppiprofile.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetProfile<Identity: IMFASFContentInfo_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, piprofile: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFContentInfo_Impl::SetProfile(this, core::mem::transmute_copy(&piprofile)).into()
}
}
unsafe extern "system" fn GeneratePresentationDescriptor<Identity: IMFASFContentInfo_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppipresentationdescriptor: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFContentInfo_Impl::GeneratePresentationDescriptor(this) {
Ok(ok__) => {
ppipresentationdescriptor.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetEncodingConfigurationPropertyStore<Identity: IMFASFContentInfo_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, wstreamnumber: u16, ppistore: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFContentInfo_Impl::GetEncodingConfigurationPropertyStore(this, core::mem::transmute_copy(&wstreamnumber)) {
Ok(ok__) => {
ppistore.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetHeaderSize: GetHeaderSize::<Identity, OFFSET>,
ParseHeader: ParseHeader::<Identity, OFFSET>,
GenerateHeader: GenerateHeader::<Identity, OFFSET>,
GetProfile: GetProfile::<Identity, OFFSET>,
SetProfile: SetProfile::<Identity, OFFSET>,
GeneratePresentationDescriptor: GeneratePresentationDescriptor::<Identity, OFFSET>,
GetEncodingConfigurationPropertyStore: GetEncodingConfigurationPropertyStore::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFASFContentInfo as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl windows_core::RuntimeName for IMFASFContentInfo {}
windows_core::imp::define_interface!(IMFASFIndexer, IMFASFIndexer_Vtbl, 0x53590f48_dc3b_4297_813f_787761ad7b3e);
windows_core::imp::interface_hierarchy!(IMFASFIndexer, windows_core::IUnknown);
impl IMFASFIndexer {
pub unsafe fn SetFlags(&self, dwflags: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetFlags)(windows_core::Interface::as_raw(self), dwflags).ok() }
}
pub unsafe fn GetFlags(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetFlags)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn Initialize<P0>(&self, picontentinfo: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFASFContentInfo>,
{
unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), picontentinfo.param().abi()).ok() }
}
pub unsafe fn GetIndexPosition<P0>(&self, picontentinfo: P0) -> windows_core::Result<u64>
where
P0: windows_core::Param<IMFASFContentInfo>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetIndexPosition)(windows_core::Interface::as_raw(self), picontentinfo.param().abi(), &mut result__).map(|| result__)
}
}
pub unsafe fn SetIndexByteStreams(&self, ppibytestreams: *const Option<IMFByteStream>, cbytestreams: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetIndexByteStreams)(windows_core::Interface::as_raw(self), core::mem::transmute(ppibytestreams), cbytestreams).ok() }
}
pub unsafe fn GetIndexByteStreamCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetIndexByteStreamCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetIndexStatus(&self, pindexidentifier: *const ASF_INDEX_IDENTIFIER, pfisindexed: *mut windows_core::BOOL, pbindexdescriptor: *mut u8, pcbindexdescriptor: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetIndexStatus)(windows_core::Interface::as_raw(self), pindexidentifier, pfisindexed as _, pbindexdescriptor as _, pcbindexdescriptor as _).ok() }
}
pub unsafe fn SetIndexStatus(&self, pbindexdescriptor: *const u8, cbindexdescriptor: u32, fgenerateindex: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetIndexStatus)(windows_core::Interface::as_raw(self), pbindexdescriptor, cbindexdescriptor, fgenerateindex.into()).ok() }
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn GetSeekPositionForValue(&self, pvarvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT, pindexidentifier: *const ASF_INDEX_IDENTIFIER, pcboffsetwithindata: *mut u64, phnsapproxtime: *mut i64, pdwpayloadnumberofstreamwithinpacket: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetSeekPositionForValue)(windows_core::Interface::as_raw(self), core::mem::transmute(pvarvalue), pindexidentifier, pcboffsetwithindata as _, phnsapproxtime as _, pdwpayloadnumberofstreamwithinpacket as _).ok() }
}
pub unsafe fn GenerateIndexEntries<P0>(&self, piasfpacketsample: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFSample>,
{
unsafe { (windows_core::Interface::vtable(self).GenerateIndexEntries)(windows_core::Interface::as_raw(self), piasfpacketsample.param().abi()).ok() }
}
pub unsafe fn CommitIndex<P0>(&self, picontentinfo: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFASFContentInfo>,
{
unsafe { (windows_core::Interface::vtable(self).CommitIndex)(windows_core::Interface::as_raw(self), picontentinfo.param().abi()).ok() }
}
pub unsafe fn GetIndexWriteSpace(&self) -> windows_core::Result<u64> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetIndexWriteSpace)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetCompletedIndex<P0>(&self, piindexbuffer: P0, cboffsetwithinindex: u64) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaBuffer>,
{
unsafe { (windows_core::Interface::vtable(self).GetCompletedIndex)(windows_core::Interface::as_raw(self), piindexbuffer.param().abi(), cboffsetwithinindex).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFASFIndexer_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetFlags: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub GetFlags: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub Initialize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetIndexPosition: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
pub SetIndexByteStreams: unsafe extern "system" fn(*mut core::ffi::c_void, *const *mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub GetIndexByteStreamCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetIndexStatus: unsafe extern "system" fn(*mut core::ffi::c_void, *const ASF_INDEX_IDENTIFIER, *mut windows_core::BOOL, *mut u8, *mut u32) -> windows_core::HRESULT,
pub SetIndexStatus: unsafe extern "system" fn(*mut core::ffi::c_void, *const u8, u32, windows_core::BOOL) -> windows_core::HRESULT,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub GetSeekPositionForValue: unsafe extern "system" fn(*mut core::ffi::c_void, *const super::super::System::Com::StructuredStorage::PROPVARIANT, *const ASF_INDEX_IDENTIFIER, *mut u64, *mut i64, *mut u32) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
GetSeekPositionForValue: usize,
pub GenerateIndexEntries: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CommitIndex: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetIndexWriteSpace: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
pub GetCompletedIndex: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u64) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFASFIndexer_Impl: windows_core::IUnknownImpl {
fn SetFlags(&self, dwflags: u32) -> windows_core::Result<()>;
fn GetFlags(&self) -> windows_core::Result<u32>;
fn Initialize(&self, picontentinfo: windows_core::Ref<IMFASFContentInfo>) -> windows_core::Result<()>;
fn GetIndexPosition(&self, picontentinfo: windows_core::Ref<IMFASFContentInfo>) -> windows_core::Result<u64>;
fn SetIndexByteStreams(&self, ppibytestreams: *const Option<IMFByteStream>, cbytestreams: u32) -> windows_core::Result<()>;
fn GetIndexByteStreamCount(&self) -> windows_core::Result<u32>;
fn GetIndexStatus(&self, pindexidentifier: *const ASF_INDEX_IDENTIFIER, pfisindexed: *mut windows_core::BOOL, pbindexdescriptor: *mut u8, pcbindexdescriptor: *mut u32) -> windows_core::Result<()>;
fn SetIndexStatus(&self, pbindexdescriptor: *const u8, cbindexdescriptor: u32, fgenerateindex: windows_core::BOOL) -> windows_core::Result<()>;
fn GetSeekPositionForValue(&self, pvarvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT, pindexidentifier: *const ASF_INDEX_IDENTIFIER, pcboffsetwithindata: *mut u64, phnsapproxtime: *mut i64, pdwpayloadnumberofstreamwithinpacket: *mut u32) -> windows_core::Result<()>;
fn GenerateIndexEntries(&self, piasfpacketsample: windows_core::Ref<IMFSample>) -> windows_core::Result<()>;
fn CommitIndex(&self, picontentinfo: windows_core::Ref<IMFASFContentInfo>) -> windows_core::Result<()>;
fn GetIndexWriteSpace(&self) -> windows_core::Result<u64>;
fn GetCompletedIndex(&self, piindexbuffer: windows_core::Ref<IMFMediaBuffer>, cboffsetwithinindex: u64) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFASFIndexer_Vtbl {
pub const fn new<Identity: IMFASFIndexer_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetFlags<Identity: IMFASFIndexer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFIndexer_Impl::SetFlags(this, core::mem::transmute_copy(&dwflags)).into()
}
}
unsafe extern "system" fn GetFlags<Identity: IMFASFIndexer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwflags: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFIndexer_Impl::GetFlags(this) {
Ok(ok__) => {
pdwflags.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Initialize<Identity: IMFASFIndexer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, picontentinfo: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFIndexer_Impl::Initialize(this, core::mem::transmute_copy(&picontentinfo)).into()
}
}
unsafe extern "system" fn GetIndexPosition<Identity: IMFASFIndexer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, picontentinfo: *mut core::ffi::c_void, pcbindexoffset: *mut u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFIndexer_Impl::GetIndexPosition(this, core::mem::transmute_copy(&picontentinfo)) {
Ok(ok__) => {
pcbindexoffset.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetIndexByteStreams<Identity: IMFASFIndexer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppibytestreams: *const *mut core::ffi::c_void, cbytestreams: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFIndexer_Impl::SetIndexByteStreams(this, core::mem::transmute_copy(&ppibytestreams), core::mem::transmute_copy(&cbytestreams)).into()
}
}
unsafe extern "system" fn GetIndexByteStreamCount<Identity: IMFASFIndexer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcbytestreams: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFIndexer_Impl::GetIndexByteStreamCount(this) {
Ok(ok__) => {
pcbytestreams.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetIndexStatus<Identity: IMFASFIndexer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pindexidentifier: *const ASF_INDEX_IDENTIFIER, pfisindexed: *mut windows_core::BOOL, pbindexdescriptor: *mut u8, pcbindexdescriptor: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFIndexer_Impl::GetIndexStatus(this, core::mem::transmute_copy(&pindexidentifier), core::mem::transmute_copy(&pfisindexed), core::mem::transmute_copy(&pbindexdescriptor), core::mem::transmute_copy(&pcbindexdescriptor)).into()
}
}
unsafe extern "system" fn SetIndexStatus<Identity: IMFASFIndexer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbindexdescriptor: *const u8, cbindexdescriptor: u32, fgenerateindex: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFIndexer_Impl::SetIndexStatus(this, core::mem::transmute_copy(&pbindexdescriptor), core::mem::transmute_copy(&cbindexdescriptor), core::mem::transmute_copy(&fgenerateindex)).into()
}
}
unsafe extern "system" fn GetSeekPositionForValue<Identity: IMFASFIndexer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pvarvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT, pindexidentifier: *const ASF_INDEX_IDENTIFIER, pcboffsetwithindata: *mut u64, phnsapproxtime: *mut i64, pdwpayloadnumberofstreamwithinpacket: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFIndexer_Impl::GetSeekPositionForValue(this, core::mem::transmute_copy(&pvarvalue), core::mem::transmute_copy(&pindexidentifier), core::mem::transmute_copy(&pcboffsetwithindata), core::mem::transmute_copy(&phnsapproxtime), core::mem::transmute_copy(&pdwpayloadnumberofstreamwithinpacket)).into()
}
}
unsafe extern "system" fn GenerateIndexEntries<Identity: IMFASFIndexer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, piasfpacketsample: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFIndexer_Impl::GenerateIndexEntries(this, core::mem::transmute_copy(&piasfpacketsample)).into()
}
}
unsafe extern "system" fn CommitIndex<Identity: IMFASFIndexer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, picontentinfo: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFIndexer_Impl::CommitIndex(this, core::mem::transmute_copy(&picontentinfo)).into()
}
}
unsafe extern "system" fn GetIndexWriteSpace<Identity: IMFASFIndexer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcbindexwritespace: *mut u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFIndexer_Impl::GetIndexWriteSpace(this) {
Ok(ok__) => {
pcbindexwritespace.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetCompletedIndex<Identity: IMFASFIndexer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, piindexbuffer: *mut core::ffi::c_void, cboffsetwithinindex: u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFIndexer_Impl::GetCompletedIndex(this, core::mem::transmute_copy(&piindexbuffer), core::mem::transmute_copy(&cboffsetwithinindex)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetFlags: SetFlags::<Identity, OFFSET>,
GetFlags: GetFlags::<Identity, OFFSET>,
Initialize: Initialize::<Identity, OFFSET>,
GetIndexPosition: GetIndexPosition::<Identity, OFFSET>,
SetIndexByteStreams: SetIndexByteStreams::<Identity, OFFSET>,
GetIndexByteStreamCount: GetIndexByteStreamCount::<Identity, OFFSET>,
GetIndexStatus: GetIndexStatus::<Identity, OFFSET>,
SetIndexStatus: SetIndexStatus::<Identity, OFFSET>,
GetSeekPositionForValue: GetSeekPositionForValue::<Identity, OFFSET>,
GenerateIndexEntries: GenerateIndexEntries::<Identity, OFFSET>,
CommitIndex: CommitIndex::<Identity, OFFSET>,
GetIndexWriteSpace: GetIndexWriteSpace::<Identity, OFFSET>,
GetCompletedIndex: GetCompletedIndex::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFASFIndexer as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFASFIndexer {}
windows_core::imp::define_interface!(IMFASFMultiplexer, IMFASFMultiplexer_Vtbl, 0x57bdd80a_9b38_4838_b737_c58f670d7d4f);
windows_core::imp::interface_hierarchy!(IMFASFMultiplexer, windows_core::IUnknown);
impl IMFASFMultiplexer {
pub unsafe fn Initialize<P0>(&self, picontentinfo: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFASFContentInfo>,
{
unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), picontentinfo.param().abi()).ok() }
}
pub unsafe fn SetFlags(&self, dwflags: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetFlags)(windows_core::Interface::as_raw(self), dwflags).ok() }
}
pub unsafe fn GetFlags(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetFlags)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn ProcessSample<P1>(&self, wstreamnumber: u16, pisample: P1, hnstimestampadjust: i64) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFSample>,
{
unsafe { (windows_core::Interface::vtable(self).ProcessSample)(windows_core::Interface::as_raw(self), wstreamnumber, pisample.param().abi(), hnstimestampadjust).ok() }
}
pub unsafe fn GetNextPacket(&self, pdwstatusflags: *mut u32, ppipacket: *mut Option<IMFSample>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetNextPacket)(windows_core::Interface::as_raw(self), pdwstatusflags as _, core::mem::transmute(ppipacket)).ok() }
}
pub unsafe fn Flush(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Flush)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn End<P0>(&self, picontentinfo: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFASFContentInfo>,
{
unsafe { (windows_core::Interface::vtable(self).End)(windows_core::Interface::as_raw(self), picontentinfo.param().abi()).ok() }
}
pub unsafe fn GetStatistics(&self, wstreamnumber: u16) -> windows_core::Result<ASF_MUX_STATISTICS> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStatistics)(windows_core::Interface::as_raw(self), wstreamnumber, &mut result__).map(|| result__)
}
}
pub unsafe fn SetSyncTolerance(&self, mssynctolerance: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetSyncTolerance)(windows_core::Interface::as_raw(self), mssynctolerance).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFASFMultiplexer_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub Initialize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetFlags: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub GetFlags: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub ProcessSample: unsafe extern "system" fn(*mut core::ffi::c_void, u16, *mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub GetNextPacket: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Flush: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub End: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetStatistics: unsafe extern "system" fn(*mut core::ffi::c_void, u16, *mut ASF_MUX_STATISTICS) -> windows_core::HRESULT,
pub SetSyncTolerance: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
}
pub trait IMFASFMultiplexer_Impl: windows_core::IUnknownImpl {
fn Initialize(&self, picontentinfo: windows_core::Ref<IMFASFContentInfo>) -> windows_core::Result<()>;
fn SetFlags(&self, dwflags: u32) -> windows_core::Result<()>;
fn GetFlags(&self) -> windows_core::Result<u32>;
fn ProcessSample(&self, wstreamnumber: u16, pisample: windows_core::Ref<IMFSample>, hnstimestampadjust: i64) -> windows_core::Result<()>;
fn GetNextPacket(&self, pdwstatusflags: *mut u32, ppipacket: windows_core::OutRef<IMFSample>) -> windows_core::Result<()>;
fn Flush(&self) -> windows_core::Result<()>;
fn End(&self, picontentinfo: windows_core::Ref<IMFASFContentInfo>) -> windows_core::Result<()>;
fn GetStatistics(&self, wstreamnumber: u16) -> windows_core::Result<ASF_MUX_STATISTICS>;
fn SetSyncTolerance(&self, mssynctolerance: u32) -> windows_core::Result<()>;
}
impl IMFASFMultiplexer_Vtbl {
pub const fn new<Identity: IMFASFMultiplexer_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Initialize<Identity: IMFASFMultiplexer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, picontentinfo: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFMultiplexer_Impl::Initialize(this, core::mem::transmute_copy(&picontentinfo)).into()
}
}
unsafe extern "system" fn SetFlags<Identity: IMFASFMultiplexer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFMultiplexer_Impl::SetFlags(this, core::mem::transmute_copy(&dwflags)).into()
}
}
unsafe extern "system" fn GetFlags<Identity: IMFASFMultiplexer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwflags: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFMultiplexer_Impl::GetFlags(this) {
Ok(ok__) => {
pdwflags.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn ProcessSample<Identity: IMFASFMultiplexer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, wstreamnumber: u16, pisample: *mut core::ffi::c_void, hnstimestampadjust: i64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFMultiplexer_Impl::ProcessSample(this, core::mem::transmute_copy(&wstreamnumber), core::mem::transmute_copy(&pisample), core::mem::transmute_copy(&hnstimestampadjust)).into()
}
}
unsafe extern "system" fn GetNextPacket<Identity: IMFASFMultiplexer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwstatusflags: *mut u32, ppipacket: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFMultiplexer_Impl::GetNextPacket(this, core::mem::transmute_copy(&pdwstatusflags), core::mem::transmute_copy(&ppipacket)).into()
}
}
unsafe extern "system" fn Flush<Identity: IMFASFMultiplexer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFMultiplexer_Impl::Flush(this).into()
}
}
unsafe extern "system" fn End<Identity: IMFASFMultiplexer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, picontentinfo: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFMultiplexer_Impl::End(this, core::mem::transmute_copy(&picontentinfo)).into()
}
}
unsafe extern "system" fn GetStatistics<Identity: IMFASFMultiplexer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, wstreamnumber: u16, pmuxstats: *mut ASF_MUX_STATISTICS) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFMultiplexer_Impl::GetStatistics(this, core::mem::transmute_copy(&wstreamnumber)) {
Ok(ok__) => {
pmuxstats.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetSyncTolerance<Identity: IMFASFMultiplexer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, mssynctolerance: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFMultiplexer_Impl::SetSyncTolerance(this, core::mem::transmute_copy(&mssynctolerance)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Initialize: Initialize::<Identity, OFFSET>,
SetFlags: SetFlags::<Identity, OFFSET>,
GetFlags: GetFlags::<Identity, OFFSET>,
ProcessSample: ProcessSample::<Identity, OFFSET>,
GetNextPacket: GetNextPacket::<Identity, OFFSET>,
Flush: Flush::<Identity, OFFSET>,
End: End::<Identity, OFFSET>,
GetStatistics: GetStatistics::<Identity, OFFSET>,
SetSyncTolerance: SetSyncTolerance::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFASFMultiplexer as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFASFMultiplexer {}
windows_core::imp::define_interface!(IMFASFMutualExclusion, IMFASFMutualExclusion_Vtbl, 0x12558291_e399_11d5_bc2a_00b0d0f3f4ab);
windows_core::imp::interface_hierarchy!(IMFASFMutualExclusion, windows_core::IUnknown);
impl IMFASFMutualExclusion {
pub unsafe fn GetType(&self) -> windows_core::Result<windows_core::GUID> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetType)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetType(&self, guidtype: *const windows_core::GUID) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetType)(windows_core::Interface::as_raw(self), guidtype).ok() }
}
pub unsafe fn GetRecordCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetRecordCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetStreamsForRecord(&self, dwrecordnumber: u32, pwstreamnumarray: *mut u16, pcstreams: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetStreamsForRecord)(windows_core::Interface::as_raw(self), dwrecordnumber, pwstreamnumarray as _, pcstreams as _).ok() }
}
pub unsafe fn AddStreamForRecord(&self, dwrecordnumber: u32, wstreamnumber: u16) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).AddStreamForRecord)(windows_core::Interface::as_raw(self), dwrecordnumber, wstreamnumber).ok() }
}
pub unsafe fn RemoveStreamFromRecord(&self, dwrecordnumber: u32, wstreamnumber: u16) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RemoveStreamFromRecord)(windows_core::Interface::as_raw(self), dwrecordnumber, wstreamnumber).ok() }
}
pub unsafe fn RemoveRecord(&self, dwrecordnumber: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RemoveRecord)(windows_core::Interface::as_raw(self), dwrecordnumber).ok() }
}
pub unsafe fn AddRecord(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).AddRecord)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn Clone(&self) -> windows_core::Result<IMFASFMutualExclusion> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFASFMutualExclusion_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT,
pub SetType: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID) -> windows_core::HRESULT,
pub GetRecordCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetStreamsForRecord: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u16, *mut u32) -> windows_core::HRESULT,
pub AddStreamForRecord: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u16) -> windows_core::HRESULT,
pub RemoveStreamFromRecord: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u16) -> windows_core::HRESULT,
pub RemoveRecord: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub AddRecord: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFASFMutualExclusion_Impl: windows_core::IUnknownImpl {
fn GetType(&self) -> windows_core::Result<windows_core::GUID>;
fn SetType(&self, guidtype: *const windows_core::GUID) -> windows_core::Result<()>;
fn GetRecordCount(&self) -> windows_core::Result<u32>;
fn GetStreamsForRecord(&self, dwrecordnumber: u32, pwstreamnumarray: *mut u16, pcstreams: *mut u32) -> windows_core::Result<()>;
fn AddStreamForRecord(&self, dwrecordnumber: u32, wstreamnumber: u16) -> windows_core::Result<()>;
fn RemoveStreamFromRecord(&self, dwrecordnumber: u32, wstreamnumber: u16) -> windows_core::Result<()>;
fn RemoveRecord(&self, dwrecordnumber: u32) -> windows_core::Result<()>;
fn AddRecord(&self) -> windows_core::Result<u32>;
fn Clone(&self) -> windows_core::Result<IMFASFMutualExclusion>;
}
impl IMFASFMutualExclusion_Vtbl {
pub const fn new<Identity: IMFASFMutualExclusion_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetType<Identity: IMFASFMutualExclusion_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pguidtype: *mut windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFMutualExclusion_Impl::GetType(this) {
Ok(ok__) => {
pguidtype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetType<Identity: IMFASFMutualExclusion_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidtype: *const windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFMutualExclusion_Impl::SetType(this, core::mem::transmute_copy(&guidtype)).into()
}
}
unsafe extern "system" fn GetRecordCount<Identity: IMFASFMutualExclusion_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwrecordcount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFMutualExclusion_Impl::GetRecordCount(this) {
Ok(ok__) => {
pdwrecordcount.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetStreamsForRecord<Identity: IMFASFMutualExclusion_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwrecordnumber: u32, pwstreamnumarray: *mut u16, pcstreams: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFMutualExclusion_Impl::GetStreamsForRecord(this, core::mem::transmute_copy(&dwrecordnumber), core::mem::transmute_copy(&pwstreamnumarray), core::mem::transmute_copy(&pcstreams)).into()
}
}
unsafe extern "system" fn AddStreamForRecord<Identity: IMFASFMutualExclusion_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwrecordnumber: u32, wstreamnumber: u16) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFMutualExclusion_Impl::AddStreamForRecord(this, core::mem::transmute_copy(&dwrecordnumber), core::mem::transmute_copy(&wstreamnumber)).into()
}
}
unsafe extern "system" fn RemoveStreamFromRecord<Identity: IMFASFMutualExclusion_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwrecordnumber: u32, wstreamnumber: u16) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFMutualExclusion_Impl::RemoveStreamFromRecord(this, core::mem::transmute_copy(&dwrecordnumber), core::mem::transmute_copy(&wstreamnumber)).into()
}
}
unsafe extern "system" fn RemoveRecord<Identity: IMFASFMutualExclusion_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwrecordnumber: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFMutualExclusion_Impl::RemoveRecord(this, core::mem::transmute_copy(&dwrecordnumber)).into()
}
}
unsafe extern "system" fn AddRecord<Identity: IMFASFMutualExclusion_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwrecordnumber: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFMutualExclusion_Impl::AddRecord(this) {
Ok(ok__) => {
pdwrecordnumber.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Clone<Identity: IMFASFMutualExclusion_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppimutex: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFMutualExclusion_Impl::Clone(this) {
Ok(ok__) => {
ppimutex.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetType: GetType::<Identity, OFFSET>,
SetType: SetType::<Identity, OFFSET>,
GetRecordCount: GetRecordCount::<Identity, OFFSET>,
GetStreamsForRecord: GetStreamsForRecord::<Identity, OFFSET>,
AddStreamForRecord: AddStreamForRecord::<Identity, OFFSET>,
RemoveStreamFromRecord: RemoveStreamFromRecord::<Identity, OFFSET>,
RemoveRecord: RemoveRecord::<Identity, OFFSET>,
AddRecord: AddRecord::<Identity, OFFSET>,
Clone: Clone::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFASFMutualExclusion as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFASFMutualExclusion {}
windows_core::imp::define_interface!(IMFASFProfile, IMFASFProfile_Vtbl, 0xd267bf6a_028b_4e0d_903d_43f0ef82d0d4);
impl core::ops::Deref for IMFASFProfile {
type Target = IMFAttributes;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFASFProfile, windows_core::IUnknown, IMFAttributes);
impl IMFASFProfile {
pub unsafe fn GetStreamCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetStream(&self, dwstreamindex: u32, pwstreamnumber: *mut u16, ppistream: *mut Option<IMFASFStreamConfig>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetStream)(windows_core::Interface::as_raw(self), dwstreamindex, pwstreamnumber as _, core::mem::transmute(ppistream)).ok() }
}
pub unsafe fn GetStreamByNumber(&self, wstreamnumber: u16) -> windows_core::Result<IMFASFStreamConfig> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamByNumber)(windows_core::Interface::as_raw(self), wstreamnumber, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn SetStream<P0>(&self, pistream: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFASFStreamConfig>,
{
unsafe { (windows_core::Interface::vtable(self).SetStream)(windows_core::Interface::as_raw(self), pistream.param().abi()).ok() }
}
pub unsafe fn RemoveStream(&self, wstreamnumber: u16) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RemoveStream)(windows_core::Interface::as_raw(self), wstreamnumber).ok() }
}
pub unsafe fn CreateStream<P0>(&self, pimediatype: P0) -> windows_core::Result<IMFASFStreamConfig>
where
P0: windows_core::Param<IMFMediaType>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateStream)(windows_core::Interface::as_raw(self), pimediatype.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetMutualExclusionCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMutualExclusionCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetMutualExclusion(&self, dwmutexindex: u32) -> windows_core::Result<IMFASFMutualExclusion> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMutualExclusion)(windows_core::Interface::as_raw(self), dwmutexindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn AddMutualExclusion<P0>(&self, pimutex: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFASFMutualExclusion>,
{
unsafe { (windows_core::Interface::vtable(self).AddMutualExclusion)(windows_core::Interface::as_raw(self), pimutex.param().abi()).ok() }
}
pub unsafe fn RemoveMutualExclusion(&self, dwmutexindex: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RemoveMutualExclusion)(windows_core::Interface::as_raw(self), dwmutexindex).ok() }
}
pub unsafe fn CreateMutualExclusion(&self) -> windows_core::Result<IMFASFMutualExclusion> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateMutualExclusion)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetStreamPrioritization(&self) -> windows_core::Result<IMFASFStreamPrioritization> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamPrioritization)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn AddStreamPrioritization<P0>(&self, pistreamprioritization: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFASFStreamPrioritization>,
{
unsafe { (windows_core::Interface::vtable(self).AddStreamPrioritization)(windows_core::Interface::as_raw(self), pistreamprioritization.param().abi()).ok() }
}
pub unsafe fn RemoveStreamPrioritization(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RemoveStreamPrioritization)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn CreateStreamPrioritization(&self) -> windows_core::Result<IMFASFStreamPrioritization> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateStreamPrioritization)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn Clone(&self) -> windows_core::Result<IMFASFProfile> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFASFProfile_Vtbl {
pub base__: IMFAttributes_Vtbl,
pub GetStreamCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetStream: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u16, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetStreamByNumber: unsafe extern "system" fn(*mut core::ffi::c_void, u16, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetStream: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RemoveStream: unsafe extern "system" fn(*mut core::ffi::c_void, u16) -> windows_core::HRESULT,
pub CreateStream: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetMutualExclusionCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetMutualExclusion: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AddMutualExclusion: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RemoveMutualExclusion: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub CreateMutualExclusion: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetStreamPrioritization: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AddStreamPrioritization: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RemoveStreamPrioritization: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub CreateStreamPrioritization: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFASFProfile_Impl: IMFAttributes_Impl {
fn GetStreamCount(&self) -> windows_core::Result<u32>;
fn GetStream(&self, dwstreamindex: u32, pwstreamnumber: *mut u16, ppistream: windows_core::OutRef<IMFASFStreamConfig>) -> windows_core::Result<()>;
fn GetStreamByNumber(&self, wstreamnumber: u16) -> windows_core::Result<IMFASFStreamConfig>;
fn SetStream(&self, pistream: windows_core::Ref<IMFASFStreamConfig>) -> windows_core::Result<()>;
fn RemoveStream(&self, wstreamnumber: u16) -> windows_core::Result<()>;
fn CreateStream(&self, pimediatype: windows_core::Ref<IMFMediaType>) -> windows_core::Result<IMFASFStreamConfig>;
fn GetMutualExclusionCount(&self) -> windows_core::Result<u32>;
fn GetMutualExclusion(&self, dwmutexindex: u32) -> windows_core::Result<IMFASFMutualExclusion>;
fn AddMutualExclusion(&self, pimutex: windows_core::Ref<IMFASFMutualExclusion>) -> windows_core::Result<()>;
fn RemoveMutualExclusion(&self, dwmutexindex: u32) -> windows_core::Result<()>;
fn CreateMutualExclusion(&self) -> windows_core::Result<IMFASFMutualExclusion>;
fn GetStreamPrioritization(&self) -> windows_core::Result<IMFASFStreamPrioritization>;
fn AddStreamPrioritization(&self, pistreamprioritization: windows_core::Ref<IMFASFStreamPrioritization>) -> windows_core::Result<()>;
fn RemoveStreamPrioritization(&self) -> windows_core::Result<()>;
fn CreateStreamPrioritization(&self) -> windows_core::Result<IMFASFStreamPrioritization>;
fn Clone(&self) -> windows_core::Result<IMFASFProfile>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFASFProfile_Vtbl {
pub const fn new<Identity: IMFASFProfile_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetStreamCount<Identity: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcstreams: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFProfile_Impl::GetStreamCount(this) {
Ok(ok__) => {
pcstreams.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetStream<Identity: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, pwstreamnumber: *mut u16, ppistream: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFProfile_Impl::GetStream(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&pwstreamnumber), core::mem::transmute_copy(&ppistream)).into()
}
}
unsafe extern "system" fn GetStreamByNumber<Identity: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, wstreamnumber: u16, ppistream: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFProfile_Impl::GetStreamByNumber(this, core::mem::transmute_copy(&wstreamnumber)) {
Ok(ok__) => {
ppistream.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetStream<Identity: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pistream: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFProfile_Impl::SetStream(this, core::mem::transmute_copy(&pistream)).into()
}
}
unsafe extern "system" fn RemoveStream<Identity: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, wstreamnumber: u16) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFProfile_Impl::RemoveStream(this, core::mem::transmute_copy(&wstreamnumber)).into()
}
}
unsafe extern "system" fn CreateStream<Identity: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pimediatype: *mut core::ffi::c_void, ppistream: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFProfile_Impl::CreateStream(this, core::mem::transmute_copy(&pimediatype)) {
Ok(ok__) => {
ppistream.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetMutualExclusionCount<Identity: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcmutexs: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFProfile_Impl::GetMutualExclusionCount(this) {
Ok(ok__) => {
pcmutexs.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetMutualExclusion<Identity: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwmutexindex: u32, ppimutex: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFProfile_Impl::GetMutualExclusion(this, core::mem::transmute_copy(&dwmutexindex)) {
Ok(ok__) => {
ppimutex.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn AddMutualExclusion<Identity: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pimutex: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFProfile_Impl::AddMutualExclusion(this, core::mem::transmute_copy(&pimutex)).into()
}
}
unsafe extern "system" fn RemoveMutualExclusion<Identity: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwmutexindex: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFProfile_Impl::RemoveMutualExclusion(this, core::mem::transmute_copy(&dwmutexindex)).into()
}
}
unsafe extern "system" fn CreateMutualExclusion<Identity: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppimutex: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFProfile_Impl::CreateMutualExclusion(this) {
Ok(ok__) => {
ppimutex.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetStreamPrioritization<Identity: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppistreamprioritization: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFProfile_Impl::GetStreamPrioritization(this) {
Ok(ok__) => {
ppistreamprioritization.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn AddStreamPrioritization<Identity: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pistreamprioritization: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFProfile_Impl::AddStreamPrioritization(this, core::mem::transmute_copy(&pistreamprioritization)).into()
}
}
unsafe extern "system" fn RemoveStreamPrioritization<Identity: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFProfile_Impl::RemoveStreamPrioritization(this).into()
}
}
unsafe extern "system" fn CreateStreamPrioritization<Identity: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppistreamprioritization: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFProfile_Impl::CreateStreamPrioritization(this) {
Ok(ok__) => {
ppistreamprioritization.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Clone<Identity: IMFASFProfile_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppiprofile: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFProfile_Impl::Clone(this) {
Ok(ok__) => {
ppiprofile.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, OFFSET>(),
GetStreamCount: GetStreamCount::<Identity, OFFSET>,
GetStream: GetStream::<Identity, OFFSET>,
GetStreamByNumber: GetStreamByNumber::<Identity, OFFSET>,
SetStream: SetStream::<Identity, OFFSET>,
RemoveStream: RemoveStream::<Identity, OFFSET>,
CreateStream: CreateStream::<Identity, OFFSET>,
GetMutualExclusionCount: GetMutualExclusionCount::<Identity, OFFSET>,
GetMutualExclusion: GetMutualExclusion::<Identity, OFFSET>,
AddMutualExclusion: AddMutualExclusion::<Identity, OFFSET>,
RemoveMutualExclusion: RemoveMutualExclusion::<Identity, OFFSET>,
CreateMutualExclusion: CreateMutualExclusion::<Identity, OFFSET>,
GetStreamPrioritization: GetStreamPrioritization::<Identity, OFFSET>,
AddStreamPrioritization: AddStreamPrioritization::<Identity, OFFSET>,
RemoveStreamPrioritization: RemoveStreamPrioritization::<Identity, OFFSET>,
CreateStreamPrioritization: CreateStreamPrioritization::<Identity, OFFSET>,
Clone: Clone::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFASFProfile as windows_core::Interface>::IID || iid == &<IMFAttributes as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFASFProfile {}
windows_core::imp::define_interface!(IMFASFSplitter, IMFASFSplitter_Vtbl, 0x12558295_e399_11d5_bc2a_00b0d0f3f4ab);
windows_core::imp::interface_hierarchy!(IMFASFSplitter, windows_core::IUnknown);
impl IMFASFSplitter {
pub unsafe fn Initialize<P0>(&self, picontentinfo: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFASFContentInfo>,
{
unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), picontentinfo.param().abi()).ok() }
}
pub unsafe fn SetFlags(&self, dwflags: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetFlags)(windows_core::Interface::as_raw(self), dwflags).ok() }
}
pub unsafe fn GetFlags(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetFlags)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SelectStreams(&self, pwstreamnumbers: *const u16, wnumstreams: u16) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SelectStreams)(windows_core::Interface::as_raw(self), pwstreamnumbers, wnumstreams).ok() }
}
pub unsafe fn GetSelectedStreams(&self, pwstreamnumbers: *mut u16, pwnumstreams: *mut u16) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetSelectedStreams)(windows_core::Interface::as_raw(self), pwstreamnumbers as _, pwnumstreams as _).ok() }
}
pub unsafe fn ParseData<P0>(&self, pibuffer: P0, cbbufferoffset: u32, cblength: u32) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaBuffer>,
{
unsafe { (windows_core::Interface::vtable(self).ParseData)(windows_core::Interface::as_raw(self), pibuffer.param().abi(), cbbufferoffset, cblength).ok() }
}
pub unsafe fn GetNextSample(&self, pdwstatusflags: *mut ASF_STATUSFLAGS, pwstreamnumber: *mut u16, ppisample: *mut Option<IMFSample>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetNextSample)(windows_core::Interface::as_raw(self), pdwstatusflags as _, pwstreamnumber as _, core::mem::transmute(ppisample)).ok() }
}
pub unsafe fn Flush(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Flush)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn GetLastSendTime(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetLastSendTime)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFASFSplitter_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub Initialize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetFlags: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub GetFlags: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub SelectStreams: unsafe extern "system" fn(*mut core::ffi::c_void, *const u16, u16) -> windows_core::HRESULT,
pub GetSelectedStreams: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16, *mut u16) -> windows_core::HRESULT,
pub ParseData: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, u32) -> windows_core::HRESULT,
pub GetNextSample: unsafe extern "system" fn(*mut core::ffi::c_void, *mut ASF_STATUSFLAGS, *mut u16, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Flush: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetLastSendTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
}
pub trait IMFASFSplitter_Impl: windows_core::IUnknownImpl {
fn Initialize(&self, picontentinfo: windows_core::Ref<IMFASFContentInfo>) -> windows_core::Result<()>;
fn SetFlags(&self, dwflags: u32) -> windows_core::Result<()>;
fn GetFlags(&self) -> windows_core::Result<u32>;
fn SelectStreams(&self, pwstreamnumbers: *const u16, wnumstreams: u16) -> windows_core::Result<()>;
fn GetSelectedStreams(&self, pwstreamnumbers: *mut u16, pwnumstreams: *mut u16) -> windows_core::Result<()>;
fn ParseData(&self, pibuffer: windows_core::Ref<IMFMediaBuffer>, cbbufferoffset: u32, cblength: u32) -> windows_core::Result<()>;
fn GetNextSample(&self, pdwstatusflags: *mut ASF_STATUSFLAGS, pwstreamnumber: *mut u16, ppisample: windows_core::OutRef<IMFSample>) -> windows_core::Result<()>;
fn Flush(&self) -> windows_core::Result<()>;
fn GetLastSendTime(&self) -> windows_core::Result<u32>;
}
impl IMFASFSplitter_Vtbl {
pub const fn new<Identity: IMFASFSplitter_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Initialize<Identity: IMFASFSplitter_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, picontentinfo: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFSplitter_Impl::Initialize(this, core::mem::transmute_copy(&picontentinfo)).into()
}
}
unsafe extern "system" fn SetFlags<Identity: IMFASFSplitter_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFSplitter_Impl::SetFlags(this, core::mem::transmute_copy(&dwflags)).into()
}
}
unsafe extern "system" fn GetFlags<Identity: IMFASFSplitter_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwflags: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFSplitter_Impl::GetFlags(this) {
Ok(ok__) => {
pdwflags.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SelectStreams<Identity: IMFASFSplitter_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pwstreamnumbers: *const u16, wnumstreams: u16) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFSplitter_Impl::SelectStreams(this, core::mem::transmute_copy(&pwstreamnumbers), core::mem::transmute_copy(&wnumstreams)).into()
}
}
unsafe extern "system" fn GetSelectedStreams<Identity: IMFASFSplitter_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pwstreamnumbers: *mut u16, pwnumstreams: *mut u16) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFSplitter_Impl::GetSelectedStreams(this, core::mem::transmute_copy(&pwstreamnumbers), core::mem::transmute_copy(&pwnumstreams)).into()
}
}
unsafe extern "system" fn ParseData<Identity: IMFASFSplitter_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pibuffer: *mut core::ffi::c_void, cbbufferoffset: u32, cblength: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFSplitter_Impl::ParseData(this, core::mem::transmute_copy(&pibuffer), core::mem::transmute_copy(&cbbufferoffset), core::mem::transmute_copy(&cblength)).into()
}
}
unsafe extern "system" fn GetNextSample<Identity: IMFASFSplitter_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwstatusflags: *mut ASF_STATUSFLAGS, pwstreamnumber: *mut u16, ppisample: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFSplitter_Impl::GetNextSample(this, core::mem::transmute_copy(&pdwstatusflags), core::mem::transmute_copy(&pwstreamnumber), core::mem::transmute_copy(&ppisample)).into()
}
}
unsafe extern "system" fn Flush<Identity: IMFASFSplitter_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFSplitter_Impl::Flush(this).into()
}
}
unsafe extern "system" fn GetLastSendTime<Identity: IMFASFSplitter_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwlastsendtime: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFSplitter_Impl::GetLastSendTime(this) {
Ok(ok__) => {
pdwlastsendtime.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Initialize: Initialize::<Identity, OFFSET>,
SetFlags: SetFlags::<Identity, OFFSET>,
GetFlags: GetFlags::<Identity, OFFSET>,
SelectStreams: SelectStreams::<Identity, OFFSET>,
GetSelectedStreams: GetSelectedStreams::<Identity, OFFSET>,
ParseData: ParseData::<Identity, OFFSET>,
GetNextSample: GetNextSample::<Identity, OFFSET>,
Flush: Flush::<Identity, OFFSET>,
GetLastSendTime: GetLastSendTime::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFASFSplitter as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFASFSplitter {}
windows_core::imp::define_interface!(IMFASFStreamConfig, IMFASFStreamConfig_Vtbl, 0x9e8ae8d2_dbbd_4200_9aca_06e6df484913);
impl core::ops::Deref for IMFASFStreamConfig {
type Target = IMFAttributes;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFASFStreamConfig, windows_core::IUnknown, IMFAttributes);
impl IMFASFStreamConfig {
pub unsafe fn GetStreamType(&self) -> windows_core::Result<windows_core::GUID> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamType)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetStreamNumber(&self) -> u16 {
unsafe { (windows_core::Interface::vtable(self).GetStreamNumber)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn SetStreamNumber(&self, wstreamnum: u16) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetStreamNumber)(windows_core::Interface::as_raw(self), wstreamnum).ok() }
}
pub unsafe fn GetMediaType(&self) -> windows_core::Result<IMFMediaType> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMediaType)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn SetMediaType<P0>(&self, pimediatype: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaType>,
{
unsafe { (windows_core::Interface::vtable(self).SetMediaType)(windows_core::Interface::as_raw(self), pimediatype.param().abi()).ok() }
}
pub unsafe fn GetPayloadExtensionCount(&self) -> windows_core::Result<u16> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetPayloadExtensionCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetPayloadExtension(&self, wpayloadextensionnumber: u16, pguidextensionsystemid: *mut windows_core::GUID, pcbextensiondatasize: *mut u16, pbextensionsysteminfo: *mut u8, pcbextensionsysteminfo: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetPayloadExtension)(windows_core::Interface::as_raw(self), wpayloadextensionnumber, pguidextensionsystemid as _, pcbextensiondatasize as _, pbextensionsysteminfo as _, pcbextensionsysteminfo as _).ok() }
}
pub unsafe fn AddPayloadExtension(&self, guidextensionsystemid: windows_core::GUID, cbextensiondatasize: u16, pbextensionsysteminfo: &[u8]) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).AddPayloadExtension)(windows_core::Interface::as_raw(self), core::mem::transmute(guidextensionsystemid), cbextensiondatasize, core::mem::transmute(pbextensionsysteminfo.as_ptr()), pbextensionsysteminfo.len().try_into().unwrap()).ok() }
}
pub unsafe fn RemoveAllPayloadExtensions(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RemoveAllPayloadExtensions)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn Clone(&self) -> windows_core::Result<IMFASFStreamConfig> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFASFStreamConfig_Vtbl {
pub base__: IMFAttributes_Vtbl,
pub GetStreamType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT,
pub GetStreamNumber: unsafe extern "system" fn(*mut core::ffi::c_void) -> u16,
pub SetStreamNumber: unsafe extern "system" fn(*mut core::ffi::c_void, u16) -> windows_core::HRESULT,
pub GetMediaType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetMediaType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetPayloadExtensionCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16) -> windows_core::HRESULT,
pub GetPayloadExtension: unsafe extern "system" fn(*mut core::ffi::c_void, u16, *mut windows_core::GUID, *mut u16, *mut u8, *mut u32) -> windows_core::HRESULT,
pub AddPayloadExtension: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::GUID, u16, *const u8, u32) -> windows_core::HRESULT,
pub RemoveAllPayloadExtensions: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFASFStreamConfig_Impl: IMFAttributes_Impl {
fn GetStreamType(&self) -> windows_core::Result<windows_core::GUID>;
fn GetStreamNumber(&self) -> u16;
fn SetStreamNumber(&self, wstreamnum: u16) -> windows_core::Result<()>;
fn GetMediaType(&self) -> windows_core::Result<IMFMediaType>;
fn SetMediaType(&self, pimediatype: windows_core::Ref<IMFMediaType>) -> windows_core::Result<()>;
fn GetPayloadExtensionCount(&self) -> windows_core::Result<u16>;
fn GetPayloadExtension(&self, wpayloadextensionnumber: u16, pguidextensionsystemid: *mut windows_core::GUID, pcbextensiondatasize: *mut u16, pbextensionsysteminfo: *mut u8, pcbextensionsysteminfo: *mut u32) -> windows_core::Result<()>;
fn AddPayloadExtension(&self, guidextensionsystemid: &windows_core::GUID, cbextensiondatasize: u16, pbextensionsysteminfo: *const u8, cbextensionsysteminfo: u32) -> windows_core::Result<()>;
fn RemoveAllPayloadExtensions(&self) -> windows_core::Result<()>;
fn Clone(&self) -> windows_core::Result<IMFASFStreamConfig>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFASFStreamConfig_Vtbl {
pub const fn new<Identity: IMFASFStreamConfig_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetStreamType<Identity: IMFASFStreamConfig_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pguidstreamtype: *mut windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFStreamConfig_Impl::GetStreamType(this) {
Ok(ok__) => {
pguidstreamtype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetStreamNumber<Identity: IMFASFStreamConfig_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> u16 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFStreamConfig_Impl::GetStreamNumber(this)
}
}
unsafe extern "system" fn SetStreamNumber<Identity: IMFASFStreamConfig_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, wstreamnum: u16) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFStreamConfig_Impl::SetStreamNumber(this, core::mem::transmute_copy(&wstreamnum)).into()
}
}
unsafe extern "system" fn GetMediaType<Identity: IMFASFStreamConfig_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppimediatype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFStreamConfig_Impl::GetMediaType(this) {
Ok(ok__) => {
ppimediatype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetMediaType<Identity: IMFASFStreamConfig_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pimediatype: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFStreamConfig_Impl::SetMediaType(this, core::mem::transmute_copy(&pimediatype)).into()
}
}
unsafe extern "system" fn GetPayloadExtensionCount<Identity: IMFASFStreamConfig_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcpayloadextensions: *mut u16) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFStreamConfig_Impl::GetPayloadExtensionCount(this) {
Ok(ok__) => {
pcpayloadextensions.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetPayloadExtension<Identity: IMFASFStreamConfig_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, wpayloadextensionnumber: u16, pguidextensionsystemid: *mut windows_core::GUID, pcbextensiondatasize: *mut u16, pbextensionsysteminfo: *mut u8, pcbextensionsysteminfo: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFStreamConfig_Impl::GetPayloadExtension(this, core::mem::transmute_copy(&wpayloadextensionnumber), core::mem::transmute_copy(&pguidextensionsystemid), core::mem::transmute_copy(&pcbextensiondatasize), core::mem::transmute_copy(&pbextensionsysteminfo), core::mem::transmute_copy(&pcbextensionsysteminfo)).into()
}
}
unsafe extern "system" fn AddPayloadExtension<Identity: IMFASFStreamConfig_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidextensionsystemid: windows_core::GUID, cbextensiondatasize: u16, pbextensionsysteminfo: *const u8, cbextensionsysteminfo: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFStreamConfig_Impl::AddPayloadExtension(this, core::mem::transmute(&guidextensionsystemid), core::mem::transmute_copy(&cbextensiondatasize), core::mem::transmute_copy(&pbextensionsysteminfo), core::mem::transmute_copy(&cbextensionsysteminfo)).into()
}
}
unsafe extern "system" fn RemoveAllPayloadExtensions<Identity: IMFASFStreamConfig_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFStreamConfig_Impl::RemoveAllPayloadExtensions(this).into()
}
}
unsafe extern "system" fn Clone<Identity: IMFASFStreamConfig_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppistreamconfig: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFStreamConfig_Impl::Clone(this) {
Ok(ok__) => {
ppistreamconfig.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, OFFSET>(),
GetStreamType: GetStreamType::<Identity, OFFSET>,
GetStreamNumber: GetStreamNumber::<Identity, OFFSET>,
SetStreamNumber: SetStreamNumber::<Identity, OFFSET>,
GetMediaType: GetMediaType::<Identity, OFFSET>,
SetMediaType: SetMediaType::<Identity, OFFSET>,
GetPayloadExtensionCount: GetPayloadExtensionCount::<Identity, OFFSET>,
GetPayloadExtension: GetPayloadExtension::<Identity, OFFSET>,
AddPayloadExtension: AddPayloadExtension::<Identity, OFFSET>,
RemoveAllPayloadExtensions: RemoveAllPayloadExtensions::<Identity, OFFSET>,
Clone: Clone::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFASFStreamConfig as windows_core::Interface>::IID || iid == &<IMFAttributes as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFASFStreamConfig {}
windows_core::imp::define_interface!(IMFASFStreamPrioritization, IMFASFStreamPrioritization_Vtbl, 0x699bdc27_bbaf_49ff_8e38_9c39c9b5e088);
windows_core::imp::interface_hierarchy!(IMFASFStreamPrioritization, windows_core::IUnknown);
impl IMFASFStreamPrioritization {
pub unsafe fn GetStreamCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetStream(&self, dwstreamindex: u32, pwstreamnumber: *mut u16, pwstreamflags: *mut u16) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetStream)(windows_core::Interface::as_raw(self), dwstreamindex, pwstreamnumber as _, pwstreamflags as _).ok() }
}
pub unsafe fn AddStream(&self, wstreamnumber: u16, wstreamflags: u16) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).AddStream)(windows_core::Interface::as_raw(self), wstreamnumber, wstreamflags).ok() }
}
pub unsafe fn RemoveStream(&self, dwstreamindex: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RemoveStream)(windows_core::Interface::as_raw(self), dwstreamindex).ok() }
}
pub unsafe fn Clone(&self) -> windows_core::Result<IMFASFStreamPrioritization> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFASFStreamPrioritization_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetStreamCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetStream: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u16, *mut u16) -> windows_core::HRESULT,
pub AddStream: unsafe extern "system" fn(*mut core::ffi::c_void, u16, u16) -> windows_core::HRESULT,
pub RemoveStream: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFASFStreamPrioritization_Impl: windows_core::IUnknownImpl {
fn GetStreamCount(&self) -> windows_core::Result<u32>;
fn GetStream(&self, dwstreamindex: u32, pwstreamnumber: *mut u16, pwstreamflags: *mut u16) -> windows_core::Result<()>;
fn AddStream(&self, wstreamnumber: u16, wstreamflags: u16) -> windows_core::Result<()>;
fn RemoveStream(&self, dwstreamindex: u32) -> windows_core::Result<()>;
fn Clone(&self) -> windows_core::Result<IMFASFStreamPrioritization>;
}
impl IMFASFStreamPrioritization_Vtbl {
pub const fn new<Identity: IMFASFStreamPrioritization_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetStreamCount<Identity: IMFASFStreamPrioritization_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwstreamcount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFStreamPrioritization_Impl::GetStreamCount(this) {
Ok(ok__) => {
pdwstreamcount.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetStream<Identity: IMFASFStreamPrioritization_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, pwstreamnumber: *mut u16, pwstreamflags: *mut u16) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFStreamPrioritization_Impl::GetStream(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&pwstreamnumber), core::mem::transmute_copy(&pwstreamflags)).into()
}
}
unsafe extern "system" fn AddStream<Identity: IMFASFStreamPrioritization_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, wstreamnumber: u16, wstreamflags: u16) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFStreamPrioritization_Impl::AddStream(this, core::mem::transmute_copy(&wstreamnumber), core::mem::transmute_copy(&wstreamflags)).into()
}
}
unsafe extern "system" fn RemoveStream<Identity: IMFASFStreamPrioritization_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFStreamPrioritization_Impl::RemoveStream(this, core::mem::transmute_copy(&dwstreamindex)).into()
}
}
unsafe extern "system" fn Clone<Identity: IMFASFStreamPrioritization_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppistreamprioritization: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFStreamPrioritization_Impl::Clone(this) {
Ok(ok__) => {
ppistreamprioritization.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetStreamCount: GetStreamCount::<Identity, OFFSET>,
GetStream: GetStream::<Identity, OFFSET>,
AddStream: AddStream::<Identity, OFFSET>,
RemoveStream: RemoveStream::<Identity, OFFSET>,
Clone: Clone::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFASFStreamPrioritization as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFASFStreamPrioritization {}
windows_core::imp::define_interface!(IMFASFStreamSelector, IMFASFStreamSelector_Vtbl, 0xd01bad4a_4fa0_4a60_9349_c27e62da9d41);
windows_core::imp::interface_hierarchy!(IMFASFStreamSelector, windows_core::IUnknown);
impl IMFASFStreamSelector {
pub unsafe fn GetStreamCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetOutputCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOutputCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetOutputStreamCount(&self, dwoutputnum: u32) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOutputStreamCount)(windows_core::Interface::as_raw(self), dwoutputnum, &mut result__).map(|| result__)
}
}
pub unsafe fn GetOutputStreamNumbers(&self, dwoutputnum: u32) -> windows_core::Result<u16> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOutputStreamNumbers)(windows_core::Interface::as_raw(self), dwoutputnum, &mut result__).map(|| result__)
}
}
pub unsafe fn GetOutputFromStream(&self, wstreamnum: u16) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOutputFromStream)(windows_core::Interface::as_raw(self), wstreamnum, &mut result__).map(|| result__)
}
}
pub unsafe fn GetOutputOverride(&self, dwoutputnum: u32) -> windows_core::Result<ASF_SELECTION_STATUS> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOutputOverride)(windows_core::Interface::as_raw(self), dwoutputnum, &mut result__).map(|| result__)
}
}
pub unsafe fn SetOutputOverride(&self, dwoutputnum: u32, selection: ASF_SELECTION_STATUS) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetOutputOverride)(windows_core::Interface::as_raw(self), dwoutputnum, selection).ok() }
}
pub unsafe fn GetOutputMutexCount(&self, dwoutputnum: u32) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOutputMutexCount)(windows_core::Interface::as_raw(self), dwoutputnum, &mut result__).map(|| result__)
}
}
pub unsafe fn GetOutputMutex(&self, dwoutputnum: u32, dwmutexnum: u32) -> windows_core::Result<windows_core::IUnknown> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOutputMutex)(windows_core::Interface::as_raw(self), dwoutputnum, dwmutexnum, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn SetOutputMutexSelection(&self, dwoutputnum: u32, dwmutexnum: u32, wselectedrecord: u16) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetOutputMutexSelection)(windows_core::Interface::as_raw(self), dwoutputnum, dwmutexnum, wselectedrecord).ok() }
}
pub unsafe fn GetBandwidthStepCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetBandwidthStepCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetBandwidthStep(&self, dwstepnum: u32, pdwbitrate: *mut u32, rgwstreamnumbers: *mut u16, rgselections: *mut ASF_SELECTION_STATUS) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetBandwidthStep)(windows_core::Interface::as_raw(self), dwstepnum, pdwbitrate as _, rgwstreamnumbers as _, rgselections as _).ok() }
}
pub unsafe fn BitrateToStepNumber(&self, dwbitrate: u32) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BitrateToStepNumber)(windows_core::Interface::as_raw(self), dwbitrate, &mut result__).map(|| result__)
}
}
pub unsafe fn SetStreamSelectorFlags(&self, dwstreamselectorflags: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetStreamSelectorFlags)(windows_core::Interface::as_raw(self), dwstreamselectorflags).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFASFStreamSelector_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetStreamCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetOutputCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetOutputStreamCount: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u32) -> windows_core::HRESULT,
pub GetOutputStreamNumbers: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u16) -> windows_core::HRESULT,
pub GetOutputFromStream: unsafe extern "system" fn(*mut core::ffi::c_void, u16, *mut u32) -> windows_core::HRESULT,
pub GetOutputOverride: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut ASF_SELECTION_STATUS) -> windows_core::HRESULT,
pub SetOutputOverride: unsafe extern "system" fn(*mut core::ffi::c_void, u32, ASF_SELECTION_STATUS) -> windows_core::HRESULT,
pub GetOutputMutexCount: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u32) -> windows_core::HRESULT,
pub GetOutputMutex: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetOutputMutexSelection: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, u16) -> windows_core::HRESULT,
pub GetBandwidthStepCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetBandwidthStep: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u32, *mut u16, *mut ASF_SELECTION_STATUS) -> windows_core::HRESULT,
pub BitrateToStepNumber: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u32) -> windows_core::HRESULT,
pub SetStreamSelectorFlags: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
}
pub trait IMFASFStreamSelector_Impl: windows_core::IUnknownImpl {
fn GetStreamCount(&self) -> windows_core::Result<u32>;
fn GetOutputCount(&self) -> windows_core::Result<u32>;
fn GetOutputStreamCount(&self, dwoutputnum: u32) -> windows_core::Result<u32>;
fn GetOutputStreamNumbers(&self, dwoutputnum: u32) -> windows_core::Result<u16>;
fn GetOutputFromStream(&self, wstreamnum: u16) -> windows_core::Result<u32>;
fn GetOutputOverride(&self, dwoutputnum: u32) -> windows_core::Result<ASF_SELECTION_STATUS>;
fn SetOutputOverride(&self, dwoutputnum: u32, selection: ASF_SELECTION_STATUS) -> windows_core::Result<()>;
fn GetOutputMutexCount(&self, dwoutputnum: u32) -> windows_core::Result<u32>;
fn GetOutputMutex(&self, dwoutputnum: u32, dwmutexnum: u32) -> windows_core::Result<windows_core::IUnknown>;
fn SetOutputMutexSelection(&self, dwoutputnum: u32, dwmutexnum: u32, wselectedrecord: u16) -> windows_core::Result<()>;
fn GetBandwidthStepCount(&self) -> windows_core::Result<u32>;
fn GetBandwidthStep(&self, dwstepnum: u32, pdwbitrate: *mut u32, rgwstreamnumbers: *mut u16, rgselections: *mut ASF_SELECTION_STATUS) -> windows_core::Result<()>;
fn BitrateToStepNumber(&self, dwbitrate: u32) -> windows_core::Result<u32>;
fn SetStreamSelectorFlags(&self, dwstreamselectorflags: u32) -> windows_core::Result<()>;
}
impl IMFASFStreamSelector_Vtbl {
pub const fn new<Identity: IMFASFStreamSelector_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetStreamCount<Identity: IMFASFStreamSelector_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcstreams: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFStreamSelector_Impl::GetStreamCount(this) {
Ok(ok__) => {
pcstreams.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetOutputCount<Identity: IMFASFStreamSelector_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcoutputs: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFStreamSelector_Impl::GetOutputCount(this) {
Ok(ok__) => {
pcoutputs.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetOutputStreamCount<Identity: IMFASFStreamSelector_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwoutputnum: u32, pcstreams: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFStreamSelector_Impl::GetOutputStreamCount(this, core::mem::transmute_copy(&dwoutputnum)) {
Ok(ok__) => {
pcstreams.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetOutputStreamNumbers<Identity: IMFASFStreamSelector_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwoutputnum: u32, rgwstreamnumbers: *mut u16) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFStreamSelector_Impl::GetOutputStreamNumbers(this, core::mem::transmute_copy(&dwoutputnum)) {
Ok(ok__) => {
rgwstreamnumbers.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetOutputFromStream<Identity: IMFASFStreamSelector_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, wstreamnum: u16, pdwoutput: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFStreamSelector_Impl::GetOutputFromStream(this, core::mem::transmute_copy(&wstreamnum)) {
Ok(ok__) => {
pdwoutput.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetOutputOverride<Identity: IMFASFStreamSelector_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwoutputnum: u32, pselection: *mut ASF_SELECTION_STATUS) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFStreamSelector_Impl::GetOutputOverride(this, core::mem::transmute_copy(&dwoutputnum)) {
Ok(ok__) => {
pselection.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetOutputOverride<Identity: IMFASFStreamSelector_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwoutputnum: u32, selection: ASF_SELECTION_STATUS) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFStreamSelector_Impl::SetOutputOverride(this, core::mem::transmute_copy(&dwoutputnum), core::mem::transmute_copy(&selection)).into()
}
}
unsafe extern "system" fn GetOutputMutexCount<Identity: IMFASFStreamSelector_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwoutputnum: u32, pcmutexes: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFStreamSelector_Impl::GetOutputMutexCount(this, core::mem::transmute_copy(&dwoutputnum)) {
Ok(ok__) => {
pcmutexes.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetOutputMutex<Identity: IMFASFStreamSelector_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwoutputnum: u32, dwmutexnum: u32, ppmutex: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFStreamSelector_Impl::GetOutputMutex(this, core::mem::transmute_copy(&dwoutputnum), core::mem::transmute_copy(&dwmutexnum)) {
Ok(ok__) => {
ppmutex.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetOutputMutexSelection<Identity: IMFASFStreamSelector_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwoutputnum: u32, dwmutexnum: u32, wselectedrecord: u16) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFStreamSelector_Impl::SetOutputMutexSelection(this, core::mem::transmute_copy(&dwoutputnum), core::mem::transmute_copy(&dwmutexnum), core::mem::transmute_copy(&wselectedrecord)).into()
}
}
unsafe extern "system" fn GetBandwidthStepCount<Identity: IMFASFStreamSelector_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcstepcount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFStreamSelector_Impl::GetBandwidthStepCount(this) {
Ok(ok__) => {
pcstepcount.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetBandwidthStep<Identity: IMFASFStreamSelector_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstepnum: u32, pdwbitrate: *mut u32, rgwstreamnumbers: *mut u16, rgselections: *mut ASF_SELECTION_STATUS) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFStreamSelector_Impl::GetBandwidthStep(this, core::mem::transmute_copy(&dwstepnum), core::mem::transmute_copy(&pdwbitrate), core::mem::transmute_copy(&rgwstreamnumbers), core::mem::transmute_copy(&rgselections)).into()
}
}
unsafe extern "system" fn BitrateToStepNumber<Identity: IMFASFStreamSelector_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwbitrate: u32, pdwstepnum: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFASFStreamSelector_Impl::BitrateToStepNumber(this, core::mem::transmute_copy(&dwbitrate)) {
Ok(ok__) => {
pdwstepnum.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetStreamSelectorFlags<Identity: IMFASFStreamSelector_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamselectorflags: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFASFStreamSelector_Impl::SetStreamSelectorFlags(this, core::mem::transmute_copy(&dwstreamselectorflags)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetStreamCount: GetStreamCount::<Identity, OFFSET>,
GetOutputCount: GetOutputCount::<Identity, OFFSET>,
GetOutputStreamCount: GetOutputStreamCount::<Identity, OFFSET>,
GetOutputStreamNumbers: GetOutputStreamNumbers::<Identity, OFFSET>,
GetOutputFromStream: GetOutputFromStream::<Identity, OFFSET>,
GetOutputOverride: GetOutputOverride::<Identity, OFFSET>,
SetOutputOverride: SetOutputOverride::<Identity, OFFSET>,
GetOutputMutexCount: GetOutputMutexCount::<Identity, OFFSET>,
GetOutputMutex: GetOutputMutex::<Identity, OFFSET>,
SetOutputMutexSelection: SetOutputMutexSelection::<Identity, OFFSET>,
GetBandwidthStepCount: GetBandwidthStepCount::<Identity, OFFSET>,
GetBandwidthStep: GetBandwidthStep::<Identity, OFFSET>,
BitrateToStepNumber: BitrateToStepNumber::<Identity, OFFSET>,
SetStreamSelectorFlags: SetStreamSelectorFlags::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFASFStreamSelector as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFASFStreamSelector {}
windows_core::imp::define_interface!(IMFActivate, IMFActivate_Vtbl, 0x7fee9e9a_4a89_47a6_899c_b6a53a70fb67);
impl core::ops::Deref for IMFActivate {
type Target = IMFAttributes;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFActivate, windows_core::IUnknown, IMFAttributes);
impl IMFActivate {
pub unsafe fn ActivateObject<T>(&self) -> windows_core::Result<T>
where
T: windows_core::Interface,
{
let mut result__ = core::ptr::null_mut();
unsafe { (windows_core::Interface::vtable(self).ActivateObject)(windows_core::Interface::as_raw(self), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) }
}
pub unsafe fn ShutdownObject(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).ShutdownObject)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn DetachObject(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).DetachObject)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFActivate_Vtbl {
pub base__: IMFAttributes_Vtbl,
pub ActivateObject: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ShutdownObject: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub DetachObject: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFActivate_Impl: IMFAttributes_Impl {
fn ActivateObject(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
fn ShutdownObject(&self) -> windows_core::Result<()>;
fn DetachObject(&self) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFActivate_Vtbl {
pub const fn new<Identity: IMFActivate_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn ActivateObject<Identity: IMFActivate_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFActivate_Impl::ActivateObject(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into()
}
}
unsafe extern "system" fn ShutdownObject<Identity: IMFActivate_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFActivate_Impl::ShutdownObject(this).into()
}
}
unsafe extern "system" fn DetachObject<Identity: IMFActivate_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFActivate_Impl::DetachObject(this).into()
}
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, OFFSET>(),
ActivateObject: ActivateObject::<Identity, OFFSET>,
ShutdownObject: ShutdownObject::<Identity, OFFSET>,
DetachObject: DetachObject::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFActivate as windows_core::Interface>::IID || iid == &<IMFAttributes as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFActivate {}
windows_core::imp::define_interface!(IMFAsyncCallback, IMFAsyncCallback_Vtbl, 0xa27003cf_2354_4f2a_8d6a_ab7cff15437e);
windows_core::imp::interface_hierarchy!(IMFAsyncCallback, windows_core::IUnknown);
impl IMFAsyncCallback {
pub unsafe fn GetParameters(&self, pdwflags: *mut u32, pdwqueue: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetParameters)(windows_core::Interface::as_raw(self), pdwflags as _, pdwqueue as _).ok() }
}
pub unsafe fn Invoke<P0>(&self, pasyncresult: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncResult>,
{
unsafe { (windows_core::Interface::vtable(self).Invoke)(windows_core::Interface::as_raw(self), pasyncresult.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFAsyncCallback_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetParameters: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut u32) -> windows_core::HRESULT,
pub Invoke: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFAsyncCallback_Impl: windows_core::IUnknownImpl {
fn GetParameters(&self, pdwflags: *mut u32, pdwqueue: *mut u32) -> windows_core::Result<()>;
fn Invoke(&self, pasyncresult: windows_core::Ref<IMFAsyncResult>) -> windows_core::Result<()>;
}
impl IMFAsyncCallback_Vtbl {
pub const fn new<Identity: IMFAsyncCallback_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetParameters<Identity: IMFAsyncCallback_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwflags: *mut u32, pdwqueue: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAsyncCallback_Impl::GetParameters(this, core::mem::transmute_copy(&pdwflags), core::mem::transmute_copy(&pdwqueue)).into()
}
}
unsafe extern "system" fn Invoke<Identity: IMFAsyncCallback_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pasyncresult: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAsyncCallback_Impl::Invoke(this, core::mem::transmute_copy(&pasyncresult)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetParameters: GetParameters::<Identity, OFFSET>,
Invoke: Invoke::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFAsyncCallback as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFAsyncCallback {}
windows_core::imp::define_interface!(IMFAsyncCallbackLogging, IMFAsyncCallbackLogging_Vtbl, 0xc7a4dca1_f5f0_47b6_b92b_bf0106d25791);
impl core::ops::Deref for IMFAsyncCallbackLogging {
type Target = IMFAsyncCallback;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFAsyncCallbackLogging, windows_core::IUnknown, IMFAsyncCallback);
impl IMFAsyncCallbackLogging {
pub unsafe fn GetObjectPointer(&self) -> *mut core::ffi::c_void {
unsafe { (windows_core::Interface::vtable(self).GetObjectPointer)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetObjectTag(&self) -> u32 {
unsafe { (windows_core::Interface::vtable(self).GetObjectTag)(windows_core::Interface::as_raw(self)) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFAsyncCallbackLogging_Vtbl {
pub base__: IMFAsyncCallback_Vtbl,
pub GetObjectPointer: unsafe extern "system" fn(*mut core::ffi::c_void) -> *mut core::ffi::c_void,
pub GetObjectTag: unsafe extern "system" fn(*mut core::ffi::c_void) -> u32,
}
pub trait IMFAsyncCallbackLogging_Impl: IMFAsyncCallback_Impl {
fn GetObjectPointer(&self) -> *mut core::ffi::c_void;
fn GetObjectTag(&self) -> u32;
}
impl IMFAsyncCallbackLogging_Vtbl {
pub const fn new<Identity: IMFAsyncCallbackLogging_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetObjectPointer<Identity: IMFAsyncCallbackLogging_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> *mut core::ffi::c_void {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAsyncCallbackLogging_Impl::GetObjectPointer(this)
}
}
unsafe extern "system" fn GetObjectTag<Identity: IMFAsyncCallbackLogging_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> u32 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAsyncCallbackLogging_Impl::GetObjectTag(this)
}
}
Self {
base__: IMFAsyncCallback_Vtbl::new::<Identity, OFFSET>(),
GetObjectPointer: GetObjectPointer::<Identity, OFFSET>,
GetObjectTag: GetObjectTag::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFAsyncCallbackLogging as windows_core::Interface>::IID || iid == &<IMFAsyncCallback as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFAsyncCallbackLogging {}
windows_core::imp::define_interface!(IMFAsyncResult, IMFAsyncResult_Vtbl, 0xac6b7889_0740_4d51_8619_905994a55cc6);
windows_core::imp::interface_hierarchy!(IMFAsyncResult, windows_core::IUnknown);
impl IMFAsyncResult {
pub unsafe fn GetState(&self) -> windows_core::Result<windows_core::IUnknown> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetState)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetStatus(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn SetStatus(&self, hrstatus: windows_core::HRESULT) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetStatus)(windows_core::Interface::as_raw(self), hrstatus).ok() }
}
pub unsafe fn GetObject(&self) -> windows_core::Result<windows_core::IUnknown> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetObject)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetStateNoAddRef(&self) -> Option<windows_core::IUnknown> {
unsafe { (windows_core::Interface::vtable(self).GetStateNoAddRef)(windows_core::Interface::as_raw(self)) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFAsyncResult_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetState: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetStatus: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetStatus: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::HRESULT) -> windows_core::HRESULT,
pub GetObject: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetStateNoAddRef: unsafe extern "system" fn(*mut core::ffi::c_void) -> Option<windows_core::IUnknown>,
}
pub trait IMFAsyncResult_Impl: windows_core::IUnknownImpl {
fn GetState(&self) -> windows_core::Result<windows_core::IUnknown>;
fn GetStatus(&self) -> windows_core::Result<()>;
fn SetStatus(&self, hrstatus: windows_core::HRESULT) -> windows_core::Result<()>;
fn GetObject(&self) -> windows_core::Result<windows_core::IUnknown>;
fn GetStateNoAddRef(&self) -> Option<windows_core::IUnknown>;
}
impl IMFAsyncResult_Vtbl {
pub const fn new<Identity: IMFAsyncResult_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetState<Identity: IMFAsyncResult_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppunkstate: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFAsyncResult_Impl::GetState(this) {
Ok(ok__) => {
ppunkstate.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetStatus<Identity: IMFAsyncResult_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAsyncResult_Impl::GetStatus(this).into()
}
}
unsafe extern "system" fn SetStatus<Identity: IMFAsyncResult_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hrstatus: windows_core::HRESULT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAsyncResult_Impl::SetStatus(this, core::mem::transmute_copy(&hrstatus)).into()
}
}
unsafe extern "system" fn GetObject<Identity: IMFAsyncResult_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFAsyncResult_Impl::GetObject(this) {
Ok(ok__) => {
ppobject.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetStateNoAddRef<Identity: IMFAsyncResult_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> Option<windows_core::IUnknown> {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAsyncResult_Impl::GetStateNoAddRef(this)
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetState: GetState::<Identity, OFFSET>,
GetStatus: GetStatus::<Identity, OFFSET>,
SetStatus: SetStatus::<Identity, OFFSET>,
GetObject: GetObject::<Identity, OFFSET>,
GetStateNoAddRef: GetStateNoAddRef::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFAsyncResult as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFAsyncResult {}
windows_core::imp::define_interface!(IMFAttributes, IMFAttributes_Vtbl, 0x2cd2d921_c447_44a7_a13c_4adabfc247e3);
windows_core::imp::interface_hierarchy!(IMFAttributes, windows_core::IUnknown);
impl IMFAttributes {
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn GetItem(&self, guidkey: *const windows_core::GUID, pvalue: Option<*mut super::super::System::Com::StructuredStorage::PROPVARIANT>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetItem)(windows_core::Interface::as_raw(self), guidkey, pvalue.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn GetItemType(&self, guidkey: *const windows_core::GUID) -> windows_core::Result<MF_ATTRIBUTE_TYPE> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetItemType)(windows_core::Interface::as_raw(self), guidkey, &mut result__).map(|| result__)
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn CompareItem(&self, guidkey: *const windows_core::GUID, value: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CompareItem)(windows_core::Interface::as_raw(self), guidkey, core::mem::transmute(value), &mut result__).map(|| result__)
}
}
pub unsafe fn Compare<P0>(&self, ptheirs: P0, matchtype: MF_ATTRIBUTES_MATCH_TYPE) -> windows_core::Result<windows_core::BOOL>
where
P0: windows_core::Param<IMFAttributes>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).Compare)(windows_core::Interface::as_raw(self), ptheirs.param().abi(), matchtype, &mut result__).map(|| result__)
}
}
pub unsafe fn GetUINT32(&self, guidkey: *const windows_core::GUID) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetUINT32)(windows_core::Interface::as_raw(self), guidkey, &mut result__).map(|| result__)
}
}
pub unsafe fn GetUINT64(&self, guidkey: *const windows_core::GUID) -> windows_core::Result<u64> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetUINT64)(windows_core::Interface::as_raw(self), guidkey, &mut result__).map(|| result__)
}
}
pub unsafe fn GetDouble(&self, guidkey: *const windows_core::GUID) -> windows_core::Result<f64> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDouble)(windows_core::Interface::as_raw(self), guidkey, &mut result__).map(|| result__)
}
}
pub unsafe fn GetGUID(&self, guidkey: *const windows_core::GUID) -> windows_core::Result<windows_core::GUID> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetGUID)(windows_core::Interface::as_raw(self), guidkey, &mut result__).map(|| result__)
}
}
pub unsafe fn GetStringLength(&self, guidkey: *const windows_core::GUID) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStringLength)(windows_core::Interface::as_raw(self), guidkey, &mut result__).map(|| result__)
}
}
pub unsafe fn GetString(&self, guidkey: *const windows_core::GUID, pwszvalue: &mut [u16], pcchlength: Option<*mut u32>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetString)(windows_core::Interface::as_raw(self), guidkey, core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len().try_into().unwrap(), pcchlength.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn GetAllocatedString(&self, guidkey: *const windows_core::GUID, ppwszvalue: *mut windows_core::PWSTR, pcchlength: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetAllocatedString)(windows_core::Interface::as_raw(self), guidkey, ppwszvalue as _, pcchlength as _).ok() }
}
pub unsafe fn GetBlobSize(&self, guidkey: *const windows_core::GUID) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetBlobSize)(windows_core::Interface::as_raw(self), guidkey, &mut result__).map(|| result__)
}
}
pub unsafe fn GetBlob(&self, guidkey: *const windows_core::GUID, pbuf: &mut [u8], pcbblobsize: Option<*mut u32>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetBlob)(windows_core::Interface::as_raw(self), guidkey, core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap(), pcbblobsize.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn GetAllocatedBlob(&self, guidkey: *const windows_core::GUID, ppbuf: *mut *mut u8, pcbsize: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetAllocatedBlob)(windows_core::Interface::as_raw(self), guidkey, ppbuf as _, pcbsize as _).ok() }
}
pub unsafe fn GetUnknown<T>(&self, guidkey: *const windows_core::GUID) -> windows_core::Result<T>
where
T: windows_core::Interface,
{
let mut result__ = core::ptr::null_mut();
unsafe { (windows_core::Interface::vtable(self).GetUnknown)(windows_core::Interface::as_raw(self), guidkey, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) }
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn SetItem(&self, guidkey: *const windows_core::GUID, value: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetItem)(windows_core::Interface::as_raw(self), guidkey, core::mem::transmute(value)).ok() }
}
pub unsafe fn DeleteItem(&self, guidkey: *const windows_core::GUID) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).DeleteItem)(windows_core::Interface::as_raw(self), guidkey).ok() }
}
pub unsafe fn DeleteAllItems(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).DeleteAllItems)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn SetUINT32(&self, guidkey: *const windows_core::GUID, unvalue: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetUINT32)(windows_core::Interface::as_raw(self), guidkey, unvalue).ok() }
}
pub unsafe fn SetUINT64(&self, guidkey: *const windows_core::GUID, unvalue: u64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetUINT64)(windows_core::Interface::as_raw(self), guidkey, unvalue).ok() }
}
pub unsafe fn SetDouble(&self, guidkey: *const windows_core::GUID, fvalue: f64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetDouble)(windows_core::Interface::as_raw(self), guidkey, fvalue).ok() }
}
pub unsafe fn SetGUID(&self, guidkey: *const windows_core::GUID, guidvalue: *const windows_core::GUID) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetGUID)(windows_core::Interface::as_raw(self), guidkey, guidvalue).ok() }
}
pub unsafe fn SetString<P1>(&self, guidkey: *const windows_core::GUID, wszvalue: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).SetString)(windows_core::Interface::as_raw(self), guidkey, wszvalue.param().abi()).ok() }
}
pub unsafe fn SetBlob(&self, guidkey: *const windows_core::GUID, pbuf: &[u8]) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetBlob)(windows_core::Interface::as_raw(self), guidkey, core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap()).ok() }
}
pub unsafe fn SetUnknown<P1>(&self, guidkey: *const windows_core::GUID, punknown: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).SetUnknown)(windows_core::Interface::as_raw(self), guidkey, punknown.param().abi()).ok() }
}
pub unsafe fn LockStore(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).LockStore)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn UnlockStore(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).UnlockStore)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn GetCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn GetItemByIndex(&self, unindex: u32, pguidkey: *mut windows_core::GUID, pvalue: Option<*mut super::super::System::Com::StructuredStorage::PROPVARIANT>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetItemByIndex)(windows_core::Interface::as_raw(self), unindex, pguidkey as _, pvalue.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn CopyAllItems<P0>(&self, pdest: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAttributes>,
{
unsafe { (windows_core::Interface::vtable(self).CopyAllItems)(windows_core::Interface::as_raw(self), pdest.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFAttributes_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub GetItem: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
GetItem: usize,
pub GetItemType: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut MF_ATTRIBUTE_TYPE) -> windows_core::HRESULT,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub CompareItem: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const super::super::System::Com::StructuredStorage::PROPVARIANT, *mut windows_core::BOOL) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
CompareItem: usize,
pub Compare: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, MF_ATTRIBUTES_MATCH_TYPE, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub GetUINT32: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut u32) -> windows_core::HRESULT,
pub GetUINT64: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut u64) -> windows_core::HRESULT,
pub GetDouble: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut f64) -> windows_core::HRESULT,
pub GetGUID: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut windows_core::GUID) -> windows_core::HRESULT,
pub GetStringLength: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut u32) -> windows_core::HRESULT,
pub GetString: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, windows_core::PWSTR, u32, *mut u32) -> windows_core::HRESULT,
pub GetAllocatedString: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut windows_core::PWSTR, *mut u32) -> windows_core::HRESULT,
pub GetBlobSize: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut u32) -> windows_core::HRESULT,
pub GetBlob: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut u8, u32, *mut u32) -> windows_core::HRESULT,
pub GetAllocatedBlob: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut *mut u8, *mut u32) -> windows_core::HRESULT,
pub GetUnknown: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub SetItem: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
SetItem: usize,
pub DeleteItem: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID) -> windows_core::HRESULT,
pub DeleteAllItems: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetUINT32: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, u32) -> windows_core::HRESULT,
pub SetUINT64: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, u64) -> windows_core::HRESULT,
pub SetDouble: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, f64) -> windows_core::HRESULT,
pub SetGUID: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const windows_core::GUID) -> windows_core::HRESULT,
pub SetString: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, windows_core::PCWSTR) -> windows_core::HRESULT,
pub SetBlob: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const u8, u32) -> windows_core::HRESULT,
pub SetUnknown: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub LockStore: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub UnlockStore: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub GetItemByIndex: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut windows_core::GUID, *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
GetItemByIndex: usize,
pub CopyAllItems: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFAttributes_Impl: windows_core::IUnknownImpl {
fn GetItem(&self, guidkey: *const windows_core::GUID, pvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>;
fn GetItemType(&self, guidkey: *const windows_core::GUID) -> windows_core::Result<MF_ATTRIBUTE_TYPE>;
fn CompareItem(&self, guidkey: *const windows_core::GUID, value: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<windows_core::BOOL>;
fn Compare(&self, ptheirs: windows_core::Ref<IMFAttributes>, matchtype: MF_ATTRIBUTES_MATCH_TYPE) -> windows_core::Result<windows_core::BOOL>;
fn GetUINT32(&self, guidkey: *const windows_core::GUID) -> windows_core::Result<u32>;
fn GetUINT64(&self, guidkey: *const windows_core::GUID) -> windows_core::Result<u64>;
fn GetDouble(&self, guidkey: *const windows_core::GUID) -> windows_core::Result<f64>;
fn GetGUID(&self, guidkey: *const windows_core::GUID) -> windows_core::Result<windows_core::GUID>;
fn GetStringLength(&self, guidkey: *const windows_core::GUID) -> windows_core::Result<u32>;
fn GetString(&self, guidkey: *const windows_core::GUID, pwszvalue: windows_core::PWSTR, cchbufsize: u32, pcchlength: *mut u32) -> windows_core::Result<()>;
fn GetAllocatedString(&self, guidkey: *const windows_core::GUID, ppwszvalue: *mut windows_core::PWSTR, pcchlength: *mut u32) -> windows_core::Result<()>;
fn GetBlobSize(&self, guidkey: *const windows_core::GUID) -> windows_core::Result<u32>;
fn GetBlob(&self, guidkey: *const windows_core::GUID, pbuf: *mut u8, cbbufsize: u32, pcbblobsize: *mut u32) -> windows_core::Result<()>;
fn GetAllocatedBlob(&self, guidkey: *const windows_core::GUID, ppbuf: *mut *mut u8, pcbsize: *mut u32) -> windows_core::Result<()>;
fn GetUnknown(&self, guidkey: *const windows_core::GUID, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
fn SetItem(&self, guidkey: *const windows_core::GUID, value: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>;
fn DeleteItem(&self, guidkey: *const windows_core::GUID) -> windows_core::Result<()>;
fn DeleteAllItems(&self) -> windows_core::Result<()>;
fn SetUINT32(&self, guidkey: *const windows_core::GUID, unvalue: u32) -> windows_core::Result<()>;
fn SetUINT64(&self, guidkey: *const windows_core::GUID, unvalue: u64) -> windows_core::Result<()>;
fn SetDouble(&self, guidkey: *const windows_core::GUID, fvalue: f64) -> windows_core::Result<()>;
fn SetGUID(&self, guidkey: *const windows_core::GUID, guidvalue: *const windows_core::GUID) -> windows_core::Result<()>;
fn SetString(&self, guidkey: *const windows_core::GUID, wszvalue: &windows_core::PCWSTR) -> windows_core::Result<()>;
fn SetBlob(&self, guidkey: *const windows_core::GUID, pbuf: *const u8, cbbufsize: u32) -> windows_core::Result<()>;
fn SetUnknown(&self, guidkey: *const windows_core::GUID, punknown: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn LockStore(&self) -> windows_core::Result<()>;
fn UnlockStore(&self) -> windows_core::Result<()>;
fn GetCount(&self) -> windows_core::Result<u32>;
fn GetItemByIndex(&self, unindex: u32, pguidkey: *mut windows_core::GUID, pvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>;
fn CopyAllItems(&self, pdest: windows_core::Ref<IMFAttributes>) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFAttributes_Vtbl {
pub const fn new<Identity: IMFAttributes_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetItem<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidkey: *const windows_core::GUID, pvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAttributes_Impl::GetItem(this, core::mem::transmute_copy(&guidkey), core::mem::transmute_copy(&pvalue)).into()
}
}
unsafe extern "system" fn GetItemType<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidkey: *const windows_core::GUID, ptype: *mut MF_ATTRIBUTE_TYPE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFAttributes_Impl::GetItemType(this, core::mem::transmute_copy(&guidkey)) {
Ok(ok__) => {
ptype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn CompareItem<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidkey: *const windows_core::GUID, value: *const super::super::System::Com::StructuredStorage::PROPVARIANT, pbresult: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFAttributes_Impl::CompareItem(this, core::mem::transmute_copy(&guidkey), core::mem::transmute_copy(&value)) {
Ok(ok__) => {
pbresult.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Compare<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ptheirs: *mut core::ffi::c_void, matchtype: MF_ATTRIBUTES_MATCH_TYPE, pbresult: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFAttributes_Impl::Compare(this, core::mem::transmute_copy(&ptheirs), core::mem::transmute_copy(&matchtype)) {
Ok(ok__) => {
pbresult.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetUINT32<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidkey: *const windows_core::GUID, punvalue: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFAttributes_Impl::GetUINT32(this, core::mem::transmute_copy(&guidkey)) {
Ok(ok__) => {
punvalue.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetUINT64<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidkey: *const windows_core::GUID, punvalue: *mut u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFAttributes_Impl::GetUINT64(this, core::mem::transmute_copy(&guidkey)) {
Ok(ok__) => {
punvalue.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetDouble<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidkey: *const windows_core::GUID, pfvalue: *mut f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFAttributes_Impl::GetDouble(this, core::mem::transmute_copy(&guidkey)) {
Ok(ok__) => {
pfvalue.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetGUID<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidkey: *const windows_core::GUID, pguidvalue: *mut windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFAttributes_Impl::GetGUID(this, core::mem::transmute_copy(&guidkey)) {
Ok(ok__) => {
pguidvalue.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetStringLength<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidkey: *const windows_core::GUID, pcchlength: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFAttributes_Impl::GetStringLength(this, core::mem::transmute_copy(&guidkey)) {
Ok(ok__) => {
pcchlength.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetString<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidkey: *const windows_core::GUID, pwszvalue: windows_core::PWSTR, cchbufsize: u32, pcchlength: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAttributes_Impl::GetString(this, core::mem::transmute_copy(&guidkey), core::mem::transmute_copy(&pwszvalue), core::mem::transmute_copy(&cchbufsize), core::mem::transmute_copy(&pcchlength)).into()
}
}
unsafe extern "system" fn GetAllocatedString<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidkey: *const windows_core::GUID, ppwszvalue: *mut windows_core::PWSTR, pcchlength: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAttributes_Impl::GetAllocatedString(this, core::mem::transmute_copy(&guidkey), core::mem::transmute_copy(&ppwszvalue), core::mem::transmute_copy(&pcchlength)).into()
}
}
unsafe extern "system" fn GetBlobSize<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidkey: *const windows_core::GUID, pcbblobsize: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFAttributes_Impl::GetBlobSize(this, core::mem::transmute_copy(&guidkey)) {
Ok(ok__) => {
pcbblobsize.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetBlob<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidkey: *const windows_core::GUID, pbuf: *mut u8, cbbufsize: u32, pcbblobsize: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAttributes_Impl::GetBlob(this, core::mem::transmute_copy(&guidkey), core::mem::transmute_copy(&pbuf), core::mem::transmute_copy(&cbbufsize), core::mem::transmute_copy(&pcbblobsize)).into()
}
}
unsafe extern "system" fn GetAllocatedBlob<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidkey: *const windows_core::GUID, ppbuf: *mut *mut u8, pcbsize: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAttributes_Impl::GetAllocatedBlob(this, core::mem::transmute_copy(&guidkey), core::mem::transmute_copy(&ppbuf), core::mem::transmute_copy(&pcbsize)).into()
}
}
unsafe extern "system" fn GetUnknown<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidkey: *const windows_core::GUID, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAttributes_Impl::GetUnknown(this, core::mem::transmute_copy(&guidkey), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into()
}
}
unsafe extern "system" fn SetItem<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidkey: *const windows_core::GUID, value: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAttributes_Impl::SetItem(this, core::mem::transmute_copy(&guidkey), core::mem::transmute_copy(&value)).into()
}
}
unsafe extern "system" fn DeleteItem<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidkey: *const windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAttributes_Impl::DeleteItem(this, core::mem::transmute_copy(&guidkey)).into()
}
}
unsafe extern "system" fn DeleteAllItems<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAttributes_Impl::DeleteAllItems(this).into()
}
}
unsafe extern "system" fn SetUINT32<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidkey: *const windows_core::GUID, unvalue: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAttributes_Impl::SetUINT32(this, core::mem::transmute_copy(&guidkey), core::mem::transmute_copy(&unvalue)).into()
}
}
unsafe extern "system" fn SetUINT64<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidkey: *const windows_core::GUID, unvalue: u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAttributes_Impl::SetUINT64(this, core::mem::transmute_copy(&guidkey), core::mem::transmute_copy(&unvalue)).into()
}
}
unsafe extern "system" fn SetDouble<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidkey: *const windows_core::GUID, fvalue: f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAttributes_Impl::SetDouble(this, core::mem::transmute_copy(&guidkey), core::mem::transmute_copy(&fvalue)).into()
}
}
unsafe extern "system" fn SetGUID<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidkey: *const windows_core::GUID, guidvalue: *const windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAttributes_Impl::SetGUID(this, core::mem::transmute_copy(&guidkey), core::mem::transmute_copy(&guidvalue)).into()
}
}
unsafe extern "system" fn SetString<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidkey: *const windows_core::GUID, wszvalue: windows_core::PCWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAttributes_Impl::SetString(this, core::mem::transmute_copy(&guidkey), core::mem::transmute(&wszvalue)).into()
}
}
unsafe extern "system" fn SetBlob<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidkey: *const windows_core::GUID, pbuf: *const u8, cbbufsize: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAttributes_Impl::SetBlob(this, core::mem::transmute_copy(&guidkey), core::mem::transmute_copy(&pbuf), core::mem::transmute_copy(&cbbufsize)).into()
}
}
unsafe extern "system" fn SetUnknown<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidkey: *const windows_core::GUID, punknown: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAttributes_Impl::SetUnknown(this, core::mem::transmute_copy(&guidkey), core::mem::transmute_copy(&punknown)).into()
}
}
unsafe extern "system" fn LockStore<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAttributes_Impl::LockStore(this).into()
}
}
unsafe extern "system" fn UnlockStore<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAttributes_Impl::UnlockStore(this).into()
}
}
unsafe extern "system" fn GetCount<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcitems: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFAttributes_Impl::GetCount(this) {
Ok(ok__) => {
pcitems.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetItemByIndex<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, unindex: u32, pguidkey: *mut windows_core::GUID, pvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAttributes_Impl::GetItemByIndex(this, core::mem::transmute_copy(&unindex), core::mem::transmute_copy(&pguidkey), core::mem::transmute_copy(&pvalue)).into()
}
}
unsafe extern "system" fn CopyAllItems<Identity: IMFAttributes_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdest: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAttributes_Impl::CopyAllItems(this, core::mem::transmute_copy(&pdest)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetItem: GetItem::<Identity, OFFSET>,
GetItemType: GetItemType::<Identity, OFFSET>,
CompareItem: CompareItem::<Identity, OFFSET>,
Compare: Compare::<Identity, OFFSET>,
GetUINT32: GetUINT32::<Identity, OFFSET>,
GetUINT64: GetUINT64::<Identity, OFFSET>,
GetDouble: GetDouble::<Identity, OFFSET>,
GetGUID: GetGUID::<Identity, OFFSET>,
GetStringLength: GetStringLength::<Identity, OFFSET>,
GetString: GetString::<Identity, OFFSET>,
GetAllocatedString: GetAllocatedString::<Identity, OFFSET>,
GetBlobSize: GetBlobSize::<Identity, OFFSET>,
GetBlob: GetBlob::<Identity, OFFSET>,
GetAllocatedBlob: GetAllocatedBlob::<Identity, OFFSET>,
GetUnknown: GetUnknown::<Identity, OFFSET>,
SetItem: SetItem::<Identity, OFFSET>,
DeleteItem: DeleteItem::<Identity, OFFSET>,
DeleteAllItems: DeleteAllItems::<Identity, OFFSET>,
SetUINT32: SetUINT32::<Identity, OFFSET>,
SetUINT64: SetUINT64::<Identity, OFFSET>,
SetDouble: SetDouble::<Identity, OFFSET>,
SetGUID: SetGUID::<Identity, OFFSET>,
SetString: SetString::<Identity, OFFSET>,
SetBlob: SetBlob::<Identity, OFFSET>,
SetUnknown: SetUnknown::<Identity, OFFSET>,
LockStore: LockStore::<Identity, OFFSET>,
UnlockStore: UnlockStore::<Identity, OFFSET>,
GetCount: GetCount::<Identity, OFFSET>,
GetItemByIndex: GetItemByIndex::<Identity, OFFSET>,
CopyAllItems: CopyAllItems::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFAttributes as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFAttributes {}
windows_core::imp::define_interface!(IMFAudioMediaType, IMFAudioMediaType_Vtbl, 0x26a0adc3_ce26_4672_9304_69552edd3faf);
impl core::ops::Deref for IMFAudioMediaType {
type Target = IMFMediaType;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFAudioMediaType, windows_core::IUnknown, IMFAttributes, IMFMediaType);
impl IMFAudioMediaType {
#[cfg(feature = "Win32_Media_Audio")]
pub unsafe fn GetAudioFormat(&self) -> *mut super::Audio::WAVEFORMATEX {
unsafe { (windows_core::Interface::vtable(self).GetAudioFormat)(windows_core::Interface::as_raw(self)) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFAudioMediaType_Vtbl {
pub base__: IMFMediaType_Vtbl,
#[cfg(feature = "Win32_Media_Audio")]
pub GetAudioFormat: unsafe extern "system" fn(*mut core::ffi::c_void) -> *mut super::Audio::WAVEFORMATEX,
#[cfg(not(feature = "Win32_Media_Audio"))]
GetAudioFormat: usize,
}
#[cfg(all(feature = "Win32_Media_Audio", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFAudioMediaType_Impl: IMFMediaType_Impl {
fn GetAudioFormat(&self) -> *mut super::Audio::WAVEFORMATEX;
}
#[cfg(all(feature = "Win32_Media_Audio", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFAudioMediaType_Vtbl {
pub const fn new<Identity: IMFAudioMediaType_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetAudioFormat<Identity: IMFAudioMediaType_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> *mut super::Audio::WAVEFORMATEX {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAudioMediaType_Impl::GetAudioFormat(this)
}
}
Self { base__: IMFMediaType_Vtbl::new::<Identity, OFFSET>(), GetAudioFormat: GetAudioFormat::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFAudioMediaType as windows_core::Interface>::IID || iid == &<IMFAttributes as windows_core::Interface>::IID || iid == &<IMFMediaType as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_Media_Audio", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFAudioMediaType {}
windows_core::imp::define_interface!(IMFAudioPolicy, IMFAudioPolicy_Vtbl, 0xa0638c2b_6465_4395_9ae7_a321a9fd2856);
windows_core::imp::interface_hierarchy!(IMFAudioPolicy, windows_core::IUnknown);
impl IMFAudioPolicy {
pub unsafe fn SetGroupingParam(&self, rguidclass: *const windows_core::GUID) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetGroupingParam)(windows_core::Interface::as_raw(self), rguidclass).ok() }
}
pub unsafe fn GetGroupingParam(&self) -> windows_core::Result<windows_core::GUID> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetGroupingParam)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetDisplayName<P0>(&self, pszname: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).SetDisplayName)(windows_core::Interface::as_raw(self), pszname.param().abi()).ok() }
}
pub unsafe fn GetDisplayName(&self) -> windows_core::Result<windows_core::PWSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDisplayName)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetIconPath<P0>(&self, pszpath: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).SetIconPath)(windows_core::Interface::as_raw(self), pszpath.param().abi()).ok() }
}
pub unsafe fn GetIconPath(&self) -> windows_core::Result<windows_core::PWSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetIconPath)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFAudioPolicy_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetGroupingParam: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID) -> windows_core::HRESULT,
pub GetGroupingParam: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT,
pub SetDisplayName: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR) -> windows_core::HRESULT,
pub GetDisplayName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT,
pub SetIconPath: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR) -> windows_core::HRESULT,
pub GetIconPath: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT,
}
pub trait IMFAudioPolicy_Impl: windows_core::IUnknownImpl {
fn SetGroupingParam(&self, rguidclass: *const windows_core::GUID) -> windows_core::Result<()>;
fn GetGroupingParam(&self) -> windows_core::Result<windows_core::GUID>;
fn SetDisplayName(&self, pszname: &windows_core::PCWSTR) -> windows_core::Result<()>;
fn GetDisplayName(&self) -> windows_core::Result<windows_core::PWSTR>;
fn SetIconPath(&self, pszpath: &windows_core::PCWSTR) -> windows_core::Result<()>;
fn GetIconPath(&self) -> windows_core::Result<windows_core::PWSTR>;
}
impl IMFAudioPolicy_Vtbl {
pub const fn new<Identity: IMFAudioPolicy_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetGroupingParam<Identity: IMFAudioPolicy_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, rguidclass: *const windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAudioPolicy_Impl::SetGroupingParam(this, core::mem::transmute_copy(&rguidclass)).into()
}
}
unsafe extern "system" fn GetGroupingParam<Identity: IMFAudioPolicy_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pguidclass: *mut windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFAudioPolicy_Impl::GetGroupingParam(this) {
Ok(ok__) => {
pguidclass.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetDisplayName<Identity: IMFAudioPolicy_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pszname: windows_core::PCWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAudioPolicy_Impl::SetDisplayName(this, core::mem::transmute(&pszname)).into()
}
}
unsafe extern "system" fn GetDisplayName<Identity: IMFAudioPolicy_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pszname: *mut windows_core::PWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFAudioPolicy_Impl::GetDisplayName(this) {
Ok(ok__) => {
pszname.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetIconPath<Identity: IMFAudioPolicy_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pszpath: windows_core::PCWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAudioPolicy_Impl::SetIconPath(this, core::mem::transmute(&pszpath)).into()
}
}
unsafe extern "system" fn GetIconPath<Identity: IMFAudioPolicy_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pszpath: *mut windows_core::PWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFAudioPolicy_Impl::GetIconPath(this) {
Ok(ok__) => {
pszpath.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetGroupingParam: SetGroupingParam::<Identity, OFFSET>,
GetGroupingParam: GetGroupingParam::<Identity, OFFSET>,
SetDisplayName: SetDisplayName::<Identity, OFFSET>,
GetDisplayName: GetDisplayName::<Identity, OFFSET>,
SetIconPath: SetIconPath::<Identity, OFFSET>,
GetIconPath: GetIconPath::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFAudioPolicy as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFAudioPolicy {}
windows_core::imp::define_interface!(IMFAudioStreamVolume, IMFAudioStreamVolume_Vtbl, 0x76b1bbdb_4ec8_4f36_b106_70a9316df593);
windows_core::imp::interface_hierarchy!(IMFAudioStreamVolume, windows_core::IUnknown);
impl IMFAudioStreamVolume {
pub unsafe fn GetChannelCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetChannelCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetChannelVolume(&self, dwindex: u32, flevel: f32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetChannelVolume)(windows_core::Interface::as_raw(self), dwindex, flevel).ok() }
}
pub unsafe fn GetChannelVolume(&self, dwindex: u32) -> windows_core::Result<f32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetChannelVolume)(windows_core::Interface::as_raw(self), dwindex, &mut result__).map(|| result__)
}
}
pub unsafe fn SetAllVolumes(&self, pfvolumes: &[f32]) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetAllVolumes)(windows_core::Interface::as_raw(self), pfvolumes.len().try_into().unwrap(), core::mem::transmute(pfvolumes.as_ptr())).ok() }
}
pub unsafe fn GetAllVolumes(&self, pfvolumes: &mut [f32]) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetAllVolumes)(windows_core::Interface::as_raw(self), pfvolumes.len().try_into().unwrap(), core::mem::transmute(pfvolumes.as_ptr())).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFAudioStreamVolume_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetChannelCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub SetChannelVolume: unsafe extern "system" fn(*mut core::ffi::c_void, u32, f32) -> windows_core::HRESULT,
pub GetChannelVolume: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut f32) -> windows_core::HRESULT,
pub SetAllVolumes: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const f32) -> windows_core::HRESULT,
pub GetAllVolumes: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut f32) -> windows_core::HRESULT,
}
pub trait IMFAudioStreamVolume_Impl: windows_core::IUnknownImpl {
fn GetChannelCount(&self) -> windows_core::Result<u32>;
fn SetChannelVolume(&self, dwindex: u32, flevel: f32) -> windows_core::Result<()>;
fn GetChannelVolume(&self, dwindex: u32) -> windows_core::Result<f32>;
fn SetAllVolumes(&self, dwcount: u32, pfvolumes: *const f32) -> windows_core::Result<()>;
fn GetAllVolumes(&self, dwcount: u32, pfvolumes: *mut f32) -> windows_core::Result<()>;
}
impl IMFAudioStreamVolume_Vtbl {
pub const fn new<Identity: IMFAudioStreamVolume_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetChannelCount<Identity: IMFAudioStreamVolume_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwcount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFAudioStreamVolume_Impl::GetChannelCount(this) {
Ok(ok__) => {
pdwcount.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetChannelVolume<Identity: IMFAudioStreamVolume_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwindex: u32, flevel: f32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAudioStreamVolume_Impl::SetChannelVolume(this, core::mem::transmute_copy(&dwindex), core::mem::transmute_copy(&flevel)).into()
}
}
unsafe extern "system" fn GetChannelVolume<Identity: IMFAudioStreamVolume_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwindex: u32, pflevel: *mut f32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFAudioStreamVolume_Impl::GetChannelVolume(this, core::mem::transmute_copy(&dwindex)) {
Ok(ok__) => {
pflevel.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetAllVolumes<Identity: IMFAudioStreamVolume_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwcount: u32, pfvolumes: *const f32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAudioStreamVolume_Impl::SetAllVolumes(this, core::mem::transmute_copy(&dwcount), core::mem::transmute_copy(&pfvolumes)).into()
}
}
unsafe extern "system" fn GetAllVolumes<Identity: IMFAudioStreamVolume_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwcount: u32, pfvolumes: *mut f32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFAudioStreamVolume_Impl::GetAllVolumes(this, core::mem::transmute_copy(&dwcount), core::mem::transmute_copy(&pfvolumes)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetChannelCount: GetChannelCount::<Identity, OFFSET>,
SetChannelVolume: SetChannelVolume::<Identity, OFFSET>,
GetChannelVolume: GetChannelVolume::<Identity, OFFSET>,
SetAllVolumes: SetAllVolumes::<Identity, OFFSET>,
GetAllVolumes: GetAllVolumes::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFAudioStreamVolume as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFAudioStreamVolume {}
windows_core::imp::define_interface!(IMFBufferListNotify, IMFBufferListNotify_Vtbl, 0x24cd47f7_81d8_4785_adb2_af697a963cd2);
windows_core::imp::interface_hierarchy!(IMFBufferListNotify, windows_core::IUnknown);
impl IMFBufferListNotify {
pub unsafe fn OnAddSourceBuffer(&self) {
unsafe { (windows_core::Interface::vtable(self).OnAddSourceBuffer)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn OnRemoveSourceBuffer(&self) {
unsafe { (windows_core::Interface::vtable(self).OnRemoveSourceBuffer)(windows_core::Interface::as_raw(self)) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFBufferListNotify_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub OnAddSourceBuffer: unsafe extern "system" fn(*mut core::ffi::c_void),
pub OnRemoveSourceBuffer: unsafe extern "system" fn(*mut core::ffi::c_void),
}
pub trait IMFBufferListNotify_Impl: windows_core::IUnknownImpl {
fn OnAddSourceBuffer(&self);
fn OnRemoveSourceBuffer(&self);
}
impl IMFBufferListNotify_Vtbl {
pub const fn new<Identity: IMFBufferListNotify_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn OnAddSourceBuffer<Identity: IMFBufferListNotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFBufferListNotify_Impl::OnAddSourceBuffer(this)
}
}
unsafe extern "system" fn OnRemoveSourceBuffer<Identity: IMFBufferListNotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFBufferListNotify_Impl::OnRemoveSourceBuffer(this)
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
OnAddSourceBuffer: OnAddSourceBuffer::<Identity, OFFSET>,
OnRemoveSourceBuffer: OnRemoveSourceBuffer::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFBufferListNotify as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFBufferListNotify {}
windows_core::imp::define_interface!(IMFByteStream, IMFByteStream_Vtbl, 0xad4c1b00_4bf7_422f_9175_756693d9130d);
windows_core::imp::interface_hierarchy!(IMFByteStream, windows_core::IUnknown);
impl IMFByteStream {
pub unsafe fn GetCapabilities(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetCapabilities)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetLength(&self) -> windows_core::Result<u64> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetLength)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetLength(&self, qwlength: u64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetLength)(windows_core::Interface::as_raw(self), qwlength).ok() }
}
pub unsafe fn GetCurrentPosition(&self) -> windows_core::Result<u64> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetCurrentPosition)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetCurrentPosition(&self, qwposition: u64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetCurrentPosition)(windows_core::Interface::as_raw(self), qwposition).ok() }
}
pub unsafe fn IsEndOfStream(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).IsEndOfStream)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn Read(&self, pb: &mut [u8], pcbread: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), core::mem::transmute(pb.as_ptr()), pb.len().try_into().unwrap(), pcbread as _).ok() }
}
pub unsafe fn BeginRead<P2, P3>(&self, pb: &mut [u8], pcallback: P2, punkstate: P3) -> windows_core::Result<()>
where
P2: windows_core::Param<IMFAsyncCallback>,
P3: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).BeginRead)(windows_core::Interface::as_raw(self), core::mem::transmute(pb.as_ptr()), pb.len().try_into().unwrap(), pcallback.param().abi(), punkstate.param().abi()).ok() }
}
pub unsafe fn EndRead<P0>(&self, presult: P0) -> windows_core::Result<u32>
where
P0: windows_core::Param<IMFAsyncResult>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EndRead)(windows_core::Interface::as_raw(self), presult.param().abi(), &mut result__).map(|| result__)
}
}
pub unsafe fn Write(&self, pb: &[u8]) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).Write)(windows_core::Interface::as_raw(self), core::mem::transmute(pb.as_ptr()), pb.len().try_into().unwrap(), &mut result__).map(|| result__)
}
}
pub unsafe fn BeginWrite<P2, P3>(&self, pb: &[u8], pcallback: P2, punkstate: P3) -> windows_core::Result<()>
where
P2: windows_core::Param<IMFAsyncCallback>,
P3: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).BeginWrite)(windows_core::Interface::as_raw(self), core::mem::transmute(pb.as_ptr()), pb.len().try_into().unwrap(), pcallback.param().abi(), punkstate.param().abi()).ok() }
}
pub unsafe fn EndWrite<P0>(&self, presult: P0) -> windows_core::Result<u32>
where
P0: windows_core::Param<IMFAsyncResult>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EndWrite)(windows_core::Interface::as_raw(self), presult.param().abi(), &mut result__).map(|| result__)
}
}
pub unsafe fn Seek(&self, seekorigin: MFBYTESTREAM_SEEK_ORIGIN, llseekoffset: i64, dwseekflags: u32) -> windows_core::Result<u64> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).Seek)(windows_core::Interface::as_raw(self), seekorigin, llseekoffset, dwseekflags, &mut result__).map(|| result__)
}
}
pub unsafe fn Flush(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Flush)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn Close(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFByteStream_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetCapabilities: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetLength: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
pub SetLength: unsafe extern "system" fn(*mut core::ffi::c_void, u64) -> windows_core::HRESULT,
pub GetCurrentPosition: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
pub SetCurrentPosition: unsafe extern "system" fn(*mut core::ffi::c_void, u64) -> windows_core::HRESULT,
pub IsEndOfStream: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub Read: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u8, u32, *mut u32) -> windows_core::HRESULT,
pub BeginRead: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u8, u32, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub EndRead: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub Write: unsafe extern "system" fn(*mut core::ffi::c_void, *const u8, u32, *mut u32) -> windows_core::HRESULT,
pub BeginWrite: unsafe extern "system" fn(*mut core::ffi::c_void, *const u8, u32, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub EndWrite: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub Seek: unsafe extern "system" fn(*mut core::ffi::c_void, MFBYTESTREAM_SEEK_ORIGIN, i64, u32, *mut u64) -> windows_core::HRESULT,
pub Flush: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Close: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFByteStream_Impl: windows_core::IUnknownImpl {
fn GetCapabilities(&self) -> windows_core::Result<u32>;
fn GetLength(&self) -> windows_core::Result<u64>;
fn SetLength(&self, qwlength: u64) -> windows_core::Result<()>;
fn GetCurrentPosition(&self) -> windows_core::Result<u64>;
fn SetCurrentPosition(&self, qwposition: u64) -> windows_core::Result<()>;
fn IsEndOfStream(&self) -> windows_core::Result<windows_core::BOOL>;
fn Read(&self, pb: *mut u8, cb: u32, pcbread: *mut u32) -> windows_core::Result<()>;
fn BeginRead(&self, pb: *mut u8, cb: u32, pcallback: windows_core::Ref<IMFAsyncCallback>, punkstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn EndRead(&self, presult: windows_core::Ref<IMFAsyncResult>) -> windows_core::Result<u32>;
fn Write(&self, pb: *const u8, cb: u32) -> windows_core::Result<u32>;
fn BeginWrite(&self, pb: *const u8, cb: u32, pcallback: windows_core::Ref<IMFAsyncCallback>, punkstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn EndWrite(&self, presult: windows_core::Ref<IMFAsyncResult>) -> windows_core::Result<u32>;
fn Seek(&self, seekorigin: MFBYTESTREAM_SEEK_ORIGIN, llseekoffset: i64, dwseekflags: u32) -> windows_core::Result<u64>;
fn Flush(&self) -> windows_core::Result<()>;
fn Close(&self) -> windows_core::Result<()>;
}
impl IMFByteStream_Vtbl {
pub const fn new<Identity: IMFByteStream_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetCapabilities<Identity: IMFByteStream_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwcapabilities: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFByteStream_Impl::GetCapabilities(this) {
Ok(ok__) => {
pdwcapabilities.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetLength<Identity: IMFByteStream_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pqwlength: *mut u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFByteStream_Impl::GetLength(this) {
Ok(ok__) => {
pqwlength.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetLength<Identity: IMFByteStream_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, qwlength: u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFByteStream_Impl::SetLength(this, core::mem::transmute_copy(&qwlength)).into()
}
}
unsafe extern "system" fn GetCurrentPosition<Identity: IMFByteStream_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pqwposition: *mut u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFByteStream_Impl::GetCurrentPosition(this) {
Ok(ok__) => {
pqwposition.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetCurrentPosition<Identity: IMFByteStream_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, qwposition: u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFByteStream_Impl::SetCurrentPosition(this, core::mem::transmute_copy(&qwposition)).into()
}
}
unsafe extern "system" fn IsEndOfStream<Identity: IMFByteStream_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pfendofstream: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFByteStream_Impl::IsEndOfStream(this) {
Ok(ok__) => {
pfendofstream.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Read<Identity: IMFByteStream_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pb: *mut u8, cb: u32, pcbread: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFByteStream_Impl::Read(this, core::mem::transmute_copy(&pb), core::mem::transmute_copy(&cb), core::mem::transmute_copy(&pcbread)).into()
}
}
unsafe extern "system" fn BeginRead<Identity: IMFByteStream_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pb: *mut u8, cb: u32, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFByteStream_Impl::BeginRead(this, core::mem::transmute_copy(&pb), core::mem::transmute_copy(&cb), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into()
}
}
unsafe extern "system" fn EndRead<Identity: IMFByteStream_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, pcbread: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFByteStream_Impl::EndRead(this, core::mem::transmute_copy(&presult)) {
Ok(ok__) => {
pcbread.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Write<Identity: IMFByteStream_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pb: *const u8, cb: u32, pcbwritten: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFByteStream_Impl::Write(this, core::mem::transmute_copy(&pb), core::mem::transmute_copy(&cb)) {
Ok(ok__) => {
pcbwritten.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn BeginWrite<Identity: IMFByteStream_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pb: *const u8, cb: u32, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFByteStream_Impl::BeginWrite(this, core::mem::transmute_copy(&pb), core::mem::transmute_copy(&cb), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into()
}
}
unsafe extern "system" fn EndWrite<Identity: IMFByteStream_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, pcbwritten: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFByteStream_Impl::EndWrite(this, core::mem::transmute_copy(&presult)) {
Ok(ok__) => {
pcbwritten.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Seek<Identity: IMFByteStream_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, seekorigin: MFBYTESTREAM_SEEK_ORIGIN, llseekoffset: i64, dwseekflags: u32, pqwcurrentposition: *mut u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFByteStream_Impl::Seek(this, core::mem::transmute_copy(&seekorigin), core::mem::transmute_copy(&llseekoffset), core::mem::transmute_copy(&dwseekflags)) {
Ok(ok__) => {
pqwcurrentposition.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Flush<Identity: IMFByteStream_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFByteStream_Impl::Flush(this).into()
}
}
unsafe extern "system" fn Close<Identity: IMFByteStream_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFByteStream_Impl::Close(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetCapabilities: GetCapabilities::<Identity, OFFSET>,
GetLength: GetLength::<Identity, OFFSET>,
SetLength: SetLength::<Identity, OFFSET>,
GetCurrentPosition: GetCurrentPosition::<Identity, OFFSET>,
SetCurrentPosition: SetCurrentPosition::<Identity, OFFSET>,
IsEndOfStream: IsEndOfStream::<Identity, OFFSET>,
Read: Read::<Identity, OFFSET>,
BeginRead: BeginRead::<Identity, OFFSET>,
EndRead: EndRead::<Identity, OFFSET>,
Write: Write::<Identity, OFFSET>,
BeginWrite: BeginWrite::<Identity, OFFSET>,
EndWrite: EndWrite::<Identity, OFFSET>,
Seek: Seek::<Identity, OFFSET>,
Flush: Flush::<Identity, OFFSET>,
Close: Close::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFByteStream as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFByteStream {}
windows_core::imp::define_interface!(IMFByteStreamBuffering, IMFByteStreamBuffering_Vtbl, 0x6d66d782_1d4f_4db7_8c63_cb8c77f1ef5e);
windows_core::imp::interface_hierarchy!(IMFByteStreamBuffering, windows_core::IUnknown);
impl IMFByteStreamBuffering {
pub unsafe fn SetBufferingParams(&self, pparams: *const MFBYTESTREAM_BUFFERING_PARAMS) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetBufferingParams)(windows_core::Interface::as_raw(self), pparams).ok() }
}
pub unsafe fn EnableBuffering(&self, fenable: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).EnableBuffering)(windows_core::Interface::as_raw(self), fenable.into()).ok() }
}
pub unsafe fn StopBuffering(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).StopBuffering)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFByteStreamBuffering_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetBufferingParams: unsafe extern "system" fn(*mut core::ffi::c_void, *const MFBYTESTREAM_BUFFERING_PARAMS) -> windows_core::HRESULT,
pub EnableBuffering: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT,
pub StopBuffering: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFByteStreamBuffering_Impl: windows_core::IUnknownImpl {
fn SetBufferingParams(&self, pparams: *const MFBYTESTREAM_BUFFERING_PARAMS) -> windows_core::Result<()>;
fn EnableBuffering(&self, fenable: windows_core::BOOL) -> windows_core::Result<()>;
fn StopBuffering(&self) -> windows_core::Result<()>;
}
impl IMFByteStreamBuffering_Vtbl {
pub const fn new<Identity: IMFByteStreamBuffering_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetBufferingParams<Identity: IMFByteStreamBuffering_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pparams: *const MFBYTESTREAM_BUFFERING_PARAMS) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFByteStreamBuffering_Impl::SetBufferingParams(this, core::mem::transmute_copy(&pparams)).into()
}
}
unsafe extern "system" fn EnableBuffering<Identity: IMFByteStreamBuffering_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, fenable: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFByteStreamBuffering_Impl::EnableBuffering(this, core::mem::transmute_copy(&fenable)).into()
}
}
unsafe extern "system" fn StopBuffering<Identity: IMFByteStreamBuffering_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFByteStreamBuffering_Impl::StopBuffering(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetBufferingParams: SetBufferingParams::<Identity, OFFSET>,
EnableBuffering: EnableBuffering::<Identity, OFFSET>,
StopBuffering: StopBuffering::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFByteStreamBuffering as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFByteStreamBuffering {}
windows_core::imp::define_interface!(IMFByteStreamCacheControl, IMFByteStreamCacheControl_Vtbl, 0xf5042ea4_7a96_4a75_aa7b_2be1ef7f88d5);
windows_core::imp::interface_hierarchy!(IMFByteStreamCacheControl, windows_core::IUnknown);
impl IMFByteStreamCacheControl {
pub unsafe fn StopBackgroundTransfer(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).StopBackgroundTransfer)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFByteStreamCacheControl_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub StopBackgroundTransfer: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFByteStreamCacheControl_Impl: windows_core::IUnknownImpl {
fn StopBackgroundTransfer(&self) -> windows_core::Result<()>;
}
impl IMFByteStreamCacheControl_Vtbl {
pub const fn new<Identity: IMFByteStreamCacheControl_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn StopBackgroundTransfer<Identity: IMFByteStreamCacheControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFByteStreamCacheControl_Impl::StopBackgroundTransfer(this).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), StopBackgroundTransfer: StopBackgroundTransfer::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFByteStreamCacheControl as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFByteStreamCacheControl {}
windows_core::imp::define_interface!(IMFByteStreamCacheControl2, IMFByteStreamCacheControl2_Vtbl, 0x71ce469c_f34b_49ea_a56b_2d2a10e51149);
impl core::ops::Deref for IMFByteStreamCacheControl2 {
type Target = IMFByteStreamCacheControl;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFByteStreamCacheControl2, windows_core::IUnknown, IMFByteStreamCacheControl);
impl IMFByteStreamCacheControl2 {
pub unsafe fn GetByteRanges(&self, pcranges: *mut u32, ppranges: *mut *mut MF_BYTE_STREAM_CACHE_RANGE) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetByteRanges)(windows_core::Interface::as_raw(self), pcranges as _, ppranges as _).ok() }
}
pub unsafe fn SetCacheLimit(&self, qwbytes: u64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetCacheLimit)(windows_core::Interface::as_raw(self), qwbytes).ok() }
}
pub unsafe fn IsBackgroundTransferActive(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).IsBackgroundTransferActive)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFByteStreamCacheControl2_Vtbl {
pub base__: IMFByteStreamCacheControl_Vtbl,
pub GetByteRanges: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut *mut MF_BYTE_STREAM_CACHE_RANGE) -> windows_core::HRESULT,
pub SetCacheLimit: unsafe extern "system" fn(*mut core::ffi::c_void, u64) -> windows_core::HRESULT,
pub IsBackgroundTransferActive: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
}
pub trait IMFByteStreamCacheControl2_Impl: IMFByteStreamCacheControl_Impl {
fn GetByteRanges(&self, pcranges: *mut u32, ppranges: *mut *mut MF_BYTE_STREAM_CACHE_RANGE) -> windows_core::Result<()>;
fn SetCacheLimit(&self, qwbytes: u64) -> windows_core::Result<()>;
fn IsBackgroundTransferActive(&self) -> windows_core::Result<windows_core::BOOL>;
}
impl IMFByteStreamCacheControl2_Vtbl {
pub const fn new<Identity: IMFByteStreamCacheControl2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetByteRanges<Identity: IMFByteStreamCacheControl2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcranges: *mut u32, ppranges: *mut *mut MF_BYTE_STREAM_CACHE_RANGE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFByteStreamCacheControl2_Impl::GetByteRanges(this, core::mem::transmute_copy(&pcranges), core::mem::transmute_copy(&ppranges)).into()
}
}
unsafe extern "system" fn SetCacheLimit<Identity: IMFByteStreamCacheControl2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, qwbytes: u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFByteStreamCacheControl2_Impl::SetCacheLimit(this, core::mem::transmute_copy(&qwbytes)).into()
}
}
unsafe extern "system" fn IsBackgroundTransferActive<Identity: IMFByteStreamCacheControl2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pfactive: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFByteStreamCacheControl2_Impl::IsBackgroundTransferActive(this) {
Ok(ok__) => {
pfactive.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IMFByteStreamCacheControl_Vtbl::new::<Identity, OFFSET>(),
GetByteRanges: GetByteRanges::<Identity, OFFSET>,
SetCacheLimit: SetCacheLimit::<Identity, OFFSET>,
IsBackgroundTransferActive: IsBackgroundTransferActive::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFByteStreamCacheControl2 as windows_core::Interface>::IID || iid == &<IMFByteStreamCacheControl as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFByteStreamCacheControl2 {}
windows_core::imp::define_interface!(IMFByteStreamHandler, IMFByteStreamHandler_Vtbl, 0xbb420aa4_765b_4a1f_91fe_d6a8a143924c);
windows_core::imp::interface_hierarchy!(IMFByteStreamHandler, windows_core::IUnknown);
impl IMFByteStreamHandler {
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn BeginCreateObject<P0, P1, P3, P5, P6>(&self, pbytestream: P0, pwszurl: P1, dwflags: u32, pprops: P3, ppiunknowncancelcookie: Option<*mut Option<windows_core::IUnknown>>, pcallback: P5, punkstate: P6) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFByteStream>,
P1: windows_core::Param<windows_core::PCWSTR>,
P3: windows_core::Param<super::super::UI::Shell::PropertiesSystem::IPropertyStore>,
P5: windows_core::Param<IMFAsyncCallback>,
P6: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).BeginCreateObject)(windows_core::Interface::as_raw(self), pbytestream.param().abi(), pwszurl.param().abi(), dwflags, pprops.param().abi(), ppiunknowncancelcookie.unwrap_or(core::mem::zeroed()) as _, pcallback.param().abi(), punkstate.param().abi()).ok() }
}
pub unsafe fn EndCreateObject<P0>(&self, presult: P0, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut Option<windows_core::IUnknown>) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncResult>,
{
unsafe { (windows_core::Interface::vtable(self).EndCreateObject)(windows_core::Interface::as_raw(self), presult.param().abi(), pobjecttype as _, core::mem::transmute(ppobject)).ok() }
}
pub unsafe fn CancelObjectCreation<P0>(&self, piunknowncancelcookie: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).CancelObjectCreation)(windows_core::Interface::as_raw(self), piunknowncancelcookie.param().abi()).ok() }
}
pub unsafe fn GetMaxNumberOfBytesRequiredForResolution(&self) -> windows_core::Result<u64> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMaxNumberOfBytesRequiredForResolution)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFByteStreamHandler_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub BeginCreateObject: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, windows_core::PCWSTR, u32, *mut core::ffi::c_void, *mut *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))]
BeginCreateObject: usize,
pub EndCreateObject: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut MF_OBJECT_TYPE, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CancelObjectCreation: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetMaxNumberOfBytesRequiredForResolution: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub trait IMFByteStreamHandler_Impl: windows_core::IUnknownImpl {
fn BeginCreateObject(&self, pbytestream: windows_core::Ref<IMFByteStream>, pwszurl: &windows_core::PCWSTR, dwflags: u32, pprops: windows_core::Ref<super::super::UI::Shell::PropertiesSystem::IPropertyStore>, ppiunknowncancelcookie: windows_core::OutRef<windows_core::IUnknown>, pcallback: windows_core::Ref<IMFAsyncCallback>, punkstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn EndCreateObject(&self, presult: windows_core::Ref<IMFAsyncResult>, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: windows_core::OutRef<windows_core::IUnknown>) -> windows_core::Result<()>;
fn CancelObjectCreation(&self, piunknowncancelcookie: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn GetMaxNumberOfBytesRequiredForResolution(&self) -> windows_core::Result<u64>;
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl IMFByteStreamHandler_Vtbl {
pub const fn new<Identity: IMFByteStreamHandler_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginCreateObject<Identity: IMFByteStreamHandler_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbytestream: *mut core::ffi::c_void, pwszurl: windows_core::PCWSTR, dwflags: u32, pprops: *mut core::ffi::c_void, ppiunknowncancelcookie: *mut *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFByteStreamHandler_Impl::BeginCreateObject(this, core::mem::transmute_copy(&pbytestream), core::mem::transmute(&pwszurl), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pprops), core::mem::transmute_copy(&ppiunknowncancelcookie), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into()
}
}
unsafe extern "system" fn EndCreateObject<Identity: IMFByteStreamHandler_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFByteStreamHandler_Impl::EndCreateObject(this, core::mem::transmute_copy(&presult), core::mem::transmute_copy(&pobjecttype), core::mem::transmute_copy(&ppobject)).into()
}
}
unsafe extern "system" fn CancelObjectCreation<Identity: IMFByteStreamHandler_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, piunknowncancelcookie: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFByteStreamHandler_Impl::CancelObjectCreation(this, core::mem::transmute_copy(&piunknowncancelcookie)).into()
}
}
unsafe extern "system" fn GetMaxNumberOfBytesRequiredForResolution<Identity: IMFByteStreamHandler_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pqwbytes: *mut u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFByteStreamHandler_Impl::GetMaxNumberOfBytesRequiredForResolution(this) {
Ok(ok__) => {
pqwbytes.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginCreateObject: BeginCreateObject::<Identity, OFFSET>,
EndCreateObject: EndCreateObject::<Identity, OFFSET>,
CancelObjectCreation: CancelObjectCreation::<Identity, OFFSET>,
GetMaxNumberOfBytesRequiredForResolution: GetMaxNumberOfBytesRequiredForResolution::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFByteStreamHandler as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl windows_core::RuntimeName for IMFByteStreamHandler {}
windows_core::imp::define_interface!(IMFByteStreamProxyClassFactory, IMFByteStreamProxyClassFactory_Vtbl, 0xa6b43f84_5c0a_42e8_a44d_b1857a76992f);
windows_core::imp::interface_hierarchy!(IMFByteStreamProxyClassFactory, windows_core::IUnknown);
impl IMFByteStreamProxyClassFactory {
pub unsafe fn CreateByteStreamProxy<P0, P1, T>(&self, pbytestream: P0, pattributes: P1) -> windows_core::Result<T>
where
P0: windows_core::Param<IMFByteStream>,
P1: windows_core::Param<IMFAttributes>,
T: windows_core::Interface,
{
let mut result__ = core::ptr::null_mut();
unsafe { (windows_core::Interface::vtable(self).CreateByteStreamProxy)(windows_core::Interface::as_raw(self), pbytestream.param().abi(), pattributes.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFByteStreamProxyClassFactory_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub CreateByteStreamProxy: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFByteStreamProxyClassFactory_Impl: windows_core::IUnknownImpl {
fn CreateByteStreamProxy(&self, pbytestream: windows_core::Ref<IMFByteStream>, pattributes: windows_core::Ref<IMFAttributes>, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
}
impl IMFByteStreamProxyClassFactory_Vtbl {
pub const fn new<Identity: IMFByteStreamProxyClassFactory_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateByteStreamProxy<Identity: IMFByteStreamProxyClassFactory_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbytestream: *mut core::ffi::c_void, pattributes: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFByteStreamProxyClassFactory_Impl::CreateByteStreamProxy(this, core::mem::transmute_copy(&pbytestream), core::mem::transmute_copy(&pattributes), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobject)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), CreateByteStreamProxy: CreateByteStreamProxy::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFByteStreamProxyClassFactory as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFByteStreamProxyClassFactory {}
windows_core::imp::define_interface!(IMFByteStreamTimeSeek, IMFByteStreamTimeSeek_Vtbl, 0x64976bfa_fb61_4041_9069_8c9a5f659beb);
windows_core::imp::interface_hierarchy!(IMFByteStreamTimeSeek, windows_core::IUnknown);
impl IMFByteStreamTimeSeek {
pub unsafe fn IsTimeSeekSupported(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).IsTimeSeekSupported)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn TimeSeek(&self, qwtimeposition: u64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).TimeSeek)(windows_core::Interface::as_raw(self), qwtimeposition).ok() }
}
pub unsafe fn GetTimeSeekResult(&self, pqwstarttime: *mut u64, pqwstoptime: *mut u64, pqwduration: *mut u64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetTimeSeekResult)(windows_core::Interface::as_raw(self), pqwstarttime as _, pqwstoptime as _, pqwduration as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFByteStreamTimeSeek_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub IsTimeSeekSupported: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub TimeSeek: unsafe extern "system" fn(*mut core::ffi::c_void, u64) -> windows_core::HRESULT,
pub GetTimeSeekResult: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64, *mut u64, *mut u64) -> windows_core::HRESULT,
}
pub trait IMFByteStreamTimeSeek_Impl: windows_core::IUnknownImpl {
fn IsTimeSeekSupported(&self) -> windows_core::Result<windows_core::BOOL>;
fn TimeSeek(&self, qwtimeposition: u64) -> windows_core::Result<()>;
fn GetTimeSeekResult(&self, pqwstarttime: *mut u64, pqwstoptime: *mut u64, pqwduration: *mut u64) -> windows_core::Result<()>;
}
impl IMFByteStreamTimeSeek_Vtbl {
pub const fn new<Identity: IMFByteStreamTimeSeek_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn IsTimeSeekSupported<Identity: IMFByteStreamTimeSeek_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pftimeseekissupported: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFByteStreamTimeSeek_Impl::IsTimeSeekSupported(this) {
Ok(ok__) => {
pftimeseekissupported.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn TimeSeek<Identity: IMFByteStreamTimeSeek_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, qwtimeposition: u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFByteStreamTimeSeek_Impl::TimeSeek(this, core::mem::transmute_copy(&qwtimeposition)).into()
}
}
unsafe extern "system" fn GetTimeSeekResult<Identity: IMFByteStreamTimeSeek_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pqwstarttime: *mut u64, pqwstoptime: *mut u64, pqwduration: *mut u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFByteStreamTimeSeek_Impl::GetTimeSeekResult(this, core::mem::transmute_copy(&pqwstarttime), core::mem::transmute_copy(&pqwstoptime), core::mem::transmute_copy(&pqwduration)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
IsTimeSeekSupported: IsTimeSeekSupported::<Identity, OFFSET>,
TimeSeek: TimeSeek::<Identity, OFFSET>,
GetTimeSeekResult: GetTimeSeekResult::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFByteStreamTimeSeek as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFByteStreamTimeSeek {}
windows_core::imp::define_interface!(IMFCameraConfigurationManager, IMFCameraConfigurationManager_Vtbl, 0xa624f617_4704_4206_8a6d_ebda4a093985);
windows_core::imp::interface_hierarchy!(IMFCameraConfigurationManager, windows_core::IUnknown);
impl IMFCameraConfigurationManager {
pub unsafe fn LoadDefaults<P0>(&self, cameraattributes: P0) -> windows_core::Result<IMFCameraControlDefaultsCollection>
where
P0: windows_core::Param<IMFAttributes>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).LoadDefaults)(windows_core::Interface::as_raw(self), cameraattributes.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn SaveDefaults<P0>(&self, configurations: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFCameraControlDefaultsCollection>,
{
unsafe { (windows_core::Interface::vtable(self).SaveDefaults)(windows_core::Interface::as_raw(self), configurations.param().abi()).ok() }
}
pub unsafe fn Shutdown(&self) {
unsafe { (windows_core::Interface::vtable(self).Shutdown)(windows_core::Interface::as_raw(self)) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFCameraConfigurationManager_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub LoadDefaults: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SaveDefaults: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Shutdown: unsafe extern "system" fn(*mut core::ffi::c_void),
}
pub trait IMFCameraConfigurationManager_Impl: windows_core::IUnknownImpl {
fn LoadDefaults(&self, cameraattributes: windows_core::Ref<IMFAttributes>) -> windows_core::Result<IMFCameraControlDefaultsCollection>;
fn SaveDefaults(&self, configurations: windows_core::Ref<IMFCameraControlDefaultsCollection>) -> windows_core::Result<()>;
fn Shutdown(&self);
}
impl IMFCameraConfigurationManager_Vtbl {
pub const fn new<Identity: IMFCameraConfigurationManager_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn LoadDefaults<Identity: IMFCameraConfigurationManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, cameraattributes: *mut core::ffi::c_void, configurations: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFCameraConfigurationManager_Impl::LoadDefaults(this, core::mem::transmute_copy(&cameraattributes)) {
Ok(ok__) => {
configurations.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SaveDefaults<Identity: IMFCameraConfigurationManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, configurations: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCameraConfigurationManager_Impl::SaveDefaults(this, core::mem::transmute_copy(&configurations)).into()
}
}
unsafe extern "system" fn Shutdown<Identity: IMFCameraConfigurationManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCameraConfigurationManager_Impl::Shutdown(this)
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
LoadDefaults: LoadDefaults::<Identity, OFFSET>,
SaveDefaults: SaveDefaults::<Identity, OFFSET>,
Shutdown: Shutdown::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFCameraConfigurationManager as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFCameraConfigurationManager {}
windows_core::imp::define_interface!(IMFCameraControlDefaults, IMFCameraControlDefaults_Vtbl, 0x75510662_b034_48f4_88a7_8de61daa4af9);
windows_core::imp::interface_hierarchy!(IMFCameraControlDefaults, windows_core::IUnknown);
impl IMFCameraControlDefaults {
pub unsafe fn GetType(&self) -> MF_CAMERA_CONTROL_CONFIGURATION_TYPE {
unsafe { (windows_core::Interface::vtable(self).GetType)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetRangeInfo(&self) -> windows_core::Result<MF_CAMERA_CONTROL_RANGE_INFO> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetRangeInfo)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn LockControlData(&self, control: *mut *mut core::ffi::c_void, controlsize: *mut u32, data: Option<*mut *mut core::ffi::c_void>, datasize: Option<*mut u32>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).LockControlData)(windows_core::Interface::as_raw(self), control as _, controlsize as _, data.unwrap_or(core::mem::zeroed()) as _, datasize.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn UnlockControlData(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).UnlockControlData)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFCameraControlDefaults_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetType: unsafe extern "system" fn(*mut core::ffi::c_void) -> MF_CAMERA_CONTROL_CONFIGURATION_TYPE,
pub GetRangeInfo: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MF_CAMERA_CONTROL_RANGE_INFO) -> windows_core::HRESULT,
pub LockControlData: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void, *mut u32, *mut *mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub UnlockControlData: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFCameraControlDefaults_Impl: windows_core::IUnknownImpl {
fn GetType(&self) -> MF_CAMERA_CONTROL_CONFIGURATION_TYPE;
fn GetRangeInfo(&self) -> windows_core::Result<MF_CAMERA_CONTROL_RANGE_INFO>;
fn LockControlData(&self, control: *mut *mut core::ffi::c_void, controlsize: *mut u32, data: *mut *mut core::ffi::c_void, datasize: *mut u32) -> windows_core::Result<()>;
fn UnlockControlData(&self) -> windows_core::Result<()>;
}
impl IMFCameraControlDefaults_Vtbl {
pub const fn new<Identity: IMFCameraControlDefaults_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetType<Identity: IMFCameraControlDefaults_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> MF_CAMERA_CONTROL_CONFIGURATION_TYPE {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCameraControlDefaults_Impl::GetType(this)
}
}
unsafe extern "system" fn GetRangeInfo<Identity: IMFCameraControlDefaults_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, rangeinfo: *mut MF_CAMERA_CONTROL_RANGE_INFO) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFCameraControlDefaults_Impl::GetRangeInfo(this) {
Ok(ok__) => {
rangeinfo.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn LockControlData<Identity: IMFCameraControlDefaults_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, control: *mut *mut core::ffi::c_void, controlsize: *mut u32, data: *mut *mut core::ffi::c_void, datasize: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCameraControlDefaults_Impl::LockControlData(this, core::mem::transmute_copy(&control), core::mem::transmute_copy(&controlsize), core::mem::transmute_copy(&data), core::mem::transmute_copy(&datasize)).into()
}
}
unsafe extern "system" fn UnlockControlData<Identity: IMFCameraControlDefaults_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCameraControlDefaults_Impl::UnlockControlData(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetType: GetType::<Identity, OFFSET>,
GetRangeInfo: GetRangeInfo::<Identity, OFFSET>,
LockControlData: LockControlData::<Identity, OFFSET>,
UnlockControlData: UnlockControlData::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFCameraControlDefaults as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFCameraControlDefaults {}
windows_core::imp::define_interface!(IMFCameraControlDefaultsCollection, IMFCameraControlDefaultsCollection_Vtbl, 0x92d43d0f_54a8_4bae_96da_356d259a5c26);
impl core::ops::Deref for IMFCameraControlDefaultsCollection {
type Target = IMFAttributes;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFCameraControlDefaultsCollection, windows_core::IUnknown, IMFAttributes);
impl IMFCameraControlDefaultsCollection {
pub unsafe fn GetControlCount(&self) -> u32 {
unsafe { (windows_core::Interface::vtable(self).GetControlCount)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetControl(&self, index: u32) -> windows_core::Result<IMFCameraControlDefaults> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetControl)(windows_core::Interface::as_raw(self), index, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetOrAddExtendedControl(&self, configtype: MF_CAMERA_CONTROL_CONFIGURATION_TYPE, constrolid: u32, streamid: u32, datasize: u32) -> windows_core::Result<IMFCameraControlDefaults> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOrAddExtendedControl)(windows_core::Interface::as_raw(self), configtype, constrolid, streamid, datasize, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetOrAddControl(&self, configtype: MF_CAMERA_CONTROL_CONFIGURATION_TYPE, controlset: *const windows_core::GUID, constrolid: u32, controlsize: u32, datasize: u32) -> windows_core::Result<IMFCameraControlDefaults> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOrAddControl)(windows_core::Interface::as_raw(self), configtype, controlset, constrolid, controlsize, datasize, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn RemoveControl(&self, controlset: *const windows_core::GUID, constrolid: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RemoveControl)(windows_core::Interface::as_raw(self), controlset, constrolid).ok() }
}
pub unsafe fn RemoveAllControls(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RemoveAllControls)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFCameraControlDefaultsCollection_Vtbl {
pub base__: IMFAttributes_Vtbl,
pub GetControlCount: unsafe extern "system" fn(*mut core::ffi::c_void) -> u32,
pub GetControl: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetOrAddExtendedControl: unsafe extern "system" fn(*mut core::ffi::c_void, MF_CAMERA_CONTROL_CONFIGURATION_TYPE, u32, u32, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetOrAddControl: unsafe extern "system" fn(*mut core::ffi::c_void, MF_CAMERA_CONTROL_CONFIGURATION_TYPE, *const windows_core::GUID, u32, u32, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RemoveControl: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, u32) -> windows_core::HRESULT,
pub RemoveAllControls: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFCameraControlDefaultsCollection_Impl: IMFAttributes_Impl {
fn GetControlCount(&self) -> u32;
fn GetControl(&self, index: u32) -> windows_core::Result<IMFCameraControlDefaults>;
fn GetOrAddExtendedControl(&self, configtype: MF_CAMERA_CONTROL_CONFIGURATION_TYPE, constrolid: u32, streamid: u32, datasize: u32) -> windows_core::Result<IMFCameraControlDefaults>;
fn GetOrAddControl(&self, configtype: MF_CAMERA_CONTROL_CONFIGURATION_TYPE, controlset: *const windows_core::GUID, constrolid: u32, controlsize: u32, datasize: u32) -> windows_core::Result<IMFCameraControlDefaults>;
fn RemoveControl(&self, controlset: *const windows_core::GUID, constrolid: u32) -> windows_core::Result<()>;
fn RemoveAllControls(&self) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFCameraControlDefaultsCollection_Vtbl {
pub const fn new<Identity: IMFCameraControlDefaultsCollection_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetControlCount<Identity: IMFCameraControlDefaultsCollection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> u32 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCameraControlDefaultsCollection_Impl::GetControlCount(this)
}
}
unsafe extern "system" fn GetControl<Identity: IMFCameraControlDefaultsCollection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, index: u32, configuration: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFCameraControlDefaultsCollection_Impl::GetControl(this, core::mem::transmute_copy(&index)) {
Ok(ok__) => {
configuration.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetOrAddExtendedControl<Identity: IMFCameraControlDefaultsCollection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, configtype: MF_CAMERA_CONTROL_CONFIGURATION_TYPE, constrolid: u32, streamid: u32, datasize: u32, defaults: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFCameraControlDefaultsCollection_Impl::GetOrAddExtendedControl(this, core::mem::transmute_copy(&configtype), core::mem::transmute_copy(&constrolid), core::mem::transmute_copy(&streamid), core::mem::transmute_copy(&datasize)) {
Ok(ok__) => {
defaults.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetOrAddControl<Identity: IMFCameraControlDefaultsCollection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, configtype: MF_CAMERA_CONTROL_CONFIGURATION_TYPE, controlset: *const windows_core::GUID, constrolid: u32, controlsize: u32, datasize: u32, defaults: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFCameraControlDefaultsCollection_Impl::GetOrAddControl(this, core::mem::transmute_copy(&configtype), core::mem::transmute_copy(&controlset), core::mem::transmute_copy(&constrolid), core::mem::transmute_copy(&controlsize), core::mem::transmute_copy(&datasize)) {
Ok(ok__) => {
defaults.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn RemoveControl<Identity: IMFCameraControlDefaultsCollection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, controlset: *const windows_core::GUID, constrolid: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCameraControlDefaultsCollection_Impl::RemoveControl(this, core::mem::transmute_copy(&controlset), core::mem::transmute_copy(&constrolid)).into()
}
}
unsafe extern "system" fn RemoveAllControls<Identity: IMFCameraControlDefaultsCollection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCameraControlDefaultsCollection_Impl::RemoveAllControls(this).into()
}
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, OFFSET>(),
GetControlCount: GetControlCount::<Identity, OFFSET>,
GetControl: GetControl::<Identity, OFFSET>,
GetOrAddExtendedControl: GetOrAddExtendedControl::<Identity, OFFSET>,
GetOrAddControl: GetOrAddControl::<Identity, OFFSET>,
RemoveControl: RemoveControl::<Identity, OFFSET>,
RemoveAllControls: RemoveAllControls::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFCameraControlDefaultsCollection as windows_core::Interface>::IID || iid == &<IMFAttributes as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFCameraControlDefaultsCollection {}
windows_core::imp::define_interface!(IMFCameraControlMonitor, IMFCameraControlMonitor_Vtbl, 0x4d46f2c9_28ba_4970_8c7b_1f0c9d80af69);
windows_core::imp::interface_hierarchy!(IMFCameraControlMonitor, windows_core::IUnknown);
impl IMFCameraControlMonitor {
pub unsafe fn Start(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Start)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn Stop(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn AddControlSubscription(&self, controlset: windows_core::GUID, id: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).AddControlSubscription)(windows_core::Interface::as_raw(self), core::mem::transmute(controlset), id).ok() }
}
pub unsafe fn RemoveControlSubscription(&self, controlset: windows_core::GUID, id: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RemoveControlSubscription)(windows_core::Interface::as_raw(self), core::mem::transmute(controlset), id).ok() }
}
pub unsafe fn Shutdown(&self) {
unsafe { (windows_core::Interface::vtable(self).Shutdown)(windows_core::Interface::as_raw(self)) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFCameraControlMonitor_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub Start: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Stop: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub AddControlSubscription: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::GUID, u32) -> windows_core::HRESULT,
pub RemoveControlSubscription: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::GUID, u32) -> windows_core::HRESULT,
pub Shutdown: unsafe extern "system" fn(*mut core::ffi::c_void),
}
pub trait IMFCameraControlMonitor_Impl: windows_core::IUnknownImpl {
fn Start(&self) -> windows_core::Result<()>;
fn Stop(&self) -> windows_core::Result<()>;
fn AddControlSubscription(&self, controlset: &windows_core::GUID, id: u32) -> windows_core::Result<()>;
fn RemoveControlSubscription(&self, controlset: &windows_core::GUID, id: u32) -> windows_core::Result<()>;
fn Shutdown(&self);
}
impl IMFCameraControlMonitor_Vtbl {
pub const fn new<Identity: IMFCameraControlMonitor_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Start<Identity: IMFCameraControlMonitor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCameraControlMonitor_Impl::Start(this).into()
}
}
unsafe extern "system" fn Stop<Identity: IMFCameraControlMonitor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCameraControlMonitor_Impl::Stop(this).into()
}
}
unsafe extern "system" fn AddControlSubscription<Identity: IMFCameraControlMonitor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, controlset: windows_core::GUID, id: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCameraControlMonitor_Impl::AddControlSubscription(this, core::mem::transmute(&controlset), core::mem::transmute_copy(&id)).into()
}
}
unsafe extern "system" fn RemoveControlSubscription<Identity: IMFCameraControlMonitor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, controlset: windows_core::GUID, id: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCameraControlMonitor_Impl::RemoveControlSubscription(this, core::mem::transmute(&controlset), core::mem::transmute_copy(&id)).into()
}
}
unsafe extern "system" fn Shutdown<Identity: IMFCameraControlMonitor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCameraControlMonitor_Impl::Shutdown(this)
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Start: Start::<Identity, OFFSET>,
Stop: Stop::<Identity, OFFSET>,
AddControlSubscription: AddControlSubscription::<Identity, OFFSET>,
RemoveControlSubscription: RemoveControlSubscription::<Identity, OFFSET>,
Shutdown: Shutdown::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFCameraControlMonitor as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFCameraControlMonitor {}
windows_core::imp::define_interface!(IMFCameraControlNotify, IMFCameraControlNotify_Vtbl, 0xe8f2540d_558a_4449_8b64_4863467a9fe8);
windows_core::imp::interface_hierarchy!(IMFCameraControlNotify, windows_core::IUnknown);
impl IMFCameraControlNotify {
pub unsafe fn OnChange(&self, controlset: *const windows_core::GUID, id: u32) {
unsafe { (windows_core::Interface::vtable(self).OnChange)(windows_core::Interface::as_raw(self), controlset, id) }
}
pub unsafe fn OnError(&self, hrstatus: windows_core::HRESULT) {
unsafe { (windows_core::Interface::vtable(self).OnError)(windows_core::Interface::as_raw(self), hrstatus) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFCameraControlNotify_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub OnChange: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, u32),
pub OnError: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::HRESULT),
}
pub trait IMFCameraControlNotify_Impl: windows_core::IUnknownImpl {
fn OnChange(&self, controlset: *const windows_core::GUID, id: u32);
fn OnError(&self, hrstatus: windows_core::HRESULT);
}
impl IMFCameraControlNotify_Vtbl {
pub const fn new<Identity: IMFCameraControlNotify_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn OnChange<Identity: IMFCameraControlNotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, controlset: *const windows_core::GUID, id: u32) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCameraControlNotify_Impl::OnChange(this, core::mem::transmute_copy(&controlset), core::mem::transmute_copy(&id))
}
}
unsafe extern "system" fn OnError<Identity: IMFCameraControlNotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hrstatus: windows_core::HRESULT) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCameraControlNotify_Impl::OnError(this, core::mem::transmute_copy(&hrstatus))
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), OnChange: OnChange::<Identity, OFFSET>, OnError: OnError::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFCameraControlNotify as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFCameraControlNotify {}
windows_core::imp::define_interface!(IMFCameraOcclusionStateMonitor, IMFCameraOcclusionStateMonitor_Vtbl, 0xcc692f46_c697_47e2_a72d_7b064617749b);
windows_core::imp::interface_hierarchy!(IMFCameraOcclusionStateMonitor, windows_core::IUnknown);
impl IMFCameraOcclusionStateMonitor {
pub unsafe fn Start(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Start)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn Stop(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn GetSupportedStates(&self) -> u32 {
unsafe { (windows_core::Interface::vtable(self).GetSupportedStates)(windows_core::Interface::as_raw(self)) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFCameraOcclusionStateMonitor_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub Start: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Stop: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetSupportedStates: unsafe extern "system" fn(*mut core::ffi::c_void) -> u32,
}
pub trait IMFCameraOcclusionStateMonitor_Impl: windows_core::IUnknownImpl {
fn Start(&self) -> windows_core::Result<()>;
fn Stop(&self) -> windows_core::Result<()>;
fn GetSupportedStates(&self) -> u32;
}
impl IMFCameraOcclusionStateMonitor_Vtbl {
pub const fn new<Identity: IMFCameraOcclusionStateMonitor_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Start<Identity: IMFCameraOcclusionStateMonitor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCameraOcclusionStateMonitor_Impl::Start(this).into()
}
}
unsafe extern "system" fn Stop<Identity: IMFCameraOcclusionStateMonitor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCameraOcclusionStateMonitor_Impl::Stop(this).into()
}
}
unsafe extern "system" fn GetSupportedStates<Identity: IMFCameraOcclusionStateMonitor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> u32 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCameraOcclusionStateMonitor_Impl::GetSupportedStates(this)
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Start: Start::<Identity, OFFSET>,
Stop: Stop::<Identity, OFFSET>,
GetSupportedStates: GetSupportedStates::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFCameraOcclusionStateMonitor as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFCameraOcclusionStateMonitor {}
windows_core::imp::define_interface!(IMFCameraOcclusionStateReport, IMFCameraOcclusionStateReport_Vtbl, 0x1640b2cf_74da_4462_a43b_b76d3bdc1434);
windows_core::imp::interface_hierarchy!(IMFCameraOcclusionStateReport, windows_core::IUnknown);
impl IMFCameraOcclusionStateReport {
pub unsafe fn GetOcclusionState(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOcclusionState)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFCameraOcclusionStateReport_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetOcclusionState: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
}
pub trait IMFCameraOcclusionStateReport_Impl: windows_core::IUnknownImpl {
fn GetOcclusionState(&self) -> windows_core::Result<u32>;
}
impl IMFCameraOcclusionStateReport_Vtbl {
pub const fn new<Identity: IMFCameraOcclusionStateReport_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetOcclusionState<Identity: IMFCameraOcclusionStateReport_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, occlusionstate: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFCameraOcclusionStateReport_Impl::GetOcclusionState(this) {
Ok(ok__) => {
occlusionstate.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetOcclusionState: GetOcclusionState::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFCameraOcclusionStateReport as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFCameraOcclusionStateReport {}
windows_core::imp::define_interface!(IMFCameraOcclusionStateReportCallback, IMFCameraOcclusionStateReportCallback_Vtbl, 0x6e5841c7_3889_4019_9035_783fb19b5948);
windows_core::imp::interface_hierarchy!(IMFCameraOcclusionStateReportCallback, windows_core::IUnknown);
impl IMFCameraOcclusionStateReportCallback {
pub unsafe fn OnOcclusionStateReport<P0>(&self, occlusionstatereport: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFCameraOcclusionStateReport>,
{
unsafe { (windows_core::Interface::vtable(self).OnOcclusionStateReport)(windows_core::Interface::as_raw(self), occlusionstatereport.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFCameraOcclusionStateReportCallback_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub OnOcclusionStateReport: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFCameraOcclusionStateReportCallback_Impl: windows_core::IUnknownImpl {
fn OnOcclusionStateReport(&self, occlusionstatereport: windows_core::Ref<IMFCameraOcclusionStateReport>) -> windows_core::Result<()>;
}
impl IMFCameraOcclusionStateReportCallback_Vtbl {
pub const fn new<Identity: IMFCameraOcclusionStateReportCallback_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn OnOcclusionStateReport<Identity: IMFCameraOcclusionStateReportCallback_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, occlusionstatereport: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCameraOcclusionStateReportCallback_Impl::OnOcclusionStateReport(this, core::mem::transmute_copy(&occlusionstatereport)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), OnOcclusionStateReport: OnOcclusionStateReport::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFCameraOcclusionStateReportCallback as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFCameraOcclusionStateReportCallback {}
windows_core::imp::define_interface!(IMFCameraSyncObject, IMFCameraSyncObject_Vtbl, 0x6338b23a_3042_49d2_a3ea_ec0fed815407);
windows_core::imp::interface_hierarchy!(IMFCameraSyncObject, windows_core::IUnknown);
impl IMFCameraSyncObject {
pub unsafe fn WaitOnSignal(&self, timeoutinms: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).WaitOnSignal)(windows_core::Interface::as_raw(self), timeoutinms).ok() }
}
pub unsafe fn Shutdown(&self) {
unsafe { (windows_core::Interface::vtable(self).Shutdown)(windows_core::Interface::as_raw(self)) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFCameraSyncObject_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub WaitOnSignal: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub Shutdown: unsafe extern "system" fn(*mut core::ffi::c_void),
}
pub trait IMFCameraSyncObject_Impl: windows_core::IUnknownImpl {
fn WaitOnSignal(&self, timeoutinms: u32) -> windows_core::Result<()>;
fn Shutdown(&self);
}
impl IMFCameraSyncObject_Vtbl {
pub const fn new<Identity: IMFCameraSyncObject_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn WaitOnSignal<Identity: IMFCameraSyncObject_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, timeoutinms: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCameraSyncObject_Impl::WaitOnSignal(this, core::mem::transmute_copy(&timeoutinms)).into()
}
}
unsafe extern "system" fn Shutdown<Identity: IMFCameraSyncObject_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCameraSyncObject_Impl::Shutdown(this)
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
WaitOnSignal: WaitOnSignal::<Identity, OFFSET>,
Shutdown: Shutdown::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFCameraSyncObject as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFCameraSyncObject {}
windows_core::imp::define_interface!(IMFCaptureEngine, IMFCaptureEngine_Vtbl, 0xa6bba433_176b_48b2_b375_53aa03473207);
windows_core::imp::interface_hierarchy!(IMFCaptureEngine, windows_core::IUnknown);
impl IMFCaptureEngine {
pub unsafe fn Initialize<P0, P1, P2, P3>(&self, peventcallback: P0, pattributes: P1, paudiosource: P2, pvideosource: P3) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFCaptureEngineOnEventCallback>,
P1: windows_core::Param<IMFAttributes>,
P2: windows_core::Param<windows_core::IUnknown>,
P3: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), peventcallback.param().abi(), pattributes.param().abi(), paudiosource.param().abi(), pvideosource.param().abi()).ok() }
}
pub unsafe fn StartPreview(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).StartPreview)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn StopPreview(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).StopPreview)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn StartRecord(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).StartRecord)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn StopRecord(&self, bfinalize: bool, bflushunprocessedsamples: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).StopRecord)(windows_core::Interface::as_raw(self), bfinalize.into(), bflushunprocessedsamples.into()).ok() }
}
pub unsafe fn TakePhoto(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).TakePhoto)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn GetSink(&self, mfcaptureenginesinktype: MF_CAPTURE_ENGINE_SINK_TYPE) -> windows_core::Result<IMFCaptureSink> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetSink)(windows_core::Interface::as_raw(self), mfcaptureenginesinktype, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetSource(&self) -> windows_core::Result<IMFCaptureSource> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetSource)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFCaptureEngine_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub Initialize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub StartPreview: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub StopPreview: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub StartRecord: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub StopRecord: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL, windows_core::BOOL) -> windows_core::HRESULT,
pub TakePhoto: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetSink: unsafe extern "system" fn(*mut core::ffi::c_void, MF_CAPTURE_ENGINE_SINK_TYPE, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetSource: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFCaptureEngine_Impl: windows_core::IUnknownImpl {
fn Initialize(&self, peventcallback: windows_core::Ref<IMFCaptureEngineOnEventCallback>, pattributes: windows_core::Ref<IMFAttributes>, paudiosource: windows_core::Ref<windows_core::IUnknown>, pvideosource: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn StartPreview(&self) -> windows_core::Result<()>;
fn StopPreview(&self) -> windows_core::Result<()>;
fn StartRecord(&self) -> windows_core::Result<()>;
fn StopRecord(&self, bfinalize: windows_core::BOOL, bflushunprocessedsamples: windows_core::BOOL) -> windows_core::Result<()>;
fn TakePhoto(&self) -> windows_core::Result<()>;
fn GetSink(&self, mfcaptureenginesinktype: MF_CAPTURE_ENGINE_SINK_TYPE) -> windows_core::Result<IMFCaptureSink>;
fn GetSource(&self) -> windows_core::Result<IMFCaptureSource>;
}
impl IMFCaptureEngine_Vtbl {
pub const fn new<Identity: IMFCaptureEngine_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Initialize<Identity: IMFCaptureEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, peventcallback: *mut core::ffi::c_void, pattributes: *mut core::ffi::c_void, paudiosource: *mut core::ffi::c_void, pvideosource: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureEngine_Impl::Initialize(this, core::mem::transmute_copy(&peventcallback), core::mem::transmute_copy(&pattributes), core::mem::transmute_copy(&paudiosource), core::mem::transmute_copy(&pvideosource)).into()
}
}
unsafe extern "system" fn StartPreview<Identity: IMFCaptureEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureEngine_Impl::StartPreview(this).into()
}
}
unsafe extern "system" fn StopPreview<Identity: IMFCaptureEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureEngine_Impl::StopPreview(this).into()
}
}
unsafe extern "system" fn StartRecord<Identity: IMFCaptureEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureEngine_Impl::StartRecord(this).into()
}
}
unsafe extern "system" fn StopRecord<Identity: IMFCaptureEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, bfinalize: windows_core::BOOL, bflushunprocessedsamples: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureEngine_Impl::StopRecord(this, core::mem::transmute_copy(&bfinalize), core::mem::transmute_copy(&bflushunprocessedsamples)).into()
}
}
unsafe extern "system" fn TakePhoto<Identity: IMFCaptureEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureEngine_Impl::TakePhoto(this).into()
}
}
unsafe extern "system" fn GetSink<Identity: IMFCaptureEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, mfcaptureenginesinktype: MF_CAPTURE_ENGINE_SINK_TYPE, ppsink: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFCaptureEngine_Impl::GetSink(this, core::mem::transmute_copy(&mfcaptureenginesinktype)) {
Ok(ok__) => {
ppsink.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetSource<Identity: IMFCaptureEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppsource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFCaptureEngine_Impl::GetSource(this) {
Ok(ok__) => {
ppsource.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Initialize: Initialize::<Identity, OFFSET>,
StartPreview: StartPreview::<Identity, OFFSET>,
StopPreview: StopPreview::<Identity, OFFSET>,
StartRecord: StartRecord::<Identity, OFFSET>,
StopRecord: StopRecord::<Identity, OFFSET>,
TakePhoto: TakePhoto::<Identity, OFFSET>,
GetSink: GetSink::<Identity, OFFSET>,
GetSource: GetSource::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFCaptureEngine as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFCaptureEngine {}
windows_core::imp::define_interface!(IMFCaptureEngineClassFactory, IMFCaptureEngineClassFactory_Vtbl, 0x8f02d140_56fc_4302_a705_3a97c78be779);
windows_core::imp::interface_hierarchy!(IMFCaptureEngineClassFactory, windows_core::IUnknown);
impl IMFCaptureEngineClassFactory {
pub unsafe fn CreateInstance<T>(&self, clsid: *const windows_core::GUID) -> windows_core::Result<T>
where
T: windows_core::Interface,
{
let mut result__ = core::ptr::null_mut();
unsafe { (windows_core::Interface::vtable(self).CreateInstance)(windows_core::Interface::as_raw(self), clsid, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFCaptureEngineClassFactory_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub CreateInstance: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFCaptureEngineClassFactory_Impl: windows_core::IUnknownImpl {
fn CreateInstance(&self, clsid: *const windows_core::GUID, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
}
impl IMFCaptureEngineClassFactory_Vtbl {
pub const fn new<Identity: IMFCaptureEngineClassFactory_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateInstance<Identity: IMFCaptureEngineClassFactory_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, clsid: *const windows_core::GUID, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureEngineClassFactory_Impl::CreateInstance(this, core::mem::transmute_copy(&clsid), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobject)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), CreateInstance: CreateInstance::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFCaptureEngineClassFactory as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFCaptureEngineClassFactory {}
windows_core::imp::define_interface!(IMFCaptureEngineOnEventCallback, IMFCaptureEngineOnEventCallback_Vtbl, 0xaeda51c0_9025_4983_9012_de597b88b089);
windows_core::imp::interface_hierarchy!(IMFCaptureEngineOnEventCallback, windows_core::IUnknown);
impl IMFCaptureEngineOnEventCallback {
pub unsafe fn OnEvent<P0>(&self, pevent: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaEvent>,
{
unsafe { (windows_core::Interface::vtable(self).OnEvent)(windows_core::Interface::as_raw(self), pevent.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFCaptureEngineOnEventCallback_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub OnEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFCaptureEngineOnEventCallback_Impl: windows_core::IUnknownImpl {
fn OnEvent(&self, pevent: windows_core::Ref<IMFMediaEvent>) -> windows_core::Result<()>;
}
impl IMFCaptureEngineOnEventCallback_Vtbl {
pub const fn new<Identity: IMFCaptureEngineOnEventCallback_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn OnEvent<Identity: IMFCaptureEngineOnEventCallback_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pevent: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureEngineOnEventCallback_Impl::OnEvent(this, core::mem::transmute_copy(&pevent)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), OnEvent: OnEvent::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFCaptureEngineOnEventCallback as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFCaptureEngineOnEventCallback {}
windows_core::imp::define_interface!(IMFCaptureEngineOnSampleCallback, IMFCaptureEngineOnSampleCallback_Vtbl, 0x52150b82_ab39_4467_980f_e48bf0822ecd);
windows_core::imp::interface_hierarchy!(IMFCaptureEngineOnSampleCallback, windows_core::IUnknown);
impl IMFCaptureEngineOnSampleCallback {
pub unsafe fn OnSample<P0>(&self, psample: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFSample>,
{
unsafe { (windows_core::Interface::vtable(self).OnSample)(windows_core::Interface::as_raw(self), psample.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFCaptureEngineOnSampleCallback_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub OnSample: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFCaptureEngineOnSampleCallback_Impl: windows_core::IUnknownImpl {
fn OnSample(&self, psample: windows_core::Ref<IMFSample>) -> windows_core::Result<()>;
}
impl IMFCaptureEngineOnSampleCallback_Vtbl {
pub const fn new<Identity: IMFCaptureEngineOnSampleCallback_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn OnSample<Identity: IMFCaptureEngineOnSampleCallback_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, psample: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureEngineOnSampleCallback_Impl::OnSample(this, core::mem::transmute_copy(&psample)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), OnSample: OnSample::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFCaptureEngineOnSampleCallback as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFCaptureEngineOnSampleCallback {}
windows_core::imp::define_interface!(IMFCaptureEngineOnSampleCallback2, IMFCaptureEngineOnSampleCallback2_Vtbl, 0xe37ceed7_340f_4514_9f4d_9c2ae026100b);
impl core::ops::Deref for IMFCaptureEngineOnSampleCallback2 {
type Target = IMFCaptureEngineOnSampleCallback;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFCaptureEngineOnSampleCallback2, windows_core::IUnknown, IMFCaptureEngineOnSampleCallback);
impl IMFCaptureEngineOnSampleCallback2 {
pub unsafe fn OnSynchronizedEvent<P0>(&self, pevent: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaEvent>,
{
unsafe { (windows_core::Interface::vtable(self).OnSynchronizedEvent)(windows_core::Interface::as_raw(self), pevent.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFCaptureEngineOnSampleCallback2_Vtbl {
pub base__: IMFCaptureEngineOnSampleCallback_Vtbl,
pub OnSynchronizedEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFCaptureEngineOnSampleCallback2_Impl: IMFCaptureEngineOnSampleCallback_Impl {
fn OnSynchronizedEvent(&self, pevent: windows_core::Ref<IMFMediaEvent>) -> windows_core::Result<()>;
}
impl IMFCaptureEngineOnSampleCallback2_Vtbl {
pub const fn new<Identity: IMFCaptureEngineOnSampleCallback2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn OnSynchronizedEvent<Identity: IMFCaptureEngineOnSampleCallback2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pevent: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureEngineOnSampleCallback2_Impl::OnSynchronizedEvent(this, core::mem::transmute_copy(&pevent)).into()
}
}
Self { base__: IMFCaptureEngineOnSampleCallback_Vtbl::new::<Identity, OFFSET>(), OnSynchronizedEvent: OnSynchronizedEvent::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFCaptureEngineOnSampleCallback2 as windows_core::Interface>::IID || iid == &<IMFCaptureEngineOnSampleCallback as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFCaptureEngineOnSampleCallback2 {}
windows_core::imp::define_interface!(IMFCapturePhotoConfirmation, IMFCapturePhotoConfirmation_Vtbl, 0x19f68549_ca8a_4706_a4ef_481dbc95e12c);
windows_core::imp::interface_hierarchy!(IMFCapturePhotoConfirmation, windows_core::IUnknown);
impl IMFCapturePhotoConfirmation {
pub unsafe fn SetPhotoConfirmationCallback<P0>(&self, pnotificationcallback: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncCallback>,
{
unsafe { (windows_core::Interface::vtable(self).SetPhotoConfirmationCallback)(windows_core::Interface::as_raw(self), pnotificationcallback.param().abi()).ok() }
}
pub unsafe fn SetPixelFormat(&self, subtype: windows_core::GUID) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetPixelFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(subtype)).ok() }
}
pub unsafe fn GetPixelFormat(&self) -> windows_core::Result<windows_core::GUID> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetPixelFormat)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFCapturePhotoConfirmation_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetPhotoConfirmationCallback: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetPixelFormat: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::GUID) -> windows_core::HRESULT,
pub GetPixelFormat: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT,
}
pub trait IMFCapturePhotoConfirmation_Impl: windows_core::IUnknownImpl {
fn SetPhotoConfirmationCallback(&self, pnotificationcallback: windows_core::Ref<IMFAsyncCallback>) -> windows_core::Result<()>;
fn SetPixelFormat(&self, subtype: &windows_core::GUID) -> windows_core::Result<()>;
fn GetPixelFormat(&self) -> windows_core::Result<windows_core::GUID>;
}
impl IMFCapturePhotoConfirmation_Vtbl {
pub const fn new<Identity: IMFCapturePhotoConfirmation_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetPhotoConfirmationCallback<Identity: IMFCapturePhotoConfirmation_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pnotificationcallback: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCapturePhotoConfirmation_Impl::SetPhotoConfirmationCallback(this, core::mem::transmute_copy(&pnotificationcallback)).into()
}
}
unsafe extern "system" fn SetPixelFormat<Identity: IMFCapturePhotoConfirmation_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, subtype: windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCapturePhotoConfirmation_Impl::SetPixelFormat(this, core::mem::transmute(&subtype)).into()
}
}
unsafe extern "system" fn GetPixelFormat<Identity: IMFCapturePhotoConfirmation_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, subtype: *mut windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFCapturePhotoConfirmation_Impl::GetPixelFormat(this) {
Ok(ok__) => {
subtype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetPhotoConfirmationCallback: SetPhotoConfirmationCallback::<Identity, OFFSET>,
SetPixelFormat: SetPixelFormat::<Identity, OFFSET>,
GetPixelFormat: GetPixelFormat::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFCapturePhotoConfirmation as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFCapturePhotoConfirmation {}
windows_core::imp::define_interface!(IMFCapturePhotoSink, IMFCapturePhotoSink_Vtbl, 0xd2d43cc8_48bb_4aa7_95db_10c06977e777);
impl core::ops::Deref for IMFCapturePhotoSink {
type Target = IMFCaptureSink;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFCapturePhotoSink, windows_core::IUnknown, IMFCaptureSink);
impl IMFCapturePhotoSink {
pub unsafe fn SetOutputFileName<P0>(&self, filename: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).SetOutputFileName)(windows_core::Interface::as_raw(self), filename.param().abi()).ok() }
}
pub unsafe fn SetSampleCallback<P0>(&self, pcallback: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFCaptureEngineOnSampleCallback>,
{
unsafe { (windows_core::Interface::vtable(self).SetSampleCallback)(windows_core::Interface::as_raw(self), pcallback.param().abi()).ok() }
}
pub unsafe fn SetOutputByteStream<P0>(&self, pbytestream: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFByteStream>,
{
unsafe { (windows_core::Interface::vtable(self).SetOutputByteStream)(windows_core::Interface::as_raw(self), pbytestream.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFCapturePhotoSink_Vtbl {
pub base__: IMFCaptureSink_Vtbl,
pub SetOutputFileName: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR) -> windows_core::HRESULT,
pub SetSampleCallback: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetOutputByteStream: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFCapturePhotoSink_Impl: IMFCaptureSink_Impl {
fn SetOutputFileName(&self, filename: &windows_core::PCWSTR) -> windows_core::Result<()>;
fn SetSampleCallback(&self, pcallback: windows_core::Ref<IMFCaptureEngineOnSampleCallback>) -> windows_core::Result<()>;
fn SetOutputByteStream(&self, pbytestream: windows_core::Ref<IMFByteStream>) -> windows_core::Result<()>;
}
impl IMFCapturePhotoSink_Vtbl {
pub const fn new<Identity: IMFCapturePhotoSink_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetOutputFileName<Identity: IMFCapturePhotoSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, filename: windows_core::PCWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCapturePhotoSink_Impl::SetOutputFileName(this, core::mem::transmute(&filename)).into()
}
}
unsafe extern "system" fn SetSampleCallback<Identity: IMFCapturePhotoSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCapturePhotoSink_Impl::SetSampleCallback(this, core::mem::transmute_copy(&pcallback)).into()
}
}
unsafe extern "system" fn SetOutputByteStream<Identity: IMFCapturePhotoSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbytestream: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCapturePhotoSink_Impl::SetOutputByteStream(this, core::mem::transmute_copy(&pbytestream)).into()
}
}
Self {
base__: IMFCaptureSink_Vtbl::new::<Identity, OFFSET>(),
SetOutputFileName: SetOutputFileName::<Identity, OFFSET>,
SetSampleCallback: SetSampleCallback::<Identity, OFFSET>,
SetOutputByteStream: SetOutputByteStream::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFCapturePhotoSink as windows_core::Interface>::IID || iid == &<IMFCaptureSink as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFCapturePhotoSink {}
windows_core::imp::define_interface!(IMFCapturePreviewSink, IMFCapturePreviewSink_Vtbl, 0x77346cfd_5b49_4d73_ace0_5b52a859f2e0);
impl core::ops::Deref for IMFCapturePreviewSink {
type Target = IMFCaptureSink;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFCapturePreviewSink, windows_core::IUnknown, IMFCaptureSink);
impl IMFCapturePreviewSink {
pub unsafe fn SetRenderHandle(&self, handle: super::super::Foundation::HANDLE) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetRenderHandle)(windows_core::Interface::as_raw(self), handle).ok() }
}
pub unsafe fn SetRenderSurface<P0>(&self, psurface: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).SetRenderSurface)(windows_core::Interface::as_raw(self), psurface.param().abi()).ok() }
}
pub unsafe fn UpdateVideo(&self, psrc: Option<*const MFVideoNormalizedRect>, pdst: Option<*const super::super::Foundation::RECT>, pborderclr: Option<*const super::super::Foundation::COLORREF>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).UpdateVideo)(windows_core::Interface::as_raw(self), psrc.unwrap_or(core::mem::zeroed()) as _, pdst.unwrap_or(core::mem::zeroed()) as _, pborderclr.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn SetSampleCallback<P1>(&self, dwstreamsinkindex: u32, pcallback: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFCaptureEngineOnSampleCallback>,
{
unsafe { (windows_core::Interface::vtable(self).SetSampleCallback)(windows_core::Interface::as_raw(self), dwstreamsinkindex, pcallback.param().abi()).ok() }
}
pub unsafe fn GetMirrorState(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMirrorState)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetMirrorState(&self, fmirrorstate: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetMirrorState)(windows_core::Interface::as_raw(self), fmirrorstate.into()).ok() }
}
pub unsafe fn GetRotation(&self, dwstreamindex: u32) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetRotation)(windows_core::Interface::as_raw(self), dwstreamindex, &mut result__).map(|| result__)
}
}
pub unsafe fn SetRotation(&self, dwstreamindex: u32, dwrotationvalue: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetRotation)(windows_core::Interface::as_raw(self), dwstreamindex, dwrotationvalue).ok() }
}
pub unsafe fn SetCustomSink<P0>(&self, pmediasink: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaSink>,
{
unsafe { (windows_core::Interface::vtable(self).SetCustomSink)(windows_core::Interface::as_raw(self), pmediasink.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFCapturePreviewSink_Vtbl {
pub base__: IMFCaptureSink_Vtbl,
pub SetRenderHandle: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::HANDLE) -> windows_core::HRESULT,
pub SetRenderSurface: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub UpdateVideo: unsafe extern "system" fn(*mut core::ffi::c_void, *const MFVideoNormalizedRect, *const super::super::Foundation::RECT, *const super::super::Foundation::COLORREF) -> windows_core::HRESULT,
pub SetSampleCallback: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetMirrorState: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub SetMirrorState: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT,
pub GetRotation: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u32) -> windows_core::HRESULT,
pub SetRotation: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32) -> windows_core::HRESULT,
pub SetCustomSink: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFCapturePreviewSink_Impl: IMFCaptureSink_Impl {
fn SetRenderHandle(&self, handle: super::super::Foundation::HANDLE) -> windows_core::Result<()>;
fn SetRenderSurface(&self, psurface: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn UpdateVideo(&self, psrc: *const MFVideoNormalizedRect, pdst: *const super::super::Foundation::RECT, pborderclr: *const super::super::Foundation::COLORREF) -> windows_core::Result<()>;
fn SetSampleCallback(&self, dwstreamsinkindex: u32, pcallback: windows_core::Ref<IMFCaptureEngineOnSampleCallback>) -> windows_core::Result<()>;
fn GetMirrorState(&self) -> windows_core::Result<windows_core::BOOL>;
fn SetMirrorState(&self, fmirrorstate: windows_core::BOOL) -> windows_core::Result<()>;
fn GetRotation(&self, dwstreamindex: u32) -> windows_core::Result<u32>;
fn SetRotation(&self, dwstreamindex: u32, dwrotationvalue: u32) -> windows_core::Result<()>;
fn SetCustomSink(&self, pmediasink: windows_core::Ref<IMFMediaSink>) -> windows_core::Result<()>;
}
impl IMFCapturePreviewSink_Vtbl {
pub const fn new<Identity: IMFCapturePreviewSink_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetRenderHandle<Identity: IMFCapturePreviewSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, handle: super::super::Foundation::HANDLE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCapturePreviewSink_Impl::SetRenderHandle(this, core::mem::transmute_copy(&handle)).into()
}
}
unsafe extern "system" fn SetRenderSurface<Identity: IMFCapturePreviewSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, psurface: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCapturePreviewSink_Impl::SetRenderSurface(this, core::mem::transmute_copy(&psurface)).into()
}
}
unsafe extern "system" fn UpdateVideo<Identity: IMFCapturePreviewSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, psrc: *const MFVideoNormalizedRect, pdst: *const super::super::Foundation::RECT, pborderclr: *const super::super::Foundation::COLORREF) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCapturePreviewSink_Impl::UpdateVideo(this, core::mem::transmute_copy(&psrc), core::mem::transmute_copy(&pdst), core::mem::transmute_copy(&pborderclr)).into()
}
}
unsafe extern "system" fn SetSampleCallback<Identity: IMFCapturePreviewSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamsinkindex: u32, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCapturePreviewSink_Impl::SetSampleCallback(this, core::mem::transmute_copy(&dwstreamsinkindex), core::mem::transmute_copy(&pcallback)).into()
}
}
unsafe extern "system" fn GetMirrorState<Identity: IMFCapturePreviewSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pfmirrorstate: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFCapturePreviewSink_Impl::GetMirrorState(this) {
Ok(ok__) => {
pfmirrorstate.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetMirrorState<Identity: IMFCapturePreviewSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, fmirrorstate: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCapturePreviewSink_Impl::SetMirrorState(this, core::mem::transmute_copy(&fmirrorstate)).into()
}
}
unsafe extern "system" fn GetRotation<Identity: IMFCapturePreviewSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, pdwrotationvalue: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFCapturePreviewSink_Impl::GetRotation(this, core::mem::transmute_copy(&dwstreamindex)) {
Ok(ok__) => {
pdwrotationvalue.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetRotation<Identity: IMFCapturePreviewSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, dwrotationvalue: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCapturePreviewSink_Impl::SetRotation(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&dwrotationvalue)).into()
}
}
unsafe extern "system" fn SetCustomSink<Identity: IMFCapturePreviewSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pmediasink: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCapturePreviewSink_Impl::SetCustomSink(this, core::mem::transmute_copy(&pmediasink)).into()
}
}
Self {
base__: IMFCaptureSink_Vtbl::new::<Identity, OFFSET>(),
SetRenderHandle: SetRenderHandle::<Identity, OFFSET>,
SetRenderSurface: SetRenderSurface::<Identity, OFFSET>,
UpdateVideo: UpdateVideo::<Identity, OFFSET>,
SetSampleCallback: SetSampleCallback::<Identity, OFFSET>,
GetMirrorState: GetMirrorState::<Identity, OFFSET>,
SetMirrorState: SetMirrorState::<Identity, OFFSET>,
GetRotation: GetRotation::<Identity, OFFSET>,
SetRotation: SetRotation::<Identity, OFFSET>,
SetCustomSink: SetCustomSink::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFCapturePreviewSink as windows_core::Interface>::IID || iid == &<IMFCaptureSink as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFCapturePreviewSink {}
windows_core::imp::define_interface!(IMFCaptureRecordSink, IMFCaptureRecordSink_Vtbl, 0x3323b55a_f92a_4fe2_8edc_e9bfc0634d77);
impl core::ops::Deref for IMFCaptureRecordSink {
type Target = IMFCaptureSink;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFCaptureRecordSink, windows_core::IUnknown, IMFCaptureSink);
impl IMFCaptureRecordSink {
pub unsafe fn SetOutputByteStream<P0>(&self, pbytestream: P0, guidcontainertype: *const windows_core::GUID) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFByteStream>,
{
unsafe { (windows_core::Interface::vtable(self).SetOutputByteStream)(windows_core::Interface::as_raw(self), pbytestream.param().abi(), guidcontainertype).ok() }
}
pub unsafe fn SetOutputFileName<P0>(&self, filename: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).SetOutputFileName)(windows_core::Interface::as_raw(self), filename.param().abi()).ok() }
}
pub unsafe fn SetSampleCallback<P1>(&self, dwstreamsinkindex: u32, pcallback: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFCaptureEngineOnSampleCallback>,
{
unsafe { (windows_core::Interface::vtable(self).SetSampleCallback)(windows_core::Interface::as_raw(self), dwstreamsinkindex, pcallback.param().abi()).ok() }
}
pub unsafe fn SetCustomSink<P0>(&self, pmediasink: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaSink>,
{
unsafe { (windows_core::Interface::vtable(self).SetCustomSink)(windows_core::Interface::as_raw(self), pmediasink.param().abi()).ok() }
}
pub unsafe fn GetRotation(&self, dwstreamindex: u32) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetRotation)(windows_core::Interface::as_raw(self), dwstreamindex, &mut result__).map(|| result__)
}
}
pub unsafe fn SetRotation(&self, dwstreamindex: u32, dwrotationvalue: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetRotation)(windows_core::Interface::as_raw(self), dwstreamindex, dwrotationvalue).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFCaptureRecordSink_Vtbl {
pub base__: IMFCaptureSink_Vtbl,
pub SetOutputByteStream: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const windows_core::GUID) -> windows_core::HRESULT,
pub SetOutputFileName: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR) -> windows_core::HRESULT,
pub SetSampleCallback: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetCustomSink: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetRotation: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u32) -> windows_core::HRESULT,
pub SetRotation: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32) -> windows_core::HRESULT,
}
pub trait IMFCaptureRecordSink_Impl: IMFCaptureSink_Impl {
fn SetOutputByteStream(&self, pbytestream: windows_core::Ref<IMFByteStream>, guidcontainertype: *const windows_core::GUID) -> windows_core::Result<()>;
fn SetOutputFileName(&self, filename: &windows_core::PCWSTR) -> windows_core::Result<()>;
fn SetSampleCallback(&self, dwstreamsinkindex: u32, pcallback: windows_core::Ref<IMFCaptureEngineOnSampleCallback>) -> windows_core::Result<()>;
fn SetCustomSink(&self, pmediasink: windows_core::Ref<IMFMediaSink>) -> windows_core::Result<()>;
fn GetRotation(&self, dwstreamindex: u32) -> windows_core::Result<u32>;
fn SetRotation(&self, dwstreamindex: u32, dwrotationvalue: u32) -> windows_core::Result<()>;
}
impl IMFCaptureRecordSink_Vtbl {
pub const fn new<Identity: IMFCaptureRecordSink_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetOutputByteStream<Identity: IMFCaptureRecordSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbytestream: *mut core::ffi::c_void, guidcontainertype: *const windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureRecordSink_Impl::SetOutputByteStream(this, core::mem::transmute_copy(&pbytestream), core::mem::transmute_copy(&guidcontainertype)).into()
}
}
unsafe extern "system" fn SetOutputFileName<Identity: IMFCaptureRecordSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, filename: windows_core::PCWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureRecordSink_Impl::SetOutputFileName(this, core::mem::transmute(&filename)).into()
}
}
unsafe extern "system" fn SetSampleCallback<Identity: IMFCaptureRecordSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamsinkindex: u32, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureRecordSink_Impl::SetSampleCallback(this, core::mem::transmute_copy(&dwstreamsinkindex), core::mem::transmute_copy(&pcallback)).into()
}
}
unsafe extern "system" fn SetCustomSink<Identity: IMFCaptureRecordSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pmediasink: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureRecordSink_Impl::SetCustomSink(this, core::mem::transmute_copy(&pmediasink)).into()
}
}
unsafe extern "system" fn GetRotation<Identity: IMFCaptureRecordSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, pdwrotationvalue: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFCaptureRecordSink_Impl::GetRotation(this, core::mem::transmute_copy(&dwstreamindex)) {
Ok(ok__) => {
pdwrotationvalue.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetRotation<Identity: IMFCaptureRecordSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, dwrotationvalue: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureRecordSink_Impl::SetRotation(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&dwrotationvalue)).into()
}
}
Self {
base__: IMFCaptureSink_Vtbl::new::<Identity, OFFSET>(),
SetOutputByteStream: SetOutputByteStream::<Identity, OFFSET>,
SetOutputFileName: SetOutputFileName::<Identity, OFFSET>,
SetSampleCallback: SetSampleCallback::<Identity, OFFSET>,
SetCustomSink: SetCustomSink::<Identity, OFFSET>,
GetRotation: GetRotation::<Identity, OFFSET>,
SetRotation: SetRotation::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFCaptureRecordSink as windows_core::Interface>::IID || iid == &<IMFCaptureSink as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFCaptureRecordSink {}
windows_core::imp::define_interface!(IMFCaptureSink, IMFCaptureSink_Vtbl, 0x72d6135b_35e9_412c_b926_fd5265f2a885);
windows_core::imp::interface_hierarchy!(IMFCaptureSink, windows_core::IUnknown);
impl IMFCaptureSink {
pub unsafe fn GetOutputMediaType(&self, dwsinkstreamindex: u32, ppmediatype: Option<*mut Option<IMFMediaType>>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetOutputMediaType)(windows_core::Interface::as_raw(self), dwsinkstreamindex, ppmediatype.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn GetService(&self, dwsinkstreamindex: u32, rguidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppunknown: Option<*mut Option<windows_core::IUnknown>>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetService)(windows_core::Interface::as_raw(self), dwsinkstreamindex, rguidservice, riid, ppunknown.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn AddStream<P1, P2>(&self, dwsourcestreamindex: u32, pmediatype: P1, pattributes: P2, pdwsinkstreamindex: Option<*mut u32>) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFMediaType>,
P2: windows_core::Param<IMFAttributes>,
{
unsafe { (windows_core::Interface::vtable(self).AddStream)(windows_core::Interface::as_raw(self), dwsourcestreamindex, pmediatype.param().abi(), pattributes.param().abi(), pdwsinkstreamindex.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn Prepare(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Prepare)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn RemoveAllStreams(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RemoveAllStreams)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFCaptureSink_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetOutputMediaType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetService: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const windows_core::GUID, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AddStream: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub Prepare: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub RemoveAllStreams: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFCaptureSink_Impl: windows_core::IUnknownImpl {
fn GetOutputMediaType(&self, dwsinkstreamindex: u32, ppmediatype: windows_core::OutRef<IMFMediaType>) -> windows_core::Result<()>;
fn GetService(&self, dwsinkstreamindex: u32, rguidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppunknown: windows_core::OutRef<windows_core::IUnknown>) -> windows_core::Result<()>;
fn AddStream(&self, dwsourcestreamindex: u32, pmediatype: windows_core::Ref<IMFMediaType>, pattributes: windows_core::Ref<IMFAttributes>, pdwsinkstreamindex: *mut u32) -> windows_core::Result<()>;
fn Prepare(&self) -> windows_core::Result<()>;
fn RemoveAllStreams(&self) -> windows_core::Result<()>;
}
impl IMFCaptureSink_Vtbl {
pub const fn new<Identity: IMFCaptureSink_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetOutputMediaType<Identity: IMFCaptureSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwsinkstreamindex: u32, ppmediatype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureSink_Impl::GetOutputMediaType(this, core::mem::transmute_copy(&dwsinkstreamindex), core::mem::transmute_copy(&ppmediatype)).into()
}
}
unsafe extern "system" fn GetService<Identity: IMFCaptureSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwsinkstreamindex: u32, rguidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppunknown: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureSink_Impl::GetService(this, core::mem::transmute_copy(&dwsinkstreamindex), core::mem::transmute_copy(&rguidservice), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppunknown)).into()
}
}
unsafe extern "system" fn AddStream<Identity: IMFCaptureSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwsourcestreamindex: u32, pmediatype: *mut core::ffi::c_void, pattributes: *mut core::ffi::c_void, pdwsinkstreamindex: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureSink_Impl::AddStream(this, core::mem::transmute_copy(&dwsourcestreamindex), core::mem::transmute_copy(&pmediatype), core::mem::transmute_copy(&pattributes), core::mem::transmute_copy(&pdwsinkstreamindex)).into()
}
}
unsafe extern "system" fn Prepare<Identity: IMFCaptureSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureSink_Impl::Prepare(this).into()
}
}
unsafe extern "system" fn RemoveAllStreams<Identity: IMFCaptureSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureSink_Impl::RemoveAllStreams(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetOutputMediaType: GetOutputMediaType::<Identity, OFFSET>,
GetService: GetService::<Identity, OFFSET>,
AddStream: AddStream::<Identity, OFFSET>,
Prepare: Prepare::<Identity, OFFSET>,
RemoveAllStreams: RemoveAllStreams::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFCaptureSink as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFCaptureSink {}
windows_core::imp::define_interface!(IMFCaptureSink2, IMFCaptureSink2_Vtbl, 0xf9e4219e_6197_4b5e_b888_bee310ab2c59);
impl core::ops::Deref for IMFCaptureSink2 {
type Target = IMFCaptureSink;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFCaptureSink2, windows_core::IUnknown, IMFCaptureSink);
impl IMFCaptureSink2 {
pub unsafe fn SetOutputMediaType<P1, P2>(&self, dwstreamindex: u32, pmediatype: P1, pencodingattributes: P2) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFMediaType>,
P2: windows_core::Param<IMFAttributes>,
{
unsafe { (windows_core::Interface::vtable(self).SetOutputMediaType)(windows_core::Interface::as_raw(self), dwstreamindex, pmediatype.param().abi(), pencodingattributes.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFCaptureSink2_Vtbl {
pub base__: IMFCaptureSink_Vtbl,
pub SetOutputMediaType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFCaptureSink2_Impl: IMFCaptureSink_Impl {
fn SetOutputMediaType(&self, dwstreamindex: u32, pmediatype: windows_core::Ref<IMFMediaType>, pencodingattributes: windows_core::Ref<IMFAttributes>) -> windows_core::Result<()>;
}
impl IMFCaptureSink2_Vtbl {
pub const fn new<Identity: IMFCaptureSink2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetOutputMediaType<Identity: IMFCaptureSink2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, pmediatype: *mut core::ffi::c_void, pencodingattributes: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureSink2_Impl::SetOutputMediaType(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&pmediatype), core::mem::transmute_copy(&pencodingattributes)).into()
}
}
Self { base__: IMFCaptureSink_Vtbl::new::<Identity, OFFSET>(), SetOutputMediaType: SetOutputMediaType::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFCaptureSink2 as windows_core::Interface>::IID || iid == &<IMFCaptureSink as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFCaptureSink2 {}
windows_core::imp::define_interface!(IMFCaptureSource, IMFCaptureSource_Vtbl, 0x439a42a8_0d2c_4505_be83_f79b2a05d5c4);
windows_core::imp::interface_hierarchy!(IMFCaptureSource, windows_core::IUnknown);
impl IMFCaptureSource {
pub unsafe fn GetCaptureDeviceSource(&self, mfcaptureenginedevicetype: MF_CAPTURE_ENGINE_DEVICE_TYPE, ppmediasource: Option<*mut Option<IMFMediaSource>>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetCaptureDeviceSource)(windows_core::Interface::as_raw(self), mfcaptureenginedevicetype, ppmediasource.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn GetCaptureDeviceActivate(&self, mfcaptureenginedevicetype: MF_CAPTURE_ENGINE_DEVICE_TYPE, ppactivate: Option<*mut Option<IMFActivate>>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetCaptureDeviceActivate)(windows_core::Interface::as_raw(self), mfcaptureenginedevicetype, ppactivate.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn GetService(&self, rguidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppunknown: Option<*mut Option<windows_core::IUnknown>>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetService)(windows_core::Interface::as_raw(self), rguidservice, riid, ppunknown.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn AddEffect<P1>(&self, dwsourcestreamindex: u32, punknown: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).AddEffect)(windows_core::Interface::as_raw(self), dwsourcestreamindex, punknown.param().abi()).ok() }
}
pub unsafe fn RemoveEffect<P1>(&self, dwsourcestreamindex: u32, punknown: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).RemoveEffect)(windows_core::Interface::as_raw(self), dwsourcestreamindex, punknown.param().abi()).ok() }
}
pub unsafe fn RemoveAllEffects(&self, dwsourcestreamindex: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RemoveAllEffects)(windows_core::Interface::as_raw(self), dwsourcestreamindex).ok() }
}
pub unsafe fn GetAvailableDeviceMediaType(&self, dwsourcestreamindex: u32, dwmediatypeindex: u32, ppmediatype: Option<*mut Option<IMFMediaType>>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetAvailableDeviceMediaType)(windows_core::Interface::as_raw(self), dwsourcestreamindex, dwmediatypeindex, ppmediatype.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn SetCurrentDeviceMediaType<P1>(&self, dwsourcestreamindex: u32, pmediatype: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFMediaType>,
{
unsafe { (windows_core::Interface::vtable(self).SetCurrentDeviceMediaType)(windows_core::Interface::as_raw(self), dwsourcestreamindex, pmediatype.param().abi()).ok() }
}
pub unsafe fn GetCurrentDeviceMediaType(&self, dwsourcestreamindex: u32) -> windows_core::Result<IMFMediaType> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetCurrentDeviceMediaType)(windows_core::Interface::as_raw(self), dwsourcestreamindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetDeviceStreamCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDeviceStreamCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetDeviceStreamCategory(&self, dwsourcestreamindex: u32) -> windows_core::Result<MF_CAPTURE_ENGINE_STREAM_CATEGORY> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDeviceStreamCategory)(windows_core::Interface::as_raw(self), dwsourcestreamindex, &mut result__).map(|| result__)
}
}
pub unsafe fn GetMirrorState(&self, dwstreamindex: u32) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMirrorState)(windows_core::Interface::as_raw(self), dwstreamindex, &mut result__).map(|| result__)
}
}
pub unsafe fn SetMirrorState(&self, dwstreamindex: u32, fmirrorstate: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetMirrorState)(windows_core::Interface::as_raw(self), dwstreamindex, fmirrorstate.into()).ok() }
}
pub unsafe fn GetStreamIndexFromFriendlyName(&self, uifriendlyname: u32) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamIndexFromFriendlyName)(windows_core::Interface::as_raw(self), uifriendlyname, &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFCaptureSource_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetCaptureDeviceSource: unsafe extern "system" fn(*mut core::ffi::c_void, MF_CAPTURE_ENGINE_DEVICE_TYPE, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetCaptureDeviceActivate: unsafe extern "system" fn(*mut core::ffi::c_void, MF_CAPTURE_ENGINE_DEVICE_TYPE, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetService: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AddEffect: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RemoveEffect: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RemoveAllEffects: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub GetAvailableDeviceMediaType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetCurrentDeviceMediaType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetCurrentDeviceMediaType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDeviceStreamCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetDeviceStreamCategory: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut MF_CAPTURE_ENGINE_STREAM_CATEGORY) -> windows_core::HRESULT,
pub GetMirrorState: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub SetMirrorState: unsafe extern "system" fn(*mut core::ffi::c_void, u32, windows_core::BOOL) -> windows_core::HRESULT,
pub GetStreamIndexFromFriendlyName: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u32) -> windows_core::HRESULT,
}
pub trait IMFCaptureSource_Impl: windows_core::IUnknownImpl {
fn GetCaptureDeviceSource(&self, mfcaptureenginedevicetype: MF_CAPTURE_ENGINE_DEVICE_TYPE, ppmediasource: windows_core::OutRef<IMFMediaSource>) -> windows_core::Result<()>;
fn GetCaptureDeviceActivate(&self, mfcaptureenginedevicetype: MF_CAPTURE_ENGINE_DEVICE_TYPE, ppactivate: windows_core::OutRef<IMFActivate>) -> windows_core::Result<()>;
fn GetService(&self, rguidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppunknown: windows_core::OutRef<windows_core::IUnknown>) -> windows_core::Result<()>;
fn AddEffect(&self, dwsourcestreamindex: u32, punknown: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn RemoveEffect(&self, dwsourcestreamindex: u32, punknown: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn RemoveAllEffects(&self, dwsourcestreamindex: u32) -> windows_core::Result<()>;
fn GetAvailableDeviceMediaType(&self, dwsourcestreamindex: u32, dwmediatypeindex: u32, ppmediatype: windows_core::OutRef<IMFMediaType>) -> windows_core::Result<()>;
fn SetCurrentDeviceMediaType(&self, dwsourcestreamindex: u32, pmediatype: windows_core::Ref<IMFMediaType>) -> windows_core::Result<()>;
fn GetCurrentDeviceMediaType(&self, dwsourcestreamindex: u32) -> windows_core::Result<IMFMediaType>;
fn GetDeviceStreamCount(&self) -> windows_core::Result<u32>;
fn GetDeviceStreamCategory(&self, dwsourcestreamindex: u32) -> windows_core::Result<MF_CAPTURE_ENGINE_STREAM_CATEGORY>;
fn GetMirrorState(&self, dwstreamindex: u32) -> windows_core::Result<windows_core::BOOL>;
fn SetMirrorState(&self, dwstreamindex: u32, fmirrorstate: windows_core::BOOL) -> windows_core::Result<()>;
fn GetStreamIndexFromFriendlyName(&self, uifriendlyname: u32) -> windows_core::Result<u32>;
}
impl IMFCaptureSource_Vtbl {
pub const fn new<Identity: IMFCaptureSource_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetCaptureDeviceSource<Identity: IMFCaptureSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, mfcaptureenginedevicetype: MF_CAPTURE_ENGINE_DEVICE_TYPE, ppmediasource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureSource_Impl::GetCaptureDeviceSource(this, core::mem::transmute_copy(&mfcaptureenginedevicetype), core::mem::transmute_copy(&ppmediasource)).into()
}
}
unsafe extern "system" fn GetCaptureDeviceActivate<Identity: IMFCaptureSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, mfcaptureenginedevicetype: MF_CAPTURE_ENGINE_DEVICE_TYPE, ppactivate: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureSource_Impl::GetCaptureDeviceActivate(this, core::mem::transmute_copy(&mfcaptureenginedevicetype), core::mem::transmute_copy(&ppactivate)).into()
}
}
unsafe extern "system" fn GetService<Identity: IMFCaptureSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, rguidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppunknown: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureSource_Impl::GetService(this, core::mem::transmute_copy(&rguidservice), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppunknown)).into()
}
}
unsafe extern "system" fn AddEffect<Identity: IMFCaptureSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwsourcestreamindex: u32, punknown: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureSource_Impl::AddEffect(this, core::mem::transmute_copy(&dwsourcestreamindex), core::mem::transmute_copy(&punknown)).into()
}
}
unsafe extern "system" fn RemoveEffect<Identity: IMFCaptureSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwsourcestreamindex: u32, punknown: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureSource_Impl::RemoveEffect(this, core::mem::transmute_copy(&dwsourcestreamindex), core::mem::transmute_copy(&punknown)).into()
}
}
unsafe extern "system" fn RemoveAllEffects<Identity: IMFCaptureSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwsourcestreamindex: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureSource_Impl::RemoveAllEffects(this, core::mem::transmute_copy(&dwsourcestreamindex)).into()
}
}
unsafe extern "system" fn GetAvailableDeviceMediaType<Identity: IMFCaptureSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwsourcestreamindex: u32, dwmediatypeindex: u32, ppmediatype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureSource_Impl::GetAvailableDeviceMediaType(this, core::mem::transmute_copy(&dwsourcestreamindex), core::mem::transmute_copy(&dwmediatypeindex), core::mem::transmute_copy(&ppmediatype)).into()
}
}
unsafe extern "system" fn SetCurrentDeviceMediaType<Identity: IMFCaptureSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwsourcestreamindex: u32, pmediatype: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureSource_Impl::SetCurrentDeviceMediaType(this, core::mem::transmute_copy(&dwsourcestreamindex), core::mem::transmute_copy(&pmediatype)).into()
}
}
unsafe extern "system" fn GetCurrentDeviceMediaType<Identity: IMFCaptureSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwsourcestreamindex: u32, ppmediatype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFCaptureSource_Impl::GetCurrentDeviceMediaType(this, core::mem::transmute_copy(&dwsourcestreamindex)) {
Ok(ok__) => {
ppmediatype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetDeviceStreamCount<Identity: IMFCaptureSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwstreamcount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFCaptureSource_Impl::GetDeviceStreamCount(this) {
Ok(ok__) => {
pdwstreamcount.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetDeviceStreamCategory<Identity: IMFCaptureSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwsourcestreamindex: u32, pstreamcategory: *mut MF_CAPTURE_ENGINE_STREAM_CATEGORY) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFCaptureSource_Impl::GetDeviceStreamCategory(this, core::mem::transmute_copy(&dwsourcestreamindex)) {
Ok(ok__) => {
pstreamcategory.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetMirrorState<Identity: IMFCaptureSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, pfmirrorstate: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFCaptureSource_Impl::GetMirrorState(this, core::mem::transmute_copy(&dwstreamindex)) {
Ok(ok__) => {
pfmirrorstate.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetMirrorState<Identity: IMFCaptureSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, fmirrorstate: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCaptureSource_Impl::SetMirrorState(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&fmirrorstate)).into()
}
}
unsafe extern "system" fn GetStreamIndexFromFriendlyName<Identity: IMFCaptureSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, uifriendlyname: u32, pdwactualstreamindex: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFCaptureSource_Impl::GetStreamIndexFromFriendlyName(this, core::mem::transmute_copy(&uifriendlyname)) {
Ok(ok__) => {
pdwactualstreamindex.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetCaptureDeviceSource: GetCaptureDeviceSource::<Identity, OFFSET>,
GetCaptureDeviceActivate: GetCaptureDeviceActivate::<Identity, OFFSET>,
GetService: GetService::<Identity, OFFSET>,
AddEffect: AddEffect::<Identity, OFFSET>,
RemoveEffect: RemoveEffect::<Identity, OFFSET>,
RemoveAllEffects: RemoveAllEffects::<Identity, OFFSET>,
GetAvailableDeviceMediaType: GetAvailableDeviceMediaType::<Identity, OFFSET>,
SetCurrentDeviceMediaType: SetCurrentDeviceMediaType::<Identity, OFFSET>,
GetCurrentDeviceMediaType: GetCurrentDeviceMediaType::<Identity, OFFSET>,
GetDeviceStreamCount: GetDeviceStreamCount::<Identity, OFFSET>,
GetDeviceStreamCategory: GetDeviceStreamCategory::<Identity, OFFSET>,
GetMirrorState: GetMirrorState::<Identity, OFFSET>,
SetMirrorState: SetMirrorState::<Identity, OFFSET>,
GetStreamIndexFromFriendlyName: GetStreamIndexFromFriendlyName::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFCaptureSource as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFCaptureSource {}
windows_core::imp::define_interface!(IMFCdmSuspendNotify, IMFCdmSuspendNotify_Vtbl, 0x7a5645d2_43bd_47fd_87b7_dcd24cc7d692);
windows_core::imp::interface_hierarchy!(IMFCdmSuspendNotify, windows_core::IUnknown);
impl IMFCdmSuspendNotify {
pub unsafe fn Begin(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Begin)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn End(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).End)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFCdmSuspendNotify_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub Begin: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub End: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFCdmSuspendNotify_Impl: windows_core::IUnknownImpl {
fn Begin(&self) -> windows_core::Result<()>;
fn End(&self) -> windows_core::Result<()>;
}
impl IMFCdmSuspendNotify_Vtbl {
pub const fn new<Identity: IMFCdmSuspendNotify_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Begin<Identity: IMFCdmSuspendNotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCdmSuspendNotify_Impl::Begin(this).into()
}
}
unsafe extern "system" fn End<Identity: IMFCdmSuspendNotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCdmSuspendNotify_Impl::End(this).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), Begin: Begin::<Identity, OFFSET>, End: End::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFCdmSuspendNotify as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFCdmSuspendNotify {}
windows_core::imp::define_interface!(IMFClock, IMFClock_Vtbl, 0x2eb1e945_18b8_4139_9b1a_d5d584818530);
windows_core::imp::interface_hierarchy!(IMFClock, windows_core::IUnknown);
impl IMFClock {
pub unsafe fn GetClockCharacteristics(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetClockCharacteristics)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetCorrelatedTime(&self, dwreserved: u32, pllclocktime: *mut i64, phnssystemtime: *mut i64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetCorrelatedTime)(windows_core::Interface::as_raw(self), dwreserved, pllclocktime as _, phnssystemtime as _).ok() }
}
pub unsafe fn GetContinuityKey(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetContinuityKey)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetState(&self, dwreserved: u32) -> windows_core::Result<MFCLOCK_STATE> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetState)(windows_core::Interface::as_raw(self), dwreserved, &mut result__).map(|| result__)
}
}
pub unsafe fn GetProperties(&self, pclockproperties: *mut MFCLOCK_PROPERTIES) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), pclockproperties as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFClock_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetClockCharacteristics: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetCorrelatedTime: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut i64, *mut i64) -> windows_core::HRESULT,
pub GetContinuityKey: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetState: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut MFCLOCK_STATE) -> windows_core::HRESULT,
pub GetProperties: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MFCLOCK_PROPERTIES) -> windows_core::HRESULT,
}
pub trait IMFClock_Impl: windows_core::IUnknownImpl {
fn GetClockCharacteristics(&self) -> windows_core::Result<u32>;
fn GetCorrelatedTime(&self, dwreserved: u32, pllclocktime: *mut i64, phnssystemtime: *mut i64) -> windows_core::Result<()>;
fn GetContinuityKey(&self) -> windows_core::Result<u32>;
fn GetState(&self, dwreserved: u32) -> windows_core::Result<MFCLOCK_STATE>;
fn GetProperties(&self, pclockproperties: *mut MFCLOCK_PROPERTIES) -> windows_core::Result<()>;
}
impl IMFClock_Vtbl {
pub const fn new<Identity: IMFClock_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetClockCharacteristics<Identity: IMFClock_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwcharacteristics: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFClock_Impl::GetClockCharacteristics(this) {
Ok(ok__) => {
pdwcharacteristics.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetCorrelatedTime<Identity: IMFClock_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwreserved: u32, pllclocktime: *mut i64, phnssystemtime: *mut i64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFClock_Impl::GetCorrelatedTime(this, core::mem::transmute_copy(&dwreserved), core::mem::transmute_copy(&pllclocktime), core::mem::transmute_copy(&phnssystemtime)).into()
}
}
unsafe extern "system" fn GetContinuityKey<Identity: IMFClock_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwcontinuitykey: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFClock_Impl::GetContinuityKey(this) {
Ok(ok__) => {
pdwcontinuitykey.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetState<Identity: IMFClock_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwreserved: u32, peclockstate: *mut MFCLOCK_STATE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFClock_Impl::GetState(this, core::mem::transmute_copy(&dwreserved)) {
Ok(ok__) => {
peclockstate.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetProperties<Identity: IMFClock_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pclockproperties: *mut MFCLOCK_PROPERTIES) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFClock_Impl::GetProperties(this, core::mem::transmute_copy(&pclockproperties)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetClockCharacteristics: GetClockCharacteristics::<Identity, OFFSET>,
GetCorrelatedTime: GetCorrelatedTime::<Identity, OFFSET>,
GetContinuityKey: GetContinuityKey::<Identity, OFFSET>,
GetState: GetState::<Identity, OFFSET>,
GetProperties: GetProperties::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFClock as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFClock {}
windows_core::imp::define_interface!(IMFClockConsumer, IMFClockConsumer_Vtbl, 0x6ef2a662_47c0_4666_b13d_cbb717f2fa2c);
windows_core::imp::interface_hierarchy!(IMFClockConsumer, windows_core::IUnknown);
impl IMFClockConsumer {
pub unsafe fn SetPresentationClock<P0>(&self, ppresentationclock: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFPresentationClock>,
{
unsafe { (windows_core::Interface::vtable(self).SetPresentationClock)(windows_core::Interface::as_raw(self), ppresentationclock.param().abi()).ok() }
}
pub unsafe fn GetPresentationClock(&self) -> windows_core::Result<IMFPresentationClock> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetPresentationClock)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFClockConsumer_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetPresentationClock: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetPresentationClock: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFClockConsumer_Impl: windows_core::IUnknownImpl {
fn SetPresentationClock(&self, ppresentationclock: windows_core::Ref<IMFPresentationClock>) -> windows_core::Result<()>;
fn GetPresentationClock(&self) -> windows_core::Result<IMFPresentationClock>;
}
impl IMFClockConsumer_Vtbl {
pub const fn new<Identity: IMFClockConsumer_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetPresentationClock<Identity: IMFClockConsumer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppresentationclock: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFClockConsumer_Impl::SetPresentationClock(this, core::mem::transmute_copy(&ppresentationclock)).into()
}
}
unsafe extern "system" fn GetPresentationClock<Identity: IMFClockConsumer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pppresentationclock: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFClockConsumer_Impl::GetPresentationClock(this) {
Ok(ok__) => {
pppresentationclock.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetPresentationClock: SetPresentationClock::<Identity, OFFSET>,
GetPresentationClock: GetPresentationClock::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFClockConsumer as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFClockConsumer {}
windows_core::imp::define_interface!(IMFClockStateSink, IMFClockStateSink_Vtbl, 0xf6696e82_74f7_4f3d_a178_8a5e09c3659f);
windows_core::imp::interface_hierarchy!(IMFClockStateSink, windows_core::IUnknown);
impl IMFClockStateSink {
pub unsafe fn OnClockStart(&self, hnssystemtime: i64, llclockstartoffset: i64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).OnClockStart)(windows_core::Interface::as_raw(self), hnssystemtime, llclockstartoffset).ok() }
}
pub unsafe fn OnClockStop(&self, hnssystemtime: i64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).OnClockStop)(windows_core::Interface::as_raw(self), hnssystemtime).ok() }
}
pub unsafe fn OnClockPause(&self, hnssystemtime: i64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).OnClockPause)(windows_core::Interface::as_raw(self), hnssystemtime).ok() }
}
pub unsafe fn OnClockRestart(&self, hnssystemtime: i64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).OnClockRestart)(windows_core::Interface::as_raw(self), hnssystemtime).ok() }
}
pub unsafe fn OnClockSetRate(&self, hnssystemtime: i64, flrate: f32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).OnClockSetRate)(windows_core::Interface::as_raw(self), hnssystemtime, flrate).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFClockStateSink_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub OnClockStart: unsafe extern "system" fn(*mut core::ffi::c_void, i64, i64) -> windows_core::HRESULT,
pub OnClockStop: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub OnClockPause: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub OnClockRestart: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub OnClockSetRate: unsafe extern "system" fn(*mut core::ffi::c_void, i64, f32) -> windows_core::HRESULT,
}
pub trait IMFClockStateSink_Impl: windows_core::IUnknownImpl {
fn OnClockStart(&self, hnssystemtime: i64, llclockstartoffset: i64) -> windows_core::Result<()>;
fn OnClockStop(&self, hnssystemtime: i64) -> windows_core::Result<()>;
fn OnClockPause(&self, hnssystemtime: i64) -> windows_core::Result<()>;
fn OnClockRestart(&self, hnssystemtime: i64) -> windows_core::Result<()>;
fn OnClockSetRate(&self, hnssystemtime: i64, flrate: f32) -> windows_core::Result<()>;
}
impl IMFClockStateSink_Vtbl {
pub const fn new<Identity: IMFClockStateSink_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn OnClockStart<Identity: IMFClockStateSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hnssystemtime: i64, llclockstartoffset: i64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFClockStateSink_Impl::OnClockStart(this, core::mem::transmute_copy(&hnssystemtime), core::mem::transmute_copy(&llclockstartoffset)).into()
}
}
unsafe extern "system" fn OnClockStop<Identity: IMFClockStateSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hnssystemtime: i64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFClockStateSink_Impl::OnClockStop(this, core::mem::transmute_copy(&hnssystemtime)).into()
}
}
unsafe extern "system" fn OnClockPause<Identity: IMFClockStateSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hnssystemtime: i64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFClockStateSink_Impl::OnClockPause(this, core::mem::transmute_copy(&hnssystemtime)).into()
}
}
unsafe extern "system" fn OnClockRestart<Identity: IMFClockStateSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hnssystemtime: i64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFClockStateSink_Impl::OnClockRestart(this, core::mem::transmute_copy(&hnssystemtime)).into()
}
}
unsafe extern "system" fn OnClockSetRate<Identity: IMFClockStateSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hnssystemtime: i64, flrate: f32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFClockStateSink_Impl::OnClockSetRate(this, core::mem::transmute_copy(&hnssystemtime), core::mem::transmute_copy(&flrate)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
OnClockStart: OnClockStart::<Identity, OFFSET>,
OnClockStop: OnClockStop::<Identity, OFFSET>,
OnClockPause: OnClockPause::<Identity, OFFSET>,
OnClockRestart: OnClockRestart::<Identity, OFFSET>,
OnClockSetRate: OnClockSetRate::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFClockStateSink as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFClockStateSink {}
windows_core::imp::define_interface!(IMFCollection, IMFCollection_Vtbl, 0x5bc8a76b_869a_46a3_9b03_fa218a66aebe);
windows_core::imp::interface_hierarchy!(IMFCollection, windows_core::IUnknown);
impl IMFCollection {
pub unsafe fn GetElementCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetElementCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetElement(&self, dwelementindex: u32) -> windows_core::Result<windows_core::IUnknown> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetElement)(windows_core::Interface::as_raw(self), dwelementindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn AddElement<P0>(&self, punkelement: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).AddElement)(windows_core::Interface::as_raw(self), punkelement.param().abi()).ok() }
}
pub unsafe fn RemoveElement(&self, dwelementindex: u32) -> windows_core::Result<windows_core::IUnknown> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).RemoveElement)(windows_core::Interface::as_raw(self), dwelementindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn InsertElementAt<P1>(&self, dwindex: u32, punknown: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).InsertElementAt)(windows_core::Interface::as_raw(self), dwindex, punknown.param().abi()).ok() }
}
pub unsafe fn RemoveAllElements(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RemoveAllElements)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFCollection_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetElementCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetElement: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AddElement: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RemoveElement: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub InsertElementAt: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RemoveAllElements: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFCollection_Impl: windows_core::IUnknownImpl {
fn GetElementCount(&self) -> windows_core::Result<u32>;
fn GetElement(&self, dwelementindex: u32) -> windows_core::Result<windows_core::IUnknown>;
fn AddElement(&self, punkelement: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn RemoveElement(&self, dwelementindex: u32) -> windows_core::Result<windows_core::IUnknown>;
fn InsertElementAt(&self, dwindex: u32, punknown: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn RemoveAllElements(&self) -> windows_core::Result<()>;
}
impl IMFCollection_Vtbl {
pub const fn new<Identity: IMFCollection_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetElementCount<Identity: IMFCollection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcelements: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFCollection_Impl::GetElementCount(this) {
Ok(ok__) => {
pcelements.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetElement<Identity: IMFCollection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwelementindex: u32, ppunkelement: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFCollection_Impl::GetElement(this, core::mem::transmute_copy(&dwelementindex)) {
Ok(ok__) => {
ppunkelement.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn AddElement<Identity: IMFCollection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, punkelement: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCollection_Impl::AddElement(this, core::mem::transmute_copy(&punkelement)).into()
}
}
unsafe extern "system" fn RemoveElement<Identity: IMFCollection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwelementindex: u32, ppunkelement: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFCollection_Impl::RemoveElement(this, core::mem::transmute_copy(&dwelementindex)) {
Ok(ok__) => {
ppunkelement.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn InsertElementAt<Identity: IMFCollection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwindex: u32, punknown: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCollection_Impl::InsertElementAt(this, core::mem::transmute_copy(&dwindex), core::mem::transmute_copy(&punknown)).into()
}
}
unsafe extern "system" fn RemoveAllElements<Identity: IMFCollection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFCollection_Impl::RemoveAllElements(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetElementCount: GetElementCount::<Identity, OFFSET>,
GetElement: GetElement::<Identity, OFFSET>,
AddElement: AddElement::<Identity, OFFSET>,
RemoveElement: RemoveElement::<Identity, OFFSET>,
InsertElementAt: InsertElementAt::<Identity, OFFSET>,
RemoveAllElements: RemoveAllElements::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFCollection as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFCollection {}
windows_core::imp::define_interface!(IMFContentDecryptionModule, IMFContentDecryptionModule_Vtbl, 0x87be986c_10be_4943_bf48_4b54ce1983a2);
windows_core::imp::interface_hierarchy!(IMFContentDecryptionModule, windows_core::IUnknown);
impl IMFContentDecryptionModule {
pub unsafe fn SetContentEnabler<P0, P1>(&self, contentenabler: P0, result: P1) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFContentEnabler>,
P1: windows_core::Param<IMFAsyncResult>,
{
unsafe { (windows_core::Interface::vtable(self).SetContentEnabler)(windows_core::Interface::as_raw(self), contentenabler.param().abi(), result.param().abi()).ok() }
}
pub unsafe fn GetSuspendNotify(&self) -> windows_core::Result<IMFCdmSuspendNotify> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetSuspendNotify)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn SetPMPHostApp<P0>(&self, pmphostapp: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFPMPHostApp>,
{
unsafe { (windows_core::Interface::vtable(self).SetPMPHostApp)(windows_core::Interface::as_raw(self), pmphostapp.param().abi()).ok() }
}
pub unsafe fn CreateSession<P1>(&self, sessiontype: MF_MEDIAKEYSESSION_TYPE, callbacks: P1) -> windows_core::Result<IMFContentDecryptionModuleSession>
where
P1: windows_core::Param<IMFContentDecryptionModuleSessionCallbacks>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateSession)(windows_core::Interface::as_raw(self), sessiontype, callbacks.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn SetServerCertificate(&self, certificate: &[u8]) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetServerCertificate)(windows_core::Interface::as_raw(self), core::mem::transmute(certificate.as_ptr()), certificate.len().try_into().unwrap()).ok() }
}
pub unsafe fn CreateTrustedInput(&self, contentinitdata: &[u8]) -> windows_core::Result<IMFTrustedInput> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateTrustedInput)(windows_core::Interface::as_raw(self), core::mem::transmute(contentinitdata.as_ptr()), contentinitdata.len().try_into().unwrap(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetProtectionSystemIds(&self, systemids: *mut *mut windows_core::GUID, count: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetProtectionSystemIds)(windows_core::Interface::as_raw(self), systemids as _, count as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFContentDecryptionModule_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetContentEnabler: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetSuspendNotify: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetPMPHostApp: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CreateSession: unsafe extern "system" fn(*mut core::ffi::c_void, MF_MEDIAKEYSESSION_TYPE, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetServerCertificate: unsafe extern "system" fn(*mut core::ffi::c_void, *const u8, u32) -> windows_core::HRESULT,
pub CreateTrustedInput: unsafe extern "system" fn(*mut core::ffi::c_void, *const u8, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetProtectionSystemIds: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut windows_core::GUID, *mut u32) -> windows_core::HRESULT,
}
pub trait IMFContentDecryptionModule_Impl: windows_core::IUnknownImpl {
fn SetContentEnabler(&self, contentenabler: windows_core::Ref<IMFContentEnabler>, result: windows_core::Ref<IMFAsyncResult>) -> windows_core::Result<()>;
fn GetSuspendNotify(&self) -> windows_core::Result<IMFCdmSuspendNotify>;
fn SetPMPHostApp(&self, pmphostapp: windows_core::Ref<IMFPMPHostApp>) -> windows_core::Result<()>;
fn CreateSession(&self, sessiontype: MF_MEDIAKEYSESSION_TYPE, callbacks: windows_core::Ref<IMFContentDecryptionModuleSessionCallbacks>) -> windows_core::Result<IMFContentDecryptionModuleSession>;
fn SetServerCertificate(&self, certificate: *const u8, certificatesize: u32) -> windows_core::Result<()>;
fn CreateTrustedInput(&self, contentinitdata: *const u8, contentinitdatasize: u32) -> windows_core::Result<IMFTrustedInput>;
fn GetProtectionSystemIds(&self, systemids: *mut *mut windows_core::GUID, count: *mut u32) -> windows_core::Result<()>;
}
impl IMFContentDecryptionModule_Vtbl {
pub const fn new<Identity: IMFContentDecryptionModule_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetContentEnabler<Identity: IMFContentDecryptionModule_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, contentenabler: *mut core::ffi::c_void, result: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFContentDecryptionModule_Impl::SetContentEnabler(this, core::mem::transmute_copy(&contentenabler), core::mem::transmute_copy(&result)).into()
}
}
unsafe extern "system" fn GetSuspendNotify<Identity: IMFContentDecryptionModule_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, notify: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFContentDecryptionModule_Impl::GetSuspendNotify(this) {
Ok(ok__) => {
notify.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetPMPHostApp<Identity: IMFContentDecryptionModule_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pmphostapp: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFContentDecryptionModule_Impl::SetPMPHostApp(this, core::mem::transmute_copy(&pmphostapp)).into()
}
}
unsafe extern "system" fn CreateSession<Identity: IMFContentDecryptionModule_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, sessiontype: MF_MEDIAKEYSESSION_TYPE, callbacks: *mut core::ffi::c_void, session: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFContentDecryptionModule_Impl::CreateSession(this, core::mem::transmute_copy(&sessiontype), core::mem::transmute_copy(&callbacks)) {
Ok(ok__) => {
session.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetServerCertificate<Identity: IMFContentDecryptionModule_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, certificate: *const u8, certificatesize: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFContentDecryptionModule_Impl::SetServerCertificate(this, core::mem::transmute_copy(&certificate), core::mem::transmute_copy(&certificatesize)).into()
}
}
unsafe extern "system" fn CreateTrustedInput<Identity: IMFContentDecryptionModule_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, contentinitdata: *const u8, contentinitdatasize: u32, trustedinput: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFContentDecryptionModule_Impl::CreateTrustedInput(this, core::mem::transmute_copy(&contentinitdata), core::mem::transmute_copy(&contentinitdatasize)) {
Ok(ok__) => {
trustedinput.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetProtectionSystemIds<Identity: IMFContentDecryptionModule_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, systemids: *mut *mut windows_core::GUID, count: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFContentDecryptionModule_Impl::GetProtectionSystemIds(this, core::mem::transmute_copy(&systemids), core::mem::transmute_copy(&count)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetContentEnabler: SetContentEnabler::<Identity, OFFSET>,
GetSuspendNotify: GetSuspendNotify::<Identity, OFFSET>,
SetPMPHostApp: SetPMPHostApp::<Identity, OFFSET>,
CreateSession: CreateSession::<Identity, OFFSET>,
SetServerCertificate: SetServerCertificate::<Identity, OFFSET>,
CreateTrustedInput: CreateTrustedInput::<Identity, OFFSET>,
GetProtectionSystemIds: GetProtectionSystemIds::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFContentDecryptionModule as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFContentDecryptionModule {}
windows_core::imp::define_interface!(IMFContentDecryptionModuleAccess, IMFContentDecryptionModuleAccess_Vtbl, 0xa853d1f4_e2a0_4303_9edc_f1a68ee43136);
windows_core::imp::interface_hierarchy!(IMFContentDecryptionModuleAccess, windows_core::IUnknown);
impl IMFContentDecryptionModuleAccess {
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn CreateContentDecryptionModule<P0>(&self, contentdecryptionmoduleproperties: P0) -> windows_core::Result<IMFContentDecryptionModule>
where
P0: windows_core::Param<super::super::UI::Shell::PropertiesSystem::IPropertyStore>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateContentDecryptionModule)(windows_core::Interface::as_raw(self), contentdecryptionmoduleproperties.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn GetConfiguration(&self) -> windows_core::Result<super::super::UI::Shell::PropertiesSystem::IPropertyStore> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetConfiguration)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetKeySystem(&self) -> windows_core::Result<windows_core::PWSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetKeySystem)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFContentDecryptionModuleAccess_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub CreateContentDecryptionModule: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))]
CreateContentDecryptionModule: usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub GetConfiguration: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))]
GetConfiguration: usize,
pub GetKeySystem: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT,
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub trait IMFContentDecryptionModuleAccess_Impl: windows_core::IUnknownImpl {
fn CreateContentDecryptionModule(&self, contentdecryptionmoduleproperties: windows_core::Ref<super::super::UI::Shell::PropertiesSystem::IPropertyStore>) -> windows_core::Result<IMFContentDecryptionModule>;
fn GetConfiguration(&self) -> windows_core::Result<super::super::UI::Shell::PropertiesSystem::IPropertyStore>;
fn GetKeySystem(&self) -> windows_core::Result<windows_core::PWSTR>;
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl IMFContentDecryptionModuleAccess_Vtbl {
pub const fn new<Identity: IMFContentDecryptionModuleAccess_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateContentDecryptionModule<Identity: IMFContentDecryptionModuleAccess_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, contentdecryptionmoduleproperties: *mut core::ffi::c_void, contentdecryptionmodule: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFContentDecryptionModuleAccess_Impl::CreateContentDecryptionModule(this, core::mem::transmute_copy(&contentdecryptionmoduleproperties)) {
Ok(ok__) => {
contentdecryptionmodule.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetConfiguration<Identity: IMFContentDecryptionModuleAccess_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, configuration: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFContentDecryptionModuleAccess_Impl::GetConfiguration(this) {
Ok(ok__) => {
configuration.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetKeySystem<Identity: IMFContentDecryptionModuleAccess_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, keysystem: *mut windows_core::PWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFContentDecryptionModuleAccess_Impl::GetKeySystem(this) {
Ok(ok__) => {
keysystem.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CreateContentDecryptionModule: CreateContentDecryptionModule::<Identity, OFFSET>,
GetConfiguration: GetConfiguration::<Identity, OFFSET>,
GetKeySystem: GetKeySystem::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFContentDecryptionModuleAccess as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl windows_core::RuntimeName for IMFContentDecryptionModuleAccess {}
windows_core::imp::define_interface!(IMFContentDecryptionModuleFactory, IMFContentDecryptionModuleFactory_Vtbl, 0x7d5abf16_4cbb_4e08_b977_9ba59049943e);
windows_core::imp::interface_hierarchy!(IMFContentDecryptionModuleFactory, windows_core::IUnknown);
impl IMFContentDecryptionModuleFactory {
pub unsafe fn IsTypeSupported<P0, P1>(&self, keysystem: P0, contenttype: P1) -> windows_core::BOOL
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).IsTypeSupported)(windows_core::Interface::as_raw(self), keysystem.param().abi(), contenttype.param().abi()) }
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn CreateContentDecryptionModuleAccess<P0>(&self, keysystem: P0, configurations: &[Option<super::super::UI::Shell::PropertiesSystem::IPropertyStore>]) -> windows_core::Result<IMFContentDecryptionModuleAccess>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateContentDecryptionModuleAccess)(windows_core::Interface::as_raw(self), keysystem.param().abi(), core::mem::transmute(configurations.as_ptr()), configurations.len().try_into().unwrap(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFContentDecryptionModuleFactory_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub IsTypeSupported: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, windows_core::PCWSTR) -> windows_core::BOOL,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub CreateContentDecryptionModuleAccess: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *const *mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))]
CreateContentDecryptionModuleAccess: usize,
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub trait IMFContentDecryptionModuleFactory_Impl: windows_core::IUnknownImpl {
fn IsTypeSupported(&self, keysystem: &windows_core::PCWSTR, contenttype: &windows_core::PCWSTR) -> windows_core::BOOL;
fn CreateContentDecryptionModuleAccess(&self, keysystem: &windows_core::PCWSTR, configurations: *const Option<super::super::UI::Shell::PropertiesSystem::IPropertyStore>, numconfigurations: u32) -> windows_core::Result<IMFContentDecryptionModuleAccess>;
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl IMFContentDecryptionModuleFactory_Vtbl {
pub const fn new<Identity: IMFContentDecryptionModuleFactory_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn IsTypeSupported<Identity: IMFContentDecryptionModuleFactory_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, keysystem: windows_core::PCWSTR, contenttype: windows_core::PCWSTR) -> windows_core::BOOL {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFContentDecryptionModuleFactory_Impl::IsTypeSupported(this, core::mem::transmute(&keysystem), core::mem::transmute(&contenttype))
}
}
unsafe extern "system" fn CreateContentDecryptionModuleAccess<Identity: IMFContentDecryptionModuleFactory_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, keysystem: windows_core::PCWSTR, configurations: *const *mut core::ffi::c_void, numconfigurations: u32, contentdecryptionmoduleaccess: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFContentDecryptionModuleFactory_Impl::CreateContentDecryptionModuleAccess(this, core::mem::transmute(&keysystem), core::mem::transmute_copy(&configurations), core::mem::transmute_copy(&numconfigurations)) {
Ok(ok__) => {
contentdecryptionmoduleaccess.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
IsTypeSupported: IsTypeSupported::<Identity, OFFSET>,
CreateContentDecryptionModuleAccess: CreateContentDecryptionModuleAccess::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFContentDecryptionModuleFactory as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl windows_core::RuntimeName for IMFContentDecryptionModuleFactory {}
windows_core::imp::define_interface!(IMFContentDecryptionModuleSession, IMFContentDecryptionModuleSession_Vtbl, 0x4e233efd_1dd2_49e8_b577_d63eee4c0d33);
windows_core::imp::interface_hierarchy!(IMFContentDecryptionModuleSession, windows_core::IUnknown);
impl IMFContentDecryptionModuleSession {
pub unsafe fn GetSessionId(&self) -> windows_core::Result<windows_core::PWSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetSessionId)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetExpiration(&self) -> windows_core::Result<f64> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetExpiration)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetKeyStatuses(&self, keystatuses: *mut *mut MFMediaKeyStatus, numkeystatuses: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetKeyStatuses)(windows_core::Interface::as_raw(self), keystatuses as _, numkeystatuses as _).ok() }
}
pub unsafe fn Load<P0>(&self, sessionid: P0) -> windows_core::Result<windows_core::BOOL>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).Load)(windows_core::Interface::as_raw(self), sessionid.param().abi(), &mut result__).map(|| result__)
}
}
pub unsafe fn GenerateRequest<P0>(&self, initdatatype: P0, initdata: &[u8]) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).GenerateRequest)(windows_core::Interface::as_raw(self), initdatatype.param().abi(), core::mem::transmute(initdata.as_ptr()), initdata.len().try_into().unwrap()).ok() }
}
pub unsafe fn Update(&self, response: &[u8]) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Update)(windows_core::Interface::as_raw(self), core::mem::transmute(response.as_ptr()), response.len().try_into().unwrap()).ok() }
}
pub unsafe fn Close(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn Remove(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Remove)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFContentDecryptionModuleSession_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetSessionId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT,
pub GetExpiration: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub GetKeyStatuses: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut MFMediaKeyStatus, *mut u32) -> windows_core::HRESULT,
pub Load: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub GenerateRequest: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *const u8, u32) -> windows_core::HRESULT,
pub Update: unsafe extern "system" fn(*mut core::ffi::c_void, *const u8, u32) -> windows_core::HRESULT,
pub Close: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Remove: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFContentDecryptionModuleSession_Impl: windows_core::IUnknownImpl {
fn GetSessionId(&self) -> windows_core::Result<windows_core::PWSTR>;
fn GetExpiration(&self) -> windows_core::Result<f64>;
fn GetKeyStatuses(&self, keystatuses: *mut *mut MFMediaKeyStatus, numkeystatuses: *mut u32) -> windows_core::Result<()>;
fn Load(&self, sessionid: &windows_core::PCWSTR) -> windows_core::Result<windows_core::BOOL>;
fn GenerateRequest(&self, initdatatype: &windows_core::PCWSTR, initdata: *const u8, initdatasize: u32) -> windows_core::Result<()>;
fn Update(&self, response: *const u8, responsesize: u32) -> windows_core::Result<()>;
fn Close(&self) -> windows_core::Result<()>;
fn Remove(&self) -> windows_core::Result<()>;
}
impl IMFContentDecryptionModuleSession_Vtbl {
pub const fn new<Identity: IMFContentDecryptionModuleSession_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetSessionId<Identity: IMFContentDecryptionModuleSession_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, sessionid: *mut windows_core::PWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFContentDecryptionModuleSession_Impl::GetSessionId(this) {
Ok(ok__) => {
sessionid.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetExpiration<Identity: IMFContentDecryptionModuleSession_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, expiration: *mut f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFContentDecryptionModuleSession_Impl::GetExpiration(this) {
Ok(ok__) => {
expiration.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetKeyStatuses<Identity: IMFContentDecryptionModuleSession_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, keystatuses: *mut *mut MFMediaKeyStatus, numkeystatuses: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFContentDecryptionModuleSession_Impl::GetKeyStatuses(this, core::mem::transmute_copy(&keystatuses), core::mem::transmute_copy(&numkeystatuses)).into()
}
}
unsafe extern "system" fn Load<Identity: IMFContentDecryptionModuleSession_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, sessionid: windows_core::PCWSTR, loaded: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFContentDecryptionModuleSession_Impl::Load(this, core::mem::transmute(&sessionid)) {
Ok(ok__) => {
loaded.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GenerateRequest<Identity: IMFContentDecryptionModuleSession_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, initdatatype: windows_core::PCWSTR, initdata: *const u8, initdatasize: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFContentDecryptionModuleSession_Impl::GenerateRequest(this, core::mem::transmute(&initdatatype), core::mem::transmute_copy(&initdata), core::mem::transmute_copy(&initdatasize)).into()
}
}
unsafe extern "system" fn Update<Identity: IMFContentDecryptionModuleSession_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, response: *const u8, responsesize: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFContentDecryptionModuleSession_Impl::Update(this, core::mem::transmute_copy(&response), core::mem::transmute_copy(&responsesize)).into()
}
}
unsafe extern "system" fn Close<Identity: IMFContentDecryptionModuleSession_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFContentDecryptionModuleSession_Impl::Close(this).into()
}
}
unsafe extern "system" fn Remove<Identity: IMFContentDecryptionModuleSession_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFContentDecryptionModuleSession_Impl::Remove(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetSessionId: GetSessionId::<Identity, OFFSET>,
GetExpiration: GetExpiration::<Identity, OFFSET>,
GetKeyStatuses: GetKeyStatuses::<Identity, OFFSET>,
Load: Load::<Identity, OFFSET>,
GenerateRequest: GenerateRequest::<Identity, OFFSET>,
Update: Update::<Identity, OFFSET>,
Close: Close::<Identity, OFFSET>,
Remove: Remove::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFContentDecryptionModuleSession as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFContentDecryptionModuleSession {}
windows_core::imp::define_interface!(IMFContentDecryptionModuleSessionCallbacks, IMFContentDecryptionModuleSessionCallbacks_Vtbl, 0x3f96ee40_ad81_4096_8470_59a4b770f89a);
windows_core::imp::interface_hierarchy!(IMFContentDecryptionModuleSessionCallbacks, windows_core::IUnknown);
impl IMFContentDecryptionModuleSessionCallbacks {
pub unsafe fn KeyMessage<P3>(&self, messagetype: MF_MEDIAKEYSESSION_MESSAGETYPE, message: &[u8], destinationurl: P3) -> windows_core::Result<()>
where
P3: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).KeyMessage)(windows_core::Interface::as_raw(self), messagetype, core::mem::transmute(message.as_ptr()), message.len().try_into().unwrap(), destinationurl.param().abi()).ok() }
}
pub unsafe fn KeyStatusChanged(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).KeyStatusChanged)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFContentDecryptionModuleSessionCallbacks_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub KeyMessage: unsafe extern "system" fn(*mut core::ffi::c_void, MF_MEDIAKEYSESSION_MESSAGETYPE, *const u8, u32, windows_core::PCWSTR) -> windows_core::HRESULT,
pub KeyStatusChanged: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFContentDecryptionModuleSessionCallbacks_Impl: windows_core::IUnknownImpl {
fn KeyMessage(&self, messagetype: MF_MEDIAKEYSESSION_MESSAGETYPE, message: *const u8, messagesize: u32, destinationurl: &windows_core::PCWSTR) -> windows_core::Result<()>;
fn KeyStatusChanged(&self) -> windows_core::Result<()>;
}
impl IMFContentDecryptionModuleSessionCallbacks_Vtbl {
pub const fn new<Identity: IMFContentDecryptionModuleSessionCallbacks_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn KeyMessage<Identity: IMFContentDecryptionModuleSessionCallbacks_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, messagetype: MF_MEDIAKEYSESSION_MESSAGETYPE, message: *const u8, messagesize: u32, destinationurl: windows_core::PCWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFContentDecryptionModuleSessionCallbacks_Impl::KeyMessage(this, core::mem::transmute_copy(&messagetype), core::mem::transmute_copy(&message), core::mem::transmute_copy(&messagesize), core::mem::transmute(&destinationurl)).into()
}
}
unsafe extern "system" fn KeyStatusChanged<Identity: IMFContentDecryptionModuleSessionCallbacks_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFContentDecryptionModuleSessionCallbacks_Impl::KeyStatusChanged(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
KeyMessage: KeyMessage::<Identity, OFFSET>,
KeyStatusChanged: KeyStatusChanged::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFContentDecryptionModuleSessionCallbacks as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFContentDecryptionModuleSessionCallbacks {}
windows_core::imp::define_interface!(IMFContentDecryptorContext, IMFContentDecryptorContext_Vtbl, 0x7ec4b1bd_43fb_4763_85d2_64fcb5c5f4cb);
windows_core::imp::interface_hierarchy!(IMFContentDecryptorContext, windows_core::IUnknown);
impl IMFContentDecryptorContext {
pub unsafe fn InitializeHardwareKey(&self, inputprivatedata: Option<&[u8]>) -> windows_core::Result<u64> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).InitializeHardwareKey)(windows_core::Interface::as_raw(self), inputprivatedata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(inputprivatedata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFContentDecryptorContext_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub InitializeHardwareKey: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
}
pub trait IMFContentDecryptorContext_Impl: windows_core::IUnknownImpl {
fn InitializeHardwareKey(&self, inputprivatedatabytecount: u32, inputprivatedata: *const core::ffi::c_void) -> windows_core::Result<u64>;
}
impl IMFContentDecryptorContext_Vtbl {
pub const fn new<Identity: IMFContentDecryptorContext_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn InitializeHardwareKey<Identity: IMFContentDecryptorContext_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, inputprivatedatabytecount: u32, inputprivatedata: *const core::ffi::c_void, outputprivatedata: *mut u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFContentDecryptorContext_Impl::InitializeHardwareKey(this, core::mem::transmute_copy(&inputprivatedatabytecount), core::mem::transmute_copy(&inputprivatedata)) {
Ok(ok__) => {
outputprivatedata.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), InitializeHardwareKey: InitializeHardwareKey::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFContentDecryptorContext as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFContentDecryptorContext {}
windows_core::imp::define_interface!(IMFContentEnabler, IMFContentEnabler_Vtbl, 0xd3c4ef59_49ce_4381_9071_d5bcd044c770);
windows_core::imp::interface_hierarchy!(IMFContentEnabler, windows_core::IUnknown);
impl IMFContentEnabler {
pub unsafe fn GetEnableType(&self) -> windows_core::Result<windows_core::GUID> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetEnableType)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetEnableURL(&self, ppwszurl: *mut windows_core::PWSTR, pcchurl: *mut u32, ptruststatus: *mut MF_URL_TRUST_STATUS) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetEnableURL)(windows_core::Interface::as_raw(self), ppwszurl as _, pcchurl as _, ptruststatus as _).ok() }
}
pub unsafe fn GetEnableData(&self, ppbdata: *mut *mut u8, pcbdata: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetEnableData)(windows_core::Interface::as_raw(self), ppbdata as _, pcbdata as _).ok() }
}
pub unsafe fn IsAutomaticSupported(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).IsAutomaticSupported)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn AutomaticEnable(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).AutomaticEnable)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn MonitorEnable(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).MonitorEnable)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn Cancel(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Cancel)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFContentEnabler_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetEnableType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT,
pub GetEnableURL: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR, *mut u32, *mut MF_URL_TRUST_STATUS) -> windows_core::HRESULT,
pub GetEnableData: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut u8, *mut u32) -> windows_core::HRESULT,
pub IsAutomaticSupported: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub AutomaticEnable: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub MonitorEnable: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Cancel: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFContentEnabler_Impl: windows_core::IUnknownImpl {
fn GetEnableType(&self) -> windows_core::Result<windows_core::GUID>;
fn GetEnableURL(&self, ppwszurl: *mut windows_core::PWSTR, pcchurl: *mut u32, ptruststatus: *mut MF_URL_TRUST_STATUS) -> windows_core::Result<()>;
fn GetEnableData(&self, ppbdata: *mut *mut u8, pcbdata: *mut u32) -> windows_core::Result<()>;
fn IsAutomaticSupported(&self) -> windows_core::Result<windows_core::BOOL>;
fn AutomaticEnable(&self) -> windows_core::Result<()>;
fn MonitorEnable(&self) -> windows_core::Result<()>;
fn Cancel(&self) -> windows_core::Result<()>;
}
impl IMFContentEnabler_Vtbl {
pub const fn new<Identity: IMFContentEnabler_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetEnableType<Identity: IMFContentEnabler_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ptype: *mut windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFContentEnabler_Impl::GetEnableType(this) {
Ok(ok__) => {
ptype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetEnableURL<Identity: IMFContentEnabler_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppwszurl: *mut windows_core::PWSTR, pcchurl: *mut u32, ptruststatus: *mut MF_URL_TRUST_STATUS) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFContentEnabler_Impl::GetEnableURL(this, core::mem::transmute_copy(&ppwszurl), core::mem::transmute_copy(&pcchurl), core::mem::transmute_copy(&ptruststatus)).into()
}
}
unsafe extern "system" fn GetEnableData<Identity: IMFContentEnabler_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppbdata: *mut *mut u8, pcbdata: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFContentEnabler_Impl::GetEnableData(this, core::mem::transmute_copy(&ppbdata), core::mem::transmute_copy(&pcbdata)).into()
}
}
unsafe extern "system" fn IsAutomaticSupported<Identity: IMFContentEnabler_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pfautomatic: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFContentEnabler_Impl::IsAutomaticSupported(this) {
Ok(ok__) => {
pfautomatic.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn AutomaticEnable<Identity: IMFContentEnabler_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFContentEnabler_Impl::AutomaticEnable(this).into()
}
}
unsafe extern "system" fn MonitorEnable<Identity: IMFContentEnabler_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFContentEnabler_Impl::MonitorEnable(this).into()
}
}
unsafe extern "system" fn Cancel<Identity: IMFContentEnabler_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFContentEnabler_Impl::Cancel(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetEnableType: GetEnableType::<Identity, OFFSET>,
GetEnableURL: GetEnableURL::<Identity, OFFSET>,
GetEnableData: GetEnableData::<Identity, OFFSET>,
IsAutomaticSupported: IsAutomaticSupported::<Identity, OFFSET>,
AutomaticEnable: AutomaticEnable::<Identity, OFFSET>,
MonitorEnable: MonitorEnable::<Identity, OFFSET>,
Cancel: Cancel::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFContentEnabler as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFContentEnabler {}
windows_core::imp::define_interface!(IMFContentProtectionDevice, IMFContentProtectionDevice_Vtbl, 0xe6257174_a060_4c9a_a088_3b1b471cad28);
windows_core::imp::interface_hierarchy!(IMFContentProtectionDevice, windows_core::IUnknown);
impl IMFContentProtectionDevice {
pub unsafe fn InvokeFunction(&self, functionid: u32, inputbuffer: &[u8], outputbufferbytecount: *mut u32, outputbuffer: *mut u8) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).InvokeFunction)(windows_core::Interface::as_raw(self), functionid, inputbuffer.len().try_into().unwrap(), core::mem::transmute(inputbuffer.as_ptr()), outputbufferbytecount as _, outputbuffer as _).ok() }
}
pub unsafe fn GetPrivateDataByteCount(&self, privateinputbytecount: *mut u32, privateoutputbytecount: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetPrivateDataByteCount)(windows_core::Interface::as_raw(self), privateinputbytecount as _, privateoutputbytecount as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFContentProtectionDevice_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub InvokeFunction: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, *const u8, *mut u32, *mut u8) -> windows_core::HRESULT,
pub GetPrivateDataByteCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut u32) -> windows_core::HRESULT,
}
pub trait IMFContentProtectionDevice_Impl: windows_core::IUnknownImpl {
fn InvokeFunction(&self, functionid: u32, inputbufferbytecount: u32, inputbuffer: *const u8, outputbufferbytecount: *mut u32, outputbuffer: *mut u8) -> windows_core::Result<()>;
fn GetPrivateDataByteCount(&self, privateinputbytecount: *mut u32, privateoutputbytecount: *mut u32) -> windows_core::Result<()>;
}
impl IMFContentProtectionDevice_Vtbl {
pub const fn new<Identity: IMFContentProtectionDevice_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn InvokeFunction<Identity: IMFContentProtectionDevice_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, functionid: u32, inputbufferbytecount: u32, inputbuffer: *const u8, outputbufferbytecount: *mut u32, outputbuffer: *mut u8) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFContentProtectionDevice_Impl::InvokeFunction(this, core::mem::transmute_copy(&functionid), core::mem::transmute_copy(&inputbufferbytecount), core::mem::transmute_copy(&inputbuffer), core::mem::transmute_copy(&outputbufferbytecount), core::mem::transmute_copy(&outputbuffer)).into()
}
}
unsafe extern "system" fn GetPrivateDataByteCount<Identity: IMFContentProtectionDevice_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, privateinputbytecount: *mut u32, privateoutputbytecount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFContentProtectionDevice_Impl::GetPrivateDataByteCount(this, core::mem::transmute_copy(&privateinputbytecount), core::mem::transmute_copy(&privateoutputbytecount)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
InvokeFunction: InvokeFunction::<Identity, OFFSET>,
GetPrivateDataByteCount: GetPrivateDataByteCount::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFContentProtectionDevice as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFContentProtectionDevice {}
windows_core::imp::define_interface!(IMFContentProtectionManager, IMFContentProtectionManager_Vtbl, 0xacf92459_6a61_42bd_b57c_b43e51203cb0);
windows_core::imp::interface_hierarchy!(IMFContentProtectionManager, windows_core::IUnknown);
impl IMFContentProtectionManager {
pub unsafe fn BeginEnableContent<P0, P1, P2, P3>(&self, penableractivate: P0, ptopo: P1, pcallback: P2, punkstate: P3) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFActivate>,
P1: windows_core::Param<IMFTopology>,
P2: windows_core::Param<IMFAsyncCallback>,
P3: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).BeginEnableContent)(windows_core::Interface::as_raw(self), penableractivate.param().abi(), ptopo.param().abi(), pcallback.param().abi(), punkstate.param().abi()).ok() }
}
pub unsafe fn EndEnableContent<P0>(&self, presult: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncResult>,
{
unsafe { (windows_core::Interface::vtable(self).EndEnableContent)(windows_core::Interface::as_raw(self), presult.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFContentProtectionManager_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub BeginEnableContent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub EndEnableContent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFContentProtectionManager_Impl: windows_core::IUnknownImpl {
fn BeginEnableContent(&self, penableractivate: windows_core::Ref<IMFActivate>, ptopo: windows_core::Ref<IMFTopology>, pcallback: windows_core::Ref<IMFAsyncCallback>, punkstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn EndEnableContent(&self, presult: windows_core::Ref<IMFAsyncResult>) -> windows_core::Result<()>;
}
impl IMFContentProtectionManager_Vtbl {
pub const fn new<Identity: IMFContentProtectionManager_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginEnableContent<Identity: IMFContentProtectionManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, penableractivate: *mut core::ffi::c_void, ptopo: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFContentProtectionManager_Impl::BeginEnableContent(this, core::mem::transmute_copy(&penableractivate), core::mem::transmute_copy(&ptopo), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into()
}
}
unsafe extern "system" fn EndEnableContent<Identity: IMFContentProtectionManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFContentProtectionManager_Impl::EndEnableContent(this, core::mem::transmute_copy(&presult)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginEnableContent: BeginEnableContent::<Identity, OFFSET>,
EndEnableContent: EndEnableContent::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFContentProtectionManager as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFContentProtectionManager {}
windows_core::imp::define_interface!(IMFD3D12SynchronizationObject, IMFD3D12SynchronizationObject_Vtbl, 0x802302b0_82de_45e1_b421_f19ee5bdaf23);
windows_core::imp::interface_hierarchy!(IMFD3D12SynchronizationObject, windows_core::IUnknown);
impl IMFD3D12SynchronizationObject {
pub unsafe fn SignalEventOnFinalResourceRelease(&self, hevent: super::super::Foundation::HANDLE) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SignalEventOnFinalResourceRelease)(windows_core::Interface::as_raw(self), hevent).ok() }
}
pub unsafe fn Reset(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFD3D12SynchronizationObject_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SignalEventOnFinalResourceRelease: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::HANDLE) -> windows_core::HRESULT,
pub Reset: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFD3D12SynchronizationObject_Impl: windows_core::IUnknownImpl {
fn SignalEventOnFinalResourceRelease(&self, hevent: super::super::Foundation::HANDLE) -> windows_core::Result<()>;
fn Reset(&self) -> windows_core::Result<()>;
}
impl IMFD3D12SynchronizationObject_Vtbl {
pub const fn new<Identity: IMFD3D12SynchronizationObject_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SignalEventOnFinalResourceRelease<Identity: IMFD3D12SynchronizationObject_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hevent: super::super::Foundation::HANDLE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFD3D12SynchronizationObject_Impl::SignalEventOnFinalResourceRelease(this, core::mem::transmute_copy(&hevent)).into()
}
}
unsafe extern "system" fn Reset<Identity: IMFD3D12SynchronizationObject_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFD3D12SynchronizationObject_Impl::Reset(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SignalEventOnFinalResourceRelease: SignalEventOnFinalResourceRelease::<Identity, OFFSET>,
Reset: Reset::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFD3D12SynchronizationObject as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFD3D12SynchronizationObject {}
windows_core::imp::define_interface!(IMFD3D12SynchronizationObjectCommands, IMFD3D12SynchronizationObjectCommands_Vtbl, 0x09d0f835_92ff_4e53_8efa_40faa551f233);
windows_core::imp::interface_hierarchy!(IMFD3D12SynchronizationObjectCommands, windows_core::IUnknown);
impl IMFD3D12SynchronizationObjectCommands {
#[cfg(feature = "Win32_Graphics_Direct3D12")]
pub unsafe fn EnqueueResourceReady<P0>(&self, pproducercommandqueue: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12CommandQueue>,
{
unsafe { (windows_core::Interface::vtable(self).EnqueueResourceReady)(windows_core::Interface::as_raw(self), pproducercommandqueue.param().abi()).ok() }
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
pub unsafe fn EnqueueResourceReadyWait<P0>(&self, pconsumercommandqueue: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12CommandQueue>,
{
unsafe { (windows_core::Interface::vtable(self).EnqueueResourceReadyWait)(windows_core::Interface::as_raw(self), pconsumercommandqueue.param().abi()).ok() }
}
pub unsafe fn SignalEventOnResourceReady(&self, hevent: super::super::Foundation::HANDLE) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SignalEventOnResourceReady)(windows_core::Interface::as_raw(self), hevent).ok() }
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
pub unsafe fn EnqueueResourceRelease<P0>(&self, pconsumercommandqueue: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::super::Graphics::Direct3D12::ID3D12CommandQueue>,
{
unsafe { (windows_core::Interface::vtable(self).EnqueueResourceRelease)(windows_core::Interface::as_raw(self), pconsumercommandqueue.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFD3D12SynchronizationObjectCommands_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "Win32_Graphics_Direct3D12")]
pub EnqueueResourceReady: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D12"))]
EnqueueResourceReady: usize,
#[cfg(feature = "Win32_Graphics_Direct3D12")]
pub EnqueueResourceReadyWait: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D12"))]
EnqueueResourceReadyWait: usize,
pub SignalEventOnResourceReady: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::HANDLE) -> windows_core::HRESULT,
#[cfg(feature = "Win32_Graphics_Direct3D12")]
pub EnqueueResourceRelease: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D12"))]
EnqueueResourceRelease: usize,
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
pub trait IMFD3D12SynchronizationObjectCommands_Impl: windows_core::IUnknownImpl {
fn EnqueueResourceReady(&self, pproducercommandqueue: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12CommandQueue>) -> windows_core::Result<()>;
fn EnqueueResourceReadyWait(&self, pconsumercommandqueue: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12CommandQueue>) -> windows_core::Result<()>;
fn SignalEventOnResourceReady(&self, hevent: super::super::Foundation::HANDLE) -> windows_core::Result<()>;
fn EnqueueResourceRelease(&self, pconsumercommandqueue: windows_core::Ref<super::super::Graphics::Direct3D12::ID3D12CommandQueue>) -> windows_core::Result<()>;
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl IMFD3D12SynchronizationObjectCommands_Vtbl {
pub const fn new<Identity: IMFD3D12SynchronizationObjectCommands_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn EnqueueResourceReady<Identity: IMFD3D12SynchronizationObjectCommands_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pproducercommandqueue: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFD3D12SynchronizationObjectCommands_Impl::EnqueueResourceReady(this, core::mem::transmute_copy(&pproducercommandqueue)).into()
}
}
unsafe extern "system" fn EnqueueResourceReadyWait<Identity: IMFD3D12SynchronizationObjectCommands_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pconsumercommandqueue: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFD3D12SynchronizationObjectCommands_Impl::EnqueueResourceReadyWait(this, core::mem::transmute_copy(&pconsumercommandqueue)).into()
}
}
unsafe extern "system" fn SignalEventOnResourceReady<Identity: IMFD3D12SynchronizationObjectCommands_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hevent: super::super::Foundation::HANDLE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFD3D12SynchronizationObjectCommands_Impl::SignalEventOnResourceReady(this, core::mem::transmute_copy(&hevent)).into()
}
}
unsafe extern "system" fn EnqueueResourceRelease<Identity: IMFD3D12SynchronizationObjectCommands_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pconsumercommandqueue: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFD3D12SynchronizationObjectCommands_Impl::EnqueueResourceRelease(this, core::mem::transmute_copy(&pconsumercommandqueue)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
EnqueueResourceReady: EnqueueResourceReady::<Identity, OFFSET>,
EnqueueResourceReadyWait: EnqueueResourceReadyWait::<Identity, OFFSET>,
SignalEventOnResourceReady: SignalEventOnResourceReady::<Identity, OFFSET>,
EnqueueResourceRelease: EnqueueResourceRelease::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFD3D12SynchronizationObjectCommands as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Graphics_Direct3D12")]
impl windows_core::RuntimeName for IMFD3D12SynchronizationObjectCommands {}
windows_core::imp::define_interface!(IMFDLNASinkInit, IMFDLNASinkInit_Vtbl, 0x0c012799_1b61_4c10_bda9_04445be5f561);
windows_core::imp::interface_hierarchy!(IMFDLNASinkInit, windows_core::IUnknown);
impl IMFDLNASinkInit {
pub unsafe fn Initialize<P0>(&self, pbytestream: P0, fpal: bool) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFByteStream>,
{
unsafe { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), pbytestream.param().abi(), fpal.into()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFDLNASinkInit_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub Initialize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT,
}
pub trait IMFDLNASinkInit_Impl: windows_core::IUnknownImpl {
fn Initialize(&self, pbytestream: windows_core::Ref<IMFByteStream>, fpal: windows_core::BOOL) -> windows_core::Result<()>;
}
impl IMFDLNASinkInit_Vtbl {
pub const fn new<Identity: IMFDLNASinkInit_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Initialize<Identity: IMFDLNASinkInit_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbytestream: *mut core::ffi::c_void, fpal: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDLNASinkInit_Impl::Initialize(this, core::mem::transmute_copy(&pbytestream), core::mem::transmute_copy(&fpal)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), Initialize: Initialize::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFDLNASinkInit as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFDLNASinkInit {}
windows_core::imp::define_interface!(IMFDRMNetHelper, IMFDRMNetHelper_Vtbl, 0x3d1ff0ea_679a_4190_8d46_7fa69e8c7e15);
windows_core::imp::interface_hierarchy!(IMFDRMNetHelper, windows_core::IUnknown);
impl IMFDRMNetHelper {
pub unsafe fn ProcessLicenseRequest(&self, plicenserequest: &[u8], pplicenseresponse: *mut *mut u8, pcblicenseresponse: *mut u32, pbstrkid: *mut windows_core::BSTR) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).ProcessLicenseRequest)(windows_core::Interface::as_raw(self), core::mem::transmute(plicenserequest.as_ptr()), plicenserequest.len().try_into().unwrap(), pplicenseresponse as _, pcblicenseresponse as _, core::mem::transmute(pbstrkid)).ok() }
}
pub unsafe fn GetChainedLicenseResponse(&self, pplicenseresponse: *mut *mut u8, pcblicenseresponse: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetChainedLicenseResponse)(windows_core::Interface::as_raw(self), pplicenseresponse as _, pcblicenseresponse as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFDRMNetHelper_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub ProcessLicenseRequest: unsafe extern "system" fn(*mut core::ffi::c_void, *const u8, u32, *mut *mut u8, *mut u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetChainedLicenseResponse: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut u8, *mut u32) -> windows_core::HRESULT,
}
pub trait IMFDRMNetHelper_Impl: windows_core::IUnknownImpl {
fn ProcessLicenseRequest(&self, plicenserequest: *const u8, cblicenserequest: u32, pplicenseresponse: *mut *mut u8, pcblicenseresponse: *mut u32, pbstrkid: *mut windows_core::BSTR) -> windows_core::Result<()>;
fn GetChainedLicenseResponse(&self, pplicenseresponse: *mut *mut u8, pcblicenseresponse: *mut u32) -> windows_core::Result<()>;
}
impl IMFDRMNetHelper_Vtbl {
pub const fn new<Identity: IMFDRMNetHelper_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn ProcessLicenseRequest<Identity: IMFDRMNetHelper_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, plicenserequest: *const u8, cblicenserequest: u32, pplicenseresponse: *mut *mut u8, pcblicenseresponse: *mut u32, pbstrkid: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDRMNetHelper_Impl::ProcessLicenseRequest(this, core::mem::transmute_copy(&plicenserequest), core::mem::transmute_copy(&cblicenserequest), core::mem::transmute_copy(&pplicenseresponse), core::mem::transmute_copy(&pcblicenseresponse), core::mem::transmute_copy(&pbstrkid)).into()
}
}
unsafe extern "system" fn GetChainedLicenseResponse<Identity: IMFDRMNetHelper_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pplicenseresponse: *mut *mut u8, pcblicenseresponse: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDRMNetHelper_Impl::GetChainedLicenseResponse(this, core::mem::transmute_copy(&pplicenseresponse), core::mem::transmute_copy(&pcblicenseresponse)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
ProcessLicenseRequest: ProcessLicenseRequest::<Identity, OFFSET>,
GetChainedLicenseResponse: GetChainedLicenseResponse::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFDRMNetHelper as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFDRMNetHelper {}
windows_core::imp::define_interface!(IMFDXGIBuffer, IMFDXGIBuffer_Vtbl, 0xe7174cfa_1c9e_48b1_8866_626226bfc258);
windows_core::imp::interface_hierarchy!(IMFDXGIBuffer, windows_core::IUnknown);
impl IMFDXGIBuffer {
pub unsafe fn GetResource(&self, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetResource)(windows_core::Interface::as_raw(self), riid, ppvobject as _).ok() }
}
pub unsafe fn GetSubresourceIndex(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetSubresourceIndex)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetUnknown(&self, guid: *const windows_core::GUID, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetUnknown)(windows_core::Interface::as_raw(self), guid, riid, ppvobject as _).ok() }
}
pub unsafe fn SetUnknown<P1>(&self, guid: *const windows_core::GUID, punkdata: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).SetUnknown)(windows_core::Interface::as_raw(self), guid, punkdata.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFDXGIBuffer_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetResource: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetSubresourceIndex: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetUnknown: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetUnknown: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFDXGIBuffer_Impl: windows_core::IUnknownImpl {
fn GetResource(&self, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
fn GetSubresourceIndex(&self) -> windows_core::Result<u32>;
fn GetUnknown(&self, guid: *const windows_core::GUID, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
fn SetUnknown(&self, guid: *const windows_core::GUID, punkdata: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
}
impl IMFDXGIBuffer_Vtbl {
pub const fn new<Identity: IMFDXGIBuffer_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetResource<Identity: IMFDXGIBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDXGIBuffer_Impl::GetResource(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobject)).into()
}
}
unsafe extern "system" fn GetSubresourceIndex<Identity: IMFDXGIBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pusubresource: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFDXGIBuffer_Impl::GetSubresourceIndex(this) {
Ok(ok__) => {
pusubresource.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetUnknown<Identity: IMFDXGIBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guid: *const windows_core::GUID, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDXGIBuffer_Impl::GetUnknown(this, core::mem::transmute_copy(&guid), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobject)).into()
}
}
unsafe extern "system" fn SetUnknown<Identity: IMFDXGIBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guid: *const windows_core::GUID, punkdata: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDXGIBuffer_Impl::SetUnknown(this, core::mem::transmute_copy(&guid), core::mem::transmute_copy(&punkdata)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetResource: GetResource::<Identity, OFFSET>,
GetSubresourceIndex: GetSubresourceIndex::<Identity, OFFSET>,
GetUnknown: GetUnknown::<Identity, OFFSET>,
SetUnknown: SetUnknown::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFDXGIBuffer as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFDXGIBuffer {}
windows_core::imp::define_interface!(IMFDXGIDeviceManager, IMFDXGIDeviceManager_Vtbl, 0xeb533d5d_2db6_40f8_97a9_494692014f07);
windows_core::imp::interface_hierarchy!(IMFDXGIDeviceManager, windows_core::IUnknown);
impl IMFDXGIDeviceManager {
pub unsafe fn CloseDeviceHandle(&self, hdevice: super::super::Foundation::HANDLE) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).CloseDeviceHandle)(windows_core::Interface::as_raw(self), hdevice).ok() }
}
pub unsafe fn GetVideoService(&self, hdevice: super::super::Foundation::HANDLE, riid: *const windows_core::GUID, ppservice: *mut *mut core::ffi::c_void) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetVideoService)(windows_core::Interface::as_raw(self), hdevice, riid, ppservice as _).ok() }
}
pub unsafe fn LockDevice(&self, hdevice: super::super::Foundation::HANDLE, riid: *const windows_core::GUID, ppunkdevice: *mut *mut core::ffi::c_void, fblock: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).LockDevice)(windows_core::Interface::as_raw(self), hdevice, riid, ppunkdevice as _, fblock.into()).ok() }
}
pub unsafe fn OpenDeviceHandle(&self) -> windows_core::Result<super::super::Foundation::HANDLE> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).OpenDeviceHandle)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn ResetDevice<P0>(&self, punkdevice: P0, resettoken: u32) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).ResetDevice)(windows_core::Interface::as_raw(self), punkdevice.param().abi(), resettoken).ok() }
}
pub unsafe fn TestDevice(&self, hdevice: super::super::Foundation::HANDLE) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).TestDevice)(windows_core::Interface::as_raw(self), hdevice).ok() }
}
pub unsafe fn UnlockDevice(&self, hdevice: super::super::Foundation::HANDLE, fsavestate: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).UnlockDevice)(windows_core::Interface::as_raw(self), hdevice, fsavestate.into()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFDXGIDeviceManager_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub CloseDeviceHandle: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::HANDLE) -> windows_core::HRESULT,
pub GetVideoService: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::HANDLE, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub LockDevice: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::HANDLE, *const windows_core::GUID, *mut *mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT,
pub OpenDeviceHandle: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::HANDLE) -> windows_core::HRESULT,
pub ResetDevice: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub TestDevice: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::HANDLE) -> windows_core::HRESULT,
pub UnlockDevice: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::HANDLE, windows_core::BOOL) -> windows_core::HRESULT,
}
pub trait IMFDXGIDeviceManager_Impl: windows_core::IUnknownImpl {
fn CloseDeviceHandle(&self, hdevice: super::super::Foundation::HANDLE) -> windows_core::Result<()>;
fn GetVideoService(&self, hdevice: super::super::Foundation::HANDLE, riid: *const windows_core::GUID, ppservice: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
fn LockDevice(&self, hdevice: super::super::Foundation::HANDLE, riid: *const windows_core::GUID, ppunkdevice: *mut *mut core::ffi::c_void, fblock: windows_core::BOOL) -> windows_core::Result<()>;
fn OpenDeviceHandle(&self) -> windows_core::Result<super::super::Foundation::HANDLE>;
fn ResetDevice(&self, punkdevice: windows_core::Ref<windows_core::IUnknown>, resettoken: u32) -> windows_core::Result<()>;
fn TestDevice(&self, hdevice: super::super::Foundation::HANDLE) -> windows_core::Result<()>;
fn UnlockDevice(&self, hdevice: super::super::Foundation::HANDLE, fsavestate: windows_core::BOOL) -> windows_core::Result<()>;
}
impl IMFDXGIDeviceManager_Vtbl {
pub const fn new<Identity: IMFDXGIDeviceManager_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CloseDeviceHandle<Identity: IMFDXGIDeviceManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hdevice: super::super::Foundation::HANDLE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDXGIDeviceManager_Impl::CloseDeviceHandle(this, core::mem::transmute_copy(&hdevice)).into()
}
}
unsafe extern "system" fn GetVideoService<Identity: IMFDXGIDeviceManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hdevice: super::super::Foundation::HANDLE, riid: *const windows_core::GUID, ppservice: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDXGIDeviceManager_Impl::GetVideoService(this, core::mem::transmute_copy(&hdevice), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppservice)).into()
}
}
unsafe extern "system" fn LockDevice<Identity: IMFDXGIDeviceManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hdevice: super::super::Foundation::HANDLE, riid: *const windows_core::GUID, ppunkdevice: *mut *mut core::ffi::c_void, fblock: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDXGIDeviceManager_Impl::LockDevice(this, core::mem::transmute_copy(&hdevice), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppunkdevice), core::mem::transmute_copy(&fblock)).into()
}
}
unsafe extern "system" fn OpenDeviceHandle<Identity: IMFDXGIDeviceManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, phdevice: *mut super::super::Foundation::HANDLE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFDXGIDeviceManager_Impl::OpenDeviceHandle(this) {
Ok(ok__) => {
phdevice.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn ResetDevice<Identity: IMFDXGIDeviceManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, punkdevice: *mut core::ffi::c_void, resettoken: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDXGIDeviceManager_Impl::ResetDevice(this, core::mem::transmute_copy(&punkdevice), core::mem::transmute_copy(&resettoken)).into()
}
}
unsafe extern "system" fn TestDevice<Identity: IMFDXGIDeviceManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hdevice: super::super::Foundation::HANDLE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDXGIDeviceManager_Impl::TestDevice(this, core::mem::transmute_copy(&hdevice)).into()
}
}
unsafe extern "system" fn UnlockDevice<Identity: IMFDXGIDeviceManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hdevice: super::super::Foundation::HANDLE, fsavestate: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDXGIDeviceManager_Impl::UnlockDevice(this, core::mem::transmute_copy(&hdevice), core::mem::transmute_copy(&fsavestate)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CloseDeviceHandle: CloseDeviceHandle::<Identity, OFFSET>,
GetVideoService: GetVideoService::<Identity, OFFSET>,
LockDevice: LockDevice::<Identity, OFFSET>,
OpenDeviceHandle: OpenDeviceHandle::<Identity, OFFSET>,
ResetDevice: ResetDevice::<Identity, OFFSET>,
TestDevice: TestDevice::<Identity, OFFSET>,
UnlockDevice: UnlockDevice::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFDXGIDeviceManager as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFDXGIDeviceManager {}
windows_core::imp::define_interface!(IMFDXGIDeviceManagerSource, IMFDXGIDeviceManagerSource_Vtbl, 0x20bc074b_7a8d_4609_8c3b_64a0a3b5d7ce);
windows_core::imp::interface_hierarchy!(IMFDXGIDeviceManagerSource, windows_core::IUnknown);
impl IMFDXGIDeviceManagerSource {
pub unsafe fn GetManager(&self) -> windows_core::Result<IMFDXGIDeviceManager> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetManager)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFDXGIDeviceManagerSource_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetManager: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFDXGIDeviceManagerSource_Impl: windows_core::IUnknownImpl {
fn GetManager(&self) -> windows_core::Result<IMFDXGIDeviceManager>;
}
impl IMFDXGIDeviceManagerSource_Vtbl {
pub const fn new<Identity: IMFDXGIDeviceManagerSource_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetManager<Identity: IMFDXGIDeviceManagerSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppmanager: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFDXGIDeviceManagerSource_Impl::GetManager(this) {
Ok(ok__) => {
ppmanager.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetManager: GetManager::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFDXGIDeviceManagerSource as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFDXGIDeviceManagerSource {}
windows_core::imp::define_interface!(IMFDesiredSample, IMFDesiredSample_Vtbl, 0x56c294d0_753e_4260_8d61_a3d8820b1d54);
windows_core::imp::interface_hierarchy!(IMFDesiredSample, windows_core::IUnknown);
impl IMFDesiredSample {
pub unsafe fn GetDesiredSampleTimeAndDuration(&self, phnssampletime: *mut i64, phnssampleduration: *mut i64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetDesiredSampleTimeAndDuration)(windows_core::Interface::as_raw(self), phnssampletime as _, phnssampleduration as _).ok() }
}
pub unsafe fn SetDesiredSampleTimeAndDuration(&self, hnssampletime: i64, hnssampleduration: i64) {
unsafe { (windows_core::Interface::vtable(self).SetDesiredSampleTimeAndDuration)(windows_core::Interface::as_raw(self), hnssampletime, hnssampleduration) }
}
pub unsafe fn Clear(&self) {
unsafe { (windows_core::Interface::vtable(self).Clear)(windows_core::Interface::as_raw(self)) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFDesiredSample_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetDesiredSampleTimeAndDuration: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i64, *mut i64) -> windows_core::HRESULT,
pub SetDesiredSampleTimeAndDuration: unsafe extern "system" fn(*mut core::ffi::c_void, i64, i64),
pub Clear: unsafe extern "system" fn(*mut core::ffi::c_void),
}
pub trait IMFDesiredSample_Impl: windows_core::IUnknownImpl {
fn GetDesiredSampleTimeAndDuration(&self, phnssampletime: *mut i64, phnssampleduration: *mut i64) -> windows_core::Result<()>;
fn SetDesiredSampleTimeAndDuration(&self, hnssampletime: i64, hnssampleduration: i64);
fn Clear(&self);
}
impl IMFDesiredSample_Vtbl {
pub const fn new<Identity: IMFDesiredSample_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetDesiredSampleTimeAndDuration<Identity: IMFDesiredSample_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, phnssampletime: *mut i64, phnssampleduration: *mut i64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDesiredSample_Impl::GetDesiredSampleTimeAndDuration(this, core::mem::transmute_copy(&phnssampletime), core::mem::transmute_copy(&phnssampleduration)).into()
}
}
unsafe extern "system" fn SetDesiredSampleTimeAndDuration<Identity: IMFDesiredSample_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hnssampletime: i64, hnssampleduration: i64) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDesiredSample_Impl::SetDesiredSampleTimeAndDuration(this, core::mem::transmute_copy(&hnssampletime), core::mem::transmute_copy(&hnssampleduration))
}
}
unsafe extern "system" fn Clear<Identity: IMFDesiredSample_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDesiredSample_Impl::Clear(this)
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetDesiredSampleTimeAndDuration: GetDesiredSampleTimeAndDuration::<Identity, OFFSET>,
SetDesiredSampleTimeAndDuration: SetDesiredSampleTimeAndDuration::<Identity, OFFSET>,
Clear: Clear::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFDesiredSample as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFDesiredSample {}
windows_core::imp::define_interface!(IMFDeviceTransform, IMFDeviceTransform_Vtbl, 0xd818fbd8_fc46_42f2_87ac_1ea2d1f9bf32);
windows_core::imp::interface_hierarchy!(IMFDeviceTransform, windows_core::IUnknown);
impl IMFDeviceTransform {
pub unsafe fn InitializeTransform<P0>(&self, pattributes: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAttributes>,
{
unsafe { (windows_core::Interface::vtable(self).InitializeTransform)(windows_core::Interface::as_raw(self), pattributes.param().abi()).ok() }
}
pub unsafe fn GetInputAvailableType(&self, dwinputstreamid: u32, dwtypeindex: u32) -> windows_core::Result<IMFMediaType> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetInputAvailableType)(windows_core::Interface::as_raw(self), dwinputstreamid, dwtypeindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetInputCurrentType(&self, dwinputstreamid: u32) -> windows_core::Result<IMFMediaType> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetInputCurrentType)(windows_core::Interface::as_raw(self), dwinputstreamid, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetInputStreamAttributes(&self, dwinputstreamid: u32) -> windows_core::Result<IMFAttributes> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetInputStreamAttributes)(windows_core::Interface::as_raw(self), dwinputstreamid, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetOutputAvailableType(&self, dwoutputstreamid: u32, dwtypeindex: u32) -> windows_core::Result<IMFMediaType> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOutputAvailableType)(windows_core::Interface::as_raw(self), dwoutputstreamid, dwtypeindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetOutputCurrentType(&self, dwoutputstreamid: u32) -> windows_core::Result<IMFMediaType> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOutputCurrentType)(windows_core::Interface::as_raw(self), dwoutputstreamid, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetOutputStreamAttributes(&self, dwoutputstreamid: u32) -> windows_core::Result<IMFAttributes> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOutputStreamAttributes)(windows_core::Interface::as_raw(self), dwoutputstreamid, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetStreamCount(&self, pcinputstreams: *mut u32, pcoutputstreams: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetStreamCount)(windows_core::Interface::as_raw(self), pcinputstreams as _, pcoutputstreams as _).ok() }
}
pub unsafe fn GetStreamIDs(&self, dwinputidarraysize: u32, pdwinputstreamids: *mut u32, dwoutputidarraysize: u32, pdwoutputstreamids: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetStreamIDs)(windows_core::Interface::as_raw(self), dwinputidarraysize, pdwinputstreamids as _, dwoutputidarraysize, pdwoutputstreamids as _).ok() }
}
pub unsafe fn ProcessEvent<P1>(&self, dwinputstreamid: u32, pevent: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFMediaEvent>,
{
unsafe { (windows_core::Interface::vtable(self).ProcessEvent)(windows_core::Interface::as_raw(self), dwinputstreamid, pevent.param().abi()).ok() }
}
pub unsafe fn ProcessInput<P1>(&self, dwinputstreamid: u32, psample: P1, dwflags: u32) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFSample>,
{
unsafe { (windows_core::Interface::vtable(self).ProcessInput)(windows_core::Interface::as_raw(self), dwinputstreamid, psample.param().abi(), dwflags).ok() }
}
pub unsafe fn ProcessMessage(&self, emessage: MFT_MESSAGE_TYPE, ulparam: usize) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).ProcessMessage)(windows_core::Interface::as_raw(self), emessage, ulparam).ok() }
}
pub unsafe fn ProcessOutput(&self, dwflags: u32, coutputbuffercount: u32, poutputsample: *mut MFT_OUTPUT_DATA_BUFFER, pdwstatus: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).ProcessOutput)(windows_core::Interface::as_raw(self), dwflags, coutputbuffercount, core::mem::transmute(poutputsample), pdwstatus as _).ok() }
}
pub unsafe fn SetInputStreamState<P1>(&self, dwstreamid: u32, pmediatype: P1, value: DeviceStreamState, dwflags: u32) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFMediaType>,
{
unsafe { (windows_core::Interface::vtable(self).SetInputStreamState)(windows_core::Interface::as_raw(self), dwstreamid, pmediatype.param().abi(), value, dwflags).ok() }
}
pub unsafe fn GetInputStreamState(&self, dwstreamid: u32) -> windows_core::Result<DeviceStreamState> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetInputStreamState)(windows_core::Interface::as_raw(self), dwstreamid, &mut result__).map(|| result__)
}
}
pub unsafe fn SetOutputStreamState<P1>(&self, dwstreamid: u32, pmediatype: P1, value: DeviceStreamState, dwflags: u32) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFMediaType>,
{
unsafe { (windows_core::Interface::vtable(self).SetOutputStreamState)(windows_core::Interface::as_raw(self), dwstreamid, pmediatype.param().abi(), value, dwflags).ok() }
}
pub unsafe fn GetOutputStreamState(&self, dwstreamid: u32) -> windows_core::Result<DeviceStreamState> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOutputStreamState)(windows_core::Interface::as_raw(self), dwstreamid, &mut result__).map(|| result__)
}
}
pub unsafe fn GetInputStreamPreferredState(&self, dwstreamid: u32, value: *mut DeviceStreamState, ppmediatype: *mut Option<IMFMediaType>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetInputStreamPreferredState)(windows_core::Interface::as_raw(self), dwstreamid, value as _, core::mem::transmute(ppmediatype)).ok() }
}
pub unsafe fn FlushInputStream(&self, dwstreamindex: u32, dwflags: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).FlushInputStream)(windows_core::Interface::as_raw(self), dwstreamindex, dwflags).ok() }
}
pub unsafe fn FlushOutputStream(&self, dwstreamindex: u32, dwflags: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).FlushOutputStream)(windows_core::Interface::as_raw(self), dwstreamindex, dwflags).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFDeviceTransform_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub InitializeTransform: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetInputAvailableType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetInputCurrentType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetInputStreamAttributes: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetOutputAvailableType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetOutputCurrentType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetOutputStreamAttributes: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetStreamCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut u32) -> windows_core::HRESULT,
pub GetStreamIDs: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u32, u32, *mut u32) -> windows_core::HRESULT,
pub ProcessEvent: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ProcessInput: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub ProcessMessage: unsafe extern "system" fn(*mut core::ffi::c_void, MFT_MESSAGE_TYPE, usize) -> windows_core::HRESULT,
pub ProcessOutput: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, *mut MFT_OUTPUT_DATA_BUFFER, *mut u32) -> windows_core::HRESULT,
pub SetInputStreamState: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, DeviceStreamState, u32) -> windows_core::HRESULT,
pub GetInputStreamState: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut DeviceStreamState) -> windows_core::HRESULT,
pub SetOutputStreamState: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, DeviceStreamState, u32) -> windows_core::HRESULT,
pub GetOutputStreamState: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut DeviceStreamState) -> windows_core::HRESULT,
pub GetInputStreamPreferredState: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut DeviceStreamState, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub FlushInputStream: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32) -> windows_core::HRESULT,
pub FlushOutputStream: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32) -> windows_core::HRESULT,
}
pub trait IMFDeviceTransform_Impl: windows_core::IUnknownImpl {
fn InitializeTransform(&self, pattributes: windows_core::Ref<IMFAttributes>) -> windows_core::Result<()>;
fn GetInputAvailableType(&self, dwinputstreamid: u32, dwtypeindex: u32) -> windows_core::Result<IMFMediaType>;
fn GetInputCurrentType(&self, dwinputstreamid: u32) -> windows_core::Result<IMFMediaType>;
fn GetInputStreamAttributes(&self, dwinputstreamid: u32) -> windows_core::Result<IMFAttributes>;
fn GetOutputAvailableType(&self, dwoutputstreamid: u32, dwtypeindex: u32) -> windows_core::Result<IMFMediaType>;
fn GetOutputCurrentType(&self, dwoutputstreamid: u32) -> windows_core::Result<IMFMediaType>;
fn GetOutputStreamAttributes(&self, dwoutputstreamid: u32) -> windows_core::Result<IMFAttributes>;
fn GetStreamCount(&self, pcinputstreams: *mut u32, pcoutputstreams: *mut u32) -> windows_core::Result<()>;
fn GetStreamIDs(&self, dwinputidarraysize: u32, pdwinputstreamids: *mut u32, dwoutputidarraysize: u32, pdwoutputstreamids: *mut u32) -> windows_core::Result<()>;
fn ProcessEvent(&self, dwinputstreamid: u32, pevent: windows_core::Ref<IMFMediaEvent>) -> windows_core::Result<()>;
fn ProcessInput(&self, dwinputstreamid: u32, psample: windows_core::Ref<IMFSample>, dwflags: u32) -> windows_core::Result<()>;
fn ProcessMessage(&self, emessage: MFT_MESSAGE_TYPE, ulparam: usize) -> windows_core::Result<()>;
fn ProcessOutput(&self, dwflags: u32, coutputbuffercount: u32, poutputsample: *mut MFT_OUTPUT_DATA_BUFFER, pdwstatus: *mut u32) -> windows_core::Result<()>;
fn SetInputStreamState(&self, dwstreamid: u32, pmediatype: windows_core::Ref<IMFMediaType>, value: DeviceStreamState, dwflags: u32) -> windows_core::Result<()>;
fn GetInputStreamState(&self, dwstreamid: u32) -> windows_core::Result<DeviceStreamState>;
fn SetOutputStreamState(&self, dwstreamid: u32, pmediatype: windows_core::Ref<IMFMediaType>, value: DeviceStreamState, dwflags: u32) -> windows_core::Result<()>;
fn GetOutputStreamState(&self, dwstreamid: u32) -> windows_core::Result<DeviceStreamState>;
fn GetInputStreamPreferredState(&self, dwstreamid: u32, value: *mut DeviceStreamState, ppmediatype: windows_core::OutRef<IMFMediaType>) -> windows_core::Result<()>;
fn FlushInputStream(&self, dwstreamindex: u32, dwflags: u32) -> windows_core::Result<()>;
fn FlushOutputStream(&self, dwstreamindex: u32, dwflags: u32) -> windows_core::Result<()>;
}
impl IMFDeviceTransform_Vtbl {
pub const fn new<Identity: IMFDeviceTransform_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn InitializeTransform<Identity: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pattributes: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDeviceTransform_Impl::InitializeTransform(this, core::mem::transmute_copy(&pattributes)).into()
}
}
unsafe extern "system" fn GetInputAvailableType<Identity: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwinputstreamid: u32, dwtypeindex: u32, pmediatype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFDeviceTransform_Impl::GetInputAvailableType(this, core::mem::transmute_copy(&dwinputstreamid), core::mem::transmute_copy(&dwtypeindex)) {
Ok(ok__) => {
pmediatype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetInputCurrentType<Identity: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwinputstreamid: u32, pmediatype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFDeviceTransform_Impl::GetInputCurrentType(this, core::mem::transmute_copy(&dwinputstreamid)) {
Ok(ok__) => {
pmediatype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetInputStreamAttributes<Identity: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwinputstreamid: u32, ppattributes: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFDeviceTransform_Impl::GetInputStreamAttributes(this, core::mem::transmute_copy(&dwinputstreamid)) {
Ok(ok__) => {
ppattributes.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetOutputAvailableType<Identity: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwoutputstreamid: u32, dwtypeindex: u32, pmediatype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFDeviceTransform_Impl::GetOutputAvailableType(this, core::mem::transmute_copy(&dwoutputstreamid), core::mem::transmute_copy(&dwtypeindex)) {
Ok(ok__) => {
pmediatype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetOutputCurrentType<Identity: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwoutputstreamid: u32, pmediatype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFDeviceTransform_Impl::GetOutputCurrentType(this, core::mem::transmute_copy(&dwoutputstreamid)) {
Ok(ok__) => {
pmediatype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetOutputStreamAttributes<Identity: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwoutputstreamid: u32, ppattributes: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFDeviceTransform_Impl::GetOutputStreamAttributes(this, core::mem::transmute_copy(&dwoutputstreamid)) {
Ok(ok__) => {
ppattributes.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetStreamCount<Identity: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcinputstreams: *mut u32, pcoutputstreams: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDeviceTransform_Impl::GetStreamCount(this, core::mem::transmute_copy(&pcinputstreams), core::mem::transmute_copy(&pcoutputstreams)).into()
}
}
unsafe extern "system" fn GetStreamIDs<Identity: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwinputidarraysize: u32, pdwinputstreamids: *mut u32, dwoutputidarraysize: u32, pdwoutputstreamids: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDeviceTransform_Impl::GetStreamIDs(this, core::mem::transmute_copy(&dwinputidarraysize), core::mem::transmute_copy(&pdwinputstreamids), core::mem::transmute_copy(&dwoutputidarraysize), core::mem::transmute_copy(&pdwoutputstreamids)).into()
}
}
unsafe extern "system" fn ProcessEvent<Identity: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwinputstreamid: u32, pevent: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDeviceTransform_Impl::ProcessEvent(this, core::mem::transmute_copy(&dwinputstreamid), core::mem::transmute_copy(&pevent)).into()
}
}
unsafe extern "system" fn ProcessInput<Identity: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwinputstreamid: u32, psample: *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDeviceTransform_Impl::ProcessInput(this, core::mem::transmute_copy(&dwinputstreamid), core::mem::transmute_copy(&psample), core::mem::transmute_copy(&dwflags)).into()
}
}
unsafe extern "system" fn ProcessMessage<Identity: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, emessage: MFT_MESSAGE_TYPE, ulparam: usize) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDeviceTransform_Impl::ProcessMessage(this, core::mem::transmute_copy(&emessage), core::mem::transmute_copy(&ulparam)).into()
}
}
unsafe extern "system" fn ProcessOutput<Identity: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwflags: u32, coutputbuffercount: u32, poutputsample: *mut MFT_OUTPUT_DATA_BUFFER, pdwstatus: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDeviceTransform_Impl::ProcessOutput(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&coutputbuffercount), core::mem::transmute_copy(&poutputsample), core::mem::transmute_copy(&pdwstatus)).into()
}
}
unsafe extern "system" fn SetInputStreamState<Identity: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamid: u32, pmediatype: *mut core::ffi::c_void, value: DeviceStreamState, dwflags: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDeviceTransform_Impl::SetInputStreamState(this, core::mem::transmute_copy(&dwstreamid), core::mem::transmute_copy(&pmediatype), core::mem::transmute_copy(&value), core::mem::transmute_copy(&dwflags)).into()
}
}
unsafe extern "system" fn GetInputStreamState<Identity: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamid: u32, value: *mut DeviceStreamState) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFDeviceTransform_Impl::GetInputStreamState(this, core::mem::transmute_copy(&dwstreamid)) {
Ok(ok__) => {
value.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetOutputStreamState<Identity: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamid: u32, pmediatype: *mut core::ffi::c_void, value: DeviceStreamState, dwflags: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDeviceTransform_Impl::SetOutputStreamState(this, core::mem::transmute_copy(&dwstreamid), core::mem::transmute_copy(&pmediatype), core::mem::transmute_copy(&value), core::mem::transmute_copy(&dwflags)).into()
}
}
unsafe extern "system" fn GetOutputStreamState<Identity: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamid: u32, value: *mut DeviceStreamState) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFDeviceTransform_Impl::GetOutputStreamState(this, core::mem::transmute_copy(&dwstreamid)) {
Ok(ok__) => {
value.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetInputStreamPreferredState<Identity: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamid: u32, value: *mut DeviceStreamState, ppmediatype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDeviceTransform_Impl::GetInputStreamPreferredState(this, core::mem::transmute_copy(&dwstreamid), core::mem::transmute_copy(&value), core::mem::transmute_copy(&ppmediatype)).into()
}
}
unsafe extern "system" fn FlushInputStream<Identity: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, dwflags: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDeviceTransform_Impl::FlushInputStream(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&dwflags)).into()
}
}
unsafe extern "system" fn FlushOutputStream<Identity: IMFDeviceTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, dwflags: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDeviceTransform_Impl::FlushOutputStream(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&dwflags)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
InitializeTransform: InitializeTransform::<Identity, OFFSET>,
GetInputAvailableType: GetInputAvailableType::<Identity, OFFSET>,
GetInputCurrentType: GetInputCurrentType::<Identity, OFFSET>,
GetInputStreamAttributes: GetInputStreamAttributes::<Identity, OFFSET>,
GetOutputAvailableType: GetOutputAvailableType::<Identity, OFFSET>,
GetOutputCurrentType: GetOutputCurrentType::<Identity, OFFSET>,
GetOutputStreamAttributes: GetOutputStreamAttributes::<Identity, OFFSET>,
GetStreamCount: GetStreamCount::<Identity, OFFSET>,
GetStreamIDs: GetStreamIDs::<Identity, OFFSET>,
ProcessEvent: ProcessEvent::<Identity, OFFSET>,
ProcessInput: ProcessInput::<Identity, OFFSET>,
ProcessMessage: ProcessMessage::<Identity, OFFSET>,
ProcessOutput: ProcessOutput::<Identity, OFFSET>,
SetInputStreamState: SetInputStreamState::<Identity, OFFSET>,
GetInputStreamState: GetInputStreamState::<Identity, OFFSET>,
SetOutputStreamState: SetOutputStreamState::<Identity, OFFSET>,
GetOutputStreamState: GetOutputStreamState::<Identity, OFFSET>,
GetInputStreamPreferredState: GetInputStreamPreferredState::<Identity, OFFSET>,
FlushInputStream: FlushInputStream::<Identity, OFFSET>,
FlushOutputStream: FlushOutputStream::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFDeviceTransform as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFDeviceTransform {}
windows_core::imp::define_interface!(IMFDeviceTransformCallback, IMFDeviceTransformCallback_Vtbl, 0x6d5cb646_29ec_41fb_8179_8c4c6d750811);
windows_core::imp::interface_hierarchy!(IMFDeviceTransformCallback, windows_core::IUnknown);
impl IMFDeviceTransformCallback {
pub unsafe fn OnBufferSent<P0>(&self, pcallbackattributes: P0, pinid: u32) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAttributes>,
{
unsafe { (windows_core::Interface::vtable(self).OnBufferSent)(windows_core::Interface::as_raw(self), pcallbackattributes.param().abi(), pinid).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFDeviceTransformCallback_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub OnBufferSent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32) -> windows_core::HRESULT,
}
pub trait IMFDeviceTransformCallback_Impl: windows_core::IUnknownImpl {
fn OnBufferSent(&self, pcallbackattributes: windows_core::Ref<IMFAttributes>, pinid: u32) -> windows_core::Result<()>;
}
impl IMFDeviceTransformCallback_Vtbl {
pub const fn new<Identity: IMFDeviceTransformCallback_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn OnBufferSent<Identity: IMFDeviceTransformCallback_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcallbackattributes: *mut core::ffi::c_void, pinid: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFDeviceTransformCallback_Impl::OnBufferSent(this, core::mem::transmute_copy(&pcallbackattributes), core::mem::transmute_copy(&pinid)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), OnBufferSent: OnBufferSent::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFDeviceTransformCallback as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFDeviceTransformCallback {}
windows_core::imp::define_interface!(IMFExtendedCameraControl, IMFExtendedCameraControl_Vtbl, 0x38e33520_fca1_4845_a27a_68b7c6ab3789);
windows_core::imp::interface_hierarchy!(IMFExtendedCameraControl, windows_core::IUnknown);
impl IMFExtendedCameraControl {
pub unsafe fn GetCapabilities(&self) -> u64 {
unsafe { (windows_core::Interface::vtable(self).GetCapabilities)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn SetFlags(&self, ulflags: u64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetFlags)(windows_core::Interface::as_raw(self), ulflags).ok() }
}
pub unsafe fn GetFlags(&self) -> u64 {
unsafe { (windows_core::Interface::vtable(self).GetFlags)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn LockPayload(&self, pppayload: *mut *mut u8, pulpayload: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).LockPayload)(windows_core::Interface::as_raw(self), pppayload as _, pulpayload as _).ok() }
}
pub unsafe fn UnlockPayload(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).UnlockPayload)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn CommitSettings(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).CommitSettings)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFExtendedCameraControl_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetCapabilities: unsafe extern "system" fn(*mut core::ffi::c_void) -> u64,
pub SetFlags: unsafe extern "system" fn(*mut core::ffi::c_void, u64) -> windows_core::HRESULT,
pub GetFlags: unsafe extern "system" fn(*mut core::ffi::c_void) -> u64,
pub LockPayload: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut u8, *mut u32) -> windows_core::HRESULT,
pub UnlockPayload: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub CommitSettings: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFExtendedCameraControl_Impl: windows_core::IUnknownImpl {
fn GetCapabilities(&self) -> u64;
fn SetFlags(&self, ulflags: u64) -> windows_core::Result<()>;
fn GetFlags(&self) -> u64;
fn LockPayload(&self, pppayload: *mut *mut u8, pulpayload: *mut u32) -> windows_core::Result<()>;
fn UnlockPayload(&self) -> windows_core::Result<()>;
fn CommitSettings(&self) -> windows_core::Result<()>;
}
impl IMFExtendedCameraControl_Vtbl {
pub const fn new<Identity: IMFExtendedCameraControl_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetCapabilities<Identity: IMFExtendedCameraControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> u64 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFExtendedCameraControl_Impl::GetCapabilities(this)
}
}
unsafe extern "system" fn SetFlags<Identity: IMFExtendedCameraControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ulflags: u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFExtendedCameraControl_Impl::SetFlags(this, core::mem::transmute_copy(&ulflags)).into()
}
}
unsafe extern "system" fn GetFlags<Identity: IMFExtendedCameraControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> u64 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFExtendedCameraControl_Impl::GetFlags(this)
}
}
unsafe extern "system" fn LockPayload<Identity: IMFExtendedCameraControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pppayload: *mut *mut u8, pulpayload: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFExtendedCameraControl_Impl::LockPayload(this, core::mem::transmute_copy(&pppayload), core::mem::transmute_copy(&pulpayload)).into()
}
}
unsafe extern "system" fn UnlockPayload<Identity: IMFExtendedCameraControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFExtendedCameraControl_Impl::UnlockPayload(this).into()
}
}
unsafe extern "system" fn CommitSettings<Identity: IMFExtendedCameraControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFExtendedCameraControl_Impl::CommitSettings(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetCapabilities: GetCapabilities::<Identity, OFFSET>,
SetFlags: SetFlags::<Identity, OFFSET>,
GetFlags: GetFlags::<Identity, OFFSET>,
LockPayload: LockPayload::<Identity, OFFSET>,
UnlockPayload: UnlockPayload::<Identity, OFFSET>,
CommitSettings: CommitSettings::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFExtendedCameraControl as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFExtendedCameraControl {}
windows_core::imp::define_interface!(IMFExtendedCameraController, IMFExtendedCameraController_Vtbl, 0xb91ebfee_ca03_4af4_8a82_a31752f4a0fc);
windows_core::imp::interface_hierarchy!(IMFExtendedCameraController, windows_core::IUnknown);
impl IMFExtendedCameraController {
pub unsafe fn GetExtendedCameraControl(&self, dwstreamindex: u32, ulpropertyid: u32) -> windows_core::Result<IMFExtendedCameraControl> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetExtendedCameraControl)(windows_core::Interface::as_raw(self), dwstreamindex, ulpropertyid, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFExtendedCameraController_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetExtendedCameraControl: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFExtendedCameraController_Impl: windows_core::IUnknownImpl {
fn GetExtendedCameraControl(&self, dwstreamindex: u32, ulpropertyid: u32) -> windows_core::Result<IMFExtendedCameraControl>;
}
impl IMFExtendedCameraController_Vtbl {
pub const fn new<Identity: IMFExtendedCameraController_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetExtendedCameraControl<Identity: IMFExtendedCameraController_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, ulpropertyid: u32, ppcontrol: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFExtendedCameraController_Impl::GetExtendedCameraControl(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&ulpropertyid)) {
Ok(ok__) => {
ppcontrol.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetExtendedCameraControl: GetExtendedCameraControl::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFExtendedCameraController as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFExtendedCameraController {}
windows_core::imp::define_interface!(IMFExtendedCameraIntrinsicModel, IMFExtendedCameraIntrinsicModel_Vtbl, 0x5c595e64_4630_4231_855a_12842f733245);
windows_core::imp::interface_hierarchy!(IMFExtendedCameraIntrinsicModel, windows_core::IUnknown);
impl IMFExtendedCameraIntrinsicModel {
pub unsafe fn GetModel(&self, pintrinsicmodel: *mut MFExtendedCameraIntrinsic_IntrinsicModel) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetModel)(windows_core::Interface::as_raw(self), pintrinsicmodel as _).ok() }
}
pub unsafe fn SetModel(&self, pintrinsicmodel: *const MFExtendedCameraIntrinsic_IntrinsicModel) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetModel)(windows_core::Interface::as_raw(self), pintrinsicmodel).ok() }
}
pub unsafe fn GetDistortionModelType(&self) -> windows_core::Result<MFCameraIntrinsic_DistortionModelType> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDistortionModelType)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFExtendedCameraIntrinsicModel_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetModel: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MFExtendedCameraIntrinsic_IntrinsicModel) -> windows_core::HRESULT,
pub SetModel: unsafe extern "system" fn(*mut core::ffi::c_void, *const MFExtendedCameraIntrinsic_IntrinsicModel) -> windows_core::HRESULT,
pub GetDistortionModelType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MFCameraIntrinsic_DistortionModelType) -> windows_core::HRESULT,
}
pub trait IMFExtendedCameraIntrinsicModel_Impl: windows_core::IUnknownImpl {
fn GetModel(&self, pintrinsicmodel: *mut MFExtendedCameraIntrinsic_IntrinsicModel) -> windows_core::Result<()>;
fn SetModel(&self, pintrinsicmodel: *const MFExtendedCameraIntrinsic_IntrinsicModel) -> windows_core::Result<()>;
fn GetDistortionModelType(&self) -> windows_core::Result<MFCameraIntrinsic_DistortionModelType>;
}
impl IMFExtendedCameraIntrinsicModel_Vtbl {
pub const fn new<Identity: IMFExtendedCameraIntrinsicModel_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetModel<Identity: IMFExtendedCameraIntrinsicModel_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pintrinsicmodel: *mut MFExtendedCameraIntrinsic_IntrinsicModel) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFExtendedCameraIntrinsicModel_Impl::GetModel(this, core::mem::transmute_copy(&pintrinsicmodel)).into()
}
}
unsafe extern "system" fn SetModel<Identity: IMFExtendedCameraIntrinsicModel_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pintrinsicmodel: *const MFExtendedCameraIntrinsic_IntrinsicModel) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFExtendedCameraIntrinsicModel_Impl::SetModel(this, core::mem::transmute_copy(&pintrinsicmodel)).into()
}
}
unsafe extern "system" fn GetDistortionModelType<Identity: IMFExtendedCameraIntrinsicModel_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdistortionmodeltype: *mut MFCameraIntrinsic_DistortionModelType) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFExtendedCameraIntrinsicModel_Impl::GetDistortionModelType(this) {
Ok(ok__) => {
pdistortionmodeltype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetModel: GetModel::<Identity, OFFSET>,
SetModel: SetModel::<Identity, OFFSET>,
GetDistortionModelType: GetDistortionModelType::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFExtendedCameraIntrinsicModel as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFExtendedCameraIntrinsicModel {}
windows_core::imp::define_interface!(IMFExtendedCameraIntrinsics, IMFExtendedCameraIntrinsics_Vtbl, 0x687f6dac_6987_4750_a16a_734d1e7a10fe);
windows_core::imp::interface_hierarchy!(IMFExtendedCameraIntrinsics, windows_core::IUnknown);
impl IMFExtendedCameraIntrinsics {
pub unsafe fn InitializeFromBuffer(&self, pbbuffer: &[u8]) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).InitializeFromBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(pbbuffer.as_ptr()), pbbuffer.len().try_into().unwrap()).ok() }
}
pub unsafe fn GetBufferSize(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetBufferSize)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SerializeToBuffer(&self, pbbuffer: *mut u8, pdwbuffersize: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SerializeToBuffer)(windows_core::Interface::as_raw(self), pbbuffer as _, pdwbuffersize as _).ok() }
}
pub unsafe fn GetIntrinsicModelCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetIntrinsicModelCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetIntrinsicModelByIndex(&self, dwindex: u32) -> windows_core::Result<IMFExtendedCameraIntrinsicModel> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetIntrinsicModelByIndex)(windows_core::Interface::as_raw(self), dwindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn AddIntrinsicModel<P0>(&self, pintrinsicmodel: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFExtendedCameraIntrinsicModel>,
{
unsafe { (windows_core::Interface::vtable(self).AddIntrinsicModel)(windows_core::Interface::as_raw(self), pintrinsicmodel.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFExtendedCameraIntrinsics_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub InitializeFromBuffer: unsafe extern "system" fn(*mut core::ffi::c_void, *const u8, u32) -> windows_core::HRESULT,
pub GetBufferSize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub SerializeToBuffer: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u8, *mut u32) -> windows_core::HRESULT,
pub GetIntrinsicModelCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetIntrinsicModelByIndex: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AddIntrinsicModel: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFExtendedCameraIntrinsics_Impl: windows_core::IUnknownImpl {
fn InitializeFromBuffer(&self, pbbuffer: *const u8, dwbuffersize: u32) -> windows_core::Result<()>;
fn GetBufferSize(&self) -> windows_core::Result<u32>;
fn SerializeToBuffer(&self, pbbuffer: *mut u8, pdwbuffersize: *mut u32) -> windows_core::Result<()>;
fn GetIntrinsicModelCount(&self) -> windows_core::Result<u32>;
fn GetIntrinsicModelByIndex(&self, dwindex: u32) -> windows_core::Result<IMFExtendedCameraIntrinsicModel>;
fn AddIntrinsicModel(&self, pintrinsicmodel: windows_core::Ref<IMFExtendedCameraIntrinsicModel>) -> windows_core::Result<()>;
}
impl IMFExtendedCameraIntrinsics_Vtbl {
pub const fn new<Identity: IMFExtendedCameraIntrinsics_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn InitializeFromBuffer<Identity: IMFExtendedCameraIntrinsics_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbbuffer: *const u8, dwbuffersize: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFExtendedCameraIntrinsics_Impl::InitializeFromBuffer(this, core::mem::transmute_copy(&pbbuffer), core::mem::transmute_copy(&dwbuffersize)).into()
}
}
unsafe extern "system" fn GetBufferSize<Identity: IMFExtendedCameraIntrinsics_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwbuffersize: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFExtendedCameraIntrinsics_Impl::GetBufferSize(this) {
Ok(ok__) => {
pdwbuffersize.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SerializeToBuffer<Identity: IMFExtendedCameraIntrinsics_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbbuffer: *mut u8, pdwbuffersize: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFExtendedCameraIntrinsics_Impl::SerializeToBuffer(this, core::mem::transmute_copy(&pbbuffer), core::mem::transmute_copy(&pdwbuffersize)).into()
}
}
unsafe extern "system" fn GetIntrinsicModelCount<Identity: IMFExtendedCameraIntrinsics_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwcount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFExtendedCameraIntrinsics_Impl::GetIntrinsicModelCount(this) {
Ok(ok__) => {
pdwcount.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetIntrinsicModelByIndex<Identity: IMFExtendedCameraIntrinsics_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwindex: u32, ppintrinsicmodel: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFExtendedCameraIntrinsics_Impl::GetIntrinsicModelByIndex(this, core::mem::transmute_copy(&dwindex)) {
Ok(ok__) => {
ppintrinsicmodel.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn AddIntrinsicModel<Identity: IMFExtendedCameraIntrinsics_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pintrinsicmodel: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFExtendedCameraIntrinsics_Impl::AddIntrinsicModel(this, core::mem::transmute_copy(&pintrinsicmodel)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
InitializeFromBuffer: InitializeFromBuffer::<Identity, OFFSET>,
GetBufferSize: GetBufferSize::<Identity, OFFSET>,
SerializeToBuffer: SerializeToBuffer::<Identity, OFFSET>,
GetIntrinsicModelCount: GetIntrinsicModelCount::<Identity, OFFSET>,
GetIntrinsicModelByIndex: GetIntrinsicModelByIndex::<Identity, OFFSET>,
AddIntrinsicModel: AddIntrinsicModel::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFExtendedCameraIntrinsics as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFExtendedCameraIntrinsics {}
windows_core::imp::define_interface!(IMFExtendedCameraIntrinsicsDistortionModel6KT, IMFExtendedCameraIntrinsicsDistortionModel6KT_Vtbl, 0x74c2653b_5f55_4eb1_9f0f_18b8f68b7d3d);
windows_core::imp::interface_hierarchy!(IMFExtendedCameraIntrinsicsDistortionModel6KT, windows_core::IUnknown);
impl IMFExtendedCameraIntrinsicsDistortionModel6KT {
pub unsafe fn GetDistortionModel(&self, pdistortionmodel: *mut MFCameraIntrinsic_DistortionModel6KT) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetDistortionModel)(windows_core::Interface::as_raw(self), pdistortionmodel as _).ok() }
}
pub unsafe fn SetDistortionModel(&self, pdistortionmodel: *const MFCameraIntrinsic_DistortionModel6KT) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetDistortionModel)(windows_core::Interface::as_raw(self), pdistortionmodel).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFExtendedCameraIntrinsicsDistortionModel6KT_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetDistortionModel: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MFCameraIntrinsic_DistortionModel6KT) -> windows_core::HRESULT,
pub SetDistortionModel: unsafe extern "system" fn(*mut core::ffi::c_void, *const MFCameraIntrinsic_DistortionModel6KT) -> windows_core::HRESULT,
}
pub trait IMFExtendedCameraIntrinsicsDistortionModel6KT_Impl: windows_core::IUnknownImpl {
fn GetDistortionModel(&self, pdistortionmodel: *mut MFCameraIntrinsic_DistortionModel6KT) -> windows_core::Result<()>;
fn SetDistortionModel(&self, pdistortionmodel: *const MFCameraIntrinsic_DistortionModel6KT) -> windows_core::Result<()>;
}
impl IMFExtendedCameraIntrinsicsDistortionModel6KT_Vtbl {
pub const fn new<Identity: IMFExtendedCameraIntrinsicsDistortionModel6KT_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetDistortionModel<Identity: IMFExtendedCameraIntrinsicsDistortionModel6KT_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdistortionmodel: *mut MFCameraIntrinsic_DistortionModel6KT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFExtendedCameraIntrinsicsDistortionModel6KT_Impl::GetDistortionModel(this, core::mem::transmute_copy(&pdistortionmodel)).into()
}
}
unsafe extern "system" fn SetDistortionModel<Identity: IMFExtendedCameraIntrinsicsDistortionModel6KT_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdistortionmodel: *const MFCameraIntrinsic_DistortionModel6KT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFExtendedCameraIntrinsicsDistortionModel6KT_Impl::SetDistortionModel(this, core::mem::transmute_copy(&pdistortionmodel)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetDistortionModel: GetDistortionModel::<Identity, OFFSET>,
SetDistortionModel: SetDistortionModel::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFExtendedCameraIntrinsicsDistortionModel6KT as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFExtendedCameraIntrinsicsDistortionModel6KT {}
windows_core::imp::define_interface!(IMFExtendedCameraIntrinsicsDistortionModelArcTan, IMFExtendedCameraIntrinsicsDistortionModelArcTan_Vtbl, 0x812d5f95_b572_45dc_bafc_ae24199ddda8);
windows_core::imp::interface_hierarchy!(IMFExtendedCameraIntrinsicsDistortionModelArcTan, windows_core::IUnknown);
impl IMFExtendedCameraIntrinsicsDistortionModelArcTan {
pub unsafe fn GetDistortionModel(&self, pdistortionmodel: *mut MFCameraIntrinsic_DistortionModelArcTan) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetDistortionModel)(windows_core::Interface::as_raw(self), pdistortionmodel as _).ok() }
}
pub unsafe fn SetDistortionModel(&self, pdistortionmodel: *const MFCameraIntrinsic_DistortionModelArcTan) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetDistortionModel)(windows_core::Interface::as_raw(self), pdistortionmodel).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFExtendedCameraIntrinsicsDistortionModelArcTan_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetDistortionModel: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MFCameraIntrinsic_DistortionModelArcTan) -> windows_core::HRESULT,
pub SetDistortionModel: unsafe extern "system" fn(*mut core::ffi::c_void, *const MFCameraIntrinsic_DistortionModelArcTan) -> windows_core::HRESULT,
}
pub trait IMFExtendedCameraIntrinsicsDistortionModelArcTan_Impl: windows_core::IUnknownImpl {
fn GetDistortionModel(&self, pdistortionmodel: *mut MFCameraIntrinsic_DistortionModelArcTan) -> windows_core::Result<()>;
fn SetDistortionModel(&self, pdistortionmodel: *const MFCameraIntrinsic_DistortionModelArcTan) -> windows_core::Result<()>;
}
impl IMFExtendedCameraIntrinsicsDistortionModelArcTan_Vtbl {
pub const fn new<Identity: IMFExtendedCameraIntrinsicsDistortionModelArcTan_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetDistortionModel<Identity: IMFExtendedCameraIntrinsicsDistortionModelArcTan_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdistortionmodel: *mut MFCameraIntrinsic_DistortionModelArcTan) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFExtendedCameraIntrinsicsDistortionModelArcTan_Impl::GetDistortionModel(this, core::mem::transmute_copy(&pdistortionmodel)).into()
}
}
unsafe extern "system" fn SetDistortionModel<Identity: IMFExtendedCameraIntrinsicsDistortionModelArcTan_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdistortionmodel: *const MFCameraIntrinsic_DistortionModelArcTan) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFExtendedCameraIntrinsicsDistortionModelArcTan_Impl::SetDistortionModel(this, core::mem::transmute_copy(&pdistortionmodel)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetDistortionModel: GetDistortionModel::<Identity, OFFSET>,
SetDistortionModel: SetDistortionModel::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFExtendedCameraIntrinsicsDistortionModelArcTan as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFExtendedCameraIntrinsicsDistortionModelArcTan {}
windows_core::imp::define_interface!(IMFExtendedDRMTypeSupport, IMFExtendedDRMTypeSupport_Vtbl, 0x332ec562_3758_468d_a784_e38f23552128);
windows_core::imp::interface_hierarchy!(IMFExtendedDRMTypeSupport, windows_core::IUnknown);
impl IMFExtendedDRMTypeSupport {
pub unsafe fn IsTypeSupportedEx(&self, r#type: &windows_core::BSTR, keysystem: &windows_core::BSTR) -> windows_core::Result<MF_MEDIA_ENGINE_CANPLAY> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).IsTypeSupportedEx)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(r#type), core::mem::transmute_copy(keysystem), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFExtendedDRMTypeSupport_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub IsTypeSupportedEx: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut MF_MEDIA_ENGINE_CANPLAY) -> windows_core::HRESULT,
}
pub trait IMFExtendedDRMTypeSupport_Impl: windows_core::IUnknownImpl {
fn IsTypeSupportedEx(&self, r#type: &windows_core::BSTR, keysystem: &windows_core::BSTR) -> windows_core::Result<MF_MEDIA_ENGINE_CANPLAY>;
}
impl IMFExtendedDRMTypeSupport_Vtbl {
pub const fn new<Identity: IMFExtendedDRMTypeSupport_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn IsTypeSupportedEx<Identity: IMFExtendedDRMTypeSupport_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, r#type: *mut core::ffi::c_void, keysystem: *mut core::ffi::c_void, panswer: *mut MF_MEDIA_ENGINE_CANPLAY) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFExtendedDRMTypeSupport_Impl::IsTypeSupportedEx(this, core::mem::transmute(&r#type), core::mem::transmute(&keysystem)) {
Ok(ok__) => {
panswer.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), IsTypeSupportedEx: IsTypeSupportedEx::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFExtendedDRMTypeSupport as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFExtendedDRMTypeSupport {}
windows_core::imp::define_interface!(IMFFieldOfUseMFTUnlock, IMFFieldOfUseMFTUnlock_Vtbl, 0x508e71d3_ec66_4fc3_8775_b4b9ed6ba847);
windows_core::imp::interface_hierarchy!(IMFFieldOfUseMFTUnlock, windows_core::IUnknown);
impl IMFFieldOfUseMFTUnlock {
pub unsafe fn Unlock<P0>(&self, punkmft: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).Unlock)(windows_core::Interface::as_raw(self), punkmft.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFFieldOfUseMFTUnlock_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub Unlock: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFFieldOfUseMFTUnlock_Impl: windows_core::IUnknownImpl {
fn Unlock(&self, punkmft: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
}
impl IMFFieldOfUseMFTUnlock_Vtbl {
pub const fn new<Identity: IMFFieldOfUseMFTUnlock_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Unlock<Identity: IMFFieldOfUseMFTUnlock_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, punkmft: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFFieldOfUseMFTUnlock_Impl::Unlock(this, core::mem::transmute_copy(&punkmft)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), Unlock: Unlock::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFFieldOfUseMFTUnlock as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFFieldOfUseMFTUnlock {}
windows_core::imp::define_interface!(IMFFinalizableMediaSink, IMFFinalizableMediaSink_Vtbl, 0xeaecb74a_9a50_42ce_9541_6a7f57aa4ad7);
impl core::ops::Deref for IMFFinalizableMediaSink {
type Target = IMFMediaSink;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFFinalizableMediaSink, windows_core::IUnknown, IMFMediaSink);
impl IMFFinalizableMediaSink {
pub unsafe fn BeginFinalize<P0, P1>(&self, pcallback: P0, punkstate: P1) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncCallback>,
P1: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).BeginFinalize)(windows_core::Interface::as_raw(self), pcallback.param().abi(), punkstate.param().abi()).ok() }
}
pub unsafe fn EndFinalize<P0>(&self, presult: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncResult>,
{
unsafe { (windows_core::Interface::vtable(self).EndFinalize)(windows_core::Interface::as_raw(self), presult.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFFinalizableMediaSink_Vtbl {
pub base__: IMFMediaSink_Vtbl,
pub BeginFinalize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub EndFinalize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFFinalizableMediaSink_Impl: IMFMediaSink_Impl {
fn BeginFinalize(&self, pcallback: windows_core::Ref<IMFAsyncCallback>, punkstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn EndFinalize(&self, presult: windows_core::Ref<IMFAsyncResult>) -> windows_core::Result<()>;
}
impl IMFFinalizableMediaSink_Vtbl {
pub const fn new<Identity: IMFFinalizableMediaSink_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginFinalize<Identity: IMFFinalizableMediaSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFFinalizableMediaSink_Impl::BeginFinalize(this, core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into()
}
}
unsafe extern "system" fn EndFinalize<Identity: IMFFinalizableMediaSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFFinalizableMediaSink_Impl::EndFinalize(this, core::mem::transmute_copy(&presult)).into()
}
}
Self {
base__: IMFMediaSink_Vtbl::new::<Identity, OFFSET>(),
BeginFinalize: BeginFinalize::<Identity, OFFSET>,
EndFinalize: EndFinalize::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFFinalizableMediaSink as windows_core::Interface>::IID || iid == &<IMFMediaSink as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFFinalizableMediaSink {}
windows_core::imp::define_interface!(IMFGetService, IMFGetService_Vtbl, 0xfa993888_4383_415a_a930_dd472a8cf6f7);
windows_core::imp::interface_hierarchy!(IMFGetService, windows_core::IUnknown);
impl IMFGetService {
pub unsafe fn GetService<T>(&self, guidservice: *const windows_core::GUID) -> windows_core::Result<T>
where
T: windows_core::Interface,
{
let mut result__ = core::ptr::null_mut();
unsafe { (windows_core::Interface::vtable(self).GetService)(windows_core::Interface::as_raw(self), guidservice, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFGetService_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetService: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFGetService_Impl: windows_core::IUnknownImpl {
fn GetService(&self, guidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
}
impl IMFGetService_Vtbl {
pub const fn new<Identity: IMFGetService_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetService<Identity: IMFGetService_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFGetService_Impl::GetService(this, core::mem::transmute_copy(&guidservice), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobject)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetService: GetService::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFGetService as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFGetService {}
windows_core::imp::define_interface!(IMFHDCPStatus, IMFHDCPStatus_Vtbl, 0xde400f54_5bf1_40cf_8964_0bea136b1e3d);
windows_core::imp::interface_hierarchy!(IMFHDCPStatus, windows_core::IUnknown);
impl IMFHDCPStatus {
pub unsafe fn Query(&self, pstatus: *mut MF_HDCP_STATUS, pfstatus: *mut windows_core::BOOL) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Query)(windows_core::Interface::as_raw(self), pstatus as _, pfstatus as _).ok() }
}
pub unsafe fn Set(&self, status: MF_HDCP_STATUS) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Set)(windows_core::Interface::as_raw(self), status).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFHDCPStatus_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub Query: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MF_HDCP_STATUS, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub Set: unsafe extern "system" fn(*mut core::ffi::c_void, MF_HDCP_STATUS) -> windows_core::HRESULT,
}
pub trait IMFHDCPStatus_Impl: windows_core::IUnknownImpl {
fn Query(&self, pstatus: *mut MF_HDCP_STATUS, pfstatus: *mut windows_core::BOOL) -> windows_core::Result<()>;
fn Set(&self, status: MF_HDCP_STATUS) -> windows_core::Result<()>;
}
impl IMFHDCPStatus_Vtbl {
pub const fn new<Identity: IMFHDCPStatus_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Query<Identity: IMFHDCPStatus_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pstatus: *mut MF_HDCP_STATUS, pfstatus: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFHDCPStatus_Impl::Query(this, core::mem::transmute_copy(&pstatus), core::mem::transmute_copy(&pfstatus)).into()
}
}
unsafe extern "system" fn Set<Identity: IMFHDCPStatus_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, status: MF_HDCP_STATUS) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFHDCPStatus_Impl::Set(this, core::mem::transmute_copy(&status)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), Query: Query::<Identity, OFFSET>, Set: Set::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFHDCPStatus as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFHDCPStatus {}
windows_core::imp::define_interface!(IMFHttpDownloadRequest, IMFHttpDownloadRequest_Vtbl, 0xf779fddf_26e7_4270_8a8b_b983d1859de0);
windows_core::imp::interface_hierarchy!(IMFHttpDownloadRequest, windows_core::IUnknown);
impl IMFHttpDownloadRequest {
pub unsafe fn AddHeader<P0>(&self, szheader: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).AddHeader)(windows_core::Interface::as_raw(self), szheader.param().abi()).ok() }
}
pub unsafe fn BeginSendRequest<P2, P3>(&self, pbpayload: Option<&[u8]>, pcallback: P2, punkstate: P3) -> windows_core::Result<()>
where
P2: windows_core::Param<IMFAsyncCallback>,
P3: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).BeginSendRequest)(windows_core::Interface::as_raw(self), core::mem::transmute(pbpayload.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbpayload.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcallback.param().abi(), punkstate.param().abi()).ok() }
}
pub unsafe fn EndSendRequest<P0>(&self, presult: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncResult>,
{
unsafe { (windows_core::Interface::vtable(self).EndSendRequest)(windows_core::Interface::as_raw(self), presult.param().abi()).ok() }
}
pub unsafe fn BeginReceiveResponse<P0, P1>(&self, pcallback: P0, punkstate: P1) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncCallback>,
P1: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).BeginReceiveResponse)(windows_core::Interface::as_raw(self), pcallback.param().abi(), punkstate.param().abi()).ok() }
}
pub unsafe fn EndReceiveResponse<P0>(&self, presult: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncResult>,
{
unsafe { (windows_core::Interface::vtable(self).EndReceiveResponse)(windows_core::Interface::as_raw(self), presult.param().abi()).ok() }
}
pub unsafe fn BeginReadPayload<P2, P3>(&self, pb: &mut [u8], pcallback: P2, punkstate: P3) -> windows_core::Result<()>
where
P2: windows_core::Param<IMFAsyncCallback>,
P3: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).BeginReadPayload)(windows_core::Interface::as_raw(self), core::mem::transmute(pb.as_ptr()), pb.len().try_into().unwrap(), pcallback.param().abi(), punkstate.param().abi()).ok() }
}
pub unsafe fn EndReadPayload<P0>(&self, presult: P0, pqwoffset: *mut u64, pcbread: *mut u32) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncResult>,
{
unsafe { (windows_core::Interface::vtable(self).EndReadPayload)(windows_core::Interface::as_raw(self), presult.param().abi(), pqwoffset as _, pcbread as _).ok() }
}
pub unsafe fn QueryHeader<P0>(&self, szheadername: P0, dwindex: u32) -> windows_core::Result<windows_core::PWSTR>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).QueryHeader)(windows_core::Interface::as_raw(self), szheadername.param().abi(), dwindex, &mut result__).map(|| result__)
}
}
pub unsafe fn GetURL(&self) -> windows_core::Result<windows_core::PWSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetURL)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn HasNullSourceOrigin(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).HasNullSourceOrigin)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetTimeSeekResult(&self, pqwstarttime: *mut u64, pqwstoptime: *mut u64, pqwduration: *mut u64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetTimeSeekResult)(windows_core::Interface::as_raw(self), pqwstarttime as _, pqwstoptime as _, pqwduration as _).ok() }
}
pub unsafe fn GetHttpStatus(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetHttpStatus)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetAtEndOfPayload(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetAtEndOfPayload)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetTotalLength(&self) -> windows_core::Result<u64> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetTotalLength)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetRangeEndOffset(&self) -> windows_core::Result<u64> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetRangeEndOffset)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn Close(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFHttpDownloadRequest_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub AddHeader: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR) -> windows_core::HRESULT,
pub BeginSendRequest: unsafe extern "system" fn(*mut core::ffi::c_void, *const u8, u32, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub EndSendRequest: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub BeginReceiveResponse: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub EndReceiveResponse: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub BeginReadPayload: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u8, u32, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub EndReadPayload: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut u64, *mut u32) -> windows_core::HRESULT,
pub QueryHeader: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, u32, *mut windows_core::PWSTR) -> windows_core::HRESULT,
pub GetURL: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT,
pub HasNullSourceOrigin: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub GetTimeSeekResult: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64, *mut u64, *mut u64) -> windows_core::HRESULT,
pub GetHttpStatus: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetAtEndOfPayload: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub GetTotalLength: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
pub GetRangeEndOffset: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
pub Close: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFHttpDownloadRequest_Impl: windows_core::IUnknownImpl {
fn AddHeader(&self, szheader: &windows_core::PCWSTR) -> windows_core::Result<()>;
fn BeginSendRequest(&self, pbpayload: *const u8, cbpayload: u32, pcallback: windows_core::Ref<IMFAsyncCallback>, punkstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn EndSendRequest(&self, presult: windows_core::Ref<IMFAsyncResult>) -> windows_core::Result<()>;
fn BeginReceiveResponse(&self, pcallback: windows_core::Ref<IMFAsyncCallback>, punkstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn EndReceiveResponse(&self, presult: windows_core::Ref<IMFAsyncResult>) -> windows_core::Result<()>;
fn BeginReadPayload(&self, pb: *mut u8, cb: u32, pcallback: windows_core::Ref<IMFAsyncCallback>, punkstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn EndReadPayload(&self, presult: windows_core::Ref<IMFAsyncResult>, pqwoffset: *mut u64, pcbread: *mut u32) -> windows_core::Result<()>;
fn QueryHeader(&self, szheadername: &windows_core::PCWSTR, dwindex: u32) -> windows_core::Result<windows_core::PWSTR>;
fn GetURL(&self) -> windows_core::Result<windows_core::PWSTR>;
fn HasNullSourceOrigin(&self) -> windows_core::Result<windows_core::BOOL>;
fn GetTimeSeekResult(&self, pqwstarttime: *mut u64, pqwstoptime: *mut u64, pqwduration: *mut u64) -> windows_core::Result<()>;
fn GetHttpStatus(&self) -> windows_core::Result<u32>;
fn GetAtEndOfPayload(&self) -> windows_core::Result<windows_core::BOOL>;
fn GetTotalLength(&self) -> windows_core::Result<u64>;
fn GetRangeEndOffset(&self) -> windows_core::Result<u64>;
fn Close(&self) -> windows_core::Result<()>;
}
impl IMFHttpDownloadRequest_Vtbl {
pub const fn new<Identity: IMFHttpDownloadRequest_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn AddHeader<Identity: IMFHttpDownloadRequest_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, szheader: windows_core::PCWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFHttpDownloadRequest_Impl::AddHeader(this, core::mem::transmute(&szheader)).into()
}
}
unsafe extern "system" fn BeginSendRequest<Identity: IMFHttpDownloadRequest_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbpayload: *const u8, cbpayload: u32, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFHttpDownloadRequest_Impl::BeginSendRequest(this, core::mem::transmute_copy(&pbpayload), core::mem::transmute_copy(&cbpayload), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into()
}
}
unsafe extern "system" fn EndSendRequest<Identity: IMFHttpDownloadRequest_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFHttpDownloadRequest_Impl::EndSendRequest(this, core::mem::transmute_copy(&presult)).into()
}
}
unsafe extern "system" fn BeginReceiveResponse<Identity: IMFHttpDownloadRequest_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFHttpDownloadRequest_Impl::BeginReceiveResponse(this, core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into()
}
}
unsafe extern "system" fn EndReceiveResponse<Identity: IMFHttpDownloadRequest_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFHttpDownloadRequest_Impl::EndReceiveResponse(this, core::mem::transmute_copy(&presult)).into()
}
}
unsafe extern "system" fn BeginReadPayload<Identity: IMFHttpDownloadRequest_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pb: *mut u8, cb: u32, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFHttpDownloadRequest_Impl::BeginReadPayload(this, core::mem::transmute_copy(&pb), core::mem::transmute_copy(&cb), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into()
}
}
unsafe extern "system" fn EndReadPayload<Identity: IMFHttpDownloadRequest_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, pqwoffset: *mut u64, pcbread: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFHttpDownloadRequest_Impl::EndReadPayload(this, core::mem::transmute_copy(&presult), core::mem::transmute_copy(&pqwoffset), core::mem::transmute_copy(&pcbread)).into()
}
}
unsafe extern "system" fn QueryHeader<Identity: IMFHttpDownloadRequest_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, szheadername: windows_core::PCWSTR, dwindex: u32, ppszheadervalue: *mut windows_core::PWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFHttpDownloadRequest_Impl::QueryHeader(this, core::mem::transmute(&szheadername), core::mem::transmute_copy(&dwindex)) {
Ok(ok__) => {
ppszheadervalue.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetURL<Identity: IMFHttpDownloadRequest_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppszurl: *mut windows_core::PWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFHttpDownloadRequest_Impl::GetURL(this) {
Ok(ok__) => {
ppszurl.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn HasNullSourceOrigin<Identity: IMFHttpDownloadRequest_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pfnullsourceorigin: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFHttpDownloadRequest_Impl::HasNullSourceOrigin(this) {
Ok(ok__) => {
pfnullsourceorigin.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetTimeSeekResult<Identity: IMFHttpDownloadRequest_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pqwstarttime: *mut u64, pqwstoptime: *mut u64, pqwduration: *mut u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFHttpDownloadRequest_Impl::GetTimeSeekResult(this, core::mem::transmute_copy(&pqwstarttime), core::mem::transmute_copy(&pqwstoptime), core::mem::transmute_copy(&pqwduration)).into()
}
}
unsafe extern "system" fn GetHttpStatus<Identity: IMFHttpDownloadRequest_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwhttpstatus: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFHttpDownloadRequest_Impl::GetHttpStatus(this) {
Ok(ok__) => {
pdwhttpstatus.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetAtEndOfPayload<Identity: IMFHttpDownloadRequest_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pfatendofpayload: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFHttpDownloadRequest_Impl::GetAtEndOfPayload(this) {
Ok(ok__) => {
pfatendofpayload.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetTotalLength<Identity: IMFHttpDownloadRequest_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pqwtotallength: *mut u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFHttpDownloadRequest_Impl::GetTotalLength(this) {
Ok(ok__) => {
pqwtotallength.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetRangeEndOffset<Identity: IMFHttpDownloadRequest_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pqwrangeend: *mut u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFHttpDownloadRequest_Impl::GetRangeEndOffset(this) {
Ok(ok__) => {
pqwrangeend.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Close<Identity: IMFHttpDownloadRequest_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFHttpDownloadRequest_Impl::Close(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
AddHeader: AddHeader::<Identity, OFFSET>,
BeginSendRequest: BeginSendRequest::<Identity, OFFSET>,
EndSendRequest: EndSendRequest::<Identity, OFFSET>,
BeginReceiveResponse: BeginReceiveResponse::<Identity, OFFSET>,
EndReceiveResponse: EndReceiveResponse::<Identity, OFFSET>,
BeginReadPayload: BeginReadPayload::<Identity, OFFSET>,
EndReadPayload: EndReadPayload::<Identity, OFFSET>,
QueryHeader: QueryHeader::<Identity, OFFSET>,
GetURL: GetURL::<Identity, OFFSET>,
HasNullSourceOrigin: HasNullSourceOrigin::<Identity, OFFSET>,
GetTimeSeekResult: GetTimeSeekResult::<Identity, OFFSET>,
GetHttpStatus: GetHttpStatus::<Identity, OFFSET>,
GetAtEndOfPayload: GetAtEndOfPayload::<Identity, OFFSET>,
GetTotalLength: GetTotalLength::<Identity, OFFSET>,
GetRangeEndOffset: GetRangeEndOffset::<Identity, OFFSET>,
Close: Close::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFHttpDownloadRequest as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFHttpDownloadRequest {}
windows_core::imp::define_interface!(IMFHttpDownloadSession, IMFHttpDownloadSession_Vtbl, 0x71fa9a2c_53ce_4662_a132_1a7e8cbf62db);
windows_core::imp::interface_hierarchy!(IMFHttpDownloadSession, windows_core::IUnknown);
impl IMFHttpDownloadSession {
pub unsafe fn SetServer<P0>(&self, szservername: P0, nport: u32) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).SetServer)(windows_core::Interface::as_raw(self), szservername.param().abi(), nport).ok() }
}
pub unsafe fn CreateRequest<P0, P3, P4>(&self, szobjectname: P0, fbypassproxycache: bool, fsecure: bool, szverb: P3, szreferrer: P4) -> windows_core::Result<IMFHttpDownloadRequest>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P3: windows_core::Param<windows_core::PCWSTR>,
P4: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateRequest)(windows_core::Interface::as_raw(self), szobjectname.param().abi(), fbypassproxycache.into(), fsecure.into(), szverb.param().abi(), szreferrer.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn Close(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFHttpDownloadSession_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetServer: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, u32) -> windows_core::HRESULT,
pub CreateRequest: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, windows_core::BOOL, windows_core::BOOL, windows_core::PCWSTR, windows_core::PCWSTR, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Close: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFHttpDownloadSession_Impl: windows_core::IUnknownImpl {
fn SetServer(&self, szservername: &windows_core::PCWSTR, nport: u32) -> windows_core::Result<()>;
fn CreateRequest(&self, szobjectname: &windows_core::PCWSTR, fbypassproxycache: windows_core::BOOL, fsecure: windows_core::BOOL, szverb: &windows_core::PCWSTR, szreferrer: &windows_core::PCWSTR) -> windows_core::Result<IMFHttpDownloadRequest>;
fn Close(&self) -> windows_core::Result<()>;
}
impl IMFHttpDownloadSession_Vtbl {
pub const fn new<Identity: IMFHttpDownloadSession_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetServer<Identity: IMFHttpDownloadSession_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, szservername: windows_core::PCWSTR, nport: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFHttpDownloadSession_Impl::SetServer(this, core::mem::transmute(&szservername), core::mem::transmute_copy(&nport)).into()
}
}
unsafe extern "system" fn CreateRequest<Identity: IMFHttpDownloadSession_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, szobjectname: windows_core::PCWSTR, fbypassproxycache: windows_core::BOOL, fsecure: windows_core::BOOL, szverb: windows_core::PCWSTR, szreferrer: windows_core::PCWSTR, pprequest: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFHttpDownloadSession_Impl::CreateRequest(this, core::mem::transmute(&szobjectname), core::mem::transmute_copy(&fbypassproxycache), core::mem::transmute_copy(&fsecure), core::mem::transmute(&szverb), core::mem::transmute(&szreferrer)) {
Ok(ok__) => {
pprequest.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Close<Identity: IMFHttpDownloadSession_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFHttpDownloadSession_Impl::Close(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetServer: SetServer::<Identity, OFFSET>,
CreateRequest: CreateRequest::<Identity, OFFSET>,
Close: Close::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFHttpDownloadSession as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFHttpDownloadSession {}
windows_core::imp::define_interface!(IMFHttpDownloadSessionProvider, IMFHttpDownloadSessionProvider_Vtbl, 0x1b4cf4b9_3a16_4115_839d_03cc5c99df01);
windows_core::imp::interface_hierarchy!(IMFHttpDownloadSessionProvider, windows_core::IUnknown);
impl IMFHttpDownloadSessionProvider {
pub unsafe fn CreateHttpDownloadSession<P0>(&self, wszscheme: P0) -> windows_core::Result<IMFHttpDownloadSession>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateHttpDownloadSession)(windows_core::Interface::as_raw(self), wszscheme.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFHttpDownloadSessionProvider_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub CreateHttpDownloadSession: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFHttpDownloadSessionProvider_Impl: windows_core::IUnknownImpl {
fn CreateHttpDownloadSession(&self, wszscheme: &windows_core::PCWSTR) -> windows_core::Result<IMFHttpDownloadSession>;
}
impl IMFHttpDownloadSessionProvider_Vtbl {
pub const fn new<Identity: IMFHttpDownloadSessionProvider_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateHttpDownloadSession<Identity: IMFHttpDownloadSessionProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, wszscheme: windows_core::PCWSTR, ppdownloadsession: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFHttpDownloadSessionProvider_Impl::CreateHttpDownloadSession(this, core::mem::transmute(&wszscheme)) {
Ok(ok__) => {
ppdownloadsession.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), CreateHttpDownloadSession: CreateHttpDownloadSession::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFHttpDownloadSessionProvider as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFHttpDownloadSessionProvider {}
windows_core::imp::define_interface!(IMFImageSharingEngine, IMFImageSharingEngine_Vtbl, 0xcfa0ae8e_7e1c_44d2_ae68_fc4c148a6354);
windows_core::imp::interface_hierarchy!(IMFImageSharingEngine, windows_core::IUnknown);
impl IMFImageSharingEngine {
pub unsafe fn SetSource<P0>(&self, pstream: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).SetSource)(windows_core::Interface::as_raw(self), pstream.param().abi()).ok() }
}
pub unsafe fn GetDevice(&self, pdevice: *mut DEVICE_INFO) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetDevice)(windows_core::Interface::as_raw(self), core::mem::transmute(pdevice)).ok() }
}
pub unsafe fn Shutdown(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Shutdown)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFImageSharingEngine_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetSource: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDevice: unsafe extern "system" fn(*mut core::ffi::c_void, *mut DEVICE_INFO) -> windows_core::HRESULT,
pub Shutdown: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFImageSharingEngine_Impl: windows_core::IUnknownImpl {
fn SetSource(&self, pstream: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn GetDevice(&self, pdevice: *mut DEVICE_INFO) -> windows_core::Result<()>;
fn Shutdown(&self) -> windows_core::Result<()>;
}
impl IMFImageSharingEngine_Vtbl {
pub const fn new<Identity: IMFImageSharingEngine_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetSource<Identity: IMFImageSharingEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFImageSharingEngine_Impl::SetSource(this, core::mem::transmute_copy(&pstream)).into()
}
}
unsafe extern "system" fn GetDevice<Identity: IMFImageSharingEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdevice: *mut DEVICE_INFO) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFImageSharingEngine_Impl::GetDevice(this, core::mem::transmute_copy(&pdevice)).into()
}
}
unsafe extern "system" fn Shutdown<Identity: IMFImageSharingEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFImageSharingEngine_Impl::Shutdown(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetSource: SetSource::<Identity, OFFSET>,
GetDevice: GetDevice::<Identity, OFFSET>,
Shutdown: Shutdown::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFImageSharingEngine as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFImageSharingEngine {}
windows_core::imp::define_interface!(IMFImageSharingEngineClassFactory, IMFImageSharingEngineClassFactory_Vtbl, 0x1fc55727_a7fb_4fc8_83ae_8af024990af1);
windows_core::imp::interface_hierarchy!(IMFImageSharingEngineClassFactory, windows_core::IUnknown);
impl IMFImageSharingEngineClassFactory {
pub unsafe fn CreateInstanceFromUDN(&self, puniquedevicename: &windows_core::BSTR) -> windows_core::Result<IMFImageSharingEngine> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateInstanceFromUDN)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(puniquedevicename), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFImageSharingEngineClassFactory_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub CreateInstanceFromUDN: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFImageSharingEngineClassFactory_Impl: windows_core::IUnknownImpl {
fn CreateInstanceFromUDN(&self, puniquedevicename: &windows_core::BSTR) -> windows_core::Result<IMFImageSharingEngine>;
}
impl IMFImageSharingEngineClassFactory_Vtbl {
pub const fn new<Identity: IMFImageSharingEngineClassFactory_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateInstanceFromUDN<Identity: IMFImageSharingEngineClassFactory_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, puniquedevicename: *mut core::ffi::c_void, ppengine: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFImageSharingEngineClassFactory_Impl::CreateInstanceFromUDN(this, core::mem::transmute(&puniquedevicename)) {
Ok(ok__) => {
ppengine.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), CreateInstanceFromUDN: CreateInstanceFromUDN::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFImageSharingEngineClassFactory as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFImageSharingEngineClassFactory {}
windows_core::imp::define_interface!(IMFInputTrustAuthority, IMFInputTrustAuthority_Vtbl, 0xd19f8e98_b126_4446_890c_5dcb7ad71453);
windows_core::imp::interface_hierarchy!(IMFInputTrustAuthority, windows_core::IUnknown);
impl IMFInputTrustAuthority {
pub unsafe fn GetDecrypter(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetDecrypter)(windows_core::Interface::as_raw(self), riid, ppv as _).ok() }
}
pub unsafe fn RequestAccess(&self, action: MFPOLICYMANAGER_ACTION) -> windows_core::Result<IMFActivate> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).RequestAccess)(windows_core::Interface::as_raw(self), action, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetPolicy(&self, action: MFPOLICYMANAGER_ACTION) -> windows_core::Result<IMFOutputPolicy> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetPolicy)(windows_core::Interface::as_raw(self), action, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn BindAccess(&self, pparam: *const MFINPUTTRUSTAUTHORITY_ACCESS_PARAMS) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).BindAccess)(windows_core::Interface::as_raw(self), pparam).ok() }
}
pub unsafe fn UpdateAccess(&self, pparam: *const MFINPUTTRUSTAUTHORITY_ACCESS_PARAMS) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).UpdateAccess)(windows_core::Interface::as_raw(self), pparam).ok() }
}
pub unsafe fn Reset(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFInputTrustAuthority_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetDecrypter: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RequestAccess: unsafe extern "system" fn(*mut core::ffi::c_void, MFPOLICYMANAGER_ACTION, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetPolicy: unsafe extern "system" fn(*mut core::ffi::c_void, MFPOLICYMANAGER_ACTION, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub BindAccess: unsafe extern "system" fn(*mut core::ffi::c_void, *const MFINPUTTRUSTAUTHORITY_ACCESS_PARAMS) -> windows_core::HRESULT,
pub UpdateAccess: unsafe extern "system" fn(*mut core::ffi::c_void, *const MFINPUTTRUSTAUTHORITY_ACCESS_PARAMS) -> windows_core::HRESULT,
pub Reset: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFInputTrustAuthority_Impl: windows_core::IUnknownImpl {
fn GetDecrypter(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
fn RequestAccess(&self, action: MFPOLICYMANAGER_ACTION) -> windows_core::Result<IMFActivate>;
fn GetPolicy(&self, action: MFPOLICYMANAGER_ACTION) -> windows_core::Result<IMFOutputPolicy>;
fn BindAccess(&self, pparam: *const MFINPUTTRUSTAUTHORITY_ACCESS_PARAMS) -> windows_core::Result<()>;
fn UpdateAccess(&self, pparam: *const MFINPUTTRUSTAUTHORITY_ACCESS_PARAMS) -> windows_core::Result<()>;
fn Reset(&self) -> windows_core::Result<()>;
}
impl IMFInputTrustAuthority_Vtbl {
pub const fn new<Identity: IMFInputTrustAuthority_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetDecrypter<Identity: IMFInputTrustAuthority_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFInputTrustAuthority_Impl::GetDecrypter(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into()
}
}
unsafe extern "system" fn RequestAccess<Identity: IMFInputTrustAuthority_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, action: MFPOLICYMANAGER_ACTION, ppcontentenableractivate: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFInputTrustAuthority_Impl::RequestAccess(this, core::mem::transmute_copy(&action)) {
Ok(ok__) => {
ppcontentenableractivate.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetPolicy<Identity: IMFInputTrustAuthority_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, action: MFPOLICYMANAGER_ACTION, pppolicy: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFInputTrustAuthority_Impl::GetPolicy(this, core::mem::transmute_copy(&action)) {
Ok(ok__) => {
pppolicy.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn BindAccess<Identity: IMFInputTrustAuthority_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pparam: *const MFINPUTTRUSTAUTHORITY_ACCESS_PARAMS) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFInputTrustAuthority_Impl::BindAccess(this, core::mem::transmute_copy(&pparam)).into()
}
}
unsafe extern "system" fn UpdateAccess<Identity: IMFInputTrustAuthority_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pparam: *const MFINPUTTRUSTAUTHORITY_ACCESS_PARAMS) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFInputTrustAuthority_Impl::UpdateAccess(this, core::mem::transmute_copy(&pparam)).into()
}
}
unsafe extern "system" fn Reset<Identity: IMFInputTrustAuthority_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFInputTrustAuthority_Impl::Reset(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetDecrypter: GetDecrypter::<Identity, OFFSET>,
RequestAccess: RequestAccess::<Identity, OFFSET>,
GetPolicy: GetPolicy::<Identity, OFFSET>,
BindAccess: BindAccess::<Identity, OFFSET>,
UpdateAccess: UpdateAccess::<Identity, OFFSET>,
Reset: Reset::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFInputTrustAuthority as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFInputTrustAuthority {}
windows_core::imp::define_interface!(IMFLocalMFTRegistration, IMFLocalMFTRegistration_Vtbl, 0x149c4d73_b4be_4f8d_8b87_079e926b6add);
windows_core::imp::interface_hierarchy!(IMFLocalMFTRegistration, windows_core::IUnknown);
impl IMFLocalMFTRegistration {
pub unsafe fn RegisterMFTs(&self, pmfts: &[MFT_REGISTRATION_INFO]) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RegisterMFTs)(windows_core::Interface::as_raw(self), core::mem::transmute(pmfts.as_ptr()), pmfts.len().try_into().unwrap()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFLocalMFTRegistration_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub RegisterMFTs: unsafe extern "system" fn(*mut core::ffi::c_void, *const MFT_REGISTRATION_INFO, u32) -> windows_core::HRESULT,
}
pub trait IMFLocalMFTRegistration_Impl: windows_core::IUnknownImpl {
fn RegisterMFTs(&self, pmfts: *const MFT_REGISTRATION_INFO, cmfts: u32) -> windows_core::Result<()>;
}
impl IMFLocalMFTRegistration_Vtbl {
pub const fn new<Identity: IMFLocalMFTRegistration_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn RegisterMFTs<Identity: IMFLocalMFTRegistration_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pmfts: *const MFT_REGISTRATION_INFO, cmfts: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFLocalMFTRegistration_Impl::RegisterMFTs(this, core::mem::transmute_copy(&pmfts), core::mem::transmute_copy(&cmfts)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), RegisterMFTs: RegisterMFTs::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFLocalMFTRegistration as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFLocalMFTRegistration {}
windows_core::imp::define_interface!(IMFMediaBuffer, IMFMediaBuffer_Vtbl, 0x045fa593_8799_42b8_bc8d_8968c6453507);
windows_core::imp::interface_hierarchy!(IMFMediaBuffer, windows_core::IUnknown);
impl IMFMediaBuffer {
pub unsafe fn Lock(&self, ppbbuffer: *mut *mut u8, pcbmaxlength: Option<*mut u32>, pcbcurrentlength: Option<*mut u32>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), ppbbuffer as _, pcbmaxlength.unwrap_or(core::mem::zeroed()) as _, pcbcurrentlength.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn Unlock(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Unlock)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn GetCurrentLength(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetCurrentLength)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetCurrentLength(&self, cbcurrentlength: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetCurrentLength)(windows_core::Interface::as_raw(self), cbcurrentlength).ok() }
}
pub unsafe fn GetMaxLength(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMaxLength)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaBuffer_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub Lock: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut u8, *mut u32, *mut u32) -> windows_core::HRESULT,
pub Unlock: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetCurrentLength: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub SetCurrentLength: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub GetMaxLength: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
}
pub trait IMFMediaBuffer_Impl: windows_core::IUnknownImpl {
fn Lock(&self, ppbbuffer: *mut *mut u8, pcbmaxlength: *mut u32, pcbcurrentlength: *mut u32) -> windows_core::Result<()>;
fn Unlock(&self) -> windows_core::Result<()>;
fn GetCurrentLength(&self) -> windows_core::Result<u32>;
fn SetCurrentLength(&self, cbcurrentlength: u32) -> windows_core::Result<()>;
fn GetMaxLength(&self) -> windows_core::Result<u32>;
}
impl IMFMediaBuffer_Vtbl {
pub const fn new<Identity: IMFMediaBuffer_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Lock<Identity: IMFMediaBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppbbuffer: *mut *mut u8, pcbmaxlength: *mut u32, pcbcurrentlength: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaBuffer_Impl::Lock(this, core::mem::transmute_copy(&ppbbuffer), core::mem::transmute_copy(&pcbmaxlength), core::mem::transmute_copy(&pcbcurrentlength)).into()
}
}
unsafe extern "system" fn Unlock<Identity: IMFMediaBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaBuffer_Impl::Unlock(this).into()
}
}
unsafe extern "system" fn GetCurrentLength<Identity: IMFMediaBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcbcurrentlength: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaBuffer_Impl::GetCurrentLength(this) {
Ok(ok__) => {
pcbcurrentlength.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetCurrentLength<Identity: IMFMediaBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, cbcurrentlength: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaBuffer_Impl::SetCurrentLength(this, core::mem::transmute_copy(&cbcurrentlength)).into()
}
}
unsafe extern "system" fn GetMaxLength<Identity: IMFMediaBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcbmaxlength: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaBuffer_Impl::GetMaxLength(this) {
Ok(ok__) => {
pcbmaxlength.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Lock: Lock::<Identity, OFFSET>,
Unlock: Unlock::<Identity, OFFSET>,
GetCurrentLength: GetCurrentLength::<Identity, OFFSET>,
SetCurrentLength: SetCurrentLength::<Identity, OFFSET>,
GetMaxLength: GetMaxLength::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaBuffer as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaBuffer {}
windows_core::imp::define_interface!(IMFMediaEngine, IMFMediaEngine_Vtbl, 0x98a1b0bb_03eb_4935_ae7c_93c1fa0e1c93);
windows_core::imp::interface_hierarchy!(IMFMediaEngine, windows_core::IUnknown);
impl IMFMediaEngine {
pub unsafe fn GetError(&self) -> windows_core::Result<IMFMediaError> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetError)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn SetErrorCode(&self, error: MF_MEDIA_ENGINE_ERR) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetErrorCode)(windows_core::Interface::as_raw(self), error).ok() }
}
pub unsafe fn SetSourceElements<P0>(&self, psrcelements: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaEngineSrcElements>,
{
unsafe { (windows_core::Interface::vtable(self).SetSourceElements)(windows_core::Interface::as_raw(self), psrcelements.param().abi()).ok() }
}
pub unsafe fn SetSource(&self, purl: &windows_core::BSTR) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetSource)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(purl)).ok() }
}
pub unsafe fn GetCurrentSource(&self) -> windows_core::Result<windows_core::BSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetCurrentSource)(windows_core::Interface::as_raw(self), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub unsafe fn GetNetworkState(&self) -> u16 {
unsafe { (windows_core::Interface::vtable(self).GetNetworkState)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetPreload(&self) -> MF_MEDIA_ENGINE_PRELOAD {
unsafe { (windows_core::Interface::vtable(self).GetPreload)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn SetPreload(&self, preload: MF_MEDIA_ENGINE_PRELOAD) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetPreload)(windows_core::Interface::as_raw(self), preload).ok() }
}
pub unsafe fn GetBuffered(&self) -> windows_core::Result<IMFMediaTimeRange> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetBuffered)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn Load(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Load)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn CanPlayType(&self, r#type: &windows_core::BSTR) -> windows_core::Result<MF_MEDIA_ENGINE_CANPLAY> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CanPlayType)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(r#type), &mut result__).map(|| result__)
}
}
pub unsafe fn GetReadyState(&self) -> u16 {
unsafe { (windows_core::Interface::vtable(self).GetReadyState)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn IsSeeking(&self) -> windows_core::BOOL {
unsafe { (windows_core::Interface::vtable(self).IsSeeking)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetCurrentTime(&self) -> f64 {
unsafe { (windows_core::Interface::vtable(self).GetCurrentTime)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn SetCurrentTime(&self, seektime: f64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetCurrentTime)(windows_core::Interface::as_raw(self), seektime).ok() }
}
pub unsafe fn GetStartTime(&self) -> f64 {
unsafe { (windows_core::Interface::vtable(self).GetStartTime)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetDuration(&self) -> f64 {
unsafe { (windows_core::Interface::vtable(self).GetDuration)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn IsPaused(&self) -> windows_core::BOOL {
unsafe { (windows_core::Interface::vtable(self).IsPaused)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetDefaultPlaybackRate(&self) -> f64 {
unsafe { (windows_core::Interface::vtable(self).GetDefaultPlaybackRate)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn SetDefaultPlaybackRate(&self, rate: f64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetDefaultPlaybackRate)(windows_core::Interface::as_raw(self), rate).ok() }
}
pub unsafe fn GetPlaybackRate(&self) -> f64 {
unsafe { (windows_core::Interface::vtable(self).GetPlaybackRate)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn SetPlaybackRate(&self, rate: f64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetPlaybackRate)(windows_core::Interface::as_raw(self), rate).ok() }
}
pub unsafe fn GetPlayed(&self) -> windows_core::Result<IMFMediaTimeRange> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetPlayed)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetSeekable(&self) -> windows_core::Result<IMFMediaTimeRange> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetSeekable)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn IsEnded(&self) -> windows_core::BOOL {
unsafe { (windows_core::Interface::vtable(self).IsEnded)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetAutoPlay(&self) -> windows_core::BOOL {
unsafe { (windows_core::Interface::vtable(self).GetAutoPlay)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn SetAutoPlay(&self, autoplay: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetAutoPlay)(windows_core::Interface::as_raw(self), autoplay.into()).ok() }
}
pub unsafe fn GetLoop(&self) -> windows_core::BOOL {
unsafe { (windows_core::Interface::vtable(self).GetLoop)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn SetLoop(&self, r#loop: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetLoop)(windows_core::Interface::as_raw(self), r#loop.into()).ok() }
}
pub unsafe fn Play(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Play)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn Pause(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Pause)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn GetMuted(&self) -> windows_core::BOOL {
unsafe { (windows_core::Interface::vtable(self).GetMuted)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn SetMuted(&self, muted: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetMuted)(windows_core::Interface::as_raw(self), muted.into()).ok() }
}
pub unsafe fn GetVolume(&self) -> f64 {
unsafe { (windows_core::Interface::vtable(self).GetVolume)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn SetVolume(&self, volume: f64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetVolume)(windows_core::Interface::as_raw(self), volume).ok() }
}
pub unsafe fn HasVideo(&self) -> windows_core::BOOL {
unsafe { (windows_core::Interface::vtable(self).HasVideo)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn HasAudio(&self) -> windows_core::BOOL {
unsafe { (windows_core::Interface::vtable(self).HasAudio)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetNativeVideoSize(&self, cx: Option<*mut u32>, cy: Option<*mut u32>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetNativeVideoSize)(windows_core::Interface::as_raw(self), cx.unwrap_or(core::mem::zeroed()) as _, cy.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn GetVideoAspectRatio(&self, cx: Option<*mut u32>, cy: Option<*mut u32>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetVideoAspectRatio)(windows_core::Interface::as_raw(self), cx.unwrap_or(core::mem::zeroed()) as _, cy.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn Shutdown(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Shutdown)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn TransferVideoFrame<P0>(&self, pdstsurf: P0, psrc: Option<*const MFVideoNormalizedRect>, pdst: *const super::super::Foundation::RECT, pborderclr: Option<*const MFARGB>) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).TransferVideoFrame)(windows_core::Interface::as_raw(self), pdstsurf.param().abi(), psrc.unwrap_or(core::mem::zeroed()) as _, pdst, pborderclr.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn OnVideoStreamTick(&self) -> windows_core::Result<i64> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).OnVideoStreamTick)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaEngine_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetError: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetErrorCode: unsafe extern "system" fn(*mut core::ffi::c_void, MF_MEDIA_ENGINE_ERR) -> windows_core::HRESULT,
pub SetSourceElements: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetSource: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetCurrentSource: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetNetworkState: unsafe extern "system" fn(*mut core::ffi::c_void) -> u16,
pub GetPreload: unsafe extern "system" fn(*mut core::ffi::c_void) -> MF_MEDIA_ENGINE_PRELOAD,
pub SetPreload: unsafe extern "system" fn(*mut core::ffi::c_void, MF_MEDIA_ENGINE_PRELOAD) -> windows_core::HRESULT,
pub GetBuffered: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Load: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub CanPlayType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut MF_MEDIA_ENGINE_CANPLAY) -> windows_core::HRESULT,
pub GetReadyState: unsafe extern "system" fn(*mut core::ffi::c_void) -> u16,
pub IsSeeking: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::BOOL,
pub GetCurrentTime: unsafe extern "system" fn(*mut core::ffi::c_void) -> f64,
pub SetCurrentTime: unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
pub GetStartTime: unsafe extern "system" fn(*mut core::ffi::c_void) -> f64,
pub GetDuration: unsafe extern "system" fn(*mut core::ffi::c_void) -> f64,
pub IsPaused: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::BOOL,
pub GetDefaultPlaybackRate: unsafe extern "system" fn(*mut core::ffi::c_void) -> f64,
pub SetDefaultPlaybackRate: unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
pub GetPlaybackRate: unsafe extern "system" fn(*mut core::ffi::c_void) -> f64,
pub SetPlaybackRate: unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
pub GetPlayed: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetSeekable: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub IsEnded: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::BOOL,
pub GetAutoPlay: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::BOOL,
pub SetAutoPlay: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT,
pub GetLoop: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::BOOL,
pub SetLoop: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT,
pub Play: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Pause: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetMuted: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::BOOL,
pub SetMuted: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT,
pub GetVolume: unsafe extern "system" fn(*mut core::ffi::c_void) -> f64,
pub SetVolume: unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
pub HasVideo: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::BOOL,
pub HasAudio: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::BOOL,
pub GetNativeVideoSize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut u32) -> windows_core::HRESULT,
pub GetVideoAspectRatio: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut u32) -> windows_core::HRESULT,
pub Shutdown: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub TransferVideoFrame: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const MFVideoNormalizedRect, *const super::super::Foundation::RECT, *const MFARGB) -> windows_core::HRESULT,
pub OnVideoStreamTick: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
}
pub trait IMFMediaEngine_Impl: windows_core::IUnknownImpl {
fn GetError(&self) -> windows_core::Result<IMFMediaError>;
fn SetErrorCode(&self, error: MF_MEDIA_ENGINE_ERR) -> windows_core::Result<()>;
fn SetSourceElements(&self, psrcelements: windows_core::Ref<IMFMediaEngineSrcElements>) -> windows_core::Result<()>;
fn SetSource(&self, purl: &windows_core::BSTR) -> windows_core::Result<()>;
fn GetCurrentSource(&self) -> windows_core::Result<windows_core::BSTR>;
fn GetNetworkState(&self) -> u16;
fn GetPreload(&self) -> MF_MEDIA_ENGINE_PRELOAD;
fn SetPreload(&self, preload: MF_MEDIA_ENGINE_PRELOAD) -> windows_core::Result<()>;
fn GetBuffered(&self) -> windows_core::Result<IMFMediaTimeRange>;
fn Load(&self) -> windows_core::Result<()>;
fn CanPlayType(&self, r#type: &windows_core::BSTR) -> windows_core::Result<MF_MEDIA_ENGINE_CANPLAY>;
fn GetReadyState(&self) -> u16;
fn IsSeeking(&self) -> windows_core::BOOL;
fn GetCurrentTime(&self) -> f64;
fn SetCurrentTime(&self, seektime: f64) -> windows_core::Result<()>;
fn GetStartTime(&self) -> f64;
fn GetDuration(&self) -> f64;
fn IsPaused(&self) -> windows_core::BOOL;
fn GetDefaultPlaybackRate(&self) -> f64;
fn SetDefaultPlaybackRate(&self, rate: f64) -> windows_core::Result<()>;
fn GetPlaybackRate(&self) -> f64;
fn SetPlaybackRate(&self, rate: f64) -> windows_core::Result<()>;
fn GetPlayed(&self) -> windows_core::Result<IMFMediaTimeRange>;
fn GetSeekable(&self) -> windows_core::Result<IMFMediaTimeRange>;
fn IsEnded(&self) -> windows_core::BOOL;
fn GetAutoPlay(&self) -> windows_core::BOOL;
fn SetAutoPlay(&self, autoplay: windows_core::BOOL) -> windows_core::Result<()>;
fn GetLoop(&self) -> windows_core::BOOL;
fn SetLoop(&self, r#loop: windows_core::BOOL) -> windows_core::Result<()>;
fn Play(&self) -> windows_core::Result<()>;
fn Pause(&self) -> windows_core::Result<()>;
fn GetMuted(&self) -> windows_core::BOOL;
fn SetMuted(&self, muted: windows_core::BOOL) -> windows_core::Result<()>;
fn GetVolume(&self) -> f64;
fn SetVolume(&self, volume: f64) -> windows_core::Result<()>;
fn HasVideo(&self) -> windows_core::BOOL;
fn HasAudio(&self) -> windows_core::BOOL;
fn GetNativeVideoSize(&self, cx: *mut u32, cy: *mut u32) -> windows_core::Result<()>;
fn GetVideoAspectRatio(&self, cx: *mut u32, cy: *mut u32) -> windows_core::Result<()>;
fn Shutdown(&self) -> windows_core::Result<()>;
fn TransferVideoFrame(&self, pdstsurf: windows_core::Ref<windows_core::IUnknown>, psrc: *const MFVideoNormalizedRect, pdst: *const super::super::Foundation::RECT, pborderclr: *const MFARGB) -> windows_core::Result<()>;
fn OnVideoStreamTick(&self) -> windows_core::Result<i64>;
}
impl IMFMediaEngine_Vtbl {
pub const fn new<Identity: IMFMediaEngine_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetError<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pperror: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngine_Impl::GetError(this) {
Ok(ok__) => {
pperror.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetErrorCode<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, error: MF_MEDIA_ENGINE_ERR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::SetErrorCode(this, core::mem::transmute_copy(&error)).into()
}
}
unsafe extern "system" fn SetSourceElements<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, psrcelements: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::SetSourceElements(this, core::mem::transmute_copy(&psrcelements)).into()
}
}
unsafe extern "system" fn SetSource<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, purl: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::SetSource(this, core::mem::transmute(&purl)).into()
}
}
unsafe extern "system" fn GetCurrentSource<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppurl: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngine_Impl::GetCurrentSource(this) {
Ok(ok__) => {
ppurl.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetNetworkState<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> u16 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::GetNetworkState(this)
}
}
unsafe extern "system" fn GetPreload<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> MF_MEDIA_ENGINE_PRELOAD {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::GetPreload(this)
}
}
unsafe extern "system" fn SetPreload<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, preload: MF_MEDIA_ENGINE_PRELOAD) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::SetPreload(this, core::mem::transmute_copy(&preload)).into()
}
}
unsafe extern "system" fn GetBuffered<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppbuffered: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngine_Impl::GetBuffered(this) {
Ok(ok__) => {
ppbuffered.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Load<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::Load(this).into()
}
}
unsafe extern "system" fn CanPlayType<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, r#type: *mut core::ffi::c_void, panswer: *mut MF_MEDIA_ENGINE_CANPLAY) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngine_Impl::CanPlayType(this, core::mem::transmute(&r#type)) {
Ok(ok__) => {
panswer.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetReadyState<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> u16 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::GetReadyState(this)
}
}
unsafe extern "system" fn IsSeeking<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::BOOL {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::IsSeeking(this)
}
}
unsafe extern "system" fn GetCurrentTime<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> f64 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::GetCurrentTime(this)
}
}
unsafe extern "system" fn SetCurrentTime<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, seektime: f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::SetCurrentTime(this, core::mem::transmute_copy(&seektime)).into()
}
}
unsafe extern "system" fn GetStartTime<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> f64 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::GetStartTime(this)
}
}
unsafe extern "system" fn GetDuration<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> f64 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::GetDuration(this)
}
}
unsafe extern "system" fn IsPaused<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::BOOL {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::IsPaused(this)
}
}
unsafe extern "system" fn GetDefaultPlaybackRate<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> f64 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::GetDefaultPlaybackRate(this)
}
}
unsafe extern "system" fn SetDefaultPlaybackRate<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, rate: f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::SetDefaultPlaybackRate(this, core::mem::transmute_copy(&rate)).into()
}
}
unsafe extern "system" fn GetPlaybackRate<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> f64 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::GetPlaybackRate(this)
}
}
unsafe extern "system" fn SetPlaybackRate<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, rate: f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::SetPlaybackRate(this, core::mem::transmute_copy(&rate)).into()
}
}
unsafe extern "system" fn GetPlayed<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppplayed: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngine_Impl::GetPlayed(this) {
Ok(ok__) => {
ppplayed.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetSeekable<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppseekable: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngine_Impl::GetSeekable(this) {
Ok(ok__) => {
ppseekable.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn IsEnded<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::BOOL {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::IsEnded(this)
}
}
unsafe extern "system" fn GetAutoPlay<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::BOOL {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::GetAutoPlay(this)
}
}
unsafe extern "system" fn SetAutoPlay<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, autoplay: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::SetAutoPlay(this, core::mem::transmute_copy(&autoplay)).into()
}
}
unsafe extern "system" fn GetLoop<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::BOOL {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::GetLoop(this)
}
}
unsafe extern "system" fn SetLoop<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, r#loop: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::SetLoop(this, core::mem::transmute_copy(&r#loop)).into()
}
}
unsafe extern "system" fn Play<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::Play(this).into()
}
}
unsafe extern "system" fn Pause<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::Pause(this).into()
}
}
unsafe extern "system" fn GetMuted<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::BOOL {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::GetMuted(this)
}
}
unsafe extern "system" fn SetMuted<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, muted: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::SetMuted(this, core::mem::transmute_copy(&muted)).into()
}
}
unsafe extern "system" fn GetVolume<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> f64 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::GetVolume(this)
}
}
unsafe extern "system" fn SetVolume<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, volume: f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::SetVolume(this, core::mem::transmute_copy(&volume)).into()
}
}
unsafe extern "system" fn HasVideo<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::BOOL {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::HasVideo(this)
}
}
unsafe extern "system" fn HasAudio<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::BOOL {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::HasAudio(this)
}
}
unsafe extern "system" fn GetNativeVideoSize<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, cx: *mut u32, cy: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::GetNativeVideoSize(this, core::mem::transmute_copy(&cx), core::mem::transmute_copy(&cy)).into()
}
}
unsafe extern "system" fn GetVideoAspectRatio<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, cx: *mut u32, cy: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::GetVideoAspectRatio(this, core::mem::transmute_copy(&cx), core::mem::transmute_copy(&cy)).into()
}
}
unsafe extern "system" fn Shutdown<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::Shutdown(this).into()
}
}
unsafe extern "system" fn TransferVideoFrame<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdstsurf: *mut core::ffi::c_void, psrc: *const MFVideoNormalizedRect, pdst: *const super::super::Foundation::RECT, pborderclr: *const MFARGB) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngine_Impl::TransferVideoFrame(this, core::mem::transmute_copy(&pdstsurf), core::mem::transmute_copy(&psrc), core::mem::transmute_copy(&pdst), core::mem::transmute_copy(&pborderclr)).into()
}
}
unsafe extern "system" fn OnVideoStreamTick<Identity: IMFMediaEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppts: *mut i64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngine_Impl::OnVideoStreamTick(this) {
Ok(ok__) => {
ppts.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetError: GetError::<Identity, OFFSET>,
SetErrorCode: SetErrorCode::<Identity, OFFSET>,
SetSourceElements: SetSourceElements::<Identity, OFFSET>,
SetSource: SetSource::<Identity, OFFSET>,
GetCurrentSource: GetCurrentSource::<Identity, OFFSET>,
GetNetworkState: GetNetworkState::<Identity, OFFSET>,
GetPreload: GetPreload::<Identity, OFFSET>,
SetPreload: SetPreload::<Identity, OFFSET>,
GetBuffered: GetBuffered::<Identity, OFFSET>,
Load: Load::<Identity, OFFSET>,
CanPlayType: CanPlayType::<Identity, OFFSET>,
GetReadyState: GetReadyState::<Identity, OFFSET>,
IsSeeking: IsSeeking::<Identity, OFFSET>,
GetCurrentTime: GetCurrentTime::<Identity, OFFSET>,
SetCurrentTime: SetCurrentTime::<Identity, OFFSET>,
GetStartTime: GetStartTime::<Identity, OFFSET>,
GetDuration: GetDuration::<Identity, OFFSET>,
IsPaused: IsPaused::<Identity, OFFSET>,
GetDefaultPlaybackRate: GetDefaultPlaybackRate::<Identity, OFFSET>,
SetDefaultPlaybackRate: SetDefaultPlaybackRate::<Identity, OFFSET>,
GetPlaybackRate: GetPlaybackRate::<Identity, OFFSET>,
SetPlaybackRate: SetPlaybackRate::<Identity, OFFSET>,
GetPlayed: GetPlayed::<Identity, OFFSET>,
GetSeekable: GetSeekable::<Identity, OFFSET>,
IsEnded: IsEnded::<Identity, OFFSET>,
GetAutoPlay: GetAutoPlay::<Identity, OFFSET>,
SetAutoPlay: SetAutoPlay::<Identity, OFFSET>,
GetLoop: GetLoop::<Identity, OFFSET>,
SetLoop: SetLoop::<Identity, OFFSET>,
Play: Play::<Identity, OFFSET>,
Pause: Pause::<Identity, OFFSET>,
GetMuted: GetMuted::<Identity, OFFSET>,
SetMuted: SetMuted::<Identity, OFFSET>,
GetVolume: GetVolume::<Identity, OFFSET>,
SetVolume: SetVolume::<Identity, OFFSET>,
HasVideo: HasVideo::<Identity, OFFSET>,
HasAudio: HasAudio::<Identity, OFFSET>,
GetNativeVideoSize: GetNativeVideoSize::<Identity, OFFSET>,
GetVideoAspectRatio: GetVideoAspectRatio::<Identity, OFFSET>,
Shutdown: Shutdown::<Identity, OFFSET>,
TransferVideoFrame: TransferVideoFrame::<Identity, OFFSET>,
OnVideoStreamTick: OnVideoStreamTick::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaEngine as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaEngine {}
windows_core::imp::define_interface!(IMFMediaEngineAudioEndpointId, IMFMediaEngineAudioEndpointId_Vtbl, 0x7a3bac98_0e76_49fb_8c20_8a86fd98eaf2);
windows_core::imp::interface_hierarchy!(IMFMediaEngineAudioEndpointId, windows_core::IUnknown);
impl IMFMediaEngineAudioEndpointId {
pub unsafe fn SetAudioEndpointId<P0>(&self, pszendpointid: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).SetAudioEndpointId)(windows_core::Interface::as_raw(self), pszendpointid.param().abi()).ok() }
}
pub unsafe fn GetAudioEndpointId(&self) -> windows_core::Result<windows_core::PWSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetAudioEndpointId)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaEngineAudioEndpointId_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetAudioEndpointId: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR) -> windows_core::HRESULT,
pub GetAudioEndpointId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT,
}
pub trait IMFMediaEngineAudioEndpointId_Impl: windows_core::IUnknownImpl {
fn SetAudioEndpointId(&self, pszendpointid: &windows_core::PCWSTR) -> windows_core::Result<()>;
fn GetAudioEndpointId(&self) -> windows_core::Result<windows_core::PWSTR>;
}
impl IMFMediaEngineAudioEndpointId_Vtbl {
pub const fn new<Identity: IMFMediaEngineAudioEndpointId_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetAudioEndpointId<Identity: IMFMediaEngineAudioEndpointId_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pszendpointid: windows_core::PCWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineAudioEndpointId_Impl::SetAudioEndpointId(this, core::mem::transmute(&pszendpointid)).into()
}
}
unsafe extern "system" fn GetAudioEndpointId<Identity: IMFMediaEngineAudioEndpointId_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppszendpointid: *mut windows_core::PWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineAudioEndpointId_Impl::GetAudioEndpointId(this) {
Ok(ok__) => {
ppszendpointid.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetAudioEndpointId: SetAudioEndpointId::<Identity, OFFSET>,
GetAudioEndpointId: GetAudioEndpointId::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaEngineAudioEndpointId as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaEngineAudioEndpointId {}
windows_core::imp::define_interface!(IMFMediaEngineClassFactory, IMFMediaEngineClassFactory_Vtbl, 0x4d645ace_26aa_4688_9be1_df3516990b93);
windows_core::imp::interface_hierarchy!(IMFMediaEngineClassFactory, windows_core::IUnknown);
impl IMFMediaEngineClassFactory {
pub unsafe fn CreateInstance<P1>(&self, dwflags: u32, pattr: P1) -> windows_core::Result<IMFMediaEngine>
where
P1: windows_core::Param<IMFAttributes>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateInstance)(windows_core::Interface::as_raw(self), dwflags, pattr.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn CreateTimeRange(&self) -> windows_core::Result<IMFMediaTimeRange> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateTimeRange)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn CreateError(&self) -> windows_core::Result<IMFMediaError> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateError)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaEngineClassFactory_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub CreateInstance: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CreateTimeRange: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CreateError: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFMediaEngineClassFactory_Impl: windows_core::IUnknownImpl {
fn CreateInstance(&self, dwflags: u32, pattr: windows_core::Ref<IMFAttributes>) -> windows_core::Result<IMFMediaEngine>;
fn CreateTimeRange(&self) -> windows_core::Result<IMFMediaTimeRange>;
fn CreateError(&self) -> windows_core::Result<IMFMediaError>;
}
impl IMFMediaEngineClassFactory_Vtbl {
pub const fn new<Identity: IMFMediaEngineClassFactory_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateInstance<Identity: IMFMediaEngineClassFactory_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwflags: u32, pattr: *mut core::ffi::c_void, ppplayer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineClassFactory_Impl::CreateInstance(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pattr)) {
Ok(ok__) => {
ppplayer.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn CreateTimeRange<Identity: IMFMediaEngineClassFactory_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pptimerange: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineClassFactory_Impl::CreateTimeRange(this) {
Ok(ok__) => {
pptimerange.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn CreateError<Identity: IMFMediaEngineClassFactory_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pperror: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineClassFactory_Impl::CreateError(this) {
Ok(ok__) => {
pperror.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CreateInstance: CreateInstance::<Identity, OFFSET>,
CreateTimeRange: CreateTimeRange::<Identity, OFFSET>,
CreateError: CreateError::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaEngineClassFactory as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaEngineClassFactory {}
windows_core::imp::define_interface!(IMFMediaEngineClassFactory2, IMFMediaEngineClassFactory2_Vtbl, 0x09083cef_867f_4bf6_8776_dee3a7b42fca);
windows_core::imp::interface_hierarchy!(IMFMediaEngineClassFactory2, windows_core::IUnknown);
impl IMFMediaEngineClassFactory2 {
pub unsafe fn CreateMediaKeys2(&self, keysystem: &windows_core::BSTR, defaultcdmstorepath: &windows_core::BSTR, inprivatecdmstorepath: &windows_core::BSTR) -> windows_core::Result<IMFMediaKeys> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateMediaKeys2)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(keysystem), core::mem::transmute_copy(defaultcdmstorepath), core::mem::transmute_copy(inprivatecdmstorepath), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaEngineClassFactory2_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub CreateMediaKeys2: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFMediaEngineClassFactory2_Impl: windows_core::IUnknownImpl {
fn CreateMediaKeys2(&self, keysystem: &windows_core::BSTR, defaultcdmstorepath: &windows_core::BSTR, inprivatecdmstorepath: &windows_core::BSTR) -> windows_core::Result<IMFMediaKeys>;
}
impl IMFMediaEngineClassFactory2_Vtbl {
pub const fn new<Identity: IMFMediaEngineClassFactory2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateMediaKeys2<Identity: IMFMediaEngineClassFactory2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, keysystem: *mut core::ffi::c_void, defaultcdmstorepath: *mut core::ffi::c_void, inprivatecdmstorepath: *mut core::ffi::c_void, ppkeys: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineClassFactory2_Impl::CreateMediaKeys2(this, core::mem::transmute(&keysystem), core::mem::transmute(&defaultcdmstorepath), core::mem::transmute(&inprivatecdmstorepath)) {
Ok(ok__) => {
ppkeys.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), CreateMediaKeys2: CreateMediaKeys2::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaEngineClassFactory2 as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaEngineClassFactory2 {}
windows_core::imp::define_interface!(IMFMediaEngineClassFactory3, IMFMediaEngineClassFactory3_Vtbl, 0x3787614f_65f7_4003_b673_ead8293a0e60);
windows_core::imp::interface_hierarchy!(IMFMediaEngineClassFactory3, windows_core::IUnknown);
impl IMFMediaEngineClassFactory3 {
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn CreateMediaKeySystemAccess(&self, keysystem: &windows_core::BSTR, ppsupportedconfigurationsarray: &[Option<super::super::UI::Shell::PropertiesSystem::IPropertyStore>]) -> windows_core::Result<IMFMediaKeySystemAccess> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateMediaKeySystemAccess)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(keysystem), core::mem::transmute(ppsupportedconfigurationsarray.as_ptr()), ppsupportedconfigurationsarray.len().try_into().unwrap(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaEngineClassFactory3_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub CreateMediaKeySystemAccess: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const *mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))]
CreateMediaKeySystemAccess: usize,
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub trait IMFMediaEngineClassFactory3_Impl: windows_core::IUnknownImpl {
fn CreateMediaKeySystemAccess(&self, keysystem: &windows_core::BSTR, ppsupportedconfigurationsarray: *const Option<super::super::UI::Shell::PropertiesSystem::IPropertyStore>, usize: u32) -> windows_core::Result<IMFMediaKeySystemAccess>;
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl IMFMediaEngineClassFactory3_Vtbl {
pub const fn new<Identity: IMFMediaEngineClassFactory3_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateMediaKeySystemAccess<Identity: IMFMediaEngineClassFactory3_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, keysystem: *mut core::ffi::c_void, ppsupportedconfigurationsarray: *const *mut core::ffi::c_void, usize: u32, ppkeyaccess: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineClassFactory3_Impl::CreateMediaKeySystemAccess(this, core::mem::transmute(&keysystem), core::mem::transmute_copy(&ppsupportedconfigurationsarray), core::mem::transmute_copy(&usize)) {
Ok(ok__) => {
ppkeyaccess.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), CreateMediaKeySystemAccess: CreateMediaKeySystemAccess::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaEngineClassFactory3 as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl windows_core::RuntimeName for IMFMediaEngineClassFactory3 {}
windows_core::imp::define_interface!(IMFMediaEngineClassFactory4, IMFMediaEngineClassFactory4_Vtbl, 0xfbe256c1_43cf_4a9b_8cb8_ce8632a34186);
windows_core::imp::interface_hierarchy!(IMFMediaEngineClassFactory4, windows_core::IUnknown);
impl IMFMediaEngineClassFactory4 {
pub unsafe fn CreateContentDecryptionModuleFactory<P0>(&self, keysystem: P0, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).CreateContentDecryptionModuleFactory)(windows_core::Interface::as_raw(self), keysystem.param().abi(), riid, ppvobject as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaEngineClassFactory4_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub CreateContentDecryptionModuleFactory: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFMediaEngineClassFactory4_Impl: windows_core::IUnknownImpl {
fn CreateContentDecryptionModuleFactory(&self, keysystem: &windows_core::PCWSTR, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
}
impl IMFMediaEngineClassFactory4_Vtbl {
pub const fn new<Identity: IMFMediaEngineClassFactory4_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateContentDecryptionModuleFactory<Identity: IMFMediaEngineClassFactory4_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, keysystem: windows_core::PCWSTR, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineClassFactory4_Impl::CreateContentDecryptionModuleFactory(this, core::mem::transmute(&keysystem), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobject)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CreateContentDecryptionModuleFactory: CreateContentDecryptionModuleFactory::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaEngineClassFactory4 as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaEngineClassFactory4 {}
windows_core::imp::define_interface!(IMFMediaEngineClassFactoryEx, IMFMediaEngineClassFactoryEx_Vtbl, 0xc56156c6_ea5b_48a5_9df8_fbe035d0929e);
impl core::ops::Deref for IMFMediaEngineClassFactoryEx {
type Target = IMFMediaEngineClassFactory;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFMediaEngineClassFactoryEx, windows_core::IUnknown, IMFMediaEngineClassFactory);
impl IMFMediaEngineClassFactoryEx {
pub unsafe fn CreateMediaSourceExtension<P1>(&self, dwflags: u32, pattr: P1) -> windows_core::Result<IMFMediaSourceExtension>
where
P1: windows_core::Param<IMFAttributes>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateMediaSourceExtension)(windows_core::Interface::as_raw(self), dwflags, pattr.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn CreateMediaKeys(&self, keysystem: &windows_core::BSTR, cdmstorepath: &windows_core::BSTR) -> windows_core::Result<IMFMediaKeys> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateMediaKeys)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(keysystem), core::mem::transmute_copy(cdmstorepath), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn IsTypeSupported(&self, r#type: &windows_core::BSTR, keysystem: &windows_core::BSTR) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).IsTypeSupported)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(r#type), core::mem::transmute_copy(keysystem), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaEngineClassFactoryEx_Vtbl {
pub base__: IMFMediaEngineClassFactory_Vtbl,
pub CreateMediaSourceExtension: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CreateMediaKeys: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub IsTypeSupported: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
}
pub trait IMFMediaEngineClassFactoryEx_Impl: IMFMediaEngineClassFactory_Impl {
fn CreateMediaSourceExtension(&self, dwflags: u32, pattr: windows_core::Ref<IMFAttributes>) -> windows_core::Result<IMFMediaSourceExtension>;
fn CreateMediaKeys(&self, keysystem: &windows_core::BSTR, cdmstorepath: &windows_core::BSTR) -> windows_core::Result<IMFMediaKeys>;
fn IsTypeSupported(&self, r#type: &windows_core::BSTR, keysystem: &windows_core::BSTR) -> windows_core::Result<windows_core::BOOL>;
}
impl IMFMediaEngineClassFactoryEx_Vtbl {
pub const fn new<Identity: IMFMediaEngineClassFactoryEx_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateMediaSourceExtension<Identity: IMFMediaEngineClassFactoryEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwflags: u32, pattr: *mut core::ffi::c_void, ppmse: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineClassFactoryEx_Impl::CreateMediaSourceExtension(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pattr)) {
Ok(ok__) => {
ppmse.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn CreateMediaKeys<Identity: IMFMediaEngineClassFactoryEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, keysystem: *mut core::ffi::c_void, cdmstorepath: *mut core::ffi::c_void, ppkeys: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineClassFactoryEx_Impl::CreateMediaKeys(this, core::mem::transmute(&keysystem), core::mem::transmute(&cdmstorepath)) {
Ok(ok__) => {
ppkeys.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn IsTypeSupported<Identity: IMFMediaEngineClassFactoryEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, r#type: *mut core::ffi::c_void, keysystem: *mut core::ffi::c_void, issupported: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineClassFactoryEx_Impl::IsTypeSupported(this, core::mem::transmute(&r#type), core::mem::transmute(&keysystem)) {
Ok(ok__) => {
issupported.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IMFMediaEngineClassFactory_Vtbl::new::<Identity, OFFSET>(),
CreateMediaSourceExtension: CreateMediaSourceExtension::<Identity, OFFSET>,
CreateMediaKeys: CreateMediaKeys::<Identity, OFFSET>,
IsTypeSupported: IsTypeSupported::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaEngineClassFactoryEx as windows_core::Interface>::IID || iid == &<IMFMediaEngineClassFactory as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaEngineClassFactoryEx {}
windows_core::imp::define_interface!(IMFMediaEngineEME, IMFMediaEngineEME_Vtbl, 0x50dc93e4_ba4f_4275_ae66_83e836e57469);
windows_core::imp::interface_hierarchy!(IMFMediaEngineEME, windows_core::IUnknown);
impl IMFMediaEngineEME {
pub unsafe fn Keys(&self) -> windows_core::Result<IMFMediaKeys> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).Keys)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn SetMediaKeys<P0>(&self, keys: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaKeys>,
{
unsafe { (windows_core::Interface::vtable(self).SetMediaKeys)(windows_core::Interface::as_raw(self), keys.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaEngineEME_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub Keys: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetMediaKeys: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFMediaEngineEME_Impl: windows_core::IUnknownImpl {
fn Keys(&self) -> windows_core::Result<IMFMediaKeys>;
fn SetMediaKeys(&self, keys: windows_core::Ref<IMFMediaKeys>) -> windows_core::Result<()>;
}
impl IMFMediaEngineEME_Vtbl {
pub const fn new<Identity: IMFMediaEngineEME_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Keys<Identity: IMFMediaEngineEME_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, keys: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineEME_Impl::Keys(this) {
Ok(ok__) => {
keys.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetMediaKeys<Identity: IMFMediaEngineEME_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, keys: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineEME_Impl::SetMediaKeys(this, core::mem::transmute_copy(&keys)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), Keys: Keys::<Identity, OFFSET>, SetMediaKeys: SetMediaKeys::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaEngineEME as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaEngineEME {}
windows_core::imp::define_interface!(IMFMediaEngineEMENotify, IMFMediaEngineEMENotify_Vtbl, 0x9e184d15_cdb7_4f86_b49e_566689f4a601);
windows_core::imp::interface_hierarchy!(IMFMediaEngineEMENotify, windows_core::IUnknown);
impl IMFMediaEngineEMENotify {
pub unsafe fn Encrypted(&self, pbinitdata: Option<&[u8]>, bstrinitdatatype: &windows_core::BSTR) {
unsafe { (windows_core::Interface::vtable(self).Encrypted)(windows_core::Interface::as_raw(self), core::mem::transmute(pbinitdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbinitdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute_copy(bstrinitdatatype)) }
}
pub unsafe fn WaitingForKey(&self) {
unsafe { (windows_core::Interface::vtable(self).WaitingForKey)(windows_core::Interface::as_raw(self)) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaEngineEMENotify_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub Encrypted: unsafe extern "system" fn(*mut core::ffi::c_void, *const u8, u32, *mut core::ffi::c_void),
pub WaitingForKey: unsafe extern "system" fn(*mut core::ffi::c_void),
}
pub trait IMFMediaEngineEMENotify_Impl: windows_core::IUnknownImpl {
fn Encrypted(&self, pbinitdata: *const u8, cb: u32, bstrinitdatatype: &windows_core::BSTR);
fn WaitingForKey(&self);
}
impl IMFMediaEngineEMENotify_Vtbl {
pub const fn new<Identity: IMFMediaEngineEMENotify_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Encrypted<Identity: IMFMediaEngineEMENotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbinitdata: *const u8, cb: u32, bstrinitdatatype: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineEMENotify_Impl::Encrypted(this, core::mem::transmute_copy(&pbinitdata), core::mem::transmute_copy(&cb), core::mem::transmute(&bstrinitdatatype))
}
}
unsafe extern "system" fn WaitingForKey<Identity: IMFMediaEngineEMENotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineEMENotify_Impl::WaitingForKey(this)
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Encrypted: Encrypted::<Identity, OFFSET>,
WaitingForKey: WaitingForKey::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaEngineEMENotify as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaEngineEMENotify {}
windows_core::imp::define_interface!(IMFMediaEngineEx, IMFMediaEngineEx_Vtbl, 0x83015ead_b1e6_40d0_a98a_37145ffe1ad1);
impl core::ops::Deref for IMFMediaEngineEx {
type Target = IMFMediaEngine;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFMediaEngineEx, windows_core::IUnknown, IMFMediaEngine);
impl IMFMediaEngineEx {
pub unsafe fn SetSourceFromByteStream<P0>(&self, pbytestream: P0, purl: &windows_core::BSTR) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFByteStream>,
{
unsafe { (windows_core::Interface::vtable(self).SetSourceFromByteStream)(windows_core::Interface::as_raw(self), pbytestream.param().abi(), core::mem::transmute_copy(purl)).ok() }
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn GetStatistics(&self, statisticid: MF_MEDIA_ENGINE_STATISTIC) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStatistics)(windows_core::Interface::as_raw(self), statisticid, &mut result__).map(|| core::mem::transmute(result__))
}
}
pub unsafe fn UpdateVideoStream(&self, psrc: Option<*const MFVideoNormalizedRect>, pdst: Option<*const super::super::Foundation::RECT>, pborderclr: Option<*const MFARGB>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).UpdateVideoStream)(windows_core::Interface::as_raw(self), psrc.unwrap_or(core::mem::zeroed()) as _, pdst.unwrap_or(core::mem::zeroed()) as _, pborderclr.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn GetBalance(&self) -> f64 {
unsafe { (windows_core::Interface::vtable(self).GetBalance)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn SetBalance(&self, balance: f64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetBalance)(windows_core::Interface::as_raw(self), balance).ok() }
}
pub unsafe fn IsPlaybackRateSupported(&self, rate: f64) -> windows_core::BOOL {
unsafe { (windows_core::Interface::vtable(self).IsPlaybackRateSupported)(windows_core::Interface::as_raw(self), rate) }
}
pub unsafe fn FrameStep(&self, forward: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).FrameStep)(windows_core::Interface::as_raw(self), forward.into()).ok() }
}
pub unsafe fn GetResourceCharacteristics(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetResourceCharacteristics)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn GetPresentationAttribute(&self, guidmfattribute: *const windows_core::GUID) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetPresentationAttribute)(windows_core::Interface::as_raw(self), guidmfattribute, &mut result__).map(|| core::mem::transmute(result__))
}
}
pub unsafe fn GetNumberOfStreams(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetNumberOfStreams)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn GetStreamAttribute(&self, dwstreamindex: u32, guidmfattribute: *const windows_core::GUID) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamAttribute)(windows_core::Interface::as_raw(self), dwstreamindex, guidmfattribute, &mut result__).map(|| core::mem::transmute(result__))
}
}
pub unsafe fn GetStreamSelection(&self, dwstreamindex: u32) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamSelection)(windows_core::Interface::as_raw(self), dwstreamindex, &mut result__).map(|| result__)
}
}
pub unsafe fn SetStreamSelection(&self, dwstreamindex: u32, enabled: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetStreamSelection)(windows_core::Interface::as_raw(self), dwstreamindex, enabled.into()).ok() }
}
pub unsafe fn ApplyStreamSelections(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).ApplyStreamSelections)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn IsProtected(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).IsProtected)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn InsertVideoEffect<P0>(&self, peffect: P0, foptional: bool) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).InsertVideoEffect)(windows_core::Interface::as_raw(self), peffect.param().abi(), foptional.into()).ok() }
}
pub unsafe fn InsertAudioEffect<P0>(&self, peffect: P0, foptional: bool) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).InsertAudioEffect)(windows_core::Interface::as_raw(self), peffect.param().abi(), foptional.into()).ok() }
}
pub unsafe fn RemoveAllEffects(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RemoveAllEffects)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn SetTimelineMarkerTimer(&self, timetofire: f64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetTimelineMarkerTimer)(windows_core::Interface::as_raw(self), timetofire).ok() }
}
pub unsafe fn GetTimelineMarkerTimer(&self) -> windows_core::Result<f64> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetTimelineMarkerTimer)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn CancelTimelineMarkerTimer(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).CancelTimelineMarkerTimer)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn IsStereo3D(&self) -> windows_core::BOOL {
unsafe { (windows_core::Interface::vtable(self).IsStereo3D)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetStereo3DFramePackingMode(&self) -> windows_core::Result<MF_MEDIA_ENGINE_S3D_PACKING_MODE> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStereo3DFramePackingMode)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetStereo3DFramePackingMode(&self, packmode: MF_MEDIA_ENGINE_S3D_PACKING_MODE) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetStereo3DFramePackingMode)(windows_core::Interface::as_raw(self), packmode).ok() }
}
pub unsafe fn GetStereo3DRenderMode(&self) -> windows_core::Result<MF3DVideoOutputType> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStereo3DRenderMode)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetStereo3DRenderMode(&self, outputtype: MF3DVideoOutputType) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetStereo3DRenderMode)(windows_core::Interface::as_raw(self), outputtype).ok() }
}
pub unsafe fn EnableWindowlessSwapchainMode(&self, fenable: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).EnableWindowlessSwapchainMode)(windows_core::Interface::as_raw(self), fenable.into()).ok() }
}
pub unsafe fn GetVideoSwapchainHandle(&self) -> windows_core::Result<super::super::Foundation::HANDLE> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetVideoSwapchainHandle)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn EnableHorizontalMirrorMode(&self, fenable: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).EnableHorizontalMirrorMode)(windows_core::Interface::as_raw(self), fenable.into()).ok() }
}
pub unsafe fn GetAudioStreamCategory(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetAudioStreamCategory)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetAudioStreamCategory(&self, category: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetAudioStreamCategory)(windows_core::Interface::as_raw(self), category).ok() }
}
pub unsafe fn GetAudioEndpointRole(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetAudioEndpointRole)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetAudioEndpointRole(&self, role: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetAudioEndpointRole)(windows_core::Interface::as_raw(self), role).ok() }
}
pub unsafe fn GetRealTimeMode(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetRealTimeMode)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetRealTimeMode(&self, fenable: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetRealTimeMode)(windows_core::Interface::as_raw(self), fenable.into()).ok() }
}
pub unsafe fn SetCurrentTimeEx(&self, seektime: f64, seekmode: MF_MEDIA_ENGINE_SEEK_MODE) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetCurrentTimeEx)(windows_core::Interface::as_raw(self), seektime, seekmode).ok() }
}
pub unsafe fn EnableTimeUpdateTimer(&self, fenabletimer: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).EnableTimeUpdateTimer)(windows_core::Interface::as_raw(self), fenabletimer.into()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaEngineEx_Vtbl {
pub base__: IMFMediaEngine_Vtbl,
pub SetSourceFromByteStream: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub GetStatistics: unsafe extern "system" fn(*mut core::ffi::c_void, MF_MEDIA_ENGINE_STATISTIC, *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
GetStatistics: usize,
pub UpdateVideoStream: unsafe extern "system" fn(*mut core::ffi::c_void, *const MFVideoNormalizedRect, *const super::super::Foundation::RECT, *const MFARGB) -> windows_core::HRESULT,
pub GetBalance: unsafe extern "system" fn(*mut core::ffi::c_void) -> f64,
pub SetBalance: unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
pub IsPlaybackRateSupported: unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::BOOL,
pub FrameStep: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT,
pub GetResourceCharacteristics: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub GetPresentationAttribute: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
GetPresentationAttribute: usize,
pub GetNumberOfStreams: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub GetStreamAttribute: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const windows_core::GUID, *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
GetStreamAttribute: usize,
pub GetStreamSelection: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub SetStreamSelection: unsafe extern "system" fn(*mut core::ffi::c_void, u32, windows_core::BOOL) -> windows_core::HRESULT,
pub ApplyStreamSelections: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub IsProtected: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub InsertVideoEffect: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT,
pub InsertAudioEffect: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT,
pub RemoveAllEffects: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetTimelineMarkerTimer: unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
pub GetTimelineMarkerTimer: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub CancelTimelineMarkerTimer: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub IsStereo3D: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::BOOL,
pub GetStereo3DFramePackingMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MF_MEDIA_ENGINE_S3D_PACKING_MODE) -> windows_core::HRESULT,
pub SetStereo3DFramePackingMode: unsafe extern "system" fn(*mut core::ffi::c_void, MF_MEDIA_ENGINE_S3D_PACKING_MODE) -> windows_core::HRESULT,
pub GetStereo3DRenderMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MF3DVideoOutputType) -> windows_core::HRESULT,
pub SetStereo3DRenderMode: unsafe extern "system" fn(*mut core::ffi::c_void, MF3DVideoOutputType) -> windows_core::HRESULT,
pub EnableWindowlessSwapchainMode: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT,
pub GetVideoSwapchainHandle: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::HANDLE) -> windows_core::HRESULT,
pub EnableHorizontalMirrorMode: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT,
pub GetAudioStreamCategory: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub SetAudioStreamCategory: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub GetAudioEndpointRole: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub SetAudioEndpointRole: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub GetRealTimeMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub SetRealTimeMode: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT,
pub SetCurrentTimeEx: unsafe extern "system" fn(*mut core::ffi::c_void, f64, MF_MEDIA_ENGINE_SEEK_MODE) -> windows_core::HRESULT,
pub EnableTimeUpdateTimer: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFMediaEngineEx_Impl: IMFMediaEngine_Impl {
fn SetSourceFromByteStream(&self, pbytestream: windows_core::Ref<IMFByteStream>, purl: &windows_core::BSTR) -> windows_core::Result<()>;
fn GetStatistics(&self, statisticid: MF_MEDIA_ENGINE_STATISTIC) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT>;
fn UpdateVideoStream(&self, psrc: *const MFVideoNormalizedRect, pdst: *const super::super::Foundation::RECT, pborderclr: *const MFARGB) -> windows_core::Result<()>;
fn GetBalance(&self) -> f64;
fn SetBalance(&self, balance: f64) -> windows_core::Result<()>;
fn IsPlaybackRateSupported(&self, rate: f64) -> windows_core::BOOL;
fn FrameStep(&self, forward: windows_core::BOOL) -> windows_core::Result<()>;
fn GetResourceCharacteristics(&self) -> windows_core::Result<u32>;
fn GetPresentationAttribute(&self, guidmfattribute: *const windows_core::GUID) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT>;
fn GetNumberOfStreams(&self) -> windows_core::Result<u32>;
fn GetStreamAttribute(&self, dwstreamindex: u32, guidmfattribute: *const windows_core::GUID) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT>;
fn GetStreamSelection(&self, dwstreamindex: u32) -> windows_core::Result<windows_core::BOOL>;
fn SetStreamSelection(&self, dwstreamindex: u32, enabled: windows_core::BOOL) -> windows_core::Result<()>;
fn ApplyStreamSelections(&self) -> windows_core::Result<()>;
fn IsProtected(&self) -> windows_core::Result<windows_core::BOOL>;
fn InsertVideoEffect(&self, peffect: windows_core::Ref<windows_core::IUnknown>, foptional: windows_core::BOOL) -> windows_core::Result<()>;
fn InsertAudioEffect(&self, peffect: windows_core::Ref<windows_core::IUnknown>, foptional: windows_core::BOOL) -> windows_core::Result<()>;
fn RemoveAllEffects(&self) -> windows_core::Result<()>;
fn SetTimelineMarkerTimer(&self, timetofire: f64) -> windows_core::Result<()>;
fn GetTimelineMarkerTimer(&self) -> windows_core::Result<f64>;
fn CancelTimelineMarkerTimer(&self) -> windows_core::Result<()>;
fn IsStereo3D(&self) -> windows_core::BOOL;
fn GetStereo3DFramePackingMode(&self) -> windows_core::Result<MF_MEDIA_ENGINE_S3D_PACKING_MODE>;
fn SetStereo3DFramePackingMode(&self, packmode: MF_MEDIA_ENGINE_S3D_PACKING_MODE) -> windows_core::Result<()>;
fn GetStereo3DRenderMode(&self) -> windows_core::Result<MF3DVideoOutputType>;
fn SetStereo3DRenderMode(&self, outputtype: MF3DVideoOutputType) -> windows_core::Result<()>;
fn EnableWindowlessSwapchainMode(&self, fenable: windows_core::BOOL) -> windows_core::Result<()>;
fn GetVideoSwapchainHandle(&self) -> windows_core::Result<super::super::Foundation::HANDLE>;
fn EnableHorizontalMirrorMode(&self, fenable: windows_core::BOOL) -> windows_core::Result<()>;
fn GetAudioStreamCategory(&self) -> windows_core::Result<u32>;
fn SetAudioStreamCategory(&self, category: u32) -> windows_core::Result<()>;
fn GetAudioEndpointRole(&self) -> windows_core::Result<u32>;
fn SetAudioEndpointRole(&self, role: u32) -> windows_core::Result<()>;
fn GetRealTimeMode(&self) -> windows_core::Result<windows_core::BOOL>;
fn SetRealTimeMode(&self, fenable: windows_core::BOOL) -> windows_core::Result<()>;
fn SetCurrentTimeEx(&self, seektime: f64, seekmode: MF_MEDIA_ENGINE_SEEK_MODE) -> windows_core::Result<()>;
fn EnableTimeUpdateTimer(&self, fenabletimer: windows_core::BOOL) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFMediaEngineEx_Vtbl {
pub const fn new<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetSourceFromByteStream<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbytestream: *mut core::ffi::c_void, purl: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineEx_Impl::SetSourceFromByteStream(this, core::mem::transmute_copy(&pbytestream), core::mem::transmute(&purl)).into()
}
}
unsafe extern "system" fn GetStatistics<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, statisticid: MF_MEDIA_ENGINE_STATISTIC, pstatistic: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineEx_Impl::GetStatistics(this, core::mem::transmute_copy(&statisticid)) {
Ok(ok__) => {
pstatistic.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn UpdateVideoStream<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, psrc: *const MFVideoNormalizedRect, pdst: *const super::super::Foundation::RECT, pborderclr: *const MFARGB) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineEx_Impl::UpdateVideoStream(this, core::mem::transmute_copy(&psrc), core::mem::transmute_copy(&pdst), core::mem::transmute_copy(&pborderclr)).into()
}
}
unsafe extern "system" fn GetBalance<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> f64 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineEx_Impl::GetBalance(this)
}
}
unsafe extern "system" fn SetBalance<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, balance: f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineEx_Impl::SetBalance(this, core::mem::transmute_copy(&balance)).into()
}
}
unsafe extern "system" fn IsPlaybackRateSupported<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, rate: f64) -> windows_core::BOOL {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineEx_Impl::IsPlaybackRateSupported(this, core::mem::transmute_copy(&rate))
}
}
unsafe extern "system" fn FrameStep<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, forward: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineEx_Impl::FrameStep(this, core::mem::transmute_copy(&forward)).into()
}
}
unsafe extern "system" fn GetResourceCharacteristics<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcharacteristics: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineEx_Impl::GetResourceCharacteristics(this) {
Ok(ok__) => {
pcharacteristics.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetPresentationAttribute<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidmfattribute: *const windows_core::GUID, pvvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineEx_Impl::GetPresentationAttribute(this, core::mem::transmute_copy(&guidmfattribute)) {
Ok(ok__) => {
pvvalue.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetNumberOfStreams<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwstreamcount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineEx_Impl::GetNumberOfStreams(this) {
Ok(ok__) => {
pdwstreamcount.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetStreamAttribute<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, guidmfattribute: *const windows_core::GUID, pvvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineEx_Impl::GetStreamAttribute(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&guidmfattribute)) {
Ok(ok__) => {
pvvalue.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetStreamSelection<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, penabled: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineEx_Impl::GetStreamSelection(this, core::mem::transmute_copy(&dwstreamindex)) {
Ok(ok__) => {
penabled.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetStreamSelection<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, enabled: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineEx_Impl::SetStreamSelection(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&enabled)).into()
}
}
unsafe extern "system" fn ApplyStreamSelections<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineEx_Impl::ApplyStreamSelections(this).into()
}
}
unsafe extern "system" fn IsProtected<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pprotected: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineEx_Impl::IsProtected(this) {
Ok(ok__) => {
pprotected.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn InsertVideoEffect<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, peffect: *mut core::ffi::c_void, foptional: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineEx_Impl::InsertVideoEffect(this, core::mem::transmute_copy(&peffect), core::mem::transmute_copy(&foptional)).into()
}
}
unsafe extern "system" fn InsertAudioEffect<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, peffect: *mut core::ffi::c_void, foptional: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineEx_Impl::InsertAudioEffect(this, core::mem::transmute_copy(&peffect), core::mem::transmute_copy(&foptional)).into()
}
}
unsafe extern "system" fn RemoveAllEffects<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineEx_Impl::RemoveAllEffects(this).into()
}
}
unsafe extern "system" fn SetTimelineMarkerTimer<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, timetofire: f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineEx_Impl::SetTimelineMarkerTimer(this, core::mem::transmute_copy(&timetofire)).into()
}
}
unsafe extern "system" fn GetTimelineMarkerTimer<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ptimetofire: *mut f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineEx_Impl::GetTimelineMarkerTimer(this) {
Ok(ok__) => {
ptimetofire.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn CancelTimelineMarkerTimer<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineEx_Impl::CancelTimelineMarkerTimer(this).into()
}
}
unsafe extern "system" fn IsStereo3D<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::BOOL {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineEx_Impl::IsStereo3D(this)
}
}
unsafe extern "system" fn GetStereo3DFramePackingMode<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, packmode: *mut MF_MEDIA_ENGINE_S3D_PACKING_MODE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineEx_Impl::GetStereo3DFramePackingMode(this) {
Ok(ok__) => {
packmode.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetStereo3DFramePackingMode<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, packmode: MF_MEDIA_ENGINE_S3D_PACKING_MODE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineEx_Impl::SetStereo3DFramePackingMode(this, core::mem::transmute_copy(&packmode)).into()
}
}
unsafe extern "system" fn GetStereo3DRenderMode<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, outputtype: *mut MF3DVideoOutputType) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineEx_Impl::GetStereo3DRenderMode(this) {
Ok(ok__) => {
outputtype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetStereo3DRenderMode<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, outputtype: MF3DVideoOutputType) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineEx_Impl::SetStereo3DRenderMode(this, core::mem::transmute_copy(&outputtype)).into()
}
}
unsafe extern "system" fn EnableWindowlessSwapchainMode<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, fenable: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineEx_Impl::EnableWindowlessSwapchainMode(this, core::mem::transmute_copy(&fenable)).into()
}
}
unsafe extern "system" fn GetVideoSwapchainHandle<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, phswapchain: *mut super::super::Foundation::HANDLE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineEx_Impl::GetVideoSwapchainHandle(this) {
Ok(ok__) => {
phswapchain.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EnableHorizontalMirrorMode<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, fenable: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineEx_Impl::EnableHorizontalMirrorMode(this, core::mem::transmute_copy(&fenable)).into()
}
}
unsafe extern "system" fn GetAudioStreamCategory<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcategory: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineEx_Impl::GetAudioStreamCategory(this) {
Ok(ok__) => {
pcategory.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetAudioStreamCategory<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, category: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineEx_Impl::SetAudioStreamCategory(this, core::mem::transmute_copy(&category)).into()
}
}
unsafe extern "system" fn GetAudioEndpointRole<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, prole: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineEx_Impl::GetAudioEndpointRole(this) {
Ok(ok__) => {
prole.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetAudioEndpointRole<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, role: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineEx_Impl::SetAudioEndpointRole(this, core::mem::transmute_copy(&role)).into()
}
}
unsafe extern "system" fn GetRealTimeMode<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pfenabled: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineEx_Impl::GetRealTimeMode(this) {
Ok(ok__) => {
pfenabled.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetRealTimeMode<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, fenable: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineEx_Impl::SetRealTimeMode(this, core::mem::transmute_copy(&fenable)).into()
}
}
unsafe extern "system" fn SetCurrentTimeEx<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, seektime: f64, seekmode: MF_MEDIA_ENGINE_SEEK_MODE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineEx_Impl::SetCurrentTimeEx(this, core::mem::transmute_copy(&seektime), core::mem::transmute_copy(&seekmode)).into()
}
}
unsafe extern "system" fn EnableTimeUpdateTimer<Identity: IMFMediaEngineEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, fenabletimer: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineEx_Impl::EnableTimeUpdateTimer(this, core::mem::transmute_copy(&fenabletimer)).into()
}
}
Self {
base__: IMFMediaEngine_Vtbl::new::<Identity, OFFSET>(),
SetSourceFromByteStream: SetSourceFromByteStream::<Identity, OFFSET>,
GetStatistics: GetStatistics::<Identity, OFFSET>,
UpdateVideoStream: UpdateVideoStream::<Identity, OFFSET>,
GetBalance: GetBalance::<Identity, OFFSET>,
SetBalance: SetBalance::<Identity, OFFSET>,
IsPlaybackRateSupported: IsPlaybackRateSupported::<Identity, OFFSET>,
FrameStep: FrameStep::<Identity, OFFSET>,
GetResourceCharacteristics: GetResourceCharacteristics::<Identity, OFFSET>,
GetPresentationAttribute: GetPresentationAttribute::<Identity, OFFSET>,
GetNumberOfStreams: GetNumberOfStreams::<Identity, OFFSET>,
GetStreamAttribute: GetStreamAttribute::<Identity, OFFSET>,
GetStreamSelection: GetStreamSelection::<Identity, OFFSET>,
SetStreamSelection: SetStreamSelection::<Identity, OFFSET>,
ApplyStreamSelections: ApplyStreamSelections::<Identity, OFFSET>,
IsProtected: IsProtected::<Identity, OFFSET>,
InsertVideoEffect: InsertVideoEffect::<Identity, OFFSET>,
InsertAudioEffect: InsertAudioEffect::<Identity, OFFSET>,
RemoveAllEffects: RemoveAllEffects::<Identity, OFFSET>,
SetTimelineMarkerTimer: SetTimelineMarkerTimer::<Identity, OFFSET>,
GetTimelineMarkerTimer: GetTimelineMarkerTimer::<Identity, OFFSET>,
CancelTimelineMarkerTimer: CancelTimelineMarkerTimer::<Identity, OFFSET>,
IsStereo3D: IsStereo3D::<Identity, OFFSET>,
GetStereo3DFramePackingMode: GetStereo3DFramePackingMode::<Identity, OFFSET>,
SetStereo3DFramePackingMode: SetStereo3DFramePackingMode::<Identity, OFFSET>,
GetStereo3DRenderMode: GetStereo3DRenderMode::<Identity, OFFSET>,
SetStereo3DRenderMode: SetStereo3DRenderMode::<Identity, OFFSET>,
EnableWindowlessSwapchainMode: EnableWindowlessSwapchainMode::<Identity, OFFSET>,
GetVideoSwapchainHandle: GetVideoSwapchainHandle::<Identity, OFFSET>,
EnableHorizontalMirrorMode: EnableHorizontalMirrorMode::<Identity, OFFSET>,
GetAudioStreamCategory: GetAudioStreamCategory::<Identity, OFFSET>,
SetAudioStreamCategory: SetAudioStreamCategory::<Identity, OFFSET>,
GetAudioEndpointRole: GetAudioEndpointRole::<Identity, OFFSET>,
SetAudioEndpointRole: SetAudioEndpointRole::<Identity, OFFSET>,
GetRealTimeMode: GetRealTimeMode::<Identity, OFFSET>,
SetRealTimeMode: SetRealTimeMode::<Identity, OFFSET>,
SetCurrentTimeEx: SetCurrentTimeEx::<Identity, OFFSET>,
EnableTimeUpdateTimer: EnableTimeUpdateTimer::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaEngineEx as windows_core::Interface>::IID || iid == &<IMFMediaEngine as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFMediaEngineEx {}
windows_core::imp::define_interface!(IMFMediaEngineExtension, IMFMediaEngineExtension_Vtbl, 0x2f69d622_20b5_41e9_afdf_89ced1dda04e);
windows_core::imp::interface_hierarchy!(IMFMediaEngineExtension, windows_core::IUnknown);
impl IMFMediaEngineExtension {
pub unsafe fn CanPlayType(&self, audioonly: bool, mimetype: &windows_core::BSTR) -> windows_core::Result<MF_MEDIA_ENGINE_CANPLAY> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CanPlayType)(windows_core::Interface::as_raw(self), audioonly.into(), core::mem::transmute_copy(mimetype), &mut result__).map(|| result__)
}
}
pub unsafe fn BeginCreateObject<P1, P4, P5>(&self, bstrurl: &windows_core::BSTR, pbytestream: P1, r#type: MF_OBJECT_TYPE, ppiunknowncancelcookie: *mut Option<windows_core::IUnknown>, pcallback: P4, punkstate: P5) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFByteStream>,
P4: windows_core::Param<IMFAsyncCallback>,
P5: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).BeginCreateObject)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrurl), pbytestream.param().abi(), r#type, core::mem::transmute(ppiunknowncancelcookie), pcallback.param().abi(), punkstate.param().abi()).ok() }
}
pub unsafe fn CancelObjectCreation<P0>(&self, piunknowncancelcookie: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).CancelObjectCreation)(windows_core::Interface::as_raw(self), piunknowncancelcookie.param().abi()).ok() }
}
pub unsafe fn EndCreateObject<P0>(&self, presult: P0) -> windows_core::Result<windows_core::IUnknown>
where
P0: windows_core::Param<IMFAsyncResult>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EndCreateObject)(windows_core::Interface::as_raw(self), presult.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaEngineExtension_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub CanPlayType: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL, *mut core::ffi::c_void, *mut MF_MEDIA_ENGINE_CANPLAY) -> windows_core::HRESULT,
pub BeginCreateObject: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, MF_OBJECT_TYPE, *mut *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CancelObjectCreation: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub EndCreateObject: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFMediaEngineExtension_Impl: windows_core::IUnknownImpl {
fn CanPlayType(&self, audioonly: windows_core::BOOL, mimetype: &windows_core::BSTR) -> windows_core::Result<MF_MEDIA_ENGINE_CANPLAY>;
fn BeginCreateObject(&self, bstrurl: &windows_core::BSTR, pbytestream: windows_core::Ref<IMFByteStream>, r#type: MF_OBJECT_TYPE, ppiunknowncancelcookie: windows_core::OutRef<windows_core::IUnknown>, pcallback: windows_core::Ref<IMFAsyncCallback>, punkstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn CancelObjectCreation(&self, piunknowncancelcookie: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn EndCreateObject(&self, presult: windows_core::Ref<IMFAsyncResult>) -> windows_core::Result<windows_core::IUnknown>;
}
impl IMFMediaEngineExtension_Vtbl {
pub const fn new<Identity: IMFMediaEngineExtension_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CanPlayType<Identity: IMFMediaEngineExtension_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, audioonly: windows_core::BOOL, mimetype: *mut core::ffi::c_void, panswer: *mut MF_MEDIA_ENGINE_CANPLAY) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineExtension_Impl::CanPlayType(this, core::mem::transmute_copy(&audioonly), core::mem::transmute(&mimetype)) {
Ok(ok__) => {
panswer.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn BeginCreateObject<Identity: IMFMediaEngineExtension_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, bstrurl: *mut core::ffi::c_void, pbytestream: *mut core::ffi::c_void, r#type: MF_OBJECT_TYPE, ppiunknowncancelcookie: *mut *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineExtension_Impl::BeginCreateObject(this, core::mem::transmute(&bstrurl), core::mem::transmute_copy(&pbytestream), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&ppiunknowncancelcookie), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into()
}
}
unsafe extern "system" fn CancelObjectCreation<Identity: IMFMediaEngineExtension_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, piunknowncancelcookie: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineExtension_Impl::CancelObjectCreation(this, core::mem::transmute_copy(&piunknowncancelcookie)).into()
}
}
unsafe extern "system" fn EndCreateObject<Identity: IMFMediaEngineExtension_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, ppobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineExtension_Impl::EndCreateObject(this, core::mem::transmute_copy(&presult)) {
Ok(ok__) => {
ppobject.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CanPlayType: CanPlayType::<Identity, OFFSET>,
BeginCreateObject: BeginCreateObject::<Identity, OFFSET>,
CancelObjectCreation: CancelObjectCreation::<Identity, OFFSET>,
EndCreateObject: EndCreateObject::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaEngineExtension as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaEngineExtension {}
windows_core::imp::define_interface!(IMFMediaEngineNeedKeyNotify, IMFMediaEngineNeedKeyNotify_Vtbl, 0x46a30204_a696_4b18_8804_246b8f031bb1);
windows_core::imp::interface_hierarchy!(IMFMediaEngineNeedKeyNotify, windows_core::IUnknown);
impl IMFMediaEngineNeedKeyNotify {
pub unsafe fn NeedKey(&self, initdata: Option<&[u8]>) {
unsafe { (windows_core::Interface::vtable(self).NeedKey)(windows_core::Interface::as_raw(self), core::mem::transmute(initdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), initdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaEngineNeedKeyNotify_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub NeedKey: unsafe extern "system" fn(*mut core::ffi::c_void, *const u8, u32),
}
pub trait IMFMediaEngineNeedKeyNotify_Impl: windows_core::IUnknownImpl {
fn NeedKey(&self, initdata: *const u8, cb: u32);
}
impl IMFMediaEngineNeedKeyNotify_Vtbl {
pub const fn new<Identity: IMFMediaEngineNeedKeyNotify_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn NeedKey<Identity: IMFMediaEngineNeedKeyNotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, initdata: *const u8, cb: u32) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineNeedKeyNotify_Impl::NeedKey(this, core::mem::transmute_copy(&initdata), core::mem::transmute_copy(&cb))
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), NeedKey: NeedKey::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaEngineNeedKeyNotify as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaEngineNeedKeyNotify {}
windows_core::imp::define_interface!(IMFMediaEngineNotify, IMFMediaEngineNotify_Vtbl, 0xfee7c112_e776_42b5_9bbf_0048524e2bd5);
windows_core::imp::interface_hierarchy!(IMFMediaEngineNotify, windows_core::IUnknown);
impl IMFMediaEngineNotify {
pub unsafe fn EventNotify(&self, event: u32, param1: usize, param2: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).EventNotify)(windows_core::Interface::as_raw(self), event, param1, param2).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaEngineNotify_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub EventNotify: unsafe extern "system" fn(*mut core::ffi::c_void, u32, usize, u32) -> windows_core::HRESULT,
}
pub trait IMFMediaEngineNotify_Impl: windows_core::IUnknownImpl {
fn EventNotify(&self, event: u32, param1: usize, param2: u32) -> windows_core::Result<()>;
}
impl IMFMediaEngineNotify_Vtbl {
pub const fn new<Identity: IMFMediaEngineNotify_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn EventNotify<Identity: IMFMediaEngineNotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, event: u32, param1: usize, param2: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineNotify_Impl::EventNotify(this, core::mem::transmute_copy(&event), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), EventNotify: EventNotify::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaEngineNotify as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaEngineNotify {}
windows_core::imp::define_interface!(IMFMediaEngineOPMInfo, IMFMediaEngineOPMInfo_Vtbl, 0x765763e6_6c01_4b01_bb0f_b829f60ed28c);
windows_core::imp::interface_hierarchy!(IMFMediaEngineOPMInfo, windows_core::IUnknown);
impl IMFMediaEngineOPMInfo {
pub unsafe fn GetOPMInfo(&self, pstatus: *mut MF_MEDIA_ENGINE_OPM_STATUS, pconstricted: *mut windows_core::BOOL) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetOPMInfo)(windows_core::Interface::as_raw(self), pstatus as _, pconstricted as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaEngineOPMInfo_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetOPMInfo: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MF_MEDIA_ENGINE_OPM_STATUS, *mut windows_core::BOOL) -> windows_core::HRESULT,
}
pub trait IMFMediaEngineOPMInfo_Impl: windows_core::IUnknownImpl {
fn GetOPMInfo(&self, pstatus: *mut MF_MEDIA_ENGINE_OPM_STATUS, pconstricted: *mut windows_core::BOOL) -> windows_core::Result<()>;
}
impl IMFMediaEngineOPMInfo_Vtbl {
pub const fn new<Identity: IMFMediaEngineOPMInfo_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetOPMInfo<Identity: IMFMediaEngineOPMInfo_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pstatus: *mut MF_MEDIA_ENGINE_OPM_STATUS, pconstricted: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineOPMInfo_Impl::GetOPMInfo(this, core::mem::transmute_copy(&pstatus), core::mem::transmute_copy(&pconstricted)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetOPMInfo: GetOPMInfo::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaEngineOPMInfo as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaEngineOPMInfo {}
windows_core::imp::define_interface!(IMFMediaEngineProtectedContent, IMFMediaEngineProtectedContent_Vtbl, 0x9f8021e8_9c8c_487e_bb5c_79aa4779938c);
windows_core::imp::interface_hierarchy!(IMFMediaEngineProtectedContent, windows_core::IUnknown);
impl IMFMediaEngineProtectedContent {
pub unsafe fn ShareResources<P0>(&self, punkdevicecontext: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).ShareResources)(windows_core::Interface::as_raw(self), punkdevicecontext.param().abi()).ok() }
}
pub unsafe fn GetRequiredProtections(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetRequiredProtections)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetOPMWindow(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetOPMWindow)(windows_core::Interface::as_raw(self), hwnd).ok() }
}
pub unsafe fn TransferVideoFrame<P0>(&self, pdstsurf: P0, psrc: Option<*const MFVideoNormalizedRect>, pdst: *const super::super::Foundation::RECT, pborderclr: Option<*const MFARGB>) -> windows_core::Result<u32>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).TransferVideoFrame)(windows_core::Interface::as_raw(self), pdstsurf.param().abi(), psrc.unwrap_or(core::mem::zeroed()) as _, pdst, pborderclr.unwrap_or(core::mem::zeroed()) as _, &mut result__).map(|| result__)
}
}
pub unsafe fn SetContentProtectionManager<P0>(&self, pcpm: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFContentProtectionManager>,
{
unsafe { (windows_core::Interface::vtable(self).SetContentProtectionManager)(windows_core::Interface::as_raw(self), pcpm.param().abi()).ok() }
}
pub unsafe fn SetApplicationCertificate(&self, pbblob: &[u8]) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetApplicationCertificate)(windows_core::Interface::as_raw(self), core::mem::transmute(pbblob.as_ptr()), pbblob.len().try_into().unwrap()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaEngineProtectedContent_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub ShareResources: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetRequiredProtections: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub SetOPMWindow: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::HWND) -> windows_core::HRESULT,
pub TransferVideoFrame: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const MFVideoNormalizedRect, *const super::super::Foundation::RECT, *const MFARGB, *mut u32) -> windows_core::HRESULT,
pub SetContentProtectionManager: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetApplicationCertificate: unsafe extern "system" fn(*mut core::ffi::c_void, *const u8, u32) -> windows_core::HRESULT,
}
pub trait IMFMediaEngineProtectedContent_Impl: windows_core::IUnknownImpl {
fn ShareResources(&self, punkdevicecontext: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn GetRequiredProtections(&self) -> windows_core::Result<u32>;
fn SetOPMWindow(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()>;
fn TransferVideoFrame(&self, pdstsurf: windows_core::Ref<windows_core::IUnknown>, psrc: *const MFVideoNormalizedRect, pdst: *const super::super::Foundation::RECT, pborderclr: *const MFARGB) -> windows_core::Result<u32>;
fn SetContentProtectionManager(&self, pcpm: windows_core::Ref<IMFContentProtectionManager>) -> windows_core::Result<()>;
fn SetApplicationCertificate(&self, pbblob: *const u8, cbblob: u32) -> windows_core::Result<()>;
}
impl IMFMediaEngineProtectedContent_Vtbl {
pub const fn new<Identity: IMFMediaEngineProtectedContent_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn ShareResources<Identity: IMFMediaEngineProtectedContent_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, punkdevicecontext: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineProtectedContent_Impl::ShareResources(this, core::mem::transmute_copy(&punkdevicecontext)).into()
}
}
unsafe extern "system" fn GetRequiredProtections<Identity: IMFMediaEngineProtectedContent_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pframeprotectionflags: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineProtectedContent_Impl::GetRequiredProtections(this) {
Ok(ok__) => {
pframeprotectionflags.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetOPMWindow<Identity: IMFMediaEngineProtectedContent_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineProtectedContent_Impl::SetOPMWindow(this, core::mem::transmute_copy(&hwnd)).into()
}
}
unsafe extern "system" fn TransferVideoFrame<Identity: IMFMediaEngineProtectedContent_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdstsurf: *mut core::ffi::c_void, psrc: *const MFVideoNormalizedRect, pdst: *const super::super::Foundation::RECT, pborderclr: *const MFARGB, pframeprotectionflags: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineProtectedContent_Impl::TransferVideoFrame(this, core::mem::transmute_copy(&pdstsurf), core::mem::transmute_copy(&psrc), core::mem::transmute_copy(&pdst), core::mem::transmute_copy(&pborderclr)) {
Ok(ok__) => {
pframeprotectionflags.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetContentProtectionManager<Identity: IMFMediaEngineProtectedContent_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcpm: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineProtectedContent_Impl::SetContentProtectionManager(this, core::mem::transmute_copy(&pcpm)).into()
}
}
unsafe extern "system" fn SetApplicationCertificate<Identity: IMFMediaEngineProtectedContent_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbblob: *const u8, cbblob: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineProtectedContent_Impl::SetApplicationCertificate(this, core::mem::transmute_copy(&pbblob), core::mem::transmute_copy(&cbblob)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
ShareResources: ShareResources::<Identity, OFFSET>,
GetRequiredProtections: GetRequiredProtections::<Identity, OFFSET>,
SetOPMWindow: SetOPMWindow::<Identity, OFFSET>,
TransferVideoFrame: TransferVideoFrame::<Identity, OFFSET>,
SetContentProtectionManager: SetContentProtectionManager::<Identity, OFFSET>,
SetApplicationCertificate: SetApplicationCertificate::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaEngineProtectedContent as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaEngineProtectedContent {}
windows_core::imp::define_interface!(IMFMediaEngineSrcElements, IMFMediaEngineSrcElements_Vtbl, 0x7a5e5354_b114_4c72_b991_3131d75032ea);
windows_core::imp::interface_hierarchy!(IMFMediaEngineSrcElements, windows_core::IUnknown);
impl IMFMediaEngineSrcElements {
pub unsafe fn GetLength(&self) -> u32 {
unsafe { (windows_core::Interface::vtable(self).GetLength)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetURL(&self, index: u32) -> windows_core::Result<windows_core::BSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetURL)(windows_core::Interface::as_raw(self), index, &mut result__).map(|| core::mem::transmute(result__))
}
}
pub unsafe fn GetType(&self, index: u32) -> windows_core::Result<windows_core::BSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetType)(windows_core::Interface::as_raw(self), index, &mut result__).map(|| core::mem::transmute(result__))
}
}
pub unsafe fn GetMedia(&self, index: u32) -> windows_core::Result<windows_core::BSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMedia)(windows_core::Interface::as_raw(self), index, &mut result__).map(|| core::mem::transmute(result__))
}
}
pub unsafe fn AddElement(&self, purl: &windows_core::BSTR, ptype: &windows_core::BSTR, pmedia: &windows_core::BSTR) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).AddElement)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(purl), core::mem::transmute_copy(ptype), core::mem::transmute_copy(pmedia)).ok() }
}
pub unsafe fn RemoveAllElements(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RemoveAllElements)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaEngineSrcElements_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetLength: unsafe extern "system" fn(*mut core::ffi::c_void) -> u32,
pub GetURL: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetMedia: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AddElement: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RemoveAllElements: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFMediaEngineSrcElements_Impl: windows_core::IUnknownImpl {
fn GetLength(&self) -> u32;
fn GetURL(&self, index: u32) -> windows_core::Result<windows_core::BSTR>;
fn GetType(&self, index: u32) -> windows_core::Result<windows_core::BSTR>;
fn GetMedia(&self, index: u32) -> windows_core::Result<windows_core::BSTR>;
fn AddElement(&self, purl: &windows_core::BSTR, ptype: &windows_core::BSTR, pmedia: &windows_core::BSTR) -> windows_core::Result<()>;
fn RemoveAllElements(&self) -> windows_core::Result<()>;
}
impl IMFMediaEngineSrcElements_Vtbl {
pub const fn new<Identity: IMFMediaEngineSrcElements_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetLength<Identity: IMFMediaEngineSrcElements_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> u32 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineSrcElements_Impl::GetLength(this)
}
}
unsafe extern "system" fn GetURL<Identity: IMFMediaEngineSrcElements_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, index: u32, purl: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineSrcElements_Impl::GetURL(this, core::mem::transmute_copy(&index)) {
Ok(ok__) => {
purl.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetType<Identity: IMFMediaEngineSrcElements_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, index: u32, ptype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineSrcElements_Impl::GetType(this, core::mem::transmute_copy(&index)) {
Ok(ok__) => {
ptype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetMedia<Identity: IMFMediaEngineSrcElements_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, index: u32, pmedia: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineSrcElements_Impl::GetMedia(this, core::mem::transmute_copy(&index)) {
Ok(ok__) => {
pmedia.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn AddElement<Identity: IMFMediaEngineSrcElements_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, purl: *mut core::ffi::c_void, ptype: *mut core::ffi::c_void, pmedia: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineSrcElements_Impl::AddElement(this, core::mem::transmute(&purl), core::mem::transmute(&ptype), core::mem::transmute(&pmedia)).into()
}
}
unsafe extern "system" fn RemoveAllElements<Identity: IMFMediaEngineSrcElements_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineSrcElements_Impl::RemoveAllElements(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetLength: GetLength::<Identity, OFFSET>,
GetURL: GetURL::<Identity, OFFSET>,
GetType: GetType::<Identity, OFFSET>,
GetMedia: GetMedia::<Identity, OFFSET>,
AddElement: AddElement::<Identity, OFFSET>,
RemoveAllElements: RemoveAllElements::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaEngineSrcElements as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaEngineSrcElements {}
windows_core::imp::define_interface!(IMFMediaEngineSrcElementsEx, IMFMediaEngineSrcElementsEx_Vtbl, 0x654a6bb3_e1a3_424a_9908_53a43a0dfda0);
impl core::ops::Deref for IMFMediaEngineSrcElementsEx {
type Target = IMFMediaEngineSrcElements;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFMediaEngineSrcElementsEx, windows_core::IUnknown, IMFMediaEngineSrcElements);
impl IMFMediaEngineSrcElementsEx {
pub unsafe fn AddElementEx(&self, purl: &windows_core::BSTR, ptype: &windows_core::BSTR, pmedia: &windows_core::BSTR, keysystem: &windows_core::BSTR) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).AddElementEx)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(purl), core::mem::transmute_copy(ptype), core::mem::transmute_copy(pmedia), core::mem::transmute_copy(keysystem)).ok() }
}
pub unsafe fn GetKeySystem(&self, index: u32) -> windows_core::Result<windows_core::BSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetKeySystem)(windows_core::Interface::as_raw(self), index, &mut result__).map(|| core::mem::transmute(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaEngineSrcElementsEx_Vtbl {
pub base__: IMFMediaEngineSrcElements_Vtbl,
pub AddElementEx: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetKeySystem: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFMediaEngineSrcElementsEx_Impl: IMFMediaEngineSrcElements_Impl {
fn AddElementEx(&self, purl: &windows_core::BSTR, ptype: &windows_core::BSTR, pmedia: &windows_core::BSTR, keysystem: &windows_core::BSTR) -> windows_core::Result<()>;
fn GetKeySystem(&self, index: u32) -> windows_core::Result<windows_core::BSTR>;
}
impl IMFMediaEngineSrcElementsEx_Vtbl {
pub const fn new<Identity: IMFMediaEngineSrcElementsEx_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn AddElementEx<Identity: IMFMediaEngineSrcElementsEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, purl: *mut core::ffi::c_void, ptype: *mut core::ffi::c_void, pmedia: *mut core::ffi::c_void, keysystem: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineSrcElementsEx_Impl::AddElementEx(this, core::mem::transmute(&purl), core::mem::transmute(&ptype), core::mem::transmute(&pmedia), core::mem::transmute(&keysystem)).into()
}
}
unsafe extern "system" fn GetKeySystem<Identity: IMFMediaEngineSrcElementsEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, index: u32, ptype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineSrcElementsEx_Impl::GetKeySystem(this, core::mem::transmute_copy(&index)) {
Ok(ok__) => {
ptype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IMFMediaEngineSrcElements_Vtbl::new::<Identity, OFFSET>(),
AddElementEx: AddElementEx::<Identity, OFFSET>,
GetKeySystem: GetKeySystem::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaEngineSrcElementsEx as windows_core::Interface>::IID || iid == &<IMFMediaEngineSrcElements as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaEngineSrcElementsEx {}
windows_core::imp::define_interface!(IMFMediaEngineSupportsSourceTransfer, IMFMediaEngineSupportsSourceTransfer_Vtbl, 0xa724b056_1b2e_4642_a6f3_db9420c52908);
windows_core::imp::interface_hierarchy!(IMFMediaEngineSupportsSourceTransfer, windows_core::IUnknown);
impl IMFMediaEngineSupportsSourceTransfer {
pub unsafe fn ShouldTransferSource(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).ShouldTransferSource)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn DetachMediaSource(&self, ppbytestream: *mut Option<IMFByteStream>, ppmediasource: *mut Option<IMFMediaSource>, ppmse: *mut Option<IMFMediaSourceExtension>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).DetachMediaSource)(windows_core::Interface::as_raw(self), core::mem::transmute(ppbytestream), core::mem::transmute(ppmediasource), core::mem::transmute(ppmse)).ok() }
}
pub unsafe fn AttachMediaSource<P0, P1, P2>(&self, pbytestream: P0, pmediasource: P1, pmse: P2) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFByteStream>,
P1: windows_core::Param<IMFMediaSource>,
P2: windows_core::Param<IMFMediaSourceExtension>,
{
unsafe { (windows_core::Interface::vtable(self).AttachMediaSource)(windows_core::Interface::as_raw(self), pbytestream.param().abi(), pmediasource.param().abi(), pmse.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaEngineSupportsSourceTransfer_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub ShouldTransferSource: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub DetachMediaSource: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void, *mut *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AttachMediaSource: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFMediaEngineSupportsSourceTransfer_Impl: windows_core::IUnknownImpl {
fn ShouldTransferSource(&self) -> windows_core::Result<windows_core::BOOL>;
fn DetachMediaSource(&self, ppbytestream: windows_core::OutRef<IMFByteStream>, ppmediasource: windows_core::OutRef<IMFMediaSource>, ppmse: windows_core::OutRef<IMFMediaSourceExtension>) -> windows_core::Result<()>;
fn AttachMediaSource(&self, pbytestream: windows_core::Ref<IMFByteStream>, pmediasource: windows_core::Ref<IMFMediaSource>, pmse: windows_core::Ref<IMFMediaSourceExtension>) -> windows_core::Result<()>;
}
impl IMFMediaEngineSupportsSourceTransfer_Vtbl {
pub const fn new<Identity: IMFMediaEngineSupportsSourceTransfer_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn ShouldTransferSource<Identity: IMFMediaEngineSupportsSourceTransfer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pfshouldtransfer: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineSupportsSourceTransfer_Impl::ShouldTransferSource(this) {
Ok(ok__) => {
pfshouldtransfer.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn DetachMediaSource<Identity: IMFMediaEngineSupportsSourceTransfer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppbytestream: *mut *mut core::ffi::c_void, ppmediasource: *mut *mut core::ffi::c_void, ppmse: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineSupportsSourceTransfer_Impl::DetachMediaSource(this, core::mem::transmute_copy(&ppbytestream), core::mem::transmute_copy(&ppmediasource), core::mem::transmute_copy(&ppmse)).into()
}
}
unsafe extern "system" fn AttachMediaSource<Identity: IMFMediaEngineSupportsSourceTransfer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbytestream: *mut core::ffi::c_void, pmediasource: *mut core::ffi::c_void, pmse: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineSupportsSourceTransfer_Impl::AttachMediaSource(this, core::mem::transmute_copy(&pbytestream), core::mem::transmute_copy(&pmediasource), core::mem::transmute_copy(&pmse)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
ShouldTransferSource: ShouldTransferSource::<Identity, OFFSET>,
DetachMediaSource: DetachMediaSource::<Identity, OFFSET>,
AttachMediaSource: AttachMediaSource::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaEngineSupportsSourceTransfer as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaEngineSupportsSourceTransfer {}
windows_core::imp::define_interface!(IMFMediaEngineTransferSource, IMFMediaEngineTransferSource_Vtbl, 0x24230452_fe54_40cc_94f3_fcc394c340d6);
windows_core::imp::interface_hierarchy!(IMFMediaEngineTransferSource, windows_core::IUnknown);
impl IMFMediaEngineTransferSource {
pub unsafe fn TransferSourceToMediaEngine<P0>(&self, destination: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaEngine>,
{
unsafe { (windows_core::Interface::vtable(self).TransferSourceToMediaEngine)(windows_core::Interface::as_raw(self), destination.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaEngineTransferSource_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub TransferSourceToMediaEngine: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFMediaEngineTransferSource_Impl: windows_core::IUnknownImpl {
fn TransferSourceToMediaEngine(&self, destination: windows_core::Ref<IMFMediaEngine>) -> windows_core::Result<()>;
}
impl IMFMediaEngineTransferSource_Vtbl {
pub const fn new<Identity: IMFMediaEngineTransferSource_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn TransferSourceToMediaEngine<Identity: IMFMediaEngineTransferSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, destination: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineTransferSource_Impl::TransferSourceToMediaEngine(this, core::mem::transmute_copy(&destination)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), TransferSourceToMediaEngine: TransferSourceToMediaEngine::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaEngineTransferSource as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaEngineTransferSource {}
windows_core::imp::define_interface!(IMFMediaEngineWebSupport, IMFMediaEngineWebSupport_Vtbl, 0xba2743a1_07e0_48ef_84b6_9a2ed023ca6c);
windows_core::imp::interface_hierarchy!(IMFMediaEngineWebSupport, windows_core::IUnknown);
impl IMFMediaEngineWebSupport {
pub unsafe fn ShouldDelayTheLoadEvent(&self) -> windows_core::BOOL {
unsafe { (windows_core::Interface::vtable(self).ShouldDelayTheLoadEvent)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn ConnectWebAudio(&self, dwsamplerate: u32) -> windows_core::Result<IAudioSourceProvider> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).ConnectWebAudio)(windows_core::Interface::as_raw(self), dwsamplerate, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn DisconnectWebAudio(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).DisconnectWebAudio)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaEngineWebSupport_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub ShouldDelayTheLoadEvent: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::BOOL,
pub ConnectWebAudio: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub DisconnectWebAudio: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFMediaEngineWebSupport_Impl: windows_core::IUnknownImpl {
fn ShouldDelayTheLoadEvent(&self) -> windows_core::BOOL;
fn ConnectWebAudio(&self, dwsamplerate: u32) -> windows_core::Result<IAudioSourceProvider>;
fn DisconnectWebAudio(&self) -> windows_core::Result<()>;
}
impl IMFMediaEngineWebSupport_Vtbl {
pub const fn new<Identity: IMFMediaEngineWebSupport_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn ShouldDelayTheLoadEvent<Identity: IMFMediaEngineWebSupport_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::BOOL {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineWebSupport_Impl::ShouldDelayTheLoadEvent(this)
}
}
unsafe extern "system" fn ConnectWebAudio<Identity: IMFMediaEngineWebSupport_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwsamplerate: u32, ppsourceprovider: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEngineWebSupport_Impl::ConnectWebAudio(this, core::mem::transmute_copy(&dwsamplerate)) {
Ok(ok__) => {
ppsourceprovider.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn DisconnectWebAudio<Identity: IMFMediaEngineWebSupport_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEngineWebSupport_Impl::DisconnectWebAudio(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
ShouldDelayTheLoadEvent: ShouldDelayTheLoadEvent::<Identity, OFFSET>,
ConnectWebAudio: ConnectWebAudio::<Identity, OFFSET>,
DisconnectWebAudio: DisconnectWebAudio::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaEngineWebSupport as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaEngineWebSupport {}
windows_core::imp::define_interface!(IMFMediaError, IMFMediaError_Vtbl, 0xfc0e10d2_ab2a_4501_a951_06bb1075184c);
windows_core::imp::interface_hierarchy!(IMFMediaError, windows_core::IUnknown);
impl IMFMediaError {
pub unsafe fn GetErrorCode(&self) -> u16 {
unsafe { (windows_core::Interface::vtable(self).GetErrorCode)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetExtendedErrorCode(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetExtendedErrorCode)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn SetErrorCode(&self, error: MF_MEDIA_ENGINE_ERR) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetErrorCode)(windows_core::Interface::as_raw(self), error).ok() }
}
pub unsafe fn SetExtendedErrorCode(&self, error: windows_core::HRESULT) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetExtendedErrorCode)(windows_core::Interface::as_raw(self), error).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaError_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetErrorCode: unsafe extern "system" fn(*mut core::ffi::c_void) -> u16,
pub GetExtendedErrorCode: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetErrorCode: unsafe extern "system" fn(*mut core::ffi::c_void, MF_MEDIA_ENGINE_ERR) -> windows_core::HRESULT,
pub SetExtendedErrorCode: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::HRESULT) -> windows_core::HRESULT,
}
pub trait IMFMediaError_Impl: windows_core::IUnknownImpl {
fn GetErrorCode(&self) -> u16;
fn GetExtendedErrorCode(&self) -> windows_core::Result<()>;
fn SetErrorCode(&self, error: MF_MEDIA_ENGINE_ERR) -> windows_core::Result<()>;
fn SetExtendedErrorCode(&self, error: windows_core::HRESULT) -> windows_core::Result<()>;
}
impl IMFMediaError_Vtbl {
pub const fn new<Identity: IMFMediaError_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetErrorCode<Identity: IMFMediaError_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> u16 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaError_Impl::GetErrorCode(this)
}
}
unsafe extern "system" fn GetExtendedErrorCode<Identity: IMFMediaError_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaError_Impl::GetExtendedErrorCode(this).into()
}
}
unsafe extern "system" fn SetErrorCode<Identity: IMFMediaError_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, error: MF_MEDIA_ENGINE_ERR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaError_Impl::SetErrorCode(this, core::mem::transmute_copy(&error)).into()
}
}
unsafe extern "system" fn SetExtendedErrorCode<Identity: IMFMediaError_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, error: windows_core::HRESULT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaError_Impl::SetExtendedErrorCode(this, core::mem::transmute_copy(&error)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetErrorCode: GetErrorCode::<Identity, OFFSET>,
GetExtendedErrorCode: GetExtendedErrorCode::<Identity, OFFSET>,
SetErrorCode: SetErrorCode::<Identity, OFFSET>,
SetExtendedErrorCode: SetExtendedErrorCode::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaError as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaError {}
windows_core::imp::define_interface!(IMFMediaEvent, IMFMediaEvent_Vtbl, 0xdf598932_f10c_4e39_bba2_c308f101daa3);
impl core::ops::Deref for IMFMediaEvent {
type Target = IMFAttributes;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFMediaEvent, windows_core::IUnknown, IMFAttributes);
impl IMFMediaEvent {
pub unsafe fn GetType(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetType)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetExtendedType(&self) -> windows_core::Result<windows_core::GUID> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetExtendedType)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetStatus(&self) -> windows_core::Result<windows_core::HRESULT> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn GetValue(&self) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetValue)(windows_core::Interface::as_raw(self), &mut result__).map(|| core::mem::transmute(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaEvent_Vtbl {
pub base__: IMFAttributes_Vtbl,
pub GetType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetExtendedType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT,
pub GetStatus: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::HRESULT) -> windows_core::HRESULT,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub GetValue: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
GetValue: usize,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFMediaEvent_Impl: IMFAttributes_Impl {
fn GetType(&self) -> windows_core::Result<u32>;
fn GetExtendedType(&self) -> windows_core::Result<windows_core::GUID>;
fn GetStatus(&self) -> windows_core::Result<windows_core::HRESULT>;
fn GetValue(&self) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFMediaEvent_Vtbl {
pub const fn new<Identity: IMFMediaEvent_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetType<Identity: IMFMediaEvent_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pmet: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEvent_Impl::GetType(this) {
Ok(ok__) => {
pmet.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetExtendedType<Identity: IMFMediaEvent_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pguidextendedtype: *mut windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEvent_Impl::GetExtendedType(this) {
Ok(ok__) => {
pguidextendedtype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetStatus<Identity: IMFMediaEvent_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, phrstatus: *mut windows_core::HRESULT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEvent_Impl::GetStatus(this) {
Ok(ok__) => {
phrstatus.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetValue<Identity: IMFMediaEvent_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pvvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEvent_Impl::GetValue(this) {
Ok(ok__) => {
pvvalue.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, OFFSET>(),
GetType: GetType::<Identity, OFFSET>,
GetExtendedType: GetExtendedType::<Identity, OFFSET>,
GetStatus: GetStatus::<Identity, OFFSET>,
GetValue: GetValue::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaEvent as windows_core::Interface>::IID || iid == &<IMFAttributes as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFMediaEvent {}
windows_core::imp::define_interface!(IMFMediaEventGenerator, IMFMediaEventGenerator_Vtbl, 0x2cd0bd52_bcd5_4b89_b62c_eadc0c031e7d);
windows_core::imp::interface_hierarchy!(IMFMediaEventGenerator, windows_core::IUnknown);
impl IMFMediaEventGenerator {
pub unsafe fn GetEvent(&self, dwflags: MEDIA_EVENT_GENERATOR_GET_EVENT_FLAGS) -> windows_core::Result<IMFMediaEvent> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetEvent)(windows_core::Interface::as_raw(self), dwflags, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn BeginGetEvent<P0, P1>(&self, pcallback: P0, punkstate: P1) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncCallback>,
P1: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).BeginGetEvent)(windows_core::Interface::as_raw(self), pcallback.param().abi(), punkstate.param().abi()).ok() }
}
pub unsafe fn EndGetEvent<P0>(&self, presult: P0) -> windows_core::Result<IMFMediaEvent>
where
P0: windows_core::Param<IMFAsyncResult>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EndGetEvent)(windows_core::Interface::as_raw(self), presult.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn QueueEvent(&self, met: u32, guidextendedtype: *const windows_core::GUID, hrstatus: windows_core::HRESULT, pvvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).QueueEvent)(windows_core::Interface::as_raw(self), met, guidextendedtype, hrstatus, core::mem::transmute(pvvalue)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaEventGenerator_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetEvent: unsafe extern "system" fn(*mut core::ffi::c_void, MEDIA_EVENT_GENERATOR_GET_EVENT_FLAGS, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub BeginGetEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub EndGetEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub QueueEvent: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const windows_core::GUID, windows_core::HRESULT, *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
QueueEvent: usize,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFMediaEventGenerator_Impl: windows_core::IUnknownImpl {
fn GetEvent(&self, dwflags: MEDIA_EVENT_GENERATOR_GET_EVENT_FLAGS) -> windows_core::Result<IMFMediaEvent>;
fn BeginGetEvent(&self, pcallback: windows_core::Ref<IMFAsyncCallback>, punkstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn EndGetEvent(&self, presult: windows_core::Ref<IMFAsyncResult>) -> windows_core::Result<IMFMediaEvent>;
fn QueueEvent(&self, met: u32, guidextendedtype: *const windows_core::GUID, hrstatus: windows_core::HRESULT, pvvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFMediaEventGenerator_Vtbl {
pub const fn new<Identity: IMFMediaEventGenerator_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetEvent<Identity: IMFMediaEventGenerator_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwflags: MEDIA_EVENT_GENERATOR_GET_EVENT_FLAGS, ppevent: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEventGenerator_Impl::GetEvent(this, core::mem::transmute_copy(&dwflags)) {
Ok(ok__) => {
ppevent.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn BeginGetEvent<Identity: IMFMediaEventGenerator_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEventGenerator_Impl::BeginGetEvent(this, core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into()
}
}
unsafe extern "system" fn EndGetEvent<Identity: IMFMediaEventGenerator_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, ppevent: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEventGenerator_Impl::EndGetEvent(this, core::mem::transmute_copy(&presult)) {
Ok(ok__) => {
ppevent.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn QueueEvent<Identity: IMFMediaEventGenerator_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, met: u32, guidextendedtype: *const windows_core::GUID, hrstatus: windows_core::HRESULT, pvvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEventGenerator_Impl::QueueEvent(this, core::mem::transmute_copy(&met), core::mem::transmute_copy(&guidextendedtype), core::mem::transmute_copy(&hrstatus), core::mem::transmute_copy(&pvvalue)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetEvent: GetEvent::<Identity, OFFSET>,
BeginGetEvent: BeginGetEvent::<Identity, OFFSET>,
EndGetEvent: EndGetEvent::<Identity, OFFSET>,
QueueEvent: QueueEvent::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaEventGenerator as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFMediaEventGenerator {}
windows_core::imp::define_interface!(IMFMediaEventQueue, IMFMediaEventQueue_Vtbl, 0x36f846fc_2256_48b6_b58e_e2b638316581);
windows_core::imp::interface_hierarchy!(IMFMediaEventQueue, windows_core::IUnknown);
impl IMFMediaEventQueue {
pub unsafe fn GetEvent(&self, dwflags: u32) -> windows_core::Result<IMFMediaEvent> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetEvent)(windows_core::Interface::as_raw(self), dwflags, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn BeginGetEvent<P0, P1>(&self, pcallback: P0, punkstate: P1) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncCallback>,
P1: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).BeginGetEvent)(windows_core::Interface::as_raw(self), pcallback.param().abi(), punkstate.param().abi()).ok() }
}
pub unsafe fn EndGetEvent<P0>(&self, presult: P0) -> windows_core::Result<IMFMediaEvent>
where
P0: windows_core::Param<IMFAsyncResult>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EndGetEvent)(windows_core::Interface::as_raw(self), presult.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn QueueEvent<P0>(&self, pevent: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaEvent>,
{
unsafe { (windows_core::Interface::vtable(self).QueueEvent)(windows_core::Interface::as_raw(self), pevent.param().abi()).ok() }
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn QueueEventParamVar(&self, met: u32, guidextendedtype: *const windows_core::GUID, hrstatus: windows_core::HRESULT, pvvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).QueueEventParamVar)(windows_core::Interface::as_raw(self), met, guidextendedtype, hrstatus, core::mem::transmute(pvvalue)).ok() }
}
pub unsafe fn QueueEventParamUnk<P3>(&self, met: u32, guidextendedtype: *const windows_core::GUID, hrstatus: windows_core::HRESULT, punk: P3) -> windows_core::Result<()>
where
P3: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).QueueEventParamUnk)(windows_core::Interface::as_raw(self), met, guidextendedtype, hrstatus, punk.param().abi()).ok() }
}
pub unsafe fn Shutdown(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Shutdown)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaEventQueue_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetEvent: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub BeginGetEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub EndGetEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub QueueEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub QueueEventParamVar: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const windows_core::GUID, windows_core::HRESULT, *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
QueueEventParamVar: usize,
pub QueueEventParamUnk: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const windows_core::GUID, windows_core::HRESULT, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Shutdown: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFMediaEventQueue_Impl: windows_core::IUnknownImpl {
fn GetEvent(&self, dwflags: u32) -> windows_core::Result<IMFMediaEvent>;
fn BeginGetEvent(&self, pcallback: windows_core::Ref<IMFAsyncCallback>, punkstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn EndGetEvent(&self, presult: windows_core::Ref<IMFAsyncResult>) -> windows_core::Result<IMFMediaEvent>;
fn QueueEvent(&self, pevent: windows_core::Ref<IMFMediaEvent>) -> windows_core::Result<()>;
fn QueueEventParamVar(&self, met: u32, guidextendedtype: *const windows_core::GUID, hrstatus: windows_core::HRESULT, pvvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>;
fn QueueEventParamUnk(&self, met: u32, guidextendedtype: *const windows_core::GUID, hrstatus: windows_core::HRESULT, punk: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn Shutdown(&self) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFMediaEventQueue_Vtbl {
pub const fn new<Identity: IMFMediaEventQueue_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetEvent<Identity: IMFMediaEventQueue_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwflags: u32, ppevent: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEventQueue_Impl::GetEvent(this, core::mem::transmute_copy(&dwflags)) {
Ok(ok__) => {
ppevent.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn BeginGetEvent<Identity: IMFMediaEventQueue_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEventQueue_Impl::BeginGetEvent(this, core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into()
}
}
unsafe extern "system" fn EndGetEvent<Identity: IMFMediaEventQueue_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, ppevent: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaEventQueue_Impl::EndGetEvent(this, core::mem::transmute_copy(&presult)) {
Ok(ok__) => {
ppevent.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn QueueEvent<Identity: IMFMediaEventQueue_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pevent: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEventQueue_Impl::QueueEvent(this, core::mem::transmute_copy(&pevent)).into()
}
}
unsafe extern "system" fn QueueEventParamVar<Identity: IMFMediaEventQueue_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, met: u32, guidextendedtype: *const windows_core::GUID, hrstatus: windows_core::HRESULT, pvvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEventQueue_Impl::QueueEventParamVar(this, core::mem::transmute_copy(&met), core::mem::transmute_copy(&guidextendedtype), core::mem::transmute_copy(&hrstatus), core::mem::transmute_copy(&pvvalue)).into()
}
}
unsafe extern "system" fn QueueEventParamUnk<Identity: IMFMediaEventQueue_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, met: u32, guidextendedtype: *const windows_core::GUID, hrstatus: windows_core::HRESULT, punk: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEventQueue_Impl::QueueEventParamUnk(this, core::mem::transmute_copy(&met), core::mem::transmute_copy(&guidextendedtype), core::mem::transmute_copy(&hrstatus), core::mem::transmute_copy(&punk)).into()
}
}
unsafe extern "system" fn Shutdown<Identity: IMFMediaEventQueue_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaEventQueue_Impl::Shutdown(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetEvent: GetEvent::<Identity, OFFSET>,
BeginGetEvent: BeginGetEvent::<Identity, OFFSET>,
EndGetEvent: EndGetEvent::<Identity, OFFSET>,
QueueEvent: QueueEvent::<Identity, OFFSET>,
QueueEventParamVar: QueueEventParamVar::<Identity, OFFSET>,
QueueEventParamUnk: QueueEventParamUnk::<Identity, OFFSET>,
Shutdown: Shutdown::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaEventQueue as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFMediaEventQueue {}
windows_core::imp::define_interface!(IMFMediaKeySession, IMFMediaKeySession_Vtbl, 0x24fa67d5_d1d0_4dc5_995c_c0efdc191fb5);
windows_core::imp::interface_hierarchy!(IMFMediaKeySession, windows_core::IUnknown);
impl IMFMediaKeySession {
pub unsafe fn GetError(&self, code: *mut u16, systemcode: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetError)(windows_core::Interface::as_raw(self), code as _, systemcode as _).ok() }
}
pub unsafe fn KeySystem(&self) -> windows_core::Result<windows_core::BSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).KeySystem)(windows_core::Interface::as_raw(self), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub unsafe fn SessionId(&self) -> windows_core::Result<windows_core::BSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).SessionId)(windows_core::Interface::as_raw(self), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub unsafe fn Update(&self, key: &[u8]) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Update)(windows_core::Interface::as_raw(self), core::mem::transmute(key.as_ptr()), key.len().try_into().unwrap()).ok() }
}
pub unsafe fn Close(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaKeySession_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetError: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16, *mut u32) -> windows_core::HRESULT,
pub KeySystem: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SessionId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Update: unsafe extern "system" fn(*mut core::ffi::c_void, *const u8, u32) -> windows_core::HRESULT,
pub Close: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFMediaKeySession_Impl: windows_core::IUnknownImpl {
fn GetError(&self, code: *mut u16, systemcode: *mut u32) -> windows_core::Result<()>;
fn KeySystem(&self) -> windows_core::Result<windows_core::BSTR>;
fn SessionId(&self) -> windows_core::Result<windows_core::BSTR>;
fn Update(&self, key: *const u8, cb: u32) -> windows_core::Result<()>;
fn Close(&self) -> windows_core::Result<()>;
}
impl IMFMediaKeySession_Vtbl {
pub const fn new<Identity: IMFMediaKeySession_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetError<Identity: IMFMediaKeySession_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, code: *mut u16, systemcode: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaKeySession_Impl::GetError(this, core::mem::transmute_copy(&code), core::mem::transmute_copy(&systemcode)).into()
}
}
unsafe extern "system" fn KeySystem<Identity: IMFMediaKeySession_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, keysystem: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaKeySession_Impl::KeySystem(this) {
Ok(ok__) => {
keysystem.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SessionId<Identity: IMFMediaKeySession_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, sessionid: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaKeySession_Impl::SessionId(this) {
Ok(ok__) => {
sessionid.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Update<Identity: IMFMediaKeySession_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, key: *const u8, cb: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaKeySession_Impl::Update(this, core::mem::transmute_copy(&key), core::mem::transmute_copy(&cb)).into()
}
}
unsafe extern "system" fn Close<Identity: IMFMediaKeySession_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaKeySession_Impl::Close(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetError: GetError::<Identity, OFFSET>,
KeySystem: KeySystem::<Identity, OFFSET>,
SessionId: SessionId::<Identity, OFFSET>,
Update: Update::<Identity, OFFSET>,
Close: Close::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaKeySession as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaKeySession {}
windows_core::imp::define_interface!(IMFMediaKeySession2, IMFMediaKeySession2_Vtbl, 0xe9707e05_6d55_4636_b185_3de21210bd75);
impl core::ops::Deref for IMFMediaKeySession2 {
type Target = IMFMediaKeySession;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFMediaKeySession2, windows_core::IUnknown, IMFMediaKeySession);
impl IMFMediaKeySession2 {
pub unsafe fn get_KeyStatuses(&self, pkeystatusesarray: *mut *mut MFMediaKeyStatus, pusize: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).get_KeyStatuses)(windows_core::Interface::as_raw(self), pkeystatusesarray as _, pusize as _).ok() }
}
pub unsafe fn Load(&self, bstrsessionid: &windows_core::BSTR) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).Load)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(bstrsessionid), &mut result__).map(|| result__)
}
}
pub unsafe fn GenerateRequest(&self, initdatatype: &windows_core::BSTR, pbinitdata: &[u8]) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GenerateRequest)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(initdatatype), core::mem::transmute(pbinitdata.as_ptr()), pbinitdata.len().try_into().unwrap()).ok() }
}
pub unsafe fn Expiration(&self) -> windows_core::Result<f64> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).Expiration)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn Remove(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Remove)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn Shutdown(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Shutdown)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaKeySession2_Vtbl {
pub base__: IMFMediaKeySession_Vtbl,
pub get_KeyStatuses: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut MFMediaKeyStatus, *mut u32) -> windows_core::HRESULT,
pub Load: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub GenerateRequest: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const u8, u32) -> windows_core::HRESULT,
pub Expiration: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub Remove: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Shutdown: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFMediaKeySession2_Impl: IMFMediaKeySession_Impl {
fn get_KeyStatuses(&self, pkeystatusesarray: *mut *mut MFMediaKeyStatus, pusize: *mut u32) -> windows_core::Result<()>;
fn Load(&self, bstrsessionid: &windows_core::BSTR) -> windows_core::Result<windows_core::BOOL>;
fn GenerateRequest(&self, initdatatype: &windows_core::BSTR, pbinitdata: *const u8, cb: u32) -> windows_core::Result<()>;
fn Expiration(&self) -> windows_core::Result<f64>;
fn Remove(&self) -> windows_core::Result<()>;
fn Shutdown(&self) -> windows_core::Result<()>;
}
impl IMFMediaKeySession2_Vtbl {
pub const fn new<Identity: IMFMediaKeySession2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn get_KeyStatuses<Identity: IMFMediaKeySession2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pkeystatusesarray: *mut *mut MFMediaKeyStatus, pusize: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaKeySession2_Impl::get_KeyStatuses(this, core::mem::transmute_copy(&pkeystatusesarray), core::mem::transmute_copy(&pusize)).into()
}
}
unsafe extern "system" fn Load<Identity: IMFMediaKeySession2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, bstrsessionid: *mut core::ffi::c_void, pfloaded: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaKeySession2_Impl::Load(this, core::mem::transmute(&bstrsessionid)) {
Ok(ok__) => {
pfloaded.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GenerateRequest<Identity: IMFMediaKeySession2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, initdatatype: *mut core::ffi::c_void, pbinitdata: *const u8, cb: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaKeySession2_Impl::GenerateRequest(this, core::mem::transmute(&initdatatype), core::mem::transmute_copy(&pbinitdata), core::mem::transmute_copy(&cb)).into()
}
}
unsafe extern "system" fn Expiration<Identity: IMFMediaKeySession2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dblexpiration: *mut f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaKeySession2_Impl::Expiration(this) {
Ok(ok__) => {
dblexpiration.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Remove<Identity: IMFMediaKeySession2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaKeySession2_Impl::Remove(this).into()
}
}
unsafe extern "system" fn Shutdown<Identity: IMFMediaKeySession2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaKeySession2_Impl::Shutdown(this).into()
}
}
Self {
base__: IMFMediaKeySession_Vtbl::new::<Identity, OFFSET>(),
get_KeyStatuses: get_KeyStatuses::<Identity, OFFSET>,
Load: Load::<Identity, OFFSET>,
GenerateRequest: GenerateRequest::<Identity, OFFSET>,
Expiration: Expiration::<Identity, OFFSET>,
Remove: Remove::<Identity, OFFSET>,
Shutdown: Shutdown::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaKeySession2 as windows_core::Interface>::IID || iid == &<IMFMediaKeySession as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaKeySession2 {}
windows_core::imp::define_interface!(IMFMediaKeySessionNotify, IMFMediaKeySessionNotify_Vtbl, 0x6a0083f9_8947_4c1d_9ce0_cdee22b23135);
windows_core::imp::interface_hierarchy!(IMFMediaKeySessionNotify, windows_core::IUnknown);
impl IMFMediaKeySessionNotify {
pub unsafe fn KeyMessage(&self, destinationurl: &windows_core::BSTR, message: &[u8]) {
unsafe { (windows_core::Interface::vtable(self).KeyMessage)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(destinationurl), core::mem::transmute(message.as_ptr()), message.len().try_into().unwrap()) }
}
pub unsafe fn KeyAdded(&self) {
unsafe { (windows_core::Interface::vtable(self).KeyAdded)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn KeyError(&self, code: u16, systemcode: u32) {
unsafe { (windows_core::Interface::vtable(self).KeyError)(windows_core::Interface::as_raw(self), code, systemcode) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaKeySessionNotify_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub KeyMessage: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const u8, u32),
pub KeyAdded: unsafe extern "system" fn(*mut core::ffi::c_void),
pub KeyError: unsafe extern "system" fn(*mut core::ffi::c_void, u16, u32),
}
pub trait IMFMediaKeySessionNotify_Impl: windows_core::IUnknownImpl {
fn KeyMessage(&self, destinationurl: &windows_core::BSTR, message: *const u8, cb: u32);
fn KeyAdded(&self);
fn KeyError(&self, code: u16, systemcode: u32);
}
impl IMFMediaKeySessionNotify_Vtbl {
pub const fn new<Identity: IMFMediaKeySessionNotify_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn KeyMessage<Identity: IMFMediaKeySessionNotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, destinationurl: *mut core::ffi::c_void, message: *const u8, cb: u32) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaKeySessionNotify_Impl::KeyMessage(this, core::mem::transmute(&destinationurl), core::mem::transmute_copy(&message), core::mem::transmute_copy(&cb))
}
}
unsafe extern "system" fn KeyAdded<Identity: IMFMediaKeySessionNotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaKeySessionNotify_Impl::KeyAdded(this)
}
}
unsafe extern "system" fn KeyError<Identity: IMFMediaKeySessionNotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, code: u16, systemcode: u32) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaKeySessionNotify_Impl::KeyError(this, core::mem::transmute_copy(&code), core::mem::transmute_copy(&systemcode))
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
KeyMessage: KeyMessage::<Identity, OFFSET>,
KeyAdded: KeyAdded::<Identity, OFFSET>,
KeyError: KeyError::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaKeySessionNotify as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaKeySessionNotify {}
windows_core::imp::define_interface!(IMFMediaKeySessionNotify2, IMFMediaKeySessionNotify2_Vtbl, 0xc3a9e92a_da88_46b0_a110_6cf953026cb9);
impl core::ops::Deref for IMFMediaKeySessionNotify2 {
type Target = IMFMediaKeySessionNotify;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFMediaKeySessionNotify2, windows_core::IUnknown, IMFMediaKeySessionNotify);
impl IMFMediaKeySessionNotify2 {
pub unsafe fn KeyMessage2(&self, emessagetype: MF_MEDIAKEYSESSION_MESSAGETYPE, destinationurl: &windows_core::BSTR, pbmessage: &[u8]) {
unsafe { (windows_core::Interface::vtable(self).KeyMessage2)(windows_core::Interface::as_raw(self), emessagetype, core::mem::transmute_copy(destinationurl), core::mem::transmute(pbmessage.as_ptr()), pbmessage.len().try_into().unwrap()) }
}
pub unsafe fn KeyStatusChange(&self) {
unsafe { (windows_core::Interface::vtable(self).KeyStatusChange)(windows_core::Interface::as_raw(self)) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaKeySessionNotify2_Vtbl {
pub base__: IMFMediaKeySessionNotify_Vtbl,
pub KeyMessage2: unsafe extern "system" fn(*mut core::ffi::c_void, MF_MEDIAKEYSESSION_MESSAGETYPE, *mut core::ffi::c_void, *const u8, u32),
pub KeyStatusChange: unsafe extern "system" fn(*mut core::ffi::c_void),
}
pub trait IMFMediaKeySessionNotify2_Impl: IMFMediaKeySessionNotify_Impl {
fn KeyMessage2(&self, emessagetype: MF_MEDIAKEYSESSION_MESSAGETYPE, destinationurl: &windows_core::BSTR, pbmessage: *const u8, cbmessage: u32);
fn KeyStatusChange(&self);
}
impl IMFMediaKeySessionNotify2_Vtbl {
pub const fn new<Identity: IMFMediaKeySessionNotify2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn KeyMessage2<Identity: IMFMediaKeySessionNotify2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, emessagetype: MF_MEDIAKEYSESSION_MESSAGETYPE, destinationurl: *mut core::ffi::c_void, pbmessage: *const u8, cbmessage: u32) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaKeySessionNotify2_Impl::KeyMessage2(this, core::mem::transmute_copy(&emessagetype), core::mem::transmute(&destinationurl), core::mem::transmute_copy(&pbmessage), core::mem::transmute_copy(&cbmessage))
}
}
unsafe extern "system" fn KeyStatusChange<Identity: IMFMediaKeySessionNotify2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaKeySessionNotify2_Impl::KeyStatusChange(this)
}
}
Self {
base__: IMFMediaKeySessionNotify_Vtbl::new::<Identity, OFFSET>(),
KeyMessage2: KeyMessage2::<Identity, OFFSET>,
KeyStatusChange: KeyStatusChange::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaKeySessionNotify2 as windows_core::Interface>::IID || iid == &<IMFMediaKeySessionNotify as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaKeySessionNotify2 {}
windows_core::imp::define_interface!(IMFMediaKeySystemAccess, IMFMediaKeySystemAccess_Vtbl, 0xaec63fda_7a97_4944_b35c_6c6df8085cc3);
windows_core::imp::interface_hierarchy!(IMFMediaKeySystemAccess, windows_core::IUnknown);
impl IMFMediaKeySystemAccess {
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn CreateMediaKeys<P0>(&self, pcdmcustomconfig: P0) -> windows_core::Result<IMFMediaKeys2>
where
P0: windows_core::Param<super::super::UI::Shell::PropertiesSystem::IPropertyStore>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateMediaKeys)(windows_core::Interface::as_raw(self), pcdmcustomconfig.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn SupportedConfiguration(&self) -> windows_core::Result<super::super::UI::Shell::PropertiesSystem::IPropertyStore> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).SupportedConfiguration)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn KeySystem(&self) -> windows_core::Result<windows_core::BSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).KeySystem)(windows_core::Interface::as_raw(self), &mut result__).map(|| core::mem::transmute(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaKeySystemAccess_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub CreateMediaKeys: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))]
CreateMediaKeys: usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub SupportedConfiguration: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))]
SupportedConfiguration: usize,
pub KeySystem: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub trait IMFMediaKeySystemAccess_Impl: windows_core::IUnknownImpl {
fn CreateMediaKeys(&self, pcdmcustomconfig: windows_core::Ref<super::super::UI::Shell::PropertiesSystem::IPropertyStore>) -> windows_core::Result<IMFMediaKeys2>;
fn SupportedConfiguration(&self) -> windows_core::Result<super::super::UI::Shell::PropertiesSystem::IPropertyStore>;
fn KeySystem(&self) -> windows_core::Result<windows_core::BSTR>;
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl IMFMediaKeySystemAccess_Vtbl {
pub const fn new<Identity: IMFMediaKeySystemAccess_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateMediaKeys<Identity: IMFMediaKeySystemAccess_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcdmcustomconfig: *mut core::ffi::c_void, ppkeys: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaKeySystemAccess_Impl::CreateMediaKeys(this, core::mem::transmute_copy(&pcdmcustomconfig)) {
Ok(ok__) => {
ppkeys.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SupportedConfiguration<Identity: IMFMediaKeySystemAccess_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppsupportedconfiguration: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaKeySystemAccess_Impl::SupportedConfiguration(this) {
Ok(ok__) => {
ppsupportedconfiguration.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn KeySystem<Identity: IMFMediaKeySystemAccess_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pkeysystem: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaKeySystemAccess_Impl::KeySystem(this) {
Ok(ok__) => {
pkeysystem.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CreateMediaKeys: CreateMediaKeys::<Identity, OFFSET>,
SupportedConfiguration: SupportedConfiguration::<Identity, OFFSET>,
KeySystem: KeySystem::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaKeySystemAccess as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl windows_core::RuntimeName for IMFMediaKeySystemAccess {}
windows_core::imp::define_interface!(IMFMediaKeys, IMFMediaKeys_Vtbl, 0x5cb31c05_61ff_418f_afda_caaf41421a38);
windows_core::imp::interface_hierarchy!(IMFMediaKeys, windows_core::IUnknown);
impl IMFMediaKeys {
pub unsafe fn CreateSession<P5>(&self, mimetype: &windows_core::BSTR, initdata: Option<&[u8]>, customdata: Option<&[u8]>, notify: P5) -> windows_core::Result<IMFMediaKeySession>
where
P5: windows_core::Param<IMFMediaKeySessionNotify>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateSession)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(mimetype), core::mem::transmute(initdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), initdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(customdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), customdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), notify.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn KeySystem(&self) -> windows_core::Result<windows_core::BSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).KeySystem)(windows_core::Interface::as_raw(self), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub unsafe fn Shutdown(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Shutdown)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn GetSuspendNotify(&self) -> windows_core::Result<IMFCdmSuspendNotify> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetSuspendNotify)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaKeys_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub CreateSession: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const u8, u32, *const u8, u32, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub KeySystem: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Shutdown: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetSuspendNotify: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFMediaKeys_Impl: windows_core::IUnknownImpl {
fn CreateSession(&self, mimetype: &windows_core::BSTR, initdata: *const u8, cb: u32, customdata: *const u8, cbcustomdata: u32, notify: windows_core::Ref<IMFMediaKeySessionNotify>) -> windows_core::Result<IMFMediaKeySession>;
fn KeySystem(&self) -> windows_core::Result<windows_core::BSTR>;
fn Shutdown(&self) -> windows_core::Result<()>;
fn GetSuspendNotify(&self) -> windows_core::Result<IMFCdmSuspendNotify>;
}
impl IMFMediaKeys_Vtbl {
pub const fn new<Identity: IMFMediaKeys_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateSession<Identity: IMFMediaKeys_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, mimetype: *mut core::ffi::c_void, initdata: *const u8, cb: u32, customdata: *const u8, cbcustomdata: u32, notify: *mut core::ffi::c_void, ppsession: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaKeys_Impl::CreateSession(this, core::mem::transmute(&mimetype), core::mem::transmute_copy(&initdata), core::mem::transmute_copy(&cb), core::mem::transmute_copy(&customdata), core::mem::transmute_copy(&cbcustomdata), core::mem::transmute_copy(¬ify)) {
Ok(ok__) => {
ppsession.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn KeySystem<Identity: IMFMediaKeys_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, keysystem: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaKeys_Impl::KeySystem(this) {
Ok(ok__) => {
keysystem.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Shutdown<Identity: IMFMediaKeys_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaKeys_Impl::Shutdown(this).into()
}
}
unsafe extern "system" fn GetSuspendNotify<Identity: IMFMediaKeys_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, notify: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaKeys_Impl::GetSuspendNotify(this) {
Ok(ok__) => {
notify.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CreateSession: CreateSession::<Identity, OFFSET>,
KeySystem: KeySystem::<Identity, OFFSET>,
Shutdown: Shutdown::<Identity, OFFSET>,
GetSuspendNotify: GetSuspendNotify::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaKeys as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaKeys {}
windows_core::imp::define_interface!(IMFMediaKeys2, IMFMediaKeys2_Vtbl, 0x45892507_ad66_4de2_83a2_acbb13cd8d43);
impl core::ops::Deref for IMFMediaKeys2 {
type Target = IMFMediaKeys;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFMediaKeys2, windows_core::IUnknown, IMFMediaKeys);
impl IMFMediaKeys2 {
pub unsafe fn CreateSession2<P1>(&self, esessiontype: MF_MEDIAKEYSESSION_TYPE, pmfmediakeysessionnotify2: P1) -> windows_core::Result<IMFMediaKeySession2>
where
P1: windows_core::Param<IMFMediaKeySessionNotify2>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateSession2)(windows_core::Interface::as_raw(self), esessiontype, pmfmediakeysessionnotify2.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn SetServerCertificate(&self, pbservercertificate: Option<&[u8]>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetServerCertificate)(windows_core::Interface::as_raw(self), core::mem::transmute(pbservercertificate.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbservercertificate.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() }
}
pub unsafe fn GetDOMException(&self, systemcode: windows_core::HRESULT) -> windows_core::Result<windows_core::HRESULT> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDOMException)(windows_core::Interface::as_raw(self), systemcode, &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaKeys2_Vtbl {
pub base__: IMFMediaKeys_Vtbl,
pub CreateSession2: unsafe extern "system" fn(*mut core::ffi::c_void, MF_MEDIAKEYSESSION_TYPE, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetServerCertificate: unsafe extern "system" fn(*mut core::ffi::c_void, *const u8, u32) -> windows_core::HRESULT,
pub GetDOMException: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::HRESULT, *mut windows_core::HRESULT) -> windows_core::HRESULT,
}
pub trait IMFMediaKeys2_Impl: IMFMediaKeys_Impl {
fn CreateSession2(&self, esessiontype: MF_MEDIAKEYSESSION_TYPE, pmfmediakeysessionnotify2: windows_core::Ref<IMFMediaKeySessionNotify2>) -> windows_core::Result<IMFMediaKeySession2>;
fn SetServerCertificate(&self, pbservercertificate: *const u8, cb: u32) -> windows_core::Result<()>;
fn GetDOMException(&self, systemcode: windows_core::HRESULT) -> windows_core::Result<windows_core::HRESULT>;
}
impl IMFMediaKeys2_Vtbl {
pub const fn new<Identity: IMFMediaKeys2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateSession2<Identity: IMFMediaKeys2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, esessiontype: MF_MEDIAKEYSESSION_TYPE, pmfmediakeysessionnotify2: *mut core::ffi::c_void, ppsession: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaKeys2_Impl::CreateSession2(this, core::mem::transmute_copy(&esessiontype), core::mem::transmute_copy(&pmfmediakeysessionnotify2)) {
Ok(ok__) => {
ppsession.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetServerCertificate<Identity: IMFMediaKeys2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbservercertificate: *const u8, cb: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaKeys2_Impl::SetServerCertificate(this, core::mem::transmute_copy(&pbservercertificate), core::mem::transmute_copy(&cb)).into()
}
}
unsafe extern "system" fn GetDOMException<Identity: IMFMediaKeys2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, systemcode: windows_core::HRESULT, code: *mut windows_core::HRESULT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaKeys2_Impl::GetDOMException(this, core::mem::transmute_copy(&systemcode)) {
Ok(ok__) => {
code.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IMFMediaKeys_Vtbl::new::<Identity, OFFSET>(),
CreateSession2: CreateSession2::<Identity, OFFSET>,
SetServerCertificate: SetServerCertificate::<Identity, OFFSET>,
GetDOMException: GetDOMException::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaKeys2 as windows_core::Interface>::IID || iid == &<IMFMediaKeys as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaKeys2 {}
windows_core::imp::define_interface!(IMFMediaSession, IMFMediaSession_Vtbl, 0x90377834_21d0_4dee_8214_ba2e3e6c1127);
impl core::ops::Deref for IMFMediaSession {
type Target = IMFMediaEventGenerator;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFMediaSession, windows_core::IUnknown, IMFMediaEventGenerator);
impl IMFMediaSession {
pub unsafe fn SetTopology<P1>(&self, dwsettopologyflags: u32, ptopology: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFTopology>,
{
unsafe { (windows_core::Interface::vtable(self).SetTopology)(windows_core::Interface::as_raw(self), dwsettopologyflags, ptopology.param().abi()).ok() }
}
pub unsafe fn ClearTopologies(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).ClearTopologies)(windows_core::Interface::as_raw(self)).ok() }
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn Start(&self, pguidtimeformat: *const windows_core::GUID, pvarstartposition: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Start)(windows_core::Interface::as_raw(self), pguidtimeformat, core::mem::transmute(pvarstartposition)).ok() }
}
pub unsafe fn Pause(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Pause)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn Stop(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn Close(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn Shutdown(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Shutdown)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn GetClock(&self) -> windows_core::Result<IMFClock> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetClock)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetSessionCapabilities(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetSessionCapabilities)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetFullTopology(&self, dwgetfulltopologyflags: u32, topoid: u64) -> windows_core::Result<IMFTopology> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetFullTopology)(windows_core::Interface::as_raw(self), dwgetfulltopologyflags, topoid, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaSession_Vtbl {
pub base__: IMFMediaEventGenerator_Vtbl,
pub SetTopology: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ClearTopologies: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub Start: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
Start: usize,
pub Pause: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Stop: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Close: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Shutdown: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetClock: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetSessionCapabilities: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetFullTopology: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u64, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFMediaSession_Impl: IMFMediaEventGenerator_Impl {
fn SetTopology(&self, dwsettopologyflags: u32, ptopology: windows_core::Ref<IMFTopology>) -> windows_core::Result<()>;
fn ClearTopologies(&self) -> windows_core::Result<()>;
fn Start(&self, pguidtimeformat: *const windows_core::GUID, pvarstartposition: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>;
fn Pause(&self) -> windows_core::Result<()>;
fn Stop(&self) -> windows_core::Result<()>;
fn Close(&self) -> windows_core::Result<()>;
fn Shutdown(&self) -> windows_core::Result<()>;
fn GetClock(&self) -> windows_core::Result<IMFClock>;
fn GetSessionCapabilities(&self) -> windows_core::Result<u32>;
fn GetFullTopology(&self, dwgetfulltopologyflags: u32, topoid: u64) -> windows_core::Result<IMFTopology>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFMediaSession_Vtbl {
pub const fn new<Identity: IMFMediaSession_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetTopology<Identity: IMFMediaSession_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwsettopologyflags: u32, ptopology: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSession_Impl::SetTopology(this, core::mem::transmute_copy(&dwsettopologyflags), core::mem::transmute_copy(&ptopology)).into()
}
}
unsafe extern "system" fn ClearTopologies<Identity: IMFMediaSession_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSession_Impl::ClearTopologies(this).into()
}
}
unsafe extern "system" fn Start<Identity: IMFMediaSession_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pguidtimeformat: *const windows_core::GUID, pvarstartposition: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSession_Impl::Start(this, core::mem::transmute_copy(&pguidtimeformat), core::mem::transmute_copy(&pvarstartposition)).into()
}
}
unsafe extern "system" fn Pause<Identity: IMFMediaSession_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSession_Impl::Pause(this).into()
}
}
unsafe extern "system" fn Stop<Identity: IMFMediaSession_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSession_Impl::Stop(this).into()
}
}
unsafe extern "system" fn Close<Identity: IMFMediaSession_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSession_Impl::Close(this).into()
}
}
unsafe extern "system" fn Shutdown<Identity: IMFMediaSession_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSession_Impl::Shutdown(this).into()
}
}
unsafe extern "system" fn GetClock<Identity: IMFMediaSession_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppclock: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaSession_Impl::GetClock(this) {
Ok(ok__) => {
ppclock.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetSessionCapabilities<Identity: IMFMediaSession_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwcaps: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaSession_Impl::GetSessionCapabilities(this) {
Ok(ok__) => {
pdwcaps.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetFullTopology<Identity: IMFMediaSession_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwgetfulltopologyflags: u32, topoid: u64, ppfulltopology: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaSession_Impl::GetFullTopology(this, core::mem::transmute_copy(&dwgetfulltopologyflags), core::mem::transmute_copy(&topoid)) {
Ok(ok__) => {
ppfulltopology.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IMFMediaEventGenerator_Vtbl::new::<Identity, OFFSET>(),
SetTopology: SetTopology::<Identity, OFFSET>,
ClearTopologies: ClearTopologies::<Identity, OFFSET>,
Start: Start::<Identity, OFFSET>,
Pause: Pause::<Identity, OFFSET>,
Stop: Stop::<Identity, OFFSET>,
Close: Close::<Identity, OFFSET>,
Shutdown: Shutdown::<Identity, OFFSET>,
GetClock: GetClock::<Identity, OFFSET>,
GetSessionCapabilities: GetSessionCapabilities::<Identity, OFFSET>,
GetFullTopology: GetFullTopology::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaSession as windows_core::Interface>::IID || iid == &<IMFMediaEventGenerator as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFMediaSession {}
windows_core::imp::define_interface!(IMFMediaSharingEngine, IMFMediaSharingEngine_Vtbl, 0x8d3ce1bf_2367_40e0_9eee_40d377cc1b46);
impl core::ops::Deref for IMFMediaSharingEngine {
type Target = IMFMediaEngine;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFMediaSharingEngine, windows_core::IUnknown, IMFMediaEngine);
impl IMFMediaSharingEngine {
pub unsafe fn GetDevice(&self, pdevice: *mut DEVICE_INFO) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetDevice)(windows_core::Interface::as_raw(self), core::mem::transmute(pdevice)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaSharingEngine_Vtbl {
pub base__: IMFMediaEngine_Vtbl,
pub GetDevice: unsafe extern "system" fn(*mut core::ffi::c_void, *mut DEVICE_INFO) -> windows_core::HRESULT,
}
pub trait IMFMediaSharingEngine_Impl: IMFMediaEngine_Impl {
fn GetDevice(&self, pdevice: *mut DEVICE_INFO) -> windows_core::Result<()>;
}
impl IMFMediaSharingEngine_Vtbl {
pub const fn new<Identity: IMFMediaSharingEngine_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetDevice<Identity: IMFMediaSharingEngine_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdevice: *mut DEVICE_INFO) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSharingEngine_Impl::GetDevice(this, core::mem::transmute_copy(&pdevice)).into()
}
}
Self { base__: IMFMediaEngine_Vtbl::new::<Identity, OFFSET>(), GetDevice: GetDevice::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaSharingEngine as windows_core::Interface>::IID || iid == &<IMFMediaEngine as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaSharingEngine {}
windows_core::imp::define_interface!(IMFMediaSharingEngineClassFactory, IMFMediaSharingEngineClassFactory_Vtbl, 0x524d2bc4_b2b1_4fe5_8fac_fa4e4512b4e0);
windows_core::imp::interface_hierarchy!(IMFMediaSharingEngineClassFactory, windows_core::IUnknown);
impl IMFMediaSharingEngineClassFactory {
pub unsafe fn CreateInstance<P1>(&self, dwflags: u32, pattr: P1) -> windows_core::Result<IMFMediaSharingEngine>
where
P1: windows_core::Param<IMFAttributes>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateInstance)(windows_core::Interface::as_raw(self), dwflags, pattr.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaSharingEngineClassFactory_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub CreateInstance: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFMediaSharingEngineClassFactory_Impl: windows_core::IUnknownImpl {
fn CreateInstance(&self, dwflags: u32, pattr: windows_core::Ref<IMFAttributes>) -> windows_core::Result<IMFMediaSharingEngine>;
}
impl IMFMediaSharingEngineClassFactory_Vtbl {
pub const fn new<Identity: IMFMediaSharingEngineClassFactory_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateInstance<Identity: IMFMediaSharingEngineClassFactory_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwflags: u32, pattr: *mut core::ffi::c_void, ppengine: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaSharingEngineClassFactory_Impl::CreateInstance(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pattr)) {
Ok(ok__) => {
ppengine.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), CreateInstance: CreateInstance::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaSharingEngineClassFactory as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaSharingEngineClassFactory {}
windows_core::imp::define_interface!(IMFMediaSink, IMFMediaSink_Vtbl, 0x6ef2a660_47c0_4666_b13d_cbb717f2fa2c);
windows_core::imp::interface_hierarchy!(IMFMediaSink, windows_core::IUnknown);
impl IMFMediaSink {
pub unsafe fn GetCharacteristics(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetCharacteristics)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn AddStreamSink<P1>(&self, dwstreamsinkidentifier: u32, pmediatype: P1) -> windows_core::Result<IMFStreamSink>
where
P1: windows_core::Param<IMFMediaType>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).AddStreamSink)(windows_core::Interface::as_raw(self), dwstreamsinkidentifier, pmediatype.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn RemoveStreamSink(&self, dwstreamsinkidentifier: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RemoveStreamSink)(windows_core::Interface::as_raw(self), dwstreamsinkidentifier).ok() }
}
pub unsafe fn GetStreamSinkCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamSinkCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetStreamSinkByIndex(&self, dwindex: u32) -> windows_core::Result<IMFStreamSink> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamSinkByIndex)(windows_core::Interface::as_raw(self), dwindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetStreamSinkById(&self, dwstreamsinkidentifier: u32) -> windows_core::Result<IMFStreamSink> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamSinkById)(windows_core::Interface::as_raw(self), dwstreamsinkidentifier, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn SetPresentationClock<P0>(&self, ppresentationclock: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFPresentationClock>,
{
unsafe { (windows_core::Interface::vtable(self).SetPresentationClock)(windows_core::Interface::as_raw(self), ppresentationclock.param().abi()).ok() }
}
pub unsafe fn GetPresentationClock(&self) -> windows_core::Result<IMFPresentationClock> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetPresentationClock)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn Shutdown(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Shutdown)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaSink_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetCharacteristics: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub AddStreamSink: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RemoveStreamSink: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub GetStreamSinkCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetStreamSinkByIndex: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetStreamSinkById: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetPresentationClock: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetPresentationClock: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Shutdown: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFMediaSink_Impl: windows_core::IUnknownImpl {
fn GetCharacteristics(&self) -> windows_core::Result<u32>;
fn AddStreamSink(&self, dwstreamsinkidentifier: u32, pmediatype: windows_core::Ref<IMFMediaType>) -> windows_core::Result<IMFStreamSink>;
fn RemoveStreamSink(&self, dwstreamsinkidentifier: u32) -> windows_core::Result<()>;
fn GetStreamSinkCount(&self) -> windows_core::Result<u32>;
fn GetStreamSinkByIndex(&self, dwindex: u32) -> windows_core::Result<IMFStreamSink>;
fn GetStreamSinkById(&self, dwstreamsinkidentifier: u32) -> windows_core::Result<IMFStreamSink>;
fn SetPresentationClock(&self, ppresentationclock: windows_core::Ref<IMFPresentationClock>) -> windows_core::Result<()>;
fn GetPresentationClock(&self) -> windows_core::Result<IMFPresentationClock>;
fn Shutdown(&self) -> windows_core::Result<()>;
}
impl IMFMediaSink_Vtbl {
pub const fn new<Identity: IMFMediaSink_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetCharacteristics<Identity: IMFMediaSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwcharacteristics: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaSink_Impl::GetCharacteristics(this) {
Ok(ok__) => {
pdwcharacteristics.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn AddStreamSink<Identity: IMFMediaSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamsinkidentifier: u32, pmediatype: *mut core::ffi::c_void, ppstreamsink: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaSink_Impl::AddStreamSink(this, core::mem::transmute_copy(&dwstreamsinkidentifier), core::mem::transmute_copy(&pmediatype)) {
Ok(ok__) => {
ppstreamsink.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn RemoveStreamSink<Identity: IMFMediaSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamsinkidentifier: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSink_Impl::RemoveStreamSink(this, core::mem::transmute_copy(&dwstreamsinkidentifier)).into()
}
}
unsafe extern "system" fn GetStreamSinkCount<Identity: IMFMediaSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcstreamsinkcount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaSink_Impl::GetStreamSinkCount(this) {
Ok(ok__) => {
pcstreamsinkcount.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetStreamSinkByIndex<Identity: IMFMediaSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwindex: u32, ppstreamsink: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaSink_Impl::GetStreamSinkByIndex(this, core::mem::transmute_copy(&dwindex)) {
Ok(ok__) => {
ppstreamsink.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetStreamSinkById<Identity: IMFMediaSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamsinkidentifier: u32, ppstreamsink: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaSink_Impl::GetStreamSinkById(this, core::mem::transmute_copy(&dwstreamsinkidentifier)) {
Ok(ok__) => {
ppstreamsink.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetPresentationClock<Identity: IMFMediaSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppresentationclock: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSink_Impl::SetPresentationClock(this, core::mem::transmute_copy(&ppresentationclock)).into()
}
}
unsafe extern "system" fn GetPresentationClock<Identity: IMFMediaSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pppresentationclock: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaSink_Impl::GetPresentationClock(this) {
Ok(ok__) => {
pppresentationclock.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Shutdown<Identity: IMFMediaSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSink_Impl::Shutdown(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetCharacteristics: GetCharacteristics::<Identity, OFFSET>,
AddStreamSink: AddStreamSink::<Identity, OFFSET>,
RemoveStreamSink: RemoveStreamSink::<Identity, OFFSET>,
GetStreamSinkCount: GetStreamSinkCount::<Identity, OFFSET>,
GetStreamSinkByIndex: GetStreamSinkByIndex::<Identity, OFFSET>,
GetStreamSinkById: GetStreamSinkById::<Identity, OFFSET>,
SetPresentationClock: SetPresentationClock::<Identity, OFFSET>,
GetPresentationClock: GetPresentationClock::<Identity, OFFSET>,
Shutdown: Shutdown::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaSink as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaSink {}
windows_core::imp::define_interface!(IMFMediaSinkPreroll, IMFMediaSinkPreroll_Vtbl, 0x5dfd4b2a_7674_4110_a4e6_8a68fd5f3688);
windows_core::imp::interface_hierarchy!(IMFMediaSinkPreroll, windows_core::IUnknown);
impl IMFMediaSinkPreroll {
pub unsafe fn NotifyPreroll(&self, hnsupcomingstarttime: i64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).NotifyPreroll)(windows_core::Interface::as_raw(self), hnsupcomingstarttime).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaSinkPreroll_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub NotifyPreroll: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
pub trait IMFMediaSinkPreroll_Impl: windows_core::IUnknownImpl {
fn NotifyPreroll(&self, hnsupcomingstarttime: i64) -> windows_core::Result<()>;
}
impl IMFMediaSinkPreroll_Vtbl {
pub const fn new<Identity: IMFMediaSinkPreroll_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn NotifyPreroll<Identity: IMFMediaSinkPreroll_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hnsupcomingstarttime: i64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSinkPreroll_Impl::NotifyPreroll(this, core::mem::transmute_copy(&hnsupcomingstarttime)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), NotifyPreroll: NotifyPreroll::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaSinkPreroll as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaSinkPreroll {}
windows_core::imp::define_interface!(IMFMediaSource, IMFMediaSource_Vtbl, 0x279a808d_aec7_40c8_9c6b_a6b492c78a66);
impl core::ops::Deref for IMFMediaSource {
type Target = IMFMediaEventGenerator;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFMediaSource, windows_core::IUnknown, IMFMediaEventGenerator);
impl IMFMediaSource {
pub unsafe fn GetCharacteristics(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetCharacteristics)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn CreatePresentationDescriptor(&self) -> windows_core::Result<IMFPresentationDescriptor> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreatePresentationDescriptor)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn Start<P0>(&self, ppresentationdescriptor: P0, pguidtimeformat: *const windows_core::GUID, pvarstartposition: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFPresentationDescriptor>,
{
unsafe { (windows_core::Interface::vtable(self).Start)(windows_core::Interface::as_raw(self), ppresentationdescriptor.param().abi(), pguidtimeformat, core::mem::transmute(pvarstartposition)).ok() }
}
pub unsafe fn Stop(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn Pause(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Pause)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn Shutdown(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Shutdown)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaSource_Vtbl {
pub base__: IMFMediaEventGenerator_Vtbl,
pub GetCharacteristics: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub CreatePresentationDescriptor: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub Start: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const windows_core::GUID, *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
Start: usize,
pub Stop: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Pause: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Shutdown: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFMediaSource_Impl: IMFMediaEventGenerator_Impl {
fn GetCharacteristics(&self) -> windows_core::Result<u32>;
fn CreatePresentationDescriptor(&self) -> windows_core::Result<IMFPresentationDescriptor>;
fn Start(&self, ppresentationdescriptor: windows_core::Ref<IMFPresentationDescriptor>, pguidtimeformat: *const windows_core::GUID, pvarstartposition: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>;
fn Stop(&self) -> windows_core::Result<()>;
fn Pause(&self) -> windows_core::Result<()>;
fn Shutdown(&self) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFMediaSource_Vtbl {
pub const fn new<Identity: IMFMediaSource_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetCharacteristics<Identity: IMFMediaSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwcharacteristics: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaSource_Impl::GetCharacteristics(this) {
Ok(ok__) => {
pdwcharacteristics.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn CreatePresentationDescriptor<Identity: IMFMediaSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pppresentationdescriptor: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaSource_Impl::CreatePresentationDescriptor(this) {
Ok(ok__) => {
pppresentationdescriptor.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Start<Identity: IMFMediaSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppresentationdescriptor: *mut core::ffi::c_void, pguidtimeformat: *const windows_core::GUID, pvarstartposition: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSource_Impl::Start(this, core::mem::transmute_copy(&ppresentationdescriptor), core::mem::transmute_copy(&pguidtimeformat), core::mem::transmute_copy(&pvarstartposition)).into()
}
}
unsafe extern "system" fn Stop<Identity: IMFMediaSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSource_Impl::Stop(this).into()
}
}
unsafe extern "system" fn Pause<Identity: IMFMediaSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSource_Impl::Pause(this).into()
}
}
unsafe extern "system" fn Shutdown<Identity: IMFMediaSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSource_Impl::Shutdown(this).into()
}
}
Self {
base__: IMFMediaEventGenerator_Vtbl::new::<Identity, OFFSET>(),
GetCharacteristics: GetCharacteristics::<Identity, OFFSET>,
CreatePresentationDescriptor: CreatePresentationDescriptor::<Identity, OFFSET>,
Start: Start::<Identity, OFFSET>,
Stop: Stop::<Identity, OFFSET>,
Pause: Pause::<Identity, OFFSET>,
Shutdown: Shutdown::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaSource as windows_core::Interface>::IID || iid == &<IMFMediaEventGenerator as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFMediaSource {}
windows_core::imp::define_interface!(IMFMediaSource2, IMFMediaSource2_Vtbl, 0xfbb03414_d13b_4786_8319_5ac51fc0a136);
impl core::ops::Deref for IMFMediaSource2 {
type Target = IMFMediaSourceEx;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFMediaSource2, windows_core::IUnknown, IMFMediaEventGenerator, IMFMediaSource, IMFMediaSourceEx);
impl IMFMediaSource2 {
pub unsafe fn SetMediaType<P1>(&self, dwstreamid: u32, pmediatype: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFMediaType>,
{
unsafe { (windows_core::Interface::vtable(self).SetMediaType)(windows_core::Interface::as_raw(self), dwstreamid, pmediatype.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaSource2_Vtbl {
pub base__: IMFMediaSourceEx_Vtbl,
pub SetMediaType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFMediaSource2_Impl: IMFMediaSourceEx_Impl {
fn SetMediaType(&self, dwstreamid: u32, pmediatype: windows_core::Ref<IMFMediaType>) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFMediaSource2_Vtbl {
pub const fn new<Identity: IMFMediaSource2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetMediaType<Identity: IMFMediaSource2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamid: u32, pmediatype: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSource2_Impl::SetMediaType(this, core::mem::transmute_copy(&dwstreamid), core::mem::transmute_copy(&pmediatype)).into()
}
}
Self { base__: IMFMediaSourceEx_Vtbl::new::<Identity, OFFSET>(), SetMediaType: SetMediaType::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaSource2 as windows_core::Interface>::IID || iid == &<IMFMediaEventGenerator as windows_core::Interface>::IID || iid == &<IMFMediaSource as windows_core::Interface>::IID || iid == &<IMFMediaSourceEx as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFMediaSource2 {}
windows_core::imp::define_interface!(IMFMediaSourceEx, IMFMediaSourceEx_Vtbl, 0x3c9b2eb9_86d5_4514_a394_f56664f9f0d8);
impl core::ops::Deref for IMFMediaSourceEx {
type Target = IMFMediaSource;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFMediaSourceEx, windows_core::IUnknown, IMFMediaEventGenerator, IMFMediaSource);
impl IMFMediaSourceEx {
pub unsafe fn GetSourceAttributes(&self) -> windows_core::Result<IMFAttributes> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetSourceAttributes)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetStreamAttributes(&self, dwstreamidentifier: u32) -> windows_core::Result<IMFAttributes> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamAttributes)(windows_core::Interface::as_raw(self), dwstreamidentifier, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn SetD3DManager<P0>(&self, pmanager: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).SetD3DManager)(windows_core::Interface::as_raw(self), pmanager.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaSourceEx_Vtbl {
pub base__: IMFMediaSource_Vtbl,
pub GetSourceAttributes: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetStreamAttributes: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetD3DManager: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFMediaSourceEx_Impl: IMFMediaSource_Impl {
fn GetSourceAttributes(&self) -> windows_core::Result<IMFAttributes>;
fn GetStreamAttributes(&self, dwstreamidentifier: u32) -> windows_core::Result<IMFAttributes>;
fn SetD3DManager(&self, pmanager: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFMediaSourceEx_Vtbl {
pub const fn new<Identity: IMFMediaSourceEx_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetSourceAttributes<Identity: IMFMediaSourceEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppattributes: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaSourceEx_Impl::GetSourceAttributes(this) {
Ok(ok__) => {
ppattributes.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetStreamAttributes<Identity: IMFMediaSourceEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamidentifier: u32, ppattributes: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaSourceEx_Impl::GetStreamAttributes(this, core::mem::transmute_copy(&dwstreamidentifier)) {
Ok(ok__) => {
ppattributes.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetD3DManager<Identity: IMFMediaSourceEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pmanager: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSourceEx_Impl::SetD3DManager(this, core::mem::transmute_copy(&pmanager)).into()
}
}
Self {
base__: IMFMediaSource_Vtbl::new::<Identity, OFFSET>(),
GetSourceAttributes: GetSourceAttributes::<Identity, OFFSET>,
GetStreamAttributes: GetStreamAttributes::<Identity, OFFSET>,
SetD3DManager: SetD3DManager::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaSourceEx as windows_core::Interface>::IID || iid == &<IMFMediaEventGenerator as windows_core::Interface>::IID || iid == &<IMFMediaSource as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFMediaSourceEx {}
windows_core::imp::define_interface!(IMFMediaSourceExtension, IMFMediaSourceExtension_Vtbl, 0xe467b94e_a713_4562_a802_816a42e9008a);
windows_core::imp::interface_hierarchy!(IMFMediaSourceExtension, windows_core::IUnknown);
impl IMFMediaSourceExtension {
pub unsafe fn GetSourceBuffers(&self) -> Option<IMFSourceBufferList> {
unsafe { (windows_core::Interface::vtable(self).GetSourceBuffers)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetActiveSourceBuffers(&self) -> Option<IMFSourceBufferList> {
unsafe { (windows_core::Interface::vtable(self).GetActiveSourceBuffers)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetReadyState(&self) -> MF_MSE_READY {
unsafe { (windows_core::Interface::vtable(self).GetReadyState)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetDuration(&self) -> f64 {
unsafe { (windows_core::Interface::vtable(self).GetDuration)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn SetDuration(&self, duration: f64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetDuration)(windows_core::Interface::as_raw(self), duration).ok() }
}
pub unsafe fn AddSourceBuffer<P1>(&self, r#type: &windows_core::BSTR, pnotify: P1) -> windows_core::Result<IMFSourceBuffer>
where
P1: windows_core::Param<IMFSourceBufferNotify>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).AddSourceBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(r#type), pnotify.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn RemoveSourceBuffer<P0>(&self, psourcebuffer: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFSourceBuffer>,
{
unsafe { (windows_core::Interface::vtable(self).RemoveSourceBuffer)(windows_core::Interface::as_raw(self), psourcebuffer.param().abi()).ok() }
}
pub unsafe fn SetEndOfStream(&self, error: MF_MSE_ERROR) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetEndOfStream)(windows_core::Interface::as_raw(self), error).ok() }
}
pub unsafe fn IsTypeSupported(&self, r#type: &windows_core::BSTR) -> windows_core::BOOL {
unsafe { (windows_core::Interface::vtable(self).IsTypeSupported)(windows_core::Interface::as_raw(self), core::mem::transmute_copy(r#type)) }
}
pub unsafe fn GetSourceBuffer(&self, dwstreamindex: u32) -> Option<IMFSourceBuffer> {
unsafe { (windows_core::Interface::vtable(self).GetSourceBuffer)(windows_core::Interface::as_raw(self), dwstreamindex) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaSourceExtension_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetSourceBuffers: unsafe extern "system" fn(*mut core::ffi::c_void) -> Option<IMFSourceBufferList>,
pub GetActiveSourceBuffers: unsafe extern "system" fn(*mut core::ffi::c_void) -> Option<IMFSourceBufferList>,
pub GetReadyState: unsafe extern "system" fn(*mut core::ffi::c_void) -> MF_MSE_READY,
pub GetDuration: unsafe extern "system" fn(*mut core::ffi::c_void) -> f64,
pub SetDuration: unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
pub AddSourceBuffer: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RemoveSourceBuffer: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetEndOfStream: unsafe extern "system" fn(*mut core::ffi::c_void, MF_MSE_ERROR) -> windows_core::HRESULT,
pub IsTypeSupported: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::BOOL,
pub GetSourceBuffer: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> Option<IMFSourceBuffer>,
}
pub trait IMFMediaSourceExtension_Impl: windows_core::IUnknownImpl {
fn GetSourceBuffers(&self) -> Option<IMFSourceBufferList>;
fn GetActiveSourceBuffers(&self) -> Option<IMFSourceBufferList>;
fn GetReadyState(&self) -> MF_MSE_READY;
fn GetDuration(&self) -> f64;
fn SetDuration(&self, duration: f64) -> windows_core::Result<()>;
fn AddSourceBuffer(&self, r#type: &windows_core::BSTR, pnotify: windows_core::Ref<IMFSourceBufferNotify>) -> windows_core::Result<IMFSourceBuffer>;
fn RemoveSourceBuffer(&self, psourcebuffer: windows_core::Ref<IMFSourceBuffer>) -> windows_core::Result<()>;
fn SetEndOfStream(&self, error: MF_MSE_ERROR) -> windows_core::Result<()>;
fn IsTypeSupported(&self, r#type: &windows_core::BSTR) -> windows_core::BOOL;
fn GetSourceBuffer(&self, dwstreamindex: u32) -> Option<IMFSourceBuffer>;
}
impl IMFMediaSourceExtension_Vtbl {
pub const fn new<Identity: IMFMediaSourceExtension_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetSourceBuffers<Identity: IMFMediaSourceExtension_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> Option<IMFSourceBufferList> {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSourceExtension_Impl::GetSourceBuffers(this)
}
}
unsafe extern "system" fn GetActiveSourceBuffers<Identity: IMFMediaSourceExtension_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> Option<IMFSourceBufferList> {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSourceExtension_Impl::GetActiveSourceBuffers(this)
}
}
unsafe extern "system" fn GetReadyState<Identity: IMFMediaSourceExtension_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> MF_MSE_READY {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSourceExtension_Impl::GetReadyState(this)
}
}
unsafe extern "system" fn GetDuration<Identity: IMFMediaSourceExtension_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> f64 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSourceExtension_Impl::GetDuration(this)
}
}
unsafe extern "system" fn SetDuration<Identity: IMFMediaSourceExtension_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, duration: f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSourceExtension_Impl::SetDuration(this, core::mem::transmute_copy(&duration)).into()
}
}
unsafe extern "system" fn AddSourceBuffer<Identity: IMFMediaSourceExtension_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, r#type: *mut core::ffi::c_void, pnotify: *mut core::ffi::c_void, ppsourcebuffer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaSourceExtension_Impl::AddSourceBuffer(this, core::mem::transmute(&r#type), core::mem::transmute_copy(&pnotify)) {
Ok(ok__) => {
ppsourcebuffer.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn RemoveSourceBuffer<Identity: IMFMediaSourceExtension_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, psourcebuffer: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSourceExtension_Impl::RemoveSourceBuffer(this, core::mem::transmute_copy(&psourcebuffer)).into()
}
}
unsafe extern "system" fn SetEndOfStream<Identity: IMFMediaSourceExtension_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, error: MF_MSE_ERROR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSourceExtension_Impl::SetEndOfStream(this, core::mem::transmute_copy(&error)).into()
}
}
unsafe extern "system" fn IsTypeSupported<Identity: IMFMediaSourceExtension_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, r#type: *mut core::ffi::c_void) -> windows_core::BOOL {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSourceExtension_Impl::IsTypeSupported(this, core::mem::transmute(&r#type))
}
}
unsafe extern "system" fn GetSourceBuffer<Identity: IMFMediaSourceExtension_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32) -> Option<IMFSourceBuffer> {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSourceExtension_Impl::GetSourceBuffer(this, core::mem::transmute_copy(&dwstreamindex))
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetSourceBuffers: GetSourceBuffers::<Identity, OFFSET>,
GetActiveSourceBuffers: GetActiveSourceBuffers::<Identity, OFFSET>,
GetReadyState: GetReadyState::<Identity, OFFSET>,
GetDuration: GetDuration::<Identity, OFFSET>,
SetDuration: SetDuration::<Identity, OFFSET>,
AddSourceBuffer: AddSourceBuffer::<Identity, OFFSET>,
RemoveSourceBuffer: RemoveSourceBuffer::<Identity, OFFSET>,
SetEndOfStream: SetEndOfStream::<Identity, OFFSET>,
IsTypeSupported: IsTypeSupported::<Identity, OFFSET>,
GetSourceBuffer: GetSourceBuffer::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaSourceExtension as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaSourceExtension {}
windows_core::imp::define_interface!(IMFMediaSourceExtensionLiveSeekableRange, IMFMediaSourceExtensionLiveSeekableRange_Vtbl, 0x5d1abfd6_450a_4d92_9efc_d6b6cbc1f4da);
windows_core::imp::interface_hierarchy!(IMFMediaSourceExtensionLiveSeekableRange, windows_core::IUnknown);
impl IMFMediaSourceExtensionLiveSeekableRange {
pub unsafe fn SetLiveSeekableRange(&self, start: f64, end: f64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetLiveSeekableRange)(windows_core::Interface::as_raw(self), start, end).ok() }
}
pub unsafe fn ClearLiveSeekableRange(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).ClearLiveSeekableRange)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaSourceExtensionLiveSeekableRange_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetLiveSeekableRange: unsafe extern "system" fn(*mut core::ffi::c_void, f64, f64) -> windows_core::HRESULT,
pub ClearLiveSeekableRange: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFMediaSourceExtensionLiveSeekableRange_Impl: windows_core::IUnknownImpl {
fn SetLiveSeekableRange(&self, start: f64, end: f64) -> windows_core::Result<()>;
fn ClearLiveSeekableRange(&self) -> windows_core::Result<()>;
}
impl IMFMediaSourceExtensionLiveSeekableRange_Vtbl {
pub const fn new<Identity: IMFMediaSourceExtensionLiveSeekableRange_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetLiveSeekableRange<Identity: IMFMediaSourceExtensionLiveSeekableRange_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, start: f64, end: f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSourceExtensionLiveSeekableRange_Impl::SetLiveSeekableRange(this, core::mem::transmute_copy(&start), core::mem::transmute_copy(&end)).into()
}
}
unsafe extern "system" fn ClearLiveSeekableRange<Identity: IMFMediaSourceExtensionLiveSeekableRange_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSourceExtensionLiveSeekableRange_Impl::ClearLiveSeekableRange(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetLiveSeekableRange: SetLiveSeekableRange::<Identity, OFFSET>,
ClearLiveSeekableRange: ClearLiveSeekableRange::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaSourceExtensionLiveSeekableRange as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaSourceExtensionLiveSeekableRange {}
windows_core::imp::define_interface!(IMFMediaSourceExtensionNotify, IMFMediaSourceExtensionNotify_Vtbl, 0xa7901327_05dd_4469_a7b7_0e01979e361d);
windows_core::imp::interface_hierarchy!(IMFMediaSourceExtensionNotify, windows_core::IUnknown);
impl IMFMediaSourceExtensionNotify {
pub unsafe fn OnSourceOpen(&self) {
unsafe { (windows_core::Interface::vtable(self).OnSourceOpen)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn OnSourceEnded(&self) {
unsafe { (windows_core::Interface::vtable(self).OnSourceEnded)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn OnSourceClose(&self) {
unsafe { (windows_core::Interface::vtable(self).OnSourceClose)(windows_core::Interface::as_raw(self)) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaSourceExtensionNotify_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub OnSourceOpen: unsafe extern "system" fn(*mut core::ffi::c_void),
pub OnSourceEnded: unsafe extern "system" fn(*mut core::ffi::c_void),
pub OnSourceClose: unsafe extern "system" fn(*mut core::ffi::c_void),
}
pub trait IMFMediaSourceExtensionNotify_Impl: windows_core::IUnknownImpl {
fn OnSourceOpen(&self);
fn OnSourceEnded(&self);
fn OnSourceClose(&self);
}
impl IMFMediaSourceExtensionNotify_Vtbl {
pub const fn new<Identity: IMFMediaSourceExtensionNotify_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn OnSourceOpen<Identity: IMFMediaSourceExtensionNotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSourceExtensionNotify_Impl::OnSourceOpen(this)
}
}
unsafe extern "system" fn OnSourceEnded<Identity: IMFMediaSourceExtensionNotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSourceExtensionNotify_Impl::OnSourceEnded(this)
}
}
unsafe extern "system" fn OnSourceClose<Identity: IMFMediaSourceExtensionNotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSourceExtensionNotify_Impl::OnSourceClose(this)
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
OnSourceOpen: OnSourceOpen::<Identity, OFFSET>,
OnSourceEnded: OnSourceEnded::<Identity, OFFSET>,
OnSourceClose: OnSourceClose::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaSourceExtensionNotify as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaSourceExtensionNotify {}
windows_core::imp::define_interface!(IMFMediaSourcePresentationProvider, IMFMediaSourcePresentationProvider_Vtbl, 0x0e1d600a_c9f3_442d_8c51_a42d2d49452f);
windows_core::imp::interface_hierarchy!(IMFMediaSourcePresentationProvider, windows_core::IUnknown);
impl IMFMediaSourcePresentationProvider {
pub unsafe fn ForceEndOfPresentation<P0>(&self, ppresentationdescriptor: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFPresentationDescriptor>,
{
unsafe { (windows_core::Interface::vtable(self).ForceEndOfPresentation)(windows_core::Interface::as_raw(self), ppresentationdescriptor.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaSourcePresentationProvider_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub ForceEndOfPresentation: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFMediaSourcePresentationProvider_Impl: windows_core::IUnknownImpl {
fn ForceEndOfPresentation(&self, ppresentationdescriptor: windows_core::Ref<IMFPresentationDescriptor>) -> windows_core::Result<()>;
}
impl IMFMediaSourcePresentationProvider_Vtbl {
pub const fn new<Identity: IMFMediaSourcePresentationProvider_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn ForceEndOfPresentation<Identity: IMFMediaSourcePresentationProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppresentationdescriptor: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaSourcePresentationProvider_Impl::ForceEndOfPresentation(this, core::mem::transmute_copy(&ppresentationdescriptor)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), ForceEndOfPresentation: ForceEndOfPresentation::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaSourcePresentationProvider as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaSourcePresentationProvider {}
windows_core::imp::define_interface!(IMFMediaSourceTopologyProvider, IMFMediaSourceTopologyProvider_Vtbl, 0x0e1d6009_c9f3_442d_8c51_a42d2d49452f);
windows_core::imp::interface_hierarchy!(IMFMediaSourceTopologyProvider, windows_core::IUnknown);
impl IMFMediaSourceTopologyProvider {
pub unsafe fn GetMediaSourceTopology<P0>(&self, ppresentationdescriptor: P0) -> windows_core::Result<IMFTopology>
where
P0: windows_core::Param<IMFPresentationDescriptor>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMediaSourceTopology)(windows_core::Interface::as_raw(self), ppresentationdescriptor.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaSourceTopologyProvider_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetMediaSourceTopology: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFMediaSourceTopologyProvider_Impl: windows_core::IUnknownImpl {
fn GetMediaSourceTopology(&self, ppresentationdescriptor: windows_core::Ref<IMFPresentationDescriptor>) -> windows_core::Result<IMFTopology>;
}
impl IMFMediaSourceTopologyProvider_Vtbl {
pub const fn new<Identity: IMFMediaSourceTopologyProvider_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetMediaSourceTopology<Identity: IMFMediaSourceTopologyProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppresentationdescriptor: *mut core::ffi::c_void, pptopology: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaSourceTopologyProvider_Impl::GetMediaSourceTopology(this, core::mem::transmute_copy(&ppresentationdescriptor)) {
Ok(ok__) => {
pptopology.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetMediaSourceTopology: GetMediaSourceTopology::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaSourceTopologyProvider as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaSourceTopologyProvider {}
windows_core::imp::define_interface!(IMFMediaStream, IMFMediaStream_Vtbl, 0xd182108f_4ec6_443f_aa42_a71106ec825f);
impl core::ops::Deref for IMFMediaStream {
type Target = IMFMediaEventGenerator;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFMediaStream, windows_core::IUnknown, IMFMediaEventGenerator);
impl IMFMediaStream {
pub unsafe fn GetMediaSource(&self) -> windows_core::Result<IMFMediaSource> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMediaSource)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetStreamDescriptor(&self) -> windows_core::Result<IMFStreamDescriptor> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamDescriptor)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn RequestSample<P0>(&self, ptoken: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).RequestSample)(windows_core::Interface::as_raw(self), ptoken.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaStream_Vtbl {
pub base__: IMFMediaEventGenerator_Vtbl,
pub GetMediaSource: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetStreamDescriptor: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RequestSample: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFMediaStream_Impl: IMFMediaEventGenerator_Impl {
fn GetMediaSource(&self) -> windows_core::Result<IMFMediaSource>;
fn GetStreamDescriptor(&self) -> windows_core::Result<IMFStreamDescriptor>;
fn RequestSample(&self, ptoken: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFMediaStream_Vtbl {
pub const fn new<Identity: IMFMediaStream_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetMediaSource<Identity: IMFMediaStream_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppmediasource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaStream_Impl::GetMediaSource(this) {
Ok(ok__) => {
ppmediasource.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetStreamDescriptor<Identity: IMFMediaStream_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppstreamdescriptor: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaStream_Impl::GetStreamDescriptor(this) {
Ok(ok__) => {
ppstreamdescriptor.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn RequestSample<Identity: IMFMediaStream_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ptoken: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaStream_Impl::RequestSample(this, core::mem::transmute_copy(&ptoken)).into()
}
}
Self {
base__: IMFMediaEventGenerator_Vtbl::new::<Identity, OFFSET>(),
GetMediaSource: GetMediaSource::<Identity, OFFSET>,
GetStreamDescriptor: GetStreamDescriptor::<Identity, OFFSET>,
RequestSample: RequestSample::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaStream as windows_core::Interface>::IID || iid == &<IMFMediaEventGenerator as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFMediaStream {}
windows_core::imp::define_interface!(IMFMediaStream2, IMFMediaStream2_Vtbl, 0xc5bc37d6_75c7_46a1_a132_81b5f723c20f);
impl core::ops::Deref for IMFMediaStream2 {
type Target = IMFMediaStream;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFMediaStream2, windows_core::IUnknown, IMFMediaEventGenerator, IMFMediaStream);
impl IMFMediaStream2 {
pub unsafe fn SetStreamState(&self, value: MF_STREAM_STATE) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetStreamState)(windows_core::Interface::as_raw(self), value).ok() }
}
pub unsafe fn GetStreamState(&self) -> windows_core::Result<MF_STREAM_STATE> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamState)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaStream2_Vtbl {
pub base__: IMFMediaStream_Vtbl,
pub SetStreamState: unsafe extern "system" fn(*mut core::ffi::c_void, MF_STREAM_STATE) -> windows_core::HRESULT,
pub GetStreamState: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MF_STREAM_STATE) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFMediaStream2_Impl: IMFMediaStream_Impl {
fn SetStreamState(&self, value: MF_STREAM_STATE) -> windows_core::Result<()>;
fn GetStreamState(&self) -> windows_core::Result<MF_STREAM_STATE>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFMediaStream2_Vtbl {
pub const fn new<Identity: IMFMediaStream2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetStreamState<Identity: IMFMediaStream2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, value: MF_STREAM_STATE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaStream2_Impl::SetStreamState(this, core::mem::transmute_copy(&value)).into()
}
}
unsafe extern "system" fn GetStreamState<Identity: IMFMediaStream2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, value: *mut MF_STREAM_STATE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaStream2_Impl::GetStreamState(this) {
Ok(ok__) => {
value.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IMFMediaStream_Vtbl::new::<Identity, OFFSET>(),
SetStreamState: SetStreamState::<Identity, OFFSET>,
GetStreamState: GetStreamState::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaStream2 as windows_core::Interface>::IID || iid == &<IMFMediaEventGenerator as windows_core::Interface>::IID || iid == &<IMFMediaStream as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFMediaStream2 {}
windows_core::imp::define_interface!(IMFMediaStreamSourceSampleRequest, IMFMediaStreamSourceSampleRequest_Vtbl, 0x380b9af9_a85b_4e78_a2af_ea5ce645c6b4);
windows_core::imp::interface_hierarchy!(IMFMediaStreamSourceSampleRequest, windows_core::IUnknown);
impl IMFMediaStreamSourceSampleRequest {
pub unsafe fn SetSample<P0>(&self, value: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFSample>,
{
unsafe { (windows_core::Interface::vtable(self).SetSample)(windows_core::Interface::as_raw(self), value.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaStreamSourceSampleRequest_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetSample: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFMediaStreamSourceSampleRequest_Impl: windows_core::IUnknownImpl {
fn SetSample(&self, value: windows_core::Ref<IMFSample>) -> windows_core::Result<()>;
}
impl IMFMediaStreamSourceSampleRequest_Vtbl {
pub const fn new<Identity: IMFMediaStreamSourceSampleRequest_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetSample<Identity: IMFMediaStreamSourceSampleRequest_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaStreamSourceSampleRequest_Impl::SetSample(this, core::mem::transmute_copy(&value)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), SetSample: SetSample::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaStreamSourceSampleRequest as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaStreamSourceSampleRequest {}
windows_core::imp::define_interface!(IMFMediaTimeRange, IMFMediaTimeRange_Vtbl, 0xdb71a2fc_078a_414e_9df9_8c2531b0aa6c);
windows_core::imp::interface_hierarchy!(IMFMediaTimeRange, windows_core::IUnknown);
impl IMFMediaTimeRange {
pub unsafe fn GetLength(&self) -> u32 {
unsafe { (windows_core::Interface::vtable(self).GetLength)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetStart(&self, index: u32) -> windows_core::Result<f64> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStart)(windows_core::Interface::as_raw(self), index, &mut result__).map(|| result__)
}
}
pub unsafe fn GetEnd(&self, index: u32) -> windows_core::Result<f64> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetEnd)(windows_core::Interface::as_raw(self), index, &mut result__).map(|| result__)
}
}
pub unsafe fn ContainsTime(&self, time: f64) -> windows_core::BOOL {
unsafe { (windows_core::Interface::vtable(self).ContainsTime)(windows_core::Interface::as_raw(self), time) }
}
pub unsafe fn AddRange(&self, starttime: f64, endtime: f64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).AddRange)(windows_core::Interface::as_raw(self), starttime, endtime).ok() }
}
pub unsafe fn Clear(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Clear)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaTimeRange_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetLength: unsafe extern "system" fn(*mut core::ffi::c_void) -> u32,
pub GetStart: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut f64) -> windows_core::HRESULT,
pub GetEnd: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut f64) -> windows_core::HRESULT,
pub ContainsTime: unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::BOOL,
pub AddRange: unsafe extern "system" fn(*mut core::ffi::c_void, f64, f64) -> windows_core::HRESULT,
pub Clear: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFMediaTimeRange_Impl: windows_core::IUnknownImpl {
fn GetLength(&self) -> u32;
fn GetStart(&self, index: u32) -> windows_core::Result<f64>;
fn GetEnd(&self, index: u32) -> windows_core::Result<f64>;
fn ContainsTime(&self, time: f64) -> windows_core::BOOL;
fn AddRange(&self, starttime: f64, endtime: f64) -> windows_core::Result<()>;
fn Clear(&self) -> windows_core::Result<()>;
}
impl IMFMediaTimeRange_Vtbl {
pub const fn new<Identity: IMFMediaTimeRange_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetLength<Identity: IMFMediaTimeRange_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> u32 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaTimeRange_Impl::GetLength(this)
}
}
unsafe extern "system" fn GetStart<Identity: IMFMediaTimeRange_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, index: u32, pstart: *mut f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaTimeRange_Impl::GetStart(this, core::mem::transmute_copy(&index)) {
Ok(ok__) => {
pstart.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetEnd<Identity: IMFMediaTimeRange_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, index: u32, pend: *mut f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaTimeRange_Impl::GetEnd(this, core::mem::transmute_copy(&index)) {
Ok(ok__) => {
pend.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn ContainsTime<Identity: IMFMediaTimeRange_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, time: f64) -> windows_core::BOOL {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaTimeRange_Impl::ContainsTime(this, core::mem::transmute_copy(&time))
}
}
unsafe extern "system" fn AddRange<Identity: IMFMediaTimeRange_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, starttime: f64, endtime: f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaTimeRange_Impl::AddRange(this, core::mem::transmute_copy(&starttime), core::mem::transmute_copy(&endtime)).into()
}
}
unsafe extern "system" fn Clear<Identity: IMFMediaTimeRange_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaTimeRange_Impl::Clear(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetLength: GetLength::<Identity, OFFSET>,
GetStart: GetStart::<Identity, OFFSET>,
GetEnd: GetEnd::<Identity, OFFSET>,
ContainsTime: ContainsTime::<Identity, OFFSET>,
AddRange: AddRange::<Identity, OFFSET>,
Clear: Clear::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaTimeRange as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaTimeRange {}
windows_core::imp::define_interface!(IMFMediaType, IMFMediaType_Vtbl, 0x44ae0fa8_ea31_4109_8d2e_4cae4997c555);
impl core::ops::Deref for IMFMediaType {
type Target = IMFAttributes;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFMediaType, windows_core::IUnknown, IMFAttributes);
impl IMFMediaType {
pub unsafe fn GetMajorType(&self) -> windows_core::Result<windows_core::GUID> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMajorType)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn IsCompressedFormat(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).IsCompressedFormat)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn IsEqual<P0>(&self, pimediatype: P0) -> windows_core::Result<u32>
where
P0: windows_core::Param<IMFMediaType>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).IsEqual)(windows_core::Interface::as_raw(self), pimediatype.param().abi(), &mut result__).map(|| result__)
}
}
pub unsafe fn GetRepresentation(&self, guidrepresentation: windows_core::GUID, ppvrepresentation: *mut *mut core::ffi::c_void) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetRepresentation)(windows_core::Interface::as_raw(self), core::mem::transmute(guidrepresentation), ppvrepresentation as _).ok() }
}
pub unsafe fn FreeRepresentation(&self, guidrepresentation: windows_core::GUID, pvrepresentation: *const core::ffi::c_void) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).FreeRepresentation)(windows_core::Interface::as_raw(self), core::mem::transmute(guidrepresentation), pvrepresentation).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaType_Vtbl {
pub base__: IMFAttributes_Vtbl,
pub GetMajorType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT,
pub IsCompressedFormat: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub IsEqual: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetRepresentation: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub FreeRepresentation: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::GUID, *const core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFMediaType_Impl: IMFAttributes_Impl {
fn GetMajorType(&self) -> windows_core::Result<windows_core::GUID>;
fn IsCompressedFormat(&self) -> windows_core::Result<windows_core::BOOL>;
fn IsEqual(&self, pimediatype: windows_core::Ref<IMFMediaType>) -> windows_core::Result<u32>;
fn GetRepresentation(&self, guidrepresentation: &windows_core::GUID, ppvrepresentation: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
fn FreeRepresentation(&self, guidrepresentation: &windows_core::GUID, pvrepresentation: *const core::ffi::c_void) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFMediaType_Vtbl {
pub const fn new<Identity: IMFMediaType_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetMajorType<Identity: IMFMediaType_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pguidmajortype: *mut windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaType_Impl::GetMajorType(this) {
Ok(ok__) => {
pguidmajortype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn IsCompressedFormat<Identity: IMFMediaType_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pfcompressed: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaType_Impl::IsCompressedFormat(this) {
Ok(ok__) => {
pfcompressed.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn IsEqual<Identity: IMFMediaType_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pimediatype: *mut core::ffi::c_void, pdwflags: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaType_Impl::IsEqual(this, core::mem::transmute_copy(&pimediatype)) {
Ok(ok__) => {
pdwflags.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetRepresentation<Identity: IMFMediaType_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidrepresentation: windows_core::GUID, ppvrepresentation: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaType_Impl::GetRepresentation(this, core::mem::transmute(&guidrepresentation), core::mem::transmute_copy(&ppvrepresentation)).into()
}
}
unsafe extern "system" fn FreeRepresentation<Identity: IMFMediaType_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidrepresentation: windows_core::GUID, pvrepresentation: *const core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaType_Impl::FreeRepresentation(this, core::mem::transmute(&guidrepresentation), core::mem::transmute_copy(&pvrepresentation)).into()
}
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, OFFSET>(),
GetMajorType: GetMajorType::<Identity, OFFSET>,
IsCompressedFormat: IsCompressedFormat::<Identity, OFFSET>,
IsEqual: IsEqual::<Identity, OFFSET>,
GetRepresentation: GetRepresentation::<Identity, OFFSET>,
FreeRepresentation: FreeRepresentation::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaType as windows_core::Interface>::IID || iid == &<IMFAttributes as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFMediaType {}
windows_core::imp::define_interface!(IMFMediaTypeHandler, IMFMediaTypeHandler_Vtbl, 0xe93dcf6c_4b07_4e1e_8123_aa16ed6eadf5);
windows_core::imp::interface_hierarchy!(IMFMediaTypeHandler, windows_core::IUnknown);
impl IMFMediaTypeHandler {
pub unsafe fn IsMediaTypeSupported<P0>(&self, pmediatype: P0, ppmediatype: Option<*mut Option<IMFMediaType>>) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaType>,
{
unsafe { (windows_core::Interface::vtable(self).IsMediaTypeSupported)(windows_core::Interface::as_raw(self), pmediatype.param().abi(), ppmediatype.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn GetMediaTypeCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMediaTypeCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetMediaTypeByIndex(&self, dwindex: u32) -> windows_core::Result<IMFMediaType> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMediaTypeByIndex)(windows_core::Interface::as_raw(self), dwindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn SetCurrentMediaType<P0>(&self, pmediatype: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaType>,
{
unsafe { (windows_core::Interface::vtable(self).SetCurrentMediaType)(windows_core::Interface::as_raw(self), pmediatype.param().abi()).ok() }
}
pub unsafe fn GetCurrentMediaType(&self) -> windows_core::Result<IMFMediaType> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetCurrentMediaType)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetMajorType(&self) -> windows_core::Result<windows_core::GUID> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMajorType)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMediaTypeHandler_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub IsMediaTypeSupported: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetMediaTypeCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetMediaTypeByIndex: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetCurrentMediaType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetCurrentMediaType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetMajorType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT,
}
pub trait IMFMediaTypeHandler_Impl: windows_core::IUnknownImpl {
fn IsMediaTypeSupported(&self, pmediatype: windows_core::Ref<IMFMediaType>, ppmediatype: windows_core::OutRef<IMFMediaType>) -> windows_core::Result<()>;
fn GetMediaTypeCount(&self) -> windows_core::Result<u32>;
fn GetMediaTypeByIndex(&self, dwindex: u32) -> windows_core::Result<IMFMediaType>;
fn SetCurrentMediaType(&self, pmediatype: windows_core::Ref<IMFMediaType>) -> windows_core::Result<()>;
fn GetCurrentMediaType(&self) -> windows_core::Result<IMFMediaType>;
fn GetMajorType(&self) -> windows_core::Result<windows_core::GUID>;
}
impl IMFMediaTypeHandler_Vtbl {
pub const fn new<Identity: IMFMediaTypeHandler_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn IsMediaTypeSupported<Identity: IMFMediaTypeHandler_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pmediatype: *mut core::ffi::c_void, ppmediatype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaTypeHandler_Impl::IsMediaTypeSupported(this, core::mem::transmute_copy(&pmediatype), core::mem::transmute_copy(&ppmediatype)).into()
}
}
unsafe extern "system" fn GetMediaTypeCount<Identity: IMFMediaTypeHandler_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwtypecount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaTypeHandler_Impl::GetMediaTypeCount(this) {
Ok(ok__) => {
pdwtypecount.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetMediaTypeByIndex<Identity: IMFMediaTypeHandler_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwindex: u32, pptype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaTypeHandler_Impl::GetMediaTypeByIndex(this, core::mem::transmute_copy(&dwindex)) {
Ok(ok__) => {
pptype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetCurrentMediaType<Identity: IMFMediaTypeHandler_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pmediatype: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMediaTypeHandler_Impl::SetCurrentMediaType(this, core::mem::transmute_copy(&pmediatype)).into()
}
}
unsafe extern "system" fn GetCurrentMediaType<Identity: IMFMediaTypeHandler_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppmediatype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaTypeHandler_Impl::GetCurrentMediaType(this) {
Ok(ok__) => {
ppmediatype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetMajorType<Identity: IMFMediaTypeHandler_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pguidmajortype: *mut windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMediaTypeHandler_Impl::GetMajorType(this) {
Ok(ok__) => {
pguidmajortype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
IsMediaTypeSupported: IsMediaTypeSupported::<Identity, OFFSET>,
GetMediaTypeCount: GetMediaTypeCount::<Identity, OFFSET>,
GetMediaTypeByIndex: GetMediaTypeByIndex::<Identity, OFFSET>,
SetCurrentMediaType: SetCurrentMediaType::<Identity, OFFSET>,
GetCurrentMediaType: GetCurrentMediaType::<Identity, OFFSET>,
GetMajorType: GetMajorType::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMediaTypeHandler as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMediaTypeHandler {}
windows_core::imp::define_interface!(IMFMetadata, IMFMetadata_Vtbl, 0xf88cfb8c_ef16_4991_b450_cb8c69e51704);
windows_core::imp::interface_hierarchy!(IMFMetadata, windows_core::IUnknown);
impl IMFMetadata {
pub unsafe fn SetLanguage<P0>(&self, pwszrfc1766: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).SetLanguage)(windows_core::Interface::as_raw(self), pwszrfc1766.param().abi()).ok() }
}
pub unsafe fn GetLanguage(&self) -> windows_core::Result<windows_core::PWSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetLanguage)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn GetAllLanguages(&self) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetAllLanguages)(windows_core::Interface::as_raw(self), &mut result__).map(|| core::mem::transmute(result__))
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn SetProperty<P0>(&self, pwszname: P0, ppvvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), pwszname.param().abi(), core::mem::transmute(ppvvalue)).ok() }
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn GetProperty<P0>(&self, pwszname: P0) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), pwszname.param().abi(), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub unsafe fn DeleteProperty<P0>(&self, pwszname: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).DeleteProperty)(windows_core::Interface::as_raw(self), pwszname.param().abi()).ok() }
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn GetAllPropertyNames(&self) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetAllPropertyNames)(windows_core::Interface::as_raw(self), &mut result__).map(|| core::mem::transmute(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMetadata_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetLanguage: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR) -> windows_core::HRESULT,
pub GetLanguage: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub GetAllLanguages: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
GetAllLanguages: usize,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub SetProperty: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
SetProperty: usize,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub GetProperty: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
GetProperty: usize,
pub DeleteProperty: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR) -> windows_core::HRESULT,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub GetAllPropertyNames: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
GetAllPropertyNames: usize,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFMetadata_Impl: windows_core::IUnknownImpl {
fn SetLanguage(&self, pwszrfc1766: &windows_core::PCWSTR) -> windows_core::Result<()>;
fn GetLanguage(&self) -> windows_core::Result<windows_core::PWSTR>;
fn GetAllLanguages(&self) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT>;
fn SetProperty(&self, pwszname: &windows_core::PCWSTR, ppvvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>;
fn GetProperty(&self, pwszname: &windows_core::PCWSTR) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT>;
fn DeleteProperty(&self, pwszname: &windows_core::PCWSTR) -> windows_core::Result<()>;
fn GetAllPropertyNames(&self) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFMetadata_Vtbl {
pub const fn new<Identity: IMFMetadata_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetLanguage<Identity: IMFMetadata_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pwszrfc1766: windows_core::PCWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMetadata_Impl::SetLanguage(this, core::mem::transmute(&pwszrfc1766)).into()
}
}
unsafe extern "system" fn GetLanguage<Identity: IMFMetadata_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppwszrfc1766: *mut windows_core::PWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMetadata_Impl::GetLanguage(this) {
Ok(ok__) => {
ppwszrfc1766.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetAllLanguages<Identity: IMFMetadata_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppvlanguages: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMetadata_Impl::GetAllLanguages(this) {
Ok(ok__) => {
ppvlanguages.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetProperty<Identity: IMFMetadata_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pwszname: windows_core::PCWSTR, ppvvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMetadata_Impl::SetProperty(this, core::mem::transmute(&pwszname), core::mem::transmute_copy(&ppvvalue)).into()
}
}
unsafe extern "system" fn GetProperty<Identity: IMFMetadata_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pwszname: windows_core::PCWSTR, ppvvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMetadata_Impl::GetProperty(this, core::mem::transmute(&pwszname)) {
Ok(ok__) => {
ppvvalue.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn DeleteProperty<Identity: IMFMetadata_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pwszname: windows_core::PCWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMetadata_Impl::DeleteProperty(this, core::mem::transmute(&pwszname)).into()
}
}
unsafe extern "system" fn GetAllPropertyNames<Identity: IMFMetadata_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppvnames: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMetadata_Impl::GetAllPropertyNames(this) {
Ok(ok__) => {
ppvnames.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetLanguage: SetLanguage::<Identity, OFFSET>,
GetLanguage: GetLanguage::<Identity, OFFSET>,
GetAllLanguages: GetAllLanguages::<Identity, OFFSET>,
SetProperty: SetProperty::<Identity, OFFSET>,
GetProperty: GetProperty::<Identity, OFFSET>,
DeleteProperty: DeleteProperty::<Identity, OFFSET>,
GetAllPropertyNames: GetAllPropertyNames::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMetadata as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFMetadata {}
windows_core::imp::define_interface!(IMFMetadataProvider, IMFMetadataProvider_Vtbl, 0x56181d2d_e221_4adb_b1c8_3cee6a53f76f);
windows_core::imp::interface_hierarchy!(IMFMetadataProvider, windows_core::IUnknown);
impl IMFMetadataProvider {
pub unsafe fn GetMFMetadata<P0>(&self, ppresentationdescriptor: P0, dwstreamidentifier: u32, dwflags: u32) -> windows_core::Result<IMFMetadata>
where
P0: windows_core::Param<IMFPresentationDescriptor>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMFMetadata)(windows_core::Interface::as_raw(self), ppresentationdescriptor.param().abi(), dwstreamidentifier, dwflags, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMetadataProvider_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetMFMetadata: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFMetadataProvider_Impl: windows_core::IUnknownImpl {
fn GetMFMetadata(&self, ppresentationdescriptor: windows_core::Ref<IMFPresentationDescriptor>, dwstreamidentifier: u32, dwflags: u32) -> windows_core::Result<IMFMetadata>;
}
impl IMFMetadataProvider_Vtbl {
pub const fn new<Identity: IMFMetadataProvider_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetMFMetadata<Identity: IMFMetadataProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppresentationdescriptor: *mut core::ffi::c_void, dwstreamidentifier: u32, dwflags: u32, ppmfmetadata: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMetadataProvider_Impl::GetMFMetadata(this, core::mem::transmute_copy(&ppresentationdescriptor), core::mem::transmute_copy(&dwstreamidentifier), core::mem::transmute_copy(&dwflags)) {
Ok(ok__) => {
ppmfmetadata.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetMFMetadata: GetMFMetadata::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMetadataProvider as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMetadataProvider {}
windows_core::imp::define_interface!(IMFMuxStreamAttributesManager, IMFMuxStreamAttributesManager_Vtbl, 0xce8bd576_e440_43b3_be34_1e53f565f7e8);
windows_core::imp::interface_hierarchy!(IMFMuxStreamAttributesManager, windows_core::IUnknown);
impl IMFMuxStreamAttributesManager {
pub unsafe fn GetStreamCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetAttributes(&self, dwmuxstreamindex: u32) -> windows_core::Result<IMFAttributes> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetAttributes)(windows_core::Interface::as_raw(self), dwmuxstreamindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMuxStreamAttributesManager_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetStreamCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetAttributes: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFMuxStreamAttributesManager_Impl: windows_core::IUnknownImpl {
fn GetStreamCount(&self) -> windows_core::Result<u32>;
fn GetAttributes(&self, dwmuxstreamindex: u32) -> windows_core::Result<IMFAttributes>;
}
impl IMFMuxStreamAttributesManager_Vtbl {
pub const fn new<Identity: IMFMuxStreamAttributesManager_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetStreamCount<Identity: IMFMuxStreamAttributesManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwmuxstreamcount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMuxStreamAttributesManager_Impl::GetStreamCount(this) {
Ok(ok__) => {
pdwmuxstreamcount.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetAttributes<Identity: IMFMuxStreamAttributesManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwmuxstreamindex: u32, ppstreamattributes: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMuxStreamAttributesManager_Impl::GetAttributes(this, core::mem::transmute_copy(&dwmuxstreamindex)) {
Ok(ok__) => {
ppstreamattributes.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetStreamCount: GetStreamCount::<Identity, OFFSET>,
GetAttributes: GetAttributes::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMuxStreamAttributesManager as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMuxStreamAttributesManager {}
windows_core::imp::define_interface!(IMFMuxStreamMediaTypeManager, IMFMuxStreamMediaTypeManager_Vtbl, 0x505a2c72_42f7_4690_aeab_8f513d0ffdb8);
windows_core::imp::interface_hierarchy!(IMFMuxStreamMediaTypeManager, windows_core::IUnknown);
impl IMFMuxStreamMediaTypeManager {
pub unsafe fn GetStreamCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetMediaType(&self, dwmuxstreamindex: u32) -> windows_core::Result<IMFMediaType> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMediaType)(windows_core::Interface::as_raw(self), dwmuxstreamindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetStreamConfigurationCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamConfigurationCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn AddStreamConfiguration(&self, ullstreammask: u64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).AddStreamConfiguration)(windows_core::Interface::as_raw(self), ullstreammask).ok() }
}
pub unsafe fn RemoveStreamConfiguration(&self, ullstreammask: u64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RemoveStreamConfiguration)(windows_core::Interface::as_raw(self), ullstreammask).ok() }
}
pub unsafe fn GetStreamConfiguration(&self, ulindex: u32) -> windows_core::Result<u64> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamConfiguration)(windows_core::Interface::as_raw(self), ulindex, &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMuxStreamMediaTypeManager_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetStreamCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetMediaType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetStreamConfigurationCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub AddStreamConfiguration: unsafe extern "system" fn(*mut core::ffi::c_void, u64) -> windows_core::HRESULT,
pub RemoveStreamConfiguration: unsafe extern "system" fn(*mut core::ffi::c_void, u64) -> windows_core::HRESULT,
pub GetStreamConfiguration: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u64) -> windows_core::HRESULT,
}
pub trait IMFMuxStreamMediaTypeManager_Impl: windows_core::IUnknownImpl {
fn GetStreamCount(&self) -> windows_core::Result<u32>;
fn GetMediaType(&self, dwmuxstreamindex: u32) -> windows_core::Result<IMFMediaType>;
fn GetStreamConfigurationCount(&self) -> windows_core::Result<u32>;
fn AddStreamConfiguration(&self, ullstreammask: u64) -> windows_core::Result<()>;
fn RemoveStreamConfiguration(&self, ullstreammask: u64) -> windows_core::Result<()>;
fn GetStreamConfiguration(&self, ulindex: u32) -> windows_core::Result<u64>;
}
impl IMFMuxStreamMediaTypeManager_Vtbl {
pub const fn new<Identity: IMFMuxStreamMediaTypeManager_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetStreamCount<Identity: IMFMuxStreamMediaTypeManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwmuxstreamcount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMuxStreamMediaTypeManager_Impl::GetStreamCount(this) {
Ok(ok__) => {
pdwmuxstreamcount.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetMediaType<Identity: IMFMuxStreamMediaTypeManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwmuxstreamindex: u32, ppmediatype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMuxStreamMediaTypeManager_Impl::GetMediaType(this, core::mem::transmute_copy(&dwmuxstreamindex)) {
Ok(ok__) => {
ppmediatype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetStreamConfigurationCount<Identity: IMFMuxStreamMediaTypeManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwcount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMuxStreamMediaTypeManager_Impl::GetStreamConfigurationCount(this) {
Ok(ok__) => {
pdwcount.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn AddStreamConfiguration<Identity: IMFMuxStreamMediaTypeManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ullstreammask: u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMuxStreamMediaTypeManager_Impl::AddStreamConfiguration(this, core::mem::transmute_copy(&ullstreammask)).into()
}
}
unsafe extern "system" fn RemoveStreamConfiguration<Identity: IMFMuxStreamMediaTypeManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ullstreammask: u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMuxStreamMediaTypeManager_Impl::RemoveStreamConfiguration(this, core::mem::transmute_copy(&ullstreammask)).into()
}
}
unsafe extern "system" fn GetStreamConfiguration<Identity: IMFMuxStreamMediaTypeManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ulindex: u32, pullstreammask: *mut u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMuxStreamMediaTypeManager_Impl::GetStreamConfiguration(this, core::mem::transmute_copy(&ulindex)) {
Ok(ok__) => {
pullstreammask.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetStreamCount: GetStreamCount::<Identity, OFFSET>,
GetMediaType: GetMediaType::<Identity, OFFSET>,
GetStreamConfigurationCount: GetStreamConfigurationCount::<Identity, OFFSET>,
AddStreamConfiguration: AddStreamConfiguration::<Identity, OFFSET>,
RemoveStreamConfiguration: RemoveStreamConfiguration::<Identity, OFFSET>,
GetStreamConfiguration: GetStreamConfiguration::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMuxStreamMediaTypeManager as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMuxStreamMediaTypeManager {}
windows_core::imp::define_interface!(IMFMuxStreamSampleManager, IMFMuxStreamSampleManager_Vtbl, 0x74abbc19_b1cc_4e41_bb8b_9d9b86a8f6ca);
windows_core::imp::interface_hierarchy!(IMFMuxStreamSampleManager, windows_core::IUnknown);
impl IMFMuxStreamSampleManager {
pub unsafe fn GetStreamCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetSample(&self, dwmuxstreamindex: u32) -> windows_core::Result<IMFSample> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetSample)(windows_core::Interface::as_raw(self), dwmuxstreamindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetStreamConfiguration(&self) -> u64 {
unsafe { (windows_core::Interface::vtable(self).GetStreamConfiguration)(windows_core::Interface::as_raw(self)) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFMuxStreamSampleManager_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetStreamCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetSample: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetStreamConfiguration: unsafe extern "system" fn(*mut core::ffi::c_void) -> u64,
}
pub trait IMFMuxStreamSampleManager_Impl: windows_core::IUnknownImpl {
fn GetStreamCount(&self) -> windows_core::Result<u32>;
fn GetSample(&self, dwmuxstreamindex: u32) -> windows_core::Result<IMFSample>;
fn GetStreamConfiguration(&self) -> u64;
}
impl IMFMuxStreamSampleManager_Vtbl {
pub const fn new<Identity: IMFMuxStreamSampleManager_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetStreamCount<Identity: IMFMuxStreamSampleManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwmuxstreamcount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMuxStreamSampleManager_Impl::GetStreamCount(this) {
Ok(ok__) => {
pdwmuxstreamcount.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetSample<Identity: IMFMuxStreamSampleManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwmuxstreamindex: u32, ppsample: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFMuxStreamSampleManager_Impl::GetSample(this, core::mem::transmute_copy(&dwmuxstreamindex)) {
Ok(ok__) => {
ppsample.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetStreamConfiguration<Identity: IMFMuxStreamSampleManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> u64 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFMuxStreamSampleManager_Impl::GetStreamConfiguration(this)
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetStreamCount: GetStreamCount::<Identity, OFFSET>,
GetSample: GetSample::<Identity, OFFSET>,
GetStreamConfiguration: GetStreamConfiguration::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFMuxStreamSampleManager as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFMuxStreamSampleManager {}
windows_core::imp::define_interface!(IMFNetCredential, IMFNetCredential_Vtbl, 0x5b87ef6a_7ed8_434f_ba0e_184fac1628d1);
windows_core::imp::interface_hierarchy!(IMFNetCredential, windows_core::IUnknown);
impl IMFNetCredential {
pub unsafe fn SetUser(&self, pbdata: &[u8], fdataisencrypted: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetUser)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), fdataisencrypted.into()).ok() }
}
pub unsafe fn SetPassword(&self, pbdata: &[u8], fdataisencrypted: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetPassword)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), fdataisencrypted.into()).ok() }
}
pub unsafe fn GetUser(&self, pbdata: Option<*mut u8>, pcbdata: *mut u32, fencryptdata: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetUser)(windows_core::Interface::as_raw(self), pbdata.unwrap_or(core::mem::zeroed()) as _, pcbdata as _, fencryptdata.into()).ok() }
}
pub unsafe fn GetPassword(&self, pbdata: Option<*mut u8>, pcbdata: *mut u32, fencryptdata: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetPassword)(windows_core::Interface::as_raw(self), pbdata.unwrap_or(core::mem::zeroed()) as _, pcbdata as _, fencryptdata.into()).ok() }
}
pub unsafe fn LoggedOnUser(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).LoggedOnUser)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFNetCredential_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetUser: unsafe extern "system" fn(*mut core::ffi::c_void, *const u8, u32, windows_core::BOOL) -> windows_core::HRESULT,
pub SetPassword: unsafe extern "system" fn(*mut core::ffi::c_void, *const u8, u32, windows_core::BOOL) -> windows_core::HRESULT,
pub GetUser: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u8, *mut u32, windows_core::BOOL) -> windows_core::HRESULT,
pub GetPassword: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u8, *mut u32, windows_core::BOOL) -> windows_core::HRESULT,
pub LoggedOnUser: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
}
pub trait IMFNetCredential_Impl: windows_core::IUnknownImpl {
fn SetUser(&self, pbdata: *const u8, cbdata: u32, fdataisencrypted: windows_core::BOOL) -> windows_core::Result<()>;
fn SetPassword(&self, pbdata: *const u8, cbdata: u32, fdataisencrypted: windows_core::BOOL) -> windows_core::Result<()>;
fn GetUser(&self, pbdata: *mut u8, pcbdata: *mut u32, fencryptdata: windows_core::BOOL) -> windows_core::Result<()>;
fn GetPassword(&self, pbdata: *mut u8, pcbdata: *mut u32, fencryptdata: windows_core::BOOL) -> windows_core::Result<()>;
fn LoggedOnUser(&self) -> windows_core::Result<windows_core::BOOL>;
}
impl IMFNetCredential_Vtbl {
pub const fn new<Identity: IMFNetCredential_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetUser<Identity: IMFNetCredential_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbdata: *const u8, cbdata: u32, fdataisencrypted: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFNetCredential_Impl::SetUser(this, core::mem::transmute_copy(&pbdata), core::mem::transmute_copy(&cbdata), core::mem::transmute_copy(&fdataisencrypted)).into()
}
}
unsafe extern "system" fn SetPassword<Identity: IMFNetCredential_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbdata: *const u8, cbdata: u32, fdataisencrypted: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFNetCredential_Impl::SetPassword(this, core::mem::transmute_copy(&pbdata), core::mem::transmute_copy(&cbdata), core::mem::transmute_copy(&fdataisencrypted)).into()
}
}
unsafe extern "system" fn GetUser<Identity: IMFNetCredential_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbdata: *mut u8, pcbdata: *mut u32, fencryptdata: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFNetCredential_Impl::GetUser(this, core::mem::transmute_copy(&pbdata), core::mem::transmute_copy(&pcbdata), core::mem::transmute_copy(&fencryptdata)).into()
}
}
unsafe extern "system" fn GetPassword<Identity: IMFNetCredential_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbdata: *mut u8, pcbdata: *mut u32, fencryptdata: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFNetCredential_Impl::GetPassword(this, core::mem::transmute_copy(&pbdata), core::mem::transmute_copy(&pcbdata), core::mem::transmute_copy(&fencryptdata)).into()
}
}
unsafe extern "system" fn LoggedOnUser<Identity: IMFNetCredential_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pfloggedonuser: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFNetCredential_Impl::LoggedOnUser(this) {
Ok(ok__) => {
pfloggedonuser.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetUser: SetUser::<Identity, OFFSET>,
SetPassword: SetPassword::<Identity, OFFSET>,
GetUser: GetUser::<Identity, OFFSET>,
GetPassword: GetPassword::<Identity, OFFSET>,
LoggedOnUser: LoggedOnUser::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFNetCredential as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFNetCredential {}
windows_core::imp::define_interface!(IMFNetCredentialCache, IMFNetCredentialCache_Vtbl, 0x5b87ef6c_7ed8_434f_ba0e_184fac1628d1);
windows_core::imp::interface_hierarchy!(IMFNetCredentialCache, windows_core::IUnknown);
impl IMFNetCredentialCache {
pub unsafe fn GetCredential<P0, P1>(&self, pszurl: P0, pszrealm: P1, dwauthenticationflags: u32, ppcred: *mut Option<IMFNetCredential>, pdwrequirementsflags: *mut u32) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).GetCredential)(windows_core::Interface::as_raw(self), pszurl.param().abi(), pszrealm.param().abi(), dwauthenticationflags, core::mem::transmute(ppcred), pdwrequirementsflags as _).ok() }
}
pub unsafe fn SetGood<P0>(&self, pcred: P0, fgood: bool) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFNetCredential>,
{
unsafe { (windows_core::Interface::vtable(self).SetGood)(windows_core::Interface::as_raw(self), pcred.param().abi(), fgood.into()).ok() }
}
pub unsafe fn SetUserOptions<P0>(&self, pcred: P0, dwoptionsflags: u32) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFNetCredential>,
{
unsafe { (windows_core::Interface::vtable(self).SetUserOptions)(windows_core::Interface::as_raw(self), pcred.param().abi(), dwoptionsflags).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFNetCredentialCache_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetCredential: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, windows_core::PCWSTR, u32, *mut *mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub SetGood: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT,
pub SetUserOptions: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32) -> windows_core::HRESULT,
}
pub trait IMFNetCredentialCache_Impl: windows_core::IUnknownImpl {
fn GetCredential(&self, pszurl: &windows_core::PCWSTR, pszrealm: &windows_core::PCWSTR, dwauthenticationflags: u32, ppcred: windows_core::OutRef<IMFNetCredential>, pdwrequirementsflags: *mut u32) -> windows_core::Result<()>;
fn SetGood(&self, pcred: windows_core::Ref<IMFNetCredential>, fgood: windows_core::BOOL) -> windows_core::Result<()>;
fn SetUserOptions(&self, pcred: windows_core::Ref<IMFNetCredential>, dwoptionsflags: u32) -> windows_core::Result<()>;
}
impl IMFNetCredentialCache_Vtbl {
pub const fn new<Identity: IMFNetCredentialCache_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetCredential<Identity: IMFNetCredentialCache_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pszurl: windows_core::PCWSTR, pszrealm: windows_core::PCWSTR, dwauthenticationflags: u32, ppcred: *mut *mut core::ffi::c_void, pdwrequirementsflags: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFNetCredentialCache_Impl::GetCredential(this, core::mem::transmute(&pszurl), core::mem::transmute(&pszrealm), core::mem::transmute_copy(&dwauthenticationflags), core::mem::transmute_copy(&ppcred), core::mem::transmute_copy(&pdwrequirementsflags)).into()
}
}
unsafe extern "system" fn SetGood<Identity: IMFNetCredentialCache_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcred: *mut core::ffi::c_void, fgood: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFNetCredentialCache_Impl::SetGood(this, core::mem::transmute_copy(&pcred), core::mem::transmute_copy(&fgood)).into()
}
}
unsafe extern "system" fn SetUserOptions<Identity: IMFNetCredentialCache_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcred: *mut core::ffi::c_void, dwoptionsflags: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFNetCredentialCache_Impl::SetUserOptions(this, core::mem::transmute_copy(&pcred), core::mem::transmute_copy(&dwoptionsflags)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetCredential: GetCredential::<Identity, OFFSET>,
SetGood: SetGood::<Identity, OFFSET>,
SetUserOptions: SetUserOptions::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFNetCredentialCache as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFNetCredentialCache {}
windows_core::imp::define_interface!(IMFNetCredentialManager, IMFNetCredentialManager_Vtbl, 0x5b87ef6b_7ed8_434f_ba0e_184fac1628d1);
windows_core::imp::interface_hierarchy!(IMFNetCredentialManager, windows_core::IUnknown);
impl IMFNetCredentialManager {
pub unsafe fn BeginGetCredentials<P1, P2>(&self, pparam: *const MFNetCredentialManagerGetParam, pcallback: P1, pstate: P2) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFAsyncCallback>,
P2: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).BeginGetCredentials)(windows_core::Interface::as_raw(self), pparam, pcallback.param().abi(), pstate.param().abi()).ok() }
}
pub unsafe fn EndGetCredentials<P0>(&self, presult: P0) -> windows_core::Result<IMFNetCredential>
where
P0: windows_core::Param<IMFAsyncResult>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EndGetCredentials)(windows_core::Interface::as_raw(self), presult.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn SetGood<P0>(&self, pcred: P0, fgood: bool) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFNetCredential>,
{
unsafe { (windows_core::Interface::vtable(self).SetGood)(windows_core::Interface::as_raw(self), pcred.param().abi(), fgood.into()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFNetCredentialManager_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub BeginGetCredentials: unsafe extern "system" fn(*mut core::ffi::c_void, *const MFNetCredentialManagerGetParam, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub EndGetCredentials: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetGood: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT,
}
pub trait IMFNetCredentialManager_Impl: windows_core::IUnknownImpl {
fn BeginGetCredentials(&self, pparam: *const MFNetCredentialManagerGetParam, pcallback: windows_core::Ref<IMFAsyncCallback>, pstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn EndGetCredentials(&self, presult: windows_core::Ref<IMFAsyncResult>) -> windows_core::Result<IMFNetCredential>;
fn SetGood(&self, pcred: windows_core::Ref<IMFNetCredential>, fgood: windows_core::BOOL) -> windows_core::Result<()>;
}
impl IMFNetCredentialManager_Vtbl {
pub const fn new<Identity: IMFNetCredentialManager_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginGetCredentials<Identity: IMFNetCredentialManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pparam: *const MFNetCredentialManagerGetParam, pcallback: *mut core::ffi::c_void, pstate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFNetCredentialManager_Impl::BeginGetCredentials(this, core::mem::transmute_copy(&pparam), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pstate)).into()
}
}
unsafe extern "system" fn EndGetCredentials<Identity: IMFNetCredentialManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, ppcred: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFNetCredentialManager_Impl::EndGetCredentials(this, core::mem::transmute_copy(&presult)) {
Ok(ok__) => {
ppcred.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetGood<Identity: IMFNetCredentialManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcred: *mut core::ffi::c_void, fgood: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFNetCredentialManager_Impl::SetGood(this, core::mem::transmute_copy(&pcred), core::mem::transmute_copy(&fgood)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginGetCredentials: BeginGetCredentials::<Identity, OFFSET>,
EndGetCredentials: EndGetCredentials::<Identity, OFFSET>,
SetGood: SetGood::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFNetCredentialManager as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFNetCredentialManager {}
windows_core::imp::define_interface!(IMFNetCrossOriginSupport, IMFNetCrossOriginSupport_Vtbl, 0xbc2b7d44_a72d_49d5_8376_1480dee58b22);
windows_core::imp::interface_hierarchy!(IMFNetCrossOriginSupport, windows_core::IUnknown);
impl IMFNetCrossOriginSupport {
pub unsafe fn GetCrossOriginPolicy(&self) -> windows_core::Result<MF_CROSS_ORIGIN_POLICY> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetCrossOriginPolicy)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetSourceOrigin(&self) -> windows_core::Result<windows_core::PWSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetSourceOrigin)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn IsSameOrigin<P0>(&self, wszurl: P0) -> windows_core::Result<windows_core::BOOL>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).IsSameOrigin)(windows_core::Interface::as_raw(self), wszurl.param().abi(), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFNetCrossOriginSupport_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetCrossOriginPolicy: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MF_CROSS_ORIGIN_POLICY) -> windows_core::HRESULT,
pub GetSourceOrigin: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT,
pub IsSameOrigin: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *mut windows_core::BOOL) -> windows_core::HRESULT,
}
pub trait IMFNetCrossOriginSupport_Impl: windows_core::IUnknownImpl {
fn GetCrossOriginPolicy(&self) -> windows_core::Result<MF_CROSS_ORIGIN_POLICY>;
fn GetSourceOrigin(&self) -> windows_core::Result<windows_core::PWSTR>;
fn IsSameOrigin(&self, wszurl: &windows_core::PCWSTR) -> windows_core::Result<windows_core::BOOL>;
}
impl IMFNetCrossOriginSupport_Vtbl {
pub const fn new<Identity: IMFNetCrossOriginSupport_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetCrossOriginPolicy<Identity: IMFNetCrossOriginSupport_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppolicy: *mut MF_CROSS_ORIGIN_POLICY) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFNetCrossOriginSupport_Impl::GetCrossOriginPolicy(this) {
Ok(ok__) => {
ppolicy.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetSourceOrigin<Identity: IMFNetCrossOriginSupport_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, wszsourceorigin: *mut windows_core::PWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFNetCrossOriginSupport_Impl::GetSourceOrigin(this) {
Ok(ok__) => {
wszsourceorigin.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn IsSameOrigin<Identity: IMFNetCrossOriginSupport_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, wszurl: windows_core::PCWSTR, pfissameorigin: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFNetCrossOriginSupport_Impl::IsSameOrigin(this, core::mem::transmute(&wszurl)) {
Ok(ok__) => {
pfissameorigin.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetCrossOriginPolicy: GetCrossOriginPolicy::<Identity, OFFSET>,
GetSourceOrigin: GetSourceOrigin::<Identity, OFFSET>,
IsSameOrigin: IsSameOrigin::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFNetCrossOriginSupport as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFNetCrossOriginSupport {}
windows_core::imp::define_interface!(IMFNetProxyLocator, IMFNetProxyLocator_Vtbl, 0xe9cd0383_a268_4bb4_82de_658d53574d41);
windows_core::imp::interface_hierarchy!(IMFNetProxyLocator, windows_core::IUnknown);
impl IMFNetProxyLocator {
pub unsafe fn FindFirstProxy<P0, P1>(&self, pszhost: P0, pszurl: P1, freserved: bool) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).FindFirstProxy)(windows_core::Interface::as_raw(self), pszhost.param().abi(), pszurl.param().abi(), freserved.into()).ok() }
}
pub unsafe fn FindNextProxy(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).FindNextProxy)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn RegisterProxyResult(&self, hrop: windows_core::HRESULT) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RegisterProxyResult)(windows_core::Interface::as_raw(self), hrop).ok() }
}
pub unsafe fn GetCurrentProxy(&self, pszstr: Option<windows_core::PWSTR>, pcchstr: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetCurrentProxy)(windows_core::Interface::as_raw(self), pszstr.unwrap_or(core::mem::zeroed()) as _, pcchstr as _).ok() }
}
pub unsafe fn Clone(&self) -> windows_core::Result<IMFNetProxyLocator> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFNetProxyLocator_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub FindFirstProxy: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, windows_core::PCWSTR, windows_core::BOOL) -> windows_core::HRESULT,
pub FindNextProxy: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub RegisterProxyResult: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::HRESULT) -> windows_core::HRESULT,
pub GetCurrentProxy: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PWSTR, *mut u32) -> windows_core::HRESULT,
pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFNetProxyLocator_Impl: windows_core::IUnknownImpl {
fn FindFirstProxy(&self, pszhost: &windows_core::PCWSTR, pszurl: &windows_core::PCWSTR, freserved: windows_core::BOOL) -> windows_core::Result<()>;
fn FindNextProxy(&self) -> windows_core::Result<()>;
fn RegisterProxyResult(&self, hrop: windows_core::HRESULT) -> windows_core::Result<()>;
fn GetCurrentProxy(&self, pszstr: windows_core::PWSTR, pcchstr: *mut u32) -> windows_core::Result<()>;
fn Clone(&self) -> windows_core::Result<IMFNetProxyLocator>;
}
impl IMFNetProxyLocator_Vtbl {
pub const fn new<Identity: IMFNetProxyLocator_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn FindFirstProxy<Identity: IMFNetProxyLocator_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pszhost: windows_core::PCWSTR, pszurl: windows_core::PCWSTR, freserved: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFNetProxyLocator_Impl::FindFirstProxy(this, core::mem::transmute(&pszhost), core::mem::transmute(&pszurl), core::mem::transmute_copy(&freserved)).into()
}
}
unsafe extern "system" fn FindNextProxy<Identity: IMFNetProxyLocator_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFNetProxyLocator_Impl::FindNextProxy(this).into()
}
}
unsafe extern "system" fn RegisterProxyResult<Identity: IMFNetProxyLocator_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hrop: windows_core::HRESULT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFNetProxyLocator_Impl::RegisterProxyResult(this, core::mem::transmute_copy(&hrop)).into()
}
}
unsafe extern "system" fn GetCurrentProxy<Identity: IMFNetProxyLocator_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pszstr: windows_core::PWSTR, pcchstr: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFNetProxyLocator_Impl::GetCurrentProxy(this, core::mem::transmute_copy(&pszstr), core::mem::transmute_copy(&pcchstr)).into()
}
}
unsafe extern "system" fn Clone<Identity: IMFNetProxyLocator_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppproxylocator: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFNetProxyLocator_Impl::Clone(this) {
Ok(ok__) => {
ppproxylocator.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
FindFirstProxy: FindFirstProxy::<Identity, OFFSET>,
FindNextProxy: FindNextProxy::<Identity, OFFSET>,
RegisterProxyResult: RegisterProxyResult::<Identity, OFFSET>,
GetCurrentProxy: GetCurrentProxy::<Identity, OFFSET>,
Clone: Clone::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFNetProxyLocator as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFNetProxyLocator {}
windows_core::imp::define_interface!(IMFNetProxyLocatorFactory, IMFNetProxyLocatorFactory_Vtbl, 0xe9cd0384_a268_4bb4_82de_658d53574d41);
windows_core::imp::interface_hierarchy!(IMFNetProxyLocatorFactory, windows_core::IUnknown);
impl IMFNetProxyLocatorFactory {
pub unsafe fn CreateProxyLocator<P0>(&self, pszprotocol: P0) -> windows_core::Result<IMFNetProxyLocator>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateProxyLocator)(windows_core::Interface::as_raw(self), pszprotocol.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFNetProxyLocatorFactory_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub CreateProxyLocator: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFNetProxyLocatorFactory_Impl: windows_core::IUnknownImpl {
fn CreateProxyLocator(&self, pszprotocol: &windows_core::PCWSTR) -> windows_core::Result<IMFNetProxyLocator>;
}
impl IMFNetProxyLocatorFactory_Vtbl {
pub const fn new<Identity: IMFNetProxyLocatorFactory_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateProxyLocator<Identity: IMFNetProxyLocatorFactory_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pszprotocol: windows_core::PCWSTR, ppproxylocator: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFNetProxyLocatorFactory_Impl::CreateProxyLocator(this, core::mem::transmute(&pszprotocol)) {
Ok(ok__) => {
ppproxylocator.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), CreateProxyLocator: CreateProxyLocator::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFNetProxyLocatorFactory as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFNetProxyLocatorFactory {}
windows_core::imp::define_interface!(IMFNetResourceFilter, IMFNetResourceFilter_Vtbl, 0x091878a3_bf11_4a5c_bc9f_33995b06ef2d);
windows_core::imp::interface_hierarchy!(IMFNetResourceFilter, windows_core::IUnknown);
impl IMFNetResourceFilter {
pub unsafe fn OnRedirect<P0>(&self, pszurl: P0) -> windows_core::Result<super::super::Foundation::VARIANT_BOOL>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).OnRedirect)(windows_core::Interface::as_raw(self), pszurl.param().abi(), &mut result__).map(|| result__)
}
}
pub unsafe fn OnSendingRequest<P0>(&self, pszurl: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).OnSendingRequest)(windows_core::Interface::as_raw(self), pszurl.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFNetResourceFilter_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub OnRedirect: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT,
pub OnSendingRequest: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR) -> windows_core::HRESULT,
}
pub trait IMFNetResourceFilter_Impl: windows_core::IUnknownImpl {
fn OnRedirect(&self, pszurl: &windows_core::PCWSTR) -> windows_core::Result<super::super::Foundation::VARIANT_BOOL>;
fn OnSendingRequest(&self, pszurl: &windows_core::PCWSTR) -> windows_core::Result<()>;
}
impl IMFNetResourceFilter_Vtbl {
pub const fn new<Identity: IMFNetResourceFilter_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn OnRedirect<Identity: IMFNetResourceFilter_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pszurl: windows_core::PCWSTR, pvbcancel: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFNetResourceFilter_Impl::OnRedirect(this, core::mem::transmute(&pszurl)) {
Ok(ok__) => {
pvbcancel.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn OnSendingRequest<Identity: IMFNetResourceFilter_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pszurl: windows_core::PCWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFNetResourceFilter_Impl::OnSendingRequest(this, core::mem::transmute(&pszurl)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
OnRedirect: OnRedirect::<Identity, OFFSET>,
OnSendingRequest: OnSendingRequest::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFNetResourceFilter as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFNetResourceFilter {}
windows_core::imp::define_interface!(IMFNetSchemeHandlerConfig, IMFNetSchemeHandlerConfig_Vtbl, 0x7be19e73_c9bf_468a_ac5a_a5e8653bec87);
windows_core::imp::interface_hierarchy!(IMFNetSchemeHandlerConfig, windows_core::IUnknown);
impl IMFNetSchemeHandlerConfig {
pub unsafe fn GetNumberOfSupportedProtocols(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetNumberOfSupportedProtocols)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetSupportedProtocolType(&self, nprotocolindex: u32) -> windows_core::Result<MFNETSOURCE_PROTOCOL_TYPE> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetSupportedProtocolType)(windows_core::Interface::as_raw(self), nprotocolindex, &mut result__).map(|| result__)
}
}
pub unsafe fn ResetProtocolRolloverSettings(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).ResetProtocolRolloverSettings)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFNetSchemeHandlerConfig_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetNumberOfSupportedProtocols: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetSupportedProtocolType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut MFNETSOURCE_PROTOCOL_TYPE) -> windows_core::HRESULT,
pub ResetProtocolRolloverSettings: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFNetSchemeHandlerConfig_Impl: windows_core::IUnknownImpl {
fn GetNumberOfSupportedProtocols(&self) -> windows_core::Result<u32>;
fn GetSupportedProtocolType(&self, nprotocolindex: u32) -> windows_core::Result<MFNETSOURCE_PROTOCOL_TYPE>;
fn ResetProtocolRolloverSettings(&self) -> windows_core::Result<()>;
}
impl IMFNetSchemeHandlerConfig_Vtbl {
pub const fn new<Identity: IMFNetSchemeHandlerConfig_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetNumberOfSupportedProtocols<Identity: IMFNetSchemeHandlerConfig_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcprotocols: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFNetSchemeHandlerConfig_Impl::GetNumberOfSupportedProtocols(this) {
Ok(ok__) => {
pcprotocols.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetSupportedProtocolType<Identity: IMFNetSchemeHandlerConfig_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, nprotocolindex: u32, pnprotocoltype: *mut MFNETSOURCE_PROTOCOL_TYPE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFNetSchemeHandlerConfig_Impl::GetSupportedProtocolType(this, core::mem::transmute_copy(&nprotocolindex)) {
Ok(ok__) => {
pnprotocoltype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn ResetProtocolRolloverSettings<Identity: IMFNetSchemeHandlerConfig_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFNetSchemeHandlerConfig_Impl::ResetProtocolRolloverSettings(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetNumberOfSupportedProtocols: GetNumberOfSupportedProtocols::<Identity, OFFSET>,
GetSupportedProtocolType: GetSupportedProtocolType::<Identity, OFFSET>,
ResetProtocolRolloverSettings: ResetProtocolRolloverSettings::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFNetSchemeHandlerConfig as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFNetSchemeHandlerConfig {}
windows_core::imp::define_interface!(IMFObjectReferenceStream, IMFObjectReferenceStream_Vtbl, 0x09ef5be3_c8a7_469e_8b70_73bf25bb193f);
windows_core::imp::interface_hierarchy!(IMFObjectReferenceStream, windows_core::IUnknown);
impl IMFObjectReferenceStream {
pub unsafe fn SaveReference<P1>(&self, riid: *const windows_core::GUID, punk: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).SaveReference)(windows_core::Interface::as_raw(self), riid, punk.param().abi()).ok() }
}
pub unsafe fn LoadReference(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).LoadReference)(windows_core::Interface::as_raw(self), riid, ppv as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFObjectReferenceStream_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SaveReference: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub LoadReference: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFObjectReferenceStream_Impl: windows_core::IUnknownImpl {
fn SaveReference(&self, riid: *const windows_core::GUID, punk: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn LoadReference(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
}
impl IMFObjectReferenceStream_Vtbl {
pub const fn new<Identity: IMFObjectReferenceStream_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SaveReference<Identity: IMFObjectReferenceStream_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, punk: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFObjectReferenceStream_Impl::SaveReference(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&punk)).into()
}
}
unsafe extern "system" fn LoadReference<Identity: IMFObjectReferenceStream_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFObjectReferenceStream_Impl::LoadReference(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SaveReference: SaveReference::<Identity, OFFSET>,
LoadReference: LoadReference::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFObjectReferenceStream as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFObjectReferenceStream {}
windows_core::imp::define_interface!(IMFOutputPolicy, IMFOutputPolicy_Vtbl, 0x7f00f10a_daed_41af_ab26_5fdfa4dfba3c);
impl core::ops::Deref for IMFOutputPolicy {
type Target = IMFAttributes;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFOutputPolicy, windows_core::IUnknown, IMFAttributes);
impl IMFOutputPolicy {
pub unsafe fn GenerateRequiredSchemas(&self, dwattributes: u32, guidoutputsubtype: windows_core::GUID, rgguidprotectionschemassupported: *const windows_core::GUID, cprotectionschemassupported: u32) -> windows_core::Result<IMFCollection> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GenerateRequiredSchemas)(windows_core::Interface::as_raw(self), dwattributes, core::mem::transmute(guidoutputsubtype), rgguidprotectionschemassupported, cprotectionschemassupported, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetOriginatorID(&self) -> windows_core::Result<windows_core::GUID> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOriginatorID)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetMinimumGRLVersion(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMinimumGRLVersion)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFOutputPolicy_Vtbl {
pub base__: IMFAttributes_Vtbl,
pub GenerateRequiredSchemas: unsafe extern "system" fn(*mut core::ffi::c_void, u32, windows_core::GUID, *const windows_core::GUID, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetOriginatorID: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT,
pub GetMinimumGRLVersion: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFOutputPolicy_Impl: IMFAttributes_Impl {
fn GenerateRequiredSchemas(&self, dwattributes: u32, guidoutputsubtype: &windows_core::GUID, rgguidprotectionschemassupported: *const windows_core::GUID, cprotectionschemassupported: u32) -> windows_core::Result<IMFCollection>;
fn GetOriginatorID(&self) -> windows_core::Result<windows_core::GUID>;
fn GetMinimumGRLVersion(&self) -> windows_core::Result<u32>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFOutputPolicy_Vtbl {
pub const fn new<Identity: IMFOutputPolicy_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GenerateRequiredSchemas<Identity: IMFOutputPolicy_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwattributes: u32, guidoutputsubtype: windows_core::GUID, rgguidprotectionschemassupported: *const windows_core::GUID, cprotectionschemassupported: u32, pprequiredprotectionschemas: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFOutputPolicy_Impl::GenerateRequiredSchemas(this, core::mem::transmute_copy(&dwattributes), core::mem::transmute(&guidoutputsubtype), core::mem::transmute_copy(&rgguidprotectionschemassupported), core::mem::transmute_copy(&cprotectionschemassupported)) {
Ok(ok__) => {
pprequiredprotectionschemas.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetOriginatorID<Identity: IMFOutputPolicy_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pguidoriginatorid: *mut windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFOutputPolicy_Impl::GetOriginatorID(this) {
Ok(ok__) => {
pguidoriginatorid.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetMinimumGRLVersion<Identity: IMFOutputPolicy_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwminimumgrlversion: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFOutputPolicy_Impl::GetMinimumGRLVersion(this) {
Ok(ok__) => {
pdwminimumgrlversion.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, OFFSET>(),
GenerateRequiredSchemas: GenerateRequiredSchemas::<Identity, OFFSET>,
GetOriginatorID: GetOriginatorID::<Identity, OFFSET>,
GetMinimumGRLVersion: GetMinimumGRLVersion::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFOutputPolicy as windows_core::Interface>::IID || iid == &<IMFAttributes as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFOutputPolicy {}
windows_core::imp::define_interface!(IMFOutputSchema, IMFOutputSchema_Vtbl, 0x7be0fc5b_abd9_44fb_a5c8_f50136e71599);
impl core::ops::Deref for IMFOutputSchema {
type Target = IMFAttributes;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFOutputSchema, windows_core::IUnknown, IMFAttributes);
impl IMFOutputSchema {
pub unsafe fn GetSchemaType(&self) -> windows_core::Result<windows_core::GUID> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetSchemaType)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetConfigurationData(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetConfigurationData)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetOriginatorID(&self) -> windows_core::Result<windows_core::GUID> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOriginatorID)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFOutputSchema_Vtbl {
pub base__: IMFAttributes_Vtbl,
pub GetSchemaType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT,
pub GetConfigurationData: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetOriginatorID: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFOutputSchema_Impl: IMFAttributes_Impl {
fn GetSchemaType(&self) -> windows_core::Result<windows_core::GUID>;
fn GetConfigurationData(&self) -> windows_core::Result<u32>;
fn GetOriginatorID(&self) -> windows_core::Result<windows_core::GUID>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFOutputSchema_Vtbl {
pub const fn new<Identity: IMFOutputSchema_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetSchemaType<Identity: IMFOutputSchema_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pguidschematype: *mut windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFOutputSchema_Impl::GetSchemaType(this) {
Ok(ok__) => {
pguidschematype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetConfigurationData<Identity: IMFOutputSchema_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwval: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFOutputSchema_Impl::GetConfigurationData(this) {
Ok(ok__) => {
pdwval.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetOriginatorID<Identity: IMFOutputSchema_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pguidoriginatorid: *mut windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFOutputSchema_Impl::GetOriginatorID(this) {
Ok(ok__) => {
pguidoriginatorid.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, OFFSET>(),
GetSchemaType: GetSchemaType::<Identity, OFFSET>,
GetConfigurationData: GetConfigurationData::<Identity, OFFSET>,
GetOriginatorID: GetOriginatorID::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFOutputSchema as windows_core::Interface>::IID || iid == &<IMFAttributes as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFOutputSchema {}
windows_core::imp::define_interface!(IMFOutputTrustAuthority, IMFOutputTrustAuthority_Vtbl, 0xd19f8e94_b126_4446_890c_5dcb7ad71453);
windows_core::imp::interface_hierarchy!(IMFOutputTrustAuthority, windows_core::IUnknown);
impl IMFOutputTrustAuthority {
pub unsafe fn GetAction(&self) -> windows_core::Result<MFPOLICYMANAGER_ACTION> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetAction)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetPolicy(&self, pppolicy: Option<&[Option<IMFOutputPolicy>]>, ppbticket: Option<*mut *mut u8>, pcbticket: Option<*mut u32>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetPolicy)(windows_core::Interface::as_raw(self), core::mem::transmute(pppolicy.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pppolicy.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ppbticket.unwrap_or(core::mem::zeroed()) as _, pcbticket.unwrap_or(core::mem::zeroed()) as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFOutputTrustAuthority_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetAction: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MFPOLICYMANAGER_ACTION) -> windows_core::HRESULT,
pub SetPolicy: unsafe extern "system" fn(*mut core::ffi::c_void, *const *mut core::ffi::c_void, u32, *mut *mut u8, *mut u32) -> windows_core::HRESULT,
}
pub trait IMFOutputTrustAuthority_Impl: windows_core::IUnknownImpl {
fn GetAction(&self) -> windows_core::Result<MFPOLICYMANAGER_ACTION>;
fn SetPolicy(&self, pppolicy: *const Option<IMFOutputPolicy>, npolicy: u32, ppbticket: *mut *mut u8, pcbticket: *mut u32) -> windows_core::Result<()>;
}
impl IMFOutputTrustAuthority_Vtbl {
pub const fn new<Identity: IMFOutputTrustAuthority_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetAction<Identity: IMFOutputTrustAuthority_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, paction: *mut MFPOLICYMANAGER_ACTION) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFOutputTrustAuthority_Impl::GetAction(this) {
Ok(ok__) => {
paction.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetPolicy<Identity: IMFOutputTrustAuthority_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pppolicy: *const *mut core::ffi::c_void, npolicy: u32, ppbticket: *mut *mut u8, pcbticket: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFOutputTrustAuthority_Impl::SetPolicy(this, core::mem::transmute_copy(&pppolicy), core::mem::transmute_copy(&npolicy), core::mem::transmute_copy(&ppbticket), core::mem::transmute_copy(&pcbticket)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetAction: GetAction::<Identity, OFFSET>,
SetPolicy: SetPolicy::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFOutputTrustAuthority as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFOutputTrustAuthority {}
windows_core::imp::define_interface!(IMFPMPClient, IMFPMPClient_Vtbl, 0x6c4e655d_ead8_4421_b6b9_54dcdbbdf820);
windows_core::imp::interface_hierarchy!(IMFPMPClient, windows_core::IUnknown);
impl IMFPMPClient {
pub unsafe fn SetPMPHost<P0>(&self, ppmphost: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFPMPHost>,
{
unsafe { (windows_core::Interface::vtable(self).SetPMPHost)(windows_core::Interface::as_raw(self), ppmphost.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFPMPClient_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetPMPHost: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFPMPClient_Impl: windows_core::IUnknownImpl {
fn SetPMPHost(&self, ppmphost: windows_core::Ref<IMFPMPHost>) -> windows_core::Result<()>;
}
impl IMFPMPClient_Vtbl {
pub const fn new<Identity: IMFPMPClient_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetPMPHost<Identity: IMFPMPClient_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppmphost: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMPClient_Impl::SetPMPHost(this, core::mem::transmute_copy(&ppmphost)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), SetPMPHost: SetPMPHost::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFPMPClient as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFPMPClient {}
windows_core::imp::define_interface!(IMFPMPClientApp, IMFPMPClientApp_Vtbl, 0xc004f646_be2c_48f3_93a2_a0983eba1108);
windows_core::imp::interface_hierarchy!(IMFPMPClientApp, windows_core::IUnknown);
impl IMFPMPClientApp {
pub unsafe fn SetPMPHost<P0>(&self, ppmphost: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFPMPHostApp>,
{
unsafe { (windows_core::Interface::vtable(self).SetPMPHost)(windows_core::Interface::as_raw(self), ppmphost.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFPMPClientApp_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetPMPHost: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFPMPClientApp_Impl: windows_core::IUnknownImpl {
fn SetPMPHost(&self, ppmphost: windows_core::Ref<IMFPMPHostApp>) -> windows_core::Result<()>;
}
impl IMFPMPClientApp_Vtbl {
pub const fn new<Identity: IMFPMPClientApp_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetPMPHost<Identity: IMFPMPClientApp_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppmphost: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMPClientApp_Impl::SetPMPHost(this, core::mem::transmute_copy(&ppmphost)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), SetPMPHost: SetPMPHost::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFPMPClientApp as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFPMPClientApp {}
windows_core::imp::define_interface!(IMFPMPHost, IMFPMPHost_Vtbl, 0xf70ca1a9_fdc7_4782_b994_adffb1c98606);
windows_core::imp::interface_hierarchy!(IMFPMPHost, windows_core::IUnknown);
impl IMFPMPHost {
pub unsafe fn LockProcess(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).LockProcess)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn UnlockProcess(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).UnlockProcess)(windows_core::Interface::as_raw(self)).ok() }
}
#[cfg(feature = "Win32_System_Com")]
pub unsafe fn CreateObjectByCLSID<P1, T>(&self, clsid: *const windows_core::GUID, pstream: P1) -> windows_core::Result<T>
where
P1: windows_core::Param<super::super::System::Com::IStream>,
T: windows_core::Interface,
{
let mut result__ = core::ptr::null_mut();
unsafe { (windows_core::Interface::vtable(self).CreateObjectByCLSID)(windows_core::Interface::as_raw(self), clsid, pstream.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFPMPHost_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub LockProcess: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub UnlockProcess: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Win32_System_Com")]
pub CreateObjectByCLSID: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_System_Com"))]
CreateObjectByCLSID: usize,
}
#[cfg(feature = "Win32_System_Com")]
pub trait IMFPMPHost_Impl: windows_core::IUnknownImpl {
fn LockProcess(&self) -> windows_core::Result<()>;
fn UnlockProcess(&self) -> windows_core::Result<()>;
fn CreateObjectByCLSID(&self, clsid: *const windows_core::GUID, pstream: windows_core::Ref<super::super::System::Com::IStream>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
}
#[cfg(feature = "Win32_System_Com")]
impl IMFPMPHost_Vtbl {
pub const fn new<Identity: IMFPMPHost_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn LockProcess<Identity: IMFPMPHost_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMPHost_Impl::LockProcess(this).into()
}
}
unsafe extern "system" fn UnlockProcess<Identity: IMFPMPHost_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMPHost_Impl::UnlockProcess(this).into()
}
}
unsafe extern "system" fn CreateObjectByCLSID<Identity: IMFPMPHost_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, clsid: *const windows_core::GUID, pstream: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMPHost_Impl::CreateObjectByCLSID(this, core::mem::transmute_copy(&clsid), core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
LockProcess: LockProcess::<Identity, OFFSET>,
UnlockProcess: UnlockProcess::<Identity, OFFSET>,
CreateObjectByCLSID: CreateObjectByCLSID::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFPMPHost as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_System_Com")]
impl windows_core::RuntimeName for IMFPMPHost {}
windows_core::imp::define_interface!(IMFPMPHostApp, IMFPMPHostApp_Vtbl, 0x84d2054a_3aa1_4728_a3b0_440a418cf49c);
windows_core::imp::interface_hierarchy!(IMFPMPHostApp, windows_core::IUnknown);
impl IMFPMPHostApp {
pub unsafe fn LockProcess(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).LockProcess)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn UnlockProcess(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).UnlockProcess)(windows_core::Interface::as_raw(self)).ok() }
}
#[cfg(feature = "Win32_System_Com")]
pub unsafe fn ActivateClassById<P0, P1, T>(&self, id: P0, pstream: P1) -> windows_core::Result<T>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<super::super::System::Com::IStream>,
T: windows_core::Interface,
{
let mut result__ = core::ptr::null_mut();
unsafe { (windows_core::Interface::vtable(self).ActivateClassById)(windows_core::Interface::as_raw(self), id.param().abi(), pstream.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFPMPHostApp_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub LockProcess: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub UnlockProcess: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Win32_System_Com")]
pub ActivateClassById: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_System_Com"))]
ActivateClassById: usize,
}
#[cfg(feature = "Win32_System_Com")]
pub trait IMFPMPHostApp_Impl: windows_core::IUnknownImpl {
fn LockProcess(&self) -> windows_core::Result<()>;
fn UnlockProcess(&self) -> windows_core::Result<()>;
fn ActivateClassById(&self, id: &windows_core::PCWSTR, pstream: windows_core::Ref<super::super::System::Com::IStream>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
}
#[cfg(feature = "Win32_System_Com")]
impl IMFPMPHostApp_Vtbl {
pub const fn new<Identity: IMFPMPHostApp_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn LockProcess<Identity: IMFPMPHostApp_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMPHostApp_Impl::LockProcess(this).into()
}
}
unsafe extern "system" fn UnlockProcess<Identity: IMFPMPHostApp_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMPHostApp_Impl::UnlockProcess(this).into()
}
}
unsafe extern "system" fn ActivateClassById<Identity: IMFPMPHostApp_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, id: windows_core::PCWSTR, pstream: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMPHostApp_Impl::ActivateClassById(this, core::mem::transmute(&id), core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
LockProcess: LockProcess::<Identity, OFFSET>,
UnlockProcess: UnlockProcess::<Identity, OFFSET>,
ActivateClassById: ActivateClassById::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFPMPHostApp as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_System_Com")]
impl windows_core::RuntimeName for IMFPMPHostApp {}
windows_core::imp::define_interface!(IMFPMPServer, IMFPMPServer_Vtbl, 0x994e23af_1cc2_493c_b9fa_46f1cb040fa4);
windows_core::imp::interface_hierarchy!(IMFPMPServer, windows_core::IUnknown);
impl IMFPMPServer {
pub unsafe fn LockProcess(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).LockProcess)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn UnlockProcess(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).UnlockProcess)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn CreateObjectByCLSID<T>(&self, clsid: *const windows_core::GUID) -> windows_core::Result<T>
where
T: windows_core::Interface,
{
let mut result__ = core::ptr::null_mut();
unsafe { (windows_core::Interface::vtable(self).CreateObjectByCLSID)(windows_core::Interface::as_raw(self), clsid, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFPMPServer_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub LockProcess: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub UnlockProcess: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub CreateObjectByCLSID: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFPMPServer_Impl: windows_core::IUnknownImpl {
fn LockProcess(&self) -> windows_core::Result<()>;
fn UnlockProcess(&self) -> windows_core::Result<()>;
fn CreateObjectByCLSID(&self, clsid: *const windows_core::GUID, riid: *const windows_core::GUID, ppobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
}
impl IMFPMPServer_Vtbl {
pub const fn new<Identity: IMFPMPServer_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn LockProcess<Identity: IMFPMPServer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMPServer_Impl::LockProcess(this).into()
}
}
unsafe extern "system" fn UnlockProcess<Identity: IMFPMPServer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMPServer_Impl::UnlockProcess(this).into()
}
}
unsafe extern "system" fn CreateObjectByCLSID<Identity: IMFPMPServer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, clsid: *const windows_core::GUID, riid: *const windows_core::GUID, ppobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMPServer_Impl::CreateObjectByCLSID(this, core::mem::transmute_copy(&clsid), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppobject)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
LockProcess: LockProcess::<Identity, OFFSET>,
UnlockProcess: UnlockProcess::<Identity, OFFSET>,
CreateObjectByCLSID: CreateObjectByCLSID::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFPMPServer as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFPMPServer {}
windows_core::imp::define_interface!(IMFPMediaItem, IMFPMediaItem_Vtbl, 0x90eb3e6b_ecbf_45cc_b1da_c6fe3ea70d57);
windows_core::imp::interface_hierarchy!(IMFPMediaItem, windows_core::IUnknown);
impl IMFPMediaItem {
pub unsafe fn GetMediaPlayer(&self) -> windows_core::Result<IMFPMediaPlayer> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMediaPlayer)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetURL(&self) -> windows_core::Result<windows_core::PWSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetURL)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetObject(&self) -> windows_core::Result<windows_core::IUnknown> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetObject)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetUserData(&self) -> windows_core::Result<usize> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetUserData)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetUserData(&self, dwuserdata: usize) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetUserData)(windows_core::Interface::as_raw(self), dwuserdata).ok() }
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn GetStartStopPosition(&self, pguidstartpositiontype: Option<*mut windows_core::GUID>, pvstartvalue: Option<*mut super::super::System::Com::StructuredStorage::PROPVARIANT>, pguidstoppositiontype: Option<*mut windows_core::GUID>, pvstopvalue: Option<*mut super::super::System::Com::StructuredStorage::PROPVARIANT>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetStartStopPosition)(windows_core::Interface::as_raw(self), pguidstartpositiontype.unwrap_or(core::mem::zeroed()) as _, pvstartvalue.unwrap_or(core::mem::zeroed()) as _, pguidstoppositiontype.unwrap_or(core::mem::zeroed()) as _, pvstopvalue.unwrap_or(core::mem::zeroed()) as _).ok() }
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn SetStartStopPosition(&self, pguidstartpositiontype: Option<*const windows_core::GUID>, pvstartvalue: Option<*const super::super::System::Com::StructuredStorage::PROPVARIANT>, pguidstoppositiontype: Option<*const windows_core::GUID>, pvstopvalue: Option<*const super::super::System::Com::StructuredStorage::PROPVARIANT>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetStartStopPosition)(windows_core::Interface::as_raw(self), pguidstartpositiontype.unwrap_or(core::mem::zeroed()) as _, pvstartvalue.unwrap_or(core::mem::zeroed()) as _, pguidstoppositiontype.unwrap_or(core::mem::zeroed()) as _, pvstopvalue.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn HasVideo(&self, pfhasvideo: Option<*mut windows_core::BOOL>, pfselected: Option<*mut windows_core::BOOL>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).HasVideo)(windows_core::Interface::as_raw(self), pfhasvideo.unwrap_or(core::mem::zeroed()) as _, pfselected.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn HasAudio(&self, pfhasaudio: Option<*mut windows_core::BOOL>, pfselected: Option<*mut windows_core::BOOL>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).HasAudio)(windows_core::Interface::as_raw(self), pfhasaudio.unwrap_or(core::mem::zeroed()) as _, pfselected.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn IsProtected(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).IsProtected)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn GetDuration(&self, guidpositiontype: *const windows_core::GUID) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDuration)(windows_core::Interface::as_raw(self), guidpositiontype, &mut result__).map(|| core::mem::transmute(result__))
}
}
pub unsafe fn GetNumberOfStreams(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetNumberOfStreams)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetStreamSelection(&self, dwstreamindex: u32) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamSelection)(windows_core::Interface::as_raw(self), dwstreamindex, &mut result__).map(|| result__)
}
}
pub unsafe fn SetStreamSelection(&self, dwstreamindex: u32, fenabled: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetStreamSelection)(windows_core::Interface::as_raw(self), dwstreamindex, fenabled.into()).ok() }
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn GetStreamAttribute(&self, dwstreamindex: u32, guidmfattribute: *const windows_core::GUID) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamAttribute)(windows_core::Interface::as_raw(self), dwstreamindex, guidmfattribute, &mut result__).map(|| core::mem::transmute(result__))
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn GetPresentationAttribute(&self, guidmfattribute: *const windows_core::GUID) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetPresentationAttribute)(windows_core::Interface::as_raw(self), guidmfattribute, &mut result__).map(|| core::mem::transmute(result__))
}
}
pub unsafe fn GetCharacteristics(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetCharacteristics)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetStreamSink<P1>(&self, dwstreamindex: u32, pmediasink: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).SetStreamSink)(windows_core::Interface::as_raw(self), dwstreamindex, pmediasink.param().abi()).ok() }
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn GetMetadata(&self) -> windows_core::Result<super::super::UI::Shell::PropertiesSystem::IPropertyStore> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMetadata)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFPMediaItem_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetMediaPlayer: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetURL: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT,
pub GetObject: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetUserData: unsafe extern "system" fn(*mut core::ffi::c_void, *mut usize) -> windows_core::HRESULT,
pub SetUserData: unsafe extern "system" fn(*mut core::ffi::c_void, usize) -> windows_core::HRESULT,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub GetStartStopPosition: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID, *mut super::super::System::Com::StructuredStorage::PROPVARIANT, *mut windows_core::GUID, *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
GetStartStopPosition: usize,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub SetStartStopPosition: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const super::super::System::Com::StructuredStorage::PROPVARIANT, *const windows_core::GUID, *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
SetStartStopPosition: usize,
pub HasVideo: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub HasAudio: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub IsProtected: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub GetDuration: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
GetDuration: usize,
pub GetNumberOfStreams: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetStreamSelection: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub SetStreamSelection: unsafe extern "system" fn(*mut core::ffi::c_void, u32, windows_core::BOOL) -> windows_core::HRESULT,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub GetStreamAttribute: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const windows_core::GUID, *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
GetStreamAttribute: usize,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub GetPresentationAttribute: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
GetPresentationAttribute: usize,
pub GetCharacteristics: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub SetStreamSink: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub GetMetadata: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))]
GetMetadata: usize,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_PropertiesSystem"))]
pub trait IMFPMediaItem_Impl: windows_core::IUnknownImpl {
fn GetMediaPlayer(&self) -> windows_core::Result<IMFPMediaPlayer>;
fn GetURL(&self) -> windows_core::Result<windows_core::PWSTR>;
fn GetObject(&self) -> windows_core::Result<windows_core::IUnknown>;
fn GetUserData(&self) -> windows_core::Result<usize>;
fn SetUserData(&self, dwuserdata: usize) -> windows_core::Result<()>;
fn GetStartStopPosition(&self, pguidstartpositiontype: *mut windows_core::GUID, pvstartvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT, pguidstoppositiontype: *mut windows_core::GUID, pvstopvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>;
fn SetStartStopPosition(&self, pguidstartpositiontype: *const windows_core::GUID, pvstartvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT, pguidstoppositiontype: *const windows_core::GUID, pvstopvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>;
fn HasVideo(&self, pfhasvideo: *mut windows_core::BOOL, pfselected: *mut windows_core::BOOL) -> windows_core::Result<()>;
fn HasAudio(&self, pfhasaudio: *mut windows_core::BOOL, pfselected: *mut windows_core::BOOL) -> windows_core::Result<()>;
fn IsProtected(&self) -> windows_core::Result<windows_core::BOOL>;
fn GetDuration(&self, guidpositiontype: *const windows_core::GUID) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT>;
fn GetNumberOfStreams(&self) -> windows_core::Result<u32>;
fn GetStreamSelection(&self, dwstreamindex: u32) -> windows_core::Result<windows_core::BOOL>;
fn SetStreamSelection(&self, dwstreamindex: u32, fenabled: windows_core::BOOL) -> windows_core::Result<()>;
fn GetStreamAttribute(&self, dwstreamindex: u32, guidmfattribute: *const windows_core::GUID) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT>;
fn GetPresentationAttribute(&self, guidmfattribute: *const windows_core::GUID) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT>;
fn GetCharacteristics(&self) -> windows_core::Result<u32>;
fn SetStreamSink(&self, dwstreamindex: u32, pmediasink: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn GetMetadata(&self) -> windows_core::Result<super::super::UI::Shell::PropertiesSystem::IPropertyStore>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_PropertiesSystem"))]
impl IMFPMediaItem_Vtbl {
pub const fn new<Identity: IMFPMediaItem_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetMediaPlayer<Identity: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppmediaplayer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPMediaItem_Impl::GetMediaPlayer(this) {
Ok(ok__) => {
ppmediaplayer.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetURL<Identity: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppwszurl: *mut windows_core::PWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPMediaItem_Impl::GetURL(this) {
Ok(ok__) => {
ppwszurl.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetObject<Identity: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppiunknown: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPMediaItem_Impl::GetObject(this) {
Ok(ok__) => {
ppiunknown.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetUserData<Identity: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwuserdata: *mut usize) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPMediaItem_Impl::GetUserData(this) {
Ok(ok__) => {
pdwuserdata.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetUserData<Identity: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwuserdata: usize) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaItem_Impl::SetUserData(this, core::mem::transmute_copy(&dwuserdata)).into()
}
}
unsafe extern "system" fn GetStartStopPosition<Identity: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pguidstartpositiontype: *mut windows_core::GUID, pvstartvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT, pguidstoppositiontype: *mut windows_core::GUID, pvstopvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaItem_Impl::GetStartStopPosition(this, core::mem::transmute_copy(&pguidstartpositiontype), core::mem::transmute_copy(&pvstartvalue), core::mem::transmute_copy(&pguidstoppositiontype), core::mem::transmute_copy(&pvstopvalue)).into()
}
}
unsafe extern "system" fn SetStartStopPosition<Identity: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pguidstartpositiontype: *const windows_core::GUID, pvstartvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT, pguidstoppositiontype: *const windows_core::GUID, pvstopvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaItem_Impl::SetStartStopPosition(this, core::mem::transmute_copy(&pguidstartpositiontype), core::mem::transmute_copy(&pvstartvalue), core::mem::transmute_copy(&pguidstoppositiontype), core::mem::transmute_copy(&pvstopvalue)).into()
}
}
unsafe extern "system" fn HasVideo<Identity: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pfhasvideo: *mut windows_core::BOOL, pfselected: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaItem_Impl::HasVideo(this, core::mem::transmute_copy(&pfhasvideo), core::mem::transmute_copy(&pfselected)).into()
}
}
unsafe extern "system" fn HasAudio<Identity: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pfhasaudio: *mut windows_core::BOOL, pfselected: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaItem_Impl::HasAudio(this, core::mem::transmute_copy(&pfhasaudio), core::mem::transmute_copy(&pfselected)).into()
}
}
unsafe extern "system" fn IsProtected<Identity: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pfprotected: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPMediaItem_Impl::IsProtected(this) {
Ok(ok__) => {
pfprotected.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetDuration<Identity: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidpositiontype: *const windows_core::GUID, pvdurationvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPMediaItem_Impl::GetDuration(this, core::mem::transmute_copy(&guidpositiontype)) {
Ok(ok__) => {
pvdurationvalue.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetNumberOfStreams<Identity: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwstreamcount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPMediaItem_Impl::GetNumberOfStreams(this) {
Ok(ok__) => {
pdwstreamcount.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetStreamSelection<Identity: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, pfenabled: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPMediaItem_Impl::GetStreamSelection(this, core::mem::transmute_copy(&dwstreamindex)) {
Ok(ok__) => {
pfenabled.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetStreamSelection<Identity: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, fenabled: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaItem_Impl::SetStreamSelection(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&fenabled)).into()
}
}
unsafe extern "system" fn GetStreamAttribute<Identity: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, guidmfattribute: *const windows_core::GUID, pvvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPMediaItem_Impl::GetStreamAttribute(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&guidmfattribute)) {
Ok(ok__) => {
pvvalue.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetPresentationAttribute<Identity: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidmfattribute: *const windows_core::GUID, pvvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPMediaItem_Impl::GetPresentationAttribute(this, core::mem::transmute_copy(&guidmfattribute)) {
Ok(ok__) => {
pvvalue.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetCharacteristics<Identity: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcharacteristics: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPMediaItem_Impl::GetCharacteristics(this) {
Ok(ok__) => {
pcharacteristics.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetStreamSink<Identity: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, pmediasink: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaItem_Impl::SetStreamSink(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&pmediasink)).into()
}
}
unsafe extern "system" fn GetMetadata<Identity: IMFPMediaItem_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppmetadatastore: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPMediaItem_Impl::GetMetadata(this) {
Ok(ok__) => {
ppmetadatastore.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetMediaPlayer: GetMediaPlayer::<Identity, OFFSET>,
GetURL: GetURL::<Identity, OFFSET>,
GetObject: GetObject::<Identity, OFFSET>,
GetUserData: GetUserData::<Identity, OFFSET>,
SetUserData: SetUserData::<Identity, OFFSET>,
GetStartStopPosition: GetStartStopPosition::<Identity, OFFSET>,
SetStartStopPosition: SetStartStopPosition::<Identity, OFFSET>,
HasVideo: HasVideo::<Identity, OFFSET>,
HasAudio: HasAudio::<Identity, OFFSET>,
IsProtected: IsProtected::<Identity, OFFSET>,
GetDuration: GetDuration::<Identity, OFFSET>,
GetNumberOfStreams: GetNumberOfStreams::<Identity, OFFSET>,
GetStreamSelection: GetStreamSelection::<Identity, OFFSET>,
SetStreamSelection: SetStreamSelection::<Identity, OFFSET>,
GetStreamAttribute: GetStreamAttribute::<Identity, OFFSET>,
GetPresentationAttribute: GetPresentationAttribute::<Identity, OFFSET>,
GetCharacteristics: GetCharacteristics::<Identity, OFFSET>,
SetStreamSink: SetStreamSink::<Identity, OFFSET>,
GetMetadata: GetMetadata::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFPMediaItem as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_PropertiesSystem"))]
impl windows_core::RuntimeName for IMFPMediaItem {}
windows_core::imp::define_interface!(IMFPMediaPlayer, IMFPMediaPlayer_Vtbl, 0xa714590a_58af_430a_85bf_44f5ec838d85);
windows_core::imp::interface_hierarchy!(IMFPMediaPlayer, windows_core::IUnknown);
impl IMFPMediaPlayer {
pub unsafe fn Play(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Play)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn Pause(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Pause)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn Stop(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn FrameStep(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).FrameStep)(windows_core::Interface::as_raw(self)).ok() }
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn SetPosition(&self, guidpositiontype: *const windows_core::GUID, pvpositionvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetPosition)(windows_core::Interface::as_raw(self), guidpositiontype, core::mem::transmute(pvpositionvalue)).ok() }
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn GetPosition(&self, guidpositiontype: *const windows_core::GUID) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetPosition)(windows_core::Interface::as_raw(self), guidpositiontype, &mut result__).map(|| core::mem::transmute(result__))
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn GetDuration(&self, guidpositiontype: *const windows_core::GUID) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDuration)(windows_core::Interface::as_raw(self), guidpositiontype, &mut result__).map(|| core::mem::transmute(result__))
}
}
pub unsafe fn SetRate(&self, flrate: f32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetRate)(windows_core::Interface::as_raw(self), flrate).ok() }
}
pub unsafe fn GetRate(&self) -> windows_core::Result<f32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetRate)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetSupportedRates(&self, fforwarddirection: bool, pflslowestrate: *mut f32, pflfastestrate: *mut f32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetSupportedRates)(windows_core::Interface::as_raw(self), fforwarddirection.into(), pflslowestrate as _, pflfastestrate as _).ok() }
}
pub unsafe fn GetState(&self) -> windows_core::Result<MFP_MEDIAPLAYER_STATE> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetState)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn CreateMediaItemFromURL<P0>(&self, pwszurl: P0, fsync: bool, dwuserdata: usize, ppmediaitem: Option<*mut Option<IMFPMediaItem>>) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).CreateMediaItemFromURL)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), fsync.into(), dwuserdata, ppmediaitem.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn CreateMediaItemFromObject<P0>(&self, piunknownobj: P0, fsync: bool, dwuserdata: usize, ppmediaitem: Option<*mut Option<IMFPMediaItem>>) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).CreateMediaItemFromObject)(windows_core::Interface::as_raw(self), piunknownobj.param().abi(), fsync.into(), dwuserdata, ppmediaitem.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn SetMediaItem<P0>(&self, pimfpmediaitem: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFPMediaItem>,
{
unsafe { (windows_core::Interface::vtable(self).SetMediaItem)(windows_core::Interface::as_raw(self), pimfpmediaitem.param().abi()).ok() }
}
pub unsafe fn ClearMediaItem(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).ClearMediaItem)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn GetMediaItem(&self) -> windows_core::Result<IMFPMediaItem> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMediaItem)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetVolume(&self) -> windows_core::Result<f32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetVolume)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetVolume(&self, flvolume: f32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetVolume)(windows_core::Interface::as_raw(self), flvolume).ok() }
}
pub unsafe fn GetBalance(&self) -> windows_core::Result<f32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetBalance)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetBalance(&self, flbalance: f32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetBalance)(windows_core::Interface::as_raw(self), flbalance).ok() }
}
pub unsafe fn GetMute(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMute)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetMute(&self, fmute: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetMute)(windows_core::Interface::as_raw(self), fmute.into()).ok() }
}
pub unsafe fn GetNativeVideoSize(&self, pszvideo: Option<*mut super::super::Foundation::SIZE>, pszarvideo: Option<*mut super::super::Foundation::SIZE>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetNativeVideoSize)(windows_core::Interface::as_raw(self), pszvideo.unwrap_or(core::mem::zeroed()) as _, pszarvideo.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn GetIdealVideoSize(&self, pszmin: Option<*mut super::super::Foundation::SIZE>, pszmax: Option<*mut super::super::Foundation::SIZE>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetIdealVideoSize)(windows_core::Interface::as_raw(self), pszmin.unwrap_or(core::mem::zeroed()) as _, pszmax.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn SetVideoSourceRect(&self, pnrcsource: *const MFVideoNormalizedRect) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetVideoSourceRect)(windows_core::Interface::as_raw(self), pnrcsource).ok() }
}
pub unsafe fn GetVideoSourceRect(&self) -> windows_core::Result<MFVideoNormalizedRect> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetVideoSourceRect)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetAspectRatioMode(&self, dwaspectratiomode: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetAspectRatioMode)(windows_core::Interface::as_raw(self), dwaspectratiomode).ok() }
}
pub unsafe fn GetAspectRatioMode(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetAspectRatioMode)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetVideoWindow(&self) -> windows_core::Result<super::super::Foundation::HWND> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetVideoWindow)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn UpdateVideo(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).UpdateVideo)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn SetBorderColor(&self, clr: super::super::Foundation::COLORREF) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetBorderColor)(windows_core::Interface::as_raw(self), clr).ok() }
}
pub unsafe fn GetBorderColor(&self) -> windows_core::Result<super::super::Foundation::COLORREF> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetBorderColor)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn InsertEffect<P0>(&self, peffect: P0, foptional: bool) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).InsertEffect)(windows_core::Interface::as_raw(self), peffect.param().abi(), foptional.into()).ok() }
}
pub unsafe fn RemoveEffect<P0>(&self, peffect: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).RemoveEffect)(windows_core::Interface::as_raw(self), peffect.param().abi()).ok() }
}
pub unsafe fn RemoveAllEffects(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RemoveAllEffects)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn Shutdown(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Shutdown)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFPMediaPlayer_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub Play: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Pause: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Stop: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub FrameStep: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub SetPosition: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
SetPosition: usize,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub GetPosition: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
GetPosition: usize,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub GetDuration: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
GetDuration: usize,
pub SetRate: unsafe extern "system" fn(*mut core::ffi::c_void, f32) -> windows_core::HRESULT,
pub GetRate: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f32) -> windows_core::HRESULT,
pub GetSupportedRates: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL, *mut f32, *mut f32) -> windows_core::HRESULT,
pub GetState: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MFP_MEDIAPLAYER_STATE) -> windows_core::HRESULT,
pub CreateMediaItemFromURL: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, windows_core::BOOL, usize, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CreateMediaItemFromObject: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, windows_core::BOOL, usize, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetMediaItem: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ClearMediaItem: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetMediaItem: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetVolume: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f32) -> windows_core::HRESULT,
pub SetVolume: unsafe extern "system" fn(*mut core::ffi::c_void, f32) -> windows_core::HRESULT,
pub GetBalance: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f32) -> windows_core::HRESULT,
pub SetBalance: unsafe extern "system" fn(*mut core::ffi::c_void, f32) -> windows_core::HRESULT,
pub GetMute: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub SetMute: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT,
pub GetNativeVideoSize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::SIZE, *mut super::super::Foundation::SIZE) -> windows_core::HRESULT,
pub GetIdealVideoSize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::SIZE, *mut super::super::Foundation::SIZE) -> windows_core::HRESULT,
pub SetVideoSourceRect: unsafe extern "system" fn(*mut core::ffi::c_void, *const MFVideoNormalizedRect) -> windows_core::HRESULT,
pub GetVideoSourceRect: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MFVideoNormalizedRect) -> windows_core::HRESULT,
pub SetAspectRatioMode: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub GetAspectRatioMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetVideoWindow: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::HWND) -> windows_core::HRESULT,
pub UpdateVideo: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetBorderColor: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::COLORREF) -> windows_core::HRESULT,
pub GetBorderColor: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::COLORREF) -> windows_core::HRESULT,
pub InsertEffect: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT,
pub RemoveEffect: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RemoveAllEffects: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Shutdown: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFPMediaPlayer_Impl: windows_core::IUnknownImpl {
fn Play(&self) -> windows_core::Result<()>;
fn Pause(&self) -> windows_core::Result<()>;
fn Stop(&self) -> windows_core::Result<()>;
fn FrameStep(&self) -> windows_core::Result<()>;
fn SetPosition(&self, guidpositiontype: *const windows_core::GUID, pvpositionvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>;
fn GetPosition(&self, guidpositiontype: *const windows_core::GUID) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT>;
fn GetDuration(&self, guidpositiontype: *const windows_core::GUID) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT>;
fn SetRate(&self, flrate: f32) -> windows_core::Result<()>;
fn GetRate(&self) -> windows_core::Result<f32>;
fn GetSupportedRates(&self, fforwarddirection: windows_core::BOOL, pflslowestrate: *mut f32, pflfastestrate: *mut f32) -> windows_core::Result<()>;
fn GetState(&self) -> windows_core::Result<MFP_MEDIAPLAYER_STATE>;
fn CreateMediaItemFromURL(&self, pwszurl: &windows_core::PCWSTR, fsync: windows_core::BOOL, dwuserdata: usize, ppmediaitem: windows_core::OutRef<IMFPMediaItem>) -> windows_core::Result<()>;
fn CreateMediaItemFromObject(&self, piunknownobj: windows_core::Ref<windows_core::IUnknown>, fsync: windows_core::BOOL, dwuserdata: usize, ppmediaitem: windows_core::OutRef<IMFPMediaItem>) -> windows_core::Result<()>;
fn SetMediaItem(&self, pimfpmediaitem: windows_core::Ref<IMFPMediaItem>) -> windows_core::Result<()>;
fn ClearMediaItem(&self) -> windows_core::Result<()>;
fn GetMediaItem(&self) -> windows_core::Result<IMFPMediaItem>;
fn GetVolume(&self) -> windows_core::Result<f32>;
fn SetVolume(&self, flvolume: f32) -> windows_core::Result<()>;
fn GetBalance(&self) -> windows_core::Result<f32>;
fn SetBalance(&self, flbalance: f32) -> windows_core::Result<()>;
fn GetMute(&self) -> windows_core::Result<windows_core::BOOL>;
fn SetMute(&self, fmute: windows_core::BOOL) -> windows_core::Result<()>;
fn GetNativeVideoSize(&self, pszvideo: *mut super::super::Foundation::SIZE, pszarvideo: *mut super::super::Foundation::SIZE) -> windows_core::Result<()>;
fn GetIdealVideoSize(&self, pszmin: *mut super::super::Foundation::SIZE, pszmax: *mut super::super::Foundation::SIZE) -> windows_core::Result<()>;
fn SetVideoSourceRect(&self, pnrcsource: *const MFVideoNormalizedRect) -> windows_core::Result<()>;
fn GetVideoSourceRect(&self) -> windows_core::Result<MFVideoNormalizedRect>;
fn SetAspectRatioMode(&self, dwaspectratiomode: u32) -> windows_core::Result<()>;
fn GetAspectRatioMode(&self) -> windows_core::Result<u32>;
fn GetVideoWindow(&self) -> windows_core::Result<super::super::Foundation::HWND>;
fn UpdateVideo(&self) -> windows_core::Result<()>;
fn SetBorderColor(&self, clr: super::super::Foundation::COLORREF) -> windows_core::Result<()>;
fn GetBorderColor(&self) -> windows_core::Result<super::super::Foundation::COLORREF>;
fn InsertEffect(&self, peffect: windows_core::Ref<windows_core::IUnknown>, foptional: windows_core::BOOL) -> windows_core::Result<()>;
fn RemoveEffect(&self, peffect: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn RemoveAllEffects(&self) -> windows_core::Result<()>;
fn Shutdown(&self) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFPMediaPlayer_Vtbl {
pub const fn new<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Play<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaPlayer_Impl::Play(this).into()
}
}
unsafe extern "system" fn Pause<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaPlayer_Impl::Pause(this).into()
}
}
unsafe extern "system" fn Stop<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaPlayer_Impl::Stop(this).into()
}
}
unsafe extern "system" fn FrameStep<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaPlayer_Impl::FrameStep(this).into()
}
}
unsafe extern "system" fn SetPosition<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidpositiontype: *const windows_core::GUID, pvpositionvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaPlayer_Impl::SetPosition(this, core::mem::transmute_copy(&guidpositiontype), core::mem::transmute_copy(&pvpositionvalue)).into()
}
}
unsafe extern "system" fn GetPosition<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidpositiontype: *const windows_core::GUID, pvpositionvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPMediaPlayer_Impl::GetPosition(this, core::mem::transmute_copy(&guidpositiontype)) {
Ok(ok__) => {
pvpositionvalue.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetDuration<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidpositiontype: *const windows_core::GUID, pvdurationvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPMediaPlayer_Impl::GetDuration(this, core::mem::transmute_copy(&guidpositiontype)) {
Ok(ok__) => {
pvdurationvalue.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetRate<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, flrate: f32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaPlayer_Impl::SetRate(this, core::mem::transmute_copy(&flrate)).into()
}
}
unsafe extern "system" fn GetRate<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pflrate: *mut f32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPMediaPlayer_Impl::GetRate(this) {
Ok(ok__) => {
pflrate.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetSupportedRates<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, fforwarddirection: windows_core::BOOL, pflslowestrate: *mut f32, pflfastestrate: *mut f32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaPlayer_Impl::GetSupportedRates(this, core::mem::transmute_copy(&fforwarddirection), core::mem::transmute_copy(&pflslowestrate), core::mem::transmute_copy(&pflfastestrate)).into()
}
}
unsafe extern "system" fn GetState<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pestate: *mut MFP_MEDIAPLAYER_STATE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPMediaPlayer_Impl::GetState(this) {
Ok(ok__) => {
pestate.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn CreateMediaItemFromURL<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pwszurl: windows_core::PCWSTR, fsync: windows_core::BOOL, dwuserdata: usize, ppmediaitem: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaPlayer_Impl::CreateMediaItemFromURL(this, core::mem::transmute(&pwszurl), core::mem::transmute_copy(&fsync), core::mem::transmute_copy(&dwuserdata), core::mem::transmute_copy(&ppmediaitem)).into()
}
}
unsafe extern "system" fn CreateMediaItemFromObject<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, piunknownobj: *mut core::ffi::c_void, fsync: windows_core::BOOL, dwuserdata: usize, ppmediaitem: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaPlayer_Impl::CreateMediaItemFromObject(this, core::mem::transmute_copy(&piunknownobj), core::mem::transmute_copy(&fsync), core::mem::transmute_copy(&dwuserdata), core::mem::transmute_copy(&ppmediaitem)).into()
}
}
unsafe extern "system" fn SetMediaItem<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pimfpmediaitem: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaPlayer_Impl::SetMediaItem(this, core::mem::transmute_copy(&pimfpmediaitem)).into()
}
}
unsafe extern "system" fn ClearMediaItem<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaPlayer_Impl::ClearMediaItem(this).into()
}
}
unsafe extern "system" fn GetMediaItem<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppimfpmediaitem: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPMediaPlayer_Impl::GetMediaItem(this) {
Ok(ok__) => {
ppimfpmediaitem.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetVolume<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pflvolume: *mut f32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPMediaPlayer_Impl::GetVolume(this) {
Ok(ok__) => {
pflvolume.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetVolume<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, flvolume: f32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaPlayer_Impl::SetVolume(this, core::mem::transmute_copy(&flvolume)).into()
}
}
unsafe extern "system" fn GetBalance<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pflbalance: *mut f32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPMediaPlayer_Impl::GetBalance(this) {
Ok(ok__) => {
pflbalance.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetBalance<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, flbalance: f32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaPlayer_Impl::SetBalance(this, core::mem::transmute_copy(&flbalance)).into()
}
}
unsafe extern "system" fn GetMute<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pfmute: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPMediaPlayer_Impl::GetMute(this) {
Ok(ok__) => {
pfmute.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetMute<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, fmute: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaPlayer_Impl::SetMute(this, core::mem::transmute_copy(&fmute)).into()
}
}
unsafe extern "system" fn GetNativeVideoSize<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pszvideo: *mut super::super::Foundation::SIZE, pszarvideo: *mut super::super::Foundation::SIZE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaPlayer_Impl::GetNativeVideoSize(this, core::mem::transmute_copy(&pszvideo), core::mem::transmute_copy(&pszarvideo)).into()
}
}
unsafe extern "system" fn GetIdealVideoSize<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pszmin: *mut super::super::Foundation::SIZE, pszmax: *mut super::super::Foundation::SIZE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaPlayer_Impl::GetIdealVideoSize(this, core::mem::transmute_copy(&pszmin), core::mem::transmute_copy(&pszmax)).into()
}
}
unsafe extern "system" fn SetVideoSourceRect<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pnrcsource: *const MFVideoNormalizedRect) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaPlayer_Impl::SetVideoSourceRect(this, core::mem::transmute_copy(&pnrcsource)).into()
}
}
unsafe extern "system" fn GetVideoSourceRect<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pnrcsource: *mut MFVideoNormalizedRect) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPMediaPlayer_Impl::GetVideoSourceRect(this) {
Ok(ok__) => {
pnrcsource.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetAspectRatioMode<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwaspectratiomode: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaPlayer_Impl::SetAspectRatioMode(this, core::mem::transmute_copy(&dwaspectratiomode)).into()
}
}
unsafe extern "system" fn GetAspectRatioMode<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwaspectratiomode: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPMediaPlayer_Impl::GetAspectRatioMode(this) {
Ok(ok__) => {
pdwaspectratiomode.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetVideoWindow<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, phwndvideo: *mut super::super::Foundation::HWND) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPMediaPlayer_Impl::GetVideoWindow(this) {
Ok(ok__) => {
phwndvideo.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn UpdateVideo<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaPlayer_Impl::UpdateVideo(this).into()
}
}
unsafe extern "system" fn SetBorderColor<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, clr: super::super::Foundation::COLORREF) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaPlayer_Impl::SetBorderColor(this, core::mem::transmute_copy(&clr)).into()
}
}
unsafe extern "system" fn GetBorderColor<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pclr: *mut super::super::Foundation::COLORREF) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPMediaPlayer_Impl::GetBorderColor(this) {
Ok(ok__) => {
pclr.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn InsertEffect<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, peffect: *mut core::ffi::c_void, foptional: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaPlayer_Impl::InsertEffect(this, core::mem::transmute_copy(&peffect), core::mem::transmute_copy(&foptional)).into()
}
}
unsafe extern "system" fn RemoveEffect<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, peffect: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaPlayer_Impl::RemoveEffect(this, core::mem::transmute_copy(&peffect)).into()
}
}
unsafe extern "system" fn RemoveAllEffects<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaPlayer_Impl::RemoveAllEffects(this).into()
}
}
unsafe extern "system" fn Shutdown<Identity: IMFPMediaPlayer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaPlayer_Impl::Shutdown(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Play: Play::<Identity, OFFSET>,
Pause: Pause::<Identity, OFFSET>,
Stop: Stop::<Identity, OFFSET>,
FrameStep: FrameStep::<Identity, OFFSET>,
SetPosition: SetPosition::<Identity, OFFSET>,
GetPosition: GetPosition::<Identity, OFFSET>,
GetDuration: GetDuration::<Identity, OFFSET>,
SetRate: SetRate::<Identity, OFFSET>,
GetRate: GetRate::<Identity, OFFSET>,
GetSupportedRates: GetSupportedRates::<Identity, OFFSET>,
GetState: GetState::<Identity, OFFSET>,
CreateMediaItemFromURL: CreateMediaItemFromURL::<Identity, OFFSET>,
CreateMediaItemFromObject: CreateMediaItemFromObject::<Identity, OFFSET>,
SetMediaItem: SetMediaItem::<Identity, OFFSET>,
ClearMediaItem: ClearMediaItem::<Identity, OFFSET>,
GetMediaItem: GetMediaItem::<Identity, OFFSET>,
GetVolume: GetVolume::<Identity, OFFSET>,
SetVolume: SetVolume::<Identity, OFFSET>,
GetBalance: GetBalance::<Identity, OFFSET>,
SetBalance: SetBalance::<Identity, OFFSET>,
GetMute: GetMute::<Identity, OFFSET>,
SetMute: SetMute::<Identity, OFFSET>,
GetNativeVideoSize: GetNativeVideoSize::<Identity, OFFSET>,
GetIdealVideoSize: GetIdealVideoSize::<Identity, OFFSET>,
SetVideoSourceRect: SetVideoSourceRect::<Identity, OFFSET>,
GetVideoSourceRect: GetVideoSourceRect::<Identity, OFFSET>,
SetAspectRatioMode: SetAspectRatioMode::<Identity, OFFSET>,
GetAspectRatioMode: GetAspectRatioMode::<Identity, OFFSET>,
GetVideoWindow: GetVideoWindow::<Identity, OFFSET>,
UpdateVideo: UpdateVideo::<Identity, OFFSET>,
SetBorderColor: SetBorderColor::<Identity, OFFSET>,
GetBorderColor: GetBorderColor::<Identity, OFFSET>,
InsertEffect: InsertEffect::<Identity, OFFSET>,
RemoveEffect: RemoveEffect::<Identity, OFFSET>,
RemoveAllEffects: RemoveAllEffects::<Identity, OFFSET>,
Shutdown: Shutdown::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFPMediaPlayer as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFPMediaPlayer {}
windows_core::imp::define_interface!(IMFPMediaPlayerCallback, IMFPMediaPlayerCallback_Vtbl, 0x766c8ffb_5fdb_4fea_a28d_b912996f51bd);
windows_core::imp::interface_hierarchy!(IMFPMediaPlayerCallback, windows_core::IUnknown);
impl IMFPMediaPlayerCallback {
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn OnMediaPlayerEvent(&self, peventheader: *const MFP_EVENT_HEADER) {
unsafe { (windows_core::Interface::vtable(self).OnMediaPlayerEvent)(windows_core::Interface::as_raw(self), core::mem::transmute(peventheader)) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFPMediaPlayerCallback_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub OnMediaPlayerEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *const MFP_EVENT_HEADER),
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))]
OnMediaPlayerEvent: usize,
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub trait IMFPMediaPlayerCallback_Impl: windows_core::IUnknownImpl {
fn OnMediaPlayerEvent(&self, peventheader: *const MFP_EVENT_HEADER);
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl IMFPMediaPlayerCallback_Vtbl {
pub const fn new<Identity: IMFPMediaPlayerCallback_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn OnMediaPlayerEvent<Identity: IMFPMediaPlayerCallback_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, peventheader: *const MFP_EVENT_HEADER) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPMediaPlayerCallback_Impl::OnMediaPlayerEvent(this, core::mem::transmute_copy(&peventheader))
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), OnMediaPlayerEvent: OnMediaPlayerEvent::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFPMediaPlayerCallback as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl windows_core::RuntimeName for IMFPMediaPlayerCallback {}
windows_core::imp::define_interface!(IMFPluginControl, IMFPluginControl_Vtbl, 0x5c6c44bf_1db6_435b_9249_e8cd10fdec96);
windows_core::imp::interface_hierarchy!(IMFPluginControl, windows_core::IUnknown);
impl IMFPluginControl {
pub unsafe fn GetPreferredClsid<P1>(&self, plugintype: u32, selector: P1) -> windows_core::Result<windows_core::GUID>
where
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetPreferredClsid)(windows_core::Interface::as_raw(self), plugintype, selector.param().abi(), &mut result__).map(|| result__)
}
}
pub unsafe fn GetPreferredClsidByIndex(&self, plugintype: u32, index: u32, selector: *mut windows_core::PWSTR, clsid: *mut windows_core::GUID) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetPreferredClsidByIndex)(windows_core::Interface::as_raw(self), plugintype, index, selector as _, clsid as _).ok() }
}
pub unsafe fn SetPreferredClsid<P1>(&self, plugintype: u32, selector: P1, clsid: Option<*const windows_core::GUID>) -> windows_core::Result<()>
where
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).SetPreferredClsid)(windows_core::Interface::as_raw(self), plugintype, selector.param().abi(), clsid.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn IsDisabled(&self, plugintype: u32, clsid: *const windows_core::GUID) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).IsDisabled)(windows_core::Interface::as_raw(self), plugintype, clsid).ok() }
}
pub unsafe fn GetDisabledByIndex(&self, plugintype: u32, index: u32) -> windows_core::Result<windows_core::GUID> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDisabledByIndex)(windows_core::Interface::as_raw(self), plugintype, index, &mut result__).map(|| result__)
}
}
pub unsafe fn SetDisabled(&self, plugintype: u32, clsid: *const windows_core::GUID, disabled: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetDisabled)(windows_core::Interface::as_raw(self), plugintype, clsid, disabled.into()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFPluginControl_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetPreferredClsid: unsafe extern "system" fn(*mut core::ffi::c_void, u32, windows_core::PCWSTR, *mut windows_core::GUID) -> windows_core::HRESULT,
pub GetPreferredClsidByIndex: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, *mut windows_core::PWSTR, *mut windows_core::GUID) -> windows_core::HRESULT,
pub SetPreferredClsid: unsafe extern "system" fn(*mut core::ffi::c_void, u32, windows_core::PCWSTR, *const windows_core::GUID) -> windows_core::HRESULT,
pub IsDisabled: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const windows_core::GUID) -> windows_core::HRESULT,
pub GetDisabledByIndex: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, *mut windows_core::GUID) -> windows_core::HRESULT,
pub SetDisabled: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const windows_core::GUID, windows_core::BOOL) -> windows_core::HRESULT,
}
pub trait IMFPluginControl_Impl: windows_core::IUnknownImpl {
fn GetPreferredClsid(&self, plugintype: u32, selector: &windows_core::PCWSTR) -> windows_core::Result<windows_core::GUID>;
fn GetPreferredClsidByIndex(&self, plugintype: u32, index: u32, selector: *mut windows_core::PWSTR, clsid: *mut windows_core::GUID) -> windows_core::Result<()>;
fn SetPreferredClsid(&self, plugintype: u32, selector: &windows_core::PCWSTR, clsid: *const windows_core::GUID) -> windows_core::Result<()>;
fn IsDisabled(&self, plugintype: u32, clsid: *const windows_core::GUID) -> windows_core::Result<()>;
fn GetDisabledByIndex(&self, plugintype: u32, index: u32) -> windows_core::Result<windows_core::GUID>;
fn SetDisabled(&self, plugintype: u32, clsid: *const windows_core::GUID, disabled: windows_core::BOOL) -> windows_core::Result<()>;
}
impl IMFPluginControl_Vtbl {
pub const fn new<Identity: IMFPluginControl_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetPreferredClsid<Identity: IMFPluginControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, plugintype: u32, selector: windows_core::PCWSTR, clsid: *mut windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPluginControl_Impl::GetPreferredClsid(this, core::mem::transmute_copy(&plugintype), core::mem::transmute(&selector)) {
Ok(ok__) => {
clsid.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetPreferredClsidByIndex<Identity: IMFPluginControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, plugintype: u32, index: u32, selector: *mut windows_core::PWSTR, clsid: *mut windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPluginControl_Impl::GetPreferredClsidByIndex(this, core::mem::transmute_copy(&plugintype), core::mem::transmute_copy(&index), core::mem::transmute_copy(&selector), core::mem::transmute_copy(&clsid)).into()
}
}
unsafe extern "system" fn SetPreferredClsid<Identity: IMFPluginControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, plugintype: u32, selector: windows_core::PCWSTR, clsid: *const windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPluginControl_Impl::SetPreferredClsid(this, core::mem::transmute_copy(&plugintype), core::mem::transmute(&selector), core::mem::transmute_copy(&clsid)).into()
}
}
unsafe extern "system" fn IsDisabled<Identity: IMFPluginControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, plugintype: u32, clsid: *const windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPluginControl_Impl::IsDisabled(this, core::mem::transmute_copy(&plugintype), core::mem::transmute_copy(&clsid)).into()
}
}
unsafe extern "system" fn GetDisabledByIndex<Identity: IMFPluginControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, plugintype: u32, index: u32, clsid: *mut windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPluginControl_Impl::GetDisabledByIndex(this, core::mem::transmute_copy(&plugintype), core::mem::transmute_copy(&index)) {
Ok(ok__) => {
clsid.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetDisabled<Identity: IMFPluginControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, plugintype: u32, clsid: *const windows_core::GUID, disabled: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPluginControl_Impl::SetDisabled(this, core::mem::transmute_copy(&plugintype), core::mem::transmute_copy(&clsid), core::mem::transmute_copy(&disabled)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetPreferredClsid: GetPreferredClsid::<Identity, OFFSET>,
GetPreferredClsidByIndex: GetPreferredClsidByIndex::<Identity, OFFSET>,
SetPreferredClsid: SetPreferredClsid::<Identity, OFFSET>,
IsDisabled: IsDisabled::<Identity, OFFSET>,
GetDisabledByIndex: GetDisabledByIndex::<Identity, OFFSET>,
SetDisabled: SetDisabled::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFPluginControl as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFPluginControl {}
windows_core::imp::define_interface!(IMFPluginControl2, IMFPluginControl2_Vtbl, 0xc6982083_3ddc_45cb_af5e_0f7a8ce4de77);
impl core::ops::Deref for IMFPluginControl2 {
type Target = IMFPluginControl;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFPluginControl2, windows_core::IUnknown, IMFPluginControl);
impl IMFPluginControl2 {
pub unsafe fn SetPolicy(&self, policy: MF_PLUGIN_CONTROL_POLICY) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetPolicy)(windows_core::Interface::as_raw(self), policy).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFPluginControl2_Vtbl {
pub base__: IMFPluginControl_Vtbl,
pub SetPolicy: unsafe extern "system" fn(*mut core::ffi::c_void, MF_PLUGIN_CONTROL_POLICY) -> windows_core::HRESULT,
}
pub trait IMFPluginControl2_Impl: IMFPluginControl_Impl {
fn SetPolicy(&self, policy: MF_PLUGIN_CONTROL_POLICY) -> windows_core::Result<()>;
}
impl IMFPluginControl2_Vtbl {
pub const fn new<Identity: IMFPluginControl2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetPolicy<Identity: IMFPluginControl2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, policy: MF_PLUGIN_CONTROL_POLICY) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPluginControl2_Impl::SetPolicy(this, core::mem::transmute_copy(&policy)).into()
}
}
Self { base__: IMFPluginControl_Vtbl::new::<Identity, OFFSET>(), SetPolicy: SetPolicy::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFPluginControl2 as windows_core::Interface>::IID || iid == &<IMFPluginControl as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFPluginControl2 {}
windows_core::imp::define_interface!(IMFPresentationClock, IMFPresentationClock_Vtbl, 0x868ce85c_8ea9_4f55_ab82_b009a910a805);
impl core::ops::Deref for IMFPresentationClock {
type Target = IMFClock;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFPresentationClock, windows_core::IUnknown, IMFClock);
impl IMFPresentationClock {
pub unsafe fn SetTimeSource<P0>(&self, ptimesource: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFPresentationTimeSource>,
{
unsafe { (windows_core::Interface::vtable(self).SetTimeSource)(windows_core::Interface::as_raw(self), ptimesource.param().abi()).ok() }
}
pub unsafe fn GetTimeSource(&self) -> windows_core::Result<IMFPresentationTimeSource> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetTimeSource)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetTime(&self) -> windows_core::Result<i64> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetTime)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn AddClockStateSink<P0>(&self, pstatesink: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFClockStateSink>,
{
unsafe { (windows_core::Interface::vtable(self).AddClockStateSink)(windows_core::Interface::as_raw(self), pstatesink.param().abi()).ok() }
}
pub unsafe fn RemoveClockStateSink<P0>(&self, pstatesink: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFClockStateSink>,
{
unsafe { (windows_core::Interface::vtable(self).RemoveClockStateSink)(windows_core::Interface::as_raw(self), pstatesink.param().abi()).ok() }
}
pub unsafe fn Start(&self, llclockstartoffset: i64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Start)(windows_core::Interface::as_raw(self), llclockstartoffset).ok() }
}
pub unsafe fn Stop(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn Pause(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Pause)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFPresentationClock_Vtbl {
pub base__: IMFClock_Vtbl,
pub SetTimeSource: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetTimeSource: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub AddClockStateSink: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RemoveClockStateSink: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Start: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub Stop: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Pause: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFPresentationClock_Impl: IMFClock_Impl {
fn SetTimeSource(&self, ptimesource: windows_core::Ref<IMFPresentationTimeSource>) -> windows_core::Result<()>;
fn GetTimeSource(&self) -> windows_core::Result<IMFPresentationTimeSource>;
fn GetTime(&self) -> windows_core::Result<i64>;
fn AddClockStateSink(&self, pstatesink: windows_core::Ref<IMFClockStateSink>) -> windows_core::Result<()>;
fn RemoveClockStateSink(&self, pstatesink: windows_core::Ref<IMFClockStateSink>) -> windows_core::Result<()>;
fn Start(&self, llclockstartoffset: i64) -> windows_core::Result<()>;
fn Stop(&self) -> windows_core::Result<()>;
fn Pause(&self) -> windows_core::Result<()>;
}
impl IMFPresentationClock_Vtbl {
pub const fn new<Identity: IMFPresentationClock_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetTimeSource<Identity: IMFPresentationClock_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ptimesource: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPresentationClock_Impl::SetTimeSource(this, core::mem::transmute_copy(&ptimesource)).into()
}
}
unsafe extern "system" fn GetTimeSource<Identity: IMFPresentationClock_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pptimesource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPresentationClock_Impl::GetTimeSource(this) {
Ok(ok__) => {
pptimesource.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetTime<Identity: IMFPresentationClock_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, phnsclocktime: *mut i64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPresentationClock_Impl::GetTime(this) {
Ok(ok__) => {
phnsclocktime.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn AddClockStateSink<Identity: IMFPresentationClock_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pstatesink: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPresentationClock_Impl::AddClockStateSink(this, core::mem::transmute_copy(&pstatesink)).into()
}
}
unsafe extern "system" fn RemoveClockStateSink<Identity: IMFPresentationClock_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pstatesink: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPresentationClock_Impl::RemoveClockStateSink(this, core::mem::transmute_copy(&pstatesink)).into()
}
}
unsafe extern "system" fn Start<Identity: IMFPresentationClock_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, llclockstartoffset: i64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPresentationClock_Impl::Start(this, core::mem::transmute_copy(&llclockstartoffset)).into()
}
}
unsafe extern "system" fn Stop<Identity: IMFPresentationClock_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPresentationClock_Impl::Stop(this).into()
}
}
unsafe extern "system" fn Pause<Identity: IMFPresentationClock_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPresentationClock_Impl::Pause(this).into()
}
}
Self {
base__: IMFClock_Vtbl::new::<Identity, OFFSET>(),
SetTimeSource: SetTimeSource::<Identity, OFFSET>,
GetTimeSource: GetTimeSource::<Identity, OFFSET>,
GetTime: GetTime::<Identity, OFFSET>,
AddClockStateSink: AddClockStateSink::<Identity, OFFSET>,
RemoveClockStateSink: RemoveClockStateSink::<Identity, OFFSET>,
Start: Start::<Identity, OFFSET>,
Stop: Stop::<Identity, OFFSET>,
Pause: Pause::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFPresentationClock as windows_core::Interface>::IID || iid == &<IMFClock as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFPresentationClock {}
windows_core::imp::define_interface!(IMFPresentationDescriptor, IMFPresentationDescriptor_Vtbl, 0x03cb2711_24d7_4db6_a17f_f3a7a479a536);
impl core::ops::Deref for IMFPresentationDescriptor {
type Target = IMFAttributes;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFPresentationDescriptor, windows_core::IUnknown, IMFAttributes);
impl IMFPresentationDescriptor {
pub unsafe fn GetStreamDescriptorCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamDescriptorCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetStreamDescriptorByIndex(&self, dwindex: u32, pfselected: *mut windows_core::BOOL, ppdescriptor: *mut Option<IMFStreamDescriptor>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetStreamDescriptorByIndex)(windows_core::Interface::as_raw(self), dwindex, pfselected as _, core::mem::transmute(ppdescriptor)).ok() }
}
pub unsafe fn SelectStream(&self, dwdescriptorindex: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SelectStream)(windows_core::Interface::as_raw(self), dwdescriptorindex).ok() }
}
pub unsafe fn DeselectStream(&self, dwdescriptorindex: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).DeselectStream)(windows_core::Interface::as_raw(self), dwdescriptorindex).ok() }
}
pub unsafe fn Clone(&self) -> windows_core::Result<IMFPresentationDescriptor> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFPresentationDescriptor_Vtbl {
pub base__: IMFAttributes_Vtbl,
pub GetStreamDescriptorCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetStreamDescriptorByIndex: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut windows_core::BOOL, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SelectStream: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub DeselectStream: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFPresentationDescriptor_Impl: IMFAttributes_Impl {
fn GetStreamDescriptorCount(&self) -> windows_core::Result<u32>;
fn GetStreamDescriptorByIndex(&self, dwindex: u32, pfselected: *mut windows_core::BOOL, ppdescriptor: windows_core::OutRef<IMFStreamDescriptor>) -> windows_core::Result<()>;
fn SelectStream(&self, dwdescriptorindex: u32) -> windows_core::Result<()>;
fn DeselectStream(&self, dwdescriptorindex: u32) -> windows_core::Result<()>;
fn Clone(&self) -> windows_core::Result<IMFPresentationDescriptor>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFPresentationDescriptor_Vtbl {
pub const fn new<Identity: IMFPresentationDescriptor_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetStreamDescriptorCount<Identity: IMFPresentationDescriptor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwdescriptorcount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPresentationDescriptor_Impl::GetStreamDescriptorCount(this) {
Ok(ok__) => {
pdwdescriptorcount.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetStreamDescriptorByIndex<Identity: IMFPresentationDescriptor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwindex: u32, pfselected: *mut windows_core::BOOL, ppdescriptor: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPresentationDescriptor_Impl::GetStreamDescriptorByIndex(this, core::mem::transmute_copy(&dwindex), core::mem::transmute_copy(&pfselected), core::mem::transmute_copy(&ppdescriptor)).into()
}
}
unsafe extern "system" fn SelectStream<Identity: IMFPresentationDescriptor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwdescriptorindex: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPresentationDescriptor_Impl::SelectStream(this, core::mem::transmute_copy(&dwdescriptorindex)).into()
}
}
unsafe extern "system" fn DeselectStream<Identity: IMFPresentationDescriptor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwdescriptorindex: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFPresentationDescriptor_Impl::DeselectStream(this, core::mem::transmute_copy(&dwdescriptorindex)).into()
}
}
unsafe extern "system" fn Clone<Identity: IMFPresentationDescriptor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pppresentationdescriptor: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPresentationDescriptor_Impl::Clone(this) {
Ok(ok__) => {
pppresentationdescriptor.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, OFFSET>(),
GetStreamDescriptorCount: GetStreamDescriptorCount::<Identity, OFFSET>,
GetStreamDescriptorByIndex: GetStreamDescriptorByIndex::<Identity, OFFSET>,
SelectStream: SelectStream::<Identity, OFFSET>,
DeselectStream: DeselectStream::<Identity, OFFSET>,
Clone: Clone::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFPresentationDescriptor as windows_core::Interface>::IID || iid == &<IMFAttributes as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFPresentationDescriptor {}
windows_core::imp::define_interface!(IMFPresentationTimeSource, IMFPresentationTimeSource_Vtbl, 0x7ff12cce_f76f_41c2_863b_1666c8e5e139);
impl core::ops::Deref for IMFPresentationTimeSource {
type Target = IMFClock;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFPresentationTimeSource, windows_core::IUnknown, IMFClock);
impl IMFPresentationTimeSource {
pub unsafe fn GetUnderlyingClock(&self) -> windows_core::Result<IMFClock> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetUnderlyingClock)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFPresentationTimeSource_Vtbl {
pub base__: IMFClock_Vtbl,
pub GetUnderlyingClock: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFPresentationTimeSource_Impl: IMFClock_Impl {
fn GetUnderlyingClock(&self) -> windows_core::Result<IMFClock>;
}
impl IMFPresentationTimeSource_Vtbl {
pub const fn new<Identity: IMFPresentationTimeSource_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetUnderlyingClock<Identity: IMFPresentationTimeSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppclock: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFPresentationTimeSource_Impl::GetUnderlyingClock(this) {
Ok(ok__) => {
ppclock.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: IMFClock_Vtbl::new::<Identity, OFFSET>(), GetUnderlyingClock: GetUnderlyingClock::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFPresentationTimeSource as windows_core::Interface>::IID || iid == &<IMFClock as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFPresentationTimeSource {}
windows_core::imp::define_interface!(IMFProtectedEnvironmentAccess, IMFProtectedEnvironmentAccess_Vtbl, 0xef5dc845_f0d9_4ec9_b00c_cb5183d38434);
windows_core::imp::interface_hierarchy!(IMFProtectedEnvironmentAccess, windows_core::IUnknown);
impl IMFProtectedEnvironmentAccess {
pub unsafe fn Call(&self, input: &[u8], output: &mut [u8]) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Call)(windows_core::Interface::as_raw(self), input.len().try_into().unwrap(), core::mem::transmute(input.as_ptr()), output.len().try_into().unwrap(), core::mem::transmute(output.as_ptr())).ok() }
}
pub unsafe fn ReadGRL(&self, outputlength: *mut u32, output: *mut *mut u8) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).ReadGRL)(windows_core::Interface::as_raw(self), outputlength as _, output as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFProtectedEnvironmentAccess_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub Call: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const u8, u32, *mut u8) -> windows_core::HRESULT,
pub ReadGRL: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut *mut u8) -> windows_core::HRESULT,
}
pub trait IMFProtectedEnvironmentAccess_Impl: windows_core::IUnknownImpl {
fn Call(&self, inputlength: u32, input: *const u8, outputlength: u32, output: *mut u8) -> windows_core::Result<()>;
fn ReadGRL(&self, outputlength: *mut u32, output: *mut *mut u8) -> windows_core::Result<()>;
}
impl IMFProtectedEnvironmentAccess_Vtbl {
pub const fn new<Identity: IMFProtectedEnvironmentAccess_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Call<Identity: IMFProtectedEnvironmentAccess_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, inputlength: u32, input: *const u8, outputlength: u32, output: *mut u8) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFProtectedEnvironmentAccess_Impl::Call(this, core::mem::transmute_copy(&inputlength), core::mem::transmute_copy(&input), core::mem::transmute_copy(&outputlength), core::mem::transmute_copy(&output)).into()
}
}
unsafe extern "system" fn ReadGRL<Identity: IMFProtectedEnvironmentAccess_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, outputlength: *mut u32, output: *mut *mut u8) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFProtectedEnvironmentAccess_Impl::ReadGRL(this, core::mem::transmute_copy(&outputlength), core::mem::transmute_copy(&output)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), Call: Call::<Identity, OFFSET>, ReadGRL: ReadGRL::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFProtectedEnvironmentAccess as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFProtectedEnvironmentAccess {}
windows_core::imp::define_interface!(IMFQualityAdvise, IMFQualityAdvise_Vtbl, 0xec15e2e9_e36b_4f7c_8758_77d452ef4ce7);
windows_core::imp::interface_hierarchy!(IMFQualityAdvise, windows_core::IUnknown);
impl IMFQualityAdvise {
pub unsafe fn SetDropMode(&self, edropmode: MF_QUALITY_DROP_MODE) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetDropMode)(windows_core::Interface::as_raw(self), edropmode).ok() }
}
pub unsafe fn SetQualityLevel(&self, equalitylevel: MF_QUALITY_LEVEL) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetQualityLevel)(windows_core::Interface::as_raw(self), equalitylevel).ok() }
}
pub unsafe fn GetDropMode(&self) -> windows_core::Result<MF_QUALITY_DROP_MODE> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDropMode)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetQualityLevel(&self) -> windows_core::Result<MF_QUALITY_LEVEL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetQualityLevel)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn DropTime(&self, hnsamounttodrop: i64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).DropTime)(windows_core::Interface::as_raw(self), hnsamounttodrop).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFQualityAdvise_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetDropMode: unsafe extern "system" fn(*mut core::ffi::c_void, MF_QUALITY_DROP_MODE) -> windows_core::HRESULT,
pub SetQualityLevel: unsafe extern "system" fn(*mut core::ffi::c_void, MF_QUALITY_LEVEL) -> windows_core::HRESULT,
pub GetDropMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MF_QUALITY_DROP_MODE) -> windows_core::HRESULT,
pub GetQualityLevel: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MF_QUALITY_LEVEL) -> windows_core::HRESULT,
pub DropTime: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
pub trait IMFQualityAdvise_Impl: windows_core::IUnknownImpl {
fn SetDropMode(&self, edropmode: MF_QUALITY_DROP_MODE) -> windows_core::Result<()>;
fn SetQualityLevel(&self, equalitylevel: MF_QUALITY_LEVEL) -> windows_core::Result<()>;
fn GetDropMode(&self) -> windows_core::Result<MF_QUALITY_DROP_MODE>;
fn GetQualityLevel(&self) -> windows_core::Result<MF_QUALITY_LEVEL>;
fn DropTime(&self, hnsamounttodrop: i64) -> windows_core::Result<()>;
}
impl IMFQualityAdvise_Vtbl {
pub const fn new<Identity: IMFQualityAdvise_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetDropMode<Identity: IMFQualityAdvise_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, edropmode: MF_QUALITY_DROP_MODE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFQualityAdvise_Impl::SetDropMode(this, core::mem::transmute_copy(&edropmode)).into()
}
}
unsafe extern "system" fn SetQualityLevel<Identity: IMFQualityAdvise_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, equalitylevel: MF_QUALITY_LEVEL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFQualityAdvise_Impl::SetQualityLevel(this, core::mem::transmute_copy(&equalitylevel)).into()
}
}
unsafe extern "system" fn GetDropMode<Identity: IMFQualityAdvise_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pedropmode: *mut MF_QUALITY_DROP_MODE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFQualityAdvise_Impl::GetDropMode(this) {
Ok(ok__) => {
pedropmode.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetQualityLevel<Identity: IMFQualityAdvise_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pequalitylevel: *mut MF_QUALITY_LEVEL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFQualityAdvise_Impl::GetQualityLevel(this) {
Ok(ok__) => {
pequalitylevel.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn DropTime<Identity: IMFQualityAdvise_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hnsamounttodrop: i64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFQualityAdvise_Impl::DropTime(this, core::mem::transmute_copy(&hnsamounttodrop)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetDropMode: SetDropMode::<Identity, OFFSET>,
SetQualityLevel: SetQualityLevel::<Identity, OFFSET>,
GetDropMode: GetDropMode::<Identity, OFFSET>,
GetQualityLevel: GetQualityLevel::<Identity, OFFSET>,
DropTime: DropTime::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFQualityAdvise as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFQualityAdvise {}
windows_core::imp::define_interface!(IMFQualityAdvise2, IMFQualityAdvise2_Vtbl, 0xf3706f0d_8ea2_4886_8000_7155e9ec2eae);
impl core::ops::Deref for IMFQualityAdvise2 {
type Target = IMFQualityAdvise;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFQualityAdvise2, windows_core::IUnknown, IMFQualityAdvise);
impl IMFQualityAdvise2 {
pub unsafe fn NotifyQualityEvent<P0>(&self, pevent: P0) -> windows_core::Result<u32>
where
P0: windows_core::Param<IMFMediaEvent>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).NotifyQualityEvent)(windows_core::Interface::as_raw(self), pevent.param().abi(), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFQualityAdvise2_Vtbl {
pub base__: IMFQualityAdvise_Vtbl,
pub NotifyQualityEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
}
pub trait IMFQualityAdvise2_Impl: IMFQualityAdvise_Impl {
fn NotifyQualityEvent(&self, pevent: windows_core::Ref<IMFMediaEvent>) -> windows_core::Result<u32>;
}
impl IMFQualityAdvise2_Vtbl {
pub const fn new<Identity: IMFQualityAdvise2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn NotifyQualityEvent<Identity: IMFQualityAdvise2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pevent: *mut core::ffi::c_void, pdwflags: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFQualityAdvise2_Impl::NotifyQualityEvent(this, core::mem::transmute_copy(&pevent)) {
Ok(ok__) => {
pdwflags.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: IMFQualityAdvise_Vtbl::new::<Identity, OFFSET>(), NotifyQualityEvent: NotifyQualityEvent::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFQualityAdvise2 as windows_core::Interface>::IID || iid == &<IMFQualityAdvise as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFQualityAdvise2 {}
windows_core::imp::define_interface!(IMFQualityAdviseLimits, IMFQualityAdviseLimits_Vtbl, 0xdfcd8e4d_30b5_4567_acaa_8eb5b7853dc9);
windows_core::imp::interface_hierarchy!(IMFQualityAdviseLimits, windows_core::IUnknown);
impl IMFQualityAdviseLimits {
pub unsafe fn GetMaximumDropMode(&self) -> windows_core::Result<MF_QUALITY_DROP_MODE> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMaximumDropMode)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetMinimumQualityLevel(&self) -> windows_core::Result<MF_QUALITY_LEVEL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMinimumQualityLevel)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFQualityAdviseLimits_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetMaximumDropMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MF_QUALITY_DROP_MODE) -> windows_core::HRESULT,
pub GetMinimumQualityLevel: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MF_QUALITY_LEVEL) -> windows_core::HRESULT,
}
pub trait IMFQualityAdviseLimits_Impl: windows_core::IUnknownImpl {
fn GetMaximumDropMode(&self) -> windows_core::Result<MF_QUALITY_DROP_MODE>;
fn GetMinimumQualityLevel(&self) -> windows_core::Result<MF_QUALITY_LEVEL>;
}
impl IMFQualityAdviseLimits_Vtbl {
pub const fn new<Identity: IMFQualityAdviseLimits_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetMaximumDropMode<Identity: IMFQualityAdviseLimits_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pedropmode: *mut MF_QUALITY_DROP_MODE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFQualityAdviseLimits_Impl::GetMaximumDropMode(this) {
Ok(ok__) => {
pedropmode.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetMinimumQualityLevel<Identity: IMFQualityAdviseLimits_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pequalitylevel: *mut MF_QUALITY_LEVEL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFQualityAdviseLimits_Impl::GetMinimumQualityLevel(this) {
Ok(ok__) => {
pequalitylevel.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetMaximumDropMode: GetMaximumDropMode::<Identity, OFFSET>,
GetMinimumQualityLevel: GetMinimumQualityLevel::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFQualityAdviseLimits as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFQualityAdviseLimits {}
windows_core::imp::define_interface!(IMFQualityManager, IMFQualityManager_Vtbl, 0x8d009d86_5b9f_4115_b1fc_9f80d52ab8ab);
windows_core::imp::interface_hierarchy!(IMFQualityManager, windows_core::IUnknown);
impl IMFQualityManager {
pub unsafe fn NotifyTopology<P0>(&self, ptopology: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFTopology>,
{
unsafe { (windows_core::Interface::vtable(self).NotifyTopology)(windows_core::Interface::as_raw(self), ptopology.param().abi()).ok() }
}
pub unsafe fn NotifyPresentationClock<P0>(&self, pclock: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFPresentationClock>,
{
unsafe { (windows_core::Interface::vtable(self).NotifyPresentationClock)(windows_core::Interface::as_raw(self), pclock.param().abi()).ok() }
}
pub unsafe fn NotifyProcessInput<P0, P2>(&self, pnode: P0, linputindex: i32, psample: P2) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFTopologyNode>,
P2: windows_core::Param<IMFSample>,
{
unsafe { (windows_core::Interface::vtable(self).NotifyProcessInput)(windows_core::Interface::as_raw(self), pnode.param().abi(), linputindex, psample.param().abi()).ok() }
}
pub unsafe fn NotifyProcessOutput<P0, P2>(&self, pnode: P0, loutputindex: i32, psample: P2) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFTopologyNode>,
P2: windows_core::Param<IMFSample>,
{
unsafe { (windows_core::Interface::vtable(self).NotifyProcessOutput)(windows_core::Interface::as_raw(self), pnode.param().abi(), loutputindex, psample.param().abi()).ok() }
}
pub unsafe fn NotifyQualityEvent<P0, P1>(&self, pobject: P0, pevent: P1) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
P1: windows_core::Param<IMFMediaEvent>,
{
unsafe { (windows_core::Interface::vtable(self).NotifyQualityEvent)(windows_core::Interface::as_raw(self), pobject.param().abi(), pevent.param().abi()).ok() }
}
pub unsafe fn Shutdown(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Shutdown)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFQualityManager_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub NotifyTopology: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub NotifyPresentationClock: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub NotifyProcessInput: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, i32, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub NotifyProcessOutput: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, i32, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub NotifyQualityEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Shutdown: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFQualityManager_Impl: windows_core::IUnknownImpl {
fn NotifyTopology(&self, ptopology: windows_core::Ref<IMFTopology>) -> windows_core::Result<()>;
fn NotifyPresentationClock(&self, pclock: windows_core::Ref<IMFPresentationClock>) -> windows_core::Result<()>;
fn NotifyProcessInput(&self, pnode: windows_core::Ref<IMFTopologyNode>, linputindex: i32, psample: windows_core::Ref<IMFSample>) -> windows_core::Result<()>;
fn NotifyProcessOutput(&self, pnode: windows_core::Ref<IMFTopologyNode>, loutputindex: i32, psample: windows_core::Ref<IMFSample>) -> windows_core::Result<()>;
fn NotifyQualityEvent(&self, pobject: windows_core::Ref<windows_core::IUnknown>, pevent: windows_core::Ref<IMFMediaEvent>) -> windows_core::Result<()>;
fn Shutdown(&self) -> windows_core::Result<()>;
}
impl IMFQualityManager_Vtbl {
pub const fn new<Identity: IMFQualityManager_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn NotifyTopology<Identity: IMFQualityManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ptopology: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFQualityManager_Impl::NotifyTopology(this, core::mem::transmute_copy(&ptopology)).into()
}
}
unsafe extern "system" fn NotifyPresentationClock<Identity: IMFQualityManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pclock: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFQualityManager_Impl::NotifyPresentationClock(this, core::mem::transmute_copy(&pclock)).into()
}
}
unsafe extern "system" fn NotifyProcessInput<Identity: IMFQualityManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pnode: *mut core::ffi::c_void, linputindex: i32, psample: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFQualityManager_Impl::NotifyProcessInput(this, core::mem::transmute_copy(&pnode), core::mem::transmute_copy(&linputindex), core::mem::transmute_copy(&psample)).into()
}
}
unsafe extern "system" fn NotifyProcessOutput<Identity: IMFQualityManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pnode: *mut core::ffi::c_void, loutputindex: i32, psample: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFQualityManager_Impl::NotifyProcessOutput(this, core::mem::transmute_copy(&pnode), core::mem::transmute_copy(&loutputindex), core::mem::transmute_copy(&psample)).into()
}
}
unsafe extern "system" fn NotifyQualityEvent<Identity: IMFQualityManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pobject: *mut core::ffi::c_void, pevent: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFQualityManager_Impl::NotifyQualityEvent(this, core::mem::transmute_copy(&pobject), core::mem::transmute_copy(&pevent)).into()
}
}
unsafe extern "system" fn Shutdown<Identity: IMFQualityManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFQualityManager_Impl::Shutdown(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
NotifyTopology: NotifyTopology::<Identity, OFFSET>,
NotifyPresentationClock: NotifyPresentationClock::<Identity, OFFSET>,
NotifyProcessInput: NotifyProcessInput::<Identity, OFFSET>,
NotifyProcessOutput: NotifyProcessOutput::<Identity, OFFSET>,
NotifyQualityEvent: NotifyQualityEvent::<Identity, OFFSET>,
Shutdown: Shutdown::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFQualityManager as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFQualityManager {}
windows_core::imp::define_interface!(IMFRateControl, IMFRateControl_Vtbl, 0x88ddcd21_03c3_4275_91ed_55ee3929328f);
windows_core::imp::interface_hierarchy!(IMFRateControl, windows_core::IUnknown);
impl IMFRateControl {
pub unsafe fn SetRate(&self, fthin: bool, flrate: f32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetRate)(windows_core::Interface::as_raw(self), fthin.into(), flrate).ok() }
}
pub unsafe fn GetRate(&self, pfthin: *mut windows_core::BOOL, pflrate: *mut f32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetRate)(windows_core::Interface::as_raw(self), pfthin as _, pflrate as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFRateControl_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetRate: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL, f32) -> windows_core::HRESULT,
pub GetRate: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL, *mut f32) -> windows_core::HRESULT,
}
pub trait IMFRateControl_Impl: windows_core::IUnknownImpl {
fn SetRate(&self, fthin: windows_core::BOOL, flrate: f32) -> windows_core::Result<()>;
fn GetRate(&self, pfthin: *mut windows_core::BOOL, pflrate: *mut f32) -> windows_core::Result<()>;
}
impl IMFRateControl_Vtbl {
pub const fn new<Identity: IMFRateControl_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetRate<Identity: IMFRateControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, fthin: windows_core::BOOL, flrate: f32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFRateControl_Impl::SetRate(this, core::mem::transmute_copy(&fthin), core::mem::transmute_copy(&flrate)).into()
}
}
unsafe extern "system" fn GetRate<Identity: IMFRateControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pfthin: *mut windows_core::BOOL, pflrate: *mut f32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFRateControl_Impl::GetRate(this, core::mem::transmute_copy(&pfthin), core::mem::transmute_copy(&pflrate)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), SetRate: SetRate::<Identity, OFFSET>, GetRate: GetRate::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFRateControl as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFRateControl {}
windows_core::imp::define_interface!(IMFRateSupport, IMFRateSupport_Vtbl, 0x0a9ccdbc_d797_4563_9667_94ec5d79292d);
windows_core::imp::interface_hierarchy!(IMFRateSupport, windows_core::IUnknown);
impl IMFRateSupport {
pub unsafe fn GetSlowestRate(&self, edirection: MFRATE_DIRECTION, fthin: bool) -> windows_core::Result<f32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetSlowestRate)(windows_core::Interface::as_raw(self), edirection, fthin.into(), &mut result__).map(|| result__)
}
}
pub unsafe fn GetFastestRate(&self, edirection: MFRATE_DIRECTION, fthin: bool) -> windows_core::Result<f32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetFastestRate)(windows_core::Interface::as_raw(self), edirection, fthin.into(), &mut result__).map(|| result__)
}
}
pub unsafe fn IsRateSupported(&self, fthin: bool, flrate: f32, pflnearestsupportedrate: *mut f32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).IsRateSupported)(windows_core::Interface::as_raw(self), fthin.into(), flrate, pflnearestsupportedrate as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFRateSupport_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetSlowestRate: unsafe extern "system" fn(*mut core::ffi::c_void, MFRATE_DIRECTION, windows_core::BOOL, *mut f32) -> windows_core::HRESULT,
pub GetFastestRate: unsafe extern "system" fn(*mut core::ffi::c_void, MFRATE_DIRECTION, windows_core::BOOL, *mut f32) -> windows_core::HRESULT,
pub IsRateSupported: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL, f32, *mut f32) -> windows_core::HRESULT,
}
pub trait IMFRateSupport_Impl: windows_core::IUnknownImpl {
fn GetSlowestRate(&self, edirection: MFRATE_DIRECTION, fthin: windows_core::BOOL) -> windows_core::Result<f32>;
fn GetFastestRate(&self, edirection: MFRATE_DIRECTION, fthin: windows_core::BOOL) -> windows_core::Result<f32>;
fn IsRateSupported(&self, fthin: windows_core::BOOL, flrate: f32, pflnearestsupportedrate: *mut f32) -> windows_core::Result<()>;
}
impl IMFRateSupport_Vtbl {
pub const fn new<Identity: IMFRateSupport_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetSlowestRate<Identity: IMFRateSupport_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, edirection: MFRATE_DIRECTION, fthin: windows_core::BOOL, pflrate: *mut f32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFRateSupport_Impl::GetSlowestRate(this, core::mem::transmute_copy(&edirection), core::mem::transmute_copy(&fthin)) {
Ok(ok__) => {
pflrate.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetFastestRate<Identity: IMFRateSupport_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, edirection: MFRATE_DIRECTION, fthin: windows_core::BOOL, pflrate: *mut f32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFRateSupport_Impl::GetFastestRate(this, core::mem::transmute_copy(&edirection), core::mem::transmute_copy(&fthin)) {
Ok(ok__) => {
pflrate.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn IsRateSupported<Identity: IMFRateSupport_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, fthin: windows_core::BOOL, flrate: f32, pflnearestsupportedrate: *mut f32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFRateSupport_Impl::IsRateSupported(this, core::mem::transmute_copy(&fthin), core::mem::transmute_copy(&flrate), core::mem::transmute_copy(&pflnearestsupportedrate)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetSlowestRate: GetSlowestRate::<Identity, OFFSET>,
GetFastestRate: GetFastestRate::<Identity, OFFSET>,
IsRateSupported: IsRateSupported::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFRateSupport as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFRateSupport {}
windows_core::imp::define_interface!(IMFReadWriteClassFactory, IMFReadWriteClassFactory_Vtbl, 0xe7fe2e12_661c_40da_92f9_4f002ab67627);
windows_core::imp::interface_hierarchy!(IMFReadWriteClassFactory, windows_core::IUnknown);
impl IMFReadWriteClassFactory {
pub unsafe fn CreateInstanceFromURL<P1, P2, T>(&self, clsid: *const windows_core::GUID, pwszurl: P1, pattributes: P2) -> windows_core::Result<T>
where
P1: windows_core::Param<windows_core::PCWSTR>,
P2: windows_core::Param<IMFAttributes>,
T: windows_core::Interface,
{
let mut result__ = core::ptr::null_mut();
unsafe { (windows_core::Interface::vtable(self).CreateInstanceFromURL)(windows_core::Interface::as_raw(self), clsid, pwszurl.param().abi(), pattributes.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) }
}
pub unsafe fn CreateInstanceFromObject<P1, P2, T>(&self, clsid: *const windows_core::GUID, punkobject: P1, pattributes: P2) -> windows_core::Result<T>
where
P1: windows_core::Param<windows_core::IUnknown>,
P2: windows_core::Param<IMFAttributes>,
T: windows_core::Interface,
{
let mut result__ = core::ptr::null_mut();
unsafe { (windows_core::Interface::vtable(self).CreateInstanceFromObject)(windows_core::Interface::as_raw(self), clsid, punkobject.param().abi(), pattributes.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFReadWriteClassFactory_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub CreateInstanceFromURL: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, windows_core::PCWSTR, *mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CreateInstanceFromObject: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut core::ffi::c_void, *mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFReadWriteClassFactory_Impl: windows_core::IUnknownImpl {
fn CreateInstanceFromURL(&self, clsid: *const windows_core::GUID, pwszurl: &windows_core::PCWSTR, pattributes: windows_core::Ref<IMFAttributes>, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
fn CreateInstanceFromObject(&self, clsid: *const windows_core::GUID, punkobject: windows_core::Ref<windows_core::IUnknown>, pattributes: windows_core::Ref<IMFAttributes>, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
}
impl IMFReadWriteClassFactory_Vtbl {
pub const fn new<Identity: IMFReadWriteClassFactory_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateInstanceFromURL<Identity: IMFReadWriteClassFactory_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, clsid: *const windows_core::GUID, pwszurl: windows_core::PCWSTR, pattributes: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFReadWriteClassFactory_Impl::CreateInstanceFromURL(this, core::mem::transmute_copy(&clsid), core::mem::transmute(&pwszurl), core::mem::transmute_copy(&pattributes), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobject)).into()
}
}
unsafe extern "system" fn CreateInstanceFromObject<Identity: IMFReadWriteClassFactory_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, clsid: *const windows_core::GUID, punkobject: *mut core::ffi::c_void, pattributes: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFReadWriteClassFactory_Impl::CreateInstanceFromObject(this, core::mem::transmute_copy(&clsid), core::mem::transmute_copy(&punkobject), core::mem::transmute_copy(&pattributes), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobject)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CreateInstanceFromURL: CreateInstanceFromURL::<Identity, OFFSET>,
CreateInstanceFromObject: CreateInstanceFromObject::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFReadWriteClassFactory as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFReadWriteClassFactory {}
windows_core::imp::define_interface!(IMFRealTimeClient, IMFRealTimeClient_Vtbl, 0x2347d60b_3fb5_480c_8803_8df3adcd3ef0);
windows_core::imp::interface_hierarchy!(IMFRealTimeClient, windows_core::IUnknown);
impl IMFRealTimeClient {
pub unsafe fn RegisterThreads<P1>(&self, dwtaskindex: u32, wszclass: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).RegisterThreads)(windows_core::Interface::as_raw(self), dwtaskindex, wszclass.param().abi()).ok() }
}
pub unsafe fn UnregisterThreads(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).UnregisterThreads)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn SetWorkQueue(&self, dwworkqueueid: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetWorkQueue)(windows_core::Interface::as_raw(self), dwworkqueueid).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFRealTimeClient_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub RegisterThreads: unsafe extern "system" fn(*mut core::ffi::c_void, u32, windows_core::PCWSTR) -> windows_core::HRESULT,
pub UnregisterThreads: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetWorkQueue: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
}
pub trait IMFRealTimeClient_Impl: windows_core::IUnknownImpl {
fn RegisterThreads(&self, dwtaskindex: u32, wszclass: &windows_core::PCWSTR) -> windows_core::Result<()>;
fn UnregisterThreads(&self) -> windows_core::Result<()>;
fn SetWorkQueue(&self, dwworkqueueid: u32) -> windows_core::Result<()>;
}
impl IMFRealTimeClient_Vtbl {
pub const fn new<Identity: IMFRealTimeClient_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn RegisterThreads<Identity: IMFRealTimeClient_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwtaskindex: u32, wszclass: windows_core::PCWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFRealTimeClient_Impl::RegisterThreads(this, core::mem::transmute_copy(&dwtaskindex), core::mem::transmute(&wszclass)).into()
}
}
unsafe extern "system" fn UnregisterThreads<Identity: IMFRealTimeClient_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFRealTimeClient_Impl::UnregisterThreads(this).into()
}
}
unsafe extern "system" fn SetWorkQueue<Identity: IMFRealTimeClient_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwworkqueueid: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFRealTimeClient_Impl::SetWorkQueue(this, core::mem::transmute_copy(&dwworkqueueid)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
RegisterThreads: RegisterThreads::<Identity, OFFSET>,
UnregisterThreads: UnregisterThreads::<Identity, OFFSET>,
SetWorkQueue: SetWorkQueue::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFRealTimeClient as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFRealTimeClient {}
windows_core::imp::define_interface!(IMFRealTimeClientEx, IMFRealTimeClientEx_Vtbl, 0x03910848_ab16_4611_b100_17b88ae2f248);
windows_core::imp::interface_hierarchy!(IMFRealTimeClientEx, windows_core::IUnknown);
impl IMFRealTimeClientEx {
pub unsafe fn RegisterThreadsEx<P1>(&self, pdwtaskindex: *mut u32, wszclassname: P1, lbasepriority: i32) -> windows_core::Result<()>
where
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).RegisterThreadsEx)(windows_core::Interface::as_raw(self), pdwtaskindex as _, wszclassname.param().abi(), lbasepriority).ok() }
}
pub unsafe fn UnregisterThreads(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).UnregisterThreads)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn SetWorkQueueEx(&self, dwmultithreadedworkqueueid: u32, lworkitembasepriority: i32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetWorkQueueEx)(windows_core::Interface::as_raw(self), dwmultithreadedworkqueueid, lworkitembasepriority).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFRealTimeClientEx_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub RegisterThreadsEx: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, windows_core::PCWSTR, i32) -> windows_core::HRESULT,
pub UnregisterThreads: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetWorkQueueEx: unsafe extern "system" fn(*mut core::ffi::c_void, u32, i32) -> windows_core::HRESULT,
}
pub trait IMFRealTimeClientEx_Impl: windows_core::IUnknownImpl {
fn RegisterThreadsEx(&self, pdwtaskindex: *mut u32, wszclassname: &windows_core::PCWSTR, lbasepriority: i32) -> windows_core::Result<()>;
fn UnregisterThreads(&self) -> windows_core::Result<()>;
fn SetWorkQueueEx(&self, dwmultithreadedworkqueueid: u32, lworkitembasepriority: i32) -> windows_core::Result<()>;
}
impl IMFRealTimeClientEx_Vtbl {
pub const fn new<Identity: IMFRealTimeClientEx_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn RegisterThreadsEx<Identity: IMFRealTimeClientEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwtaskindex: *mut u32, wszclassname: windows_core::PCWSTR, lbasepriority: i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFRealTimeClientEx_Impl::RegisterThreadsEx(this, core::mem::transmute_copy(&pdwtaskindex), core::mem::transmute(&wszclassname), core::mem::transmute_copy(&lbasepriority)).into()
}
}
unsafe extern "system" fn UnregisterThreads<Identity: IMFRealTimeClientEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFRealTimeClientEx_Impl::UnregisterThreads(this).into()
}
}
unsafe extern "system" fn SetWorkQueueEx<Identity: IMFRealTimeClientEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwmultithreadedworkqueueid: u32, lworkitembasepriority: i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFRealTimeClientEx_Impl::SetWorkQueueEx(this, core::mem::transmute_copy(&dwmultithreadedworkqueueid), core::mem::transmute_copy(&lworkitembasepriority)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
RegisterThreadsEx: RegisterThreadsEx::<Identity, OFFSET>,
UnregisterThreads: UnregisterThreads::<Identity, OFFSET>,
SetWorkQueueEx: SetWorkQueueEx::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFRealTimeClientEx as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFRealTimeClientEx {}
windows_core::imp::define_interface!(IMFRelativePanelReport, IMFRelativePanelReport_Vtbl, 0xf25362ea_2c0e_447f_81e2_755914cdc0c3);
windows_core::imp::interface_hierarchy!(IMFRelativePanelReport, windows_core::IUnknown);
impl IMFRelativePanelReport {
pub unsafe fn GetRelativePanel(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetRelativePanel)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFRelativePanelReport_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetRelativePanel: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
}
pub trait IMFRelativePanelReport_Impl: windows_core::IUnknownImpl {
fn GetRelativePanel(&self) -> windows_core::Result<u32>;
}
impl IMFRelativePanelReport_Vtbl {
pub const fn new<Identity: IMFRelativePanelReport_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetRelativePanel<Identity: IMFRelativePanelReport_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, panel: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFRelativePanelReport_Impl::GetRelativePanel(this) {
Ok(ok__) => {
panel.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetRelativePanel: GetRelativePanel::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFRelativePanelReport as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFRelativePanelReport {}
windows_core::imp::define_interface!(IMFRelativePanelWatcher, IMFRelativePanelWatcher_Vtbl, 0x421af7f6_573e_4ad0_8fda_2e57cedb18c6);
impl core::ops::Deref for IMFRelativePanelWatcher {
type Target = IMFShutdown;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFRelativePanelWatcher, windows_core::IUnknown, IMFShutdown);
impl IMFRelativePanelWatcher {
pub unsafe fn BeginGetReport<P0, P1>(&self, pcallback: P0, pstate: P1) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncCallback>,
P1: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).BeginGetReport)(windows_core::Interface::as_raw(self), pcallback.param().abi(), pstate.param().abi()).ok() }
}
pub unsafe fn EndGetReport<P0>(&self, presult: P0) -> windows_core::Result<IMFRelativePanelReport>
where
P0: windows_core::Param<IMFAsyncResult>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EndGetReport)(windows_core::Interface::as_raw(self), presult.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetReport(&self) -> windows_core::Result<IMFRelativePanelReport> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetReport)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFRelativePanelWatcher_Vtbl {
pub base__: IMFShutdown_Vtbl,
pub BeginGetReport: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub EndGetReport: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetReport: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFRelativePanelWatcher_Impl: IMFShutdown_Impl {
fn BeginGetReport(&self, pcallback: windows_core::Ref<IMFAsyncCallback>, pstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn EndGetReport(&self, presult: windows_core::Ref<IMFAsyncResult>) -> windows_core::Result<IMFRelativePanelReport>;
fn GetReport(&self) -> windows_core::Result<IMFRelativePanelReport>;
}
impl IMFRelativePanelWatcher_Vtbl {
pub const fn new<Identity: IMFRelativePanelWatcher_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginGetReport<Identity: IMFRelativePanelWatcher_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, pstate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFRelativePanelWatcher_Impl::BeginGetReport(this, core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pstate)).into()
}
}
unsafe extern "system" fn EndGetReport<Identity: IMFRelativePanelWatcher_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, pprelativepanelreport: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFRelativePanelWatcher_Impl::EndGetReport(this, core::mem::transmute_copy(&presult)) {
Ok(ok__) => {
pprelativepanelreport.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetReport<Identity: IMFRelativePanelWatcher_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pprelativepanelreport: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFRelativePanelWatcher_Impl::GetReport(this) {
Ok(ok__) => {
pprelativepanelreport.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IMFShutdown_Vtbl::new::<Identity, OFFSET>(),
BeginGetReport: BeginGetReport::<Identity, OFFSET>,
EndGetReport: EndGetReport::<Identity, OFFSET>,
GetReport: GetReport::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFRelativePanelWatcher as windows_core::Interface>::IID || iid == &<IMFShutdown as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFRelativePanelWatcher {}
windows_core::imp::define_interface!(IMFRemoteAsyncCallback, IMFRemoteAsyncCallback_Vtbl, 0xa27003d0_2354_4f2a_8d6a_ab7cff15437e);
windows_core::imp::interface_hierarchy!(IMFRemoteAsyncCallback, windows_core::IUnknown);
impl IMFRemoteAsyncCallback {
pub unsafe fn Invoke<P1>(&self, hr: windows_core::HRESULT, premoteresult: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).Invoke)(windows_core::Interface::as_raw(self), hr, premoteresult.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFRemoteAsyncCallback_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::HRESULT, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFRemoteAsyncCallback_Impl: windows_core::IUnknownImpl {
fn Invoke(&self, hr: windows_core::HRESULT, premoteresult: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
}
impl IMFRemoteAsyncCallback_Vtbl {
pub const fn new<Identity: IMFRemoteAsyncCallback_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Invoke<Identity: IMFRemoteAsyncCallback_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hr: windows_core::HRESULT, premoteresult: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFRemoteAsyncCallback_Impl::Invoke(this, core::mem::transmute_copy(&hr), core::mem::transmute_copy(&premoteresult)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), Invoke: Invoke::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFRemoteAsyncCallback as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFRemoteAsyncCallback {}
windows_core::imp::define_interface!(IMFRemoteDesktopPlugin, IMFRemoteDesktopPlugin_Vtbl, 0x1cde6309_cae0_4940_907e_c1ec9c3d1d4a);
windows_core::imp::interface_hierarchy!(IMFRemoteDesktopPlugin, windows_core::IUnknown);
impl IMFRemoteDesktopPlugin {
pub unsafe fn UpdateTopology<P0>(&self, ptopology: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFTopology>,
{
unsafe { (windows_core::Interface::vtable(self).UpdateTopology)(windows_core::Interface::as_raw(self), ptopology.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFRemoteDesktopPlugin_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub UpdateTopology: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFRemoteDesktopPlugin_Impl: windows_core::IUnknownImpl {
fn UpdateTopology(&self, ptopology: windows_core::Ref<IMFTopology>) -> windows_core::Result<()>;
}
impl IMFRemoteDesktopPlugin_Vtbl {
pub const fn new<Identity: IMFRemoteDesktopPlugin_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn UpdateTopology<Identity: IMFRemoteDesktopPlugin_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ptopology: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFRemoteDesktopPlugin_Impl::UpdateTopology(this, core::mem::transmute_copy(&ptopology)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), UpdateTopology: UpdateTopology::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFRemoteDesktopPlugin as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFRemoteDesktopPlugin {}
windows_core::imp::define_interface!(IMFRemoteProxy, IMFRemoteProxy_Vtbl, 0x994e23ad_1cc2_493c_b9fa_46f1cb040fa4);
windows_core::imp::interface_hierarchy!(IMFRemoteProxy, windows_core::IUnknown);
impl IMFRemoteProxy {
pub unsafe fn GetRemoteObject(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetRemoteObject)(windows_core::Interface::as_raw(self), riid, ppv as _).ok() }
}
pub unsafe fn GetRemoteHost(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetRemoteHost)(windows_core::Interface::as_raw(self), riid, ppv as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFRemoteProxy_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetRemoteObject: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetRemoteHost: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFRemoteProxy_Impl: windows_core::IUnknownImpl {
fn GetRemoteObject(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
fn GetRemoteHost(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
}
impl IMFRemoteProxy_Vtbl {
pub const fn new<Identity: IMFRemoteProxy_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetRemoteObject<Identity: IMFRemoteProxy_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFRemoteProxy_Impl::GetRemoteObject(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into()
}
}
unsafe extern "system" fn GetRemoteHost<Identity: IMFRemoteProxy_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFRemoteProxy_Impl::GetRemoteHost(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetRemoteObject: GetRemoteObject::<Identity, OFFSET>,
GetRemoteHost: GetRemoteHost::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFRemoteProxy as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFRemoteProxy {}
windows_core::imp::define_interface!(IMFSAMIStyle, IMFSAMIStyle_Vtbl, 0xa7e025dd_5303_4a62_89d6_e747e1efac73);
windows_core::imp::interface_hierarchy!(IMFSAMIStyle, windows_core::IUnknown);
impl IMFSAMIStyle {
pub unsafe fn GetStyleCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStyleCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn GetStyles(&self) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStyles)(windows_core::Interface::as_raw(self), &mut result__).map(|| core::mem::transmute(result__))
}
}
pub unsafe fn SetSelectedStyle<P0>(&self, pwszstyle: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).SetSelectedStyle)(windows_core::Interface::as_raw(self), pwszstyle.param().abi()).ok() }
}
pub unsafe fn GetSelectedStyle(&self) -> windows_core::Result<windows_core::PWSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetSelectedStyle)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSAMIStyle_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetStyleCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub GetStyles: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
GetStyles: usize,
pub SetSelectedStyle: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR) -> windows_core::HRESULT,
pub GetSelectedStyle: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFSAMIStyle_Impl: windows_core::IUnknownImpl {
fn GetStyleCount(&self) -> windows_core::Result<u32>;
fn GetStyles(&self) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT>;
fn SetSelectedStyle(&self, pwszstyle: &windows_core::PCWSTR) -> windows_core::Result<()>;
fn GetSelectedStyle(&self) -> windows_core::Result<windows_core::PWSTR>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFSAMIStyle_Vtbl {
pub const fn new<Identity: IMFSAMIStyle_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetStyleCount<Identity: IMFSAMIStyle_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwcount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSAMIStyle_Impl::GetStyleCount(this) {
Ok(ok__) => {
pdwcount.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetStyles<Identity: IMFSAMIStyle_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppropvarstylearray: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSAMIStyle_Impl::GetStyles(this) {
Ok(ok__) => {
ppropvarstylearray.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetSelectedStyle<Identity: IMFSAMIStyle_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pwszstyle: windows_core::PCWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSAMIStyle_Impl::SetSelectedStyle(this, core::mem::transmute(&pwszstyle)).into()
}
}
unsafe extern "system" fn GetSelectedStyle<Identity: IMFSAMIStyle_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppwszstyle: *mut windows_core::PWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSAMIStyle_Impl::GetSelectedStyle(this) {
Ok(ok__) => {
ppwszstyle.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetStyleCount: GetStyleCount::<Identity, OFFSET>,
GetStyles: GetStyles::<Identity, OFFSET>,
SetSelectedStyle: SetSelectedStyle::<Identity, OFFSET>,
GetSelectedStyle: GetSelectedStyle::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSAMIStyle as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFSAMIStyle {}
windows_core::imp::define_interface!(IMFSSLCertificateManager, IMFSSLCertificateManager_Vtbl, 0x61f7d887_1230_4a8b_aeba_8ad434d1a64d);
windows_core::imp::interface_hierarchy!(IMFSSLCertificateManager, windows_core::IUnknown);
impl IMFSSLCertificateManager {
pub unsafe fn GetClientCertificate<P0>(&self, pszurl: P0, ppbdata: *mut *mut u8, pcbdata: *mut u32) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).GetClientCertificate)(windows_core::Interface::as_raw(self), pszurl.param().abi(), ppbdata as _, pcbdata as _).ok() }
}
pub unsafe fn BeginGetClientCertificate<P0, P1, P2>(&self, pszurl: P0, pcallback: P1, pstate: P2) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<IMFAsyncCallback>,
P2: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).BeginGetClientCertificate)(windows_core::Interface::as_raw(self), pszurl.param().abi(), pcallback.param().abi(), pstate.param().abi()).ok() }
}
pub unsafe fn EndGetClientCertificate<P0>(&self, presult: P0, ppbdata: *mut *mut u8, pcbdata: *mut u32) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncResult>,
{
unsafe { (windows_core::Interface::vtable(self).EndGetClientCertificate)(windows_core::Interface::as_raw(self), presult.param().abi(), ppbdata as _, pcbdata as _).ok() }
}
pub unsafe fn GetCertificatePolicy<P0>(&self, pszurl: P0, pfoverrideautomaticcheck: *mut windows_core::BOOL, pfclientcertificateavailable: *mut windows_core::BOOL) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).GetCertificatePolicy)(windows_core::Interface::as_raw(self), pszurl.param().abi(), pfoverrideautomaticcheck as _, pfclientcertificateavailable as _).ok() }
}
pub unsafe fn OnServerCertificate<P0>(&self, pszurl: P0, pbdata: &[u8]) -> windows_core::Result<windows_core::BOOL>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).OnServerCertificate)(windows_core::Interface::as_raw(self), pszurl.param().abi(), core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSSLCertificateManager_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetClientCertificate: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *mut *mut u8, *mut u32) -> windows_core::HRESULT,
pub BeginGetClientCertificate: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub EndGetClientCertificate: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut u8, *mut u32) -> windows_core::HRESULT,
pub GetCertificatePolicy: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *mut windows_core::BOOL, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub OnServerCertificate: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *const u8, u32, *mut windows_core::BOOL) -> windows_core::HRESULT,
}
pub trait IMFSSLCertificateManager_Impl: windows_core::IUnknownImpl {
fn GetClientCertificate(&self, pszurl: &windows_core::PCWSTR, ppbdata: *mut *mut u8, pcbdata: *mut u32) -> windows_core::Result<()>;
fn BeginGetClientCertificate(&self, pszurl: &windows_core::PCWSTR, pcallback: windows_core::Ref<IMFAsyncCallback>, pstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn EndGetClientCertificate(&self, presult: windows_core::Ref<IMFAsyncResult>, ppbdata: *mut *mut u8, pcbdata: *mut u32) -> windows_core::Result<()>;
fn GetCertificatePolicy(&self, pszurl: &windows_core::PCWSTR, pfoverrideautomaticcheck: *mut windows_core::BOOL, pfclientcertificateavailable: *mut windows_core::BOOL) -> windows_core::Result<()>;
fn OnServerCertificate(&self, pszurl: &windows_core::PCWSTR, pbdata: *const u8, cbdata: u32) -> windows_core::Result<windows_core::BOOL>;
}
impl IMFSSLCertificateManager_Vtbl {
pub const fn new<Identity: IMFSSLCertificateManager_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetClientCertificate<Identity: IMFSSLCertificateManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pszurl: windows_core::PCWSTR, ppbdata: *mut *mut u8, pcbdata: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSSLCertificateManager_Impl::GetClientCertificate(this, core::mem::transmute(&pszurl), core::mem::transmute_copy(&ppbdata), core::mem::transmute_copy(&pcbdata)).into()
}
}
unsafe extern "system" fn BeginGetClientCertificate<Identity: IMFSSLCertificateManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pszurl: windows_core::PCWSTR, pcallback: *mut core::ffi::c_void, pstate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSSLCertificateManager_Impl::BeginGetClientCertificate(this, core::mem::transmute(&pszurl), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pstate)).into()
}
}
unsafe extern "system" fn EndGetClientCertificate<Identity: IMFSSLCertificateManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, ppbdata: *mut *mut u8, pcbdata: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSSLCertificateManager_Impl::EndGetClientCertificate(this, core::mem::transmute_copy(&presult), core::mem::transmute_copy(&ppbdata), core::mem::transmute_copy(&pcbdata)).into()
}
}
unsafe extern "system" fn GetCertificatePolicy<Identity: IMFSSLCertificateManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pszurl: windows_core::PCWSTR, pfoverrideautomaticcheck: *mut windows_core::BOOL, pfclientcertificateavailable: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSSLCertificateManager_Impl::GetCertificatePolicy(this, core::mem::transmute(&pszurl), core::mem::transmute_copy(&pfoverrideautomaticcheck), core::mem::transmute_copy(&pfclientcertificateavailable)).into()
}
}
unsafe extern "system" fn OnServerCertificate<Identity: IMFSSLCertificateManager_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pszurl: windows_core::PCWSTR, pbdata: *const u8, cbdata: u32, pfisgood: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSSLCertificateManager_Impl::OnServerCertificate(this, core::mem::transmute(&pszurl), core::mem::transmute_copy(&pbdata), core::mem::transmute_copy(&cbdata)) {
Ok(ok__) => {
pfisgood.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetClientCertificate: GetClientCertificate::<Identity, OFFSET>,
BeginGetClientCertificate: BeginGetClientCertificate::<Identity, OFFSET>,
EndGetClientCertificate: EndGetClientCertificate::<Identity, OFFSET>,
GetCertificatePolicy: GetCertificatePolicy::<Identity, OFFSET>,
OnServerCertificate: OnServerCertificate::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSSLCertificateManager as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSSLCertificateManager {}
windows_core::imp::define_interface!(IMFSample, IMFSample_Vtbl, 0xc40a00f2_b93a_4d80_ae8c_5a1c634f58e4);
impl core::ops::Deref for IMFSample {
type Target = IMFAttributes;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFSample, windows_core::IUnknown, IMFAttributes);
impl IMFSample {
pub unsafe fn GetSampleFlags(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetSampleFlags)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetSampleFlags(&self, dwsampleflags: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetSampleFlags)(windows_core::Interface::as_raw(self), dwsampleflags).ok() }
}
pub unsafe fn GetSampleTime(&self) -> windows_core::Result<i64> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetSampleTime)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetSampleTime(&self, hnssampletime: i64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetSampleTime)(windows_core::Interface::as_raw(self), hnssampletime).ok() }
}
pub unsafe fn GetSampleDuration(&self) -> windows_core::Result<i64> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetSampleDuration)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetSampleDuration(&self, hnssampleduration: i64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetSampleDuration)(windows_core::Interface::as_raw(self), hnssampleduration).ok() }
}
pub unsafe fn GetBufferCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetBufferCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetBufferByIndex(&self, dwindex: u32) -> windows_core::Result<IMFMediaBuffer> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetBufferByIndex)(windows_core::Interface::as_raw(self), dwindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn ConvertToContiguousBuffer(&self) -> windows_core::Result<IMFMediaBuffer> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).ConvertToContiguousBuffer)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn AddBuffer<P0>(&self, pbuffer: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaBuffer>,
{
unsafe { (windows_core::Interface::vtable(self).AddBuffer)(windows_core::Interface::as_raw(self), pbuffer.param().abi()).ok() }
}
pub unsafe fn RemoveBufferByIndex(&self, dwindex: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RemoveBufferByIndex)(windows_core::Interface::as_raw(self), dwindex).ok() }
}
pub unsafe fn RemoveAllBuffers(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RemoveAllBuffers)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn GetTotalLength(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetTotalLength)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn CopyToBuffer<P0>(&self, pbuffer: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaBuffer>,
{
unsafe { (windows_core::Interface::vtable(self).CopyToBuffer)(windows_core::Interface::as_raw(self), pbuffer.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSample_Vtbl {
pub base__: IMFAttributes_Vtbl,
pub GetSampleFlags: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub SetSampleFlags: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub GetSampleTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub SetSampleTime: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub GetSampleDuration: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub SetSampleDuration: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
pub GetBufferCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetBufferByIndex: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ConvertToContiguousBuffer: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AddBuffer: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RemoveBufferByIndex: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub RemoveAllBuffers: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetTotalLength: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub CopyToBuffer: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFSample_Impl: IMFAttributes_Impl {
fn GetSampleFlags(&self) -> windows_core::Result<u32>;
fn SetSampleFlags(&self, dwsampleflags: u32) -> windows_core::Result<()>;
fn GetSampleTime(&self) -> windows_core::Result<i64>;
fn SetSampleTime(&self, hnssampletime: i64) -> windows_core::Result<()>;
fn GetSampleDuration(&self) -> windows_core::Result<i64>;
fn SetSampleDuration(&self, hnssampleduration: i64) -> windows_core::Result<()>;
fn GetBufferCount(&self) -> windows_core::Result<u32>;
fn GetBufferByIndex(&self, dwindex: u32) -> windows_core::Result<IMFMediaBuffer>;
fn ConvertToContiguousBuffer(&self) -> windows_core::Result<IMFMediaBuffer>;
fn AddBuffer(&self, pbuffer: windows_core::Ref<IMFMediaBuffer>) -> windows_core::Result<()>;
fn RemoveBufferByIndex(&self, dwindex: u32) -> windows_core::Result<()>;
fn RemoveAllBuffers(&self) -> windows_core::Result<()>;
fn GetTotalLength(&self) -> windows_core::Result<u32>;
fn CopyToBuffer(&self, pbuffer: windows_core::Ref<IMFMediaBuffer>) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFSample_Vtbl {
pub const fn new<Identity: IMFSample_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetSampleFlags<Identity: IMFSample_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwsampleflags: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSample_Impl::GetSampleFlags(this) {
Ok(ok__) => {
pdwsampleflags.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetSampleFlags<Identity: IMFSample_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwsampleflags: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSample_Impl::SetSampleFlags(this, core::mem::transmute_copy(&dwsampleflags)).into()
}
}
unsafe extern "system" fn GetSampleTime<Identity: IMFSample_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, phnssampletime: *mut i64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSample_Impl::GetSampleTime(this) {
Ok(ok__) => {
phnssampletime.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetSampleTime<Identity: IMFSample_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hnssampletime: i64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSample_Impl::SetSampleTime(this, core::mem::transmute_copy(&hnssampletime)).into()
}
}
unsafe extern "system" fn GetSampleDuration<Identity: IMFSample_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, phnssampleduration: *mut i64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSample_Impl::GetSampleDuration(this) {
Ok(ok__) => {
phnssampleduration.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetSampleDuration<Identity: IMFSample_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hnssampleduration: i64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSample_Impl::SetSampleDuration(this, core::mem::transmute_copy(&hnssampleduration)).into()
}
}
unsafe extern "system" fn GetBufferCount<Identity: IMFSample_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwbuffercount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSample_Impl::GetBufferCount(this) {
Ok(ok__) => {
pdwbuffercount.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetBufferByIndex<Identity: IMFSample_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwindex: u32, ppbuffer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSample_Impl::GetBufferByIndex(this, core::mem::transmute_copy(&dwindex)) {
Ok(ok__) => {
ppbuffer.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn ConvertToContiguousBuffer<Identity: IMFSample_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppbuffer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSample_Impl::ConvertToContiguousBuffer(this) {
Ok(ok__) => {
ppbuffer.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn AddBuffer<Identity: IMFSample_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbuffer: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSample_Impl::AddBuffer(this, core::mem::transmute_copy(&pbuffer)).into()
}
}
unsafe extern "system" fn RemoveBufferByIndex<Identity: IMFSample_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwindex: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSample_Impl::RemoveBufferByIndex(this, core::mem::transmute_copy(&dwindex)).into()
}
}
unsafe extern "system" fn RemoveAllBuffers<Identity: IMFSample_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSample_Impl::RemoveAllBuffers(this).into()
}
}
unsafe extern "system" fn GetTotalLength<Identity: IMFSample_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcbtotallength: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSample_Impl::GetTotalLength(this) {
Ok(ok__) => {
pcbtotallength.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn CopyToBuffer<Identity: IMFSample_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbuffer: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSample_Impl::CopyToBuffer(this, core::mem::transmute_copy(&pbuffer)).into()
}
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, OFFSET>(),
GetSampleFlags: GetSampleFlags::<Identity, OFFSET>,
SetSampleFlags: SetSampleFlags::<Identity, OFFSET>,
GetSampleTime: GetSampleTime::<Identity, OFFSET>,
SetSampleTime: SetSampleTime::<Identity, OFFSET>,
GetSampleDuration: GetSampleDuration::<Identity, OFFSET>,
SetSampleDuration: SetSampleDuration::<Identity, OFFSET>,
GetBufferCount: GetBufferCount::<Identity, OFFSET>,
GetBufferByIndex: GetBufferByIndex::<Identity, OFFSET>,
ConvertToContiguousBuffer: ConvertToContiguousBuffer::<Identity, OFFSET>,
AddBuffer: AddBuffer::<Identity, OFFSET>,
RemoveBufferByIndex: RemoveBufferByIndex::<Identity, OFFSET>,
RemoveAllBuffers: RemoveAllBuffers::<Identity, OFFSET>,
GetTotalLength: GetTotalLength::<Identity, OFFSET>,
CopyToBuffer: CopyToBuffer::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSample as windows_core::Interface>::IID || iid == &<IMFAttributes as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFSample {}
windows_core::imp::define_interface!(IMFSampleAllocatorControl, IMFSampleAllocatorControl_Vtbl, 0xda62b958_3a38_4a97_bd27_149c640c0771);
windows_core::imp::interface_hierarchy!(IMFSampleAllocatorControl, windows_core::IUnknown);
impl IMFSampleAllocatorControl {
pub unsafe fn SetDefaultAllocator<P1>(&self, dwoutputstreamid: u32, pallocator: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).SetDefaultAllocator)(windows_core::Interface::as_raw(self), dwoutputstreamid, pallocator.param().abi()).ok() }
}
pub unsafe fn GetAllocatorUsage(&self, dwoutputstreamid: u32, pdwinputstreamid: *mut u32, peusage: *mut MFSampleAllocatorUsage) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetAllocatorUsage)(windows_core::Interface::as_raw(self), dwoutputstreamid, pdwinputstreamid as _, peusage as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSampleAllocatorControl_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetDefaultAllocator: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetAllocatorUsage: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u32, *mut MFSampleAllocatorUsage) -> windows_core::HRESULT,
}
pub trait IMFSampleAllocatorControl_Impl: windows_core::IUnknownImpl {
fn SetDefaultAllocator(&self, dwoutputstreamid: u32, pallocator: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn GetAllocatorUsage(&self, dwoutputstreamid: u32, pdwinputstreamid: *mut u32, peusage: *mut MFSampleAllocatorUsage) -> windows_core::Result<()>;
}
impl IMFSampleAllocatorControl_Vtbl {
pub const fn new<Identity: IMFSampleAllocatorControl_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetDefaultAllocator<Identity: IMFSampleAllocatorControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwoutputstreamid: u32, pallocator: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSampleAllocatorControl_Impl::SetDefaultAllocator(this, core::mem::transmute_copy(&dwoutputstreamid), core::mem::transmute_copy(&pallocator)).into()
}
}
unsafe extern "system" fn GetAllocatorUsage<Identity: IMFSampleAllocatorControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwoutputstreamid: u32, pdwinputstreamid: *mut u32, peusage: *mut MFSampleAllocatorUsage) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSampleAllocatorControl_Impl::GetAllocatorUsage(this, core::mem::transmute_copy(&dwoutputstreamid), core::mem::transmute_copy(&pdwinputstreamid), core::mem::transmute_copy(&peusage)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetDefaultAllocator: SetDefaultAllocator::<Identity, OFFSET>,
GetAllocatorUsage: GetAllocatorUsage::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSampleAllocatorControl as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSampleAllocatorControl {}
windows_core::imp::define_interface!(IMFSampleGrabberSinkCallback, IMFSampleGrabberSinkCallback_Vtbl, 0x8c7b80bf_ee42_4b59_b1df_55668e1bdca8);
impl core::ops::Deref for IMFSampleGrabberSinkCallback {
type Target = IMFClockStateSink;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFSampleGrabberSinkCallback, windows_core::IUnknown, IMFClockStateSink);
impl IMFSampleGrabberSinkCallback {
pub unsafe fn OnSetPresentationClock<P0>(&self, ppresentationclock: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFPresentationClock>,
{
unsafe { (windows_core::Interface::vtable(self).OnSetPresentationClock)(windows_core::Interface::as_raw(self), ppresentationclock.param().abi()).ok() }
}
pub unsafe fn OnProcessSample(&self, guidmajormediatype: *const windows_core::GUID, dwsampleflags: u32, llsampletime: i64, llsampleduration: i64, psamplebuffer: &[u8]) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).OnProcessSample)(windows_core::Interface::as_raw(self), guidmajormediatype, dwsampleflags, llsampletime, llsampleduration, core::mem::transmute(psamplebuffer.as_ptr()), psamplebuffer.len().try_into().unwrap()).ok() }
}
pub unsafe fn OnShutdown(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).OnShutdown)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSampleGrabberSinkCallback_Vtbl {
pub base__: IMFClockStateSink_Vtbl,
pub OnSetPresentationClock: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub OnProcessSample: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, u32, i64, i64, *const u8, u32) -> windows_core::HRESULT,
pub OnShutdown: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFSampleGrabberSinkCallback_Impl: IMFClockStateSink_Impl {
fn OnSetPresentationClock(&self, ppresentationclock: windows_core::Ref<IMFPresentationClock>) -> windows_core::Result<()>;
fn OnProcessSample(&self, guidmajormediatype: *const windows_core::GUID, dwsampleflags: u32, llsampletime: i64, llsampleduration: i64, psamplebuffer: *const u8, dwsamplesize: u32) -> windows_core::Result<()>;
fn OnShutdown(&self) -> windows_core::Result<()>;
}
impl IMFSampleGrabberSinkCallback_Vtbl {
pub const fn new<Identity: IMFSampleGrabberSinkCallback_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn OnSetPresentationClock<Identity: IMFSampleGrabberSinkCallback_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppresentationclock: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSampleGrabberSinkCallback_Impl::OnSetPresentationClock(this, core::mem::transmute_copy(&ppresentationclock)).into()
}
}
unsafe extern "system" fn OnProcessSample<Identity: IMFSampleGrabberSinkCallback_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidmajormediatype: *const windows_core::GUID, dwsampleflags: u32, llsampletime: i64, llsampleduration: i64, psamplebuffer: *const u8, dwsamplesize: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSampleGrabberSinkCallback_Impl::OnProcessSample(this, core::mem::transmute_copy(&guidmajormediatype), core::mem::transmute_copy(&dwsampleflags), core::mem::transmute_copy(&llsampletime), core::mem::transmute_copy(&llsampleduration), core::mem::transmute_copy(&psamplebuffer), core::mem::transmute_copy(&dwsamplesize)).into()
}
}
unsafe extern "system" fn OnShutdown<Identity: IMFSampleGrabberSinkCallback_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSampleGrabberSinkCallback_Impl::OnShutdown(this).into()
}
}
Self {
base__: IMFClockStateSink_Vtbl::new::<Identity, OFFSET>(),
OnSetPresentationClock: OnSetPresentationClock::<Identity, OFFSET>,
OnProcessSample: OnProcessSample::<Identity, OFFSET>,
OnShutdown: OnShutdown::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSampleGrabberSinkCallback as windows_core::Interface>::IID || iid == &<IMFClockStateSink as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSampleGrabberSinkCallback {}
windows_core::imp::define_interface!(IMFSampleGrabberSinkCallback2, IMFSampleGrabberSinkCallback2_Vtbl, 0xca86aa50_c46e_429e_ab27_16d6ac6844cb);
impl core::ops::Deref for IMFSampleGrabberSinkCallback2 {
type Target = IMFSampleGrabberSinkCallback;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFSampleGrabberSinkCallback2, windows_core::IUnknown, IMFClockStateSink, IMFSampleGrabberSinkCallback);
impl IMFSampleGrabberSinkCallback2 {
pub unsafe fn OnProcessSampleEx<P6>(&self, guidmajormediatype: *const windows_core::GUID, dwsampleflags: u32, llsampletime: i64, llsampleduration: i64, psamplebuffer: &[u8], pattributes: P6) -> windows_core::Result<()>
where
P6: windows_core::Param<IMFAttributes>,
{
unsafe { (windows_core::Interface::vtable(self).OnProcessSampleEx)(windows_core::Interface::as_raw(self), guidmajormediatype, dwsampleflags, llsampletime, llsampleduration, core::mem::transmute(psamplebuffer.as_ptr()), psamplebuffer.len().try_into().unwrap(), pattributes.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSampleGrabberSinkCallback2_Vtbl {
pub base__: IMFSampleGrabberSinkCallback_Vtbl,
pub OnProcessSampleEx: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, u32, i64, i64, *const u8, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFSampleGrabberSinkCallback2_Impl: IMFSampleGrabberSinkCallback_Impl {
fn OnProcessSampleEx(&self, guidmajormediatype: *const windows_core::GUID, dwsampleflags: u32, llsampletime: i64, llsampleduration: i64, psamplebuffer: *const u8, dwsamplesize: u32, pattributes: windows_core::Ref<IMFAttributes>) -> windows_core::Result<()>;
}
impl IMFSampleGrabberSinkCallback2_Vtbl {
pub const fn new<Identity: IMFSampleGrabberSinkCallback2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn OnProcessSampleEx<Identity: IMFSampleGrabberSinkCallback2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidmajormediatype: *const windows_core::GUID, dwsampleflags: u32, llsampletime: i64, llsampleduration: i64, psamplebuffer: *const u8, dwsamplesize: u32, pattributes: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSampleGrabberSinkCallback2_Impl::OnProcessSampleEx(this, core::mem::transmute_copy(&guidmajormediatype), core::mem::transmute_copy(&dwsampleflags), core::mem::transmute_copy(&llsampletime), core::mem::transmute_copy(&llsampleduration), core::mem::transmute_copy(&psamplebuffer), core::mem::transmute_copy(&dwsamplesize), core::mem::transmute_copy(&pattributes)).into()
}
}
Self { base__: IMFSampleGrabberSinkCallback_Vtbl::new::<Identity, OFFSET>(), OnProcessSampleEx: OnProcessSampleEx::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSampleGrabberSinkCallback2 as windows_core::Interface>::IID || iid == &<IMFClockStateSink as windows_core::Interface>::IID || iid == &<IMFSampleGrabberSinkCallback as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSampleGrabberSinkCallback2 {}
windows_core::imp::define_interface!(IMFSampleOutputStream, IMFSampleOutputStream_Vtbl, 0x8feed468_6f7e_440d_869a_49bdd283ad0d);
windows_core::imp::interface_hierarchy!(IMFSampleOutputStream, windows_core::IUnknown);
impl IMFSampleOutputStream {
pub unsafe fn BeginWriteSample<P0, P1, P2>(&self, psample: P0, pcallback: P1, punkstate: P2) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFSample>,
P1: windows_core::Param<IMFAsyncCallback>,
P2: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).BeginWriteSample)(windows_core::Interface::as_raw(self), psample.param().abi(), pcallback.param().abi(), punkstate.param().abi()).ok() }
}
pub unsafe fn EndWriteSample<P0>(&self, presult: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncResult>,
{
unsafe { (windows_core::Interface::vtable(self).EndWriteSample)(windows_core::Interface::as_raw(self), presult.param().abi()).ok() }
}
pub unsafe fn Close(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSampleOutputStream_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub BeginWriteSample: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub EndWriteSample: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Close: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFSampleOutputStream_Impl: windows_core::IUnknownImpl {
fn BeginWriteSample(&self, psample: windows_core::Ref<IMFSample>, pcallback: windows_core::Ref<IMFAsyncCallback>, punkstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn EndWriteSample(&self, presult: windows_core::Ref<IMFAsyncResult>) -> windows_core::Result<()>;
fn Close(&self) -> windows_core::Result<()>;
}
impl IMFSampleOutputStream_Vtbl {
pub const fn new<Identity: IMFSampleOutputStream_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginWriteSample<Identity: IMFSampleOutputStream_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, psample: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSampleOutputStream_Impl::BeginWriteSample(this, core::mem::transmute_copy(&psample), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into()
}
}
unsafe extern "system" fn EndWriteSample<Identity: IMFSampleOutputStream_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSampleOutputStream_Impl::EndWriteSample(this, core::mem::transmute_copy(&presult)).into()
}
}
unsafe extern "system" fn Close<Identity: IMFSampleOutputStream_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSampleOutputStream_Impl::Close(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginWriteSample: BeginWriteSample::<Identity, OFFSET>,
EndWriteSample: EndWriteSample::<Identity, OFFSET>,
Close: Close::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSampleOutputStream as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSampleOutputStream {}
windows_core::imp::define_interface!(IMFSampleProtection, IMFSampleProtection_Vtbl, 0x8e36395f_c7b9_43c4_a54d_512b4af63c95);
windows_core::imp::interface_hierarchy!(IMFSampleProtection, windows_core::IUnknown);
impl IMFSampleProtection {
pub unsafe fn GetInputProtectionVersion(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetInputProtectionVersion)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetOutputProtectionVersion(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOutputProtectionVersion)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetProtectionCertificate(&self, dwversion: u32, ppcert: *mut *mut u8, pcbcert: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetProtectionCertificate)(windows_core::Interface::as_raw(self), dwversion, ppcert as _, pcbcert as _).ok() }
}
pub unsafe fn InitOutputProtection(&self, dwversion: u32, dwoutputid: u32, pbcert: *const u8, cbcert: u32, ppbseed: *mut *mut u8, pcbseed: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).InitOutputProtection)(windows_core::Interface::as_raw(self), dwversion, dwoutputid, pbcert, cbcert, ppbseed as _, pcbseed as _).ok() }
}
pub unsafe fn InitInputProtection(&self, dwversion: u32, dwinputid: u32, pbseed: *const u8, cbseed: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).InitInputProtection)(windows_core::Interface::as_raw(self), dwversion, dwinputid, pbseed, cbseed).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSampleProtection_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetInputProtectionVersion: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetOutputProtectionVersion: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetProtectionCertificate: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut u8, *mut u32) -> windows_core::HRESULT,
pub InitOutputProtection: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, *const u8, u32, *mut *mut u8, *mut u32) -> windows_core::HRESULT,
pub InitInputProtection: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, *const u8, u32) -> windows_core::HRESULT,
}
pub trait IMFSampleProtection_Impl: windows_core::IUnknownImpl {
fn GetInputProtectionVersion(&self) -> windows_core::Result<u32>;
fn GetOutputProtectionVersion(&self) -> windows_core::Result<u32>;
fn GetProtectionCertificate(&self, dwversion: u32, ppcert: *mut *mut u8, pcbcert: *mut u32) -> windows_core::Result<()>;
fn InitOutputProtection(&self, dwversion: u32, dwoutputid: u32, pbcert: *const u8, cbcert: u32, ppbseed: *mut *mut u8, pcbseed: *mut u32) -> windows_core::Result<()>;
fn InitInputProtection(&self, dwversion: u32, dwinputid: u32, pbseed: *const u8, cbseed: u32) -> windows_core::Result<()>;
}
impl IMFSampleProtection_Vtbl {
pub const fn new<Identity: IMFSampleProtection_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetInputProtectionVersion<Identity: IMFSampleProtection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwversion: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSampleProtection_Impl::GetInputProtectionVersion(this) {
Ok(ok__) => {
pdwversion.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetOutputProtectionVersion<Identity: IMFSampleProtection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwversion: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSampleProtection_Impl::GetOutputProtectionVersion(this) {
Ok(ok__) => {
pdwversion.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetProtectionCertificate<Identity: IMFSampleProtection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwversion: u32, ppcert: *mut *mut u8, pcbcert: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSampleProtection_Impl::GetProtectionCertificate(this, core::mem::transmute_copy(&dwversion), core::mem::transmute_copy(&ppcert), core::mem::transmute_copy(&pcbcert)).into()
}
}
unsafe extern "system" fn InitOutputProtection<Identity: IMFSampleProtection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwversion: u32, dwoutputid: u32, pbcert: *const u8, cbcert: u32, ppbseed: *mut *mut u8, pcbseed: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSampleProtection_Impl::InitOutputProtection(this, core::mem::transmute_copy(&dwversion), core::mem::transmute_copy(&dwoutputid), core::mem::transmute_copy(&pbcert), core::mem::transmute_copy(&cbcert), core::mem::transmute_copy(&ppbseed), core::mem::transmute_copy(&pcbseed)).into()
}
}
unsafe extern "system" fn InitInputProtection<Identity: IMFSampleProtection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwversion: u32, dwinputid: u32, pbseed: *const u8, cbseed: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSampleProtection_Impl::InitInputProtection(this, core::mem::transmute_copy(&dwversion), core::mem::transmute_copy(&dwinputid), core::mem::transmute_copy(&pbseed), core::mem::transmute_copy(&cbseed)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetInputProtectionVersion: GetInputProtectionVersion::<Identity, OFFSET>,
GetOutputProtectionVersion: GetOutputProtectionVersion::<Identity, OFFSET>,
GetProtectionCertificate: GetProtectionCertificate::<Identity, OFFSET>,
InitOutputProtection: InitOutputProtection::<Identity, OFFSET>,
InitInputProtection: InitInputProtection::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSampleProtection as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSampleProtection {}
windows_core::imp::define_interface!(IMFSaveJob, IMFSaveJob_Vtbl, 0xe9931663_80bf_4c6e_98af_5dcf58747d1f);
windows_core::imp::interface_hierarchy!(IMFSaveJob, windows_core::IUnknown);
impl IMFSaveJob {
pub unsafe fn BeginSave<P0, P1, P2>(&self, pstream: P0, pcallback: P1, pstate: P2) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFByteStream>,
P1: windows_core::Param<IMFAsyncCallback>,
P2: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).BeginSave)(windows_core::Interface::as_raw(self), pstream.param().abi(), pcallback.param().abi(), pstate.param().abi()).ok() }
}
pub unsafe fn EndSave<P0>(&self, presult: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncResult>,
{
unsafe { (windows_core::Interface::vtable(self).EndSave)(windows_core::Interface::as_raw(self), presult.param().abi()).ok() }
}
pub unsafe fn CancelSave(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).CancelSave)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn GetProgress(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetProgress)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSaveJob_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub BeginSave: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub EndSave: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CancelSave: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetProgress: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
}
pub trait IMFSaveJob_Impl: windows_core::IUnknownImpl {
fn BeginSave(&self, pstream: windows_core::Ref<IMFByteStream>, pcallback: windows_core::Ref<IMFAsyncCallback>, pstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn EndSave(&self, presult: windows_core::Ref<IMFAsyncResult>) -> windows_core::Result<()>;
fn CancelSave(&self) -> windows_core::Result<()>;
fn GetProgress(&self) -> windows_core::Result<u32>;
}
impl IMFSaveJob_Vtbl {
pub const fn new<Identity: IMFSaveJob_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginSave<Identity: IMFSaveJob_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, pstate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSaveJob_Impl::BeginSave(this, core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pstate)).into()
}
}
unsafe extern "system" fn EndSave<Identity: IMFSaveJob_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSaveJob_Impl::EndSave(this, core::mem::transmute_copy(&presult)).into()
}
}
unsafe extern "system" fn CancelSave<Identity: IMFSaveJob_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSaveJob_Impl::CancelSave(this).into()
}
}
unsafe extern "system" fn GetProgress<Identity: IMFSaveJob_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwpercentcomplete: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSaveJob_Impl::GetProgress(this) {
Ok(ok__) => {
pdwpercentcomplete.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginSave: BeginSave::<Identity, OFFSET>,
EndSave: EndSave::<Identity, OFFSET>,
CancelSave: CancelSave::<Identity, OFFSET>,
GetProgress: GetProgress::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSaveJob as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSaveJob {}
windows_core::imp::define_interface!(IMFSchemeHandler, IMFSchemeHandler_Vtbl, 0x6d4c7b74_52a0_4bb7_b0db_55f29f47a668);
windows_core::imp::interface_hierarchy!(IMFSchemeHandler, windows_core::IUnknown);
impl IMFSchemeHandler {
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn BeginCreateObject<P0, P2, P4, P5>(&self, pwszurl: P0, dwflags: u32, pprops: P2, ppiunknowncancelcookie: Option<*mut Option<windows_core::IUnknown>>, pcallback: P4, punkstate: P5) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P2: windows_core::Param<super::super::UI::Shell::PropertiesSystem::IPropertyStore>,
P4: windows_core::Param<IMFAsyncCallback>,
P5: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).BeginCreateObject)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), dwflags, pprops.param().abi(), ppiunknowncancelcookie.unwrap_or(core::mem::zeroed()) as _, pcallback.param().abi(), punkstate.param().abi()).ok() }
}
pub unsafe fn EndCreateObject<P0>(&self, presult: P0, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut Option<windows_core::IUnknown>) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncResult>,
{
unsafe { (windows_core::Interface::vtable(self).EndCreateObject)(windows_core::Interface::as_raw(self), presult.param().abi(), pobjecttype as _, core::mem::transmute(ppobject)).ok() }
}
pub unsafe fn CancelObjectCreation<P0>(&self, piunknowncancelcookie: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).CancelObjectCreation)(windows_core::Interface::as_raw(self), piunknowncancelcookie.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSchemeHandler_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub BeginCreateObject: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, u32, *mut core::ffi::c_void, *mut *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))]
BeginCreateObject: usize,
pub EndCreateObject: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut MF_OBJECT_TYPE, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CancelObjectCreation: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub trait IMFSchemeHandler_Impl: windows_core::IUnknownImpl {
fn BeginCreateObject(&self, pwszurl: &windows_core::PCWSTR, dwflags: u32, pprops: windows_core::Ref<super::super::UI::Shell::PropertiesSystem::IPropertyStore>, ppiunknowncancelcookie: windows_core::OutRef<windows_core::IUnknown>, pcallback: windows_core::Ref<IMFAsyncCallback>, punkstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn EndCreateObject(&self, presult: windows_core::Ref<IMFAsyncResult>, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: windows_core::OutRef<windows_core::IUnknown>) -> windows_core::Result<()>;
fn CancelObjectCreation(&self, piunknowncancelcookie: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl IMFSchemeHandler_Vtbl {
pub const fn new<Identity: IMFSchemeHandler_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginCreateObject<Identity: IMFSchemeHandler_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pwszurl: windows_core::PCWSTR, dwflags: u32, pprops: *mut core::ffi::c_void, ppiunknowncancelcookie: *mut *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSchemeHandler_Impl::BeginCreateObject(this, core::mem::transmute(&pwszurl), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pprops), core::mem::transmute_copy(&ppiunknowncancelcookie), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into()
}
}
unsafe extern "system" fn EndCreateObject<Identity: IMFSchemeHandler_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSchemeHandler_Impl::EndCreateObject(this, core::mem::transmute_copy(&presult), core::mem::transmute_copy(&pobjecttype), core::mem::transmute_copy(&ppobject)).into()
}
}
unsafe extern "system" fn CancelObjectCreation<Identity: IMFSchemeHandler_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, piunknowncancelcookie: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSchemeHandler_Impl::CancelObjectCreation(this, core::mem::transmute_copy(&piunknowncancelcookie)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginCreateObject: BeginCreateObject::<Identity, OFFSET>,
EndCreateObject: EndCreateObject::<Identity, OFFSET>,
CancelObjectCreation: CancelObjectCreation::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSchemeHandler as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl windows_core::RuntimeName for IMFSchemeHandler {}
windows_core::imp::define_interface!(IMFSecureBuffer, IMFSecureBuffer_Vtbl, 0xc1209904_e584_4752_a2d6_7f21693f8b21);
windows_core::imp::interface_hierarchy!(IMFSecureBuffer, windows_core::IUnknown);
impl IMFSecureBuffer {
pub unsafe fn GetIdentifier(&self) -> windows_core::Result<windows_core::GUID> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetIdentifier)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSecureBuffer_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetIdentifier: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT,
}
pub trait IMFSecureBuffer_Impl: windows_core::IUnknownImpl {
fn GetIdentifier(&self) -> windows_core::Result<windows_core::GUID>;
}
impl IMFSecureBuffer_Vtbl {
pub const fn new<Identity: IMFSecureBuffer_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetIdentifier<Identity: IMFSecureBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pguididentifier: *mut windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSecureBuffer_Impl::GetIdentifier(this) {
Ok(ok__) => {
pguididentifier.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetIdentifier: GetIdentifier::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSecureBuffer as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSecureBuffer {}
windows_core::imp::define_interface!(IMFSecureChannel, IMFSecureChannel_Vtbl, 0xd0ae555d_3b12_4d97_b060_0990bc5aeb67);
windows_core::imp::interface_hierarchy!(IMFSecureChannel, windows_core::IUnknown);
impl IMFSecureChannel {
pub unsafe fn GetCertificate(&self, ppcert: *mut *mut u8, pcbcert: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetCertificate)(windows_core::Interface::as_raw(self), ppcert as _, pcbcert as _).ok() }
}
pub unsafe fn SetupSession(&self, pbencryptedsessionkey: &[u8]) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetupSession)(windows_core::Interface::as_raw(self), core::mem::transmute(pbencryptedsessionkey.as_ptr()), pbencryptedsessionkey.len().try_into().unwrap()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSecureChannel_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetCertificate: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut u8, *mut u32) -> windows_core::HRESULT,
pub SetupSession: unsafe extern "system" fn(*mut core::ffi::c_void, *const u8, u32) -> windows_core::HRESULT,
}
pub trait IMFSecureChannel_Impl: windows_core::IUnknownImpl {
fn GetCertificate(&self, ppcert: *mut *mut u8, pcbcert: *mut u32) -> windows_core::Result<()>;
fn SetupSession(&self, pbencryptedsessionkey: *const u8, cbsessionkey: u32) -> windows_core::Result<()>;
}
impl IMFSecureChannel_Vtbl {
pub const fn new<Identity: IMFSecureChannel_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetCertificate<Identity: IMFSecureChannel_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppcert: *mut *mut u8, pcbcert: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSecureChannel_Impl::GetCertificate(this, core::mem::transmute_copy(&ppcert), core::mem::transmute_copy(&pcbcert)).into()
}
}
unsafe extern "system" fn SetupSession<Identity: IMFSecureChannel_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbencryptedsessionkey: *const u8, cbsessionkey: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSecureChannel_Impl::SetupSession(this, core::mem::transmute_copy(&pbencryptedsessionkey), core::mem::transmute_copy(&cbsessionkey)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetCertificate: GetCertificate::<Identity, OFFSET>,
SetupSession: SetupSession::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSecureChannel as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSecureChannel {}
windows_core::imp::define_interface!(IMFSeekInfo, IMFSeekInfo_Vtbl, 0x26afea53_d9ed_42b5_ab80_e64f9ee34779);
windows_core::imp::interface_hierarchy!(IMFSeekInfo, windows_core::IUnknown);
impl IMFSeekInfo {
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn GetNearestKeyFrames(&self, pguidtimeformat: *const windows_core::GUID, pvarstartposition: *const super::super::System::Com::StructuredStorage::PROPVARIANT, pvarpreviouskeyframe: *mut super::super::System::Com::StructuredStorage::PROPVARIANT, pvarnextkeyframe: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetNearestKeyFrames)(windows_core::Interface::as_raw(self), pguidtimeformat, core::mem::transmute(pvarstartposition), core::mem::transmute(pvarpreviouskeyframe), core::mem::transmute(pvarnextkeyframe)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSeekInfo_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub GetNearestKeyFrames: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const super::super::System::Com::StructuredStorage::PROPVARIANT, *mut super::super::System::Com::StructuredStorage::PROPVARIANT, *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
GetNearestKeyFrames: usize,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFSeekInfo_Impl: windows_core::IUnknownImpl {
fn GetNearestKeyFrames(&self, pguidtimeformat: *const windows_core::GUID, pvarstartposition: *const super::super::System::Com::StructuredStorage::PROPVARIANT, pvarpreviouskeyframe: *mut super::super::System::Com::StructuredStorage::PROPVARIANT, pvarnextkeyframe: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFSeekInfo_Vtbl {
pub const fn new<Identity: IMFSeekInfo_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetNearestKeyFrames<Identity: IMFSeekInfo_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pguidtimeformat: *const windows_core::GUID, pvarstartposition: *const super::super::System::Com::StructuredStorage::PROPVARIANT, pvarpreviouskeyframe: *mut super::super::System::Com::StructuredStorage::PROPVARIANT, pvarnextkeyframe: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSeekInfo_Impl::GetNearestKeyFrames(this, core::mem::transmute_copy(&pguidtimeformat), core::mem::transmute_copy(&pvarstartposition), core::mem::transmute_copy(&pvarpreviouskeyframe), core::mem::transmute_copy(&pvarnextkeyframe)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetNearestKeyFrames: GetNearestKeyFrames::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSeekInfo as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFSeekInfo {}
windows_core::imp::define_interface!(IMFSensorActivitiesReport, IMFSensorActivitiesReport_Vtbl, 0x683f7a5e_4a19_43cd_b1a9_dbf4ab3f7777);
windows_core::imp::interface_hierarchy!(IMFSensorActivitiesReport, windows_core::IUnknown);
impl IMFSensorActivitiesReport {
pub unsafe fn GetCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetActivityReport(&self, index: u32) -> windows_core::Result<IMFSensorActivityReport> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetActivityReport)(windows_core::Interface::as_raw(self), index, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetActivityReportByDeviceName<P0>(&self, symbolicname: P0) -> windows_core::Result<IMFSensorActivityReport>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetActivityReportByDeviceName)(windows_core::Interface::as_raw(self), symbolicname.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSensorActivitiesReport_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetActivityReport: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetActivityReportByDeviceName: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFSensorActivitiesReport_Impl: windows_core::IUnknownImpl {
fn GetCount(&self) -> windows_core::Result<u32>;
fn GetActivityReport(&self, index: u32) -> windows_core::Result<IMFSensorActivityReport>;
fn GetActivityReportByDeviceName(&self, symbolicname: &windows_core::PCWSTR) -> windows_core::Result<IMFSensorActivityReport>;
}
impl IMFSensorActivitiesReport_Vtbl {
pub const fn new<Identity: IMFSensorActivitiesReport_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetCount<Identity: IMFSensorActivitiesReport_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pccount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorActivitiesReport_Impl::GetCount(this) {
Ok(ok__) => {
pccount.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetActivityReport<Identity: IMFSensorActivitiesReport_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, index: u32, sensoractivityreport: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorActivitiesReport_Impl::GetActivityReport(this, core::mem::transmute_copy(&index)) {
Ok(ok__) => {
sensoractivityreport.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetActivityReportByDeviceName<Identity: IMFSensorActivitiesReport_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, symbolicname: windows_core::PCWSTR, sensoractivityreport: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorActivitiesReport_Impl::GetActivityReportByDeviceName(this, core::mem::transmute(&symbolicname)) {
Ok(ok__) => {
sensoractivityreport.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetCount: GetCount::<Identity, OFFSET>,
GetActivityReport: GetActivityReport::<Identity, OFFSET>,
GetActivityReportByDeviceName: GetActivityReportByDeviceName::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSensorActivitiesReport as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSensorActivitiesReport {}
windows_core::imp::define_interface!(IMFSensorActivitiesReportCallback, IMFSensorActivitiesReportCallback_Vtbl, 0xde5072ee_dbe3_46dc_8a87_b6f631194751);
windows_core::imp::interface_hierarchy!(IMFSensorActivitiesReportCallback, windows_core::IUnknown);
impl IMFSensorActivitiesReportCallback {
pub unsafe fn OnActivitiesReport<P0>(&self, sensoractivitiesreport: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFSensorActivitiesReport>,
{
unsafe { (windows_core::Interface::vtable(self).OnActivitiesReport)(windows_core::Interface::as_raw(self), sensoractivitiesreport.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSensorActivitiesReportCallback_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub OnActivitiesReport: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFSensorActivitiesReportCallback_Impl: windows_core::IUnknownImpl {
fn OnActivitiesReport(&self, sensoractivitiesreport: windows_core::Ref<IMFSensorActivitiesReport>) -> windows_core::Result<()>;
}
impl IMFSensorActivitiesReportCallback_Vtbl {
pub const fn new<Identity: IMFSensorActivitiesReportCallback_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn OnActivitiesReport<Identity: IMFSensorActivitiesReportCallback_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, sensoractivitiesreport: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSensorActivitiesReportCallback_Impl::OnActivitiesReport(this, core::mem::transmute_copy(&sensoractivitiesreport)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), OnActivitiesReport: OnActivitiesReport::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSensorActivitiesReportCallback as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSensorActivitiesReportCallback {}
windows_core::imp::define_interface!(IMFSensorActivityMonitor, IMFSensorActivityMonitor_Vtbl, 0xd0cef145_b3f4_4340_a2e5_7a5080ca05cb);
windows_core::imp::interface_hierarchy!(IMFSensorActivityMonitor, windows_core::IUnknown);
impl IMFSensorActivityMonitor {
pub unsafe fn Start(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Start)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn Stop(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSensorActivityMonitor_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub Start: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Stop: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFSensorActivityMonitor_Impl: windows_core::IUnknownImpl {
fn Start(&self) -> windows_core::Result<()>;
fn Stop(&self) -> windows_core::Result<()>;
}
impl IMFSensorActivityMonitor_Vtbl {
pub const fn new<Identity: IMFSensorActivityMonitor_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Start<Identity: IMFSensorActivityMonitor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSensorActivityMonitor_Impl::Start(this).into()
}
}
unsafe extern "system" fn Stop<Identity: IMFSensorActivityMonitor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSensorActivityMonitor_Impl::Stop(this).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), Start: Start::<Identity, OFFSET>, Stop: Stop::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSensorActivityMonitor as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSensorActivityMonitor {}
windows_core::imp::define_interface!(IMFSensorActivityReport, IMFSensorActivityReport_Vtbl, 0x3e8c4be1_a8c2_4528_90de_2851bde5fead);
windows_core::imp::interface_hierarchy!(IMFSensorActivityReport, windows_core::IUnknown);
impl IMFSensorActivityReport {
pub unsafe fn GetFriendlyName(&self, friendlyname: &mut [u16], pcchwritten: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetFriendlyName)(windows_core::Interface::as_raw(self), core::mem::transmute(friendlyname.as_ptr()), friendlyname.len().try_into().unwrap(), pcchwritten as _).ok() }
}
pub unsafe fn GetSymbolicLink(&self, symboliclink: &mut [u16], pcchwritten: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetSymbolicLink)(windows_core::Interface::as_raw(self), core::mem::transmute(symboliclink.as_ptr()), symboliclink.len().try_into().unwrap(), pcchwritten as _).ok() }
}
pub unsafe fn GetProcessCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetProcessCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetProcessActivity(&self, index: u32) -> windows_core::Result<IMFSensorProcessActivity> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetProcessActivity)(windows_core::Interface::as_raw(self), index, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSensorActivityReport_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetFriendlyName: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PWSTR, u32, *mut u32) -> windows_core::HRESULT,
pub GetSymbolicLink: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PWSTR, u32, *mut u32) -> windows_core::HRESULT,
pub GetProcessCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetProcessActivity: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFSensorActivityReport_Impl: windows_core::IUnknownImpl {
fn GetFriendlyName(&self, friendlyname: windows_core::PWSTR, cchfriendlyname: u32, pcchwritten: *mut u32) -> windows_core::Result<()>;
fn GetSymbolicLink(&self, symboliclink: windows_core::PWSTR, cchsymboliclink: u32, pcchwritten: *mut u32) -> windows_core::Result<()>;
fn GetProcessCount(&self) -> windows_core::Result<u32>;
fn GetProcessActivity(&self, index: u32) -> windows_core::Result<IMFSensorProcessActivity>;
}
impl IMFSensorActivityReport_Vtbl {
pub const fn new<Identity: IMFSensorActivityReport_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetFriendlyName<Identity: IMFSensorActivityReport_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, friendlyname: windows_core::PWSTR, cchfriendlyname: u32, pcchwritten: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSensorActivityReport_Impl::GetFriendlyName(this, core::mem::transmute_copy(&friendlyname), core::mem::transmute_copy(&cchfriendlyname), core::mem::transmute_copy(&pcchwritten)).into()
}
}
unsafe extern "system" fn GetSymbolicLink<Identity: IMFSensorActivityReport_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, symboliclink: windows_core::PWSTR, cchsymboliclink: u32, pcchwritten: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSensorActivityReport_Impl::GetSymbolicLink(this, core::mem::transmute_copy(&symboliclink), core::mem::transmute_copy(&cchsymboliclink), core::mem::transmute_copy(&pcchwritten)).into()
}
}
unsafe extern "system" fn GetProcessCount<Identity: IMFSensorActivityReport_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pccount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorActivityReport_Impl::GetProcessCount(this) {
Ok(ok__) => {
pccount.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetProcessActivity<Identity: IMFSensorActivityReport_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, index: u32, ppprocessactivity: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorActivityReport_Impl::GetProcessActivity(this, core::mem::transmute_copy(&index)) {
Ok(ok__) => {
ppprocessactivity.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetFriendlyName: GetFriendlyName::<Identity, OFFSET>,
GetSymbolicLink: GetSymbolicLink::<Identity, OFFSET>,
GetProcessCount: GetProcessCount::<Identity, OFFSET>,
GetProcessActivity: GetProcessActivity::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSensorActivityReport as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSensorActivityReport {}
windows_core::imp::define_interface!(IMFSensorDevice, IMFSensorDevice_Vtbl, 0xfb9f48f2_2a18_4e28_9730_786f30f04dc4);
windows_core::imp::interface_hierarchy!(IMFSensorDevice, windows_core::IUnknown);
impl IMFSensorDevice {
pub unsafe fn GetDeviceId(&self) -> windows_core::Result<u64> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDeviceId)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetDeviceType(&self) -> windows_core::Result<MFSensorDeviceType> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDeviceType)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetFlags(&self) -> windows_core::Result<u64> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetFlags)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetSymbolicLink(&self, symboliclink: &mut [u16], pcchwritten: *mut i32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetSymbolicLink)(windows_core::Interface::as_raw(self), core::mem::transmute(symboliclink.as_ptr()), symboliclink.len().try_into().unwrap(), pcchwritten as _).ok() }
}
pub unsafe fn GetDeviceAttributes(&self) -> windows_core::Result<IMFAttributes> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDeviceAttributes)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetStreamAttributesCount(&self, etype: MFSensorStreamType) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamAttributesCount)(windows_core::Interface::as_raw(self), etype, &mut result__).map(|| result__)
}
}
pub unsafe fn GetStreamAttributes(&self, etype: MFSensorStreamType, dwindex: u32) -> windows_core::Result<IMFAttributes> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamAttributes)(windows_core::Interface::as_raw(self), etype, dwindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn SetSensorDeviceMode(&self, emode: MFSensorDeviceMode) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetSensorDeviceMode)(windows_core::Interface::as_raw(self), emode).ok() }
}
pub unsafe fn GetSensorDeviceMode(&self) -> windows_core::Result<MFSensorDeviceMode> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetSensorDeviceMode)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSensorDevice_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetDeviceId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
pub GetDeviceType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MFSensorDeviceType) -> windows_core::HRESULT,
pub GetFlags: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
pub GetSymbolicLink: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PWSTR, i32, *mut i32) -> windows_core::HRESULT,
pub GetDeviceAttributes: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetStreamAttributesCount: unsafe extern "system" fn(*mut core::ffi::c_void, MFSensorStreamType, *mut u32) -> windows_core::HRESULT,
pub GetStreamAttributes: unsafe extern "system" fn(*mut core::ffi::c_void, MFSensorStreamType, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetSensorDeviceMode: unsafe extern "system" fn(*mut core::ffi::c_void, MFSensorDeviceMode) -> windows_core::HRESULT,
pub GetSensorDeviceMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MFSensorDeviceMode) -> windows_core::HRESULT,
}
pub trait IMFSensorDevice_Impl: windows_core::IUnknownImpl {
fn GetDeviceId(&self) -> windows_core::Result<u64>;
fn GetDeviceType(&self) -> windows_core::Result<MFSensorDeviceType>;
fn GetFlags(&self) -> windows_core::Result<u64>;
fn GetSymbolicLink(&self, symboliclink: windows_core::PWSTR, cchsymboliclink: i32, pcchwritten: *mut i32) -> windows_core::Result<()>;
fn GetDeviceAttributes(&self) -> windows_core::Result<IMFAttributes>;
fn GetStreamAttributesCount(&self, etype: MFSensorStreamType) -> windows_core::Result<u32>;
fn GetStreamAttributes(&self, etype: MFSensorStreamType, dwindex: u32) -> windows_core::Result<IMFAttributes>;
fn SetSensorDeviceMode(&self, emode: MFSensorDeviceMode) -> windows_core::Result<()>;
fn GetSensorDeviceMode(&self) -> windows_core::Result<MFSensorDeviceMode>;
}
impl IMFSensorDevice_Vtbl {
pub const fn new<Identity: IMFSensorDevice_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetDeviceId<Identity: IMFSensorDevice_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdeviceid: *mut u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorDevice_Impl::GetDeviceId(this) {
Ok(ok__) => {
pdeviceid.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetDeviceType<Identity: IMFSensorDevice_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ptype: *mut MFSensorDeviceType) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorDevice_Impl::GetDeviceType(this) {
Ok(ok__) => {
ptype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetFlags<Identity: IMFSensorDevice_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pflags: *mut u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorDevice_Impl::GetFlags(this) {
Ok(ok__) => {
pflags.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetSymbolicLink<Identity: IMFSensorDevice_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, symboliclink: windows_core::PWSTR, cchsymboliclink: i32, pcchwritten: *mut i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSensorDevice_Impl::GetSymbolicLink(this, core::mem::transmute_copy(&symboliclink), core::mem::transmute_copy(&cchsymboliclink), core::mem::transmute_copy(&pcchwritten)).into()
}
}
unsafe extern "system" fn GetDeviceAttributes<Identity: IMFSensorDevice_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppattributes: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorDevice_Impl::GetDeviceAttributes(this) {
Ok(ok__) => {
ppattributes.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetStreamAttributesCount<Identity: IMFSensorDevice_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, etype: MFSensorStreamType, pdwcount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorDevice_Impl::GetStreamAttributesCount(this, core::mem::transmute_copy(&etype)) {
Ok(ok__) => {
pdwcount.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetStreamAttributes<Identity: IMFSensorDevice_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, etype: MFSensorStreamType, dwindex: u32, ppattributes: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorDevice_Impl::GetStreamAttributes(this, core::mem::transmute_copy(&etype), core::mem::transmute_copy(&dwindex)) {
Ok(ok__) => {
ppattributes.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetSensorDeviceMode<Identity: IMFSensorDevice_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, emode: MFSensorDeviceMode) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSensorDevice_Impl::SetSensorDeviceMode(this, core::mem::transmute_copy(&emode)).into()
}
}
unsafe extern "system" fn GetSensorDeviceMode<Identity: IMFSensorDevice_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pemode: *mut MFSensorDeviceMode) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorDevice_Impl::GetSensorDeviceMode(this) {
Ok(ok__) => {
pemode.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetDeviceId: GetDeviceId::<Identity, OFFSET>,
GetDeviceType: GetDeviceType::<Identity, OFFSET>,
GetFlags: GetFlags::<Identity, OFFSET>,
GetSymbolicLink: GetSymbolicLink::<Identity, OFFSET>,
GetDeviceAttributes: GetDeviceAttributes::<Identity, OFFSET>,
GetStreamAttributesCount: GetStreamAttributesCount::<Identity, OFFSET>,
GetStreamAttributes: GetStreamAttributes::<Identity, OFFSET>,
SetSensorDeviceMode: SetSensorDeviceMode::<Identity, OFFSET>,
GetSensorDeviceMode: GetSensorDeviceMode::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSensorDevice as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSensorDevice {}
windows_core::imp::define_interface!(IMFSensorGroup, IMFSensorGroup_Vtbl, 0x4110243a_9757_461f_89f1_f22345bcab4e);
windows_core::imp::interface_hierarchy!(IMFSensorGroup, windows_core::IUnknown);
impl IMFSensorGroup {
pub unsafe fn GetSymbolicLink(&self, symboliclink: &mut [u16], pcchwritten: *mut i32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetSymbolicLink)(windows_core::Interface::as_raw(self), core::mem::transmute(symboliclink.as_ptr()), symboliclink.len().try_into().unwrap(), pcchwritten as _).ok() }
}
pub unsafe fn GetFlags(&self) -> windows_core::Result<u64> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetFlags)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetSensorGroupAttributes(&self) -> windows_core::Result<IMFAttributes> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetSensorGroupAttributes)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetSensorDeviceCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetSensorDeviceCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetSensorDevice(&self, dwindex: u32) -> windows_core::Result<IMFSensorDevice> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetSensorDevice)(windows_core::Interface::as_raw(self), dwindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn SetDefaultSensorDeviceIndex(&self, dwindex: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetDefaultSensorDeviceIndex)(windows_core::Interface::as_raw(self), dwindex).ok() }
}
pub unsafe fn GetDefaultSensorDeviceIndex(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDefaultSensorDeviceIndex)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn CreateMediaSource(&self) -> windows_core::Result<IMFMediaSource> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateMediaSource)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSensorGroup_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetSymbolicLink: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PWSTR, i32, *mut i32) -> windows_core::HRESULT,
pub GetFlags: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
pub GetSensorGroupAttributes: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetSensorDeviceCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetSensorDevice: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetDefaultSensorDeviceIndex: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub GetDefaultSensorDeviceIndex: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub CreateMediaSource: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFSensorGroup_Impl: windows_core::IUnknownImpl {
fn GetSymbolicLink(&self, symboliclink: windows_core::PWSTR, cchsymboliclink: i32, pcchwritten: *mut i32) -> windows_core::Result<()>;
fn GetFlags(&self) -> windows_core::Result<u64>;
fn GetSensorGroupAttributes(&self) -> windows_core::Result<IMFAttributes>;
fn GetSensorDeviceCount(&self) -> windows_core::Result<u32>;
fn GetSensorDevice(&self, dwindex: u32) -> windows_core::Result<IMFSensorDevice>;
fn SetDefaultSensorDeviceIndex(&self, dwindex: u32) -> windows_core::Result<()>;
fn GetDefaultSensorDeviceIndex(&self) -> windows_core::Result<u32>;
fn CreateMediaSource(&self) -> windows_core::Result<IMFMediaSource>;
}
impl IMFSensorGroup_Vtbl {
pub const fn new<Identity: IMFSensorGroup_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetSymbolicLink<Identity: IMFSensorGroup_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, symboliclink: windows_core::PWSTR, cchsymboliclink: i32, pcchwritten: *mut i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSensorGroup_Impl::GetSymbolicLink(this, core::mem::transmute_copy(&symboliclink), core::mem::transmute_copy(&cchsymboliclink), core::mem::transmute_copy(&pcchwritten)).into()
}
}
unsafe extern "system" fn GetFlags<Identity: IMFSensorGroup_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pflags: *mut u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorGroup_Impl::GetFlags(this) {
Ok(ok__) => {
pflags.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetSensorGroupAttributes<Identity: IMFSensorGroup_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppattributes: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorGroup_Impl::GetSensorGroupAttributes(this) {
Ok(ok__) => {
ppattributes.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetSensorDeviceCount<Identity: IMFSensorGroup_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwcount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorGroup_Impl::GetSensorDeviceCount(this) {
Ok(ok__) => {
pdwcount.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetSensorDevice<Identity: IMFSensorGroup_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwindex: u32, ppdevice: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorGroup_Impl::GetSensorDevice(this, core::mem::transmute_copy(&dwindex)) {
Ok(ok__) => {
ppdevice.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetDefaultSensorDeviceIndex<Identity: IMFSensorGroup_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwindex: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSensorGroup_Impl::SetDefaultSensorDeviceIndex(this, core::mem::transmute_copy(&dwindex)).into()
}
}
unsafe extern "system" fn GetDefaultSensorDeviceIndex<Identity: IMFSensorGroup_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwindex: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorGroup_Impl::GetDefaultSensorDeviceIndex(this) {
Ok(ok__) => {
pdwindex.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn CreateMediaSource<Identity: IMFSensorGroup_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppsource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorGroup_Impl::CreateMediaSource(this) {
Ok(ok__) => {
ppsource.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetSymbolicLink: GetSymbolicLink::<Identity, OFFSET>,
GetFlags: GetFlags::<Identity, OFFSET>,
GetSensorGroupAttributes: GetSensorGroupAttributes::<Identity, OFFSET>,
GetSensorDeviceCount: GetSensorDeviceCount::<Identity, OFFSET>,
GetSensorDevice: GetSensorDevice::<Identity, OFFSET>,
SetDefaultSensorDeviceIndex: SetDefaultSensorDeviceIndex::<Identity, OFFSET>,
GetDefaultSensorDeviceIndex: GetDefaultSensorDeviceIndex::<Identity, OFFSET>,
CreateMediaSource: CreateMediaSource::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSensorGroup as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSensorGroup {}
windows_core::imp::define_interface!(IMFSensorProcessActivity, IMFSensorProcessActivity_Vtbl, 0x39dc7f4a_b141_4719_813c_a7f46162a2b8);
windows_core::imp::interface_hierarchy!(IMFSensorProcessActivity, windows_core::IUnknown);
impl IMFSensorProcessActivity {
pub unsafe fn GetProcessId(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetProcessId)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetStreamingState(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamingState)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetStreamingMode(&self) -> windows_core::Result<MFSensorDeviceMode> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamingMode)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetReportTime(&self) -> windows_core::Result<super::super::Foundation::FILETIME> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetReportTime)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSensorProcessActivity_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetProcessId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetStreamingState: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub GetStreamingMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MFSensorDeviceMode) -> windows_core::HRESULT,
pub GetReportTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::FILETIME) -> windows_core::HRESULT,
}
pub trait IMFSensorProcessActivity_Impl: windows_core::IUnknownImpl {
fn GetProcessId(&self) -> windows_core::Result<u32>;
fn GetStreamingState(&self) -> windows_core::Result<windows_core::BOOL>;
fn GetStreamingMode(&self) -> windows_core::Result<MFSensorDeviceMode>;
fn GetReportTime(&self) -> windows_core::Result<super::super::Foundation::FILETIME>;
}
impl IMFSensorProcessActivity_Vtbl {
pub const fn new<Identity: IMFSensorProcessActivity_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetProcessId<Identity: IMFSensorProcessActivity_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppid: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorProcessActivity_Impl::GetProcessId(this) {
Ok(ok__) => {
ppid.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetStreamingState<Identity: IMFSensorProcessActivity_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pfstreaming: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorProcessActivity_Impl::GetStreamingState(this) {
Ok(ok__) => {
pfstreaming.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetStreamingMode<Identity: IMFSensorProcessActivity_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pmode: *mut MFSensorDeviceMode) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorProcessActivity_Impl::GetStreamingMode(this) {
Ok(ok__) => {
pmode.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetReportTime<Identity: IMFSensorProcessActivity_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pft: *mut super::super::Foundation::FILETIME) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorProcessActivity_Impl::GetReportTime(this) {
Ok(ok__) => {
pft.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetProcessId: GetProcessId::<Identity, OFFSET>,
GetStreamingState: GetStreamingState::<Identity, OFFSET>,
GetStreamingMode: GetStreamingMode::<Identity, OFFSET>,
GetReportTime: GetReportTime::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSensorProcessActivity as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSensorProcessActivity {}
windows_core::imp::define_interface!(IMFSensorProfile, IMFSensorProfile_Vtbl, 0x22f765d1_8dab_4107_846d_56baf72215e7);
windows_core::imp::interface_hierarchy!(IMFSensorProfile, windows_core::IUnknown);
impl IMFSensorProfile {
pub unsafe fn GetProfileId(&self, pid: *mut SENSORPROFILEID) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetProfileId)(windows_core::Interface::as_raw(self), pid as _).ok() }
}
pub unsafe fn AddProfileFilter<P1>(&self, streamid: u32, wzfiltersetstring: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).AddProfileFilter)(windows_core::Interface::as_raw(self), streamid, wzfiltersetstring.param().abi()).ok() }
}
pub unsafe fn IsMediaTypeSupported<P1>(&self, streamid: u32, pmediatype: P1) -> windows_core::Result<windows_core::BOOL>
where
P1: windows_core::Param<IMFMediaType>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).IsMediaTypeSupported)(windows_core::Interface::as_raw(self), streamid, pmediatype.param().abi(), &mut result__).map(|| result__)
}
}
pub unsafe fn AddBlockedControl<P0>(&self, wzblockedcontrol: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).AddBlockedControl)(windows_core::Interface::as_raw(self), wzblockedcontrol.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSensorProfile_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetProfileId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut SENSORPROFILEID) -> windows_core::HRESULT,
pub AddProfileFilter: unsafe extern "system" fn(*mut core::ffi::c_void, u32, windows_core::PCWSTR) -> windows_core::HRESULT,
pub IsMediaTypeSupported: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub AddBlockedControl: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR) -> windows_core::HRESULT,
}
pub trait IMFSensorProfile_Impl: windows_core::IUnknownImpl {
fn GetProfileId(&self, pid: *mut SENSORPROFILEID) -> windows_core::Result<()>;
fn AddProfileFilter(&self, streamid: u32, wzfiltersetstring: &windows_core::PCWSTR) -> windows_core::Result<()>;
fn IsMediaTypeSupported(&self, streamid: u32, pmediatype: windows_core::Ref<IMFMediaType>) -> windows_core::Result<windows_core::BOOL>;
fn AddBlockedControl(&self, wzblockedcontrol: &windows_core::PCWSTR) -> windows_core::Result<()>;
}
impl IMFSensorProfile_Vtbl {
pub const fn new<Identity: IMFSensorProfile_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetProfileId<Identity: IMFSensorProfile_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pid: *mut SENSORPROFILEID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSensorProfile_Impl::GetProfileId(this, core::mem::transmute_copy(&pid)).into()
}
}
unsafe extern "system" fn AddProfileFilter<Identity: IMFSensorProfile_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, streamid: u32, wzfiltersetstring: windows_core::PCWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSensorProfile_Impl::AddProfileFilter(this, core::mem::transmute_copy(&streamid), core::mem::transmute(&wzfiltersetstring)).into()
}
}
unsafe extern "system" fn IsMediaTypeSupported<Identity: IMFSensorProfile_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, streamid: u32, pmediatype: *mut core::ffi::c_void, pfsupported: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorProfile_Impl::IsMediaTypeSupported(this, core::mem::transmute_copy(&streamid), core::mem::transmute_copy(&pmediatype)) {
Ok(ok__) => {
pfsupported.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn AddBlockedControl<Identity: IMFSensorProfile_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, wzblockedcontrol: windows_core::PCWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSensorProfile_Impl::AddBlockedControl(this, core::mem::transmute(&wzblockedcontrol)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetProfileId: GetProfileId::<Identity, OFFSET>,
AddProfileFilter: AddProfileFilter::<Identity, OFFSET>,
IsMediaTypeSupported: IsMediaTypeSupported::<Identity, OFFSET>,
AddBlockedControl: AddBlockedControl::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSensorProfile as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSensorProfile {}
windows_core::imp::define_interface!(IMFSensorProfileCollection, IMFSensorProfileCollection_Vtbl, 0xc95ea55b_0187_48be_9353_8d2507662351);
windows_core::imp::interface_hierarchy!(IMFSensorProfileCollection, windows_core::IUnknown);
impl IMFSensorProfileCollection {
pub unsafe fn GetProfileCount(&self) -> u32 {
unsafe { (windows_core::Interface::vtable(self).GetProfileCount)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetProfile(&self, index: u32) -> windows_core::Result<IMFSensorProfile> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetProfile)(windows_core::Interface::as_raw(self), index, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn AddProfile<P0>(&self, pprofile: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFSensorProfile>,
{
unsafe { (windows_core::Interface::vtable(self).AddProfile)(windows_core::Interface::as_raw(self), pprofile.param().abi()).ok() }
}
pub unsafe fn FindProfile(&self, profileid: *const SENSORPROFILEID) -> windows_core::Result<IMFSensorProfile> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).FindProfile)(windows_core::Interface::as_raw(self), profileid, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn RemoveProfileByIndex(&self, index: u32) {
unsafe { (windows_core::Interface::vtable(self).RemoveProfileByIndex)(windows_core::Interface::as_raw(self), index) }
}
pub unsafe fn RemoveProfile(&self, profileid: *const SENSORPROFILEID) {
unsafe { (windows_core::Interface::vtable(self).RemoveProfile)(windows_core::Interface::as_raw(self), profileid) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSensorProfileCollection_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetProfileCount: unsafe extern "system" fn(*mut core::ffi::c_void) -> u32,
pub GetProfile: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AddProfile: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub FindProfile: unsafe extern "system" fn(*mut core::ffi::c_void, *const SENSORPROFILEID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RemoveProfileByIndex: unsafe extern "system" fn(*mut core::ffi::c_void, u32),
pub RemoveProfile: unsafe extern "system" fn(*mut core::ffi::c_void, *const SENSORPROFILEID),
}
pub trait IMFSensorProfileCollection_Impl: windows_core::IUnknownImpl {
fn GetProfileCount(&self) -> u32;
fn GetProfile(&self, index: u32) -> windows_core::Result<IMFSensorProfile>;
fn AddProfile(&self, pprofile: windows_core::Ref<IMFSensorProfile>) -> windows_core::Result<()>;
fn FindProfile(&self, profileid: *const SENSORPROFILEID) -> windows_core::Result<IMFSensorProfile>;
fn RemoveProfileByIndex(&self, index: u32);
fn RemoveProfile(&self, profileid: *const SENSORPROFILEID);
}
impl IMFSensorProfileCollection_Vtbl {
pub const fn new<Identity: IMFSensorProfileCollection_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetProfileCount<Identity: IMFSensorProfileCollection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> u32 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSensorProfileCollection_Impl::GetProfileCount(this)
}
}
unsafe extern "system" fn GetProfile<Identity: IMFSensorProfileCollection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, index: u32, ppprofile: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorProfileCollection_Impl::GetProfile(this, core::mem::transmute_copy(&index)) {
Ok(ok__) => {
ppprofile.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn AddProfile<Identity: IMFSensorProfileCollection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pprofile: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSensorProfileCollection_Impl::AddProfile(this, core::mem::transmute_copy(&pprofile)).into()
}
}
unsafe extern "system" fn FindProfile<Identity: IMFSensorProfileCollection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, profileid: *const SENSORPROFILEID, ppprofile: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorProfileCollection_Impl::FindProfile(this, core::mem::transmute_copy(&profileid)) {
Ok(ok__) => {
ppprofile.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn RemoveProfileByIndex<Identity: IMFSensorProfileCollection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, index: u32) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSensorProfileCollection_Impl::RemoveProfileByIndex(this, core::mem::transmute_copy(&index))
}
}
unsafe extern "system" fn RemoveProfile<Identity: IMFSensorProfileCollection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, profileid: *const SENSORPROFILEID) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSensorProfileCollection_Impl::RemoveProfile(this, core::mem::transmute_copy(&profileid))
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetProfileCount: GetProfileCount::<Identity, OFFSET>,
GetProfile: GetProfile::<Identity, OFFSET>,
AddProfile: AddProfile::<Identity, OFFSET>,
FindProfile: FindProfile::<Identity, OFFSET>,
RemoveProfileByIndex: RemoveProfileByIndex::<Identity, OFFSET>,
RemoveProfile: RemoveProfile::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSensorProfileCollection as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSensorProfileCollection {}
windows_core::imp::define_interface!(IMFSensorStream, IMFSensorStream_Vtbl, 0xe9a42171_c56e_498a_8b39_eda5a070b7fc);
impl core::ops::Deref for IMFSensorStream {
type Target = IMFAttributes;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFSensorStream, windows_core::IUnknown, IMFAttributes);
impl IMFSensorStream {
pub unsafe fn GetMediaTypeCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMediaTypeCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetMediaType(&self, dwindex: u32) -> windows_core::Result<IMFMediaType> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMediaType)(windows_core::Interface::as_raw(self), dwindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn CloneSensorStream(&self) -> windows_core::Result<IMFSensorStream> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CloneSensorStream)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSensorStream_Vtbl {
pub base__: IMFAttributes_Vtbl,
pub GetMediaTypeCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetMediaType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CloneSensorStream: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFSensorStream_Impl: IMFAttributes_Impl {
fn GetMediaTypeCount(&self) -> windows_core::Result<u32>;
fn GetMediaType(&self, dwindex: u32) -> windows_core::Result<IMFMediaType>;
fn CloneSensorStream(&self) -> windows_core::Result<IMFSensorStream>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFSensorStream_Vtbl {
pub const fn new<Identity: IMFSensorStream_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetMediaTypeCount<Identity: IMFSensorStream_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwcount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorStream_Impl::GetMediaTypeCount(this) {
Ok(ok__) => {
pdwcount.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetMediaType<Identity: IMFSensorStream_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwindex: u32, ppmediatype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorStream_Impl::GetMediaType(this, core::mem::transmute_copy(&dwindex)) {
Ok(ok__) => {
ppmediatype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn CloneSensorStream<Identity: IMFSensorStream_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppstream: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorStream_Impl::CloneSensorStream(this) {
Ok(ok__) => {
ppstream.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, OFFSET>(),
GetMediaTypeCount: GetMediaTypeCount::<Identity, OFFSET>,
GetMediaType: GetMediaType::<Identity, OFFSET>,
CloneSensorStream: CloneSensorStream::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSensorStream as windows_core::Interface>::IID || iid == &<IMFAttributes as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFSensorStream {}
windows_core::imp::define_interface!(IMFSensorTransformFactory, IMFSensorTransformFactory_Vtbl, 0xeed9c2ee_66b4_4f18_a697_ac7d3960215c);
windows_core::imp::interface_hierarchy!(IMFSensorTransformFactory, windows_core::IUnknown);
impl IMFSensorTransformFactory {
pub unsafe fn GetFactoryAttributes(&self) -> windows_core::Result<IMFAttributes> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetFactoryAttributes)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn InitializeFactory<P1, P2>(&self, dwmaxtransformcount: u32, psensordevices: P1, pattributes: P2) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFCollection>,
P2: windows_core::Param<IMFAttributes>,
{
unsafe { (windows_core::Interface::vtable(self).InitializeFactory)(windows_core::Interface::as_raw(self), dwmaxtransformcount, psensordevices.param().abi(), pattributes.param().abi()).ok() }
}
pub unsafe fn GetTransformCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetTransformCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetTransformInformation(&self, transformindex: u32, pguidtransformid: *mut windows_core::GUID, ppattributes: *mut Option<IMFAttributes>, ppstreaminformation: *mut Option<IMFCollection>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetTransformInformation)(windows_core::Interface::as_raw(self), transformindex, pguidtransformid as _, core::mem::transmute(ppattributes), core::mem::transmute(ppstreaminformation)).ok() }
}
pub unsafe fn CreateTransform<P1>(&self, guidsensortransformid: *const windows_core::GUID, pattributes: P1) -> windows_core::Result<IMFDeviceTransform>
where
P1: windows_core::Param<IMFAttributes>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateTransform)(windows_core::Interface::as_raw(self), guidsensortransformid, pattributes.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSensorTransformFactory_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetFactoryAttributes: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub InitializeFactory: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetTransformCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetTransformInformation: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut windows_core::GUID, *mut *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CreateTransform: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFSensorTransformFactory_Impl: windows_core::IUnknownImpl {
fn GetFactoryAttributes(&self) -> windows_core::Result<IMFAttributes>;
fn InitializeFactory(&self, dwmaxtransformcount: u32, psensordevices: windows_core::Ref<IMFCollection>, pattributes: windows_core::Ref<IMFAttributes>) -> windows_core::Result<()>;
fn GetTransformCount(&self) -> windows_core::Result<u32>;
fn GetTransformInformation(&self, transformindex: u32, pguidtransformid: *mut windows_core::GUID, ppattributes: windows_core::OutRef<IMFAttributes>, ppstreaminformation: windows_core::OutRef<IMFCollection>) -> windows_core::Result<()>;
fn CreateTransform(&self, guidsensortransformid: *const windows_core::GUID, pattributes: windows_core::Ref<IMFAttributes>) -> windows_core::Result<IMFDeviceTransform>;
}
impl IMFSensorTransformFactory_Vtbl {
pub const fn new<Identity: IMFSensorTransformFactory_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetFactoryAttributes<Identity: IMFSensorTransformFactory_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppattributes: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorTransformFactory_Impl::GetFactoryAttributes(this) {
Ok(ok__) => {
ppattributes.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn InitializeFactory<Identity: IMFSensorTransformFactory_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwmaxtransformcount: u32, psensordevices: *mut core::ffi::c_void, pattributes: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSensorTransformFactory_Impl::InitializeFactory(this, core::mem::transmute_copy(&dwmaxtransformcount), core::mem::transmute_copy(&psensordevices), core::mem::transmute_copy(&pattributes)).into()
}
}
unsafe extern "system" fn GetTransformCount<Identity: IMFSensorTransformFactory_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwcount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorTransformFactory_Impl::GetTransformCount(this) {
Ok(ok__) => {
pdwcount.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetTransformInformation<Identity: IMFSensorTransformFactory_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, transformindex: u32, pguidtransformid: *mut windows_core::GUID, ppattributes: *mut *mut core::ffi::c_void, ppstreaminformation: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSensorTransformFactory_Impl::GetTransformInformation(this, core::mem::transmute_copy(&transformindex), core::mem::transmute_copy(&pguidtransformid), core::mem::transmute_copy(&ppattributes), core::mem::transmute_copy(&ppstreaminformation)).into()
}
}
unsafe extern "system" fn CreateTransform<Identity: IMFSensorTransformFactory_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidsensortransformid: *const windows_core::GUID, pattributes: *mut core::ffi::c_void, ppdevicemft: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSensorTransformFactory_Impl::CreateTransform(this, core::mem::transmute_copy(&guidsensortransformid), core::mem::transmute_copy(&pattributes)) {
Ok(ok__) => {
ppdevicemft.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetFactoryAttributes: GetFactoryAttributes::<Identity, OFFSET>,
InitializeFactory: InitializeFactory::<Identity, OFFSET>,
GetTransformCount: GetTransformCount::<Identity, OFFSET>,
GetTransformInformation: GetTransformInformation::<Identity, OFFSET>,
CreateTransform: CreateTransform::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSensorTransformFactory as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSensorTransformFactory {}
windows_core::imp::define_interface!(IMFSequencerSource, IMFSequencerSource_Vtbl, 0x197cd219_19cb_4de1_a64c_acf2edcbe59e);
windows_core::imp::interface_hierarchy!(IMFSequencerSource, windows_core::IUnknown);
impl IMFSequencerSource {
pub unsafe fn AppendTopology<P0>(&self, ptopology: P0, dwflags: u32) -> windows_core::Result<u32>
where
P0: windows_core::Param<IMFTopology>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).AppendTopology)(windows_core::Interface::as_raw(self), ptopology.param().abi(), dwflags, &mut result__).map(|| result__)
}
}
pub unsafe fn DeleteTopology(&self, dwid: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).DeleteTopology)(windows_core::Interface::as_raw(self), dwid).ok() }
}
pub unsafe fn GetPresentationContext<P0>(&self, ppd: P0, pid: Option<*mut u32>, pptopology: Option<*mut Option<IMFTopology>>) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFPresentationDescriptor>,
{
unsafe { (windows_core::Interface::vtable(self).GetPresentationContext)(windows_core::Interface::as_raw(self), ppd.param().abi(), pid.unwrap_or(core::mem::zeroed()) as _, pptopology.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn UpdateTopology<P1>(&self, dwid: u32, ptopology: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFTopology>,
{
unsafe { (windows_core::Interface::vtable(self).UpdateTopology)(windows_core::Interface::as_raw(self), dwid, ptopology.param().abi()).ok() }
}
pub unsafe fn UpdateTopologyFlags(&self, dwid: u32, dwflags: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).UpdateTopologyFlags)(windows_core::Interface::as_raw(self), dwid, dwflags).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSequencerSource_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub AppendTopology: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, *mut u32) -> windows_core::HRESULT,
pub DeleteTopology: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub GetPresentationContext: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub UpdateTopology: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub UpdateTopologyFlags: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32) -> windows_core::HRESULT,
}
pub trait IMFSequencerSource_Impl: windows_core::IUnknownImpl {
fn AppendTopology(&self, ptopology: windows_core::Ref<IMFTopology>, dwflags: u32) -> windows_core::Result<u32>;
fn DeleteTopology(&self, dwid: u32) -> windows_core::Result<()>;
fn GetPresentationContext(&self, ppd: windows_core::Ref<IMFPresentationDescriptor>, pid: *mut u32, pptopology: windows_core::OutRef<IMFTopology>) -> windows_core::Result<()>;
fn UpdateTopology(&self, dwid: u32, ptopology: windows_core::Ref<IMFTopology>) -> windows_core::Result<()>;
fn UpdateTopologyFlags(&self, dwid: u32, dwflags: u32) -> windows_core::Result<()>;
}
impl IMFSequencerSource_Vtbl {
pub const fn new<Identity: IMFSequencerSource_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn AppendTopology<Identity: IMFSequencerSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ptopology: *mut core::ffi::c_void, dwflags: u32, pdwid: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSequencerSource_Impl::AppendTopology(this, core::mem::transmute_copy(&ptopology), core::mem::transmute_copy(&dwflags)) {
Ok(ok__) => {
pdwid.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn DeleteTopology<Identity: IMFSequencerSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwid: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSequencerSource_Impl::DeleteTopology(this, core::mem::transmute_copy(&dwid)).into()
}
}
unsafe extern "system" fn GetPresentationContext<Identity: IMFSequencerSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppd: *mut core::ffi::c_void, pid: *mut u32, pptopology: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSequencerSource_Impl::GetPresentationContext(this, core::mem::transmute_copy(&ppd), core::mem::transmute_copy(&pid), core::mem::transmute_copy(&pptopology)).into()
}
}
unsafe extern "system" fn UpdateTopology<Identity: IMFSequencerSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwid: u32, ptopology: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSequencerSource_Impl::UpdateTopology(this, core::mem::transmute_copy(&dwid), core::mem::transmute_copy(&ptopology)).into()
}
}
unsafe extern "system" fn UpdateTopologyFlags<Identity: IMFSequencerSource_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwid: u32, dwflags: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSequencerSource_Impl::UpdateTopologyFlags(this, core::mem::transmute_copy(&dwid), core::mem::transmute_copy(&dwflags)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
AppendTopology: AppendTopology::<Identity, OFFSET>,
DeleteTopology: DeleteTopology::<Identity, OFFSET>,
GetPresentationContext: GetPresentationContext::<Identity, OFFSET>,
UpdateTopology: UpdateTopology::<Identity, OFFSET>,
UpdateTopologyFlags: UpdateTopologyFlags::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSequencerSource as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSequencerSource {}
windows_core::imp::define_interface!(IMFSharingEngineClassFactory, IMFSharingEngineClassFactory_Vtbl, 0x2ba61f92_8305_413b_9733_faf15f259384);
windows_core::imp::interface_hierarchy!(IMFSharingEngineClassFactory, windows_core::IUnknown);
impl IMFSharingEngineClassFactory {
pub unsafe fn CreateInstance<P1>(&self, dwflags: u32, pattr: P1) -> windows_core::Result<windows_core::IUnknown>
where
P1: windows_core::Param<IMFAttributes>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateInstance)(windows_core::Interface::as_raw(self), dwflags, pattr.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSharingEngineClassFactory_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub CreateInstance: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFSharingEngineClassFactory_Impl: windows_core::IUnknownImpl {
fn CreateInstance(&self, dwflags: u32, pattr: windows_core::Ref<IMFAttributes>) -> windows_core::Result<windows_core::IUnknown>;
}
impl IMFSharingEngineClassFactory_Vtbl {
pub const fn new<Identity: IMFSharingEngineClassFactory_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateInstance<Identity: IMFSharingEngineClassFactory_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwflags: u32, pattr: *mut core::ffi::c_void, ppengine: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSharingEngineClassFactory_Impl::CreateInstance(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pattr)) {
Ok(ok__) => {
ppengine.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), CreateInstance: CreateInstance::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSharingEngineClassFactory as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSharingEngineClassFactory {}
windows_core::imp::define_interface!(IMFShutdown, IMFShutdown_Vtbl, 0x97ec2ea4_0e42_4937_97ac_9d6d328824e1);
windows_core::imp::interface_hierarchy!(IMFShutdown, windows_core::IUnknown);
impl IMFShutdown {
pub unsafe fn Shutdown(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Shutdown)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn GetShutdownStatus(&self) -> windows_core::Result<MFSHUTDOWN_STATUS> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetShutdownStatus)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFShutdown_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub Shutdown: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetShutdownStatus: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MFSHUTDOWN_STATUS) -> windows_core::HRESULT,
}
pub trait IMFShutdown_Impl: windows_core::IUnknownImpl {
fn Shutdown(&self) -> windows_core::Result<()>;
fn GetShutdownStatus(&self) -> windows_core::Result<MFSHUTDOWN_STATUS>;
}
impl IMFShutdown_Vtbl {
pub const fn new<Identity: IMFShutdown_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Shutdown<Identity: IMFShutdown_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFShutdown_Impl::Shutdown(this).into()
}
}
unsafe extern "system" fn GetShutdownStatus<Identity: IMFShutdown_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pstatus: *mut MFSHUTDOWN_STATUS) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFShutdown_Impl::GetShutdownStatus(this) {
Ok(ok__) => {
pstatus.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Shutdown: Shutdown::<Identity, OFFSET>,
GetShutdownStatus: GetShutdownStatus::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFShutdown as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFShutdown {}
windows_core::imp::define_interface!(IMFSignedLibrary, IMFSignedLibrary_Vtbl, 0x4a724bca_ff6a_4c07_8e0d_7a358421cf06);
windows_core::imp::interface_hierarchy!(IMFSignedLibrary, windows_core::IUnknown);
impl IMFSignedLibrary {
pub unsafe fn GetProcedureAddress<P0>(&self, name: P0, address: *mut *mut core::ffi::c_void) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCSTR>,
{
unsafe { (windows_core::Interface::vtable(self).GetProcedureAddress)(windows_core::Interface::as_raw(self), name.param().abi(), address as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSignedLibrary_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetProcedureAddress: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCSTR, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFSignedLibrary_Impl: windows_core::IUnknownImpl {
fn GetProcedureAddress(&self, name: &windows_core::PCSTR, address: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
}
impl IMFSignedLibrary_Vtbl {
pub const fn new<Identity: IMFSignedLibrary_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetProcedureAddress<Identity: IMFSignedLibrary_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, name: windows_core::PCSTR, address: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSignedLibrary_Impl::GetProcedureAddress(this, core::mem::transmute(&name), core::mem::transmute_copy(&address)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetProcedureAddress: GetProcedureAddress::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSignedLibrary as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSignedLibrary {}
windows_core::imp::define_interface!(IMFSimpleAudioVolume, IMFSimpleAudioVolume_Vtbl, 0x089edf13_cf71_4338_8d13_9e569dbdc319);
windows_core::imp::interface_hierarchy!(IMFSimpleAudioVolume, windows_core::IUnknown);
impl IMFSimpleAudioVolume {
pub unsafe fn SetMasterVolume(&self, flevel: f32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetMasterVolume)(windows_core::Interface::as_raw(self), flevel).ok() }
}
pub unsafe fn GetMasterVolume(&self) -> windows_core::Result<f32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMasterVolume)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetMute(&self, bmute: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetMute)(windows_core::Interface::as_raw(self), bmute.into()).ok() }
}
pub unsafe fn GetMute(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMute)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSimpleAudioVolume_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetMasterVolume: unsafe extern "system" fn(*mut core::ffi::c_void, f32) -> windows_core::HRESULT,
pub GetMasterVolume: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f32) -> windows_core::HRESULT,
pub SetMute: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT,
pub GetMute: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
}
pub trait IMFSimpleAudioVolume_Impl: windows_core::IUnknownImpl {
fn SetMasterVolume(&self, flevel: f32) -> windows_core::Result<()>;
fn GetMasterVolume(&self) -> windows_core::Result<f32>;
fn SetMute(&self, bmute: windows_core::BOOL) -> windows_core::Result<()>;
fn GetMute(&self) -> windows_core::Result<windows_core::BOOL>;
}
impl IMFSimpleAudioVolume_Vtbl {
pub const fn new<Identity: IMFSimpleAudioVolume_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetMasterVolume<Identity: IMFSimpleAudioVolume_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, flevel: f32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSimpleAudioVolume_Impl::SetMasterVolume(this, core::mem::transmute_copy(&flevel)).into()
}
}
unsafe extern "system" fn GetMasterVolume<Identity: IMFSimpleAudioVolume_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pflevel: *mut f32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSimpleAudioVolume_Impl::GetMasterVolume(this) {
Ok(ok__) => {
pflevel.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetMute<Identity: IMFSimpleAudioVolume_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, bmute: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSimpleAudioVolume_Impl::SetMute(this, core::mem::transmute_copy(&bmute)).into()
}
}
unsafe extern "system" fn GetMute<Identity: IMFSimpleAudioVolume_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbmute: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSimpleAudioVolume_Impl::GetMute(this) {
Ok(ok__) => {
pbmute.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetMasterVolume: SetMasterVolume::<Identity, OFFSET>,
GetMasterVolume: GetMasterVolume::<Identity, OFFSET>,
SetMute: SetMute::<Identity, OFFSET>,
GetMute: GetMute::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSimpleAudioVolume as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSimpleAudioVolume {}
windows_core::imp::define_interface!(IMFSinkWriter, IMFSinkWriter_Vtbl, 0x3137f1cd_fe5e_4805_a5d8_fb477448cb3d);
windows_core::imp::interface_hierarchy!(IMFSinkWriter, windows_core::IUnknown);
impl IMFSinkWriter {
pub unsafe fn AddStream<P0>(&self, ptargetmediatype: P0) -> windows_core::Result<u32>
where
P0: windows_core::Param<IMFMediaType>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).AddStream)(windows_core::Interface::as_raw(self), ptargetmediatype.param().abi(), &mut result__).map(|| result__)
}
}
pub unsafe fn SetInputMediaType<P1, P2>(&self, dwstreamindex: u32, pinputmediatype: P1, pencodingparameters: P2) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFMediaType>,
P2: windows_core::Param<IMFAttributes>,
{
unsafe { (windows_core::Interface::vtable(self).SetInputMediaType)(windows_core::Interface::as_raw(self), dwstreamindex, pinputmediatype.param().abi(), pencodingparameters.param().abi()).ok() }
}
pub unsafe fn BeginWriting(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).BeginWriting)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn WriteSample<P1>(&self, dwstreamindex: u32, psample: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFSample>,
{
unsafe { (windows_core::Interface::vtable(self).WriteSample)(windows_core::Interface::as_raw(self), dwstreamindex, psample.param().abi()).ok() }
}
pub unsafe fn SendStreamTick(&self, dwstreamindex: u32, lltimestamp: i64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SendStreamTick)(windows_core::Interface::as_raw(self), dwstreamindex, lltimestamp).ok() }
}
pub unsafe fn PlaceMarker(&self, dwstreamindex: u32, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).PlaceMarker)(windows_core::Interface::as_raw(self), dwstreamindex, pvcontext).ok() }
}
pub unsafe fn NotifyEndOfSegment(&self, dwstreamindex: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).NotifyEndOfSegment)(windows_core::Interface::as_raw(self), dwstreamindex).ok() }
}
pub unsafe fn Flush(&self, dwstreamindex: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Flush)(windows_core::Interface::as_raw(self), dwstreamindex).ok() }
}
pub unsafe fn Finalize(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Finalize)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn GetServiceForStream(&self, dwstreamindex: u32, guidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetServiceForStream)(windows_core::Interface::as_raw(self), dwstreamindex, guidservice, riid, ppvobject as _).ok() }
}
pub unsafe fn GetStatistics(&self, dwstreamindex: u32, pstats: *mut MF_SINK_WRITER_STATISTICS) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetStatistics)(windows_core::Interface::as_raw(self), dwstreamindex, pstats as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSinkWriter_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub AddStream: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub SetInputMediaType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub BeginWriting: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub WriteSample: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SendStreamTick: unsafe extern "system" fn(*mut core::ffi::c_void, u32, i64) -> windows_core::HRESULT,
pub PlaceMarker: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const core::ffi::c_void) -> windows_core::HRESULT,
pub NotifyEndOfSegment: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub Flush: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub Finalize: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetServiceForStream: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const windows_core::GUID, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetStatistics: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut MF_SINK_WRITER_STATISTICS) -> windows_core::HRESULT,
}
pub trait IMFSinkWriter_Impl: windows_core::IUnknownImpl {
fn AddStream(&self, ptargetmediatype: windows_core::Ref<IMFMediaType>) -> windows_core::Result<u32>;
fn SetInputMediaType(&self, dwstreamindex: u32, pinputmediatype: windows_core::Ref<IMFMediaType>, pencodingparameters: windows_core::Ref<IMFAttributes>) -> windows_core::Result<()>;
fn BeginWriting(&self) -> windows_core::Result<()>;
fn WriteSample(&self, dwstreamindex: u32, psample: windows_core::Ref<IMFSample>) -> windows_core::Result<()>;
fn SendStreamTick(&self, dwstreamindex: u32, lltimestamp: i64) -> windows_core::Result<()>;
fn PlaceMarker(&self, dwstreamindex: u32, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>;
fn NotifyEndOfSegment(&self, dwstreamindex: u32) -> windows_core::Result<()>;
fn Flush(&self, dwstreamindex: u32) -> windows_core::Result<()>;
fn Finalize(&self) -> windows_core::Result<()>;
fn GetServiceForStream(&self, dwstreamindex: u32, guidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
fn GetStatistics(&self, dwstreamindex: u32, pstats: *mut MF_SINK_WRITER_STATISTICS) -> windows_core::Result<()>;
}
impl IMFSinkWriter_Vtbl {
pub const fn new<Identity: IMFSinkWriter_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn AddStream<Identity: IMFSinkWriter_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ptargetmediatype: *mut core::ffi::c_void, pdwstreamindex: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSinkWriter_Impl::AddStream(this, core::mem::transmute_copy(&ptargetmediatype)) {
Ok(ok__) => {
pdwstreamindex.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetInputMediaType<Identity: IMFSinkWriter_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, pinputmediatype: *mut core::ffi::c_void, pencodingparameters: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSinkWriter_Impl::SetInputMediaType(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&pinputmediatype), core::mem::transmute_copy(&pencodingparameters)).into()
}
}
unsafe extern "system" fn BeginWriting<Identity: IMFSinkWriter_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSinkWriter_Impl::BeginWriting(this).into()
}
}
unsafe extern "system" fn WriteSample<Identity: IMFSinkWriter_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, psample: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSinkWriter_Impl::WriteSample(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&psample)).into()
}
}
unsafe extern "system" fn SendStreamTick<Identity: IMFSinkWriter_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, lltimestamp: i64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSinkWriter_Impl::SendStreamTick(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&lltimestamp)).into()
}
}
unsafe extern "system" fn PlaceMarker<Identity: IMFSinkWriter_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, pvcontext: *const core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSinkWriter_Impl::PlaceMarker(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&pvcontext)).into()
}
}
unsafe extern "system" fn NotifyEndOfSegment<Identity: IMFSinkWriter_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSinkWriter_Impl::NotifyEndOfSegment(this, core::mem::transmute_copy(&dwstreamindex)).into()
}
}
unsafe extern "system" fn Flush<Identity: IMFSinkWriter_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSinkWriter_Impl::Flush(this, core::mem::transmute_copy(&dwstreamindex)).into()
}
}
unsafe extern "system" fn Finalize<Identity: IMFSinkWriter_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSinkWriter_Impl::Finalize(this).into()
}
}
unsafe extern "system" fn GetServiceForStream<Identity: IMFSinkWriter_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, guidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSinkWriter_Impl::GetServiceForStream(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&guidservice), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobject)).into()
}
}
unsafe extern "system" fn GetStatistics<Identity: IMFSinkWriter_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, pstats: *mut MF_SINK_WRITER_STATISTICS) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSinkWriter_Impl::GetStatistics(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&pstats)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
AddStream: AddStream::<Identity, OFFSET>,
SetInputMediaType: SetInputMediaType::<Identity, OFFSET>,
BeginWriting: BeginWriting::<Identity, OFFSET>,
WriteSample: WriteSample::<Identity, OFFSET>,
SendStreamTick: SendStreamTick::<Identity, OFFSET>,
PlaceMarker: PlaceMarker::<Identity, OFFSET>,
NotifyEndOfSegment: NotifyEndOfSegment::<Identity, OFFSET>,
Flush: Flush::<Identity, OFFSET>,
Finalize: Finalize::<Identity, OFFSET>,
GetServiceForStream: GetServiceForStream::<Identity, OFFSET>,
GetStatistics: GetStatistics::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSinkWriter as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSinkWriter {}
windows_core::imp::define_interface!(IMFSinkWriterCallback, IMFSinkWriterCallback_Vtbl, 0x666f76de_33d2_41b9_a458_29ed0a972c58);
windows_core::imp::interface_hierarchy!(IMFSinkWriterCallback, windows_core::IUnknown);
impl IMFSinkWriterCallback {
pub unsafe fn OnFinalize(&self, hrstatus: windows_core::HRESULT) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).OnFinalize)(windows_core::Interface::as_raw(self), hrstatus).ok() }
}
pub unsafe fn OnMarker(&self, dwstreamindex: u32, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).OnMarker)(windows_core::Interface::as_raw(self), dwstreamindex, pvcontext).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSinkWriterCallback_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub OnFinalize: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::HRESULT) -> windows_core::HRESULT,
pub OnMarker: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFSinkWriterCallback_Impl: windows_core::IUnknownImpl {
fn OnFinalize(&self, hrstatus: windows_core::HRESULT) -> windows_core::Result<()>;
fn OnMarker(&self, dwstreamindex: u32, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>;
}
impl IMFSinkWriterCallback_Vtbl {
pub const fn new<Identity: IMFSinkWriterCallback_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn OnFinalize<Identity: IMFSinkWriterCallback_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hrstatus: windows_core::HRESULT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSinkWriterCallback_Impl::OnFinalize(this, core::mem::transmute_copy(&hrstatus)).into()
}
}
unsafe extern "system" fn OnMarker<Identity: IMFSinkWriterCallback_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, pvcontext: *const core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSinkWriterCallback_Impl::OnMarker(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&pvcontext)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
OnFinalize: OnFinalize::<Identity, OFFSET>,
OnMarker: OnMarker::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSinkWriterCallback as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSinkWriterCallback {}
windows_core::imp::define_interface!(IMFSinkWriterCallback2, IMFSinkWriterCallback2_Vtbl, 0x2456bd58_c067_4513_84fe_8d0c88ffdc61);
impl core::ops::Deref for IMFSinkWriterCallback2 {
type Target = IMFSinkWriterCallback;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFSinkWriterCallback2, windows_core::IUnknown, IMFSinkWriterCallback);
impl IMFSinkWriterCallback2 {
pub unsafe fn OnTransformChange(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).OnTransformChange)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn OnStreamError(&self, dwstreamindex: u32, hrstatus: windows_core::HRESULT) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).OnStreamError)(windows_core::Interface::as_raw(self), dwstreamindex, hrstatus).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSinkWriterCallback2_Vtbl {
pub base__: IMFSinkWriterCallback_Vtbl,
pub OnTransformChange: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub OnStreamError: unsafe extern "system" fn(*mut core::ffi::c_void, u32, windows_core::HRESULT) -> windows_core::HRESULT,
}
pub trait IMFSinkWriterCallback2_Impl: IMFSinkWriterCallback_Impl {
fn OnTransformChange(&self) -> windows_core::Result<()>;
fn OnStreamError(&self, dwstreamindex: u32, hrstatus: windows_core::HRESULT) -> windows_core::Result<()>;
}
impl IMFSinkWriterCallback2_Vtbl {
pub const fn new<Identity: IMFSinkWriterCallback2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn OnTransformChange<Identity: IMFSinkWriterCallback2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSinkWriterCallback2_Impl::OnTransformChange(this).into()
}
}
unsafe extern "system" fn OnStreamError<Identity: IMFSinkWriterCallback2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, hrstatus: windows_core::HRESULT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSinkWriterCallback2_Impl::OnStreamError(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&hrstatus)).into()
}
}
Self {
base__: IMFSinkWriterCallback_Vtbl::new::<Identity, OFFSET>(),
OnTransformChange: OnTransformChange::<Identity, OFFSET>,
OnStreamError: OnStreamError::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSinkWriterCallback2 as windows_core::Interface>::IID || iid == &<IMFSinkWriterCallback as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSinkWriterCallback2 {}
windows_core::imp::define_interface!(IMFSinkWriterEncoderConfig, IMFSinkWriterEncoderConfig_Vtbl, 0x17c3779e_3cde_4ede_8c60_3899f5f53ad6);
windows_core::imp::interface_hierarchy!(IMFSinkWriterEncoderConfig, windows_core::IUnknown);
impl IMFSinkWriterEncoderConfig {
pub unsafe fn SetTargetMediaType<P1, P2>(&self, dwstreamindex: u32, ptargetmediatype: P1, pencodingparameters: P2) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFMediaType>,
P2: windows_core::Param<IMFAttributes>,
{
unsafe { (windows_core::Interface::vtable(self).SetTargetMediaType)(windows_core::Interface::as_raw(self), dwstreamindex, ptargetmediatype.param().abi(), pencodingparameters.param().abi()).ok() }
}
pub unsafe fn PlaceEncodingParameters<P1>(&self, dwstreamindex: u32, pencodingparameters: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFAttributes>,
{
unsafe { (windows_core::Interface::vtable(self).PlaceEncodingParameters)(windows_core::Interface::as_raw(self), dwstreamindex, pencodingparameters.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSinkWriterEncoderConfig_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetTargetMediaType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub PlaceEncodingParameters: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFSinkWriterEncoderConfig_Impl: windows_core::IUnknownImpl {
fn SetTargetMediaType(&self, dwstreamindex: u32, ptargetmediatype: windows_core::Ref<IMFMediaType>, pencodingparameters: windows_core::Ref<IMFAttributes>) -> windows_core::Result<()>;
fn PlaceEncodingParameters(&self, dwstreamindex: u32, pencodingparameters: windows_core::Ref<IMFAttributes>) -> windows_core::Result<()>;
}
impl IMFSinkWriterEncoderConfig_Vtbl {
pub const fn new<Identity: IMFSinkWriterEncoderConfig_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetTargetMediaType<Identity: IMFSinkWriterEncoderConfig_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, ptargetmediatype: *mut core::ffi::c_void, pencodingparameters: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSinkWriterEncoderConfig_Impl::SetTargetMediaType(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&ptargetmediatype), core::mem::transmute_copy(&pencodingparameters)).into()
}
}
unsafe extern "system" fn PlaceEncodingParameters<Identity: IMFSinkWriterEncoderConfig_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, pencodingparameters: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSinkWriterEncoderConfig_Impl::PlaceEncodingParameters(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&pencodingparameters)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetTargetMediaType: SetTargetMediaType::<Identity, OFFSET>,
PlaceEncodingParameters: PlaceEncodingParameters::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSinkWriterEncoderConfig as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSinkWriterEncoderConfig {}
windows_core::imp::define_interface!(IMFSinkWriterEx, IMFSinkWriterEx_Vtbl, 0x588d72ab_5bc1_496a_8714_b70617141b25);
impl core::ops::Deref for IMFSinkWriterEx {
type Target = IMFSinkWriter;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFSinkWriterEx, windows_core::IUnknown, IMFSinkWriter);
impl IMFSinkWriterEx {
pub unsafe fn GetTransformForStream(&self, dwstreamindex: u32, dwtransformindex: u32, pguidcategory: Option<*mut windows_core::GUID>, pptransform: *mut Option<IMFTransform>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetTransformForStream)(windows_core::Interface::as_raw(self), dwstreamindex, dwtransformindex, pguidcategory.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pptransform)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSinkWriterEx_Vtbl {
pub base__: IMFSinkWriter_Vtbl,
pub GetTransformForStream: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, *mut windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFSinkWriterEx_Impl: IMFSinkWriter_Impl {
fn GetTransformForStream(&self, dwstreamindex: u32, dwtransformindex: u32, pguidcategory: *mut windows_core::GUID, pptransform: windows_core::OutRef<IMFTransform>) -> windows_core::Result<()>;
}
impl IMFSinkWriterEx_Vtbl {
pub const fn new<Identity: IMFSinkWriterEx_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetTransformForStream<Identity: IMFSinkWriterEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, dwtransformindex: u32, pguidcategory: *mut windows_core::GUID, pptransform: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSinkWriterEx_Impl::GetTransformForStream(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&dwtransformindex), core::mem::transmute_copy(&pguidcategory), core::mem::transmute_copy(&pptransform)).into()
}
}
Self { base__: IMFSinkWriter_Vtbl::new::<Identity, OFFSET>(), GetTransformForStream: GetTransformForStream::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSinkWriterEx as windows_core::Interface>::IID || iid == &<IMFSinkWriter as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSinkWriterEx {}
windows_core::imp::define_interface!(IMFSourceBuffer, IMFSourceBuffer_Vtbl, 0xe2cd3a4b_af25_4d3d_9110_da0e6f8ee877);
windows_core::imp::interface_hierarchy!(IMFSourceBuffer, windows_core::IUnknown);
impl IMFSourceBuffer {
pub unsafe fn GetUpdating(&self) -> windows_core::BOOL {
unsafe { (windows_core::Interface::vtable(self).GetUpdating)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetBuffered(&self) -> windows_core::Result<IMFMediaTimeRange> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetBuffered)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetTimeStampOffset(&self) -> f64 {
unsafe { (windows_core::Interface::vtable(self).GetTimeStampOffset)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn SetTimeStampOffset(&self, offset: f64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetTimeStampOffset)(windows_core::Interface::as_raw(self), offset).ok() }
}
pub unsafe fn GetAppendWindowStart(&self) -> f64 {
unsafe { (windows_core::Interface::vtable(self).GetAppendWindowStart)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn SetAppendWindowStart(&self, time: f64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetAppendWindowStart)(windows_core::Interface::as_raw(self), time).ok() }
}
pub unsafe fn GetAppendWindowEnd(&self) -> f64 {
unsafe { (windows_core::Interface::vtable(self).GetAppendWindowEnd)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn SetAppendWindowEnd(&self, time: f64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetAppendWindowEnd)(windows_core::Interface::as_raw(self), time).ok() }
}
pub unsafe fn Append(&self, pdata: &[u8]) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Append)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap()).ok() }
}
pub unsafe fn AppendByteStream<P0>(&self, pstream: P0, pmaxlen: Option<*const u64>) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFByteStream>,
{
unsafe { (windows_core::Interface::vtable(self).AppendByteStream)(windows_core::Interface::as_raw(self), pstream.param().abi(), pmaxlen.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn Abort(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Abort)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn Remove(&self, start: f64, end: f64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Remove)(windows_core::Interface::as_raw(self), start, end).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSourceBuffer_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetUpdating: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::BOOL,
pub GetBuffered: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetTimeStampOffset: unsafe extern "system" fn(*mut core::ffi::c_void) -> f64,
pub SetTimeStampOffset: unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
pub GetAppendWindowStart: unsafe extern "system" fn(*mut core::ffi::c_void) -> f64,
pub SetAppendWindowStart: unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
pub GetAppendWindowEnd: unsafe extern "system" fn(*mut core::ffi::c_void) -> f64,
pub SetAppendWindowEnd: unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
pub Append: unsafe extern "system" fn(*mut core::ffi::c_void, *const u8, u32) -> windows_core::HRESULT,
pub AppendByteStream: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const u64) -> windows_core::HRESULT,
pub Abort: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Remove: unsafe extern "system" fn(*mut core::ffi::c_void, f64, f64) -> windows_core::HRESULT,
}
pub trait IMFSourceBuffer_Impl: windows_core::IUnknownImpl {
fn GetUpdating(&self) -> windows_core::BOOL;
fn GetBuffered(&self) -> windows_core::Result<IMFMediaTimeRange>;
fn GetTimeStampOffset(&self) -> f64;
fn SetTimeStampOffset(&self, offset: f64) -> windows_core::Result<()>;
fn GetAppendWindowStart(&self) -> f64;
fn SetAppendWindowStart(&self, time: f64) -> windows_core::Result<()>;
fn GetAppendWindowEnd(&self) -> f64;
fn SetAppendWindowEnd(&self, time: f64) -> windows_core::Result<()>;
fn Append(&self, pdata: *const u8, len: u32) -> windows_core::Result<()>;
fn AppendByteStream(&self, pstream: windows_core::Ref<IMFByteStream>, pmaxlen: *const u64) -> windows_core::Result<()>;
fn Abort(&self) -> windows_core::Result<()>;
fn Remove(&self, start: f64, end: f64) -> windows_core::Result<()>;
}
impl IMFSourceBuffer_Vtbl {
pub const fn new<Identity: IMFSourceBuffer_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetUpdating<Identity: IMFSourceBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::BOOL {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceBuffer_Impl::GetUpdating(this)
}
}
unsafe extern "system" fn GetBuffered<Identity: IMFSourceBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppbuffered: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSourceBuffer_Impl::GetBuffered(this) {
Ok(ok__) => {
ppbuffered.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetTimeStampOffset<Identity: IMFSourceBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> f64 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceBuffer_Impl::GetTimeStampOffset(this)
}
}
unsafe extern "system" fn SetTimeStampOffset<Identity: IMFSourceBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, offset: f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceBuffer_Impl::SetTimeStampOffset(this, core::mem::transmute_copy(&offset)).into()
}
}
unsafe extern "system" fn GetAppendWindowStart<Identity: IMFSourceBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> f64 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceBuffer_Impl::GetAppendWindowStart(this)
}
}
unsafe extern "system" fn SetAppendWindowStart<Identity: IMFSourceBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, time: f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceBuffer_Impl::SetAppendWindowStart(this, core::mem::transmute_copy(&time)).into()
}
}
unsafe extern "system" fn GetAppendWindowEnd<Identity: IMFSourceBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> f64 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceBuffer_Impl::GetAppendWindowEnd(this)
}
}
unsafe extern "system" fn SetAppendWindowEnd<Identity: IMFSourceBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, time: f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceBuffer_Impl::SetAppendWindowEnd(this, core::mem::transmute_copy(&time)).into()
}
}
unsafe extern "system" fn Append<Identity: IMFSourceBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdata: *const u8, len: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceBuffer_Impl::Append(this, core::mem::transmute_copy(&pdata), core::mem::transmute_copy(&len)).into()
}
}
unsafe extern "system" fn AppendByteStream<Identity: IMFSourceBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void, pmaxlen: *const u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceBuffer_Impl::AppendByteStream(this, core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&pmaxlen)).into()
}
}
unsafe extern "system" fn Abort<Identity: IMFSourceBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceBuffer_Impl::Abort(this).into()
}
}
unsafe extern "system" fn Remove<Identity: IMFSourceBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, start: f64, end: f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceBuffer_Impl::Remove(this, core::mem::transmute_copy(&start), core::mem::transmute_copy(&end)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetUpdating: GetUpdating::<Identity, OFFSET>,
GetBuffered: GetBuffered::<Identity, OFFSET>,
GetTimeStampOffset: GetTimeStampOffset::<Identity, OFFSET>,
SetTimeStampOffset: SetTimeStampOffset::<Identity, OFFSET>,
GetAppendWindowStart: GetAppendWindowStart::<Identity, OFFSET>,
SetAppendWindowStart: SetAppendWindowStart::<Identity, OFFSET>,
GetAppendWindowEnd: GetAppendWindowEnd::<Identity, OFFSET>,
SetAppendWindowEnd: SetAppendWindowEnd::<Identity, OFFSET>,
Append: Append::<Identity, OFFSET>,
AppendByteStream: AppendByteStream::<Identity, OFFSET>,
Abort: Abort::<Identity, OFFSET>,
Remove: Remove::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSourceBuffer as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSourceBuffer {}
windows_core::imp::define_interface!(IMFSourceBufferAppendMode, IMFSourceBufferAppendMode_Vtbl, 0x19666fb4_babe_4c55_bc03_0a074da37e2a);
windows_core::imp::interface_hierarchy!(IMFSourceBufferAppendMode, windows_core::IUnknown);
impl IMFSourceBufferAppendMode {
pub unsafe fn GetAppendMode(&self) -> MF_MSE_APPEND_MODE {
unsafe { (windows_core::Interface::vtable(self).GetAppendMode)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn SetAppendMode(&self, mode: MF_MSE_APPEND_MODE) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetAppendMode)(windows_core::Interface::as_raw(self), mode).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSourceBufferAppendMode_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetAppendMode: unsafe extern "system" fn(*mut core::ffi::c_void) -> MF_MSE_APPEND_MODE,
pub SetAppendMode: unsafe extern "system" fn(*mut core::ffi::c_void, MF_MSE_APPEND_MODE) -> windows_core::HRESULT,
}
pub trait IMFSourceBufferAppendMode_Impl: windows_core::IUnknownImpl {
fn GetAppendMode(&self) -> MF_MSE_APPEND_MODE;
fn SetAppendMode(&self, mode: MF_MSE_APPEND_MODE) -> windows_core::Result<()>;
}
impl IMFSourceBufferAppendMode_Vtbl {
pub const fn new<Identity: IMFSourceBufferAppendMode_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetAppendMode<Identity: IMFSourceBufferAppendMode_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> MF_MSE_APPEND_MODE {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceBufferAppendMode_Impl::GetAppendMode(this)
}
}
unsafe extern "system" fn SetAppendMode<Identity: IMFSourceBufferAppendMode_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, mode: MF_MSE_APPEND_MODE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceBufferAppendMode_Impl::SetAppendMode(this, core::mem::transmute_copy(&mode)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetAppendMode: GetAppendMode::<Identity, OFFSET>,
SetAppendMode: SetAppendMode::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSourceBufferAppendMode as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSourceBufferAppendMode {}
windows_core::imp::define_interface!(IMFSourceBufferList, IMFSourceBufferList_Vtbl, 0x249981f8_8325_41f3_b80c_3b9e3aad0cbe);
windows_core::imp::interface_hierarchy!(IMFSourceBufferList, windows_core::IUnknown);
impl IMFSourceBufferList {
pub unsafe fn GetLength(&self) -> u32 {
unsafe { (windows_core::Interface::vtable(self).GetLength)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetSourceBuffer(&self, index: u32) -> Option<IMFSourceBuffer> {
unsafe { (windows_core::Interface::vtable(self).GetSourceBuffer)(windows_core::Interface::as_raw(self), index) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSourceBufferList_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetLength: unsafe extern "system" fn(*mut core::ffi::c_void) -> u32,
pub GetSourceBuffer: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> Option<IMFSourceBuffer>,
}
pub trait IMFSourceBufferList_Impl: windows_core::IUnknownImpl {
fn GetLength(&self) -> u32;
fn GetSourceBuffer(&self, index: u32) -> Option<IMFSourceBuffer>;
}
impl IMFSourceBufferList_Vtbl {
pub const fn new<Identity: IMFSourceBufferList_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetLength<Identity: IMFSourceBufferList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> u32 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceBufferList_Impl::GetLength(this)
}
}
unsafe extern "system" fn GetSourceBuffer<Identity: IMFSourceBufferList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, index: u32) -> Option<IMFSourceBuffer> {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceBufferList_Impl::GetSourceBuffer(this, core::mem::transmute_copy(&index))
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetLength: GetLength::<Identity, OFFSET>,
GetSourceBuffer: GetSourceBuffer::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSourceBufferList as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSourceBufferList {}
windows_core::imp::define_interface!(IMFSourceBufferNotify, IMFSourceBufferNotify_Vtbl, 0x87e47623_2ceb_45d6_9b88_d8520c4dcbbc);
windows_core::imp::interface_hierarchy!(IMFSourceBufferNotify, windows_core::IUnknown);
impl IMFSourceBufferNotify {
pub unsafe fn OnUpdateStart(&self) {
unsafe { (windows_core::Interface::vtable(self).OnUpdateStart)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn OnAbort(&self) {
unsafe { (windows_core::Interface::vtable(self).OnAbort)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn OnError(&self, hr: windows_core::HRESULT) {
unsafe { (windows_core::Interface::vtable(self).OnError)(windows_core::Interface::as_raw(self), hr) }
}
pub unsafe fn OnUpdate(&self) {
unsafe { (windows_core::Interface::vtable(self).OnUpdate)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn OnUpdateEnd(&self) {
unsafe { (windows_core::Interface::vtable(self).OnUpdateEnd)(windows_core::Interface::as_raw(self)) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSourceBufferNotify_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub OnUpdateStart: unsafe extern "system" fn(*mut core::ffi::c_void),
pub OnAbort: unsafe extern "system" fn(*mut core::ffi::c_void),
pub OnError: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::HRESULT),
pub OnUpdate: unsafe extern "system" fn(*mut core::ffi::c_void),
pub OnUpdateEnd: unsafe extern "system" fn(*mut core::ffi::c_void),
}
pub trait IMFSourceBufferNotify_Impl: windows_core::IUnknownImpl {
fn OnUpdateStart(&self);
fn OnAbort(&self);
fn OnError(&self, hr: windows_core::HRESULT);
fn OnUpdate(&self);
fn OnUpdateEnd(&self);
}
impl IMFSourceBufferNotify_Vtbl {
pub const fn new<Identity: IMFSourceBufferNotify_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn OnUpdateStart<Identity: IMFSourceBufferNotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceBufferNotify_Impl::OnUpdateStart(this)
}
}
unsafe extern "system" fn OnAbort<Identity: IMFSourceBufferNotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceBufferNotify_Impl::OnAbort(this)
}
}
unsafe extern "system" fn OnError<Identity: IMFSourceBufferNotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hr: windows_core::HRESULT) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceBufferNotify_Impl::OnError(this, core::mem::transmute_copy(&hr))
}
}
unsafe extern "system" fn OnUpdate<Identity: IMFSourceBufferNotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceBufferNotify_Impl::OnUpdate(this)
}
}
unsafe extern "system" fn OnUpdateEnd<Identity: IMFSourceBufferNotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceBufferNotify_Impl::OnUpdateEnd(this)
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
OnUpdateStart: OnUpdateStart::<Identity, OFFSET>,
OnAbort: OnAbort::<Identity, OFFSET>,
OnError: OnError::<Identity, OFFSET>,
OnUpdate: OnUpdate::<Identity, OFFSET>,
OnUpdateEnd: OnUpdateEnd::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSourceBufferNotify as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSourceBufferNotify {}
windows_core::imp::define_interface!(IMFSourceOpenMonitor, IMFSourceOpenMonitor_Vtbl, 0x059054b3_027c_494c_a27d_9113291cf87f);
windows_core::imp::interface_hierarchy!(IMFSourceOpenMonitor, windows_core::IUnknown);
impl IMFSourceOpenMonitor {
pub unsafe fn OnSourceEvent<P0>(&self, pevent: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFMediaEvent>,
{
unsafe { (windows_core::Interface::vtable(self).OnSourceEvent)(windows_core::Interface::as_raw(self), pevent.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSourceOpenMonitor_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub OnSourceEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFSourceOpenMonitor_Impl: windows_core::IUnknownImpl {
fn OnSourceEvent(&self, pevent: windows_core::Ref<IMFMediaEvent>) -> windows_core::Result<()>;
}
impl IMFSourceOpenMonitor_Vtbl {
pub const fn new<Identity: IMFSourceOpenMonitor_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn OnSourceEvent<Identity: IMFSourceOpenMonitor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pevent: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceOpenMonitor_Impl::OnSourceEvent(this, core::mem::transmute_copy(&pevent)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), OnSourceEvent: OnSourceEvent::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSourceOpenMonitor as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSourceOpenMonitor {}
windows_core::imp::define_interface!(IMFSourceReader, IMFSourceReader_Vtbl, 0x70ae66f2_c809_4e4f_8915_bdcb406b7993);
windows_core::imp::interface_hierarchy!(IMFSourceReader, windows_core::IUnknown);
impl IMFSourceReader {
pub unsafe fn GetStreamSelection(&self, dwstreamindex: u32) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamSelection)(windows_core::Interface::as_raw(self), dwstreamindex, &mut result__).map(|| result__)
}
}
pub unsafe fn SetStreamSelection(&self, dwstreamindex: u32, fselected: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetStreamSelection)(windows_core::Interface::as_raw(self), dwstreamindex, fselected.into()).ok() }
}
pub unsafe fn GetNativeMediaType(&self, dwstreamindex: u32, dwmediatypeindex: u32) -> windows_core::Result<IMFMediaType> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetNativeMediaType)(windows_core::Interface::as_raw(self), dwstreamindex, dwmediatypeindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetCurrentMediaType(&self, dwstreamindex: u32) -> windows_core::Result<IMFMediaType> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetCurrentMediaType)(windows_core::Interface::as_raw(self), dwstreamindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn SetCurrentMediaType<P2>(&self, dwstreamindex: u32, pdwreserved: Option<*const u32>, pmediatype: P2) -> windows_core::Result<()>
where
P2: windows_core::Param<IMFMediaType>,
{
unsafe { (windows_core::Interface::vtable(self).SetCurrentMediaType)(windows_core::Interface::as_raw(self), dwstreamindex, pdwreserved.unwrap_or(core::mem::zeroed()) as _, pmediatype.param().abi()).ok() }
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn SetCurrentPosition(&self, guidtimeformat: *const windows_core::GUID, varposition: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetCurrentPosition)(windows_core::Interface::as_raw(self), guidtimeformat, core::mem::transmute(varposition)).ok() }
}
pub unsafe fn ReadSample(&self, dwstreamindex: u32, dwcontrolflags: u32, pdwactualstreamindex: Option<*mut u32>, pdwstreamflags: Option<*mut u32>, plltimestamp: Option<*mut i64>, ppsample: Option<*mut Option<IMFSample>>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).ReadSample)(windows_core::Interface::as_raw(self), dwstreamindex, dwcontrolflags, pdwactualstreamindex.unwrap_or(core::mem::zeroed()) as _, pdwstreamflags.unwrap_or(core::mem::zeroed()) as _, plltimestamp.unwrap_or(core::mem::zeroed()) as _, ppsample.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn Flush(&self, dwstreamindex: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Flush)(windows_core::Interface::as_raw(self), dwstreamindex).ok() }
}
pub unsafe fn GetServiceForStream(&self, dwstreamindex: u32, guidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetServiceForStream)(windows_core::Interface::as_raw(self), dwstreamindex, guidservice, riid, ppvobject as _).ok() }
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn GetPresentationAttribute(&self, dwstreamindex: u32, guidattribute: *const windows_core::GUID) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetPresentationAttribute)(windows_core::Interface::as_raw(self), dwstreamindex, guidattribute, &mut result__).map(|| core::mem::transmute(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSourceReader_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetStreamSelection: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub SetStreamSelection: unsafe extern "system" fn(*mut core::ffi::c_void, u32, windows_core::BOOL) -> windows_core::HRESULT,
pub GetNativeMediaType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetCurrentMediaType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetCurrentMediaType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub SetCurrentPosition: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
SetCurrentPosition: usize,
pub ReadSample: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, *mut u32, *mut u32, *mut i64, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Flush: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub GetServiceForStream: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const windows_core::GUID, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub GetPresentationAttribute: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const windows_core::GUID, *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
GetPresentationAttribute: usize,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFSourceReader_Impl: windows_core::IUnknownImpl {
fn GetStreamSelection(&self, dwstreamindex: u32) -> windows_core::Result<windows_core::BOOL>;
fn SetStreamSelection(&self, dwstreamindex: u32, fselected: windows_core::BOOL) -> windows_core::Result<()>;
fn GetNativeMediaType(&self, dwstreamindex: u32, dwmediatypeindex: u32) -> windows_core::Result<IMFMediaType>;
fn GetCurrentMediaType(&self, dwstreamindex: u32) -> windows_core::Result<IMFMediaType>;
fn SetCurrentMediaType(&self, dwstreamindex: u32, pdwreserved: *const u32, pmediatype: windows_core::Ref<IMFMediaType>) -> windows_core::Result<()>;
fn SetCurrentPosition(&self, guidtimeformat: *const windows_core::GUID, varposition: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>;
fn ReadSample(&self, dwstreamindex: u32, dwcontrolflags: u32, pdwactualstreamindex: *mut u32, pdwstreamflags: *mut u32, plltimestamp: *mut i64, ppsample: windows_core::OutRef<IMFSample>) -> windows_core::Result<()>;
fn Flush(&self, dwstreamindex: u32) -> windows_core::Result<()>;
fn GetServiceForStream(&self, dwstreamindex: u32, guidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>;
fn GetPresentationAttribute(&self, dwstreamindex: u32, guidattribute: *const windows_core::GUID) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFSourceReader_Vtbl {
pub const fn new<Identity: IMFSourceReader_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetStreamSelection<Identity: IMFSourceReader_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, pfselected: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSourceReader_Impl::GetStreamSelection(this, core::mem::transmute_copy(&dwstreamindex)) {
Ok(ok__) => {
pfselected.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetStreamSelection<Identity: IMFSourceReader_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, fselected: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceReader_Impl::SetStreamSelection(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&fselected)).into()
}
}
unsafe extern "system" fn GetNativeMediaType<Identity: IMFSourceReader_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, dwmediatypeindex: u32, ppmediatype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSourceReader_Impl::GetNativeMediaType(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&dwmediatypeindex)) {
Ok(ok__) => {
ppmediatype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetCurrentMediaType<Identity: IMFSourceReader_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, ppmediatype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSourceReader_Impl::GetCurrentMediaType(this, core::mem::transmute_copy(&dwstreamindex)) {
Ok(ok__) => {
ppmediatype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetCurrentMediaType<Identity: IMFSourceReader_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, pdwreserved: *const u32, pmediatype: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceReader_Impl::SetCurrentMediaType(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&pdwreserved), core::mem::transmute_copy(&pmediatype)).into()
}
}
unsafe extern "system" fn SetCurrentPosition<Identity: IMFSourceReader_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidtimeformat: *const windows_core::GUID, varposition: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceReader_Impl::SetCurrentPosition(this, core::mem::transmute_copy(&guidtimeformat), core::mem::transmute_copy(&varposition)).into()
}
}
unsafe extern "system" fn ReadSample<Identity: IMFSourceReader_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, dwcontrolflags: u32, pdwactualstreamindex: *mut u32, pdwstreamflags: *mut u32, plltimestamp: *mut i64, ppsample: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceReader_Impl::ReadSample(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&dwcontrolflags), core::mem::transmute_copy(&pdwactualstreamindex), core::mem::transmute_copy(&pdwstreamflags), core::mem::transmute_copy(&plltimestamp), core::mem::transmute_copy(&ppsample)).into()
}
}
unsafe extern "system" fn Flush<Identity: IMFSourceReader_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceReader_Impl::Flush(this, core::mem::transmute_copy(&dwstreamindex)).into()
}
}
unsafe extern "system" fn GetServiceForStream<Identity: IMFSourceReader_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, guidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceReader_Impl::GetServiceForStream(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&guidservice), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobject)).into()
}
}
unsafe extern "system" fn GetPresentationAttribute<Identity: IMFSourceReader_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, guidattribute: *const windows_core::GUID, pvarattribute: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSourceReader_Impl::GetPresentationAttribute(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&guidattribute)) {
Ok(ok__) => {
pvarattribute.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetStreamSelection: GetStreamSelection::<Identity, OFFSET>,
SetStreamSelection: SetStreamSelection::<Identity, OFFSET>,
GetNativeMediaType: GetNativeMediaType::<Identity, OFFSET>,
GetCurrentMediaType: GetCurrentMediaType::<Identity, OFFSET>,
SetCurrentMediaType: SetCurrentMediaType::<Identity, OFFSET>,
SetCurrentPosition: SetCurrentPosition::<Identity, OFFSET>,
ReadSample: ReadSample::<Identity, OFFSET>,
Flush: Flush::<Identity, OFFSET>,
GetServiceForStream: GetServiceForStream::<Identity, OFFSET>,
GetPresentationAttribute: GetPresentationAttribute::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSourceReader as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFSourceReader {}
windows_core::imp::define_interface!(IMFSourceReaderCallback, IMFSourceReaderCallback_Vtbl, 0xdeec8d99_fa1d_4d82_84c2_2c8969944867);
windows_core::imp::interface_hierarchy!(IMFSourceReaderCallback, windows_core::IUnknown);
impl IMFSourceReaderCallback {
pub unsafe fn OnReadSample<P4>(&self, hrstatus: windows_core::HRESULT, dwstreamindex: u32, dwstreamflags: u32, lltimestamp: i64, psample: P4) -> windows_core::Result<()>
where
P4: windows_core::Param<IMFSample>,
{
unsafe { (windows_core::Interface::vtable(self).OnReadSample)(windows_core::Interface::as_raw(self), hrstatus, dwstreamindex, dwstreamflags, lltimestamp, psample.param().abi()).ok() }
}
pub unsafe fn OnFlush(&self, dwstreamindex: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).OnFlush)(windows_core::Interface::as_raw(self), dwstreamindex).ok() }
}
pub unsafe fn OnEvent<P1>(&self, dwstreamindex: u32, pevent: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFMediaEvent>,
{
unsafe { (windows_core::Interface::vtable(self).OnEvent)(windows_core::Interface::as_raw(self), dwstreamindex, pevent.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSourceReaderCallback_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub OnReadSample: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::HRESULT, u32, u32, i64, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub OnFlush: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub OnEvent: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFSourceReaderCallback_Impl: windows_core::IUnknownImpl {
fn OnReadSample(&self, hrstatus: windows_core::HRESULT, dwstreamindex: u32, dwstreamflags: u32, lltimestamp: i64, psample: windows_core::Ref<IMFSample>) -> windows_core::Result<()>;
fn OnFlush(&self, dwstreamindex: u32) -> windows_core::Result<()>;
fn OnEvent(&self, dwstreamindex: u32, pevent: windows_core::Ref<IMFMediaEvent>) -> windows_core::Result<()>;
}
impl IMFSourceReaderCallback_Vtbl {
pub const fn new<Identity: IMFSourceReaderCallback_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn OnReadSample<Identity: IMFSourceReaderCallback_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hrstatus: windows_core::HRESULT, dwstreamindex: u32, dwstreamflags: u32, lltimestamp: i64, psample: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceReaderCallback_Impl::OnReadSample(this, core::mem::transmute_copy(&hrstatus), core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&dwstreamflags), core::mem::transmute_copy(&lltimestamp), core::mem::transmute_copy(&psample)).into()
}
}
unsafe extern "system" fn OnFlush<Identity: IMFSourceReaderCallback_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceReaderCallback_Impl::OnFlush(this, core::mem::transmute_copy(&dwstreamindex)).into()
}
}
unsafe extern "system" fn OnEvent<Identity: IMFSourceReaderCallback_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, pevent: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceReaderCallback_Impl::OnEvent(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&pevent)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
OnReadSample: OnReadSample::<Identity, OFFSET>,
OnFlush: OnFlush::<Identity, OFFSET>,
OnEvent: OnEvent::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSourceReaderCallback as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSourceReaderCallback {}
windows_core::imp::define_interface!(IMFSourceReaderCallback2, IMFSourceReaderCallback2_Vtbl, 0xcf839fe6_8c2a_4dd2_b6ea_c22d6961af05);
impl core::ops::Deref for IMFSourceReaderCallback2 {
type Target = IMFSourceReaderCallback;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFSourceReaderCallback2, windows_core::IUnknown, IMFSourceReaderCallback);
impl IMFSourceReaderCallback2 {
pub unsafe fn OnTransformChange(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).OnTransformChange)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn OnStreamError(&self, dwstreamindex: u32, hrstatus: windows_core::HRESULT) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).OnStreamError)(windows_core::Interface::as_raw(self), dwstreamindex, hrstatus).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSourceReaderCallback2_Vtbl {
pub base__: IMFSourceReaderCallback_Vtbl,
pub OnTransformChange: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub OnStreamError: unsafe extern "system" fn(*mut core::ffi::c_void, u32, windows_core::HRESULT) -> windows_core::HRESULT,
}
pub trait IMFSourceReaderCallback2_Impl: IMFSourceReaderCallback_Impl {
fn OnTransformChange(&self) -> windows_core::Result<()>;
fn OnStreamError(&self, dwstreamindex: u32, hrstatus: windows_core::HRESULT) -> windows_core::Result<()>;
}
impl IMFSourceReaderCallback2_Vtbl {
pub const fn new<Identity: IMFSourceReaderCallback2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn OnTransformChange<Identity: IMFSourceReaderCallback2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceReaderCallback2_Impl::OnTransformChange(this).into()
}
}
unsafe extern "system" fn OnStreamError<Identity: IMFSourceReaderCallback2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, hrstatus: windows_core::HRESULT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceReaderCallback2_Impl::OnStreamError(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&hrstatus)).into()
}
}
Self {
base__: IMFSourceReaderCallback_Vtbl::new::<Identity, OFFSET>(),
OnTransformChange: OnTransformChange::<Identity, OFFSET>,
OnStreamError: OnStreamError::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSourceReaderCallback2 as windows_core::Interface>::IID || iid == &<IMFSourceReaderCallback as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSourceReaderCallback2 {}
windows_core::imp::define_interface!(IMFSourceReaderEx, IMFSourceReaderEx_Vtbl, 0x7b981cf0_560e_4116_9875_b099895f23d7);
impl core::ops::Deref for IMFSourceReaderEx {
type Target = IMFSourceReader;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFSourceReaderEx, windows_core::IUnknown, IMFSourceReader);
impl IMFSourceReaderEx {
pub unsafe fn SetNativeMediaType<P1>(&self, dwstreamindex: u32, pmediatype: P1) -> windows_core::Result<u32>
where
P1: windows_core::Param<IMFMediaType>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).SetNativeMediaType)(windows_core::Interface::as_raw(self), dwstreamindex, pmediatype.param().abi(), &mut result__).map(|| result__)
}
}
pub unsafe fn AddTransformForStream<P1>(&self, dwstreamindex: u32, ptransformoractivate: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).AddTransformForStream)(windows_core::Interface::as_raw(self), dwstreamindex, ptransformoractivate.param().abi()).ok() }
}
pub unsafe fn RemoveAllTransformsForStream(&self, dwstreamindex: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RemoveAllTransformsForStream)(windows_core::Interface::as_raw(self), dwstreamindex).ok() }
}
pub unsafe fn GetTransformForStream(&self, dwstreamindex: u32, dwtransformindex: u32, pguidcategory: Option<*mut windows_core::GUID>, pptransform: *mut Option<IMFTransform>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetTransformForStream)(windows_core::Interface::as_raw(self), dwstreamindex, dwtransformindex, pguidcategory.unwrap_or(core::mem::zeroed()) as _, core::mem::transmute(pptransform)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSourceReaderEx_Vtbl {
pub base__: IMFSourceReader_Vtbl,
pub SetNativeMediaType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub AddTransformForStream: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RemoveAllTransformsForStream: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub GetTransformForStream: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, *mut windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFSourceReaderEx_Impl: IMFSourceReader_Impl {
fn SetNativeMediaType(&self, dwstreamindex: u32, pmediatype: windows_core::Ref<IMFMediaType>) -> windows_core::Result<u32>;
fn AddTransformForStream(&self, dwstreamindex: u32, ptransformoractivate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn RemoveAllTransformsForStream(&self, dwstreamindex: u32) -> windows_core::Result<()>;
fn GetTransformForStream(&self, dwstreamindex: u32, dwtransformindex: u32, pguidcategory: *mut windows_core::GUID, pptransform: windows_core::OutRef<IMFTransform>) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFSourceReaderEx_Vtbl {
pub const fn new<Identity: IMFSourceReaderEx_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetNativeMediaType<Identity: IMFSourceReaderEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, pmediatype: *mut core::ffi::c_void, pdwstreamflags: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSourceReaderEx_Impl::SetNativeMediaType(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&pmediatype)) {
Ok(ok__) => {
pdwstreamflags.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn AddTransformForStream<Identity: IMFSourceReaderEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, ptransformoractivate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceReaderEx_Impl::AddTransformForStream(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&ptransformoractivate)).into()
}
}
unsafe extern "system" fn RemoveAllTransformsForStream<Identity: IMFSourceReaderEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceReaderEx_Impl::RemoveAllTransformsForStream(this, core::mem::transmute_copy(&dwstreamindex)).into()
}
}
unsafe extern "system" fn GetTransformForStream<Identity: IMFSourceReaderEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamindex: u32, dwtransformindex: u32, pguidcategory: *mut windows_core::GUID, pptransform: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceReaderEx_Impl::GetTransformForStream(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&dwtransformindex), core::mem::transmute_copy(&pguidcategory), core::mem::transmute_copy(&pptransform)).into()
}
}
Self {
base__: IMFSourceReader_Vtbl::new::<Identity, OFFSET>(),
SetNativeMediaType: SetNativeMediaType::<Identity, OFFSET>,
AddTransformForStream: AddTransformForStream::<Identity, OFFSET>,
RemoveAllTransformsForStream: RemoveAllTransformsForStream::<Identity, OFFSET>,
GetTransformForStream: GetTransformForStream::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSourceReaderEx as windows_core::Interface>::IID || iid == &<IMFSourceReader as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFSourceReaderEx {}
windows_core::imp::define_interface!(IMFSourceResolver, IMFSourceResolver_Vtbl, 0xfbe5a32d_a497_4b61_bb85_97b1a848a6e3);
windows_core::imp::interface_hierarchy!(IMFSourceResolver, windows_core::IUnknown);
impl IMFSourceResolver {
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn CreateObjectFromURL<P0, P2>(&self, pwszurl: P0, dwflags: u32, pprops: P2, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut Option<windows_core::IUnknown>) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P2: windows_core::Param<super::super::UI::Shell::PropertiesSystem::IPropertyStore>,
{
unsafe { (windows_core::Interface::vtable(self).CreateObjectFromURL)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), dwflags, pprops.param().abi(), pobjecttype as _, core::mem::transmute(ppobject)).ok() }
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn CreateObjectFromByteStream<P0, P1, P3>(&self, pbytestream: P0, pwszurl: P1, dwflags: u32, pprops: P3, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut Option<windows_core::IUnknown>) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFByteStream>,
P1: windows_core::Param<windows_core::PCWSTR>,
P3: windows_core::Param<super::super::UI::Shell::PropertiesSystem::IPropertyStore>,
{
unsafe { (windows_core::Interface::vtable(self).CreateObjectFromByteStream)(windows_core::Interface::as_raw(self), pbytestream.param().abi(), pwszurl.param().abi(), dwflags, pprops.param().abi(), pobjecttype as _, core::mem::transmute(ppobject)).ok() }
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn BeginCreateObjectFromURL<P0, P2, P4, P5>(&self, pwszurl: P0, dwflags: u32, pprops: P2, ppiunknowncancelcookie: Option<*mut Option<windows_core::IUnknown>>, pcallback: P4, punkstate: P5) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P2: windows_core::Param<super::super::UI::Shell::PropertiesSystem::IPropertyStore>,
P4: windows_core::Param<IMFAsyncCallback>,
P5: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).BeginCreateObjectFromURL)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), dwflags, pprops.param().abi(), ppiunknowncancelcookie.unwrap_or(core::mem::zeroed()) as _, pcallback.param().abi(), punkstate.param().abi()).ok() }
}
pub unsafe fn EndCreateObjectFromURL<P0>(&self, presult: P0, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut Option<windows_core::IUnknown>) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncResult>,
{
unsafe { (windows_core::Interface::vtable(self).EndCreateObjectFromURL)(windows_core::Interface::as_raw(self), presult.param().abi(), pobjecttype as _, core::mem::transmute(ppobject)).ok() }
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub unsafe fn BeginCreateObjectFromByteStream<P0, P1, P3, P5, P6>(&self, pbytestream: P0, pwszurl: P1, dwflags: u32, pprops: P3, ppiunknowncancelcookie: Option<*mut Option<windows_core::IUnknown>>, pcallback: P5, punkstate: P6) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFByteStream>,
P1: windows_core::Param<windows_core::PCWSTR>,
P3: windows_core::Param<super::super::UI::Shell::PropertiesSystem::IPropertyStore>,
P5: windows_core::Param<IMFAsyncCallback>,
P6: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).BeginCreateObjectFromByteStream)(windows_core::Interface::as_raw(self), pbytestream.param().abi(), pwszurl.param().abi(), dwflags, pprops.param().abi(), ppiunknowncancelcookie.unwrap_or(core::mem::zeroed()) as _, pcallback.param().abi(), punkstate.param().abi()).ok() }
}
pub unsafe fn EndCreateObjectFromByteStream<P0>(&self, presult: P0, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut Option<windows_core::IUnknown>) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncResult>,
{
unsafe { (windows_core::Interface::vtable(self).EndCreateObjectFromByteStream)(windows_core::Interface::as_raw(self), presult.param().abi(), pobjecttype as _, core::mem::transmute(ppobject)).ok() }
}
pub unsafe fn CancelObjectCreation<P0>(&self, piunknowncancelcookie: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).CancelObjectCreation)(windows_core::Interface::as_raw(self), piunknowncancelcookie.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSourceResolver_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub CreateObjectFromURL: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, u32, *mut core::ffi::c_void, *mut MF_OBJECT_TYPE, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))]
CreateObjectFromURL: usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub CreateObjectFromByteStream: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, windows_core::PCWSTR, u32, *mut core::ffi::c_void, *mut MF_OBJECT_TYPE, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))]
CreateObjectFromByteStream: usize,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub BeginCreateObjectFromURL: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, u32, *mut core::ffi::c_void, *mut *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))]
BeginCreateObjectFromURL: usize,
pub EndCreateObjectFromURL: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut MF_OBJECT_TYPE, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub BeginCreateObjectFromByteStream: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, windows_core::PCWSTR, u32, *mut core::ffi::c_void, *mut *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_UI_Shell_PropertiesSystem"))]
BeginCreateObjectFromByteStream: usize,
pub EndCreateObjectFromByteStream: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut MF_OBJECT_TYPE, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CancelObjectCreation: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
pub trait IMFSourceResolver_Impl: windows_core::IUnknownImpl {
fn CreateObjectFromURL(&self, pwszurl: &windows_core::PCWSTR, dwflags: u32, pprops: windows_core::Ref<super::super::UI::Shell::PropertiesSystem::IPropertyStore>, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: windows_core::OutRef<windows_core::IUnknown>) -> windows_core::Result<()>;
fn CreateObjectFromByteStream(&self, pbytestream: windows_core::Ref<IMFByteStream>, pwszurl: &windows_core::PCWSTR, dwflags: u32, pprops: windows_core::Ref<super::super::UI::Shell::PropertiesSystem::IPropertyStore>, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: windows_core::OutRef<windows_core::IUnknown>) -> windows_core::Result<()>;
fn BeginCreateObjectFromURL(&self, pwszurl: &windows_core::PCWSTR, dwflags: u32, pprops: windows_core::Ref<super::super::UI::Shell::PropertiesSystem::IPropertyStore>, ppiunknowncancelcookie: windows_core::OutRef<windows_core::IUnknown>, pcallback: windows_core::Ref<IMFAsyncCallback>, punkstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn EndCreateObjectFromURL(&self, presult: windows_core::Ref<IMFAsyncResult>, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: windows_core::OutRef<windows_core::IUnknown>) -> windows_core::Result<()>;
fn BeginCreateObjectFromByteStream(&self, pbytestream: windows_core::Ref<IMFByteStream>, pwszurl: &windows_core::PCWSTR, dwflags: u32, pprops: windows_core::Ref<super::super::UI::Shell::PropertiesSystem::IPropertyStore>, ppiunknowncancelcookie: windows_core::OutRef<windows_core::IUnknown>, pcallback: windows_core::Ref<IMFAsyncCallback>, punkstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn EndCreateObjectFromByteStream(&self, presult: windows_core::Ref<IMFAsyncResult>, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: windows_core::OutRef<windows_core::IUnknown>) -> windows_core::Result<()>;
fn CancelObjectCreation(&self, piunknowncancelcookie: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl IMFSourceResolver_Vtbl {
pub const fn new<Identity: IMFSourceResolver_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateObjectFromURL<Identity: IMFSourceResolver_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pwszurl: windows_core::PCWSTR, dwflags: u32, pprops: *mut core::ffi::c_void, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceResolver_Impl::CreateObjectFromURL(this, core::mem::transmute(&pwszurl), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pprops), core::mem::transmute_copy(&pobjecttype), core::mem::transmute_copy(&ppobject)).into()
}
}
unsafe extern "system" fn CreateObjectFromByteStream<Identity: IMFSourceResolver_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbytestream: *mut core::ffi::c_void, pwszurl: windows_core::PCWSTR, dwflags: u32, pprops: *mut core::ffi::c_void, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceResolver_Impl::CreateObjectFromByteStream(this, core::mem::transmute_copy(&pbytestream), core::mem::transmute(&pwszurl), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pprops), core::mem::transmute_copy(&pobjecttype), core::mem::transmute_copy(&ppobject)).into()
}
}
unsafe extern "system" fn BeginCreateObjectFromURL<Identity: IMFSourceResolver_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pwszurl: windows_core::PCWSTR, dwflags: u32, pprops: *mut core::ffi::c_void, ppiunknowncancelcookie: *mut *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceResolver_Impl::BeginCreateObjectFromURL(this, core::mem::transmute(&pwszurl), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pprops), core::mem::transmute_copy(&ppiunknowncancelcookie), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into()
}
}
unsafe extern "system" fn EndCreateObjectFromURL<Identity: IMFSourceResolver_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceResolver_Impl::EndCreateObjectFromURL(this, core::mem::transmute_copy(&presult), core::mem::transmute_copy(&pobjecttype), core::mem::transmute_copy(&ppobject)).into()
}
}
unsafe extern "system" fn BeginCreateObjectFromByteStream<Identity: IMFSourceResolver_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbytestream: *mut core::ffi::c_void, pwszurl: windows_core::PCWSTR, dwflags: u32, pprops: *mut core::ffi::c_void, ppiunknowncancelcookie: *mut *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceResolver_Impl::BeginCreateObjectFromByteStream(this, core::mem::transmute_copy(&pbytestream), core::mem::transmute(&pwszurl), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pprops), core::mem::transmute_copy(&ppiunknowncancelcookie), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into()
}
}
unsafe extern "system" fn EndCreateObjectFromByteStream<Identity: IMFSourceResolver_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceResolver_Impl::EndCreateObjectFromByteStream(this, core::mem::transmute_copy(&presult), core::mem::transmute_copy(&pobjecttype), core::mem::transmute_copy(&ppobject)).into()
}
}
unsafe extern "system" fn CancelObjectCreation<Identity: IMFSourceResolver_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, piunknowncancelcookie: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSourceResolver_Impl::CancelObjectCreation(this, core::mem::transmute_copy(&piunknowncancelcookie)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CreateObjectFromURL: CreateObjectFromURL::<Identity, OFFSET>,
CreateObjectFromByteStream: CreateObjectFromByteStream::<Identity, OFFSET>,
BeginCreateObjectFromURL: BeginCreateObjectFromURL::<Identity, OFFSET>,
EndCreateObjectFromURL: EndCreateObjectFromURL::<Identity, OFFSET>,
BeginCreateObjectFromByteStream: BeginCreateObjectFromByteStream::<Identity, OFFSET>,
EndCreateObjectFromByteStream: EndCreateObjectFromByteStream::<Identity, OFFSET>,
CancelObjectCreation: CancelObjectCreation::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSourceResolver as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
impl windows_core::RuntimeName for IMFSourceResolver {}
windows_core::imp::define_interface!(IMFSpatialAudioObjectBuffer, IMFSpatialAudioObjectBuffer_Vtbl, 0xd396ec8c_605e_4249_978d_72ad1c312872);
impl core::ops::Deref for IMFSpatialAudioObjectBuffer {
type Target = IMFMediaBuffer;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFSpatialAudioObjectBuffer, windows_core::IUnknown, IMFMediaBuffer);
impl IMFSpatialAudioObjectBuffer {
pub unsafe fn SetID(&self, u32id: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetID)(windows_core::Interface::as_raw(self), u32id).ok() }
}
pub unsafe fn GetID(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetID)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
#[cfg(feature = "Win32_Media_Audio")]
pub unsafe fn SetType(&self, r#type: super::Audio::AudioObjectType) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetType)(windows_core::Interface::as_raw(self), r#type).ok() }
}
#[cfg(feature = "Win32_Media_Audio")]
pub unsafe fn GetType(&self) -> windows_core::Result<super::Audio::AudioObjectType> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetType)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
#[cfg(feature = "Win32_Media_Audio")]
pub unsafe fn GetMetadataItems(&self) -> windows_core::Result<super::Audio::ISpatialAudioMetadataItems> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMetadataItems)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSpatialAudioObjectBuffer_Vtbl {
pub base__: IMFMediaBuffer_Vtbl,
pub SetID: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub GetID: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
#[cfg(feature = "Win32_Media_Audio")]
pub SetType: unsafe extern "system" fn(*mut core::ffi::c_void, super::Audio::AudioObjectType) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Media_Audio"))]
SetType: usize,
#[cfg(feature = "Win32_Media_Audio")]
pub GetType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::Audio::AudioObjectType) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Media_Audio"))]
GetType: usize,
#[cfg(feature = "Win32_Media_Audio")]
pub GetMetadataItems: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Media_Audio"))]
GetMetadataItems: usize,
}
#[cfg(feature = "Win32_Media_Audio")]
pub trait IMFSpatialAudioObjectBuffer_Impl: IMFMediaBuffer_Impl {
fn SetID(&self, u32id: u32) -> windows_core::Result<()>;
fn GetID(&self) -> windows_core::Result<u32>;
fn SetType(&self, r#type: super::Audio::AudioObjectType) -> windows_core::Result<()>;
fn GetType(&self) -> windows_core::Result<super::Audio::AudioObjectType>;
fn GetMetadataItems(&self) -> windows_core::Result<super::Audio::ISpatialAudioMetadataItems>;
}
#[cfg(feature = "Win32_Media_Audio")]
impl IMFSpatialAudioObjectBuffer_Vtbl {
pub const fn new<Identity: IMFSpatialAudioObjectBuffer_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetID<Identity: IMFSpatialAudioObjectBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, u32id: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSpatialAudioObjectBuffer_Impl::SetID(this, core::mem::transmute_copy(&u32id)).into()
}
}
unsafe extern "system" fn GetID<Identity: IMFSpatialAudioObjectBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pu32id: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSpatialAudioObjectBuffer_Impl::GetID(this) {
Ok(ok__) => {
pu32id.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetType<Identity: IMFSpatialAudioObjectBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, r#type: super::Audio::AudioObjectType) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSpatialAudioObjectBuffer_Impl::SetType(this, core::mem::transmute_copy(&r#type)).into()
}
}
unsafe extern "system" fn GetType<Identity: IMFSpatialAudioObjectBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ptype: *mut super::Audio::AudioObjectType) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSpatialAudioObjectBuffer_Impl::GetType(this) {
Ok(ok__) => {
ptype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetMetadataItems<Identity: IMFSpatialAudioObjectBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppmetadataitems: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSpatialAudioObjectBuffer_Impl::GetMetadataItems(this) {
Ok(ok__) => {
ppmetadataitems.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IMFMediaBuffer_Vtbl::new::<Identity, OFFSET>(),
SetID: SetID::<Identity, OFFSET>,
GetID: GetID::<Identity, OFFSET>,
SetType: SetType::<Identity, OFFSET>,
GetType: GetType::<Identity, OFFSET>,
GetMetadataItems: GetMetadataItems::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSpatialAudioObjectBuffer as windows_core::Interface>::IID || iid == &<IMFMediaBuffer as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Media_Audio")]
impl windows_core::RuntimeName for IMFSpatialAudioObjectBuffer {}
windows_core::imp::define_interface!(IMFSpatialAudioSample, IMFSpatialAudioSample_Vtbl, 0xabf28a9b_3393_4290_ba79_5ffc46d986b2);
impl core::ops::Deref for IMFSpatialAudioSample {
type Target = IMFSample;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFSpatialAudioSample, windows_core::IUnknown, IMFAttributes, IMFSample);
impl IMFSpatialAudioSample {
pub unsafe fn GetObjectCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetObjectCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn AddSpatialAudioObject<P0>(&self, paudioobjbuffer: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFSpatialAudioObjectBuffer>,
{
unsafe { (windows_core::Interface::vtable(self).AddSpatialAudioObject)(windows_core::Interface::as_raw(self), paudioobjbuffer.param().abi()).ok() }
}
pub unsafe fn GetSpatialAudioObjectByIndex(&self, dwindex: u32) -> windows_core::Result<IMFSpatialAudioObjectBuffer> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetSpatialAudioObjectByIndex)(windows_core::Interface::as_raw(self), dwindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSpatialAudioSample_Vtbl {
pub base__: IMFSample_Vtbl,
pub GetObjectCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub AddSpatialAudioObject: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetSpatialAudioObjectByIndex: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFSpatialAudioSample_Impl: IMFSample_Impl {
fn GetObjectCount(&self) -> windows_core::Result<u32>;
fn AddSpatialAudioObject(&self, paudioobjbuffer: windows_core::Ref<IMFSpatialAudioObjectBuffer>) -> windows_core::Result<()>;
fn GetSpatialAudioObjectByIndex(&self, dwindex: u32) -> windows_core::Result<IMFSpatialAudioObjectBuffer>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFSpatialAudioSample_Vtbl {
pub const fn new<Identity: IMFSpatialAudioSample_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetObjectCount<Identity: IMFSpatialAudioSample_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwobjectcount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSpatialAudioSample_Impl::GetObjectCount(this) {
Ok(ok__) => {
pdwobjectcount.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn AddSpatialAudioObject<Identity: IMFSpatialAudioSample_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, paudioobjbuffer: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSpatialAudioSample_Impl::AddSpatialAudioObject(this, core::mem::transmute_copy(&paudioobjbuffer)).into()
}
}
unsafe extern "system" fn GetSpatialAudioObjectByIndex<Identity: IMFSpatialAudioSample_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwindex: u32, ppaudioobjbuffer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFSpatialAudioSample_Impl::GetSpatialAudioObjectByIndex(this, core::mem::transmute_copy(&dwindex)) {
Ok(ok__) => {
ppaudioobjbuffer.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IMFSample_Vtbl::new::<Identity, OFFSET>(),
GetObjectCount: GetObjectCount::<Identity, OFFSET>,
AddSpatialAudioObject: AddSpatialAudioObject::<Identity, OFFSET>,
GetSpatialAudioObjectByIndex: GetSpatialAudioObjectByIndex::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSpatialAudioSample as windows_core::Interface>::IID || iid == &<IMFAttributes as windows_core::Interface>::IID || iid == &<IMFSample as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFSpatialAudioSample {}
windows_core::imp::define_interface!(IMFStreamDescriptor, IMFStreamDescriptor_Vtbl, 0x56c03d9c_9dbb_45f5_ab4b_d80f47c05938);
impl core::ops::Deref for IMFStreamDescriptor {
type Target = IMFAttributes;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFStreamDescriptor, windows_core::IUnknown, IMFAttributes);
impl IMFStreamDescriptor {
pub unsafe fn GetStreamIdentifier(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamIdentifier)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetMediaTypeHandler(&self) -> windows_core::Result<IMFMediaTypeHandler> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMediaTypeHandler)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFStreamDescriptor_Vtbl {
pub base__: IMFAttributes_Vtbl,
pub GetStreamIdentifier: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetMediaTypeHandler: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFStreamDescriptor_Impl: IMFAttributes_Impl {
fn GetStreamIdentifier(&self) -> windows_core::Result<u32>;
fn GetMediaTypeHandler(&self) -> windows_core::Result<IMFMediaTypeHandler>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFStreamDescriptor_Vtbl {
pub const fn new<Identity: IMFStreamDescriptor_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetStreamIdentifier<Identity: IMFStreamDescriptor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwstreamidentifier: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFStreamDescriptor_Impl::GetStreamIdentifier(this) {
Ok(ok__) => {
pdwstreamidentifier.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetMediaTypeHandler<Identity: IMFStreamDescriptor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppmediatypehandler: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFStreamDescriptor_Impl::GetMediaTypeHandler(this) {
Ok(ok__) => {
ppmediatypehandler.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, OFFSET>(),
GetStreamIdentifier: GetStreamIdentifier::<Identity, OFFSET>,
GetMediaTypeHandler: GetMediaTypeHandler::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFStreamDescriptor as windows_core::Interface>::IID || iid == &<IMFAttributes as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFStreamDescriptor {}
windows_core::imp::define_interface!(IMFStreamSink, IMFStreamSink_Vtbl, 0x0a97b3cf_8e7c_4a3d_8f8c_0c843dc247fb);
impl core::ops::Deref for IMFStreamSink {
type Target = IMFMediaEventGenerator;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFStreamSink, windows_core::IUnknown, IMFMediaEventGenerator);
impl IMFStreamSink {
pub unsafe fn GetMediaSink(&self) -> windows_core::Result<IMFMediaSink> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMediaSink)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetIdentifier(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetIdentifier)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetMediaTypeHandler(&self) -> windows_core::Result<IMFMediaTypeHandler> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMediaTypeHandler)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn ProcessSample<P0>(&self, psample: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFSample>,
{
unsafe { (windows_core::Interface::vtable(self).ProcessSample)(windows_core::Interface::as_raw(self), psample.param().abi()).ok() }
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn PlaceMarker(&self, emarkertype: MFSTREAMSINK_MARKER_TYPE, pvarmarkervalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT, pvarcontextvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).PlaceMarker)(windows_core::Interface::as_raw(self), emarkertype, core::mem::transmute(pvarmarkervalue), core::mem::transmute(pvarcontextvalue)).ok() }
}
pub unsafe fn Flush(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Flush)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFStreamSink_Vtbl {
pub base__: IMFMediaEventGenerator_Vtbl,
pub GetMediaSink: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetIdentifier: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetMediaTypeHandler: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ProcessSample: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub PlaceMarker: unsafe extern "system" fn(*mut core::ffi::c_void, MFSTREAMSINK_MARKER_TYPE, *const super::super::System::Com::StructuredStorage::PROPVARIANT, *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
PlaceMarker: usize,
pub Flush: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFStreamSink_Impl: IMFMediaEventGenerator_Impl {
fn GetMediaSink(&self) -> windows_core::Result<IMFMediaSink>;
fn GetIdentifier(&self) -> windows_core::Result<u32>;
fn GetMediaTypeHandler(&self) -> windows_core::Result<IMFMediaTypeHandler>;
fn ProcessSample(&self, psample: windows_core::Ref<IMFSample>) -> windows_core::Result<()>;
fn PlaceMarker(&self, emarkertype: MFSTREAMSINK_MARKER_TYPE, pvarmarkervalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT, pvarcontextvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>;
fn Flush(&self) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFStreamSink_Vtbl {
pub const fn new<Identity: IMFStreamSink_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetMediaSink<Identity: IMFStreamSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppmediasink: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFStreamSink_Impl::GetMediaSink(this) {
Ok(ok__) => {
ppmediasink.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetIdentifier<Identity: IMFStreamSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwidentifier: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFStreamSink_Impl::GetIdentifier(this) {
Ok(ok__) => {
pdwidentifier.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetMediaTypeHandler<Identity: IMFStreamSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pphandler: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFStreamSink_Impl::GetMediaTypeHandler(this) {
Ok(ok__) => {
pphandler.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn ProcessSample<Identity: IMFStreamSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, psample: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFStreamSink_Impl::ProcessSample(this, core::mem::transmute_copy(&psample)).into()
}
}
unsafe extern "system" fn PlaceMarker<Identity: IMFStreamSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, emarkertype: MFSTREAMSINK_MARKER_TYPE, pvarmarkervalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT, pvarcontextvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFStreamSink_Impl::PlaceMarker(this, core::mem::transmute_copy(&emarkertype), core::mem::transmute_copy(&pvarmarkervalue), core::mem::transmute_copy(&pvarcontextvalue)).into()
}
}
unsafe extern "system" fn Flush<Identity: IMFStreamSink_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFStreamSink_Impl::Flush(this).into()
}
}
Self {
base__: IMFMediaEventGenerator_Vtbl::new::<Identity, OFFSET>(),
GetMediaSink: GetMediaSink::<Identity, OFFSET>,
GetIdentifier: GetIdentifier::<Identity, OFFSET>,
GetMediaTypeHandler: GetMediaTypeHandler::<Identity, OFFSET>,
ProcessSample: ProcessSample::<Identity, OFFSET>,
PlaceMarker: PlaceMarker::<Identity, OFFSET>,
Flush: Flush::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFStreamSink as windows_core::Interface>::IID || iid == &<IMFMediaEventGenerator as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFStreamSink {}
windows_core::imp::define_interface!(IMFStreamingSinkConfig, IMFStreamingSinkConfig_Vtbl, 0x9db7aa41_3cc5_40d4_8509_555804ad34cc);
windows_core::imp::interface_hierarchy!(IMFStreamingSinkConfig, windows_core::IUnknown);
impl IMFStreamingSinkConfig {
pub unsafe fn StartStreaming(&self, fseekoffsetisbyteoffset: bool, qwseekoffset: u64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).StartStreaming)(windows_core::Interface::as_raw(self), fseekoffsetisbyteoffset.into(), qwseekoffset).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFStreamingSinkConfig_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub StartStreaming: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL, u64) -> windows_core::HRESULT,
}
pub trait IMFStreamingSinkConfig_Impl: windows_core::IUnknownImpl {
fn StartStreaming(&self, fseekoffsetisbyteoffset: windows_core::BOOL, qwseekoffset: u64) -> windows_core::Result<()>;
}
impl IMFStreamingSinkConfig_Vtbl {
pub const fn new<Identity: IMFStreamingSinkConfig_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn StartStreaming<Identity: IMFStreamingSinkConfig_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, fseekoffsetisbyteoffset: windows_core::BOOL, qwseekoffset: u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFStreamingSinkConfig_Impl::StartStreaming(this, core::mem::transmute_copy(&fseekoffsetisbyteoffset), core::mem::transmute_copy(&qwseekoffset)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), StartStreaming: StartStreaming::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFStreamingSinkConfig as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFStreamingSinkConfig {}
windows_core::imp::define_interface!(IMFSystemId, IMFSystemId_Vtbl, 0xfff4af3a_1fc1_4ef9_a29b_d26c49e2f31a);
windows_core::imp::interface_hierarchy!(IMFSystemId, windows_core::IUnknown);
impl IMFSystemId {
pub unsafe fn GetData(&self, size: *mut u32, data: *mut *mut u8) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), size as _, data as _).ok() }
}
pub unsafe fn Setup(&self, stage: u32, pbin: &[u8], pcbout: *mut u32, ppbout: *mut *mut u8) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Setup)(windows_core::Interface::as_raw(self), stage, pbin.len().try_into().unwrap(), core::mem::transmute(pbin.as_ptr()), pcbout as _, ppbout as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFSystemId_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetData: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut *mut u8) -> windows_core::HRESULT,
pub Setup: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, *const u8, *mut u32, *mut *mut u8) -> windows_core::HRESULT,
}
pub trait IMFSystemId_Impl: windows_core::IUnknownImpl {
fn GetData(&self, size: *mut u32, data: *mut *mut u8) -> windows_core::Result<()>;
fn Setup(&self, stage: u32, cbin: u32, pbin: *const u8, pcbout: *mut u32, ppbout: *mut *mut u8) -> windows_core::Result<()>;
}
impl IMFSystemId_Vtbl {
pub const fn new<Identity: IMFSystemId_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetData<Identity: IMFSystemId_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, size: *mut u32, data: *mut *mut u8) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSystemId_Impl::GetData(this, core::mem::transmute_copy(&size), core::mem::transmute_copy(&data)).into()
}
}
unsafe extern "system" fn Setup<Identity: IMFSystemId_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, stage: u32, cbin: u32, pbin: *const u8, pcbout: *mut u32, ppbout: *mut *mut u8) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFSystemId_Impl::Setup(this, core::mem::transmute_copy(&stage), core::mem::transmute_copy(&cbin), core::mem::transmute_copy(&pbin), core::mem::transmute_copy(&pcbout), core::mem::transmute_copy(&ppbout)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetData: GetData::<Identity, OFFSET>, Setup: Setup::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFSystemId as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFSystemId {}
windows_core::imp::define_interface!(IMFTimecodeTranslate, IMFTimecodeTranslate_Vtbl, 0xab9d8661_f7e8_4ef4_9861_89f334f94e74);
windows_core::imp::interface_hierarchy!(IMFTimecodeTranslate, windows_core::IUnknown);
impl IMFTimecodeTranslate {
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn BeginConvertTimecodeToHNS<P1, P2>(&self, ppropvartimecode: *const super::super::System::Com::StructuredStorage::PROPVARIANT, pcallback: P1, punkstate: P2) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFAsyncCallback>,
P2: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).BeginConvertTimecodeToHNS)(windows_core::Interface::as_raw(self), core::mem::transmute(ppropvartimecode), pcallback.param().abi(), punkstate.param().abi()).ok() }
}
pub unsafe fn EndConvertTimecodeToHNS<P0>(&self, presult: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<IMFAsyncResult>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EndConvertTimecodeToHNS)(windows_core::Interface::as_raw(self), presult.param().abi(), &mut result__).map(|| result__)
}
}
pub unsafe fn BeginConvertHNSToTimecode<P1, P2>(&self, hnstime: i64, pcallback: P1, punkstate: P2) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFAsyncCallback>,
P2: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).BeginConvertHNSToTimecode)(windows_core::Interface::as_raw(self), hnstime, pcallback.param().abi(), punkstate.param().abi()).ok() }
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub unsafe fn EndConvertHNSToTimecode<P0>(&self, presult: P0) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT>
where
P0: windows_core::Param<IMFAsyncResult>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EndConvertHNSToTimecode)(windows_core::Interface::as_raw(self), presult.param().abi(), &mut result__).map(|| core::mem::transmute(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFTimecodeTranslate_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub BeginConvertTimecodeToHNS: unsafe extern "system" fn(*mut core::ffi::c_void, *const super::super::System::Com::StructuredStorage::PROPVARIANT, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
BeginConvertTimecodeToHNS: usize,
pub EndConvertTimecodeToHNS: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
pub BeginConvertHNSToTimecode: unsafe extern "system" fn(*mut core::ffi::c_void, i64, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub EndConvertHNSToTimecode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant")))]
EndConvertHNSToTimecode: usize,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFTimecodeTranslate_Impl: windows_core::IUnknownImpl {
fn BeginConvertTimecodeToHNS(&self, ppropvartimecode: *const super::super::System::Com::StructuredStorage::PROPVARIANT, pcallback: windows_core::Ref<IMFAsyncCallback>, punkstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn EndConvertTimecodeToHNS(&self, presult: windows_core::Ref<IMFAsyncResult>) -> windows_core::Result<i64>;
fn BeginConvertHNSToTimecode(&self, hnstime: i64, pcallback: windows_core::Ref<IMFAsyncCallback>, punkstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn EndConvertHNSToTimecode(&self, presult: windows_core::Ref<IMFAsyncResult>) -> windows_core::Result<super::super::System::Com::StructuredStorage::PROPVARIANT>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFTimecodeTranslate_Vtbl {
pub const fn new<Identity: IMFTimecodeTranslate_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginConvertTimecodeToHNS<Identity: IMFTimecodeTranslate_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppropvartimecode: *const super::super::System::Com::StructuredStorage::PROPVARIANT, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimecodeTranslate_Impl::BeginConvertTimecodeToHNS(this, core::mem::transmute_copy(&ppropvartimecode), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into()
}
}
unsafe extern "system" fn EndConvertTimecodeToHNS<Identity: IMFTimecodeTranslate_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, phnstime: *mut i64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimecodeTranslate_Impl::EndConvertTimecodeToHNS(this, core::mem::transmute_copy(&presult)) {
Ok(ok__) => {
phnstime.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn BeginConvertHNSToTimecode<Identity: IMFTimecodeTranslate_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hnstime: i64, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimecodeTranslate_Impl::BeginConvertHNSToTimecode(this, core::mem::transmute_copy(&hnstime), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into()
}
}
unsafe extern "system" fn EndConvertHNSToTimecode<Identity: IMFTimecodeTranslate_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, ppropvartimecode: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimecodeTranslate_Impl::EndConvertHNSToTimecode(this, core::mem::transmute_copy(&presult)) {
Ok(ok__) => {
ppropvartimecode.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginConvertTimecodeToHNS: BeginConvertTimecodeToHNS::<Identity, OFFSET>,
EndConvertTimecodeToHNS: EndConvertTimecodeToHNS::<Identity, OFFSET>,
BeginConvertHNSToTimecode: BeginConvertHNSToTimecode::<Identity, OFFSET>,
EndConvertHNSToTimecode: EndConvertHNSToTimecode::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFTimecodeTranslate as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFTimecodeTranslate {}
windows_core::imp::define_interface!(IMFTimedText, IMFTimedText_Vtbl, 0x1f2a94c9_a3df_430d_9d0f_acd85ddc29af);
windows_core::imp::interface_hierarchy!(IMFTimedText, windows_core::IUnknown);
impl IMFTimedText {
pub unsafe fn RegisterNotifications<P0>(&self, notify: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFTimedTextNotify>,
{
unsafe { (windows_core::Interface::vtable(self).RegisterNotifications)(windows_core::Interface::as_raw(self), notify.param().abi()).ok() }
}
pub unsafe fn SelectTrack(&self, trackid: u32, selected: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SelectTrack)(windows_core::Interface::as_raw(self), trackid, selected.into()).ok() }
}
pub unsafe fn AddDataSource<P0, P1, P2>(&self, bytestream: P0, label: P1, language: P2, kind: MF_TIMED_TEXT_TRACK_KIND, isdefault: bool) -> windows_core::Result<u32>
where
P0: windows_core::Param<IMFByteStream>,
P1: windows_core::Param<windows_core::PCWSTR>,
P2: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).AddDataSource)(windows_core::Interface::as_raw(self), bytestream.param().abi(), label.param().abi(), language.param().abi(), kind, isdefault.into(), &mut result__).map(|| result__)
}
}
pub unsafe fn AddDataSourceFromUrl<P0, P1, P2>(&self, url: P0, label: P1, language: P2, kind: MF_TIMED_TEXT_TRACK_KIND, isdefault: bool) -> windows_core::Result<u32>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<windows_core::PCWSTR>,
P2: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).AddDataSourceFromUrl)(windows_core::Interface::as_raw(self), url.param().abi(), label.param().abi(), language.param().abi(), kind, isdefault.into(), &mut result__).map(|| result__)
}
}
pub unsafe fn AddTrack<P0, P1>(&self, label: P0, language: P1, kind: MF_TIMED_TEXT_TRACK_KIND) -> windows_core::Result<IMFTimedTextTrack>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).AddTrack)(windows_core::Interface::as_raw(self), label.param().abi(), language.param().abi(), kind, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn RemoveTrack<P0>(&self, track: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFTimedTextTrack>,
{
unsafe { (windows_core::Interface::vtable(self).RemoveTrack)(windows_core::Interface::as_raw(self), track.param().abi()).ok() }
}
pub unsafe fn GetCueTimeOffset(&self) -> windows_core::Result<f64> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetCueTimeOffset)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetCueTimeOffset(&self, offset: f64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetCueTimeOffset)(windows_core::Interface::as_raw(self), offset).ok() }
}
pub unsafe fn GetTracks(&self) -> windows_core::Result<IMFTimedTextTrackList> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetTracks)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetActiveTracks(&self) -> windows_core::Result<IMFTimedTextTrackList> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetActiveTracks)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetTextTracks(&self) -> windows_core::Result<IMFTimedTextTrackList> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetTextTracks)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetMetadataTracks(&self) -> windows_core::Result<IMFTimedTextTrackList> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMetadataTracks)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn SetInBandEnabled(&self, enabled: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetInBandEnabled)(windows_core::Interface::as_raw(self), enabled.into()).ok() }
}
pub unsafe fn IsInBandEnabled(&self) -> windows_core::BOOL {
unsafe { (windows_core::Interface::vtable(self).IsInBandEnabled)(windows_core::Interface::as_raw(self)) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFTimedText_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub RegisterNotifications: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SelectTrack: unsafe extern "system" fn(*mut core::ffi::c_void, u32, windows_core::BOOL) -> windows_core::HRESULT,
pub AddDataSource: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, windows_core::PCWSTR, windows_core::PCWSTR, MF_TIMED_TEXT_TRACK_KIND, windows_core::BOOL, *mut u32) -> windows_core::HRESULT,
pub AddDataSourceFromUrl: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, windows_core::PCWSTR, windows_core::PCWSTR, MF_TIMED_TEXT_TRACK_KIND, windows_core::BOOL, *mut u32) -> windows_core::HRESULT,
pub AddTrack: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, windows_core::PCWSTR, MF_TIMED_TEXT_TRACK_KIND, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RemoveTrack: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetCueTimeOffset: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
pub SetCueTimeOffset: unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
pub GetTracks: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetActiveTracks: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetTextTracks: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetMetadataTracks: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetInBandEnabled: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT,
pub IsInBandEnabled: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::BOOL,
}
pub trait IMFTimedText_Impl: windows_core::IUnknownImpl {
fn RegisterNotifications(&self, notify: windows_core::Ref<IMFTimedTextNotify>) -> windows_core::Result<()>;
fn SelectTrack(&self, trackid: u32, selected: windows_core::BOOL) -> windows_core::Result<()>;
fn AddDataSource(&self, bytestream: windows_core::Ref<IMFByteStream>, label: &windows_core::PCWSTR, language: &windows_core::PCWSTR, kind: MF_TIMED_TEXT_TRACK_KIND, isdefault: windows_core::BOOL) -> windows_core::Result<u32>;
fn AddDataSourceFromUrl(&self, url: &windows_core::PCWSTR, label: &windows_core::PCWSTR, language: &windows_core::PCWSTR, kind: MF_TIMED_TEXT_TRACK_KIND, isdefault: windows_core::BOOL) -> windows_core::Result<u32>;
fn AddTrack(&self, label: &windows_core::PCWSTR, language: &windows_core::PCWSTR, kind: MF_TIMED_TEXT_TRACK_KIND) -> windows_core::Result<IMFTimedTextTrack>;
fn RemoveTrack(&self, track: windows_core::Ref<IMFTimedTextTrack>) -> windows_core::Result<()>;
fn GetCueTimeOffset(&self) -> windows_core::Result<f64>;
fn SetCueTimeOffset(&self, offset: f64) -> windows_core::Result<()>;
fn GetTracks(&self) -> windows_core::Result<IMFTimedTextTrackList>;
fn GetActiveTracks(&self) -> windows_core::Result<IMFTimedTextTrackList>;
fn GetTextTracks(&self) -> windows_core::Result<IMFTimedTextTrackList>;
fn GetMetadataTracks(&self) -> windows_core::Result<IMFTimedTextTrackList>;
fn SetInBandEnabled(&self, enabled: windows_core::BOOL) -> windows_core::Result<()>;
fn IsInBandEnabled(&self) -> windows_core::BOOL;
}
impl IMFTimedText_Vtbl {
pub const fn new<Identity: IMFTimedText_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn RegisterNotifications<Identity: IMFTimedText_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, notify: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedText_Impl::RegisterNotifications(this, core::mem::transmute_copy(¬ify)).into()
}
}
unsafe extern "system" fn SelectTrack<Identity: IMFTimedText_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, trackid: u32, selected: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedText_Impl::SelectTrack(this, core::mem::transmute_copy(&trackid), core::mem::transmute_copy(&selected)).into()
}
}
unsafe extern "system" fn AddDataSource<Identity: IMFTimedText_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, bytestream: *mut core::ffi::c_void, label: windows_core::PCWSTR, language: windows_core::PCWSTR, kind: MF_TIMED_TEXT_TRACK_KIND, isdefault: windows_core::BOOL, trackid: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedText_Impl::AddDataSource(this, core::mem::transmute_copy(&bytestream), core::mem::transmute(&label), core::mem::transmute(&language), core::mem::transmute_copy(&kind), core::mem::transmute_copy(&isdefault)) {
Ok(ok__) => {
trackid.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn AddDataSourceFromUrl<Identity: IMFTimedText_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, url: windows_core::PCWSTR, label: windows_core::PCWSTR, language: windows_core::PCWSTR, kind: MF_TIMED_TEXT_TRACK_KIND, isdefault: windows_core::BOOL, trackid: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedText_Impl::AddDataSourceFromUrl(this, core::mem::transmute(&url), core::mem::transmute(&label), core::mem::transmute(&language), core::mem::transmute_copy(&kind), core::mem::transmute_copy(&isdefault)) {
Ok(ok__) => {
trackid.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn AddTrack<Identity: IMFTimedText_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, label: windows_core::PCWSTR, language: windows_core::PCWSTR, kind: MF_TIMED_TEXT_TRACK_KIND, track: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedText_Impl::AddTrack(this, core::mem::transmute(&label), core::mem::transmute(&language), core::mem::transmute_copy(&kind)) {
Ok(ok__) => {
track.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn RemoveTrack<Identity: IMFTimedText_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, track: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedText_Impl::RemoveTrack(this, core::mem::transmute_copy(&track)).into()
}
}
unsafe extern "system" fn GetCueTimeOffset<Identity: IMFTimedText_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, offset: *mut f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedText_Impl::GetCueTimeOffset(this) {
Ok(ok__) => {
offset.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetCueTimeOffset<Identity: IMFTimedText_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, offset: f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedText_Impl::SetCueTimeOffset(this, core::mem::transmute_copy(&offset)).into()
}
}
unsafe extern "system" fn GetTracks<Identity: IMFTimedText_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, tracks: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedText_Impl::GetTracks(this) {
Ok(ok__) => {
tracks.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetActiveTracks<Identity: IMFTimedText_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, activetracks: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedText_Impl::GetActiveTracks(this) {
Ok(ok__) => {
activetracks.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetTextTracks<Identity: IMFTimedText_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, texttracks: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedText_Impl::GetTextTracks(this) {
Ok(ok__) => {
texttracks.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetMetadataTracks<Identity: IMFTimedText_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, metadatatracks: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedText_Impl::GetMetadataTracks(this) {
Ok(ok__) => {
metadatatracks.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetInBandEnabled<Identity: IMFTimedText_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, enabled: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedText_Impl::SetInBandEnabled(this, core::mem::transmute_copy(&enabled)).into()
}
}
unsafe extern "system" fn IsInBandEnabled<Identity: IMFTimedText_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::BOOL {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedText_Impl::IsInBandEnabled(this)
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
RegisterNotifications: RegisterNotifications::<Identity, OFFSET>,
SelectTrack: SelectTrack::<Identity, OFFSET>,
AddDataSource: AddDataSource::<Identity, OFFSET>,
AddDataSourceFromUrl: AddDataSourceFromUrl::<Identity, OFFSET>,
AddTrack: AddTrack::<Identity, OFFSET>,
RemoveTrack: RemoveTrack::<Identity, OFFSET>,
GetCueTimeOffset: GetCueTimeOffset::<Identity, OFFSET>,
SetCueTimeOffset: SetCueTimeOffset::<Identity, OFFSET>,
GetTracks: GetTracks::<Identity, OFFSET>,
GetActiveTracks: GetActiveTracks::<Identity, OFFSET>,
GetTextTracks: GetTextTracks::<Identity, OFFSET>,
GetMetadataTracks: GetMetadataTracks::<Identity, OFFSET>,
SetInBandEnabled: SetInBandEnabled::<Identity, OFFSET>,
IsInBandEnabled: IsInBandEnabled::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFTimedText as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFTimedText {}
windows_core::imp::define_interface!(IMFTimedTextBinary, IMFTimedTextBinary_Vtbl, 0x4ae3a412_0545_43c4_bf6f_6b97a5c6c432);
windows_core::imp::interface_hierarchy!(IMFTimedTextBinary, windows_core::IUnknown);
impl IMFTimedTextBinary {
pub unsafe fn GetData(&self, data: *mut *mut u8, length: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), data as _, length as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFTimedTextBinary_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetData: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut u8, *mut u32) -> windows_core::HRESULT,
}
pub trait IMFTimedTextBinary_Impl: windows_core::IUnknownImpl {
fn GetData(&self, data: *mut *mut u8, length: *mut u32) -> windows_core::Result<()>;
}
impl IMFTimedTextBinary_Vtbl {
pub const fn new<Identity: IMFTimedTextBinary_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetData<Identity: IMFTimedTextBinary_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, data: *mut *mut u8, length: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextBinary_Impl::GetData(this, core::mem::transmute_copy(&data), core::mem::transmute_copy(&length)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetData: GetData::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFTimedTextBinary as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFTimedTextBinary {}
windows_core::imp::define_interface!(IMFTimedTextBouten, IMFTimedTextBouten_Vtbl, 0x3c5f3e8a_90c0_464e_8136_898d2975f847);
windows_core::imp::interface_hierarchy!(IMFTimedTextBouten, windows_core::IUnknown);
impl IMFTimedTextBouten {
pub unsafe fn GetBoutenType(&self) -> windows_core::Result<MF_TIMED_TEXT_BOUTEN_TYPE> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetBoutenType)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetBoutenColor(&self) -> windows_core::Result<MFARGB> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetBoutenColor)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetBoutenPosition(&self) -> windows_core::Result<MF_TIMED_TEXT_BOUTEN_POSITION> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetBoutenPosition)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFTimedTextBouten_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetBoutenType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MF_TIMED_TEXT_BOUTEN_TYPE) -> windows_core::HRESULT,
pub GetBoutenColor: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MFARGB) -> windows_core::HRESULT,
pub GetBoutenPosition: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MF_TIMED_TEXT_BOUTEN_POSITION) -> windows_core::HRESULT,
}
pub trait IMFTimedTextBouten_Impl: windows_core::IUnknownImpl {
fn GetBoutenType(&self) -> windows_core::Result<MF_TIMED_TEXT_BOUTEN_TYPE>;
fn GetBoutenColor(&self) -> windows_core::Result<MFARGB>;
fn GetBoutenPosition(&self) -> windows_core::Result<MF_TIMED_TEXT_BOUTEN_POSITION>;
}
impl IMFTimedTextBouten_Vtbl {
pub const fn new<Identity: IMFTimedTextBouten_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetBoutenType<Identity: IMFTimedTextBouten_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, value: *mut MF_TIMED_TEXT_BOUTEN_TYPE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextBouten_Impl::GetBoutenType(this) {
Ok(ok__) => {
value.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetBoutenColor<Identity: IMFTimedTextBouten_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, value: *mut MFARGB) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextBouten_Impl::GetBoutenColor(this) {
Ok(ok__) => {
value.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetBoutenPosition<Identity: IMFTimedTextBouten_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, value: *mut MF_TIMED_TEXT_BOUTEN_POSITION) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextBouten_Impl::GetBoutenPosition(this) {
Ok(ok__) => {
value.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetBoutenType: GetBoutenType::<Identity, OFFSET>,
GetBoutenColor: GetBoutenColor::<Identity, OFFSET>,
GetBoutenPosition: GetBoutenPosition::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFTimedTextBouten as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFTimedTextBouten {}
windows_core::imp::define_interface!(IMFTimedTextCue, IMFTimedTextCue_Vtbl, 0x1e560447_9a2b_43e1_a94c_b0aaabfbfbc9);
windows_core::imp::interface_hierarchy!(IMFTimedTextCue, windows_core::IUnknown);
impl IMFTimedTextCue {
pub unsafe fn GetId(&self) -> u32 {
unsafe { (windows_core::Interface::vtable(self).GetId)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetOriginalId(&self) -> windows_core::Result<windows_core::PWSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOriginalId)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetCueKind(&self) -> MF_TIMED_TEXT_TRACK_KIND {
unsafe { (windows_core::Interface::vtable(self).GetCueKind)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetStartTime(&self) -> f64 {
unsafe { (windows_core::Interface::vtable(self).GetStartTime)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetDuration(&self) -> f64 {
unsafe { (windows_core::Interface::vtable(self).GetDuration)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetTrackId(&self) -> u32 {
unsafe { (windows_core::Interface::vtable(self).GetTrackId)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetData(&self) -> windows_core::Result<IMFTimedTextBinary> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetRegion(&self) -> windows_core::Result<IMFTimedTextRegion> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetRegion)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetStyle(&self) -> windows_core::Result<IMFTimedTextStyle> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStyle)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetLineCount(&self) -> u32 {
unsafe { (windows_core::Interface::vtable(self).GetLineCount)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetLine(&self, index: u32) -> windows_core::Result<IMFTimedTextFormattedText> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetLine)(windows_core::Interface::as_raw(self), index, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFTimedTextCue_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetId: unsafe extern "system" fn(*mut core::ffi::c_void) -> u32,
pub GetOriginalId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT,
pub GetCueKind: unsafe extern "system" fn(*mut core::ffi::c_void) -> MF_TIMED_TEXT_TRACK_KIND,
pub GetStartTime: unsafe extern "system" fn(*mut core::ffi::c_void) -> f64,
pub GetDuration: unsafe extern "system" fn(*mut core::ffi::c_void) -> f64,
pub GetTrackId: unsafe extern "system" fn(*mut core::ffi::c_void) -> u32,
pub GetData: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetRegion: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetStyle: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetLineCount: unsafe extern "system" fn(*mut core::ffi::c_void) -> u32,
pub GetLine: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFTimedTextCue_Impl: windows_core::IUnknownImpl {
fn GetId(&self) -> u32;
fn GetOriginalId(&self) -> windows_core::Result<windows_core::PWSTR>;
fn GetCueKind(&self) -> MF_TIMED_TEXT_TRACK_KIND;
fn GetStartTime(&self) -> f64;
fn GetDuration(&self) -> f64;
fn GetTrackId(&self) -> u32;
fn GetData(&self) -> windows_core::Result<IMFTimedTextBinary>;
fn GetRegion(&self) -> windows_core::Result<IMFTimedTextRegion>;
fn GetStyle(&self) -> windows_core::Result<IMFTimedTextStyle>;
fn GetLineCount(&self) -> u32;
fn GetLine(&self, index: u32) -> windows_core::Result<IMFTimedTextFormattedText>;
}
impl IMFTimedTextCue_Vtbl {
pub const fn new<Identity: IMFTimedTextCue_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetId<Identity: IMFTimedTextCue_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> u32 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextCue_Impl::GetId(this)
}
}
unsafe extern "system" fn GetOriginalId<Identity: IMFTimedTextCue_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, originalid: *mut windows_core::PWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextCue_Impl::GetOriginalId(this) {
Ok(ok__) => {
originalid.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetCueKind<Identity: IMFTimedTextCue_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> MF_TIMED_TEXT_TRACK_KIND {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextCue_Impl::GetCueKind(this)
}
}
unsafe extern "system" fn GetStartTime<Identity: IMFTimedTextCue_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> f64 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextCue_Impl::GetStartTime(this)
}
}
unsafe extern "system" fn GetDuration<Identity: IMFTimedTextCue_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> f64 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextCue_Impl::GetDuration(this)
}
}
unsafe extern "system" fn GetTrackId<Identity: IMFTimedTextCue_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> u32 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextCue_Impl::GetTrackId(this)
}
}
unsafe extern "system" fn GetData<Identity: IMFTimedTextCue_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, data: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextCue_Impl::GetData(this) {
Ok(ok__) => {
data.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetRegion<Identity: IMFTimedTextCue_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, region: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextCue_Impl::GetRegion(this) {
Ok(ok__) => {
region.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetStyle<Identity: IMFTimedTextCue_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, style: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextCue_Impl::GetStyle(this) {
Ok(ok__) => {
style.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetLineCount<Identity: IMFTimedTextCue_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> u32 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextCue_Impl::GetLineCount(this)
}
}
unsafe extern "system" fn GetLine<Identity: IMFTimedTextCue_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, index: u32, line: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextCue_Impl::GetLine(this, core::mem::transmute_copy(&index)) {
Ok(ok__) => {
line.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetId: GetId::<Identity, OFFSET>,
GetOriginalId: GetOriginalId::<Identity, OFFSET>,
GetCueKind: GetCueKind::<Identity, OFFSET>,
GetStartTime: GetStartTime::<Identity, OFFSET>,
GetDuration: GetDuration::<Identity, OFFSET>,
GetTrackId: GetTrackId::<Identity, OFFSET>,
GetData: GetData::<Identity, OFFSET>,
GetRegion: GetRegion::<Identity, OFFSET>,
GetStyle: GetStyle::<Identity, OFFSET>,
GetLineCount: GetLineCount::<Identity, OFFSET>,
GetLine: GetLine::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFTimedTextCue as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFTimedTextCue {}
windows_core::imp::define_interface!(IMFTimedTextCueList, IMFTimedTextCueList_Vtbl, 0xad128745_211b_40a0_9981_fe65f166d0fd);
windows_core::imp::interface_hierarchy!(IMFTimedTextCueList, windows_core::IUnknown);
impl IMFTimedTextCueList {
pub unsafe fn GetLength(&self) -> u32 {
unsafe { (windows_core::Interface::vtable(self).GetLength)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetCueByIndex(&self, index: u32) -> windows_core::Result<IMFTimedTextCue> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetCueByIndex)(windows_core::Interface::as_raw(self), index, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetCueById(&self, id: u32) -> windows_core::Result<IMFTimedTextCue> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetCueById)(windows_core::Interface::as_raw(self), id, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetCueByOriginalId<P0>(&self, originalid: P0) -> windows_core::Result<IMFTimedTextCue>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetCueByOriginalId)(windows_core::Interface::as_raw(self), originalid.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn AddTextCue<P2>(&self, start: f64, duration: f64, text: P2, cue: Option<*mut Option<IMFTimedTextCue>>) -> windows_core::Result<()>
where
P2: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).AddTextCue)(windows_core::Interface::as_raw(self), start, duration, text.param().abi(), cue.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn AddDataCue(&self, start: f64, duration: f64, data: &[u8], cue: Option<*mut Option<IMFTimedTextCue>>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).AddDataCue)(windows_core::Interface::as_raw(self), start, duration, core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap(), cue.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn RemoveCue<P0>(&self, cue: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFTimedTextCue>,
{
unsafe { (windows_core::Interface::vtable(self).RemoveCue)(windows_core::Interface::as_raw(self), cue.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFTimedTextCueList_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetLength: unsafe extern "system" fn(*mut core::ffi::c_void) -> u32,
pub GetCueByIndex: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetCueById: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetCueByOriginalId: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AddTextCue: unsafe extern "system" fn(*mut core::ffi::c_void, f64, f64, windows_core::PCWSTR, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AddDataCue: unsafe extern "system" fn(*mut core::ffi::c_void, f64, f64, *const u8, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RemoveCue: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFTimedTextCueList_Impl: windows_core::IUnknownImpl {
fn GetLength(&self) -> u32;
fn GetCueByIndex(&self, index: u32) -> windows_core::Result<IMFTimedTextCue>;
fn GetCueById(&self, id: u32) -> windows_core::Result<IMFTimedTextCue>;
fn GetCueByOriginalId(&self, originalid: &windows_core::PCWSTR) -> windows_core::Result<IMFTimedTextCue>;
fn AddTextCue(&self, start: f64, duration: f64, text: &windows_core::PCWSTR, cue: windows_core::OutRef<IMFTimedTextCue>) -> windows_core::Result<()>;
fn AddDataCue(&self, start: f64, duration: f64, data: *const u8, datasize: u32, cue: windows_core::OutRef<IMFTimedTextCue>) -> windows_core::Result<()>;
fn RemoveCue(&self, cue: windows_core::Ref<IMFTimedTextCue>) -> windows_core::Result<()>;
}
impl IMFTimedTextCueList_Vtbl {
pub const fn new<Identity: IMFTimedTextCueList_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetLength<Identity: IMFTimedTextCueList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> u32 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextCueList_Impl::GetLength(this)
}
}
unsafe extern "system" fn GetCueByIndex<Identity: IMFTimedTextCueList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, index: u32, cue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextCueList_Impl::GetCueByIndex(this, core::mem::transmute_copy(&index)) {
Ok(ok__) => {
cue.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetCueById<Identity: IMFTimedTextCueList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, id: u32, cue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextCueList_Impl::GetCueById(this, core::mem::transmute_copy(&id)) {
Ok(ok__) => {
cue.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetCueByOriginalId<Identity: IMFTimedTextCueList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, originalid: windows_core::PCWSTR, cue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextCueList_Impl::GetCueByOriginalId(this, core::mem::transmute(&originalid)) {
Ok(ok__) => {
cue.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn AddTextCue<Identity: IMFTimedTextCueList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, start: f64, duration: f64, text: windows_core::PCWSTR, cue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextCueList_Impl::AddTextCue(this, core::mem::transmute_copy(&start), core::mem::transmute_copy(&duration), core::mem::transmute(&text), core::mem::transmute_copy(&cue)).into()
}
}
unsafe extern "system" fn AddDataCue<Identity: IMFTimedTextCueList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, start: f64, duration: f64, data: *const u8, datasize: u32, cue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextCueList_Impl::AddDataCue(this, core::mem::transmute_copy(&start), core::mem::transmute_copy(&duration), core::mem::transmute_copy(&data), core::mem::transmute_copy(&datasize), core::mem::transmute_copy(&cue)).into()
}
}
unsafe extern "system" fn RemoveCue<Identity: IMFTimedTextCueList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, cue: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextCueList_Impl::RemoveCue(this, core::mem::transmute_copy(&cue)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetLength: GetLength::<Identity, OFFSET>,
GetCueByIndex: GetCueByIndex::<Identity, OFFSET>,
GetCueById: GetCueById::<Identity, OFFSET>,
GetCueByOriginalId: GetCueByOriginalId::<Identity, OFFSET>,
AddTextCue: AddTextCue::<Identity, OFFSET>,
AddDataCue: AddDataCue::<Identity, OFFSET>,
RemoveCue: RemoveCue::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFTimedTextCueList as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFTimedTextCueList {}
windows_core::imp::define_interface!(IMFTimedTextFormattedText, IMFTimedTextFormattedText_Vtbl, 0xe13af3c1_4d47_4354_b1f5_e83ae0ecae60);
windows_core::imp::interface_hierarchy!(IMFTimedTextFormattedText, windows_core::IUnknown);
impl IMFTimedTextFormattedText {
pub unsafe fn GetText(&self) -> windows_core::Result<windows_core::PWSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetSubformattingCount(&self) -> u32 {
unsafe { (windows_core::Interface::vtable(self).GetSubformattingCount)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetSubformatting(&self, index: u32, firstchar: *mut u32, charlength: *mut u32, style: *mut Option<IMFTimedTextStyle>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetSubformatting)(windows_core::Interface::as_raw(self), index, firstchar as _, charlength as _, core::mem::transmute(style)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFTimedTextFormattedText_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetText: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT,
pub GetSubformattingCount: unsafe extern "system" fn(*mut core::ffi::c_void) -> u32,
pub GetSubformatting: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u32, *mut u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFTimedTextFormattedText_Impl: windows_core::IUnknownImpl {
fn GetText(&self) -> windows_core::Result<windows_core::PWSTR>;
fn GetSubformattingCount(&self) -> u32;
fn GetSubformatting(&self, index: u32, firstchar: *mut u32, charlength: *mut u32, style: windows_core::OutRef<IMFTimedTextStyle>) -> windows_core::Result<()>;
}
impl IMFTimedTextFormattedText_Vtbl {
pub const fn new<Identity: IMFTimedTextFormattedText_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetText<Identity: IMFTimedTextFormattedText_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, text: *mut windows_core::PWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextFormattedText_Impl::GetText(this) {
Ok(ok__) => {
text.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetSubformattingCount<Identity: IMFTimedTextFormattedText_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> u32 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextFormattedText_Impl::GetSubformattingCount(this)
}
}
unsafe extern "system" fn GetSubformatting<Identity: IMFTimedTextFormattedText_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, index: u32, firstchar: *mut u32, charlength: *mut u32, style: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextFormattedText_Impl::GetSubformatting(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&firstchar), core::mem::transmute_copy(&charlength), core::mem::transmute_copy(&style)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetText: GetText::<Identity, OFFSET>,
GetSubformattingCount: GetSubformattingCount::<Identity, OFFSET>,
GetSubformatting: GetSubformatting::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFTimedTextFormattedText as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFTimedTextFormattedText {}
windows_core::imp::define_interface!(IMFTimedTextNotify, IMFTimedTextNotify_Vtbl, 0xdf6b87b6_ce12_45db_aba7_432fe054e57d);
windows_core::imp::interface_hierarchy!(IMFTimedTextNotify, windows_core::IUnknown);
impl IMFTimedTextNotify {
pub unsafe fn TrackAdded(&self, trackid: u32) {
unsafe { (windows_core::Interface::vtable(self).TrackAdded)(windows_core::Interface::as_raw(self), trackid) }
}
pub unsafe fn TrackRemoved(&self, trackid: u32) {
unsafe { (windows_core::Interface::vtable(self).TrackRemoved)(windows_core::Interface::as_raw(self), trackid) }
}
pub unsafe fn TrackSelected(&self, trackid: u32, selected: bool) {
unsafe { (windows_core::Interface::vtable(self).TrackSelected)(windows_core::Interface::as_raw(self), trackid, selected.into()) }
}
pub unsafe fn TrackReadyStateChanged(&self, trackid: u32) {
unsafe { (windows_core::Interface::vtable(self).TrackReadyStateChanged)(windows_core::Interface::as_raw(self), trackid) }
}
pub unsafe fn Error(&self, errorcode: MF_TIMED_TEXT_ERROR_CODE, extendederrorcode: windows_core::HRESULT, sourcetrackid: u32) {
unsafe { (windows_core::Interface::vtable(self).Error)(windows_core::Interface::as_raw(self), errorcode, extendederrorcode, sourcetrackid) }
}
pub unsafe fn Cue<P2>(&self, cueevent: MF_TIMED_TEXT_CUE_EVENT, currenttime: f64, cue: P2)
where
P2: windows_core::Param<IMFTimedTextCue>,
{
unsafe { (windows_core::Interface::vtable(self).Cue)(windows_core::Interface::as_raw(self), cueevent, currenttime, cue.param().abi()) }
}
pub unsafe fn Reset(&self) {
unsafe { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)) }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFTimedTextNotify_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub TrackAdded: unsafe extern "system" fn(*mut core::ffi::c_void, u32),
pub TrackRemoved: unsafe extern "system" fn(*mut core::ffi::c_void, u32),
pub TrackSelected: unsafe extern "system" fn(*mut core::ffi::c_void, u32, windows_core::BOOL),
pub TrackReadyStateChanged: unsafe extern "system" fn(*mut core::ffi::c_void, u32),
pub Error: unsafe extern "system" fn(*mut core::ffi::c_void, MF_TIMED_TEXT_ERROR_CODE, windows_core::HRESULT, u32),
pub Cue: unsafe extern "system" fn(*mut core::ffi::c_void, MF_TIMED_TEXT_CUE_EVENT, f64, *mut core::ffi::c_void),
pub Reset: unsafe extern "system" fn(*mut core::ffi::c_void),
}
pub trait IMFTimedTextNotify_Impl: windows_core::IUnknownImpl {
fn TrackAdded(&self, trackid: u32);
fn TrackRemoved(&self, trackid: u32);
fn TrackSelected(&self, trackid: u32, selected: windows_core::BOOL);
fn TrackReadyStateChanged(&self, trackid: u32);
fn Error(&self, errorcode: MF_TIMED_TEXT_ERROR_CODE, extendederrorcode: windows_core::HRESULT, sourcetrackid: u32);
fn Cue(&self, cueevent: MF_TIMED_TEXT_CUE_EVENT, currenttime: f64, cue: windows_core::Ref<IMFTimedTextCue>);
fn Reset(&self);
}
impl IMFTimedTextNotify_Vtbl {
pub const fn new<Identity: IMFTimedTextNotify_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn TrackAdded<Identity: IMFTimedTextNotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, trackid: u32) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextNotify_Impl::TrackAdded(this, core::mem::transmute_copy(&trackid))
}
}
unsafe extern "system" fn TrackRemoved<Identity: IMFTimedTextNotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, trackid: u32) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextNotify_Impl::TrackRemoved(this, core::mem::transmute_copy(&trackid))
}
}
unsafe extern "system" fn TrackSelected<Identity: IMFTimedTextNotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, trackid: u32, selected: windows_core::BOOL) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextNotify_Impl::TrackSelected(this, core::mem::transmute_copy(&trackid), core::mem::transmute_copy(&selected))
}
}
unsafe extern "system" fn TrackReadyStateChanged<Identity: IMFTimedTextNotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, trackid: u32) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextNotify_Impl::TrackReadyStateChanged(this, core::mem::transmute_copy(&trackid))
}
}
unsafe extern "system" fn Error<Identity: IMFTimedTextNotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, errorcode: MF_TIMED_TEXT_ERROR_CODE, extendederrorcode: windows_core::HRESULT, sourcetrackid: u32) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextNotify_Impl::Error(this, core::mem::transmute_copy(&errorcode), core::mem::transmute_copy(&extendederrorcode), core::mem::transmute_copy(&sourcetrackid))
}
}
unsafe extern "system" fn Cue<Identity: IMFTimedTextNotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, cueevent: MF_TIMED_TEXT_CUE_EVENT, currenttime: f64, cue: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextNotify_Impl::Cue(this, core::mem::transmute_copy(&cueevent), core::mem::transmute_copy(¤ttime), core::mem::transmute_copy(&cue))
}
}
unsafe extern "system" fn Reset<Identity: IMFTimedTextNotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextNotify_Impl::Reset(this)
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
TrackAdded: TrackAdded::<Identity, OFFSET>,
TrackRemoved: TrackRemoved::<Identity, OFFSET>,
TrackSelected: TrackSelected::<Identity, OFFSET>,
TrackReadyStateChanged: TrackReadyStateChanged::<Identity, OFFSET>,
Error: Error::<Identity, OFFSET>,
Cue: Cue::<Identity, OFFSET>,
Reset: Reset::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFTimedTextNotify as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFTimedTextNotify {}
windows_core::imp::define_interface!(IMFTimedTextRegion, IMFTimedTextRegion_Vtbl, 0xc8d22afc_bc47_4bdf_9b04_787e49ce3f58);
windows_core::imp::interface_hierarchy!(IMFTimedTextRegion, windows_core::IUnknown);
impl IMFTimedTextRegion {
pub unsafe fn GetName(&self) -> windows_core::Result<windows_core::PWSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetPosition(&self, px: *mut f64, py: *mut f64, unittype: *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetPosition)(windows_core::Interface::as_raw(self), px as _, py as _, unittype as _).ok() }
}
pub unsafe fn GetExtent(&self, pwidth: *mut f64, pheight: *mut f64, unittype: *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetExtent)(windows_core::Interface::as_raw(self), pwidth as _, pheight as _, unittype as _).ok() }
}
pub unsafe fn GetBackgroundColor(&self) -> windows_core::Result<MFARGB> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetBackgroundColor)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetWritingMode(&self) -> windows_core::Result<MF_TIMED_TEXT_WRITING_MODE> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetWritingMode)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetDisplayAlignment(&self) -> windows_core::Result<MF_TIMED_TEXT_DISPLAY_ALIGNMENT> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDisplayAlignment)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetLineHeight(&self, plineheight: *mut f64, unittype: *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetLineHeight)(windows_core::Interface::as_raw(self), plineheight as _, unittype as _).ok() }
}
pub unsafe fn GetClipOverflow(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetClipOverflow)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetPadding(&self, before: *mut f64, start: *mut f64, after: *mut f64, end: *mut f64, unittype: *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetPadding)(windows_core::Interface::as_raw(self), before as _, start as _, after as _, end as _, unittype as _).ok() }
}
pub unsafe fn GetWrap(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetWrap)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetZIndex(&self) -> windows_core::Result<i32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetZIndex)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetScrollMode(&self) -> windows_core::Result<MF_TIMED_TEXT_SCROLL_MODE> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetScrollMode)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFTimedTextRegion_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT,
pub GetPosition: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64, *mut f64, *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::HRESULT,
pub GetExtent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64, *mut f64, *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::HRESULT,
pub GetBackgroundColor: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MFARGB) -> windows_core::HRESULT,
pub GetWritingMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MF_TIMED_TEXT_WRITING_MODE) -> windows_core::HRESULT,
pub GetDisplayAlignment: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MF_TIMED_TEXT_DISPLAY_ALIGNMENT) -> windows_core::HRESULT,
pub GetLineHeight: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64, *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::HRESULT,
pub GetClipOverflow: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub GetPadding: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64, *mut f64, *mut f64, *mut f64, *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::HRESULT,
pub GetWrap: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub GetZIndex: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub GetScrollMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MF_TIMED_TEXT_SCROLL_MODE) -> windows_core::HRESULT,
}
pub trait IMFTimedTextRegion_Impl: windows_core::IUnknownImpl {
fn GetName(&self) -> windows_core::Result<windows_core::PWSTR>;
fn GetPosition(&self, px: *mut f64, py: *mut f64, unittype: *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::Result<()>;
fn GetExtent(&self, pwidth: *mut f64, pheight: *mut f64, unittype: *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::Result<()>;
fn GetBackgroundColor(&self) -> windows_core::Result<MFARGB>;
fn GetWritingMode(&self) -> windows_core::Result<MF_TIMED_TEXT_WRITING_MODE>;
fn GetDisplayAlignment(&self) -> windows_core::Result<MF_TIMED_TEXT_DISPLAY_ALIGNMENT>;
fn GetLineHeight(&self, plineheight: *mut f64, unittype: *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::Result<()>;
fn GetClipOverflow(&self) -> windows_core::Result<windows_core::BOOL>;
fn GetPadding(&self, before: *mut f64, start: *mut f64, after: *mut f64, end: *mut f64, unittype: *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::Result<()>;
fn GetWrap(&self) -> windows_core::Result<windows_core::BOOL>;
fn GetZIndex(&self) -> windows_core::Result<i32>;
fn GetScrollMode(&self) -> windows_core::Result<MF_TIMED_TEXT_SCROLL_MODE>;
}
impl IMFTimedTextRegion_Vtbl {
pub const fn new<Identity: IMFTimedTextRegion_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetName<Identity: IMFTimedTextRegion_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, name: *mut windows_core::PWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextRegion_Impl::GetName(this) {
Ok(ok__) => {
name.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetPosition<Identity: IMFTimedTextRegion_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, px: *mut f64, py: *mut f64, unittype: *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextRegion_Impl::GetPosition(this, core::mem::transmute_copy(&px), core::mem::transmute_copy(&py), core::mem::transmute_copy(&unittype)).into()
}
}
unsafe extern "system" fn GetExtent<Identity: IMFTimedTextRegion_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pwidth: *mut f64, pheight: *mut f64, unittype: *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextRegion_Impl::GetExtent(this, core::mem::transmute_copy(&pwidth), core::mem::transmute_copy(&pheight), core::mem::transmute_copy(&unittype)).into()
}
}
unsafe extern "system" fn GetBackgroundColor<Identity: IMFTimedTextRegion_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, bgcolor: *mut MFARGB) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextRegion_Impl::GetBackgroundColor(this) {
Ok(ok__) => {
bgcolor.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetWritingMode<Identity: IMFTimedTextRegion_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, writingmode: *mut MF_TIMED_TEXT_WRITING_MODE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextRegion_Impl::GetWritingMode(this) {
Ok(ok__) => {
writingmode.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetDisplayAlignment<Identity: IMFTimedTextRegion_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, displayalign: *mut MF_TIMED_TEXT_DISPLAY_ALIGNMENT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextRegion_Impl::GetDisplayAlignment(this) {
Ok(ok__) => {
displayalign.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetLineHeight<Identity: IMFTimedTextRegion_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, plineheight: *mut f64, unittype: *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextRegion_Impl::GetLineHeight(this, core::mem::transmute_copy(&plineheight), core::mem::transmute_copy(&unittype)).into()
}
}
unsafe extern "system" fn GetClipOverflow<Identity: IMFTimedTextRegion_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, clipoverflow: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextRegion_Impl::GetClipOverflow(this) {
Ok(ok__) => {
clipoverflow.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetPadding<Identity: IMFTimedTextRegion_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, before: *mut f64, start: *mut f64, after: *mut f64, end: *mut f64, unittype: *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextRegion_Impl::GetPadding(this, core::mem::transmute_copy(&before), core::mem::transmute_copy(&start), core::mem::transmute_copy(&after), core::mem::transmute_copy(&end), core::mem::transmute_copy(&unittype)).into()
}
}
unsafe extern "system" fn GetWrap<Identity: IMFTimedTextRegion_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, wrap: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextRegion_Impl::GetWrap(this) {
Ok(ok__) => {
wrap.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetZIndex<Identity: IMFTimedTextRegion_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, zindex: *mut i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextRegion_Impl::GetZIndex(this) {
Ok(ok__) => {
zindex.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetScrollMode<Identity: IMFTimedTextRegion_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, scrollmode: *mut MF_TIMED_TEXT_SCROLL_MODE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextRegion_Impl::GetScrollMode(this) {
Ok(ok__) => {
scrollmode.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetName: GetName::<Identity, OFFSET>,
GetPosition: GetPosition::<Identity, OFFSET>,
GetExtent: GetExtent::<Identity, OFFSET>,
GetBackgroundColor: GetBackgroundColor::<Identity, OFFSET>,
GetWritingMode: GetWritingMode::<Identity, OFFSET>,
GetDisplayAlignment: GetDisplayAlignment::<Identity, OFFSET>,
GetLineHeight: GetLineHeight::<Identity, OFFSET>,
GetClipOverflow: GetClipOverflow::<Identity, OFFSET>,
GetPadding: GetPadding::<Identity, OFFSET>,
GetWrap: GetWrap::<Identity, OFFSET>,
GetZIndex: GetZIndex::<Identity, OFFSET>,
GetScrollMode: GetScrollMode::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFTimedTextRegion as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFTimedTextRegion {}
windows_core::imp::define_interface!(IMFTimedTextRuby, IMFTimedTextRuby_Vtbl, 0x76c6a6f5_4955_4de5_b27b_14b734cc14b4);
windows_core::imp::interface_hierarchy!(IMFTimedTextRuby, windows_core::IUnknown);
impl IMFTimedTextRuby {
pub unsafe fn GetRubyText(&self) -> windows_core::Result<windows_core::PWSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetRubyText)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetRubyPosition(&self) -> windows_core::Result<MF_TIMED_TEXT_RUBY_POSITION> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetRubyPosition)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetRubyAlign(&self) -> windows_core::Result<MF_TIMED_TEXT_RUBY_ALIGN> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetRubyAlign)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetRubyReserve(&self) -> windows_core::Result<MF_TIMED_TEXT_RUBY_RESERVE> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetRubyReserve)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFTimedTextRuby_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetRubyText: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT,
pub GetRubyPosition: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MF_TIMED_TEXT_RUBY_POSITION) -> windows_core::HRESULT,
pub GetRubyAlign: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MF_TIMED_TEXT_RUBY_ALIGN) -> windows_core::HRESULT,
pub GetRubyReserve: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MF_TIMED_TEXT_RUBY_RESERVE) -> windows_core::HRESULT,
}
pub trait IMFTimedTextRuby_Impl: windows_core::IUnknownImpl {
fn GetRubyText(&self) -> windows_core::Result<windows_core::PWSTR>;
fn GetRubyPosition(&self) -> windows_core::Result<MF_TIMED_TEXT_RUBY_POSITION>;
fn GetRubyAlign(&self) -> windows_core::Result<MF_TIMED_TEXT_RUBY_ALIGN>;
fn GetRubyReserve(&self) -> windows_core::Result<MF_TIMED_TEXT_RUBY_RESERVE>;
}
impl IMFTimedTextRuby_Vtbl {
pub const fn new<Identity: IMFTimedTextRuby_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetRubyText<Identity: IMFTimedTextRuby_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, rubytext: *mut windows_core::PWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextRuby_Impl::GetRubyText(this) {
Ok(ok__) => {
rubytext.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetRubyPosition<Identity: IMFTimedTextRuby_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, value: *mut MF_TIMED_TEXT_RUBY_POSITION) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextRuby_Impl::GetRubyPosition(this) {
Ok(ok__) => {
value.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetRubyAlign<Identity: IMFTimedTextRuby_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, value: *mut MF_TIMED_TEXT_RUBY_ALIGN) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextRuby_Impl::GetRubyAlign(this) {
Ok(ok__) => {
value.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetRubyReserve<Identity: IMFTimedTextRuby_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, value: *mut MF_TIMED_TEXT_RUBY_RESERVE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextRuby_Impl::GetRubyReserve(this) {
Ok(ok__) => {
value.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetRubyText: GetRubyText::<Identity, OFFSET>,
GetRubyPosition: GetRubyPosition::<Identity, OFFSET>,
GetRubyAlign: GetRubyAlign::<Identity, OFFSET>,
GetRubyReserve: GetRubyReserve::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFTimedTextRuby as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFTimedTextRuby {}
windows_core::imp::define_interface!(IMFTimedTextStyle, IMFTimedTextStyle_Vtbl, 0x09b2455d_b834_4f01_a347_9052e21c450e);
windows_core::imp::interface_hierarchy!(IMFTimedTextStyle, windows_core::IUnknown);
impl IMFTimedTextStyle {
pub unsafe fn GetName(&self) -> windows_core::Result<windows_core::PWSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn IsExternal(&self) -> windows_core::BOOL {
unsafe { (windows_core::Interface::vtable(self).IsExternal)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetFontFamily(&self) -> windows_core::Result<windows_core::PWSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetFontFamily)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetFontSize(&self, fontsize: *mut f64, unittype: *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetFontSize)(windows_core::Interface::as_raw(self), fontsize as _, unittype as _).ok() }
}
pub unsafe fn GetColor(&self) -> windows_core::Result<MFARGB> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetColor)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetBackgroundColor(&self) -> windows_core::Result<MFARGB> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetBackgroundColor)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetShowBackgroundAlways(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetShowBackgroundAlways)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetFontStyle(&self) -> windows_core::Result<MF_TIMED_TEXT_FONT_STYLE> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetFontStyle)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetBold(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetBold)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetRightToLeft(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetRightToLeft)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetTextAlignment(&self) -> windows_core::Result<MF_TIMED_TEXT_ALIGNMENT> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetTextAlignment)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetTextDecoration(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetTextDecoration)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetTextOutline(&self, color: *mut MFARGB, thickness: *mut f64, blurradius: *mut f64, unittype: *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetTextOutline)(windows_core::Interface::as_raw(self), color as _, thickness as _, blurradius as _, unittype as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFTimedTextStyle_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT,
pub IsExternal: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::BOOL,
pub GetFontFamily: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT,
pub GetFontSize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64, *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::HRESULT,
pub GetColor: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MFARGB) -> windows_core::HRESULT,
pub GetBackgroundColor: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MFARGB) -> windows_core::HRESULT,
pub GetShowBackgroundAlways: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub GetFontStyle: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MF_TIMED_TEXT_FONT_STYLE) -> windows_core::HRESULT,
pub GetBold: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub GetRightToLeft: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub GetTextAlignment: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MF_TIMED_TEXT_ALIGNMENT) -> windows_core::HRESULT,
pub GetTextDecoration: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetTextOutline: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MFARGB, *mut f64, *mut f64, *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::HRESULT,
}
pub trait IMFTimedTextStyle_Impl: windows_core::IUnknownImpl {
fn GetName(&self) -> windows_core::Result<windows_core::PWSTR>;
fn IsExternal(&self) -> windows_core::BOOL;
fn GetFontFamily(&self) -> windows_core::Result<windows_core::PWSTR>;
fn GetFontSize(&self, fontsize: *mut f64, unittype: *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::Result<()>;
fn GetColor(&self) -> windows_core::Result<MFARGB>;
fn GetBackgroundColor(&self) -> windows_core::Result<MFARGB>;
fn GetShowBackgroundAlways(&self) -> windows_core::Result<windows_core::BOOL>;
fn GetFontStyle(&self) -> windows_core::Result<MF_TIMED_TEXT_FONT_STYLE>;
fn GetBold(&self) -> windows_core::Result<windows_core::BOOL>;
fn GetRightToLeft(&self) -> windows_core::Result<windows_core::BOOL>;
fn GetTextAlignment(&self) -> windows_core::Result<MF_TIMED_TEXT_ALIGNMENT>;
fn GetTextDecoration(&self) -> windows_core::Result<u32>;
fn GetTextOutline(&self, color: *mut MFARGB, thickness: *mut f64, blurradius: *mut f64, unittype: *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::Result<()>;
}
impl IMFTimedTextStyle_Vtbl {
pub const fn new<Identity: IMFTimedTextStyle_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetName<Identity: IMFTimedTextStyle_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, name: *mut windows_core::PWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextStyle_Impl::GetName(this) {
Ok(ok__) => {
name.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn IsExternal<Identity: IMFTimedTextStyle_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::BOOL {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextStyle_Impl::IsExternal(this)
}
}
unsafe extern "system" fn GetFontFamily<Identity: IMFTimedTextStyle_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, fontfamily: *mut windows_core::PWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextStyle_Impl::GetFontFamily(this) {
Ok(ok__) => {
fontfamily.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetFontSize<Identity: IMFTimedTextStyle_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, fontsize: *mut f64, unittype: *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextStyle_Impl::GetFontSize(this, core::mem::transmute_copy(&fontsize), core::mem::transmute_copy(&unittype)).into()
}
}
unsafe extern "system" fn GetColor<Identity: IMFTimedTextStyle_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, color: *mut MFARGB) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextStyle_Impl::GetColor(this) {
Ok(ok__) => {
color.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetBackgroundColor<Identity: IMFTimedTextStyle_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, bgcolor: *mut MFARGB) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextStyle_Impl::GetBackgroundColor(this) {
Ok(ok__) => {
bgcolor.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetShowBackgroundAlways<Identity: IMFTimedTextStyle_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, showbackgroundalways: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextStyle_Impl::GetShowBackgroundAlways(this) {
Ok(ok__) => {
showbackgroundalways.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetFontStyle<Identity: IMFTimedTextStyle_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, fontstyle: *mut MF_TIMED_TEXT_FONT_STYLE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextStyle_Impl::GetFontStyle(this) {
Ok(ok__) => {
fontstyle.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetBold<Identity: IMFTimedTextStyle_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, bold: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextStyle_Impl::GetBold(this) {
Ok(ok__) => {
bold.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetRightToLeft<Identity: IMFTimedTextStyle_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, righttoleft: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextStyle_Impl::GetRightToLeft(this) {
Ok(ok__) => {
righttoleft.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetTextAlignment<Identity: IMFTimedTextStyle_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, textalign: *mut MF_TIMED_TEXT_ALIGNMENT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextStyle_Impl::GetTextAlignment(this) {
Ok(ok__) => {
textalign.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetTextDecoration<Identity: IMFTimedTextStyle_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, textdecoration: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextStyle_Impl::GetTextDecoration(this) {
Ok(ok__) => {
textdecoration.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetTextOutline<Identity: IMFTimedTextStyle_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, color: *mut MFARGB, thickness: *mut f64, blurradius: *mut f64, unittype: *mut MF_TIMED_TEXT_UNIT_TYPE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextStyle_Impl::GetTextOutline(this, core::mem::transmute_copy(&color), core::mem::transmute_copy(&thickness), core::mem::transmute_copy(&blurradius), core::mem::transmute_copy(&unittype)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetName: GetName::<Identity, OFFSET>,
IsExternal: IsExternal::<Identity, OFFSET>,
GetFontFamily: GetFontFamily::<Identity, OFFSET>,
GetFontSize: GetFontSize::<Identity, OFFSET>,
GetColor: GetColor::<Identity, OFFSET>,
GetBackgroundColor: GetBackgroundColor::<Identity, OFFSET>,
GetShowBackgroundAlways: GetShowBackgroundAlways::<Identity, OFFSET>,
GetFontStyle: GetFontStyle::<Identity, OFFSET>,
GetBold: GetBold::<Identity, OFFSET>,
GetRightToLeft: GetRightToLeft::<Identity, OFFSET>,
GetTextAlignment: GetTextAlignment::<Identity, OFFSET>,
GetTextDecoration: GetTextDecoration::<Identity, OFFSET>,
GetTextOutline: GetTextOutline::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFTimedTextStyle as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFTimedTextStyle {}
windows_core::imp::define_interface!(IMFTimedTextStyle2, IMFTimedTextStyle2_Vtbl, 0xdb639199_c809_4c89_bfca_d0bbb9729d6e);
windows_core::imp::interface_hierarchy!(IMFTimedTextStyle2, windows_core::IUnknown);
impl IMFTimedTextStyle2 {
pub unsafe fn GetRuby(&self) -> windows_core::Result<IMFTimedTextRuby> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetRuby)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetBouten(&self) -> windows_core::Result<IMFTimedTextBouten> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetBouten)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn IsTextCombined(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).IsTextCombined)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetFontAngleInDegrees(&self) -> windows_core::Result<f64> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetFontAngleInDegrees)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFTimedTextStyle2_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetRuby: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetBouten: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub IsTextCombined: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
pub GetFontAngleInDegrees: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
}
pub trait IMFTimedTextStyle2_Impl: windows_core::IUnknownImpl {
fn GetRuby(&self) -> windows_core::Result<IMFTimedTextRuby>;
fn GetBouten(&self) -> windows_core::Result<IMFTimedTextBouten>;
fn IsTextCombined(&self) -> windows_core::Result<windows_core::BOOL>;
fn GetFontAngleInDegrees(&self) -> windows_core::Result<f64>;
}
impl IMFTimedTextStyle2_Vtbl {
pub const fn new<Identity: IMFTimedTextStyle2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetRuby<Identity: IMFTimedTextStyle2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ruby: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextStyle2_Impl::GetRuby(this) {
Ok(ok__) => {
ruby.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetBouten<Identity: IMFTimedTextStyle2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, bouten: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextStyle2_Impl::GetBouten(this) {
Ok(ok__) => {
bouten.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn IsTextCombined<Identity: IMFTimedTextStyle2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, value: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextStyle2_Impl::IsTextCombined(this) {
Ok(ok__) => {
value.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetFontAngleInDegrees<Identity: IMFTimedTextStyle2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, value: *mut f64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextStyle2_Impl::GetFontAngleInDegrees(this) {
Ok(ok__) => {
value.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetRuby: GetRuby::<Identity, OFFSET>,
GetBouten: GetBouten::<Identity, OFFSET>,
IsTextCombined: IsTextCombined::<Identity, OFFSET>,
GetFontAngleInDegrees: GetFontAngleInDegrees::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFTimedTextStyle2 as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFTimedTextStyle2 {}
windows_core::imp::define_interface!(IMFTimedTextTrack, IMFTimedTextTrack_Vtbl, 0x8822c32d_654e_4233_bf21_d7f2e67d30d4);
windows_core::imp::interface_hierarchy!(IMFTimedTextTrack, windows_core::IUnknown);
impl IMFTimedTextTrack {
pub unsafe fn GetId(&self) -> u32 {
unsafe { (windows_core::Interface::vtable(self).GetId)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetLabel(&self) -> windows_core::Result<windows_core::PWSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetLabel)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetLabel<P0>(&self, label: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).SetLabel)(windows_core::Interface::as_raw(self), label.param().abi()).ok() }
}
pub unsafe fn GetLanguage(&self) -> windows_core::Result<windows_core::PWSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetLanguage)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetTrackKind(&self) -> MF_TIMED_TEXT_TRACK_KIND {
unsafe { (windows_core::Interface::vtable(self).GetTrackKind)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn IsInBand(&self) -> windows_core::BOOL {
unsafe { (windows_core::Interface::vtable(self).IsInBand)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetInBandMetadataTrackDispatchType(&self) -> windows_core::Result<windows_core::PWSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetInBandMetadataTrackDispatchType)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn IsActive(&self) -> windows_core::BOOL {
unsafe { (windows_core::Interface::vtable(self).IsActive)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetErrorCode(&self) -> MF_TIMED_TEXT_ERROR_CODE {
unsafe { (windows_core::Interface::vtable(self).GetErrorCode)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetExtendedErrorCode(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetExtendedErrorCode)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn GetDataFormat(&self) -> windows_core::Result<windows_core::GUID> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDataFormat)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetReadyState(&self) -> MF_TIMED_TEXT_TRACK_READY_STATE {
unsafe { (windows_core::Interface::vtable(self).GetReadyState)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetCueList(&self) -> windows_core::Result<IMFTimedTextCueList> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetCueList)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFTimedTextTrack_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetId: unsafe extern "system" fn(*mut core::ffi::c_void) -> u32,
pub GetLabel: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT,
pub SetLabel: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR) -> windows_core::HRESULT,
pub GetLanguage: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT,
pub GetTrackKind: unsafe extern "system" fn(*mut core::ffi::c_void) -> MF_TIMED_TEXT_TRACK_KIND,
pub IsInBand: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::BOOL,
pub GetInBandMetadataTrackDispatchType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT,
pub IsActive: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::BOOL,
pub GetErrorCode: unsafe extern "system" fn(*mut core::ffi::c_void) -> MF_TIMED_TEXT_ERROR_CODE,
pub GetExtendedErrorCode: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetDataFormat: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT,
pub GetReadyState: unsafe extern "system" fn(*mut core::ffi::c_void) -> MF_TIMED_TEXT_TRACK_READY_STATE,
pub GetCueList: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFTimedTextTrack_Impl: windows_core::IUnknownImpl {
fn GetId(&self) -> u32;
fn GetLabel(&self) -> windows_core::Result<windows_core::PWSTR>;
fn SetLabel(&self, label: &windows_core::PCWSTR) -> windows_core::Result<()>;
fn GetLanguage(&self) -> windows_core::Result<windows_core::PWSTR>;
fn GetTrackKind(&self) -> MF_TIMED_TEXT_TRACK_KIND;
fn IsInBand(&self) -> windows_core::BOOL;
fn GetInBandMetadataTrackDispatchType(&self) -> windows_core::Result<windows_core::PWSTR>;
fn IsActive(&self) -> windows_core::BOOL;
fn GetErrorCode(&self) -> MF_TIMED_TEXT_ERROR_CODE;
fn GetExtendedErrorCode(&self) -> windows_core::Result<()>;
fn GetDataFormat(&self) -> windows_core::Result<windows_core::GUID>;
fn GetReadyState(&self) -> MF_TIMED_TEXT_TRACK_READY_STATE;
fn GetCueList(&self) -> windows_core::Result<IMFTimedTextCueList>;
}
impl IMFTimedTextTrack_Vtbl {
pub const fn new<Identity: IMFTimedTextTrack_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetId<Identity: IMFTimedTextTrack_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> u32 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextTrack_Impl::GetId(this)
}
}
unsafe extern "system" fn GetLabel<Identity: IMFTimedTextTrack_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, label: *mut windows_core::PWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextTrack_Impl::GetLabel(this) {
Ok(ok__) => {
label.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetLabel<Identity: IMFTimedTextTrack_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, label: windows_core::PCWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextTrack_Impl::SetLabel(this, core::mem::transmute(&label)).into()
}
}
unsafe extern "system" fn GetLanguage<Identity: IMFTimedTextTrack_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, language: *mut windows_core::PWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextTrack_Impl::GetLanguage(this) {
Ok(ok__) => {
language.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetTrackKind<Identity: IMFTimedTextTrack_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> MF_TIMED_TEXT_TRACK_KIND {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextTrack_Impl::GetTrackKind(this)
}
}
unsafe extern "system" fn IsInBand<Identity: IMFTimedTextTrack_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::BOOL {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextTrack_Impl::IsInBand(this)
}
}
unsafe extern "system" fn GetInBandMetadataTrackDispatchType<Identity: IMFTimedTextTrack_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dispatchtype: *mut windows_core::PWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextTrack_Impl::GetInBandMetadataTrackDispatchType(this) {
Ok(ok__) => {
dispatchtype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn IsActive<Identity: IMFTimedTextTrack_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::BOOL {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextTrack_Impl::IsActive(this)
}
}
unsafe extern "system" fn GetErrorCode<Identity: IMFTimedTextTrack_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> MF_TIMED_TEXT_ERROR_CODE {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextTrack_Impl::GetErrorCode(this)
}
}
unsafe extern "system" fn GetExtendedErrorCode<Identity: IMFTimedTextTrack_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextTrack_Impl::GetExtendedErrorCode(this).into()
}
}
unsafe extern "system" fn GetDataFormat<Identity: IMFTimedTextTrack_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, format: *mut windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextTrack_Impl::GetDataFormat(this) {
Ok(ok__) => {
format.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetReadyState<Identity: IMFTimedTextTrack_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> MF_TIMED_TEXT_TRACK_READY_STATE {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextTrack_Impl::GetReadyState(this)
}
}
unsafe extern "system" fn GetCueList<Identity: IMFTimedTextTrack_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, cues: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextTrack_Impl::GetCueList(this) {
Ok(ok__) => {
cues.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetId: GetId::<Identity, OFFSET>,
GetLabel: GetLabel::<Identity, OFFSET>,
SetLabel: SetLabel::<Identity, OFFSET>,
GetLanguage: GetLanguage::<Identity, OFFSET>,
GetTrackKind: GetTrackKind::<Identity, OFFSET>,
IsInBand: IsInBand::<Identity, OFFSET>,
GetInBandMetadataTrackDispatchType: GetInBandMetadataTrackDispatchType::<Identity, OFFSET>,
IsActive: IsActive::<Identity, OFFSET>,
GetErrorCode: GetErrorCode::<Identity, OFFSET>,
GetExtendedErrorCode: GetExtendedErrorCode::<Identity, OFFSET>,
GetDataFormat: GetDataFormat::<Identity, OFFSET>,
GetReadyState: GetReadyState::<Identity, OFFSET>,
GetCueList: GetCueList::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFTimedTextTrack as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFTimedTextTrack {}
windows_core::imp::define_interface!(IMFTimedTextTrackList, IMFTimedTextTrackList_Vtbl, 0x23ff334c_442c_445f_bccc_edc438aa11e2);
windows_core::imp::interface_hierarchy!(IMFTimedTextTrackList, windows_core::IUnknown);
impl IMFTimedTextTrackList {
pub unsafe fn GetLength(&self) -> u32 {
unsafe { (windows_core::Interface::vtable(self).GetLength)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetTrack(&self, index: u32) -> windows_core::Result<IMFTimedTextTrack> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetTrack)(windows_core::Interface::as_raw(self), index, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetTrackById(&self, trackid: u32) -> windows_core::Result<IMFTimedTextTrack> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetTrackById)(windows_core::Interface::as_raw(self), trackid, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFTimedTextTrackList_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetLength: unsafe extern "system" fn(*mut core::ffi::c_void) -> u32,
pub GetTrack: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetTrackById: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFTimedTextTrackList_Impl: windows_core::IUnknownImpl {
fn GetLength(&self) -> u32;
fn GetTrack(&self, index: u32) -> windows_core::Result<IMFTimedTextTrack>;
fn GetTrackById(&self, trackid: u32) -> windows_core::Result<IMFTimedTextTrack>;
}
impl IMFTimedTextTrackList_Vtbl {
pub const fn new<Identity: IMFTimedTextTrackList_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetLength<Identity: IMFTimedTextTrackList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> u32 {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimedTextTrackList_Impl::GetLength(this)
}
}
unsafe extern "system" fn GetTrack<Identity: IMFTimedTextTrackList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, index: u32, track: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextTrackList_Impl::GetTrack(this, core::mem::transmute_copy(&index)) {
Ok(ok__) => {
track.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetTrackById<Identity: IMFTimedTextTrackList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, trackid: u32, track: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimedTextTrackList_Impl::GetTrackById(this, core::mem::transmute_copy(&trackid)) {
Ok(ok__) => {
track.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetLength: GetLength::<Identity, OFFSET>,
GetTrack: GetTrack::<Identity, OFFSET>,
GetTrackById: GetTrackById::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFTimedTextTrackList as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFTimedTextTrackList {}
windows_core::imp::define_interface!(IMFTimer, IMFTimer_Vtbl, 0xe56e4cbd_8f70_49d8_a0f8_edb3d6ab9bf2);
windows_core::imp::interface_hierarchy!(IMFTimer, windows_core::IUnknown);
impl IMFTimer {
pub unsafe fn SetTimer<P2, P3>(&self, dwflags: u32, llclocktime: i64, pcallback: P2, punkstate: P3) -> windows_core::Result<windows_core::IUnknown>
where
P2: windows_core::Param<IMFAsyncCallback>,
P3: windows_core::Param<windows_core::IUnknown>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).SetTimer)(windows_core::Interface::as_raw(self), dwflags, llclocktime, pcallback.param().abi(), punkstate.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn CancelTimer<P0>(&self, punkkey: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).CancelTimer)(windows_core::Interface::as_raw(self), punkkey.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFTimer_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetTimer: unsafe extern "system" fn(*mut core::ffi::c_void, u32, i64, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CancelTimer: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFTimer_Impl: windows_core::IUnknownImpl {
fn SetTimer(&self, dwflags: u32, llclocktime: i64, pcallback: windows_core::Ref<IMFAsyncCallback>, punkstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<windows_core::IUnknown>;
fn CancelTimer(&self, punkkey: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
}
impl IMFTimer_Vtbl {
pub const fn new<Identity: IMFTimer_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetTimer<Identity: IMFTimer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwflags: u32, llclocktime: i64, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void, ppunkkey: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTimer_Impl::SetTimer(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&llclocktime), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)) {
Ok(ok__) => {
ppunkkey.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn CancelTimer<Identity: IMFTimer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, punkkey: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTimer_Impl::CancelTimer(this, core::mem::transmute_copy(&punkkey)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetTimer: SetTimer::<Identity, OFFSET>,
CancelTimer: CancelTimer::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFTimer as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFTimer {}
windows_core::imp::define_interface!(IMFTopoLoader, IMFTopoLoader_Vtbl, 0xde9a6157_f660_4643_b56a_df9f7998c7cd);
windows_core::imp::interface_hierarchy!(IMFTopoLoader, windows_core::IUnknown);
impl IMFTopoLoader {
pub unsafe fn Load<P0, P2>(&self, pinputtopo: P0, ppoutputtopo: *mut Option<IMFTopology>, pcurrenttopo: P2) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFTopology>,
P2: windows_core::Param<IMFTopology>,
{
unsafe { (windows_core::Interface::vtable(self).Load)(windows_core::Interface::as_raw(self), pinputtopo.param().abi(), core::mem::transmute(ppoutputtopo), pcurrenttopo.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFTopoLoader_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub Load: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFTopoLoader_Impl: windows_core::IUnknownImpl {
fn Load(&self, pinputtopo: windows_core::Ref<IMFTopology>, ppoutputtopo: windows_core::OutRef<IMFTopology>, pcurrenttopo: windows_core::Ref<IMFTopology>) -> windows_core::Result<()>;
}
impl IMFTopoLoader_Vtbl {
pub const fn new<Identity: IMFTopoLoader_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Load<Identity: IMFTopoLoader_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pinputtopo: *mut core::ffi::c_void, ppoutputtopo: *mut *mut core::ffi::c_void, pcurrenttopo: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTopoLoader_Impl::Load(this, core::mem::transmute_copy(&pinputtopo), core::mem::transmute_copy(&ppoutputtopo), core::mem::transmute_copy(&pcurrenttopo)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), Load: Load::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFTopoLoader as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFTopoLoader {}
windows_core::imp::define_interface!(IMFTopology, IMFTopology_Vtbl, 0x83cf873a_f6da_4bc8_823f_bacfd55dc433);
impl core::ops::Deref for IMFTopology {
type Target = IMFAttributes;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFTopology, windows_core::IUnknown, IMFAttributes);
impl IMFTopology {
pub unsafe fn GetTopologyID(&self) -> windows_core::Result<u64> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetTopologyID)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn AddNode<P0>(&self, pnode: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFTopologyNode>,
{
unsafe { (windows_core::Interface::vtable(self).AddNode)(windows_core::Interface::as_raw(self), pnode.param().abi()).ok() }
}
pub unsafe fn RemoveNode<P0>(&self, pnode: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFTopologyNode>,
{
unsafe { (windows_core::Interface::vtable(self).RemoveNode)(windows_core::Interface::as_raw(self), pnode.param().abi()).ok() }
}
pub unsafe fn GetNodeCount(&self) -> windows_core::Result<u16> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetNodeCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetNode(&self, windex: u16) -> windows_core::Result<IMFTopologyNode> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetNode)(windows_core::Interface::as_raw(self), windex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn Clear(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Clear)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn CloneFrom<P0>(&self, ptopology: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFTopology>,
{
unsafe { (windows_core::Interface::vtable(self).CloneFrom)(windows_core::Interface::as_raw(self), ptopology.param().abi()).ok() }
}
pub unsafe fn GetNodeByID(&self, qwtoponodeid: u64) -> windows_core::Result<IMFTopologyNode> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetNodeByID)(windows_core::Interface::as_raw(self), qwtoponodeid, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetSourceNodeCollection(&self) -> windows_core::Result<IMFCollection> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetSourceNodeCollection)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetOutputNodeCollection(&self) -> windows_core::Result<IMFCollection> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOutputNodeCollection)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFTopology_Vtbl {
pub base__: IMFAttributes_Vtbl,
pub GetTopologyID: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
pub AddNode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RemoveNode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetNodeCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16) -> windows_core::HRESULT,
pub GetNode: unsafe extern "system" fn(*mut core::ffi::c_void, u16, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Clear: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub CloneFrom: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetNodeByID: unsafe extern "system" fn(*mut core::ffi::c_void, u64, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetSourceNodeCollection: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetOutputNodeCollection: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFTopology_Impl: IMFAttributes_Impl {
fn GetTopologyID(&self) -> windows_core::Result<u64>;
fn AddNode(&self, pnode: windows_core::Ref<IMFTopologyNode>) -> windows_core::Result<()>;
fn RemoveNode(&self, pnode: windows_core::Ref<IMFTopologyNode>) -> windows_core::Result<()>;
fn GetNodeCount(&self) -> windows_core::Result<u16>;
fn GetNode(&self, windex: u16) -> windows_core::Result<IMFTopologyNode>;
fn Clear(&self) -> windows_core::Result<()>;
fn CloneFrom(&self, ptopology: windows_core::Ref<IMFTopology>) -> windows_core::Result<()>;
fn GetNodeByID(&self, qwtoponodeid: u64) -> windows_core::Result<IMFTopologyNode>;
fn GetSourceNodeCollection(&self) -> windows_core::Result<IMFCollection>;
fn GetOutputNodeCollection(&self) -> windows_core::Result<IMFCollection>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFTopology_Vtbl {
pub const fn new<Identity: IMFTopology_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetTopologyID<Identity: IMFTopology_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pid: *mut u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTopology_Impl::GetTopologyID(this) {
Ok(ok__) => {
pid.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn AddNode<Identity: IMFTopology_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pnode: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTopology_Impl::AddNode(this, core::mem::transmute_copy(&pnode)).into()
}
}
unsafe extern "system" fn RemoveNode<Identity: IMFTopology_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pnode: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTopology_Impl::RemoveNode(this, core::mem::transmute_copy(&pnode)).into()
}
}
unsafe extern "system" fn GetNodeCount<Identity: IMFTopology_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pwnodes: *mut u16) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTopology_Impl::GetNodeCount(this) {
Ok(ok__) => {
pwnodes.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetNode<Identity: IMFTopology_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, windex: u16, ppnode: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTopology_Impl::GetNode(this, core::mem::transmute_copy(&windex)) {
Ok(ok__) => {
ppnode.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Clear<Identity: IMFTopology_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTopology_Impl::Clear(this).into()
}
}
unsafe extern "system" fn CloneFrom<Identity: IMFTopology_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ptopology: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTopology_Impl::CloneFrom(this, core::mem::transmute_copy(&ptopology)).into()
}
}
unsafe extern "system" fn GetNodeByID<Identity: IMFTopology_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, qwtoponodeid: u64, ppnode: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTopology_Impl::GetNodeByID(this, core::mem::transmute_copy(&qwtoponodeid)) {
Ok(ok__) => {
ppnode.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetSourceNodeCollection<Identity: IMFTopology_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppcollection: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTopology_Impl::GetSourceNodeCollection(this) {
Ok(ok__) => {
ppcollection.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetOutputNodeCollection<Identity: IMFTopology_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppcollection: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTopology_Impl::GetOutputNodeCollection(this) {
Ok(ok__) => {
ppcollection.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, OFFSET>(),
GetTopologyID: GetTopologyID::<Identity, OFFSET>,
AddNode: AddNode::<Identity, OFFSET>,
RemoveNode: RemoveNode::<Identity, OFFSET>,
GetNodeCount: GetNodeCount::<Identity, OFFSET>,
GetNode: GetNode::<Identity, OFFSET>,
Clear: Clear::<Identity, OFFSET>,
CloneFrom: CloneFrom::<Identity, OFFSET>,
GetNodeByID: GetNodeByID::<Identity, OFFSET>,
GetSourceNodeCollection: GetSourceNodeCollection::<Identity, OFFSET>,
GetOutputNodeCollection: GetOutputNodeCollection::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFTopology as windows_core::Interface>::IID || iid == &<IMFAttributes as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFTopology {}
windows_core::imp::define_interface!(IMFTopologyNode, IMFTopologyNode_Vtbl, 0x83cf873a_f6da_4bc8_823f_bacfd55dc430);
impl core::ops::Deref for IMFTopologyNode {
type Target = IMFAttributes;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFTopologyNode, windows_core::IUnknown, IMFAttributes);
impl IMFTopologyNode {
pub unsafe fn SetObject<P0>(&self, pobject: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).SetObject)(windows_core::Interface::as_raw(self), pobject.param().abi()).ok() }
}
pub unsafe fn GetObject(&self) -> windows_core::Result<windows_core::IUnknown> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetObject)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetNodeType(&self) -> windows_core::Result<MF_TOPOLOGY_TYPE> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetNodeType)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetTopoNodeID(&self) -> windows_core::Result<u64> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetTopoNodeID)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetTopoNodeID(&self, ulltopoid: u64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetTopoNodeID)(windows_core::Interface::as_raw(self), ulltopoid).ok() }
}
pub unsafe fn GetInputCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetInputCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetOutputCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOutputCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn ConnectOutput<P1>(&self, dwoutputindex: u32, pdownstreamnode: P1, dwinputindexondownstreamnode: u32) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFTopologyNode>,
{
unsafe { (windows_core::Interface::vtable(self).ConnectOutput)(windows_core::Interface::as_raw(self), dwoutputindex, pdownstreamnode.param().abi(), dwinputindexondownstreamnode).ok() }
}
pub unsafe fn DisconnectOutput(&self, dwoutputindex: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).DisconnectOutput)(windows_core::Interface::as_raw(self), dwoutputindex).ok() }
}
pub unsafe fn GetInput(&self, dwinputindex: u32, ppupstreamnode: *mut Option<IMFTopologyNode>, pdwoutputindexonupstreamnode: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetInput)(windows_core::Interface::as_raw(self), dwinputindex, core::mem::transmute(ppupstreamnode), pdwoutputindexonupstreamnode as _).ok() }
}
pub unsafe fn GetOutput(&self, dwoutputindex: u32, ppdownstreamnode: *mut Option<IMFTopologyNode>, pdwinputindexondownstreamnode: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetOutput)(windows_core::Interface::as_raw(self), dwoutputindex, core::mem::transmute(ppdownstreamnode), pdwinputindexondownstreamnode as _).ok() }
}
pub unsafe fn SetOutputPrefType<P1>(&self, dwoutputindex: u32, ptype: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFMediaType>,
{
unsafe { (windows_core::Interface::vtable(self).SetOutputPrefType)(windows_core::Interface::as_raw(self), dwoutputindex, ptype.param().abi()).ok() }
}
pub unsafe fn GetOutputPrefType(&self, dwoutputindex: u32) -> windows_core::Result<IMFMediaType> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOutputPrefType)(windows_core::Interface::as_raw(self), dwoutputindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn SetInputPrefType<P1>(&self, dwinputindex: u32, ptype: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFMediaType>,
{
unsafe { (windows_core::Interface::vtable(self).SetInputPrefType)(windows_core::Interface::as_raw(self), dwinputindex, ptype.param().abi()).ok() }
}
pub unsafe fn GetInputPrefType(&self, dwinputindex: u32) -> windows_core::Result<IMFMediaType> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetInputPrefType)(windows_core::Interface::as_raw(self), dwinputindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn CloneFrom<P0>(&self, pnode: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFTopologyNode>,
{
unsafe { (windows_core::Interface::vtable(self).CloneFrom)(windows_core::Interface::as_raw(self), pnode.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFTopologyNode_Vtbl {
pub base__: IMFAttributes_Vtbl,
pub SetObject: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetObject: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetNodeType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MF_TOPOLOGY_TYPE) -> windows_core::HRESULT,
pub GetTopoNodeID: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
pub SetTopoNodeID: unsafe extern "system" fn(*mut core::ffi::c_void, u64) -> windows_core::HRESULT,
pub GetInputCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetOutputCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub ConnectOutput: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub DisconnectOutput: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub GetInput: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetOutput: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub SetOutputPrefType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetOutputPrefType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetInputPrefType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetInputPrefType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CloneFrom: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFTopologyNode_Impl: IMFAttributes_Impl {
fn SetObject(&self, pobject: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn GetObject(&self) -> windows_core::Result<windows_core::IUnknown>;
fn GetNodeType(&self) -> windows_core::Result<MF_TOPOLOGY_TYPE>;
fn GetTopoNodeID(&self) -> windows_core::Result<u64>;
fn SetTopoNodeID(&self, ulltopoid: u64) -> windows_core::Result<()>;
fn GetInputCount(&self) -> windows_core::Result<u32>;
fn GetOutputCount(&self) -> windows_core::Result<u32>;
fn ConnectOutput(&self, dwoutputindex: u32, pdownstreamnode: windows_core::Ref<IMFTopologyNode>, dwinputindexondownstreamnode: u32) -> windows_core::Result<()>;
fn DisconnectOutput(&self, dwoutputindex: u32) -> windows_core::Result<()>;
fn GetInput(&self, dwinputindex: u32, ppupstreamnode: windows_core::OutRef<IMFTopologyNode>, pdwoutputindexonupstreamnode: *mut u32) -> windows_core::Result<()>;
fn GetOutput(&self, dwoutputindex: u32, ppdownstreamnode: windows_core::OutRef<IMFTopologyNode>, pdwinputindexondownstreamnode: *mut u32) -> windows_core::Result<()>;
fn SetOutputPrefType(&self, dwoutputindex: u32, ptype: windows_core::Ref<IMFMediaType>) -> windows_core::Result<()>;
fn GetOutputPrefType(&self, dwoutputindex: u32) -> windows_core::Result<IMFMediaType>;
fn SetInputPrefType(&self, dwinputindex: u32, ptype: windows_core::Ref<IMFMediaType>) -> windows_core::Result<()>;
fn GetInputPrefType(&self, dwinputindex: u32) -> windows_core::Result<IMFMediaType>;
fn CloneFrom(&self, pnode: windows_core::Ref<IMFTopologyNode>) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFTopologyNode_Vtbl {
pub const fn new<Identity: IMFTopologyNode_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetObject<Identity: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pobject: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTopologyNode_Impl::SetObject(this, core::mem::transmute_copy(&pobject)).into()
}
}
unsafe extern "system" fn GetObject<Identity: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTopologyNode_Impl::GetObject(this) {
Ok(ok__) => {
ppobject.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetNodeType<Identity: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ptype: *mut MF_TOPOLOGY_TYPE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTopologyNode_Impl::GetNodeType(this) {
Ok(ok__) => {
ptype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetTopoNodeID<Identity: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pid: *mut u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTopologyNode_Impl::GetTopoNodeID(this) {
Ok(ok__) => {
pid.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetTopoNodeID<Identity: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ulltopoid: u64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTopologyNode_Impl::SetTopoNodeID(this, core::mem::transmute_copy(&ulltopoid)).into()
}
}
unsafe extern "system" fn GetInputCount<Identity: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcinputs: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTopologyNode_Impl::GetInputCount(this) {
Ok(ok__) => {
pcinputs.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetOutputCount<Identity: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcoutputs: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTopologyNode_Impl::GetOutputCount(this) {
Ok(ok__) => {
pcoutputs.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn ConnectOutput<Identity: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwoutputindex: u32, pdownstreamnode: *mut core::ffi::c_void, dwinputindexondownstreamnode: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTopologyNode_Impl::ConnectOutput(this, core::mem::transmute_copy(&dwoutputindex), core::mem::transmute_copy(&pdownstreamnode), core::mem::transmute_copy(&dwinputindexondownstreamnode)).into()
}
}
unsafe extern "system" fn DisconnectOutput<Identity: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwoutputindex: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTopologyNode_Impl::DisconnectOutput(this, core::mem::transmute_copy(&dwoutputindex)).into()
}
}
unsafe extern "system" fn GetInput<Identity: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwinputindex: u32, ppupstreamnode: *mut *mut core::ffi::c_void, pdwoutputindexonupstreamnode: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTopologyNode_Impl::GetInput(this, core::mem::transmute_copy(&dwinputindex), core::mem::transmute_copy(&ppupstreamnode), core::mem::transmute_copy(&pdwoutputindexonupstreamnode)).into()
}
}
unsafe extern "system" fn GetOutput<Identity: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwoutputindex: u32, ppdownstreamnode: *mut *mut core::ffi::c_void, pdwinputindexondownstreamnode: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTopologyNode_Impl::GetOutput(this, core::mem::transmute_copy(&dwoutputindex), core::mem::transmute_copy(&ppdownstreamnode), core::mem::transmute_copy(&pdwinputindexondownstreamnode)).into()
}
}
unsafe extern "system" fn SetOutputPrefType<Identity: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwoutputindex: u32, ptype: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTopologyNode_Impl::SetOutputPrefType(this, core::mem::transmute_copy(&dwoutputindex), core::mem::transmute_copy(&ptype)).into()
}
}
unsafe extern "system" fn GetOutputPrefType<Identity: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwoutputindex: u32, pptype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTopologyNode_Impl::GetOutputPrefType(this, core::mem::transmute_copy(&dwoutputindex)) {
Ok(ok__) => {
pptype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetInputPrefType<Identity: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwinputindex: u32, ptype: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTopologyNode_Impl::SetInputPrefType(this, core::mem::transmute_copy(&dwinputindex), core::mem::transmute_copy(&ptype)).into()
}
}
unsafe extern "system" fn GetInputPrefType<Identity: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwinputindex: u32, pptype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTopologyNode_Impl::GetInputPrefType(this, core::mem::transmute_copy(&dwinputindex)) {
Ok(ok__) => {
pptype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn CloneFrom<Identity: IMFTopologyNode_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pnode: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTopologyNode_Impl::CloneFrom(this, core::mem::transmute_copy(&pnode)).into()
}
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, OFFSET>(),
SetObject: SetObject::<Identity, OFFSET>,
GetObject: GetObject::<Identity, OFFSET>,
GetNodeType: GetNodeType::<Identity, OFFSET>,
GetTopoNodeID: GetTopoNodeID::<Identity, OFFSET>,
SetTopoNodeID: SetTopoNodeID::<Identity, OFFSET>,
GetInputCount: GetInputCount::<Identity, OFFSET>,
GetOutputCount: GetOutputCount::<Identity, OFFSET>,
ConnectOutput: ConnectOutput::<Identity, OFFSET>,
DisconnectOutput: DisconnectOutput::<Identity, OFFSET>,
GetInput: GetInput::<Identity, OFFSET>,
GetOutput: GetOutput::<Identity, OFFSET>,
SetOutputPrefType: SetOutputPrefType::<Identity, OFFSET>,
GetOutputPrefType: GetOutputPrefType::<Identity, OFFSET>,
SetInputPrefType: SetInputPrefType::<Identity, OFFSET>,
GetInputPrefType: GetInputPrefType::<Identity, OFFSET>,
CloneFrom: CloneFrom::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFTopologyNode as windows_core::Interface>::IID || iid == &<IMFAttributes as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFTopologyNode {}
windows_core::imp::define_interface!(IMFTopologyNodeAttributeEditor, IMFTopologyNodeAttributeEditor_Vtbl, 0x676aa6dd_238a_410d_bb99_65668d01605a);
windows_core::imp::interface_hierarchy!(IMFTopologyNodeAttributeEditor, windows_core::IUnknown);
impl IMFTopologyNodeAttributeEditor {
pub unsafe fn UpdateNodeAttributes(&self, topoid: u64, pupdates: &[MFTOPONODE_ATTRIBUTE_UPDATE]) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).UpdateNodeAttributes)(windows_core::Interface::as_raw(self), topoid, pupdates.len().try_into().unwrap(), core::mem::transmute(pupdates.as_ptr())).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFTopologyNodeAttributeEditor_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub UpdateNodeAttributes: unsafe extern "system" fn(*mut core::ffi::c_void, u64, u32, *const MFTOPONODE_ATTRIBUTE_UPDATE) -> windows_core::HRESULT,
}
pub trait IMFTopologyNodeAttributeEditor_Impl: windows_core::IUnknownImpl {
fn UpdateNodeAttributes(&self, topoid: u64, cupdates: u32, pupdates: *const MFTOPONODE_ATTRIBUTE_UPDATE) -> windows_core::Result<()>;
}
impl IMFTopologyNodeAttributeEditor_Vtbl {
pub const fn new<Identity: IMFTopologyNodeAttributeEditor_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn UpdateNodeAttributes<Identity: IMFTopologyNodeAttributeEditor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, topoid: u64, cupdates: u32, pupdates: *const MFTOPONODE_ATTRIBUTE_UPDATE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTopologyNodeAttributeEditor_Impl::UpdateNodeAttributes(this, core::mem::transmute_copy(&topoid), core::mem::transmute_copy(&cupdates), core::mem::transmute_copy(&pupdates)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), UpdateNodeAttributes: UpdateNodeAttributes::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFTopologyNodeAttributeEditor as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFTopologyNodeAttributeEditor {}
windows_core::imp::define_interface!(IMFTopologyServiceLookup, IMFTopologyServiceLookup_Vtbl, 0xfa993889_4383_415a_a930_dd472a8cf6f7);
windows_core::imp::interface_hierarchy!(IMFTopologyServiceLookup, windows_core::IUnknown);
impl IMFTopologyServiceLookup {
pub unsafe fn LookupService(&self, r#type: MF_SERVICE_LOOKUP_TYPE, dwindex: u32, guidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppvobjects: *mut *mut core::ffi::c_void, pnobjects: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).LookupService)(windows_core::Interface::as_raw(self), r#type, dwindex, guidservice, riid, ppvobjects as _, pnobjects as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFTopologyServiceLookup_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub LookupService: unsafe extern "system" fn(*mut core::ffi::c_void, MF_SERVICE_LOOKUP_TYPE, u32, *const windows_core::GUID, *const windows_core::GUID, *mut *mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
}
pub trait IMFTopologyServiceLookup_Impl: windows_core::IUnknownImpl {
fn LookupService(&self, r#type: MF_SERVICE_LOOKUP_TYPE, dwindex: u32, guidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppvobjects: *mut *mut core::ffi::c_void, pnobjects: *mut u32) -> windows_core::Result<()>;
}
impl IMFTopologyServiceLookup_Vtbl {
pub const fn new<Identity: IMFTopologyServiceLookup_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn LookupService<Identity: IMFTopologyServiceLookup_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, r#type: MF_SERVICE_LOOKUP_TYPE, dwindex: u32, guidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppvobjects: *mut *mut core::ffi::c_void, pnobjects: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTopologyServiceLookup_Impl::LookupService(this, core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&dwindex), core::mem::transmute_copy(&guidservice), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobjects), core::mem::transmute_copy(&pnobjects)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), LookupService: LookupService::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFTopologyServiceLookup as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFTopologyServiceLookup {}
windows_core::imp::define_interface!(IMFTopologyServiceLookupClient, IMFTopologyServiceLookupClient_Vtbl, 0xfa99388a_4383_415a_a930_dd472a8cf6f7);
windows_core::imp::interface_hierarchy!(IMFTopologyServiceLookupClient, windows_core::IUnknown);
impl IMFTopologyServiceLookupClient {
pub unsafe fn InitServicePointers<P0>(&self, plookup: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFTopologyServiceLookup>,
{
unsafe { (windows_core::Interface::vtable(self).InitServicePointers)(windows_core::Interface::as_raw(self), plookup.param().abi()).ok() }
}
pub unsafe fn ReleaseServicePointers(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).ReleaseServicePointers)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFTopologyServiceLookupClient_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub InitServicePointers: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ReleaseServicePointers: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFTopologyServiceLookupClient_Impl: windows_core::IUnknownImpl {
fn InitServicePointers(&self, plookup: windows_core::Ref<IMFTopologyServiceLookup>) -> windows_core::Result<()>;
fn ReleaseServicePointers(&self) -> windows_core::Result<()>;
}
impl IMFTopologyServiceLookupClient_Vtbl {
pub const fn new<Identity: IMFTopologyServiceLookupClient_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn InitServicePointers<Identity: IMFTopologyServiceLookupClient_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, plookup: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTopologyServiceLookupClient_Impl::InitServicePointers(this, core::mem::transmute_copy(&plookup)).into()
}
}
unsafe extern "system" fn ReleaseServicePointers<Identity: IMFTopologyServiceLookupClient_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTopologyServiceLookupClient_Impl::ReleaseServicePointers(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
InitServicePointers: InitServicePointers::<Identity, OFFSET>,
ReleaseServicePointers: ReleaseServicePointers::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFTopologyServiceLookupClient as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFTopologyServiceLookupClient {}
windows_core::imp::define_interface!(IMFTrackedSample, IMFTrackedSample_Vtbl, 0x245bf8e9_0755_40f7_88a5_ae0f18d55e17);
windows_core::imp::interface_hierarchy!(IMFTrackedSample, windows_core::IUnknown);
impl IMFTrackedSample {
pub unsafe fn SetAllocator<P0, P1>(&self, psampleallocator: P0, punkstate: P1) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncCallback>,
P1: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).SetAllocator)(windows_core::Interface::as_raw(self), psampleallocator.param().abi(), punkstate.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFTrackedSample_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetAllocator: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFTrackedSample_Impl: windows_core::IUnknownImpl {
fn SetAllocator(&self, psampleallocator: windows_core::Ref<IMFAsyncCallback>, punkstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
}
impl IMFTrackedSample_Vtbl {
pub const fn new<Identity: IMFTrackedSample_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetAllocator<Identity: IMFTrackedSample_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, psampleallocator: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTrackedSample_Impl::SetAllocator(this, core::mem::transmute_copy(&psampleallocator), core::mem::transmute_copy(&punkstate)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), SetAllocator: SetAllocator::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFTrackedSample as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFTrackedSample {}
windows_core::imp::define_interface!(IMFTranscodeProfile, IMFTranscodeProfile_Vtbl, 0x4adfdba3_7ab0_4953_a62b_461e7ff3da1e);
windows_core::imp::interface_hierarchy!(IMFTranscodeProfile, windows_core::IUnknown);
impl IMFTranscodeProfile {
pub unsafe fn SetAudioAttributes<P0>(&self, pattrs: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAttributes>,
{
unsafe { (windows_core::Interface::vtable(self).SetAudioAttributes)(windows_core::Interface::as_raw(self), pattrs.param().abi()).ok() }
}
pub unsafe fn GetAudioAttributes(&self) -> windows_core::Result<IMFAttributes> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetAudioAttributes)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn SetVideoAttributes<P0>(&self, pattrs: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAttributes>,
{
unsafe { (windows_core::Interface::vtable(self).SetVideoAttributes)(windows_core::Interface::as_raw(self), pattrs.param().abi()).ok() }
}
pub unsafe fn GetVideoAttributes(&self) -> windows_core::Result<IMFAttributes> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetVideoAttributes)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn SetContainerAttributes<P0>(&self, pattrs: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAttributes>,
{
unsafe { (windows_core::Interface::vtable(self).SetContainerAttributes)(windows_core::Interface::as_raw(self), pattrs.param().abi()).ok() }
}
pub unsafe fn GetContainerAttributes(&self) -> windows_core::Result<IMFAttributes> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetContainerAttributes)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFTranscodeProfile_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetAudioAttributes: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetAudioAttributes: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetVideoAttributes: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetVideoAttributes: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetContainerAttributes: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetContainerAttributes: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFTranscodeProfile_Impl: windows_core::IUnknownImpl {
fn SetAudioAttributes(&self, pattrs: windows_core::Ref<IMFAttributes>) -> windows_core::Result<()>;
fn GetAudioAttributes(&self) -> windows_core::Result<IMFAttributes>;
fn SetVideoAttributes(&self, pattrs: windows_core::Ref<IMFAttributes>) -> windows_core::Result<()>;
fn GetVideoAttributes(&self) -> windows_core::Result<IMFAttributes>;
fn SetContainerAttributes(&self, pattrs: windows_core::Ref<IMFAttributes>) -> windows_core::Result<()>;
fn GetContainerAttributes(&self) -> windows_core::Result<IMFAttributes>;
}
impl IMFTranscodeProfile_Vtbl {
pub const fn new<Identity: IMFTranscodeProfile_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetAudioAttributes<Identity: IMFTranscodeProfile_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pattrs: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTranscodeProfile_Impl::SetAudioAttributes(this, core::mem::transmute_copy(&pattrs)).into()
}
}
unsafe extern "system" fn GetAudioAttributes<Identity: IMFTranscodeProfile_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppattrs: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTranscodeProfile_Impl::GetAudioAttributes(this) {
Ok(ok__) => {
ppattrs.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetVideoAttributes<Identity: IMFTranscodeProfile_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pattrs: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTranscodeProfile_Impl::SetVideoAttributes(this, core::mem::transmute_copy(&pattrs)).into()
}
}
unsafe extern "system" fn GetVideoAttributes<Identity: IMFTranscodeProfile_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppattrs: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTranscodeProfile_Impl::GetVideoAttributes(this) {
Ok(ok__) => {
ppattrs.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetContainerAttributes<Identity: IMFTranscodeProfile_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pattrs: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTranscodeProfile_Impl::SetContainerAttributes(this, core::mem::transmute_copy(&pattrs)).into()
}
}
unsafe extern "system" fn GetContainerAttributes<Identity: IMFTranscodeProfile_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppattrs: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTranscodeProfile_Impl::GetContainerAttributes(this) {
Ok(ok__) => {
ppattrs.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetAudioAttributes: SetAudioAttributes::<Identity, OFFSET>,
GetAudioAttributes: GetAudioAttributes::<Identity, OFFSET>,
SetVideoAttributes: SetVideoAttributes::<Identity, OFFSET>,
GetVideoAttributes: GetVideoAttributes::<Identity, OFFSET>,
SetContainerAttributes: SetContainerAttributes::<Identity, OFFSET>,
GetContainerAttributes: GetContainerAttributes::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFTranscodeProfile as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFTranscodeProfile {}
windows_core::imp::define_interface!(IMFTranscodeSinkInfoProvider, IMFTranscodeSinkInfoProvider_Vtbl, 0x8cffcd2e_5a03_4a3a_aff7_edcd107c620e);
windows_core::imp::interface_hierarchy!(IMFTranscodeSinkInfoProvider, windows_core::IUnknown);
impl IMFTranscodeSinkInfoProvider {
pub unsafe fn SetOutputFile<P0>(&self, pwszfilename: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).SetOutputFile)(windows_core::Interface::as_raw(self), pwszfilename.param().abi()).ok() }
}
pub unsafe fn SetOutputByteStream<P0>(&self, pbytestreamactivate: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFActivate>,
{
unsafe { (windows_core::Interface::vtable(self).SetOutputByteStream)(windows_core::Interface::as_raw(self), pbytestreamactivate.param().abi()).ok() }
}
pub unsafe fn SetProfile<P0>(&self, pprofile: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFTranscodeProfile>,
{
unsafe { (windows_core::Interface::vtable(self).SetProfile)(windows_core::Interface::as_raw(self), pprofile.param().abi()).ok() }
}
pub unsafe fn GetSinkInfo(&self) -> windows_core::Result<MF_TRANSCODE_SINK_INFO> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetSinkInfo)(windows_core::Interface::as_raw(self), &mut result__).map(|| core::mem::transmute(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFTranscodeSinkInfoProvider_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetOutputFile: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR) -> windows_core::HRESULT,
pub SetOutputByteStream: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetProfile: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetSinkInfo: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MF_TRANSCODE_SINK_INFO) -> windows_core::HRESULT,
}
pub trait IMFTranscodeSinkInfoProvider_Impl: windows_core::IUnknownImpl {
fn SetOutputFile(&self, pwszfilename: &windows_core::PCWSTR) -> windows_core::Result<()>;
fn SetOutputByteStream(&self, pbytestreamactivate: windows_core::Ref<IMFActivate>) -> windows_core::Result<()>;
fn SetProfile(&self, pprofile: windows_core::Ref<IMFTranscodeProfile>) -> windows_core::Result<()>;
fn GetSinkInfo(&self) -> windows_core::Result<MF_TRANSCODE_SINK_INFO>;
}
impl IMFTranscodeSinkInfoProvider_Vtbl {
pub const fn new<Identity: IMFTranscodeSinkInfoProvider_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetOutputFile<Identity: IMFTranscodeSinkInfoProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pwszfilename: windows_core::PCWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTranscodeSinkInfoProvider_Impl::SetOutputFile(this, core::mem::transmute(&pwszfilename)).into()
}
}
unsafe extern "system" fn SetOutputByteStream<Identity: IMFTranscodeSinkInfoProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbytestreamactivate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTranscodeSinkInfoProvider_Impl::SetOutputByteStream(this, core::mem::transmute_copy(&pbytestreamactivate)).into()
}
}
unsafe extern "system" fn SetProfile<Identity: IMFTranscodeSinkInfoProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pprofile: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTranscodeSinkInfoProvider_Impl::SetProfile(this, core::mem::transmute_copy(&pprofile)).into()
}
}
unsafe extern "system" fn GetSinkInfo<Identity: IMFTranscodeSinkInfoProvider_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, psinkinfo: *mut MF_TRANSCODE_SINK_INFO) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTranscodeSinkInfoProvider_Impl::GetSinkInfo(this) {
Ok(ok__) => {
psinkinfo.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetOutputFile: SetOutputFile::<Identity, OFFSET>,
SetOutputByteStream: SetOutputByteStream::<Identity, OFFSET>,
SetProfile: SetProfile::<Identity, OFFSET>,
GetSinkInfo: GetSinkInfo::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFTranscodeSinkInfoProvider as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFTranscodeSinkInfoProvider {}
windows_core::imp::define_interface!(IMFTransform, IMFTransform_Vtbl, 0xbf94c121_5b05_4e6f_8000_ba598961414d);
windows_core::imp::interface_hierarchy!(IMFTransform, windows_core::IUnknown);
impl IMFTransform {
pub unsafe fn GetStreamLimits(&self, pdwinputminimum: *mut u32, pdwinputmaximum: *mut u32, pdwoutputminimum: *mut u32, pdwoutputmaximum: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetStreamLimits)(windows_core::Interface::as_raw(self), pdwinputminimum as _, pdwinputmaximum as _, pdwoutputminimum as _, pdwoutputmaximum as _).ok() }
}
pub unsafe fn GetStreamCount(&self, pcinputstreams: *mut u32, pcoutputstreams: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetStreamCount)(windows_core::Interface::as_raw(self), pcinputstreams as _, pcoutputstreams as _).ok() }
}
pub unsafe fn GetStreamIDs(&self, pdwinputids: &mut [u32], pdwoutputids: &mut [u32]) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetStreamIDs)(windows_core::Interface::as_raw(self), pdwinputids.len().try_into().unwrap(), core::mem::transmute(pdwinputids.as_ptr()), pdwoutputids.len().try_into().unwrap(), core::mem::transmute(pdwoutputids.as_ptr())).ok() }
}
pub unsafe fn GetInputStreamInfo(&self, dwinputstreamid: u32, pstreaminfo: *mut MFT_INPUT_STREAM_INFO) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetInputStreamInfo)(windows_core::Interface::as_raw(self), dwinputstreamid, pstreaminfo as _).ok() }
}
pub unsafe fn GetOutputStreamInfo(&self, dwoutputstreamid: u32) -> windows_core::Result<MFT_OUTPUT_STREAM_INFO> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOutputStreamInfo)(windows_core::Interface::as_raw(self), dwoutputstreamid, &mut result__).map(|| result__)
}
}
pub unsafe fn GetAttributes(&self) -> windows_core::Result<IMFAttributes> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetAttributes)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetInputStreamAttributes(&self, dwinputstreamid: u32) -> windows_core::Result<IMFAttributes> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetInputStreamAttributes)(windows_core::Interface::as_raw(self), dwinputstreamid, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetOutputStreamAttributes(&self, dwoutputstreamid: u32) -> windows_core::Result<IMFAttributes> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOutputStreamAttributes)(windows_core::Interface::as_raw(self), dwoutputstreamid, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn DeleteInputStream(&self, dwstreamid: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).DeleteInputStream)(windows_core::Interface::as_raw(self), dwstreamid).ok() }
}
pub unsafe fn AddInputStreams(&self, cstreams: u32, adwstreamids: *const u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).AddInputStreams)(windows_core::Interface::as_raw(self), cstreams, adwstreamids).ok() }
}
pub unsafe fn GetInputAvailableType(&self, dwinputstreamid: u32, dwtypeindex: u32) -> windows_core::Result<IMFMediaType> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetInputAvailableType)(windows_core::Interface::as_raw(self), dwinputstreamid, dwtypeindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetOutputAvailableType(&self, dwoutputstreamid: u32, dwtypeindex: u32) -> windows_core::Result<IMFMediaType> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOutputAvailableType)(windows_core::Interface::as_raw(self), dwoutputstreamid, dwtypeindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn SetInputType<P1>(&self, dwinputstreamid: u32, ptype: P1, dwflags: u32) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFMediaType>,
{
unsafe { (windows_core::Interface::vtable(self).SetInputType)(windows_core::Interface::as_raw(self), dwinputstreamid, ptype.param().abi(), dwflags).ok() }
}
pub unsafe fn SetOutputType<P1>(&self, dwoutputstreamid: u32, ptype: P1, dwflags: u32) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFMediaType>,
{
unsafe { (windows_core::Interface::vtable(self).SetOutputType)(windows_core::Interface::as_raw(self), dwoutputstreamid, ptype.param().abi(), dwflags).ok() }
}
pub unsafe fn GetInputCurrentType(&self, dwinputstreamid: u32) -> windows_core::Result<IMFMediaType> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetInputCurrentType)(windows_core::Interface::as_raw(self), dwinputstreamid, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetOutputCurrentType(&self, dwoutputstreamid: u32) -> windows_core::Result<IMFMediaType> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOutputCurrentType)(windows_core::Interface::as_raw(self), dwoutputstreamid, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetInputStatus(&self, dwinputstreamid: u32) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetInputStatus)(windows_core::Interface::as_raw(self), dwinputstreamid, &mut result__).map(|| result__)
}
}
pub unsafe fn GetOutputStatus(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOutputStatus)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetOutputBounds(&self, hnslowerbound: i64, hnsupperbound: i64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetOutputBounds)(windows_core::Interface::as_raw(self), hnslowerbound, hnsupperbound).ok() }
}
pub unsafe fn ProcessEvent<P1>(&self, dwinputstreamid: u32, pevent: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFMediaEvent>,
{
unsafe { (windows_core::Interface::vtable(self).ProcessEvent)(windows_core::Interface::as_raw(self), dwinputstreamid, pevent.param().abi()).ok() }
}
pub unsafe fn ProcessMessage(&self, emessage: MFT_MESSAGE_TYPE, ulparam: usize) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).ProcessMessage)(windows_core::Interface::as_raw(self), emessage, ulparam).ok() }
}
pub unsafe fn ProcessInput<P1>(&self, dwinputstreamid: u32, psample: P1, dwflags: u32) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFSample>,
{
unsafe { (windows_core::Interface::vtable(self).ProcessInput)(windows_core::Interface::as_raw(self), dwinputstreamid, psample.param().abi(), dwflags).ok() }
}
pub unsafe fn ProcessOutput(&self, dwflags: u32, poutputsamples: &mut [MFT_OUTPUT_DATA_BUFFER], pdwstatus: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).ProcessOutput)(windows_core::Interface::as_raw(self), dwflags, poutputsamples.len().try_into().unwrap(), core::mem::transmute(poutputsamples.as_ptr()), pdwstatus as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFTransform_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetStreamLimits: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut u32, *mut u32, *mut u32) -> windows_core::HRESULT,
pub GetStreamCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut u32) -> windows_core::HRESULT,
pub GetStreamIDs: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u32, u32, *mut u32) -> windows_core::HRESULT,
pub GetInputStreamInfo: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut MFT_INPUT_STREAM_INFO) -> windows_core::HRESULT,
pub GetOutputStreamInfo: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut MFT_OUTPUT_STREAM_INFO) -> windows_core::HRESULT,
pub GetAttributes: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetInputStreamAttributes: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetOutputStreamAttributes: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub DeleteInputStream: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub AddInputStreams: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const u32) -> windows_core::HRESULT,
pub GetInputAvailableType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetOutputAvailableType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SetInputType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub SetOutputType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub GetInputCurrentType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetOutputCurrentType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetInputStatus: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u32) -> windows_core::HRESULT,
pub GetOutputStatus: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub SetOutputBounds: unsafe extern "system" fn(*mut core::ffi::c_void, i64, i64) -> windows_core::HRESULT,
pub ProcessEvent: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub ProcessMessage: unsafe extern "system" fn(*mut core::ffi::c_void, MFT_MESSAGE_TYPE, usize) -> windows_core::HRESULT,
pub ProcessInput: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub ProcessOutput: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, *mut MFT_OUTPUT_DATA_BUFFER, *mut u32) -> windows_core::HRESULT,
}
pub trait IMFTransform_Impl: windows_core::IUnknownImpl {
fn GetStreamLimits(&self, pdwinputminimum: *mut u32, pdwinputmaximum: *mut u32, pdwoutputminimum: *mut u32, pdwoutputmaximum: *mut u32) -> windows_core::Result<()>;
fn GetStreamCount(&self, pcinputstreams: *mut u32, pcoutputstreams: *mut u32) -> windows_core::Result<()>;
fn GetStreamIDs(&self, dwinputidarraysize: u32, pdwinputids: *mut u32, dwoutputidarraysize: u32, pdwoutputids: *mut u32) -> windows_core::Result<()>;
fn GetInputStreamInfo(&self, dwinputstreamid: u32, pstreaminfo: *mut MFT_INPUT_STREAM_INFO) -> windows_core::Result<()>;
fn GetOutputStreamInfo(&self, dwoutputstreamid: u32) -> windows_core::Result<MFT_OUTPUT_STREAM_INFO>;
fn GetAttributes(&self) -> windows_core::Result<IMFAttributes>;
fn GetInputStreamAttributes(&self, dwinputstreamid: u32) -> windows_core::Result<IMFAttributes>;
fn GetOutputStreamAttributes(&self, dwoutputstreamid: u32) -> windows_core::Result<IMFAttributes>;
fn DeleteInputStream(&self, dwstreamid: u32) -> windows_core::Result<()>;
fn AddInputStreams(&self, cstreams: u32, adwstreamids: *const u32) -> windows_core::Result<()>;
fn GetInputAvailableType(&self, dwinputstreamid: u32, dwtypeindex: u32) -> windows_core::Result<IMFMediaType>;
fn GetOutputAvailableType(&self, dwoutputstreamid: u32, dwtypeindex: u32) -> windows_core::Result<IMFMediaType>;
fn SetInputType(&self, dwinputstreamid: u32, ptype: windows_core::Ref<IMFMediaType>, dwflags: u32) -> windows_core::Result<()>;
fn SetOutputType(&self, dwoutputstreamid: u32, ptype: windows_core::Ref<IMFMediaType>, dwflags: u32) -> windows_core::Result<()>;
fn GetInputCurrentType(&self, dwinputstreamid: u32) -> windows_core::Result<IMFMediaType>;
fn GetOutputCurrentType(&self, dwoutputstreamid: u32) -> windows_core::Result<IMFMediaType>;
fn GetInputStatus(&self, dwinputstreamid: u32) -> windows_core::Result<u32>;
fn GetOutputStatus(&self) -> windows_core::Result<u32>;
fn SetOutputBounds(&self, hnslowerbound: i64, hnsupperbound: i64) -> windows_core::Result<()>;
fn ProcessEvent(&self, dwinputstreamid: u32, pevent: windows_core::Ref<IMFMediaEvent>) -> windows_core::Result<()>;
fn ProcessMessage(&self, emessage: MFT_MESSAGE_TYPE, ulparam: usize) -> windows_core::Result<()>;
fn ProcessInput(&self, dwinputstreamid: u32, psample: windows_core::Ref<IMFSample>, dwflags: u32) -> windows_core::Result<()>;
fn ProcessOutput(&self, dwflags: u32, coutputbuffercount: u32, poutputsamples: *mut MFT_OUTPUT_DATA_BUFFER, pdwstatus: *mut u32) -> windows_core::Result<()>;
}
impl IMFTransform_Vtbl {
pub const fn new<Identity: IMFTransform_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetStreamLimits<Identity: IMFTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwinputminimum: *mut u32, pdwinputmaximum: *mut u32, pdwoutputminimum: *mut u32, pdwoutputmaximum: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTransform_Impl::GetStreamLimits(this, core::mem::transmute_copy(&pdwinputminimum), core::mem::transmute_copy(&pdwinputmaximum), core::mem::transmute_copy(&pdwoutputminimum), core::mem::transmute_copy(&pdwoutputmaximum)).into()
}
}
unsafe extern "system" fn GetStreamCount<Identity: IMFTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcinputstreams: *mut u32, pcoutputstreams: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTransform_Impl::GetStreamCount(this, core::mem::transmute_copy(&pcinputstreams), core::mem::transmute_copy(&pcoutputstreams)).into()
}
}
unsafe extern "system" fn GetStreamIDs<Identity: IMFTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwinputidarraysize: u32, pdwinputids: *mut u32, dwoutputidarraysize: u32, pdwoutputids: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTransform_Impl::GetStreamIDs(this, core::mem::transmute_copy(&dwinputidarraysize), core::mem::transmute_copy(&pdwinputids), core::mem::transmute_copy(&dwoutputidarraysize), core::mem::transmute_copy(&pdwoutputids)).into()
}
}
unsafe extern "system" fn GetInputStreamInfo<Identity: IMFTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwinputstreamid: u32, pstreaminfo: *mut MFT_INPUT_STREAM_INFO) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTransform_Impl::GetInputStreamInfo(this, core::mem::transmute_copy(&dwinputstreamid), core::mem::transmute_copy(&pstreaminfo)).into()
}
}
unsafe extern "system" fn GetOutputStreamInfo<Identity: IMFTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwoutputstreamid: u32, pstreaminfo: *mut MFT_OUTPUT_STREAM_INFO) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTransform_Impl::GetOutputStreamInfo(this, core::mem::transmute_copy(&dwoutputstreamid)) {
Ok(ok__) => {
pstreaminfo.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetAttributes<Identity: IMFTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pattributes: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTransform_Impl::GetAttributes(this) {
Ok(ok__) => {
pattributes.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetInputStreamAttributes<Identity: IMFTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwinputstreamid: u32, pattributes: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTransform_Impl::GetInputStreamAttributes(this, core::mem::transmute_copy(&dwinputstreamid)) {
Ok(ok__) => {
pattributes.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetOutputStreamAttributes<Identity: IMFTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwoutputstreamid: u32, pattributes: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTransform_Impl::GetOutputStreamAttributes(this, core::mem::transmute_copy(&dwoutputstreamid)) {
Ok(ok__) => {
pattributes.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn DeleteInputStream<Identity: IMFTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamid: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTransform_Impl::DeleteInputStream(this, core::mem::transmute_copy(&dwstreamid)).into()
}
}
unsafe extern "system" fn AddInputStreams<Identity: IMFTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, cstreams: u32, adwstreamids: *const u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTransform_Impl::AddInputStreams(this, core::mem::transmute_copy(&cstreams), core::mem::transmute_copy(&adwstreamids)).into()
}
}
unsafe extern "system" fn GetInputAvailableType<Identity: IMFTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwinputstreamid: u32, dwtypeindex: u32, pptype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTransform_Impl::GetInputAvailableType(this, core::mem::transmute_copy(&dwinputstreamid), core::mem::transmute_copy(&dwtypeindex)) {
Ok(ok__) => {
pptype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetOutputAvailableType<Identity: IMFTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwoutputstreamid: u32, dwtypeindex: u32, pptype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTransform_Impl::GetOutputAvailableType(this, core::mem::transmute_copy(&dwoutputstreamid), core::mem::transmute_copy(&dwtypeindex)) {
Ok(ok__) => {
pptype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetInputType<Identity: IMFTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwinputstreamid: u32, ptype: *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTransform_Impl::SetInputType(this, core::mem::transmute_copy(&dwinputstreamid), core::mem::transmute_copy(&ptype), core::mem::transmute_copy(&dwflags)).into()
}
}
unsafe extern "system" fn SetOutputType<Identity: IMFTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwoutputstreamid: u32, ptype: *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTransform_Impl::SetOutputType(this, core::mem::transmute_copy(&dwoutputstreamid), core::mem::transmute_copy(&ptype), core::mem::transmute_copy(&dwflags)).into()
}
}
unsafe extern "system" fn GetInputCurrentType<Identity: IMFTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwinputstreamid: u32, pptype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTransform_Impl::GetInputCurrentType(this, core::mem::transmute_copy(&dwinputstreamid)) {
Ok(ok__) => {
pptype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetOutputCurrentType<Identity: IMFTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwoutputstreamid: u32, pptype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTransform_Impl::GetOutputCurrentType(this, core::mem::transmute_copy(&dwoutputstreamid)) {
Ok(ok__) => {
pptype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetInputStatus<Identity: IMFTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwinputstreamid: u32, pdwflags: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTransform_Impl::GetInputStatus(this, core::mem::transmute_copy(&dwinputstreamid)) {
Ok(ok__) => {
pdwflags.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetOutputStatus<Identity: IMFTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwflags: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTransform_Impl::GetOutputStatus(this) {
Ok(ok__) => {
pdwflags.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetOutputBounds<Identity: IMFTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hnslowerbound: i64, hnsupperbound: i64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTransform_Impl::SetOutputBounds(this, core::mem::transmute_copy(&hnslowerbound), core::mem::transmute_copy(&hnsupperbound)).into()
}
}
unsafe extern "system" fn ProcessEvent<Identity: IMFTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwinputstreamid: u32, pevent: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTransform_Impl::ProcessEvent(this, core::mem::transmute_copy(&dwinputstreamid), core::mem::transmute_copy(&pevent)).into()
}
}
unsafe extern "system" fn ProcessMessage<Identity: IMFTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, emessage: MFT_MESSAGE_TYPE, ulparam: usize) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTransform_Impl::ProcessMessage(this, core::mem::transmute_copy(&emessage), core::mem::transmute_copy(&ulparam)).into()
}
}
unsafe extern "system" fn ProcessInput<Identity: IMFTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwinputstreamid: u32, psample: *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTransform_Impl::ProcessInput(this, core::mem::transmute_copy(&dwinputstreamid), core::mem::transmute_copy(&psample), core::mem::transmute_copy(&dwflags)).into()
}
}
unsafe extern "system" fn ProcessOutput<Identity: IMFTransform_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwflags: u32, coutputbuffercount: u32, poutputsamples: *mut MFT_OUTPUT_DATA_BUFFER, pdwstatus: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFTransform_Impl::ProcessOutput(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&coutputbuffercount), core::mem::transmute_copy(&poutputsamples), core::mem::transmute_copy(&pdwstatus)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetStreamLimits: GetStreamLimits::<Identity, OFFSET>,
GetStreamCount: GetStreamCount::<Identity, OFFSET>,
GetStreamIDs: GetStreamIDs::<Identity, OFFSET>,
GetInputStreamInfo: GetInputStreamInfo::<Identity, OFFSET>,
GetOutputStreamInfo: GetOutputStreamInfo::<Identity, OFFSET>,
GetAttributes: GetAttributes::<Identity, OFFSET>,
GetInputStreamAttributes: GetInputStreamAttributes::<Identity, OFFSET>,
GetOutputStreamAttributes: GetOutputStreamAttributes::<Identity, OFFSET>,
DeleteInputStream: DeleteInputStream::<Identity, OFFSET>,
AddInputStreams: AddInputStreams::<Identity, OFFSET>,
GetInputAvailableType: GetInputAvailableType::<Identity, OFFSET>,
GetOutputAvailableType: GetOutputAvailableType::<Identity, OFFSET>,
SetInputType: SetInputType::<Identity, OFFSET>,
SetOutputType: SetOutputType::<Identity, OFFSET>,
GetInputCurrentType: GetInputCurrentType::<Identity, OFFSET>,
GetOutputCurrentType: GetOutputCurrentType::<Identity, OFFSET>,
GetInputStatus: GetInputStatus::<Identity, OFFSET>,
GetOutputStatus: GetOutputStatus::<Identity, OFFSET>,
SetOutputBounds: SetOutputBounds::<Identity, OFFSET>,
ProcessEvent: ProcessEvent::<Identity, OFFSET>,
ProcessMessage: ProcessMessage::<Identity, OFFSET>,
ProcessInput: ProcessInput::<Identity, OFFSET>,
ProcessOutput: ProcessOutput::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFTransform as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFTransform {}
windows_core::imp::define_interface!(IMFTrustedInput, IMFTrustedInput_Vtbl, 0x542612c4_a1b8_4632_b521_de11ea64a0b0);
windows_core::imp::interface_hierarchy!(IMFTrustedInput, windows_core::IUnknown);
impl IMFTrustedInput {
pub unsafe fn GetInputTrustAuthority(&self, dwstreamid: u32, riid: *const windows_core::GUID) -> windows_core::Result<windows_core::IUnknown> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetInputTrustAuthority)(windows_core::Interface::as_raw(self), dwstreamid, riid, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFTrustedInput_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetInputTrustAuthority: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFTrustedInput_Impl: windows_core::IUnknownImpl {
fn GetInputTrustAuthority(&self, dwstreamid: u32, riid: *const windows_core::GUID) -> windows_core::Result<windows_core::IUnknown>;
}
impl IMFTrustedInput_Vtbl {
pub const fn new<Identity: IMFTrustedInput_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetInputTrustAuthority<Identity: IMFTrustedInput_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamid: u32, riid: *const windows_core::GUID, ppunkobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTrustedInput_Impl::GetInputTrustAuthority(this, core::mem::transmute_copy(&dwstreamid), core::mem::transmute_copy(&riid)) {
Ok(ok__) => {
ppunkobject.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetInputTrustAuthority: GetInputTrustAuthority::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFTrustedInput as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFTrustedInput {}
windows_core::imp::define_interface!(IMFTrustedOutput, IMFTrustedOutput_Vtbl, 0xd19f8e95_b126_4446_890c_5dcb7ad71453);
windows_core::imp::interface_hierarchy!(IMFTrustedOutput, windows_core::IUnknown);
impl IMFTrustedOutput {
pub unsafe fn GetOutputTrustAuthorityCount(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOutputTrustAuthorityCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn GetOutputTrustAuthorityByIndex(&self, dwindex: u32) -> windows_core::Result<IMFOutputTrustAuthority> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetOutputTrustAuthorityByIndex)(windows_core::Interface::as_raw(self), dwindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn IsFinal(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).IsFinal)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFTrustedOutput_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetOutputTrustAuthorityCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetOutputTrustAuthorityByIndex: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub IsFinal: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
}
pub trait IMFTrustedOutput_Impl: windows_core::IUnknownImpl {
fn GetOutputTrustAuthorityCount(&self) -> windows_core::Result<u32>;
fn GetOutputTrustAuthorityByIndex(&self, dwindex: u32) -> windows_core::Result<IMFOutputTrustAuthority>;
fn IsFinal(&self) -> windows_core::Result<windows_core::BOOL>;
}
impl IMFTrustedOutput_Vtbl {
pub const fn new<Identity: IMFTrustedOutput_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetOutputTrustAuthorityCount<Identity: IMFTrustedOutput_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcoutputtrustauthorities: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTrustedOutput_Impl::GetOutputTrustAuthorityCount(this) {
Ok(ok__) => {
pcoutputtrustauthorities.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetOutputTrustAuthorityByIndex<Identity: IMFTrustedOutput_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwindex: u32, ppauthority: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTrustedOutput_Impl::GetOutputTrustAuthorityByIndex(this, core::mem::transmute_copy(&dwindex)) {
Ok(ok__) => {
ppauthority.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn IsFinal<Identity: IMFTrustedOutput_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pfisfinal: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFTrustedOutput_Impl::IsFinal(this) {
Ok(ok__) => {
pfisfinal.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetOutputTrustAuthorityCount: GetOutputTrustAuthorityCount::<Identity, OFFSET>,
GetOutputTrustAuthorityByIndex: GetOutputTrustAuthorityByIndex::<Identity, OFFSET>,
IsFinal: IsFinal::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFTrustedOutput as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFTrustedOutput {}
windows_core::imp::define_interface!(IMFVideoCaptureSampleAllocator, IMFVideoCaptureSampleAllocator_Vtbl, 0x725b77c7_ca9f_4fe5_9d72_9946bf9b3c70);
impl core::ops::Deref for IMFVideoCaptureSampleAllocator {
type Target = IMFVideoSampleAllocator;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFVideoCaptureSampleAllocator, windows_core::IUnknown, IMFVideoSampleAllocator);
impl IMFVideoCaptureSampleAllocator {
pub unsafe fn InitializeCaptureSampleAllocator<P4, P5>(&self, cbsamplesize: u32, cbcapturemetadatasize: u32, cbalignment: u32, cminimumsamples: u32, pattributes: P4, pmediatype: P5) -> windows_core::Result<()>
where
P4: windows_core::Param<IMFAttributes>,
P5: windows_core::Param<IMFMediaType>,
{
unsafe { (windows_core::Interface::vtable(self).InitializeCaptureSampleAllocator)(windows_core::Interface::as_raw(self), cbsamplesize, cbcapturemetadatasize, cbalignment, cminimumsamples, pattributes.param().abi(), pmediatype.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFVideoCaptureSampleAllocator_Vtbl {
pub base__: IMFVideoSampleAllocator_Vtbl,
pub InitializeCaptureSampleAllocator: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, u32, u32, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFVideoCaptureSampleAllocator_Impl: IMFVideoSampleAllocator_Impl {
fn InitializeCaptureSampleAllocator(&self, cbsamplesize: u32, cbcapturemetadatasize: u32, cbalignment: u32, cminimumsamples: u32, pattributes: windows_core::Ref<IMFAttributes>, pmediatype: windows_core::Ref<IMFMediaType>) -> windows_core::Result<()>;
}
impl IMFVideoCaptureSampleAllocator_Vtbl {
pub const fn new<Identity: IMFVideoCaptureSampleAllocator_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn InitializeCaptureSampleAllocator<Identity: IMFVideoCaptureSampleAllocator_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, cbsamplesize: u32, cbcapturemetadatasize: u32, cbalignment: u32, cminimumsamples: u32, pattributes: *mut core::ffi::c_void, pmediatype: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoCaptureSampleAllocator_Impl::InitializeCaptureSampleAllocator(this, core::mem::transmute_copy(&cbsamplesize), core::mem::transmute_copy(&cbcapturemetadatasize), core::mem::transmute_copy(&cbalignment), core::mem::transmute_copy(&cminimumsamples), core::mem::transmute_copy(&pattributes), core::mem::transmute_copy(&pmediatype)).into()
}
}
Self {
base__: IMFVideoSampleAllocator_Vtbl::new::<Identity, OFFSET>(),
InitializeCaptureSampleAllocator: InitializeCaptureSampleAllocator::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFVideoCaptureSampleAllocator as windows_core::Interface>::IID || iid == &<IMFVideoSampleAllocator as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFVideoCaptureSampleAllocator {}
windows_core::imp::define_interface!(IMFVideoDeviceID, IMFVideoDeviceID_Vtbl, 0xa38d9567_5a9c_4f3c_b293_8eb415b279ba);
windows_core::imp::interface_hierarchy!(IMFVideoDeviceID, windows_core::IUnknown);
impl IMFVideoDeviceID {
pub unsafe fn GetDeviceID(&self) -> windows_core::Result<windows_core::GUID> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDeviceID)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFVideoDeviceID_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetDeviceID: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT,
}
pub trait IMFVideoDeviceID_Impl: windows_core::IUnknownImpl {
fn GetDeviceID(&self) -> windows_core::Result<windows_core::GUID>;
}
impl IMFVideoDeviceID_Vtbl {
pub const fn new<Identity: IMFVideoDeviceID_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetDeviceID<Identity: IMFVideoDeviceID_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdeviceid: *mut windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFVideoDeviceID_Impl::GetDeviceID(this) {
Ok(ok__) => {
pdeviceid.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetDeviceID: GetDeviceID::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFVideoDeviceID as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFVideoDeviceID {}
windows_core::imp::define_interface!(IMFVideoDisplayControl, IMFVideoDisplayControl_Vtbl, 0xa490b1e4_ab84_4d31_a1b2_181e03b1077a);
windows_core::imp::interface_hierarchy!(IMFVideoDisplayControl, windows_core::IUnknown);
impl IMFVideoDisplayControl {
pub unsafe fn GetNativeVideoSize(&self, pszvideo: *mut super::super::Foundation::SIZE, pszarvideo: *mut super::super::Foundation::SIZE) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetNativeVideoSize)(windows_core::Interface::as_raw(self), pszvideo as _, pszarvideo as _).ok() }
}
pub unsafe fn GetIdealVideoSize(&self, pszmin: *mut super::super::Foundation::SIZE, pszmax: *mut super::super::Foundation::SIZE) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetIdealVideoSize)(windows_core::Interface::as_raw(self), pszmin as _, pszmax as _).ok() }
}
pub unsafe fn SetVideoPosition(&self, pnrcsource: *const MFVideoNormalizedRect, prcdest: *const super::super::Foundation::RECT) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetVideoPosition)(windows_core::Interface::as_raw(self), pnrcsource, prcdest).ok() }
}
pub unsafe fn GetVideoPosition(&self, pnrcsource: *mut MFVideoNormalizedRect, prcdest: *mut super::super::Foundation::RECT) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetVideoPosition)(windows_core::Interface::as_raw(self), pnrcsource as _, prcdest as _).ok() }
}
pub unsafe fn SetAspectRatioMode(&self, dwaspectratiomode: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetAspectRatioMode)(windows_core::Interface::as_raw(self), dwaspectratiomode).ok() }
}
pub unsafe fn GetAspectRatioMode(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetAspectRatioMode)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetVideoWindow(&self, hwndvideo: super::super::Foundation::HWND) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetVideoWindow)(windows_core::Interface::as_raw(self), hwndvideo).ok() }
}
pub unsafe fn GetVideoWindow(&self) -> windows_core::Result<super::super::Foundation::HWND> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetVideoWindow)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn RepaintVideo(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RepaintVideo)(windows_core::Interface::as_raw(self)).ok() }
}
#[cfg(feature = "Win32_Graphics_Gdi")]
pub unsafe fn GetCurrentImage(&self, pbih: *mut super::super::Graphics::Gdi::BITMAPINFOHEADER, pdib: *mut *mut u8, pcbdib: *mut u32, ptimestamp: *mut i64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetCurrentImage)(windows_core::Interface::as_raw(self), pbih as _, pdib as _, pcbdib as _, ptimestamp as _).ok() }
}
pub unsafe fn SetBorderColor(&self, clr: super::super::Foundation::COLORREF) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetBorderColor)(windows_core::Interface::as_raw(self), clr).ok() }
}
pub unsafe fn GetBorderColor(&self) -> windows_core::Result<super::super::Foundation::COLORREF> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetBorderColor)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetRenderingPrefs(&self, dwrenderflags: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetRenderingPrefs)(windows_core::Interface::as_raw(self), dwrenderflags).ok() }
}
pub unsafe fn GetRenderingPrefs(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetRenderingPrefs)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetFullscreen(&self, ffullscreen: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetFullscreen)(windows_core::Interface::as_raw(self), ffullscreen.into()).ok() }
}
pub unsafe fn GetFullscreen(&self) -> windows_core::Result<windows_core::BOOL> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetFullscreen)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFVideoDisplayControl_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetNativeVideoSize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::SIZE, *mut super::super::Foundation::SIZE) -> windows_core::HRESULT,
pub GetIdealVideoSize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::SIZE, *mut super::super::Foundation::SIZE) -> windows_core::HRESULT,
pub SetVideoPosition: unsafe extern "system" fn(*mut core::ffi::c_void, *const MFVideoNormalizedRect, *const super::super::Foundation::RECT) -> windows_core::HRESULT,
pub GetVideoPosition: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MFVideoNormalizedRect, *mut super::super::Foundation::RECT) -> windows_core::HRESULT,
pub SetAspectRatioMode: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub GetAspectRatioMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub SetVideoWindow: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::HWND) -> windows_core::HRESULT,
pub GetVideoWindow: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::HWND) -> windows_core::HRESULT,
pub RepaintVideo: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(feature = "Win32_Graphics_Gdi")]
pub GetCurrentImage: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Graphics::Gdi::BITMAPINFOHEADER, *mut *mut u8, *mut u32, *mut i64) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Gdi"))]
GetCurrentImage: usize,
pub SetBorderColor: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::COLORREF) -> windows_core::HRESULT,
pub GetBorderColor: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::COLORREF) -> windows_core::HRESULT,
pub SetRenderingPrefs: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub GetRenderingPrefs: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub SetFullscreen: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT,
pub GetFullscreen: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::BOOL) -> windows_core::HRESULT,
}
#[cfg(feature = "Win32_Graphics_Gdi")]
pub trait IMFVideoDisplayControl_Impl: windows_core::IUnknownImpl {
fn GetNativeVideoSize(&self, pszvideo: *mut super::super::Foundation::SIZE, pszarvideo: *mut super::super::Foundation::SIZE) -> windows_core::Result<()>;
fn GetIdealVideoSize(&self, pszmin: *mut super::super::Foundation::SIZE, pszmax: *mut super::super::Foundation::SIZE) -> windows_core::Result<()>;
fn SetVideoPosition(&self, pnrcsource: *const MFVideoNormalizedRect, prcdest: *const super::super::Foundation::RECT) -> windows_core::Result<()>;
fn GetVideoPosition(&self, pnrcsource: *mut MFVideoNormalizedRect, prcdest: *mut super::super::Foundation::RECT) -> windows_core::Result<()>;
fn SetAspectRatioMode(&self, dwaspectratiomode: u32) -> windows_core::Result<()>;
fn GetAspectRatioMode(&self) -> windows_core::Result<u32>;
fn SetVideoWindow(&self, hwndvideo: super::super::Foundation::HWND) -> windows_core::Result<()>;
fn GetVideoWindow(&self) -> windows_core::Result<super::super::Foundation::HWND>;
fn RepaintVideo(&self) -> windows_core::Result<()>;
fn GetCurrentImage(&self, pbih: *mut super::super::Graphics::Gdi::BITMAPINFOHEADER, pdib: *mut *mut u8, pcbdib: *mut u32, ptimestamp: *mut i64) -> windows_core::Result<()>;
fn SetBorderColor(&self, clr: super::super::Foundation::COLORREF) -> windows_core::Result<()>;
fn GetBorderColor(&self) -> windows_core::Result<super::super::Foundation::COLORREF>;
fn SetRenderingPrefs(&self, dwrenderflags: u32) -> windows_core::Result<()>;
fn GetRenderingPrefs(&self) -> windows_core::Result<u32>;
fn SetFullscreen(&self, ffullscreen: windows_core::BOOL) -> windows_core::Result<()>;
fn GetFullscreen(&self) -> windows_core::Result<windows_core::BOOL>;
}
#[cfg(feature = "Win32_Graphics_Gdi")]
impl IMFVideoDisplayControl_Vtbl {
pub const fn new<Identity: IMFVideoDisplayControl_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetNativeVideoSize<Identity: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pszvideo: *mut super::super::Foundation::SIZE, pszarvideo: *mut super::super::Foundation::SIZE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoDisplayControl_Impl::GetNativeVideoSize(this, core::mem::transmute_copy(&pszvideo), core::mem::transmute_copy(&pszarvideo)).into()
}
}
unsafe extern "system" fn GetIdealVideoSize<Identity: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pszmin: *mut super::super::Foundation::SIZE, pszmax: *mut super::super::Foundation::SIZE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoDisplayControl_Impl::GetIdealVideoSize(this, core::mem::transmute_copy(&pszmin), core::mem::transmute_copy(&pszmax)).into()
}
}
unsafe extern "system" fn SetVideoPosition<Identity: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pnrcsource: *const MFVideoNormalizedRect, prcdest: *const super::super::Foundation::RECT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoDisplayControl_Impl::SetVideoPosition(this, core::mem::transmute_copy(&pnrcsource), core::mem::transmute_copy(&prcdest)).into()
}
}
unsafe extern "system" fn GetVideoPosition<Identity: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pnrcsource: *mut MFVideoNormalizedRect, prcdest: *mut super::super::Foundation::RECT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoDisplayControl_Impl::GetVideoPosition(this, core::mem::transmute_copy(&pnrcsource), core::mem::transmute_copy(&prcdest)).into()
}
}
unsafe extern "system" fn SetAspectRatioMode<Identity: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwaspectratiomode: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoDisplayControl_Impl::SetAspectRatioMode(this, core::mem::transmute_copy(&dwaspectratiomode)).into()
}
}
unsafe extern "system" fn GetAspectRatioMode<Identity: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwaspectratiomode: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFVideoDisplayControl_Impl::GetAspectRatioMode(this) {
Ok(ok__) => {
pdwaspectratiomode.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetVideoWindow<Identity: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, hwndvideo: super::super::Foundation::HWND) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoDisplayControl_Impl::SetVideoWindow(this, core::mem::transmute_copy(&hwndvideo)).into()
}
}
unsafe extern "system" fn GetVideoWindow<Identity: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, phwndvideo: *mut super::super::Foundation::HWND) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFVideoDisplayControl_Impl::GetVideoWindow(this) {
Ok(ok__) => {
phwndvideo.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn RepaintVideo<Identity: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoDisplayControl_Impl::RepaintVideo(this).into()
}
}
unsafe extern "system" fn GetCurrentImage<Identity: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbih: *mut super::super::Graphics::Gdi::BITMAPINFOHEADER, pdib: *mut *mut u8, pcbdib: *mut u32, ptimestamp: *mut i64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoDisplayControl_Impl::GetCurrentImage(this, core::mem::transmute_copy(&pbih), core::mem::transmute_copy(&pdib), core::mem::transmute_copy(&pcbdib), core::mem::transmute_copy(&ptimestamp)).into()
}
}
unsafe extern "system" fn SetBorderColor<Identity: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, clr: super::super::Foundation::COLORREF) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoDisplayControl_Impl::SetBorderColor(this, core::mem::transmute_copy(&clr)).into()
}
}
unsafe extern "system" fn GetBorderColor<Identity: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pclr: *mut super::super::Foundation::COLORREF) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFVideoDisplayControl_Impl::GetBorderColor(this) {
Ok(ok__) => {
pclr.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetRenderingPrefs<Identity: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwrenderflags: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoDisplayControl_Impl::SetRenderingPrefs(this, core::mem::transmute_copy(&dwrenderflags)).into()
}
}
unsafe extern "system" fn GetRenderingPrefs<Identity: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwrenderflags: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFVideoDisplayControl_Impl::GetRenderingPrefs(this) {
Ok(ok__) => {
pdwrenderflags.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetFullscreen<Identity: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ffullscreen: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoDisplayControl_Impl::SetFullscreen(this, core::mem::transmute_copy(&ffullscreen)).into()
}
}
unsafe extern "system" fn GetFullscreen<Identity: IMFVideoDisplayControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pffullscreen: *mut windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFVideoDisplayControl_Impl::GetFullscreen(this) {
Ok(ok__) => {
pffullscreen.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetNativeVideoSize: GetNativeVideoSize::<Identity, OFFSET>,
GetIdealVideoSize: GetIdealVideoSize::<Identity, OFFSET>,
SetVideoPosition: SetVideoPosition::<Identity, OFFSET>,
GetVideoPosition: GetVideoPosition::<Identity, OFFSET>,
SetAspectRatioMode: SetAspectRatioMode::<Identity, OFFSET>,
GetAspectRatioMode: GetAspectRatioMode::<Identity, OFFSET>,
SetVideoWindow: SetVideoWindow::<Identity, OFFSET>,
GetVideoWindow: GetVideoWindow::<Identity, OFFSET>,
RepaintVideo: RepaintVideo::<Identity, OFFSET>,
GetCurrentImage: GetCurrentImage::<Identity, OFFSET>,
SetBorderColor: SetBorderColor::<Identity, OFFSET>,
GetBorderColor: GetBorderColor::<Identity, OFFSET>,
SetRenderingPrefs: SetRenderingPrefs::<Identity, OFFSET>,
GetRenderingPrefs: GetRenderingPrefs::<Identity, OFFSET>,
SetFullscreen: SetFullscreen::<Identity, OFFSET>,
GetFullscreen: GetFullscreen::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFVideoDisplayControl as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Graphics_Gdi")]
impl windows_core::RuntimeName for IMFVideoDisplayControl {}
windows_core::imp::define_interface!(IMFVideoMediaType, IMFVideoMediaType_Vtbl, 0xb99f381f_a8f9_47a2_a5af_ca3a225a3890);
impl core::ops::Deref for IMFVideoMediaType {
type Target = IMFMediaType;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFVideoMediaType, windows_core::IUnknown, IMFAttributes, IMFMediaType);
impl IMFVideoMediaType {
pub unsafe fn GetVideoFormat(&self) -> *mut MFVIDEOFORMAT {
unsafe { (windows_core::Interface::vtable(self).GetVideoFormat)(windows_core::Interface::as_raw(self)) }
}
pub unsafe fn GetVideoRepresentation(&self, guidrepresentation: windows_core::GUID, ppvrepresentation: *mut *mut core::ffi::c_void, lstride: i32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetVideoRepresentation)(windows_core::Interface::as_raw(self), core::mem::transmute(guidrepresentation), ppvrepresentation as _, lstride).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFVideoMediaType_Vtbl {
pub base__: IMFMediaType_Vtbl,
pub GetVideoFormat: unsafe extern "system" fn(*mut core::ffi::c_void) -> *mut MFVIDEOFORMAT,
pub GetVideoRepresentation: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::GUID, *mut *mut core::ffi::c_void, i32) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFVideoMediaType_Impl: IMFMediaType_Impl {
fn GetVideoFormat(&self) -> *mut MFVIDEOFORMAT;
fn GetVideoRepresentation(&self, guidrepresentation: &windows_core::GUID, ppvrepresentation: *mut *mut core::ffi::c_void, lstride: i32) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFVideoMediaType_Vtbl {
pub const fn new<Identity: IMFVideoMediaType_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetVideoFormat<Identity: IMFVideoMediaType_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> *mut MFVIDEOFORMAT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoMediaType_Impl::GetVideoFormat(this)
}
}
unsafe extern "system" fn GetVideoRepresentation<Identity: IMFVideoMediaType_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidrepresentation: windows_core::GUID, ppvrepresentation: *mut *mut core::ffi::c_void, lstride: i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoMediaType_Impl::GetVideoRepresentation(this, core::mem::transmute(&guidrepresentation), core::mem::transmute_copy(&ppvrepresentation), core::mem::transmute_copy(&lstride)).into()
}
}
Self {
base__: IMFMediaType_Vtbl::new::<Identity, OFFSET>(),
GetVideoFormat: GetVideoFormat::<Identity, OFFSET>,
GetVideoRepresentation: GetVideoRepresentation::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFVideoMediaType as windows_core::Interface>::IID || iid == &<IMFAttributes as windows_core::Interface>::IID || iid == &<IMFMediaType as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFVideoMediaType {}
windows_core::imp::define_interface!(IMFVideoMixerBitmap, IMFVideoMixerBitmap_Vtbl, 0x814c7b20_0fdb_4eec_af8f_f957c8f69edc);
windows_core::imp::interface_hierarchy!(IMFVideoMixerBitmap, windows_core::IUnknown);
impl IMFVideoMixerBitmap {
#[cfg(all(feature = "Win32_Graphics_Direct3D9", feature = "Win32_Graphics_Gdi"))]
pub unsafe fn SetAlphaBitmap(&self, pbmpparms: *const MFVideoAlphaBitmap) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetAlphaBitmap)(windows_core::Interface::as_raw(self), core::mem::transmute(pbmpparms)).ok() }
}
pub unsafe fn ClearAlphaBitmap(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).ClearAlphaBitmap)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn UpdateAlphaBitmapParameters(&self, pbmpparms: *const MFVideoAlphaBitmapParams) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).UpdateAlphaBitmapParameters)(windows_core::Interface::as_raw(self), pbmpparms).ok() }
}
pub unsafe fn GetAlphaBitmapParameters(&self, pbmpparms: *mut MFVideoAlphaBitmapParams) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetAlphaBitmapParameters)(windows_core::Interface::as_raw(self), pbmpparms as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFVideoMixerBitmap_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(all(feature = "Win32_Graphics_Direct3D9", feature = "Win32_Graphics_Gdi"))]
pub SetAlphaBitmap: unsafe extern "system" fn(*mut core::ffi::c_void, *const MFVideoAlphaBitmap) -> windows_core::HRESULT,
#[cfg(not(all(feature = "Win32_Graphics_Direct3D9", feature = "Win32_Graphics_Gdi")))]
SetAlphaBitmap: usize,
pub ClearAlphaBitmap: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub UpdateAlphaBitmapParameters: unsafe extern "system" fn(*mut core::ffi::c_void, *const MFVideoAlphaBitmapParams) -> windows_core::HRESULT,
pub GetAlphaBitmapParameters: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MFVideoAlphaBitmapParams) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_Graphics_Direct3D9", feature = "Win32_Graphics_Gdi"))]
pub trait IMFVideoMixerBitmap_Impl: windows_core::IUnknownImpl {
fn SetAlphaBitmap(&self, pbmpparms: *const MFVideoAlphaBitmap) -> windows_core::Result<()>;
fn ClearAlphaBitmap(&self) -> windows_core::Result<()>;
fn UpdateAlphaBitmapParameters(&self, pbmpparms: *const MFVideoAlphaBitmapParams) -> windows_core::Result<()>;
fn GetAlphaBitmapParameters(&self, pbmpparms: *mut MFVideoAlphaBitmapParams) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_Graphics_Direct3D9", feature = "Win32_Graphics_Gdi"))]
impl IMFVideoMixerBitmap_Vtbl {
pub const fn new<Identity: IMFVideoMixerBitmap_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetAlphaBitmap<Identity: IMFVideoMixerBitmap_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbmpparms: *const MFVideoAlphaBitmap) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoMixerBitmap_Impl::SetAlphaBitmap(this, core::mem::transmute_copy(&pbmpparms)).into()
}
}
unsafe extern "system" fn ClearAlphaBitmap<Identity: IMFVideoMixerBitmap_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoMixerBitmap_Impl::ClearAlphaBitmap(this).into()
}
}
unsafe extern "system" fn UpdateAlphaBitmapParameters<Identity: IMFVideoMixerBitmap_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbmpparms: *const MFVideoAlphaBitmapParams) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoMixerBitmap_Impl::UpdateAlphaBitmapParameters(this, core::mem::transmute_copy(&pbmpparms)).into()
}
}
unsafe extern "system" fn GetAlphaBitmapParameters<Identity: IMFVideoMixerBitmap_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbmpparms: *mut MFVideoAlphaBitmapParams) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoMixerBitmap_Impl::GetAlphaBitmapParameters(this, core::mem::transmute_copy(&pbmpparms)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetAlphaBitmap: SetAlphaBitmap::<Identity, OFFSET>,
ClearAlphaBitmap: ClearAlphaBitmap::<Identity, OFFSET>,
UpdateAlphaBitmapParameters: UpdateAlphaBitmapParameters::<Identity, OFFSET>,
GetAlphaBitmapParameters: GetAlphaBitmapParameters::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFVideoMixerBitmap as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_Graphics_Direct3D9", feature = "Win32_Graphics_Gdi"))]
impl windows_core::RuntimeName for IMFVideoMixerBitmap {}
windows_core::imp::define_interface!(IMFVideoMixerControl, IMFVideoMixerControl_Vtbl, 0xa5c6c53f_c202_4aa5_9695_175ba8c508a5);
windows_core::imp::interface_hierarchy!(IMFVideoMixerControl, windows_core::IUnknown);
impl IMFVideoMixerControl {
pub unsafe fn SetStreamZOrder(&self, dwstreamid: u32, dwz: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetStreamZOrder)(windows_core::Interface::as_raw(self), dwstreamid, dwz).ok() }
}
pub unsafe fn GetStreamZOrder(&self, dwstreamid: u32) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamZOrder)(windows_core::Interface::as_raw(self), dwstreamid, &mut result__).map(|| result__)
}
}
pub unsafe fn SetStreamOutputRect(&self, dwstreamid: u32, pnrcoutput: *const MFVideoNormalizedRect) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetStreamOutputRect)(windows_core::Interface::as_raw(self), dwstreamid, pnrcoutput).ok() }
}
pub unsafe fn GetStreamOutputRect(&self, dwstreamid: u32) -> windows_core::Result<MFVideoNormalizedRect> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStreamOutputRect)(windows_core::Interface::as_raw(self), dwstreamid, &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFVideoMixerControl_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetStreamZOrder: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32) -> windows_core::HRESULT,
pub GetStreamZOrder: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u32) -> windows_core::HRESULT,
pub SetStreamOutputRect: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const MFVideoNormalizedRect) -> windows_core::HRESULT,
pub GetStreamOutputRect: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut MFVideoNormalizedRect) -> windows_core::HRESULT,
}
pub trait IMFVideoMixerControl_Impl: windows_core::IUnknownImpl {
fn SetStreamZOrder(&self, dwstreamid: u32, dwz: u32) -> windows_core::Result<()>;
fn GetStreamZOrder(&self, dwstreamid: u32) -> windows_core::Result<u32>;
fn SetStreamOutputRect(&self, dwstreamid: u32, pnrcoutput: *const MFVideoNormalizedRect) -> windows_core::Result<()>;
fn GetStreamOutputRect(&self, dwstreamid: u32) -> windows_core::Result<MFVideoNormalizedRect>;
}
impl IMFVideoMixerControl_Vtbl {
pub const fn new<Identity: IMFVideoMixerControl_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetStreamZOrder<Identity: IMFVideoMixerControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamid: u32, dwz: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoMixerControl_Impl::SetStreamZOrder(this, core::mem::transmute_copy(&dwstreamid), core::mem::transmute_copy(&dwz)).into()
}
}
unsafe extern "system" fn GetStreamZOrder<Identity: IMFVideoMixerControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamid: u32, pdwz: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFVideoMixerControl_Impl::GetStreamZOrder(this, core::mem::transmute_copy(&dwstreamid)) {
Ok(ok__) => {
pdwz.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetStreamOutputRect<Identity: IMFVideoMixerControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamid: u32, pnrcoutput: *const MFVideoNormalizedRect) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoMixerControl_Impl::SetStreamOutputRect(this, core::mem::transmute_copy(&dwstreamid), core::mem::transmute_copy(&pnrcoutput)).into()
}
}
unsafe extern "system" fn GetStreamOutputRect<Identity: IMFVideoMixerControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwstreamid: u32, pnrcoutput: *mut MFVideoNormalizedRect) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFVideoMixerControl_Impl::GetStreamOutputRect(this, core::mem::transmute_copy(&dwstreamid)) {
Ok(ok__) => {
pnrcoutput.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetStreamZOrder: SetStreamZOrder::<Identity, OFFSET>,
GetStreamZOrder: GetStreamZOrder::<Identity, OFFSET>,
SetStreamOutputRect: SetStreamOutputRect::<Identity, OFFSET>,
GetStreamOutputRect: GetStreamOutputRect::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFVideoMixerControl as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFVideoMixerControl {}
windows_core::imp::define_interface!(IMFVideoMixerControl2, IMFVideoMixerControl2_Vtbl, 0x8459616d_966e_4930_b658_54fa7e5a16d3);
impl core::ops::Deref for IMFVideoMixerControl2 {
type Target = IMFVideoMixerControl;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFVideoMixerControl2, windows_core::IUnknown, IMFVideoMixerControl);
impl IMFVideoMixerControl2 {
pub unsafe fn SetMixingPrefs(&self, dwmixflags: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetMixingPrefs)(windows_core::Interface::as_raw(self), dwmixflags).ok() }
}
pub unsafe fn GetMixingPrefs(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMixingPrefs)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFVideoMixerControl2_Vtbl {
pub base__: IMFVideoMixerControl_Vtbl,
pub SetMixingPrefs: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub GetMixingPrefs: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
}
pub trait IMFVideoMixerControl2_Impl: IMFVideoMixerControl_Impl {
fn SetMixingPrefs(&self, dwmixflags: u32) -> windows_core::Result<()>;
fn GetMixingPrefs(&self) -> windows_core::Result<u32>;
}
impl IMFVideoMixerControl2_Vtbl {
pub const fn new<Identity: IMFVideoMixerControl2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetMixingPrefs<Identity: IMFVideoMixerControl2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwmixflags: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoMixerControl2_Impl::SetMixingPrefs(this, core::mem::transmute_copy(&dwmixflags)).into()
}
}
unsafe extern "system" fn GetMixingPrefs<Identity: IMFVideoMixerControl2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwmixflags: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFVideoMixerControl2_Impl::GetMixingPrefs(this) {
Ok(ok__) => {
pdwmixflags.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IMFVideoMixerControl_Vtbl::new::<Identity, OFFSET>(),
SetMixingPrefs: SetMixingPrefs::<Identity, OFFSET>,
GetMixingPrefs: GetMixingPrefs::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFVideoMixerControl2 as windows_core::Interface>::IID || iid == &<IMFVideoMixerControl as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFVideoMixerControl2 {}
windows_core::imp::define_interface!(IMFVideoPositionMapper, IMFVideoPositionMapper_Vtbl, 0x1f6a9f17_e70b_4e24_8ae4_0b2c3ba7a4ae);
windows_core::imp::interface_hierarchy!(IMFVideoPositionMapper, windows_core::IUnknown);
impl IMFVideoPositionMapper {
pub unsafe fn MapOutputCoordinateToInputStream(&self, xout: f32, yout: f32, dwoutputstreamindex: u32, dwinputstreamindex: u32, pxin: *mut f32, pyin: *mut f32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).MapOutputCoordinateToInputStream)(windows_core::Interface::as_raw(self), xout, yout, dwoutputstreamindex, dwinputstreamindex, pxin as _, pyin as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFVideoPositionMapper_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub MapOutputCoordinateToInputStream: unsafe extern "system" fn(*mut core::ffi::c_void, f32, f32, u32, u32, *mut f32, *mut f32) -> windows_core::HRESULT,
}
pub trait IMFVideoPositionMapper_Impl: windows_core::IUnknownImpl {
fn MapOutputCoordinateToInputStream(&self, xout: f32, yout: f32, dwoutputstreamindex: u32, dwinputstreamindex: u32, pxin: *mut f32, pyin: *mut f32) -> windows_core::Result<()>;
}
impl IMFVideoPositionMapper_Vtbl {
pub const fn new<Identity: IMFVideoPositionMapper_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn MapOutputCoordinateToInputStream<Identity: IMFVideoPositionMapper_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, xout: f32, yout: f32, dwoutputstreamindex: u32, dwinputstreamindex: u32, pxin: *mut f32, pyin: *mut f32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoPositionMapper_Impl::MapOutputCoordinateToInputStream(this, core::mem::transmute_copy(&xout), core::mem::transmute_copy(&yout), core::mem::transmute_copy(&dwoutputstreamindex), core::mem::transmute_copy(&dwinputstreamindex), core::mem::transmute_copy(&pxin), core::mem::transmute_copy(&pyin)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
MapOutputCoordinateToInputStream: MapOutputCoordinateToInputStream::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFVideoPositionMapper as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFVideoPositionMapper {}
windows_core::imp::define_interface!(IMFVideoPresenter, IMFVideoPresenter_Vtbl, 0x29aff080_182a_4a5d_af3b_448f3a6346cb);
impl core::ops::Deref for IMFVideoPresenter {
type Target = IMFClockStateSink;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFVideoPresenter, windows_core::IUnknown, IMFClockStateSink);
impl IMFVideoPresenter {
pub unsafe fn ProcessMessage(&self, emessage: MFVP_MESSAGE_TYPE, ulparam: usize) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).ProcessMessage)(windows_core::Interface::as_raw(self), emessage, ulparam).ok() }
}
pub unsafe fn GetCurrentMediaType(&self) -> windows_core::Result<IMFVideoMediaType> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetCurrentMediaType)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFVideoPresenter_Vtbl {
pub base__: IMFClockStateSink_Vtbl,
pub ProcessMessage: unsafe extern "system" fn(*mut core::ffi::c_void, MFVP_MESSAGE_TYPE, usize) -> windows_core::HRESULT,
pub GetCurrentMediaType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFVideoPresenter_Impl: IMFClockStateSink_Impl {
fn ProcessMessage(&self, emessage: MFVP_MESSAGE_TYPE, ulparam: usize) -> windows_core::Result<()>;
fn GetCurrentMediaType(&self) -> windows_core::Result<IMFVideoMediaType>;
}
impl IMFVideoPresenter_Vtbl {
pub const fn new<Identity: IMFVideoPresenter_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn ProcessMessage<Identity: IMFVideoPresenter_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, emessage: MFVP_MESSAGE_TYPE, ulparam: usize) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoPresenter_Impl::ProcessMessage(this, core::mem::transmute_copy(&emessage), core::mem::transmute_copy(&ulparam)).into()
}
}
unsafe extern "system" fn GetCurrentMediaType<Identity: IMFVideoPresenter_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppmediatype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFVideoPresenter_Impl::GetCurrentMediaType(this) {
Ok(ok__) => {
ppmediatype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IMFClockStateSink_Vtbl::new::<Identity, OFFSET>(),
ProcessMessage: ProcessMessage::<Identity, OFFSET>,
GetCurrentMediaType: GetCurrentMediaType::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFVideoPresenter as windows_core::Interface>::IID || iid == &<IMFClockStateSink as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFVideoPresenter {}
windows_core::imp::define_interface!(IMFVideoProcessor, IMFVideoProcessor_Vtbl, 0x6ab0000c_fece_4d1f_a2ac_a9573530656e);
windows_core::imp::interface_hierarchy!(IMFVideoProcessor, windows_core::IUnknown);
impl IMFVideoProcessor {
pub unsafe fn GetAvailableVideoProcessorModes(&self, lpdwnumprocessingmodes: *mut u32, ppvideoprocessingmodes: *mut *mut windows_core::GUID) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetAvailableVideoProcessorModes)(windows_core::Interface::as_raw(self), lpdwnumprocessingmodes as _, ppvideoprocessingmodes as _).ok() }
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub unsafe fn GetVideoProcessorCaps(&self, lpvideoprocessormode: *const windows_core::GUID, lpvideoprocessorcaps: *mut DXVA2_VideoProcessorCaps) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetVideoProcessorCaps)(windows_core::Interface::as_raw(self), lpvideoprocessormode, lpvideoprocessorcaps as _).ok() }
}
pub unsafe fn GetVideoProcessorMode(&self) -> windows_core::Result<windows_core::GUID> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetVideoProcessorMode)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetVideoProcessorMode(&self, lpmode: *const windows_core::GUID) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetVideoProcessorMode)(windows_core::Interface::as_raw(self), lpmode).ok() }
}
pub unsafe fn GetProcAmpRange(&self, dwproperty: u32) -> windows_core::Result<DXVA2_ValueRange> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetProcAmpRange)(windows_core::Interface::as_raw(self), dwproperty, &mut result__).map(|| result__)
}
}
pub unsafe fn GetProcAmpValues(&self, dwflags: u32) -> windows_core::Result<DXVA2_ProcAmpValues> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetProcAmpValues)(windows_core::Interface::as_raw(self), dwflags, &mut result__).map(|| result__)
}
}
pub unsafe fn SetProcAmpValues(&self, dwflags: u32, pvalues: *const DXVA2_ProcAmpValues) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetProcAmpValues)(windows_core::Interface::as_raw(self), dwflags, pvalues).ok() }
}
pub unsafe fn GetFilteringRange(&self, dwproperty: u32) -> windows_core::Result<DXVA2_ValueRange> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetFilteringRange)(windows_core::Interface::as_raw(self), dwproperty, &mut result__).map(|| result__)
}
}
pub unsafe fn GetFilteringValue(&self, dwproperty: u32) -> windows_core::Result<DXVA2_Fixed32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetFilteringValue)(windows_core::Interface::as_raw(self), dwproperty, &mut result__).map(|| result__)
}
}
pub unsafe fn SetFilteringValue(&self, dwproperty: u32, pvalue: *const DXVA2_Fixed32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetFilteringValue)(windows_core::Interface::as_raw(self), dwproperty, pvalue).ok() }
}
pub unsafe fn GetBackgroundColor(&self) -> windows_core::Result<super::super::Foundation::COLORREF> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetBackgroundColor)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
pub unsafe fn SetBackgroundColor(&self, clrbkg: super::super::Foundation::COLORREF) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetBackgroundColor)(windows_core::Interface::as_raw(self), clrbkg).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFVideoProcessor_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetAvailableVideoProcessorModes: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut *mut windows_core::GUID) -> windows_core::HRESULT,
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub GetVideoProcessorCaps: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut DXVA2_VideoProcessorCaps) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Direct3D9"))]
GetVideoProcessorCaps: usize,
pub GetVideoProcessorMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT,
pub SetVideoProcessorMode: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID) -> windows_core::HRESULT,
pub GetProcAmpRange: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut DXVA2_ValueRange) -> windows_core::HRESULT,
pub GetProcAmpValues: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut DXVA2_ProcAmpValues) -> windows_core::HRESULT,
pub SetProcAmpValues: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const DXVA2_ProcAmpValues) -> windows_core::HRESULT,
pub GetFilteringRange: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut DXVA2_ValueRange) -> windows_core::HRESULT,
pub GetFilteringValue: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut DXVA2_Fixed32) -> windows_core::HRESULT,
pub SetFilteringValue: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const DXVA2_Fixed32) -> windows_core::HRESULT,
pub GetBackgroundColor: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::COLORREF) -> windows_core::HRESULT,
pub SetBackgroundColor: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::COLORREF) -> windows_core::HRESULT,
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub trait IMFVideoProcessor_Impl: windows_core::IUnknownImpl {
fn GetAvailableVideoProcessorModes(&self, lpdwnumprocessingmodes: *mut u32, ppvideoprocessingmodes: *mut *mut windows_core::GUID) -> windows_core::Result<()>;
fn GetVideoProcessorCaps(&self, lpvideoprocessormode: *const windows_core::GUID, lpvideoprocessorcaps: *mut DXVA2_VideoProcessorCaps) -> windows_core::Result<()>;
fn GetVideoProcessorMode(&self) -> windows_core::Result<windows_core::GUID>;
fn SetVideoProcessorMode(&self, lpmode: *const windows_core::GUID) -> windows_core::Result<()>;
fn GetProcAmpRange(&self, dwproperty: u32) -> windows_core::Result<DXVA2_ValueRange>;
fn GetProcAmpValues(&self, dwflags: u32) -> windows_core::Result<DXVA2_ProcAmpValues>;
fn SetProcAmpValues(&self, dwflags: u32, pvalues: *const DXVA2_ProcAmpValues) -> windows_core::Result<()>;
fn GetFilteringRange(&self, dwproperty: u32) -> windows_core::Result<DXVA2_ValueRange>;
fn GetFilteringValue(&self, dwproperty: u32) -> windows_core::Result<DXVA2_Fixed32>;
fn SetFilteringValue(&self, dwproperty: u32, pvalue: *const DXVA2_Fixed32) -> windows_core::Result<()>;
fn GetBackgroundColor(&self) -> windows_core::Result<super::super::Foundation::COLORREF>;
fn SetBackgroundColor(&self, clrbkg: super::super::Foundation::COLORREF) -> windows_core::Result<()>;
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl IMFVideoProcessor_Vtbl {
pub const fn new<Identity: IMFVideoProcessor_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetAvailableVideoProcessorModes<Identity: IMFVideoProcessor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, lpdwnumprocessingmodes: *mut u32, ppvideoprocessingmodes: *mut *mut windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoProcessor_Impl::GetAvailableVideoProcessorModes(this, core::mem::transmute_copy(&lpdwnumprocessingmodes), core::mem::transmute_copy(&ppvideoprocessingmodes)).into()
}
}
unsafe extern "system" fn GetVideoProcessorCaps<Identity: IMFVideoProcessor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, lpvideoprocessormode: *const windows_core::GUID, lpvideoprocessorcaps: *mut DXVA2_VideoProcessorCaps) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoProcessor_Impl::GetVideoProcessorCaps(this, core::mem::transmute_copy(&lpvideoprocessormode), core::mem::transmute_copy(&lpvideoprocessorcaps)).into()
}
}
unsafe extern "system" fn GetVideoProcessorMode<Identity: IMFVideoProcessor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, lpmode: *mut windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFVideoProcessor_Impl::GetVideoProcessorMode(this) {
Ok(ok__) => {
lpmode.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetVideoProcessorMode<Identity: IMFVideoProcessor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, lpmode: *const windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoProcessor_Impl::SetVideoProcessorMode(this, core::mem::transmute_copy(&lpmode)).into()
}
}
unsafe extern "system" fn GetProcAmpRange<Identity: IMFVideoProcessor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwproperty: u32, pproprange: *mut DXVA2_ValueRange) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFVideoProcessor_Impl::GetProcAmpRange(this, core::mem::transmute_copy(&dwproperty)) {
Ok(ok__) => {
pproprange.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetProcAmpValues<Identity: IMFVideoProcessor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwflags: u32, values: *mut DXVA2_ProcAmpValues) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFVideoProcessor_Impl::GetProcAmpValues(this, core::mem::transmute_copy(&dwflags)) {
Ok(ok__) => {
values.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetProcAmpValues<Identity: IMFVideoProcessor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwflags: u32, pvalues: *const DXVA2_ProcAmpValues) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoProcessor_Impl::SetProcAmpValues(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pvalues)).into()
}
}
unsafe extern "system" fn GetFilteringRange<Identity: IMFVideoProcessor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwproperty: u32, pproprange: *mut DXVA2_ValueRange) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFVideoProcessor_Impl::GetFilteringRange(this, core::mem::transmute_copy(&dwproperty)) {
Ok(ok__) => {
pproprange.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetFilteringValue<Identity: IMFVideoProcessor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwproperty: u32, pvalue: *mut DXVA2_Fixed32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFVideoProcessor_Impl::GetFilteringValue(this, core::mem::transmute_copy(&dwproperty)) {
Ok(ok__) => {
pvalue.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetFilteringValue<Identity: IMFVideoProcessor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwproperty: u32, pvalue: *const DXVA2_Fixed32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoProcessor_Impl::SetFilteringValue(this, core::mem::transmute_copy(&dwproperty), core::mem::transmute_copy(&pvalue)).into()
}
}
unsafe extern "system" fn GetBackgroundColor<Identity: IMFVideoProcessor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, lpclrbkg: *mut super::super::Foundation::COLORREF) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFVideoProcessor_Impl::GetBackgroundColor(this) {
Ok(ok__) => {
lpclrbkg.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetBackgroundColor<Identity: IMFVideoProcessor_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, clrbkg: super::super::Foundation::COLORREF) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoProcessor_Impl::SetBackgroundColor(this, core::mem::transmute_copy(&clrbkg)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetAvailableVideoProcessorModes: GetAvailableVideoProcessorModes::<Identity, OFFSET>,
GetVideoProcessorCaps: GetVideoProcessorCaps::<Identity, OFFSET>,
GetVideoProcessorMode: GetVideoProcessorMode::<Identity, OFFSET>,
SetVideoProcessorMode: SetVideoProcessorMode::<Identity, OFFSET>,
GetProcAmpRange: GetProcAmpRange::<Identity, OFFSET>,
GetProcAmpValues: GetProcAmpValues::<Identity, OFFSET>,
SetProcAmpValues: SetProcAmpValues::<Identity, OFFSET>,
GetFilteringRange: GetFilteringRange::<Identity, OFFSET>,
GetFilteringValue: GetFilteringValue::<Identity, OFFSET>,
SetFilteringValue: SetFilteringValue::<Identity, OFFSET>,
GetBackgroundColor: GetBackgroundColor::<Identity, OFFSET>,
SetBackgroundColor: SetBackgroundColor::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFVideoProcessor as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Graphics_Direct3D9")]
impl windows_core::RuntimeName for IMFVideoProcessor {}
windows_core::imp::define_interface!(IMFVideoProcessorControl, IMFVideoProcessorControl_Vtbl, 0xa3f675d5_6119_4f7f_a100_1d8b280f0efb);
windows_core::imp::interface_hierarchy!(IMFVideoProcessorControl, windows_core::IUnknown);
impl IMFVideoProcessorControl {
pub unsafe fn SetBorderColor(&self, pbordercolor: Option<*const MFARGB>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetBorderColor)(windows_core::Interface::as_raw(self), pbordercolor.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn SetSourceRectangle(&self, psrcrect: Option<*const super::super::Foundation::RECT>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetSourceRectangle)(windows_core::Interface::as_raw(self), psrcrect.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn SetDestinationRectangle(&self, pdstrect: Option<*const super::super::Foundation::RECT>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetDestinationRectangle)(windows_core::Interface::as_raw(self), pdstrect.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn SetMirror(&self, emirror: MF_VIDEO_PROCESSOR_MIRROR) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetMirror)(windows_core::Interface::as_raw(self), emirror).ok() }
}
pub unsafe fn SetRotation(&self, erotation: MF_VIDEO_PROCESSOR_ROTATION) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetRotation)(windows_core::Interface::as_raw(self), erotation).ok() }
}
pub unsafe fn SetConstrictionSize(&self, pconstrictionsize: Option<*const super::super::Foundation::SIZE>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetConstrictionSize)(windows_core::Interface::as_raw(self), pconstrictionsize.unwrap_or(core::mem::zeroed()) as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFVideoProcessorControl_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetBorderColor: unsafe extern "system" fn(*mut core::ffi::c_void, *const MFARGB) -> windows_core::HRESULT,
pub SetSourceRectangle: unsafe extern "system" fn(*mut core::ffi::c_void, *const super::super::Foundation::RECT) -> windows_core::HRESULT,
pub SetDestinationRectangle: unsafe extern "system" fn(*mut core::ffi::c_void, *const super::super::Foundation::RECT) -> windows_core::HRESULT,
pub SetMirror: unsafe extern "system" fn(*mut core::ffi::c_void, MF_VIDEO_PROCESSOR_MIRROR) -> windows_core::HRESULT,
pub SetRotation: unsafe extern "system" fn(*mut core::ffi::c_void, MF_VIDEO_PROCESSOR_ROTATION) -> windows_core::HRESULT,
pub SetConstrictionSize: unsafe extern "system" fn(*mut core::ffi::c_void, *const super::super::Foundation::SIZE) -> windows_core::HRESULT,
}
pub trait IMFVideoProcessorControl_Impl: windows_core::IUnknownImpl {
fn SetBorderColor(&self, pbordercolor: *const MFARGB) -> windows_core::Result<()>;
fn SetSourceRectangle(&self, psrcrect: *const super::super::Foundation::RECT) -> windows_core::Result<()>;
fn SetDestinationRectangle(&self, pdstrect: *const super::super::Foundation::RECT) -> windows_core::Result<()>;
fn SetMirror(&self, emirror: MF_VIDEO_PROCESSOR_MIRROR) -> windows_core::Result<()>;
fn SetRotation(&self, erotation: MF_VIDEO_PROCESSOR_ROTATION) -> windows_core::Result<()>;
fn SetConstrictionSize(&self, pconstrictionsize: *const super::super::Foundation::SIZE) -> windows_core::Result<()>;
}
impl IMFVideoProcessorControl_Vtbl {
pub const fn new<Identity: IMFVideoProcessorControl_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetBorderColor<Identity: IMFVideoProcessorControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbordercolor: *const MFARGB) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoProcessorControl_Impl::SetBorderColor(this, core::mem::transmute_copy(&pbordercolor)).into()
}
}
unsafe extern "system" fn SetSourceRectangle<Identity: IMFVideoProcessorControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, psrcrect: *const super::super::Foundation::RECT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoProcessorControl_Impl::SetSourceRectangle(this, core::mem::transmute_copy(&psrcrect)).into()
}
}
unsafe extern "system" fn SetDestinationRectangle<Identity: IMFVideoProcessorControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdstrect: *const super::super::Foundation::RECT) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoProcessorControl_Impl::SetDestinationRectangle(this, core::mem::transmute_copy(&pdstrect)).into()
}
}
unsafe extern "system" fn SetMirror<Identity: IMFVideoProcessorControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, emirror: MF_VIDEO_PROCESSOR_MIRROR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoProcessorControl_Impl::SetMirror(this, core::mem::transmute_copy(&emirror)).into()
}
}
unsafe extern "system" fn SetRotation<Identity: IMFVideoProcessorControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, erotation: MF_VIDEO_PROCESSOR_ROTATION) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoProcessorControl_Impl::SetRotation(this, core::mem::transmute_copy(&erotation)).into()
}
}
unsafe extern "system" fn SetConstrictionSize<Identity: IMFVideoProcessorControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pconstrictionsize: *const super::super::Foundation::SIZE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoProcessorControl_Impl::SetConstrictionSize(this, core::mem::transmute_copy(&pconstrictionsize)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetBorderColor: SetBorderColor::<Identity, OFFSET>,
SetSourceRectangle: SetSourceRectangle::<Identity, OFFSET>,
SetDestinationRectangle: SetDestinationRectangle::<Identity, OFFSET>,
SetMirror: SetMirror::<Identity, OFFSET>,
SetRotation: SetRotation::<Identity, OFFSET>,
SetConstrictionSize: SetConstrictionSize::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFVideoProcessorControl as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFVideoProcessorControl {}
windows_core::imp::define_interface!(IMFVideoProcessorControl2, IMFVideoProcessorControl2_Vtbl, 0xbde633d3_e1dc_4a7f_a693_bbae399c4a20);
impl core::ops::Deref for IMFVideoProcessorControl2 {
type Target = IMFVideoProcessorControl;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFVideoProcessorControl2, windows_core::IUnknown, IMFVideoProcessorControl);
impl IMFVideoProcessorControl2 {
pub unsafe fn SetRotationOverride(&self, uirotation: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetRotationOverride)(windows_core::Interface::as_raw(self), uirotation).ok() }
}
pub unsafe fn EnableHardwareEffects(&self, fenabled: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).EnableHardwareEffects)(windows_core::Interface::as_raw(self), fenabled.into()).ok() }
}
pub unsafe fn GetSupportedHardwareEffects(&self) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetSupportedHardwareEffects)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFVideoProcessorControl2_Vtbl {
pub base__: IMFVideoProcessorControl_Vtbl,
pub SetRotationOverride: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub EnableHardwareEffects: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT,
pub GetSupportedHardwareEffects: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
}
pub trait IMFVideoProcessorControl2_Impl: IMFVideoProcessorControl_Impl {
fn SetRotationOverride(&self, uirotation: u32) -> windows_core::Result<()>;
fn EnableHardwareEffects(&self, fenabled: windows_core::BOOL) -> windows_core::Result<()>;
fn GetSupportedHardwareEffects(&self) -> windows_core::Result<u32>;
}
impl IMFVideoProcessorControl2_Vtbl {
pub const fn new<Identity: IMFVideoProcessorControl2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetRotationOverride<Identity: IMFVideoProcessorControl2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, uirotation: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoProcessorControl2_Impl::SetRotationOverride(this, core::mem::transmute_copy(&uirotation)).into()
}
}
unsafe extern "system" fn EnableHardwareEffects<Identity: IMFVideoProcessorControl2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, fenabled: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoProcessorControl2_Impl::EnableHardwareEffects(this, core::mem::transmute_copy(&fenabled)).into()
}
}
unsafe extern "system" fn GetSupportedHardwareEffects<Identity: IMFVideoProcessorControl2_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, puisupport: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFVideoProcessorControl2_Impl::GetSupportedHardwareEffects(this) {
Ok(ok__) => {
puisupport.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IMFVideoProcessorControl_Vtbl::new::<Identity, OFFSET>(),
SetRotationOverride: SetRotationOverride::<Identity, OFFSET>,
EnableHardwareEffects: EnableHardwareEffects::<Identity, OFFSET>,
GetSupportedHardwareEffects: GetSupportedHardwareEffects::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFVideoProcessorControl2 as windows_core::Interface>::IID || iid == &<IMFVideoProcessorControl as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFVideoProcessorControl2 {}
windows_core::imp::define_interface!(IMFVideoProcessorControl3, IMFVideoProcessorControl3_Vtbl, 0x2424b3f2_eb23_40f1_91aa_74bddeea0883);
impl core::ops::Deref for IMFVideoProcessorControl3 {
type Target = IMFVideoProcessorControl2;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFVideoProcessorControl3, windows_core::IUnknown, IMFVideoProcessorControl, IMFVideoProcessorControl2);
impl IMFVideoProcessorControl3 {
pub unsafe fn GetNaturalOutputType(&self) -> windows_core::Result<IMFMediaType> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetNaturalOutputType)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn EnableSphericalVideoProcessing(&self, fenable: bool, eformat: MFVideoSphericalFormat, eprojectionmode: MFVideoSphericalProjectionMode) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).EnableSphericalVideoProcessing)(windows_core::Interface::as_raw(self), fenable.into(), eformat, eprojectionmode).ok() }
}
pub unsafe fn SetSphericalVideoProperties(&self, x: f32, y: f32, z: f32, w: f32, fieldofview: f32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetSphericalVideoProperties)(windows_core::Interface::as_raw(self), x, y, z, w, fieldofview).ok() }
}
pub unsafe fn SetOutputDevice<P0>(&self, poutputdevice: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).SetOutputDevice)(windows_core::Interface::as_raw(self), poutputdevice.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFVideoProcessorControl3_Vtbl {
pub base__: IMFVideoProcessorControl2_Vtbl,
pub GetNaturalOutputType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub EnableSphericalVideoProcessing: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL, MFVideoSphericalFormat, MFVideoSphericalProjectionMode) -> windows_core::HRESULT,
pub SetSphericalVideoProperties: unsafe extern "system" fn(*mut core::ffi::c_void, f32, f32, f32, f32, f32) -> windows_core::HRESULT,
pub SetOutputDevice: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFVideoProcessorControl3_Impl: IMFVideoProcessorControl2_Impl {
fn GetNaturalOutputType(&self) -> windows_core::Result<IMFMediaType>;
fn EnableSphericalVideoProcessing(&self, fenable: windows_core::BOOL, eformat: MFVideoSphericalFormat, eprojectionmode: MFVideoSphericalProjectionMode) -> windows_core::Result<()>;
fn SetSphericalVideoProperties(&self, x: f32, y: f32, z: f32, w: f32, fieldofview: f32) -> windows_core::Result<()>;
fn SetOutputDevice(&self, poutputdevice: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
}
impl IMFVideoProcessorControl3_Vtbl {
pub const fn new<Identity: IMFVideoProcessorControl3_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetNaturalOutputType<Identity: IMFVideoProcessorControl3_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pptype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFVideoProcessorControl3_Impl::GetNaturalOutputType(this) {
Ok(ok__) => {
pptype.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EnableSphericalVideoProcessing<Identity: IMFVideoProcessorControl3_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, fenable: windows_core::BOOL, eformat: MFVideoSphericalFormat, eprojectionmode: MFVideoSphericalProjectionMode) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoProcessorControl3_Impl::EnableSphericalVideoProcessing(this, core::mem::transmute_copy(&fenable), core::mem::transmute_copy(&eformat), core::mem::transmute_copy(&eprojectionmode)).into()
}
}
unsafe extern "system" fn SetSphericalVideoProperties<Identity: IMFVideoProcessorControl3_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, x: f32, y: f32, z: f32, w: f32, fieldofview: f32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoProcessorControl3_Impl::SetSphericalVideoProperties(this, core::mem::transmute_copy(&x), core::mem::transmute_copy(&y), core::mem::transmute_copy(&z), core::mem::transmute_copy(&w), core::mem::transmute_copy(&fieldofview)).into()
}
}
unsafe extern "system" fn SetOutputDevice<Identity: IMFVideoProcessorControl3_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, poutputdevice: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoProcessorControl3_Impl::SetOutputDevice(this, core::mem::transmute_copy(&poutputdevice)).into()
}
}
Self {
base__: IMFVideoProcessorControl2_Vtbl::new::<Identity, OFFSET>(),
GetNaturalOutputType: GetNaturalOutputType::<Identity, OFFSET>,
EnableSphericalVideoProcessing: EnableSphericalVideoProcessing::<Identity, OFFSET>,
SetSphericalVideoProperties: SetSphericalVideoProperties::<Identity, OFFSET>,
SetOutputDevice: SetOutputDevice::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFVideoProcessorControl3 as windows_core::Interface>::IID || iid == &<IMFVideoProcessorControl as windows_core::Interface>::IID || iid == &<IMFVideoProcessorControl2 as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFVideoProcessorControl3 {}
windows_core::imp::define_interface!(IMFVideoRenderer, IMFVideoRenderer_Vtbl, 0xdfdfd197_a9ca_43d8_b341_6af3503792cd);
windows_core::imp::interface_hierarchy!(IMFVideoRenderer, windows_core::IUnknown);
impl IMFVideoRenderer {
pub unsafe fn InitializeRenderer<P0, P1>(&self, pvideomixer: P0, pvideopresenter: P1) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFTransform>,
P1: windows_core::Param<IMFVideoPresenter>,
{
unsafe { (windows_core::Interface::vtable(self).InitializeRenderer)(windows_core::Interface::as_raw(self), pvideomixer.param().abi(), pvideopresenter.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFVideoRenderer_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub InitializeRenderer: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFVideoRenderer_Impl: windows_core::IUnknownImpl {
fn InitializeRenderer(&self, pvideomixer: windows_core::Ref<IMFTransform>, pvideopresenter: windows_core::Ref<IMFVideoPresenter>) -> windows_core::Result<()>;
}
impl IMFVideoRenderer_Vtbl {
pub const fn new<Identity: IMFVideoRenderer_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn InitializeRenderer<Identity: IMFVideoRenderer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pvideomixer: *mut core::ffi::c_void, pvideopresenter: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoRenderer_Impl::InitializeRenderer(this, core::mem::transmute_copy(&pvideomixer), core::mem::transmute_copy(&pvideopresenter)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), InitializeRenderer: InitializeRenderer::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFVideoRenderer as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFVideoRenderer {}
windows_core::imp::define_interface!(IMFVideoRendererEffectControl, IMFVideoRendererEffectControl_Vtbl, 0x604d33d7_cf23_41d5_8224_5bbbb1a87475);
windows_core::imp::interface_hierarchy!(IMFVideoRendererEffectControl, windows_core::IUnknown);
impl IMFVideoRendererEffectControl {
pub unsafe fn OnAppServiceConnectionEstablished<P0>(&self, pappserviceconnection: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).OnAppServiceConnectionEstablished)(windows_core::Interface::as_raw(self), pappserviceconnection.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFVideoRendererEffectControl_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub OnAppServiceConnectionEstablished: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFVideoRendererEffectControl_Impl: windows_core::IUnknownImpl {
fn OnAppServiceConnectionEstablished(&self, pappserviceconnection: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
}
impl IMFVideoRendererEffectControl_Vtbl {
pub const fn new<Identity: IMFVideoRendererEffectControl_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn OnAppServiceConnectionEstablished<Identity: IMFVideoRendererEffectControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pappserviceconnection: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoRendererEffectControl_Impl::OnAppServiceConnectionEstablished(this, core::mem::transmute_copy(&pappserviceconnection)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
OnAppServiceConnectionEstablished: OnAppServiceConnectionEstablished::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFVideoRendererEffectControl as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFVideoRendererEffectControl {}
windows_core::imp::define_interface!(IMFVideoSampleAllocator, IMFVideoSampleAllocator_Vtbl, 0x86cbc910_e533_4751_8e3b_f19b5b806a03);
windows_core::imp::interface_hierarchy!(IMFVideoSampleAllocator, windows_core::IUnknown);
impl IMFVideoSampleAllocator {
pub unsafe fn SetDirectXManager<P0>(&self, pmanager: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).SetDirectXManager)(windows_core::Interface::as_raw(self), pmanager.param().abi()).ok() }
}
pub unsafe fn UninitializeSampleAllocator(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).UninitializeSampleAllocator)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn InitializeSampleAllocator<P1>(&self, crequestedframes: u32, pmediatype: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFMediaType>,
{
unsafe { (windows_core::Interface::vtable(self).InitializeSampleAllocator)(windows_core::Interface::as_raw(self), crequestedframes, pmediatype.param().abi()).ok() }
}
pub unsafe fn AllocateSample(&self) -> windows_core::Result<IMFSample> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).AllocateSample)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFVideoSampleAllocator_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetDirectXManager: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub UninitializeSampleAllocator: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub InitializeSampleAllocator: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AllocateSample: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFVideoSampleAllocator_Impl: windows_core::IUnknownImpl {
fn SetDirectXManager(&self, pmanager: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn UninitializeSampleAllocator(&self) -> windows_core::Result<()>;
fn InitializeSampleAllocator(&self, crequestedframes: u32, pmediatype: windows_core::Ref<IMFMediaType>) -> windows_core::Result<()>;
fn AllocateSample(&self) -> windows_core::Result<IMFSample>;
}
impl IMFVideoSampleAllocator_Vtbl {
pub const fn new<Identity: IMFVideoSampleAllocator_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetDirectXManager<Identity: IMFVideoSampleAllocator_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pmanager: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoSampleAllocator_Impl::SetDirectXManager(this, core::mem::transmute_copy(&pmanager)).into()
}
}
unsafe extern "system" fn UninitializeSampleAllocator<Identity: IMFVideoSampleAllocator_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoSampleAllocator_Impl::UninitializeSampleAllocator(this).into()
}
}
unsafe extern "system" fn InitializeSampleAllocator<Identity: IMFVideoSampleAllocator_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, crequestedframes: u32, pmediatype: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoSampleAllocator_Impl::InitializeSampleAllocator(this, core::mem::transmute_copy(&crequestedframes), core::mem::transmute_copy(&pmediatype)).into()
}
}
unsafe extern "system" fn AllocateSample<Identity: IMFVideoSampleAllocator_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppsample: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFVideoSampleAllocator_Impl::AllocateSample(this) {
Ok(ok__) => {
ppsample.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetDirectXManager: SetDirectXManager::<Identity, OFFSET>,
UninitializeSampleAllocator: UninitializeSampleAllocator::<Identity, OFFSET>,
InitializeSampleAllocator: InitializeSampleAllocator::<Identity, OFFSET>,
AllocateSample: AllocateSample::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFVideoSampleAllocator as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFVideoSampleAllocator {}
windows_core::imp::define_interface!(IMFVideoSampleAllocatorCallback, IMFVideoSampleAllocatorCallback_Vtbl, 0x992388b4_3372_4f67_8b6f_c84c071f4751);
windows_core::imp::interface_hierarchy!(IMFVideoSampleAllocatorCallback, windows_core::IUnknown);
impl IMFVideoSampleAllocatorCallback {
pub unsafe fn SetCallback<P0>(&self, pnotify: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFVideoSampleAllocatorNotify>,
{
unsafe { (windows_core::Interface::vtable(self).SetCallback)(windows_core::Interface::as_raw(self), pnotify.param().abi()).ok() }
}
pub unsafe fn GetFreeSampleCount(&self) -> windows_core::Result<i32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetFreeSampleCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFVideoSampleAllocatorCallback_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetCallback: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetFreeSampleCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
}
pub trait IMFVideoSampleAllocatorCallback_Impl: windows_core::IUnknownImpl {
fn SetCallback(&self, pnotify: windows_core::Ref<IMFVideoSampleAllocatorNotify>) -> windows_core::Result<()>;
fn GetFreeSampleCount(&self) -> windows_core::Result<i32>;
}
impl IMFVideoSampleAllocatorCallback_Vtbl {
pub const fn new<Identity: IMFVideoSampleAllocatorCallback_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetCallback<Identity: IMFVideoSampleAllocatorCallback_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pnotify: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoSampleAllocatorCallback_Impl::SetCallback(this, core::mem::transmute_copy(&pnotify)).into()
}
}
unsafe extern "system" fn GetFreeSampleCount<Identity: IMFVideoSampleAllocatorCallback_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, plsamples: *mut i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFVideoSampleAllocatorCallback_Impl::GetFreeSampleCount(this) {
Ok(ok__) => {
plsamples.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetCallback: SetCallback::<Identity, OFFSET>,
GetFreeSampleCount: GetFreeSampleCount::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFVideoSampleAllocatorCallback as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFVideoSampleAllocatorCallback {}
windows_core::imp::define_interface!(IMFVideoSampleAllocatorEx, IMFVideoSampleAllocatorEx_Vtbl, 0x545b3a48_3283_4f62_866f_a62d8f598f9f);
impl core::ops::Deref for IMFVideoSampleAllocatorEx {
type Target = IMFVideoSampleAllocator;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFVideoSampleAllocatorEx, windows_core::IUnknown, IMFVideoSampleAllocator);
impl IMFVideoSampleAllocatorEx {
pub unsafe fn InitializeSampleAllocatorEx<P2, P3>(&self, cinitialsamples: u32, cmaximumsamples: u32, pattributes: P2, pmediatype: P3) -> windows_core::Result<()>
where
P2: windows_core::Param<IMFAttributes>,
P3: windows_core::Param<IMFMediaType>,
{
unsafe { (windows_core::Interface::vtable(self).InitializeSampleAllocatorEx)(windows_core::Interface::as_raw(self), cinitialsamples, cmaximumsamples, pattributes.param().abi(), pmediatype.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFVideoSampleAllocatorEx_Vtbl {
pub base__: IMFVideoSampleAllocator_Vtbl,
pub InitializeSampleAllocatorEx: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFVideoSampleAllocatorEx_Impl: IMFVideoSampleAllocator_Impl {
fn InitializeSampleAllocatorEx(&self, cinitialsamples: u32, cmaximumsamples: u32, pattributes: windows_core::Ref<IMFAttributes>, pmediatype: windows_core::Ref<IMFMediaType>) -> windows_core::Result<()>;
}
impl IMFVideoSampleAllocatorEx_Vtbl {
pub const fn new<Identity: IMFVideoSampleAllocatorEx_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn InitializeSampleAllocatorEx<Identity: IMFVideoSampleAllocatorEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, cinitialsamples: u32, cmaximumsamples: u32, pattributes: *mut core::ffi::c_void, pmediatype: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoSampleAllocatorEx_Impl::InitializeSampleAllocatorEx(this, core::mem::transmute_copy(&cinitialsamples), core::mem::transmute_copy(&cmaximumsamples), core::mem::transmute_copy(&pattributes), core::mem::transmute_copy(&pmediatype)).into()
}
}
Self { base__: IMFVideoSampleAllocator_Vtbl::new::<Identity, OFFSET>(), InitializeSampleAllocatorEx: InitializeSampleAllocatorEx::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFVideoSampleAllocatorEx as windows_core::Interface>::IID || iid == &<IMFVideoSampleAllocator as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFVideoSampleAllocatorEx {}
windows_core::imp::define_interface!(IMFVideoSampleAllocatorNotify, IMFVideoSampleAllocatorNotify_Vtbl, 0xa792cdbe_c374_4e89_8335_278e7b9956a4);
windows_core::imp::interface_hierarchy!(IMFVideoSampleAllocatorNotify, windows_core::IUnknown);
impl IMFVideoSampleAllocatorNotify {
pub unsafe fn NotifyRelease(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).NotifyRelease)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFVideoSampleAllocatorNotify_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub NotifyRelease: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFVideoSampleAllocatorNotify_Impl: windows_core::IUnknownImpl {
fn NotifyRelease(&self) -> windows_core::Result<()>;
}
impl IMFVideoSampleAllocatorNotify_Vtbl {
pub const fn new<Identity: IMFVideoSampleAllocatorNotify_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn NotifyRelease<Identity: IMFVideoSampleAllocatorNotify_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoSampleAllocatorNotify_Impl::NotifyRelease(this).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), NotifyRelease: NotifyRelease::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFVideoSampleAllocatorNotify as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFVideoSampleAllocatorNotify {}
windows_core::imp::define_interface!(IMFVideoSampleAllocatorNotifyEx, IMFVideoSampleAllocatorNotifyEx_Vtbl, 0x3978aa1a_6d5b_4b7f_a340_90899189ae34);
impl core::ops::Deref for IMFVideoSampleAllocatorNotifyEx {
type Target = IMFVideoSampleAllocatorNotify;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFVideoSampleAllocatorNotifyEx, windows_core::IUnknown, IMFVideoSampleAllocatorNotify);
impl IMFVideoSampleAllocatorNotifyEx {
pub unsafe fn NotifyPrune<P0>(&self, __midl__imfvideosampleallocatornotifyex0000: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFSample>,
{
unsafe { (windows_core::Interface::vtable(self).NotifyPrune)(windows_core::Interface::as_raw(self), __midl__imfvideosampleallocatornotifyex0000.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFVideoSampleAllocatorNotifyEx_Vtbl {
pub base__: IMFVideoSampleAllocatorNotify_Vtbl,
pub NotifyPrune: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IMFVideoSampleAllocatorNotifyEx_Impl: IMFVideoSampleAllocatorNotify_Impl {
fn NotifyPrune(&self, __midl__imfvideosampleallocatornotifyex0000: windows_core::Ref<IMFSample>) -> windows_core::Result<()>;
}
impl IMFVideoSampleAllocatorNotifyEx_Vtbl {
pub const fn new<Identity: IMFVideoSampleAllocatorNotifyEx_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn NotifyPrune<Identity: IMFVideoSampleAllocatorNotifyEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, __midl__imfvideosampleallocatornotifyex0000: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVideoSampleAllocatorNotifyEx_Impl::NotifyPrune(this, core::mem::transmute_copy(&__midl__imfvideosampleallocatornotifyex0000)).into()
}
}
Self { base__: IMFVideoSampleAllocatorNotify_Vtbl::new::<Identity, OFFSET>(), NotifyPrune: NotifyPrune::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFVideoSampleAllocatorNotifyEx as windows_core::Interface>::IID || iid == &<IMFVideoSampleAllocatorNotify as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFVideoSampleAllocatorNotifyEx {}
windows_core::imp::define_interface!(IMFVirtualCamera, IMFVirtualCamera_Vtbl, 0x1c08a864_ef6c_4c75_af59_5f2d68da9563);
impl core::ops::Deref for IMFVirtualCamera {
type Target = IMFAttributes;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFVirtualCamera, windows_core::IUnknown, IMFAttributes);
impl IMFVirtualCamera {
pub unsafe fn AddDeviceSourceInfo<P0>(&self, devicesourceinfo: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).AddDeviceSourceInfo)(windows_core::Interface::as_raw(self), devicesourceinfo.param().abi()).ok() }
}
#[cfg(feature = "Win32_Devices_Properties")]
pub unsafe fn AddProperty(&self, pkey: *const super::super::Foundation::DEVPROPKEY, r#type: super::super::Devices::Properties::DEVPROPTYPE, pbdata: &[u8]) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).AddProperty)(windows_core::Interface::as_raw(self), pkey, r#type, core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap()).ok() }
}
pub unsafe fn AddRegistryEntry<P0, P1>(&self, entryname: P0, subkeypath: P1, dwregtype: u32, pbdata: &[u8]) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).AddRegistryEntry)(windows_core::Interface::as_raw(self), entryname.param().abi(), subkeypath.param().abi(), dwregtype, core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap()).ok() }
}
pub unsafe fn Start<P0>(&self, pcallback: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncCallback>,
{
unsafe { (windows_core::Interface::vtable(self).Start)(windows_core::Interface::as_raw(self), pcallback.param().abi()).ok() }
}
pub unsafe fn Stop(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn Remove(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Remove)(windows_core::Interface::as_raw(self)).ok() }
}
pub unsafe fn GetMediaSource(&self) -> windows_core::Result<IMFMediaSource> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMediaSource)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn SendCameraProperty(&self, propertyset: *const windows_core::GUID, propertyid: u32, propertyflags: u32, propertypayload: Option<*mut core::ffi::c_void>, propertypayloadlength: u32, data: Option<*mut core::ffi::c_void>, datalength: u32, datawritten: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SendCameraProperty)(windows_core::Interface::as_raw(self), propertyset, propertyid, propertyflags, propertypayload.unwrap_or(core::mem::zeroed()) as _, propertypayloadlength, data.unwrap_or(core::mem::zeroed()) as _, datalength, datawritten as _).ok() }
}
pub unsafe fn CreateSyncEvent(&self, kseventset: *const windows_core::GUID, kseventid: u32, kseventflags: u32, eventhandle: super::super::Foundation::HANDLE) -> windows_core::Result<IMFCameraSyncObject> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateSyncEvent)(windows_core::Interface::as_raw(self), kseventset, kseventid, kseventflags, eventhandle, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn CreateSyncSemaphore(&self, kseventset: *const windows_core::GUID, kseventid: u32, kseventflags: u32, semaphorehandle: super::super::Foundation::HANDLE, semaphoreadjustment: i32) -> windows_core::Result<IMFCameraSyncObject> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateSyncSemaphore)(windows_core::Interface::as_raw(self), kseventset, kseventid, kseventflags, semaphorehandle, semaphoreadjustment, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn Shutdown(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Shutdown)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFVirtualCamera_Vtbl {
pub base__: IMFAttributes_Vtbl,
pub AddDeviceSourceInfo: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR) -> windows_core::HRESULT,
#[cfg(feature = "Win32_Devices_Properties")]
pub AddProperty: unsafe extern "system" fn(*mut core::ffi::c_void, *const super::super::Foundation::DEVPROPKEY, super::super::Devices::Properties::DEVPROPTYPE, *const u8, u32) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Devices_Properties"))]
AddProperty: usize,
pub AddRegistryEntry: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, windows_core::PCWSTR, u32, *const u8, u32) -> windows_core::HRESULT,
pub Start: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Stop: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Remove: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetMediaSource: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub SendCameraProperty: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, u32, u32, *mut core::ffi::c_void, u32, *mut core::ffi::c_void, u32, *mut u32) -> windows_core::HRESULT,
pub CreateSyncEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, u32, u32, super::super::Foundation::HANDLE, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub CreateSyncSemaphore: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, u32, u32, super::super::Foundation::HANDLE, i32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Shutdown: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
#[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
pub trait IMFVirtualCamera_Impl: IMFAttributes_Impl {
fn AddDeviceSourceInfo(&self, devicesourceinfo: &windows_core::PCWSTR) -> windows_core::Result<()>;
fn AddProperty(&self, pkey: *const super::super::Foundation::DEVPROPKEY, r#type: super::super::Devices::Properties::DEVPROPTYPE, pbdata: *const u8, cbdata: u32) -> windows_core::Result<()>;
fn AddRegistryEntry(&self, entryname: &windows_core::PCWSTR, subkeypath: &windows_core::PCWSTR, dwregtype: u32, pbdata: *const u8, cbdata: u32) -> windows_core::Result<()>;
fn Start(&self, pcallback: windows_core::Ref<IMFAsyncCallback>) -> windows_core::Result<()>;
fn Stop(&self) -> windows_core::Result<()>;
fn Remove(&self) -> windows_core::Result<()>;
fn GetMediaSource(&self) -> windows_core::Result<IMFMediaSource>;
fn SendCameraProperty(&self, propertyset: *const windows_core::GUID, propertyid: u32, propertyflags: u32, propertypayload: *mut core::ffi::c_void, propertypayloadlength: u32, data: *mut core::ffi::c_void, datalength: u32, datawritten: *mut u32) -> windows_core::Result<()>;
fn CreateSyncEvent(&self, kseventset: *const windows_core::GUID, kseventid: u32, kseventflags: u32, eventhandle: super::super::Foundation::HANDLE) -> windows_core::Result<IMFCameraSyncObject>;
fn CreateSyncSemaphore(&self, kseventset: *const windows_core::GUID, kseventid: u32, kseventflags: u32, semaphorehandle: super::super::Foundation::HANDLE, semaphoreadjustment: i32) -> windows_core::Result<IMFCameraSyncObject>;
fn Shutdown(&self) -> windows_core::Result<()>;
}
#[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl IMFVirtualCamera_Vtbl {
pub const fn new<Identity: IMFVirtualCamera_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn AddDeviceSourceInfo<Identity: IMFVirtualCamera_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, devicesourceinfo: windows_core::PCWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVirtualCamera_Impl::AddDeviceSourceInfo(this, core::mem::transmute(&devicesourceinfo)).into()
}
}
unsafe extern "system" fn AddProperty<Identity: IMFVirtualCamera_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pkey: *const super::super::Foundation::DEVPROPKEY, r#type: super::super::Devices::Properties::DEVPROPTYPE, pbdata: *const u8, cbdata: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVirtualCamera_Impl::AddProperty(this, core::mem::transmute_copy(&pkey), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&pbdata), core::mem::transmute_copy(&cbdata)).into()
}
}
unsafe extern "system" fn AddRegistryEntry<Identity: IMFVirtualCamera_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, entryname: windows_core::PCWSTR, subkeypath: windows_core::PCWSTR, dwregtype: u32, pbdata: *const u8, cbdata: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVirtualCamera_Impl::AddRegistryEntry(this, core::mem::transmute(&entryname), core::mem::transmute(&subkeypath), core::mem::transmute_copy(&dwregtype), core::mem::transmute_copy(&pbdata), core::mem::transmute_copy(&cbdata)).into()
}
}
unsafe extern "system" fn Start<Identity: IMFVirtualCamera_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVirtualCamera_Impl::Start(this, core::mem::transmute_copy(&pcallback)).into()
}
}
unsafe extern "system" fn Stop<Identity: IMFVirtualCamera_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVirtualCamera_Impl::Stop(this).into()
}
}
unsafe extern "system" fn Remove<Identity: IMFVirtualCamera_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVirtualCamera_Impl::Remove(this).into()
}
}
unsafe extern "system" fn GetMediaSource<Identity: IMFVirtualCamera_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ppmediasource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFVirtualCamera_Impl::GetMediaSource(this) {
Ok(ok__) => {
ppmediasource.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SendCameraProperty<Identity: IMFVirtualCamera_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, propertyset: *const windows_core::GUID, propertyid: u32, propertyflags: u32, propertypayload: *mut core::ffi::c_void, propertypayloadlength: u32, data: *mut core::ffi::c_void, datalength: u32, datawritten: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVirtualCamera_Impl::SendCameraProperty(this, core::mem::transmute_copy(&propertyset), core::mem::transmute_copy(&propertyid), core::mem::transmute_copy(&propertyflags), core::mem::transmute_copy(&propertypayload), core::mem::transmute_copy(&propertypayloadlength), core::mem::transmute_copy(&data), core::mem::transmute_copy(&datalength), core::mem::transmute_copy(&datawritten)).into()
}
}
unsafe extern "system" fn CreateSyncEvent<Identity: IMFVirtualCamera_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, kseventset: *const windows_core::GUID, kseventid: u32, kseventflags: u32, eventhandle: super::super::Foundation::HANDLE, camerasyncobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFVirtualCamera_Impl::CreateSyncEvent(this, core::mem::transmute_copy(&kseventset), core::mem::transmute_copy(&kseventid), core::mem::transmute_copy(&kseventflags), core::mem::transmute_copy(&eventhandle)) {
Ok(ok__) => {
camerasyncobject.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn CreateSyncSemaphore<Identity: IMFVirtualCamera_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, kseventset: *const windows_core::GUID, kseventid: u32, kseventflags: u32, semaphorehandle: super::super::Foundation::HANDLE, semaphoreadjustment: i32, camerasyncobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFVirtualCamera_Impl::CreateSyncSemaphore(this, core::mem::transmute_copy(&kseventset), core::mem::transmute_copy(&kseventid), core::mem::transmute_copy(&kseventflags), core::mem::transmute_copy(&semaphorehandle), core::mem::transmute_copy(&semaphoreadjustment)) {
Ok(ok__) => {
camerasyncobject.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Shutdown<Identity: IMFVirtualCamera_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFVirtualCamera_Impl::Shutdown(this).into()
}
}
Self {
base__: IMFAttributes_Vtbl::new::<Identity, OFFSET>(),
AddDeviceSourceInfo: AddDeviceSourceInfo::<Identity, OFFSET>,
AddProperty: AddProperty::<Identity, OFFSET>,
AddRegistryEntry: AddRegistryEntry::<Identity, OFFSET>,
Start: Start::<Identity, OFFSET>,
Stop: Stop::<Identity, OFFSET>,
Remove: Remove::<Identity, OFFSET>,
GetMediaSource: GetMediaSource::<Identity, OFFSET>,
SendCameraProperty: SendCameraProperty::<Identity, OFFSET>,
CreateSyncEvent: CreateSyncEvent::<Identity, OFFSET>,
CreateSyncSemaphore: CreateSyncSemaphore::<Identity, OFFSET>,
Shutdown: Shutdown::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFVirtualCamera as windows_core::Interface>::IID || iid == &<IMFAttributes as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))]
impl windows_core::RuntimeName for IMFVirtualCamera {}
windows_core::imp::define_interface!(IMFWorkQueueServices, IMFWorkQueueServices_Vtbl, 0x35fe1bb8_a3a9_40fe_bbec_eb569c9ccca3);
windows_core::imp::interface_hierarchy!(IMFWorkQueueServices, windows_core::IUnknown);
impl IMFWorkQueueServices {
pub unsafe fn BeginRegisterTopologyWorkQueuesWithMMCSS<P0, P1>(&self, pcallback: P0, pstate: P1) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncCallback>,
P1: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).BeginRegisterTopologyWorkQueuesWithMMCSS)(windows_core::Interface::as_raw(self), pcallback.param().abi(), pstate.param().abi()).ok() }
}
pub unsafe fn EndRegisterTopologyWorkQueuesWithMMCSS<P0>(&self, presult: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncResult>,
{
unsafe { (windows_core::Interface::vtable(self).EndRegisterTopologyWorkQueuesWithMMCSS)(windows_core::Interface::as_raw(self), presult.param().abi()).ok() }
}
pub unsafe fn BeginUnregisterTopologyWorkQueuesWithMMCSS<P0, P1>(&self, pcallback: P0, pstate: P1) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncCallback>,
P1: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).BeginUnregisterTopologyWorkQueuesWithMMCSS)(windows_core::Interface::as_raw(self), pcallback.param().abi(), pstate.param().abi()).ok() }
}
pub unsafe fn EndUnregisterTopologyWorkQueuesWithMMCSS<P0>(&self, presult: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncResult>,
{
unsafe { (windows_core::Interface::vtable(self).EndUnregisterTopologyWorkQueuesWithMMCSS)(windows_core::Interface::as_raw(self), presult.param().abi()).ok() }
}
pub unsafe fn GetTopologyWorkQueueMMCSSClass(&self, dwtopologyworkqueueid: u32, pwszclass: windows_core::PWSTR, pcchclass: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetTopologyWorkQueueMMCSSClass)(windows_core::Interface::as_raw(self), dwtopologyworkqueueid, core::mem::transmute(pwszclass), pcchclass as _).ok() }
}
pub unsafe fn GetTopologyWorkQueueMMCSSTaskId(&self, dwtopologyworkqueueid: u32) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetTopologyWorkQueueMMCSSTaskId)(windows_core::Interface::as_raw(self), dwtopologyworkqueueid, &mut result__).map(|| result__)
}
}
pub unsafe fn BeginRegisterPlatformWorkQueueWithMMCSS<P1, P3, P4>(&self, dwplatformworkqueue: u32, wszclass: P1, dwtaskid: u32, pcallback: P3, pstate: P4) -> windows_core::Result<()>
where
P1: windows_core::Param<windows_core::PCWSTR>,
P3: windows_core::Param<IMFAsyncCallback>,
P4: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).BeginRegisterPlatformWorkQueueWithMMCSS)(windows_core::Interface::as_raw(self), dwplatformworkqueue, wszclass.param().abi(), dwtaskid, pcallback.param().abi(), pstate.param().abi()).ok() }
}
pub unsafe fn EndRegisterPlatformWorkQueueWithMMCSS<P0>(&self, presult: P0) -> windows_core::Result<u32>
where
P0: windows_core::Param<IMFAsyncResult>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EndRegisterPlatformWorkQueueWithMMCSS)(windows_core::Interface::as_raw(self), presult.param().abi(), &mut result__).map(|| result__)
}
}
pub unsafe fn BeginUnregisterPlatformWorkQueueWithMMCSS<P1, P2>(&self, dwplatformworkqueue: u32, pcallback: P1, pstate: P2) -> windows_core::Result<()>
where
P1: windows_core::Param<IMFAsyncCallback>,
P2: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).BeginUnregisterPlatformWorkQueueWithMMCSS)(windows_core::Interface::as_raw(self), dwplatformworkqueue, pcallback.param().abi(), pstate.param().abi()).ok() }
}
pub unsafe fn EndUnregisterPlatformWorkQueueWithMMCSS<P0>(&self, presult: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFAsyncResult>,
{
unsafe { (windows_core::Interface::vtable(self).EndUnregisterPlatformWorkQueueWithMMCSS)(windows_core::Interface::as_raw(self), presult.param().abi()).ok() }
}
pub unsafe fn GetPlaftormWorkQueueMMCSSClass(&self, dwplatformworkqueueid: u32, pwszclass: windows_core::PWSTR, pcchclass: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetPlaftormWorkQueueMMCSSClass)(windows_core::Interface::as_raw(self), dwplatformworkqueueid, core::mem::transmute(pwszclass), pcchclass as _).ok() }
}
pub unsafe fn GetPlatformWorkQueueMMCSSTaskId(&self, dwplatformworkqueueid: u32) -> windows_core::Result<u32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetPlatformWorkQueueMMCSSTaskId)(windows_core::Interface::as_raw(self), dwplatformworkqueueid, &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFWorkQueueServices_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub BeginRegisterTopologyWorkQueuesWithMMCSS: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub EndRegisterTopologyWorkQueuesWithMMCSS: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub BeginUnregisterTopologyWorkQueuesWithMMCSS: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub EndUnregisterTopologyWorkQueuesWithMMCSS: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetTopologyWorkQueueMMCSSClass: unsafe extern "system" fn(*mut core::ffi::c_void, u32, windows_core::PWSTR, *mut u32) -> windows_core::HRESULT,
pub GetTopologyWorkQueueMMCSSTaskId: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u32) -> windows_core::HRESULT,
pub BeginRegisterPlatformWorkQueueWithMMCSS: unsafe extern "system" fn(*mut core::ffi::c_void, u32, windows_core::PCWSTR, u32, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub EndRegisterPlatformWorkQueueWithMMCSS: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub BeginUnregisterPlatformWorkQueueWithMMCSS: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub EndUnregisterPlatformWorkQueueWithMMCSS: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetPlaftormWorkQueueMMCSSClass: unsafe extern "system" fn(*mut core::ffi::c_void, u32, windows_core::PWSTR, *mut u32) -> windows_core::HRESULT,
pub GetPlatformWorkQueueMMCSSTaskId: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u32) -> windows_core::HRESULT,
}
pub trait IMFWorkQueueServices_Impl: windows_core::IUnknownImpl {
fn BeginRegisterTopologyWorkQueuesWithMMCSS(&self, pcallback: windows_core::Ref<IMFAsyncCallback>, pstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn EndRegisterTopologyWorkQueuesWithMMCSS(&self, presult: windows_core::Ref<IMFAsyncResult>) -> windows_core::Result<()>;
fn BeginUnregisterTopologyWorkQueuesWithMMCSS(&self, pcallback: windows_core::Ref<IMFAsyncCallback>, pstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn EndUnregisterTopologyWorkQueuesWithMMCSS(&self, presult: windows_core::Ref<IMFAsyncResult>) -> windows_core::Result<()>;
fn GetTopologyWorkQueueMMCSSClass(&self, dwtopologyworkqueueid: u32, pwszclass: windows_core::PWSTR, pcchclass: *mut u32) -> windows_core::Result<()>;
fn GetTopologyWorkQueueMMCSSTaskId(&self, dwtopologyworkqueueid: u32) -> windows_core::Result<u32>;
fn BeginRegisterPlatformWorkQueueWithMMCSS(&self, dwplatformworkqueue: u32, wszclass: &windows_core::PCWSTR, dwtaskid: u32, pcallback: windows_core::Ref<IMFAsyncCallback>, pstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn EndRegisterPlatformWorkQueueWithMMCSS(&self, presult: windows_core::Ref<IMFAsyncResult>) -> windows_core::Result<u32>;
fn BeginUnregisterPlatformWorkQueueWithMMCSS(&self, dwplatformworkqueue: u32, pcallback: windows_core::Ref<IMFAsyncCallback>, pstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn EndUnregisterPlatformWorkQueueWithMMCSS(&self, presult: windows_core::Ref<IMFAsyncResult>) -> windows_core::Result<()>;
fn GetPlaftormWorkQueueMMCSSClass(&self, dwplatformworkqueueid: u32, pwszclass: windows_core::PWSTR, pcchclass: *mut u32) -> windows_core::Result<()>;
fn GetPlatformWorkQueueMMCSSTaskId(&self, dwplatformworkqueueid: u32) -> windows_core::Result<u32>;
}
impl IMFWorkQueueServices_Vtbl {
pub const fn new<Identity: IMFWorkQueueServices_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginRegisterTopologyWorkQueuesWithMMCSS<Identity: IMFWorkQueueServices_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, pstate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFWorkQueueServices_Impl::BeginRegisterTopologyWorkQueuesWithMMCSS(this, core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pstate)).into()
}
}
unsafe extern "system" fn EndRegisterTopologyWorkQueuesWithMMCSS<Identity: IMFWorkQueueServices_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFWorkQueueServices_Impl::EndRegisterTopologyWorkQueuesWithMMCSS(this, core::mem::transmute_copy(&presult)).into()
}
}
unsafe extern "system" fn BeginUnregisterTopologyWorkQueuesWithMMCSS<Identity: IMFWorkQueueServices_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, pstate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFWorkQueueServices_Impl::BeginUnregisterTopologyWorkQueuesWithMMCSS(this, core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pstate)).into()
}
}
unsafe extern "system" fn EndUnregisterTopologyWorkQueuesWithMMCSS<Identity: IMFWorkQueueServices_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFWorkQueueServices_Impl::EndUnregisterTopologyWorkQueuesWithMMCSS(this, core::mem::transmute_copy(&presult)).into()
}
}
unsafe extern "system" fn GetTopologyWorkQueueMMCSSClass<Identity: IMFWorkQueueServices_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwtopologyworkqueueid: u32, pwszclass: windows_core::PWSTR, pcchclass: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFWorkQueueServices_Impl::GetTopologyWorkQueueMMCSSClass(this, core::mem::transmute_copy(&dwtopologyworkqueueid), core::mem::transmute_copy(&pwszclass), core::mem::transmute_copy(&pcchclass)).into()
}
}
unsafe extern "system" fn GetTopologyWorkQueueMMCSSTaskId<Identity: IMFWorkQueueServices_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwtopologyworkqueueid: u32, pdwtaskid: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFWorkQueueServices_Impl::GetTopologyWorkQueueMMCSSTaskId(this, core::mem::transmute_copy(&dwtopologyworkqueueid)) {
Ok(ok__) => {
pdwtaskid.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn BeginRegisterPlatformWorkQueueWithMMCSS<Identity: IMFWorkQueueServices_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwplatformworkqueue: u32, wszclass: windows_core::PCWSTR, dwtaskid: u32, pcallback: *mut core::ffi::c_void, pstate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFWorkQueueServices_Impl::BeginRegisterPlatformWorkQueueWithMMCSS(this, core::mem::transmute_copy(&dwplatformworkqueue), core::mem::transmute(&wszclass), core::mem::transmute_copy(&dwtaskid), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pstate)).into()
}
}
unsafe extern "system" fn EndRegisterPlatformWorkQueueWithMMCSS<Identity: IMFWorkQueueServices_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, pdwtaskid: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFWorkQueueServices_Impl::EndRegisterPlatformWorkQueueWithMMCSS(this, core::mem::transmute_copy(&presult)) {
Ok(ok__) => {
pdwtaskid.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn BeginUnregisterPlatformWorkQueueWithMMCSS<Identity: IMFWorkQueueServices_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwplatformworkqueue: u32, pcallback: *mut core::ffi::c_void, pstate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFWorkQueueServices_Impl::BeginUnregisterPlatformWorkQueueWithMMCSS(this, core::mem::transmute_copy(&dwplatformworkqueue), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pstate)).into()
}
}
unsafe extern "system" fn EndUnregisterPlatformWorkQueueWithMMCSS<Identity: IMFWorkQueueServices_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFWorkQueueServices_Impl::EndUnregisterPlatformWorkQueueWithMMCSS(this, core::mem::transmute_copy(&presult)).into()
}
}
unsafe extern "system" fn GetPlaftormWorkQueueMMCSSClass<Identity: IMFWorkQueueServices_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwplatformworkqueueid: u32, pwszclass: windows_core::PWSTR, pcchclass: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFWorkQueueServices_Impl::GetPlaftormWorkQueueMMCSSClass(this, core::mem::transmute_copy(&dwplatformworkqueueid), core::mem::transmute_copy(&pwszclass), core::mem::transmute_copy(&pcchclass)).into()
}
}
unsafe extern "system" fn GetPlatformWorkQueueMMCSSTaskId<Identity: IMFWorkQueueServices_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwplatformworkqueueid: u32, pdwtaskid: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFWorkQueueServices_Impl::GetPlatformWorkQueueMMCSSTaskId(this, core::mem::transmute_copy(&dwplatformworkqueueid)) {
Ok(ok__) => {
pdwtaskid.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginRegisterTopologyWorkQueuesWithMMCSS: BeginRegisterTopologyWorkQueuesWithMMCSS::<Identity, OFFSET>,
EndRegisterTopologyWorkQueuesWithMMCSS: EndRegisterTopologyWorkQueuesWithMMCSS::<Identity, OFFSET>,
BeginUnregisterTopologyWorkQueuesWithMMCSS: BeginUnregisterTopologyWorkQueuesWithMMCSS::<Identity, OFFSET>,
EndUnregisterTopologyWorkQueuesWithMMCSS: EndUnregisterTopologyWorkQueuesWithMMCSS::<Identity, OFFSET>,
GetTopologyWorkQueueMMCSSClass: GetTopologyWorkQueueMMCSSClass::<Identity, OFFSET>,
GetTopologyWorkQueueMMCSSTaskId: GetTopologyWorkQueueMMCSSTaskId::<Identity, OFFSET>,
BeginRegisterPlatformWorkQueueWithMMCSS: BeginRegisterPlatformWorkQueueWithMMCSS::<Identity, OFFSET>,
EndRegisterPlatformWorkQueueWithMMCSS: EndRegisterPlatformWorkQueueWithMMCSS::<Identity, OFFSET>,
BeginUnregisterPlatformWorkQueueWithMMCSS: BeginUnregisterPlatformWorkQueueWithMMCSS::<Identity, OFFSET>,
EndUnregisterPlatformWorkQueueWithMMCSS: EndUnregisterPlatformWorkQueueWithMMCSS::<Identity, OFFSET>,
GetPlaftormWorkQueueMMCSSClass: GetPlaftormWorkQueueMMCSSClass::<Identity, OFFSET>,
GetPlatformWorkQueueMMCSSTaskId: GetPlatformWorkQueueMMCSSTaskId::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFWorkQueueServices as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFWorkQueueServices {}
windows_core::imp::define_interface!(IMFWorkQueueServicesEx, IMFWorkQueueServicesEx_Vtbl, 0x96bf961b_40fe_42f1_ba9d_320238b49700);
impl core::ops::Deref for IMFWorkQueueServicesEx {
type Target = IMFWorkQueueServices;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IMFWorkQueueServicesEx, windows_core::IUnknown, IMFWorkQueueServices);
impl IMFWorkQueueServicesEx {
pub unsafe fn GetTopologyWorkQueueMMCSSPriority(&self, dwtopologyworkqueueid: u32) -> windows_core::Result<i32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetTopologyWorkQueueMMCSSPriority)(windows_core::Interface::as_raw(self), dwtopologyworkqueueid, &mut result__).map(|| result__)
}
}
pub unsafe fn BeginRegisterPlatformWorkQueueWithMMCSSEx<P1, P4, P5>(&self, dwplatformworkqueue: u32, wszclass: P1, dwtaskid: u32, lpriority: i32, pcallback: P4, pstate: P5) -> windows_core::Result<()>
where
P1: windows_core::Param<windows_core::PCWSTR>,
P4: windows_core::Param<IMFAsyncCallback>,
P5: windows_core::Param<windows_core::IUnknown>,
{
unsafe { (windows_core::Interface::vtable(self).BeginRegisterPlatformWorkQueueWithMMCSSEx)(windows_core::Interface::as_raw(self), dwplatformworkqueue, wszclass.param().abi(), dwtaskid, lpriority, pcallback.param().abi(), pstate.param().abi()).ok() }
}
pub unsafe fn GetPlatformWorkQueueMMCSSPriority(&self, dwplatformworkqueueid: u32) -> windows_core::Result<i32> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetPlatformWorkQueueMMCSSPriority)(windows_core::Interface::as_raw(self), dwplatformworkqueueid, &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IMFWorkQueueServicesEx_Vtbl {
pub base__: IMFWorkQueueServices_Vtbl,
pub GetTopologyWorkQueueMMCSSPriority: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut i32) -> windows_core::HRESULT,
pub BeginRegisterPlatformWorkQueueWithMMCSSEx: unsafe extern "system" fn(*mut core::ffi::c_void, u32, windows_core::PCWSTR, u32, i32, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetPlatformWorkQueueMMCSSPriority: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut i32) -> windows_core::HRESULT,
}
pub trait IMFWorkQueueServicesEx_Impl: IMFWorkQueueServices_Impl {
fn GetTopologyWorkQueueMMCSSPriority(&self, dwtopologyworkqueueid: u32) -> windows_core::Result<i32>;
fn BeginRegisterPlatformWorkQueueWithMMCSSEx(&self, dwplatformworkqueue: u32, wszclass: &windows_core::PCWSTR, dwtaskid: u32, lpriority: i32, pcallback: windows_core::Ref<IMFAsyncCallback>, pstate: windows_core::Ref<windows_core::IUnknown>) -> windows_core::Result<()>;
fn GetPlatformWorkQueueMMCSSPriority(&self, dwplatformworkqueueid: u32) -> windows_core::Result<i32>;
}
impl IMFWorkQueueServicesEx_Vtbl {
pub const fn new<Identity: IMFWorkQueueServicesEx_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetTopologyWorkQueueMMCSSPriority<Identity: IMFWorkQueueServicesEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwtopologyworkqueueid: u32, plpriority: *mut i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFWorkQueueServicesEx_Impl::GetTopologyWorkQueueMMCSSPriority(this, core::mem::transmute_copy(&dwtopologyworkqueueid)) {
Ok(ok__) => {
plpriority.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn BeginRegisterPlatformWorkQueueWithMMCSSEx<Identity: IMFWorkQueueServicesEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwplatformworkqueue: u32, wszclass: windows_core::PCWSTR, dwtaskid: u32, lpriority: i32, pcallback: *mut core::ffi::c_void, pstate: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IMFWorkQueueServicesEx_Impl::BeginRegisterPlatformWorkQueueWithMMCSSEx(this, core::mem::transmute_copy(&dwplatformworkqueue), core::mem::transmute(&wszclass), core::mem::transmute_copy(&dwtaskid), core::mem::transmute_copy(&lpriority), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pstate)).into()
}
}
unsafe extern "system" fn GetPlatformWorkQueueMMCSSPriority<Identity: IMFWorkQueueServicesEx_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwplatformworkqueueid: u32, plpriority: *mut i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IMFWorkQueueServicesEx_Impl::GetPlatformWorkQueueMMCSSPriority(this, core::mem::transmute_copy(&dwplatformworkqueueid)) {
Ok(ok__) => {
plpriority.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IMFWorkQueueServices_Vtbl::new::<Identity, OFFSET>(),
GetTopologyWorkQueueMMCSSPriority: GetTopologyWorkQueueMMCSSPriority::<Identity, OFFSET>,
BeginRegisterPlatformWorkQueueWithMMCSSEx: BeginRegisterPlatformWorkQueueWithMMCSSEx::<Identity, OFFSET>,
GetPlatformWorkQueueMMCSSPriority: GetPlatformWorkQueueMMCSSPriority::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IMFWorkQueueServicesEx as windows_core::Interface>::IID || iid == &<IMFWorkQueueServices as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IMFWorkQueueServicesEx {}
windows_core::imp::define_interface!(IOPMVideoOutput, IOPMVideoOutput_Vtbl, 0x0a15159d_41c7_4456_93e1_284cd61d4e8d);
windows_core::imp::interface_hierarchy!(IOPMVideoOutput, windows_core::IUnknown);
impl IOPMVideoOutput {
pub unsafe fn StartInitialization(&self, prnrandomnumber: *mut OPM_RANDOM_NUMBER, ppbcertificate: *mut *mut u8, pulcertificatelength: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).StartInitialization)(windows_core::Interface::as_raw(self), prnrandomnumber as _, ppbcertificate as _, pulcertificatelength as _).ok() }
}
pub unsafe fn FinishInitialization(&self, pparameters: *const OPM_ENCRYPTED_INITIALIZATION_PARAMETERS) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).FinishInitialization)(windows_core::Interface::as_raw(self), pparameters).ok() }
}
pub unsafe fn GetInformation(&self, pparameters: *const OPM_GET_INFO_PARAMETERS, prequestedinformation: *mut OPM_REQUESTED_INFORMATION) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetInformation)(windows_core::Interface::as_raw(self), pparameters, prequestedinformation as _).ok() }
}
pub unsafe fn COPPCompatibleGetInformation(&self, pparameters: *const OPM_COPP_COMPATIBLE_GET_INFO_PARAMETERS, prequestedinformation: *mut OPM_REQUESTED_INFORMATION) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).COPPCompatibleGetInformation)(windows_core::Interface::as_raw(self), pparameters, prequestedinformation as _).ok() }
}
pub unsafe fn Configure(&self, pparameters: *const OPM_CONFIGURE_PARAMETERS, pbadditionalparameters: Option<&[u8]>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Configure)(windows_core::Interface::as_raw(self), pparameters, pbadditionalparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pbadditionalparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IOPMVideoOutput_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub StartInitialization: unsafe extern "system" fn(*mut core::ffi::c_void, *mut OPM_RANDOM_NUMBER, *mut *mut u8, *mut u32) -> windows_core::HRESULT,
pub FinishInitialization: unsafe extern "system" fn(*mut core::ffi::c_void, *const OPM_ENCRYPTED_INITIALIZATION_PARAMETERS) -> windows_core::HRESULT,
pub GetInformation: unsafe extern "system" fn(*mut core::ffi::c_void, *const OPM_GET_INFO_PARAMETERS, *mut OPM_REQUESTED_INFORMATION) -> windows_core::HRESULT,
pub COPPCompatibleGetInformation: unsafe extern "system" fn(*mut core::ffi::c_void, *const OPM_COPP_COMPATIBLE_GET_INFO_PARAMETERS, *mut OPM_REQUESTED_INFORMATION) -> windows_core::HRESULT,
pub Configure: unsafe extern "system" fn(*mut core::ffi::c_void, *const OPM_CONFIGURE_PARAMETERS, u32, *const u8) -> windows_core::HRESULT,
}
pub trait IOPMVideoOutput_Impl: windows_core::IUnknownImpl {
fn StartInitialization(&self, prnrandomnumber: *mut OPM_RANDOM_NUMBER, ppbcertificate: *mut *mut u8, pulcertificatelength: *mut u32) -> windows_core::Result<()>;
fn FinishInitialization(&self, pparameters: *const OPM_ENCRYPTED_INITIALIZATION_PARAMETERS) -> windows_core::Result<()>;
fn GetInformation(&self, pparameters: *const OPM_GET_INFO_PARAMETERS, prequestedinformation: *mut OPM_REQUESTED_INFORMATION) -> windows_core::Result<()>;
fn COPPCompatibleGetInformation(&self, pparameters: *const OPM_COPP_COMPATIBLE_GET_INFO_PARAMETERS, prequestedinformation: *mut OPM_REQUESTED_INFORMATION) -> windows_core::Result<()>;
fn Configure(&self, pparameters: *const OPM_CONFIGURE_PARAMETERS, uladditionalparameterssize: u32, pbadditionalparameters: *const u8) -> windows_core::Result<()>;
}
impl IOPMVideoOutput_Vtbl {
pub const fn new<Identity: IOPMVideoOutput_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn StartInitialization<Identity: IOPMVideoOutput_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, prnrandomnumber: *mut OPM_RANDOM_NUMBER, ppbcertificate: *mut *mut u8, pulcertificatelength: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IOPMVideoOutput_Impl::StartInitialization(this, core::mem::transmute_copy(&prnrandomnumber), core::mem::transmute_copy(&ppbcertificate), core::mem::transmute_copy(&pulcertificatelength)).into()
}
}
unsafe extern "system" fn FinishInitialization<Identity: IOPMVideoOutput_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pparameters: *const OPM_ENCRYPTED_INITIALIZATION_PARAMETERS) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IOPMVideoOutput_Impl::FinishInitialization(this, core::mem::transmute_copy(&pparameters)).into()
}
}
unsafe extern "system" fn GetInformation<Identity: IOPMVideoOutput_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pparameters: *const OPM_GET_INFO_PARAMETERS, prequestedinformation: *mut OPM_REQUESTED_INFORMATION) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IOPMVideoOutput_Impl::GetInformation(this, core::mem::transmute_copy(&pparameters), core::mem::transmute_copy(&prequestedinformation)).into()
}
}
unsafe extern "system" fn COPPCompatibleGetInformation<Identity: IOPMVideoOutput_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pparameters: *const OPM_COPP_COMPATIBLE_GET_INFO_PARAMETERS, prequestedinformation: *mut OPM_REQUESTED_INFORMATION) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IOPMVideoOutput_Impl::COPPCompatibleGetInformation(this, core::mem::transmute_copy(&pparameters), core::mem::transmute_copy(&prequestedinformation)).into()
}
}
unsafe extern "system" fn Configure<Identity: IOPMVideoOutput_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pparameters: *const OPM_CONFIGURE_PARAMETERS, uladditionalparameterssize: u32, pbadditionalparameters: *const u8) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IOPMVideoOutput_Impl::Configure(this, core::mem::transmute_copy(&pparameters), core::mem::transmute_copy(&uladditionalparameterssize), core::mem::transmute_copy(&pbadditionalparameters)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
StartInitialization: StartInitialization::<Identity, OFFSET>,
FinishInitialization: FinishInitialization::<Identity, OFFSET>,
GetInformation: GetInformation::<Identity, OFFSET>,
COPPCompatibleGetInformation: COPPCompatibleGetInformation::<Identity, OFFSET>,
Configure: Configure::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IOPMVideoOutput as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IOPMVideoOutput {}
windows_core::imp::define_interface!(IPlayToControl, IPlayToControl_Vtbl, 0x607574eb_f4b6_45c1_b08c_cb715122901d);
windows_core::imp::interface_hierarchy!(IPlayToControl, windows_core::IUnknown);
impl IPlayToControl {
pub unsafe fn Connect<P0>(&self, pfactory: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<IMFSharingEngineClassFactory>,
{
unsafe { (windows_core::Interface::vtable(self).Connect)(windows_core::Interface::as_raw(self), pfactory.param().abi()).ok() }
}
pub unsafe fn Disconnect(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Disconnect)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPlayToControl_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub Connect: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub Disconnect: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IPlayToControl_Impl: windows_core::IUnknownImpl {
fn Connect(&self, pfactory: windows_core::Ref<IMFSharingEngineClassFactory>) -> windows_core::Result<()>;
fn Disconnect(&self) -> windows_core::Result<()>;
}
impl IPlayToControl_Vtbl {
pub const fn new<Identity: IPlayToControl_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Connect<Identity: IPlayToControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pfactory: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IPlayToControl_Impl::Connect(this, core::mem::transmute_copy(&pfactory)).into()
}
}
unsafe extern "system" fn Disconnect<Identity: IPlayToControl_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IPlayToControl_Impl::Disconnect(this).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), Connect: Connect::<Identity, OFFSET>, Disconnect: Disconnect::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IPlayToControl as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IPlayToControl {}
windows_core::imp::define_interface!(IPlayToControlWithCapabilities, IPlayToControlWithCapabilities_Vtbl, 0xaa9dd80f_c50a_4220_91c1_332287f82a34);
impl core::ops::Deref for IPlayToControlWithCapabilities {
type Target = IPlayToControl;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IPlayToControlWithCapabilities, windows_core::IUnknown, IPlayToControl);
impl IPlayToControlWithCapabilities {
pub unsafe fn GetCapabilities(&self) -> windows_core::Result<PLAYTO_SOURCE_CREATEFLAGS> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetCapabilities)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPlayToControlWithCapabilities_Vtbl {
pub base__: IPlayToControl_Vtbl,
pub GetCapabilities: unsafe extern "system" fn(*mut core::ffi::c_void, *mut PLAYTO_SOURCE_CREATEFLAGS) -> windows_core::HRESULT,
}
pub trait IPlayToControlWithCapabilities_Impl: IPlayToControl_Impl {
fn GetCapabilities(&self) -> windows_core::Result<PLAYTO_SOURCE_CREATEFLAGS>;
}
impl IPlayToControlWithCapabilities_Vtbl {
pub const fn new<Identity: IPlayToControlWithCapabilities_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetCapabilities<Identity: IPlayToControlWithCapabilities_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pcapabilities: *mut PLAYTO_SOURCE_CREATEFLAGS) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IPlayToControlWithCapabilities_Impl::GetCapabilities(this) {
Ok(ok__) => {
pcapabilities.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: IPlayToControl_Vtbl::new::<Identity, OFFSET>(), GetCapabilities: GetCapabilities::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IPlayToControlWithCapabilities as windows_core::Interface>::IID || iid == &<IPlayToControl as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IPlayToControlWithCapabilities {}
windows_core::imp::define_interface!(IPlayToSourceClassFactory, IPlayToSourceClassFactory_Vtbl, 0x842b32a3_9b9b_4d1c_b3f3_49193248a554);
windows_core::imp::interface_hierarchy!(IPlayToSourceClassFactory, windows_core::IUnknown);
impl IPlayToSourceClassFactory {
pub unsafe fn CreateInstance<P1>(&self, dwflags: u32, pcontrol: P1) -> windows_core::Result<windows_core::IInspectable>
where
P1: windows_core::Param<IPlayToControl>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateInstance)(windows_core::Interface::as_raw(self), dwflags, pcontrol.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IPlayToSourceClassFactory_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub CreateInstance: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IPlayToSourceClassFactory_Impl: windows_core::IUnknownImpl {
fn CreateInstance(&self, dwflags: u32, pcontrol: windows_core::Ref<IPlayToControl>) -> windows_core::Result<windows_core::IInspectable>;
}
impl IPlayToSourceClassFactory_Vtbl {
pub const fn new<Identity: IPlayToSourceClassFactory_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateInstance<Identity: IPlayToSourceClassFactory_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwflags: u32, pcontrol: *mut core::ffi::c_void, ppsource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IPlayToSourceClassFactory_Impl::CreateInstance(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pcontrol)) {
Ok(ok__) => {
ppsource.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), CreateInstance: CreateInstance::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IPlayToSourceClassFactory as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IPlayToSourceClassFactory {}
windows_core::imp::define_interface!(IToc, IToc_Vtbl, 0xd6f05441_a919_423b_91a0_89d5b4a8ab77);
windows_core::imp::interface_hierarchy!(IToc, windows_core::IUnknown);
impl IToc {
pub unsafe fn SetDescriptor(&self, pdescriptor: *mut TOC_DESCRIPTOR) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetDescriptor)(windows_core::Interface::as_raw(self), pdescriptor as _).ok() }
}
pub unsafe fn GetDescriptor(&self, pdescriptor: *mut TOC_DESCRIPTOR) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetDescriptor)(windows_core::Interface::as_raw(self), pdescriptor as _).ok() }
}
pub unsafe fn SetDescription<P0>(&self, pwszdescription: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).SetDescription)(windows_core::Interface::as_raw(self), pwszdescription.param().abi()).ok() }
}
pub unsafe fn GetDescription(&self, pwdescriptionsize: *mut u16, pwszdescription: Option<windows_core::PWSTR>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetDescription)(windows_core::Interface::as_raw(self), pwdescriptionsize as _, pwszdescription.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn SetContext(&self, dwcontextsize: u32, pbtcontext: *mut u8) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetContext)(windows_core::Interface::as_raw(self), dwcontextsize, pbtcontext as _).ok() }
}
pub unsafe fn GetContext(&self, pdwcontextsize: *mut u32, pbtcontext: *mut u8) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetContext)(windows_core::Interface::as_raw(self), pdwcontextsize as _, pbtcontext as _).ok() }
}
pub unsafe fn GetEntryListCount(&self, pwcount: *mut u16) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetEntryListCount)(windows_core::Interface::as_raw(self), pwcount as _).ok() }
}
pub unsafe fn GetEntryListByIndex(&self, wentrylistindex: u16) -> windows_core::Result<ITocEntryList> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetEntryListByIndex)(windows_core::Interface::as_raw(self), wentrylistindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn AddEntryList<P0>(&self, pentrylist: P0, pwentrylistindex: *mut u16) -> windows_core::Result<()>
where
P0: windows_core::Param<ITocEntryList>,
{
unsafe { (windows_core::Interface::vtable(self).AddEntryList)(windows_core::Interface::as_raw(self), pentrylist.param().abi(), pwentrylistindex as _).ok() }
}
pub unsafe fn AddEntryListByIndex<P1>(&self, wentrylistindex: u16, pentrylist: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<ITocEntryList>,
{
unsafe { (windows_core::Interface::vtable(self).AddEntryListByIndex)(windows_core::Interface::as_raw(self), wentrylistindex, pentrylist.param().abi()).ok() }
}
pub unsafe fn RemoveEntryListByIndex(&self, wentrylistindex: u16) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RemoveEntryListByIndex)(windows_core::Interface::as_raw(self), wentrylistindex).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IToc_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetDescriptor: unsafe extern "system" fn(*mut core::ffi::c_void, *mut TOC_DESCRIPTOR) -> windows_core::HRESULT,
pub GetDescriptor: unsafe extern "system" fn(*mut core::ffi::c_void, *mut TOC_DESCRIPTOR) -> windows_core::HRESULT,
pub SetDescription: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR) -> windows_core::HRESULT,
pub GetDescription: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16, windows_core::PWSTR) -> windows_core::HRESULT,
pub SetContext: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u8) -> windows_core::HRESULT,
pub GetContext: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut u8) -> windows_core::HRESULT,
pub GetEntryListCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16) -> windows_core::HRESULT,
pub GetEntryListByIndex: unsafe extern "system" fn(*mut core::ffi::c_void, u16, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AddEntryList: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut u16) -> windows_core::HRESULT,
pub AddEntryListByIndex: unsafe extern "system" fn(*mut core::ffi::c_void, u16, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RemoveEntryListByIndex: unsafe extern "system" fn(*mut core::ffi::c_void, u16) -> windows_core::HRESULT,
}
pub trait IToc_Impl: windows_core::IUnknownImpl {
fn SetDescriptor(&self, pdescriptor: *mut TOC_DESCRIPTOR) -> windows_core::Result<()>;
fn GetDescriptor(&self, pdescriptor: *mut TOC_DESCRIPTOR) -> windows_core::Result<()>;
fn SetDescription(&self, pwszdescription: &windows_core::PCWSTR) -> windows_core::Result<()>;
fn GetDescription(&self, pwdescriptionsize: *mut u16, pwszdescription: windows_core::PWSTR) -> windows_core::Result<()>;
fn SetContext(&self, dwcontextsize: u32, pbtcontext: *mut u8) -> windows_core::Result<()>;
fn GetContext(&self, pdwcontextsize: *mut u32, pbtcontext: *mut u8) -> windows_core::Result<()>;
fn GetEntryListCount(&self, pwcount: *mut u16) -> windows_core::Result<()>;
fn GetEntryListByIndex(&self, wentrylistindex: u16) -> windows_core::Result<ITocEntryList>;
fn AddEntryList(&self, pentrylist: windows_core::Ref<ITocEntryList>, pwentrylistindex: *mut u16) -> windows_core::Result<()>;
fn AddEntryListByIndex(&self, wentrylistindex: u16, pentrylist: windows_core::Ref<ITocEntryList>) -> windows_core::Result<()>;
fn RemoveEntryListByIndex(&self, wentrylistindex: u16) -> windows_core::Result<()>;
}
impl IToc_Vtbl {
pub const fn new<Identity: IToc_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetDescriptor<Identity: IToc_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdescriptor: *mut TOC_DESCRIPTOR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IToc_Impl::SetDescriptor(this, core::mem::transmute_copy(&pdescriptor)).into()
}
}
unsafe extern "system" fn GetDescriptor<Identity: IToc_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdescriptor: *mut TOC_DESCRIPTOR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IToc_Impl::GetDescriptor(this, core::mem::transmute_copy(&pdescriptor)).into()
}
}
unsafe extern "system" fn SetDescription<Identity: IToc_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pwszdescription: windows_core::PCWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IToc_Impl::SetDescription(this, core::mem::transmute(&pwszdescription)).into()
}
}
unsafe extern "system" fn GetDescription<Identity: IToc_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pwdescriptionsize: *mut u16, pwszdescription: windows_core::PWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IToc_Impl::GetDescription(this, core::mem::transmute_copy(&pwdescriptionsize), core::mem::transmute_copy(&pwszdescription)).into()
}
}
unsafe extern "system" fn SetContext<Identity: IToc_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwcontextsize: u32, pbtcontext: *mut u8) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IToc_Impl::SetContext(this, core::mem::transmute_copy(&dwcontextsize), core::mem::transmute_copy(&pbtcontext)).into()
}
}
unsafe extern "system" fn GetContext<Identity: IToc_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwcontextsize: *mut u32, pbtcontext: *mut u8) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IToc_Impl::GetContext(this, core::mem::transmute_copy(&pdwcontextsize), core::mem::transmute_copy(&pbtcontext)).into()
}
}
unsafe extern "system" fn GetEntryListCount<Identity: IToc_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pwcount: *mut u16) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IToc_Impl::GetEntryListCount(this, core::mem::transmute_copy(&pwcount)).into()
}
}
unsafe extern "system" fn GetEntryListByIndex<Identity: IToc_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, wentrylistindex: u16, ppentrylist: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IToc_Impl::GetEntryListByIndex(this, core::mem::transmute_copy(&wentrylistindex)) {
Ok(ok__) => {
ppentrylist.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn AddEntryList<Identity: IToc_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pentrylist: *mut core::ffi::c_void, pwentrylistindex: *mut u16) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IToc_Impl::AddEntryList(this, core::mem::transmute_copy(&pentrylist), core::mem::transmute_copy(&pwentrylistindex)).into()
}
}
unsafe extern "system" fn AddEntryListByIndex<Identity: IToc_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, wentrylistindex: u16, pentrylist: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IToc_Impl::AddEntryListByIndex(this, core::mem::transmute_copy(&wentrylistindex), core::mem::transmute_copy(&pentrylist)).into()
}
}
unsafe extern "system" fn RemoveEntryListByIndex<Identity: IToc_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, wentrylistindex: u16) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IToc_Impl::RemoveEntryListByIndex(this, core::mem::transmute_copy(&wentrylistindex)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetDescriptor: SetDescriptor::<Identity, OFFSET>,
GetDescriptor: GetDescriptor::<Identity, OFFSET>,
SetDescription: SetDescription::<Identity, OFFSET>,
GetDescription: GetDescription::<Identity, OFFSET>,
SetContext: SetContext::<Identity, OFFSET>,
GetContext: GetContext::<Identity, OFFSET>,
GetEntryListCount: GetEntryListCount::<Identity, OFFSET>,
GetEntryListByIndex: GetEntryListByIndex::<Identity, OFFSET>,
AddEntryList: AddEntryList::<Identity, OFFSET>,
AddEntryListByIndex: AddEntryListByIndex::<Identity, OFFSET>,
RemoveEntryListByIndex: RemoveEntryListByIndex::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IToc as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IToc {}
windows_core::imp::define_interface!(ITocCollection, ITocCollection_Vtbl, 0x23fee831_ae96_42df_b170_25a04847a3ca);
windows_core::imp::interface_hierarchy!(ITocCollection, windows_core::IUnknown);
impl ITocCollection {
pub unsafe fn GetEntryCount(&self, pdwentrycount: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetEntryCount)(windows_core::Interface::as_raw(self), pdwentrycount as _).ok() }
}
pub unsafe fn GetEntryByIndex(&self, dwentryindex: u32) -> windows_core::Result<IToc> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetEntryByIndex)(windows_core::Interface::as_raw(self), dwentryindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn AddEntry<P0>(&self, ptoc: P0, pdwentryindex: *mut u32) -> windows_core::Result<()>
where
P0: windows_core::Param<IToc>,
{
unsafe { (windows_core::Interface::vtable(self).AddEntry)(windows_core::Interface::as_raw(self), ptoc.param().abi(), pdwentryindex as _).ok() }
}
pub unsafe fn AddEntryByIndex<P1>(&self, dwentryindex: u32, ptoc: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<IToc>,
{
unsafe { (windows_core::Interface::vtable(self).AddEntryByIndex)(windows_core::Interface::as_raw(self), dwentryindex, ptoc.param().abi()).ok() }
}
pub unsafe fn RemoveEntryByIndex(&self, dwentryindex: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RemoveEntryByIndex)(windows_core::Interface::as_raw(self), dwentryindex).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct ITocCollection_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetEntryCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetEntryByIndex: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AddEntry: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub AddEntryByIndex: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RemoveEntryByIndex: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
}
pub trait ITocCollection_Impl: windows_core::IUnknownImpl {
fn GetEntryCount(&self, pdwentrycount: *mut u32) -> windows_core::Result<()>;
fn GetEntryByIndex(&self, dwentryindex: u32) -> windows_core::Result<IToc>;
fn AddEntry(&self, ptoc: windows_core::Ref<IToc>, pdwentryindex: *mut u32) -> windows_core::Result<()>;
fn AddEntryByIndex(&self, dwentryindex: u32, ptoc: windows_core::Ref<IToc>) -> windows_core::Result<()>;
fn RemoveEntryByIndex(&self, dwentryindex: u32) -> windows_core::Result<()>;
}
impl ITocCollection_Vtbl {
pub const fn new<Identity: ITocCollection_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetEntryCount<Identity: ITocCollection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwentrycount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ITocCollection_Impl::GetEntryCount(this, core::mem::transmute_copy(&pdwentrycount)).into()
}
}
unsafe extern "system" fn GetEntryByIndex<Identity: ITocCollection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwentryindex: u32, pptoc: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match ITocCollection_Impl::GetEntryByIndex(this, core::mem::transmute_copy(&dwentryindex)) {
Ok(ok__) => {
pptoc.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn AddEntry<Identity: ITocCollection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ptoc: *mut core::ffi::c_void, pdwentryindex: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ITocCollection_Impl::AddEntry(this, core::mem::transmute_copy(&ptoc), core::mem::transmute_copy(&pdwentryindex)).into()
}
}
unsafe extern "system" fn AddEntryByIndex<Identity: ITocCollection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwentryindex: u32, ptoc: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ITocCollection_Impl::AddEntryByIndex(this, core::mem::transmute_copy(&dwentryindex), core::mem::transmute_copy(&ptoc)).into()
}
}
unsafe extern "system" fn RemoveEntryByIndex<Identity: ITocCollection_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwentryindex: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ITocCollection_Impl::RemoveEntryByIndex(this, core::mem::transmute_copy(&dwentryindex)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetEntryCount: GetEntryCount::<Identity, OFFSET>,
GetEntryByIndex: GetEntryByIndex::<Identity, OFFSET>,
AddEntry: AddEntry::<Identity, OFFSET>,
AddEntryByIndex: AddEntryByIndex::<Identity, OFFSET>,
RemoveEntryByIndex: RemoveEntryByIndex::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ITocCollection as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for ITocCollection {}
windows_core::imp::define_interface!(ITocEntry, ITocEntry_Vtbl, 0xf22f5e06_585c_4def_8523_6555cfbc0cb3);
windows_core::imp::interface_hierarchy!(ITocEntry, windows_core::IUnknown);
impl ITocEntry {
pub unsafe fn SetTitle<P0>(&self, pwsztitle: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).SetTitle)(windows_core::Interface::as_raw(self), pwsztitle.param().abi()).ok() }
}
pub unsafe fn GetTitle(&self, pwtitlesize: *mut u16, pwsztitle: Option<windows_core::PWSTR>) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetTitle)(windows_core::Interface::as_raw(self), pwtitlesize as _, pwsztitle.unwrap_or(core::mem::zeroed()) as _).ok() }
}
pub unsafe fn SetDescriptor(&self, pdescriptor: *mut TOC_ENTRY_DESCRIPTOR) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetDescriptor)(windows_core::Interface::as_raw(self), pdescriptor as _).ok() }
}
pub unsafe fn GetDescriptor(&self, pdescriptor: *mut TOC_ENTRY_DESCRIPTOR) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetDescriptor)(windows_core::Interface::as_raw(self), pdescriptor as _).ok() }
}
pub unsafe fn SetSubEntries(&self, dwnumsubentries: u32, pwsubentryindices: *mut u16) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetSubEntries)(windows_core::Interface::as_raw(self), dwnumsubentries, pwsubentryindices as _).ok() }
}
pub unsafe fn GetSubEntries(&self, pdwnumsubentries: *mut u32, pwsubentryindices: *mut u16) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetSubEntries)(windows_core::Interface::as_raw(self), pdwnumsubentries as _, pwsubentryindices as _).ok() }
}
pub unsafe fn SetDescriptionData(&self, dwdescriptiondatasize: u32, pbtdescriptiondata: *mut u8, pguidtype: *mut windows_core::GUID) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetDescriptionData)(windows_core::Interface::as_raw(self), dwdescriptiondatasize, pbtdescriptiondata as _, pguidtype as _).ok() }
}
pub unsafe fn GetDescriptionData(&self, pdwdescriptiondatasize: *mut u32, pbtdescriptiondata: *mut u8, pguidtype: *mut windows_core::GUID) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetDescriptionData)(windows_core::Interface::as_raw(self), pdwdescriptiondatasize as _, pbtdescriptiondata as _, pguidtype as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct ITocEntry_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetTitle: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR) -> windows_core::HRESULT,
pub GetTitle: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u16, windows_core::PWSTR) -> windows_core::HRESULT,
pub SetDescriptor: unsafe extern "system" fn(*mut core::ffi::c_void, *mut TOC_ENTRY_DESCRIPTOR) -> windows_core::HRESULT,
pub GetDescriptor: unsafe extern "system" fn(*mut core::ffi::c_void, *mut TOC_ENTRY_DESCRIPTOR) -> windows_core::HRESULT,
pub SetSubEntries: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u16) -> windows_core::HRESULT,
pub GetSubEntries: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut u16) -> windows_core::HRESULT,
pub SetDescriptionData: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u8, *mut windows_core::GUID) -> windows_core::HRESULT,
pub GetDescriptionData: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut u8, *mut windows_core::GUID) -> windows_core::HRESULT,
}
pub trait ITocEntry_Impl: windows_core::IUnknownImpl {
fn SetTitle(&self, pwsztitle: &windows_core::PCWSTR) -> windows_core::Result<()>;
fn GetTitle(&self, pwtitlesize: *mut u16, pwsztitle: windows_core::PWSTR) -> windows_core::Result<()>;
fn SetDescriptor(&self, pdescriptor: *mut TOC_ENTRY_DESCRIPTOR) -> windows_core::Result<()>;
fn GetDescriptor(&self, pdescriptor: *mut TOC_ENTRY_DESCRIPTOR) -> windows_core::Result<()>;
fn SetSubEntries(&self, dwnumsubentries: u32, pwsubentryindices: *mut u16) -> windows_core::Result<()>;
fn GetSubEntries(&self, pdwnumsubentries: *mut u32, pwsubentryindices: *mut u16) -> windows_core::Result<()>;
fn SetDescriptionData(&self, dwdescriptiondatasize: u32, pbtdescriptiondata: *mut u8, pguidtype: *mut windows_core::GUID) -> windows_core::Result<()>;
fn GetDescriptionData(&self, pdwdescriptiondatasize: *mut u32, pbtdescriptiondata: *mut u8, pguidtype: *mut windows_core::GUID) -> windows_core::Result<()>;
}
impl ITocEntry_Vtbl {
pub const fn new<Identity: ITocEntry_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetTitle<Identity: ITocEntry_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pwsztitle: windows_core::PCWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ITocEntry_Impl::SetTitle(this, core::mem::transmute(&pwsztitle)).into()
}
}
unsafe extern "system" fn GetTitle<Identity: ITocEntry_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pwtitlesize: *mut u16, pwsztitle: windows_core::PWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ITocEntry_Impl::GetTitle(this, core::mem::transmute_copy(&pwtitlesize), core::mem::transmute_copy(&pwsztitle)).into()
}
}
unsafe extern "system" fn SetDescriptor<Identity: ITocEntry_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdescriptor: *mut TOC_ENTRY_DESCRIPTOR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ITocEntry_Impl::SetDescriptor(this, core::mem::transmute_copy(&pdescriptor)).into()
}
}
unsafe extern "system" fn GetDescriptor<Identity: ITocEntry_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdescriptor: *mut TOC_ENTRY_DESCRIPTOR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ITocEntry_Impl::GetDescriptor(this, core::mem::transmute_copy(&pdescriptor)).into()
}
}
unsafe extern "system" fn SetSubEntries<Identity: ITocEntry_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwnumsubentries: u32, pwsubentryindices: *mut u16) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ITocEntry_Impl::SetSubEntries(this, core::mem::transmute_copy(&dwnumsubentries), core::mem::transmute_copy(&pwsubentryindices)).into()
}
}
unsafe extern "system" fn GetSubEntries<Identity: ITocEntry_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwnumsubentries: *mut u32, pwsubentryindices: *mut u16) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ITocEntry_Impl::GetSubEntries(this, core::mem::transmute_copy(&pdwnumsubentries), core::mem::transmute_copy(&pwsubentryindices)).into()
}
}
unsafe extern "system" fn SetDescriptionData<Identity: ITocEntry_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwdescriptiondatasize: u32, pbtdescriptiondata: *mut u8, pguidtype: *mut windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ITocEntry_Impl::SetDescriptionData(this, core::mem::transmute_copy(&dwdescriptiondatasize), core::mem::transmute_copy(&pbtdescriptiondata), core::mem::transmute_copy(&pguidtype)).into()
}
}
unsafe extern "system" fn GetDescriptionData<Identity: ITocEntry_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwdescriptiondatasize: *mut u32, pbtdescriptiondata: *mut u8, pguidtype: *mut windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ITocEntry_Impl::GetDescriptionData(this, core::mem::transmute_copy(&pdwdescriptiondatasize), core::mem::transmute_copy(&pbtdescriptiondata), core::mem::transmute_copy(&pguidtype)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetTitle: SetTitle::<Identity, OFFSET>,
GetTitle: GetTitle::<Identity, OFFSET>,
SetDescriptor: SetDescriptor::<Identity, OFFSET>,
GetDescriptor: GetDescriptor::<Identity, OFFSET>,
SetSubEntries: SetSubEntries::<Identity, OFFSET>,
GetSubEntries: GetSubEntries::<Identity, OFFSET>,
SetDescriptionData: SetDescriptionData::<Identity, OFFSET>,
GetDescriptionData: GetDescriptionData::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ITocEntry as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for ITocEntry {}
windows_core::imp::define_interface!(ITocEntryList, ITocEntryList_Vtbl, 0x3a8cccbd_0efd_43a3_b838_f38a552ba237);
windows_core::imp::interface_hierarchy!(ITocEntryList, windows_core::IUnknown);
impl ITocEntryList {
pub unsafe fn GetEntryCount(&self, pdwentrycount: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetEntryCount)(windows_core::Interface::as_raw(self), pdwentrycount as _).ok() }
}
pub unsafe fn GetEntryByIndex(&self, dwentryindex: u32) -> windows_core::Result<ITocEntry> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetEntryByIndex)(windows_core::Interface::as_raw(self), dwentryindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn AddEntry<P0>(&self, pentry: P0, pdwentryindex: *mut u32) -> windows_core::Result<()>
where
P0: windows_core::Param<ITocEntry>,
{
unsafe { (windows_core::Interface::vtable(self).AddEntry)(windows_core::Interface::as_raw(self), pentry.param().abi(), pdwentryindex as _).ok() }
}
pub unsafe fn AddEntryByIndex<P1>(&self, dwentryindex: u32, pentry: P1) -> windows_core::Result<()>
where
P1: windows_core::Param<ITocEntry>,
{
unsafe { (windows_core::Interface::vtable(self).AddEntryByIndex)(windows_core::Interface::as_raw(self), dwentryindex, pentry.param().abi()).ok() }
}
pub unsafe fn RemoveEntryByIndex(&self, dwentryindex: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RemoveEntryByIndex)(windows_core::Interface::as_raw(self), dwentryindex).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct ITocEntryList_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetEntryCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub GetEntryByIndex: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AddEntry: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub AddEntryByIndex: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT,
pub RemoveEntryByIndex: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
}
pub trait ITocEntryList_Impl: windows_core::IUnknownImpl {
fn GetEntryCount(&self, pdwentrycount: *mut u32) -> windows_core::Result<()>;
fn GetEntryByIndex(&self, dwentryindex: u32) -> windows_core::Result<ITocEntry>;
fn AddEntry(&self, pentry: windows_core::Ref<ITocEntry>, pdwentryindex: *mut u32) -> windows_core::Result<()>;
fn AddEntryByIndex(&self, dwentryindex: u32, pentry: windows_core::Ref<ITocEntry>) -> windows_core::Result<()>;
fn RemoveEntryByIndex(&self, dwentryindex: u32) -> windows_core::Result<()>;
}
impl ITocEntryList_Vtbl {
pub const fn new<Identity: ITocEntryList_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetEntryCount<Identity: ITocEntryList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwentrycount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ITocEntryList_Impl::GetEntryCount(this, core::mem::transmute_copy(&pdwentrycount)).into()
}
}
unsafe extern "system" fn GetEntryByIndex<Identity: ITocEntryList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwentryindex: u32, ppentry: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match ITocEntryList_Impl::GetEntryByIndex(this, core::mem::transmute_copy(&dwentryindex)) {
Ok(ok__) => {
ppentry.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn AddEntry<Identity: ITocEntryList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pentry: *mut core::ffi::c_void, pdwentryindex: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ITocEntryList_Impl::AddEntry(this, core::mem::transmute_copy(&pentry), core::mem::transmute_copy(&pdwentryindex)).into()
}
}
unsafe extern "system" fn AddEntryByIndex<Identity: ITocEntryList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwentryindex: u32, pentry: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ITocEntryList_Impl::AddEntryByIndex(this, core::mem::transmute_copy(&dwentryindex), core::mem::transmute_copy(&pentry)).into()
}
}
unsafe extern "system" fn RemoveEntryByIndex<Identity: ITocEntryList_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwentryindex: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ITocEntryList_Impl::RemoveEntryByIndex(this, core::mem::transmute_copy(&dwentryindex)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetEntryCount: GetEntryCount::<Identity, OFFSET>,
GetEntryByIndex: GetEntryByIndex::<Identity, OFFSET>,
AddEntry: AddEntry::<Identity, OFFSET>,
AddEntryByIndex: AddEntryByIndex::<Identity, OFFSET>,
RemoveEntryByIndex: RemoveEntryByIndex::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ITocEntryList as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for ITocEntryList {}
windows_core::imp::define_interface!(ITocParser, ITocParser_Vtbl, 0xecfb9a55_9298_4f49_887f_0b36206599d2);
windows_core::imp::interface_hierarchy!(ITocParser, windows_core::IUnknown);
impl ITocParser {
pub unsafe fn Init<P0>(&self, pwszfilename: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).Init)(windows_core::Interface::as_raw(self), pwszfilename.param().abi()).ok() }
}
pub unsafe fn GetTocCount(&self, enumtocpostype: TOC_POS_TYPE, pdwtoccount: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetTocCount)(windows_core::Interface::as_raw(self), enumtocpostype, pdwtoccount as _).ok() }
}
pub unsafe fn GetTocByIndex(&self, enumtocpostype: TOC_POS_TYPE, dwtocindex: u32) -> windows_core::Result<IToc> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetTocByIndex)(windows_core::Interface::as_raw(self), enumtocpostype, dwtocindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn GetTocByType(&self, enumtocpostype: TOC_POS_TYPE, guidtoctype: windows_core::GUID) -> windows_core::Result<ITocCollection> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetTocByType)(windows_core::Interface::as_raw(self), enumtocpostype, core::mem::transmute(guidtoctype), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub unsafe fn AddToc<P1>(&self, enumtocpostype: TOC_POS_TYPE, ptoc: P1, pdwtocindex: *mut u32) -> windows_core::Result<()>
where
P1: windows_core::Param<IToc>,
{
unsafe { (windows_core::Interface::vtable(self).AddToc)(windows_core::Interface::as_raw(self), enumtocpostype, ptoc.param().abi(), pdwtocindex as _).ok() }
}
pub unsafe fn RemoveTocByIndex(&self, enumtocpostype: TOC_POS_TYPE, dwtocindex: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RemoveTocByIndex)(windows_core::Interface::as_raw(self), enumtocpostype, dwtocindex).ok() }
}
pub unsafe fn RemoveTocByType(&self, enumtocpostype: TOC_POS_TYPE, guidtoctype: windows_core::GUID) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).RemoveTocByType)(windows_core::Interface::as_raw(self), enumtocpostype, core::mem::transmute(guidtoctype)).ok() }
}
pub unsafe fn Commit(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).Commit)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct ITocParser_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub Init: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR) -> windows_core::HRESULT,
pub GetTocCount: unsafe extern "system" fn(*mut core::ffi::c_void, TOC_POS_TYPE, *mut u32) -> windows_core::HRESULT,
pub GetTocByIndex: unsafe extern "system" fn(*mut core::ffi::c_void, TOC_POS_TYPE, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub GetTocByType: unsafe extern "system" fn(*mut core::ffi::c_void, TOC_POS_TYPE, windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT,
pub AddToc: unsafe extern "system" fn(*mut core::ffi::c_void, TOC_POS_TYPE, *mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub RemoveTocByIndex: unsafe extern "system" fn(*mut core::ffi::c_void, TOC_POS_TYPE, u32) -> windows_core::HRESULT,
pub RemoveTocByType: unsafe extern "system" fn(*mut core::ffi::c_void, TOC_POS_TYPE, windows_core::GUID) -> windows_core::HRESULT,
pub Commit: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait ITocParser_Impl: windows_core::IUnknownImpl {
fn Init(&self, pwszfilename: &windows_core::PCWSTR) -> windows_core::Result<()>;
fn GetTocCount(&self, enumtocpostype: TOC_POS_TYPE, pdwtoccount: *mut u32) -> windows_core::Result<()>;
fn GetTocByIndex(&self, enumtocpostype: TOC_POS_TYPE, dwtocindex: u32) -> windows_core::Result<IToc>;
fn GetTocByType(&self, enumtocpostype: TOC_POS_TYPE, guidtoctype: &windows_core::GUID) -> windows_core::Result<ITocCollection>;
fn AddToc(&self, enumtocpostype: TOC_POS_TYPE, ptoc: windows_core::Ref<IToc>, pdwtocindex: *mut u32) -> windows_core::Result<()>;
fn RemoveTocByIndex(&self, enumtocpostype: TOC_POS_TYPE, dwtocindex: u32) -> windows_core::Result<()>;
fn RemoveTocByType(&self, enumtocpostype: TOC_POS_TYPE, guidtoctype: &windows_core::GUID) -> windows_core::Result<()>;
fn Commit(&self) -> windows_core::Result<()>;
}
impl ITocParser_Vtbl {
pub const fn new<Identity: ITocParser_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Init<Identity: ITocParser_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pwszfilename: windows_core::PCWSTR) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ITocParser_Impl::Init(this, core::mem::transmute(&pwszfilename)).into()
}
}
unsafe extern "system" fn GetTocCount<Identity: ITocParser_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, enumtocpostype: TOC_POS_TYPE, pdwtoccount: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ITocParser_Impl::GetTocCount(this, core::mem::transmute_copy(&enumtocpostype), core::mem::transmute_copy(&pdwtoccount)).into()
}
}
unsafe extern "system" fn GetTocByIndex<Identity: ITocParser_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, enumtocpostype: TOC_POS_TYPE, dwtocindex: u32, pptoc: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match ITocParser_Impl::GetTocByIndex(this, core::mem::transmute_copy(&enumtocpostype), core::mem::transmute_copy(&dwtocindex)) {
Ok(ok__) => {
pptoc.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetTocByType<Identity: ITocParser_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, enumtocpostype: TOC_POS_TYPE, guidtoctype: windows_core::GUID, pptocs: *mut *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match ITocParser_Impl::GetTocByType(this, core::mem::transmute_copy(&enumtocpostype), core::mem::transmute(&guidtoctype)) {
Ok(ok__) => {
pptocs.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn AddToc<Identity: ITocParser_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, enumtocpostype: TOC_POS_TYPE, ptoc: *mut core::ffi::c_void, pdwtocindex: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ITocParser_Impl::AddToc(this, core::mem::transmute_copy(&enumtocpostype), core::mem::transmute_copy(&ptoc), core::mem::transmute_copy(&pdwtocindex)).into()
}
}
unsafe extern "system" fn RemoveTocByIndex<Identity: ITocParser_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, enumtocpostype: TOC_POS_TYPE, dwtocindex: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ITocParser_Impl::RemoveTocByIndex(this, core::mem::transmute_copy(&enumtocpostype), core::mem::transmute_copy(&dwtocindex)).into()
}
}
unsafe extern "system" fn RemoveTocByType<Identity: ITocParser_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, enumtocpostype: TOC_POS_TYPE, guidtoctype: windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ITocParser_Impl::RemoveTocByType(this, core::mem::transmute_copy(&enumtocpostype), core::mem::transmute(&guidtoctype)).into()
}
}
unsafe extern "system" fn Commit<Identity: ITocParser_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
ITocParser_Impl::Commit(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Init: Init::<Identity, OFFSET>,
GetTocCount: GetTocCount::<Identity, OFFSET>,
GetTocByIndex: GetTocByIndex::<Identity, OFFSET>,
GetTocByType: GetTocByType::<Identity, OFFSET>,
AddToc: AddToc::<Identity, OFFSET>,
RemoveTocByIndex: RemoveTocByIndex::<Identity, OFFSET>,
RemoveTocByType: RemoveTocByType::<Identity, OFFSET>,
Commit: Commit::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<ITocParser as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for ITocParser {}
windows_core::imp::define_interface!(IValidateBinding, IValidateBinding_Vtbl, 0x04a578b2_e778_422a_a805_b3ee54d90bd9);
windows_core::imp::interface_hierarchy!(IValidateBinding, windows_core::IUnknown);
impl IValidateBinding {
pub unsafe fn GetIdentifier(&self, guidlicensorid: windows_core::GUID, pbephemeron: &[u8], ppbblobvalidationid: *mut *mut u8, pcbblobsize: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetIdentifier)(windows_core::Interface::as_raw(self), core::mem::transmute(guidlicensorid), core::mem::transmute(pbephemeron.as_ptr()), pbephemeron.len().try_into().unwrap(), ppbblobvalidationid as _, pcbblobsize as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IValidateBinding_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetIdentifier: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::GUID, *const u8, u32, *mut *mut u8, *mut u32) -> windows_core::HRESULT,
}
pub trait IValidateBinding_Impl: windows_core::IUnknownImpl {
fn GetIdentifier(&self, guidlicensorid: &windows_core::GUID, pbephemeron: *const u8, cbephemeron: u32, ppbblobvalidationid: *mut *mut u8, pcbblobsize: *mut u32) -> windows_core::Result<()>;
}
impl IValidateBinding_Vtbl {
pub const fn new<Identity: IValidateBinding_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetIdentifier<Identity: IValidateBinding_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidlicensorid: windows_core::GUID, pbephemeron: *const u8, cbephemeron: u32, ppbblobvalidationid: *mut *mut u8, pcbblobsize: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IValidateBinding_Impl::GetIdentifier(this, core::mem::transmute(&guidlicensorid), core::mem::transmute_copy(&pbephemeron), core::mem::transmute_copy(&cbephemeron), core::mem::transmute_copy(&ppbblobvalidationid), core::mem::transmute_copy(&pcbblobsize)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetIdentifier: GetIdentifier::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IValidateBinding as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IValidateBinding {}
windows_core::imp::define_interface!(IWMCodecLeakyBucket, IWMCodecLeakyBucket_Vtbl, 0xa81ba647_6227_43b7_b231_c7b15135dd7d);
windows_core::imp::interface_hierarchy!(IWMCodecLeakyBucket, windows_core::IUnknown);
impl IWMCodecLeakyBucket {
pub unsafe fn SetBufferSizeBits(&self, ulbuffersize: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetBufferSizeBits)(windows_core::Interface::as_raw(self), ulbuffersize).ok() }
}
pub unsafe fn GetBufferSizeBits(&self, pulbuffersize: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetBufferSizeBits)(windows_core::Interface::as_raw(self), pulbuffersize as _).ok() }
}
pub unsafe fn SetBufferFullnessBits(&self, ulbufferfullness: u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetBufferFullnessBits)(windows_core::Interface::as_raw(self), ulbufferfullness).ok() }
}
pub unsafe fn GetBufferFullnessBits(&self, pulbufferfullness: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetBufferFullnessBits)(windows_core::Interface::as_raw(self), pulbufferfullness as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IWMCodecLeakyBucket_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetBufferSizeBits: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub GetBufferSizeBits: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub SetBufferFullnessBits: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub GetBufferFullnessBits: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
}
pub trait IWMCodecLeakyBucket_Impl: windows_core::IUnknownImpl {
fn SetBufferSizeBits(&self, ulbuffersize: u32) -> windows_core::Result<()>;
fn GetBufferSizeBits(&self, pulbuffersize: *mut u32) -> windows_core::Result<()>;
fn SetBufferFullnessBits(&self, ulbufferfullness: u32) -> windows_core::Result<()>;
fn GetBufferFullnessBits(&self, pulbufferfullness: *mut u32) -> windows_core::Result<()>;
}
impl IWMCodecLeakyBucket_Vtbl {
pub const fn new<Identity: IWMCodecLeakyBucket_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetBufferSizeBits<Identity: IWMCodecLeakyBucket_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ulbuffersize: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMCodecLeakyBucket_Impl::SetBufferSizeBits(this, core::mem::transmute_copy(&ulbuffersize)).into()
}
}
unsafe extern "system" fn GetBufferSizeBits<Identity: IWMCodecLeakyBucket_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pulbuffersize: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMCodecLeakyBucket_Impl::GetBufferSizeBits(this, core::mem::transmute_copy(&pulbuffersize)).into()
}
}
unsafe extern "system" fn SetBufferFullnessBits<Identity: IWMCodecLeakyBucket_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, ulbufferfullness: u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMCodecLeakyBucket_Impl::SetBufferFullnessBits(this, core::mem::transmute_copy(&ulbufferfullness)).into()
}
}
unsafe extern "system" fn GetBufferFullnessBits<Identity: IWMCodecLeakyBucket_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pulbufferfullness: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMCodecLeakyBucket_Impl::GetBufferFullnessBits(this, core::mem::transmute_copy(&pulbufferfullness)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetBufferSizeBits: SetBufferSizeBits::<Identity, OFFSET>,
GetBufferSizeBits: GetBufferSizeBits::<Identity, OFFSET>,
SetBufferFullnessBits: SetBufferFullnessBits::<Identity, OFFSET>,
GetBufferFullnessBits: GetBufferFullnessBits::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IWMCodecLeakyBucket as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IWMCodecLeakyBucket {}
windows_core::imp::define_interface!(IWMCodecOutputTimestamp, IWMCodecOutputTimestamp_Vtbl, 0xb72adf95_7adc_4a72_bc05_577d8ea6bf68);
windows_core::imp::interface_hierarchy!(IWMCodecOutputTimestamp, windows_core::IUnknown);
impl IWMCodecOutputTimestamp {
pub unsafe fn GetNextOutputTime(&self, prttime: *mut i64) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetNextOutputTime)(windows_core::Interface::as_raw(self), prttime as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IWMCodecOutputTimestamp_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetNextOutputTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
}
pub trait IWMCodecOutputTimestamp_Impl: windows_core::IUnknownImpl {
fn GetNextOutputTime(&self, prttime: *mut i64) -> windows_core::Result<()>;
}
impl IWMCodecOutputTimestamp_Vtbl {
pub const fn new<Identity: IWMCodecOutputTimestamp_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetNextOutputTime<Identity: IWMCodecOutputTimestamp_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, prttime: *mut i64) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMCodecOutputTimestamp_Impl::GetNextOutputTime(this, core::mem::transmute_copy(&prttime)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), GetNextOutputTime: GetNextOutputTime::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IWMCodecOutputTimestamp as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IWMCodecOutputTimestamp {}
windows_core::imp::define_interface!(IWMCodecPrivateData, IWMCodecPrivateData_Vtbl, 0x73f0be8e_57f7_4f01_aa66_9f57340cfe0e);
windows_core::imp::interface_hierarchy!(IWMCodecPrivateData, windows_core::IUnknown);
impl IWMCodecPrivateData {
#[cfg(feature = "Win32_Media_DxMediaObjects")]
pub unsafe fn SetPartialOutputType(&self, pmt: *mut super::DxMediaObjects::DMO_MEDIA_TYPE) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetPartialOutputType)(windows_core::Interface::as_raw(self), core::mem::transmute(pmt)).ok() }
}
pub unsafe fn GetPrivateData(&self, pbdata: *mut u8, pcbdata: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), pbdata as _, pcbdata as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IWMCodecPrivateData_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "Win32_Media_DxMediaObjects")]
pub SetPartialOutputType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::DxMediaObjects::DMO_MEDIA_TYPE) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Media_DxMediaObjects"))]
SetPartialOutputType: usize,
pub GetPrivateData: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u8, *mut u32) -> windows_core::HRESULT,
}
#[cfg(feature = "Win32_Media_DxMediaObjects")]
pub trait IWMCodecPrivateData_Impl: windows_core::IUnknownImpl {
fn SetPartialOutputType(&self, pmt: *mut super::DxMediaObjects::DMO_MEDIA_TYPE) -> windows_core::Result<()>;
fn GetPrivateData(&self, pbdata: *mut u8, pcbdata: *mut u32) -> windows_core::Result<()>;
}
#[cfg(feature = "Win32_Media_DxMediaObjects")]
impl IWMCodecPrivateData_Vtbl {
pub const fn new<Identity: IWMCodecPrivateData_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetPartialOutputType<Identity: IWMCodecPrivateData_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pmt: *mut super::DxMediaObjects::DMO_MEDIA_TYPE) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMCodecPrivateData_Impl::SetPartialOutputType(this, core::mem::transmute_copy(&pmt)).into()
}
}
unsafe extern "system" fn GetPrivateData<Identity: IWMCodecPrivateData_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbdata: *mut u8, pcbdata: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMCodecPrivateData_Impl::GetPrivateData(this, core::mem::transmute_copy(&pbdata), core::mem::transmute_copy(&pcbdata)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetPartialOutputType: SetPartialOutputType::<Identity, OFFSET>,
GetPrivateData: GetPrivateData::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IWMCodecPrivateData as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Media_DxMediaObjects")]
impl windows_core::RuntimeName for IWMCodecPrivateData {}
windows_core::imp::define_interface!(IWMCodecProps, IWMCodecProps_Vtbl, 0x2573e11a_f01a_4fdd_a98d_63b8e0ba9589);
windows_core::imp::interface_hierarchy!(IWMCodecProps, windows_core::IUnknown);
impl IWMCodecProps {
#[cfg(feature = "Win32_Media_DxMediaObjects")]
pub unsafe fn GetFormatProp<P1>(&self, pmt: *mut super::DxMediaObjects::DMO_MEDIA_TYPE, pszname: P1, ptype: *mut WMT_PROP_DATATYPE, pvalue: *mut u8, pdwsize: *mut u32) -> windows_core::Result<()>
where
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).GetFormatProp)(windows_core::Interface::as_raw(self), core::mem::transmute(pmt), pszname.param().abi(), ptype as _, pvalue as _, pdwsize as _).ok() }
}
pub unsafe fn GetCodecProp<P1>(&self, dwformat: u32, pszname: P1, ptype: *mut WMT_PROP_DATATYPE, pvalue: *mut u8, pdwsize: *mut u32) -> windows_core::Result<()>
where
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe { (windows_core::Interface::vtable(self).GetCodecProp)(windows_core::Interface::as_raw(self), dwformat, pszname.param().abi(), ptype as _, pvalue as _, pdwsize as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IWMCodecProps_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "Win32_Media_DxMediaObjects")]
pub GetFormatProp: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::DxMediaObjects::DMO_MEDIA_TYPE, windows_core::PCWSTR, *mut WMT_PROP_DATATYPE, *mut u8, *mut u32) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Media_DxMediaObjects"))]
GetFormatProp: usize,
pub GetCodecProp: unsafe extern "system" fn(*mut core::ffi::c_void, u32, windows_core::PCWSTR, *mut WMT_PROP_DATATYPE, *mut u8, *mut u32) -> windows_core::HRESULT,
}
#[cfg(feature = "Win32_Media_DxMediaObjects")]
pub trait IWMCodecProps_Impl: windows_core::IUnknownImpl {
fn GetFormatProp(&self, pmt: *mut super::DxMediaObjects::DMO_MEDIA_TYPE, pszname: &windows_core::PCWSTR, ptype: *mut WMT_PROP_DATATYPE, pvalue: *mut u8, pdwsize: *mut u32) -> windows_core::Result<()>;
fn GetCodecProp(&self, dwformat: u32, pszname: &windows_core::PCWSTR, ptype: *mut WMT_PROP_DATATYPE, pvalue: *mut u8, pdwsize: *mut u32) -> windows_core::Result<()>;
}
#[cfg(feature = "Win32_Media_DxMediaObjects")]
impl IWMCodecProps_Vtbl {
pub const fn new<Identity: IWMCodecProps_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetFormatProp<Identity: IWMCodecProps_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pmt: *mut super::DxMediaObjects::DMO_MEDIA_TYPE, pszname: windows_core::PCWSTR, ptype: *mut WMT_PROP_DATATYPE, pvalue: *mut u8, pdwsize: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMCodecProps_Impl::GetFormatProp(this, core::mem::transmute_copy(&pmt), core::mem::transmute(&pszname), core::mem::transmute_copy(&ptype), core::mem::transmute_copy(&pvalue), core::mem::transmute_copy(&pdwsize)).into()
}
}
unsafe extern "system" fn GetCodecProp<Identity: IWMCodecProps_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, dwformat: u32, pszname: windows_core::PCWSTR, ptype: *mut WMT_PROP_DATATYPE, pvalue: *mut u8, pdwsize: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMCodecProps_Impl::GetCodecProp(this, core::mem::transmute_copy(&dwformat), core::mem::transmute(&pszname), core::mem::transmute_copy(&ptype), core::mem::transmute_copy(&pvalue), core::mem::transmute_copy(&pdwsize)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetFormatProp: GetFormatProp::<Identity, OFFSET>,
GetCodecProp: GetCodecProp::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IWMCodecProps as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Media_DxMediaObjects")]
impl windows_core::RuntimeName for IWMCodecProps {}
windows_core::imp::define_interface!(IWMCodecStrings, IWMCodecStrings_Vtbl, 0xa7b2504b_e58a_47fb_958b_cac7165a057d);
windows_core::imp::interface_hierarchy!(IWMCodecStrings, windows_core::IUnknown);
impl IWMCodecStrings {
#[cfg(feature = "Win32_Media_DxMediaObjects")]
pub unsafe fn GetName(&self, pmt: *mut super::DxMediaObjects::DMO_MEDIA_TYPE, szname: Option<&mut [u16]>, pcchlength: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), core::mem::transmute(pmt), szname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcchlength as _).ok() }
}
#[cfg(feature = "Win32_Media_DxMediaObjects")]
pub unsafe fn GetDescription(&self, pmt: *mut super::DxMediaObjects::DMO_MEDIA_TYPE, szdescription: Option<&mut [u16]>, pcchlength: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetDescription)(windows_core::Interface::as_raw(self), core::mem::transmute(pmt), szdescription.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(szdescription.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcchlength as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IWMCodecStrings_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "Win32_Media_DxMediaObjects")]
pub GetName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::DxMediaObjects::DMO_MEDIA_TYPE, u32, windows_core::PWSTR, *mut u32) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Media_DxMediaObjects"))]
GetName: usize,
#[cfg(feature = "Win32_Media_DxMediaObjects")]
pub GetDescription: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::DxMediaObjects::DMO_MEDIA_TYPE, u32, windows_core::PWSTR, *mut u32) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Media_DxMediaObjects"))]
GetDescription: usize,
}
#[cfg(feature = "Win32_Media_DxMediaObjects")]
pub trait IWMCodecStrings_Impl: windows_core::IUnknownImpl {
fn GetName(&self, pmt: *mut super::DxMediaObjects::DMO_MEDIA_TYPE, cchlength: u32, szname: windows_core::PWSTR, pcchlength: *mut u32) -> windows_core::Result<()>;
fn GetDescription(&self, pmt: *mut super::DxMediaObjects::DMO_MEDIA_TYPE, cchlength: u32, szdescription: windows_core::PWSTR, pcchlength: *mut u32) -> windows_core::Result<()>;
}
#[cfg(feature = "Win32_Media_DxMediaObjects")]
impl IWMCodecStrings_Vtbl {
pub const fn new<Identity: IWMCodecStrings_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetName<Identity: IWMCodecStrings_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pmt: *mut super::DxMediaObjects::DMO_MEDIA_TYPE, cchlength: u32, szname: windows_core::PWSTR, pcchlength: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMCodecStrings_Impl::GetName(this, core::mem::transmute_copy(&pmt), core::mem::transmute_copy(&cchlength), core::mem::transmute_copy(&szname), core::mem::transmute_copy(&pcchlength)).into()
}
}
unsafe extern "system" fn GetDescription<Identity: IWMCodecStrings_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pmt: *mut super::DxMediaObjects::DMO_MEDIA_TYPE, cchlength: u32, szdescription: windows_core::PWSTR, pcchlength: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMCodecStrings_Impl::GetDescription(this, core::mem::transmute_copy(&pmt), core::mem::transmute_copy(&cchlength), core::mem::transmute_copy(&szdescription), core::mem::transmute_copy(&pcchlength)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetName: GetName::<Identity, OFFSET>,
GetDescription: GetDescription::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IWMCodecStrings as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Media_DxMediaObjects")]
impl windows_core::RuntimeName for IWMCodecStrings {}
windows_core::imp::define_interface!(IWMColorConvProps, IWMColorConvProps_Vtbl, 0xe6a49e22_c099_421d_aad3_c061fb4ae85b);
windows_core::imp::interface_hierarchy!(IWMColorConvProps, windows_core::IUnknown);
impl IWMColorConvProps {
pub unsafe fn SetMode(&self, lmode: i32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetMode)(windows_core::Interface::as_raw(self), lmode).ok() }
}
pub unsafe fn SetFullCroppingParam(&self, lsrccropleft: i32, lsrccroptop: i32, ldstcropleft: i32, ldstcroptop: i32, lcropwidth: i32, lcropheight: i32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetFullCroppingParam)(windows_core::Interface::as_raw(self), lsrccropleft, lsrccroptop, ldstcropleft, ldstcroptop, lcropwidth, lcropheight).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IWMColorConvProps_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetMode: unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
pub SetFullCroppingParam: unsafe extern "system" fn(*mut core::ffi::c_void, i32, i32, i32, i32, i32, i32) -> windows_core::HRESULT,
}
pub trait IWMColorConvProps_Impl: windows_core::IUnknownImpl {
fn SetMode(&self, lmode: i32) -> windows_core::Result<()>;
fn SetFullCroppingParam(&self, lsrccropleft: i32, lsrccroptop: i32, ldstcropleft: i32, ldstcroptop: i32, lcropwidth: i32, lcropheight: i32) -> windows_core::Result<()>;
}
impl IWMColorConvProps_Vtbl {
pub const fn new<Identity: IWMColorConvProps_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetMode<Identity: IWMColorConvProps_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, lmode: i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMColorConvProps_Impl::SetMode(this, core::mem::transmute_copy(&lmode)).into()
}
}
unsafe extern "system" fn SetFullCroppingParam<Identity: IWMColorConvProps_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, lsrccropleft: i32, lsrccroptop: i32, ldstcropleft: i32, ldstcroptop: i32, lcropwidth: i32, lcropheight: i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMColorConvProps_Impl::SetFullCroppingParam(this, core::mem::transmute_copy(&lsrccropleft), core::mem::transmute_copy(&lsrccroptop), core::mem::transmute_copy(&ldstcropleft), core::mem::transmute_copy(&ldstcroptop), core::mem::transmute_copy(&lcropwidth), core::mem::transmute_copy(&lcropheight)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetMode: SetMode::<Identity, OFFSET>,
SetFullCroppingParam: SetFullCroppingParam::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IWMColorConvProps as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IWMColorConvProps {}
windows_core::imp::define_interface!(IWMColorLegalizerProps, IWMColorLegalizerProps_Vtbl, 0x776c93b3_b72d_4508_b6d0_208785f553e7);
windows_core::imp::interface_hierarchy!(IWMColorLegalizerProps, windows_core::IUnknown);
impl IWMColorLegalizerProps {
pub unsafe fn SetColorLegalizerQuality(&self, lquality: i32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetColorLegalizerQuality)(windows_core::Interface::as_raw(self), lquality).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IWMColorLegalizerProps_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetColorLegalizerQuality: unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
}
pub trait IWMColorLegalizerProps_Impl: windows_core::IUnknownImpl {
fn SetColorLegalizerQuality(&self, lquality: i32) -> windows_core::Result<()>;
}
impl IWMColorLegalizerProps_Vtbl {
pub const fn new<Identity: IWMColorLegalizerProps_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetColorLegalizerQuality<Identity: IWMColorLegalizerProps_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, lquality: i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMColorLegalizerProps_Impl::SetColorLegalizerQuality(this, core::mem::transmute_copy(&lquality)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), SetColorLegalizerQuality: SetColorLegalizerQuality::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IWMColorLegalizerProps as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IWMColorLegalizerProps {}
windows_core::imp::define_interface!(IWMFrameInterpProps, IWMFrameInterpProps_Vtbl, 0x4c06bb9b_626c_4614_8329_cc6a21b93fa0);
windows_core::imp::interface_hierarchy!(IWMFrameInterpProps, windows_core::IUnknown);
impl IWMFrameInterpProps {
pub unsafe fn SetFrameRateIn(&self, lframerate: i32, lscale: i32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetFrameRateIn)(windows_core::Interface::as_raw(self), lframerate, lscale).ok() }
}
pub unsafe fn SetFrameRateOut(&self, lframerate: i32, lscale: i32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetFrameRateOut)(windows_core::Interface::as_raw(self), lframerate, lscale).ok() }
}
pub unsafe fn SetFrameInterpEnabled(&self, bfienabled: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetFrameInterpEnabled)(windows_core::Interface::as_raw(self), bfienabled.into()).ok() }
}
pub unsafe fn SetComplexityLevel(&self, icomplexity: i32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetComplexityLevel)(windows_core::Interface::as_raw(self), icomplexity).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IWMFrameInterpProps_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetFrameRateIn: unsafe extern "system" fn(*mut core::ffi::c_void, i32, i32) -> windows_core::HRESULT,
pub SetFrameRateOut: unsafe extern "system" fn(*mut core::ffi::c_void, i32, i32) -> windows_core::HRESULT,
pub SetFrameInterpEnabled: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT,
pub SetComplexityLevel: unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
}
pub trait IWMFrameInterpProps_Impl: windows_core::IUnknownImpl {
fn SetFrameRateIn(&self, lframerate: i32, lscale: i32) -> windows_core::Result<()>;
fn SetFrameRateOut(&self, lframerate: i32, lscale: i32) -> windows_core::Result<()>;
fn SetFrameInterpEnabled(&self, bfienabled: windows_core::BOOL) -> windows_core::Result<()>;
fn SetComplexityLevel(&self, icomplexity: i32) -> windows_core::Result<()>;
}
impl IWMFrameInterpProps_Vtbl {
pub const fn new<Identity: IWMFrameInterpProps_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetFrameRateIn<Identity: IWMFrameInterpProps_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, lframerate: i32, lscale: i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMFrameInterpProps_Impl::SetFrameRateIn(this, core::mem::transmute_copy(&lframerate), core::mem::transmute_copy(&lscale)).into()
}
}
unsafe extern "system" fn SetFrameRateOut<Identity: IWMFrameInterpProps_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, lframerate: i32, lscale: i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMFrameInterpProps_Impl::SetFrameRateOut(this, core::mem::transmute_copy(&lframerate), core::mem::transmute_copy(&lscale)).into()
}
}
unsafe extern "system" fn SetFrameInterpEnabled<Identity: IWMFrameInterpProps_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, bfienabled: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMFrameInterpProps_Impl::SetFrameInterpEnabled(this, core::mem::transmute_copy(&bfienabled)).into()
}
}
unsafe extern "system" fn SetComplexityLevel<Identity: IWMFrameInterpProps_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, icomplexity: i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMFrameInterpProps_Impl::SetComplexityLevel(this, core::mem::transmute_copy(&icomplexity)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetFrameRateIn: SetFrameRateIn::<Identity, OFFSET>,
SetFrameRateOut: SetFrameRateOut::<Identity, OFFSET>,
SetFrameInterpEnabled: SetFrameInterpEnabled::<Identity, OFFSET>,
SetComplexityLevel: SetComplexityLevel::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IWMFrameInterpProps as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IWMFrameInterpProps {}
windows_core::imp::define_interface!(IWMInterlaceProps, IWMInterlaceProps_Vtbl, 0x7b12e5d1_bd22_48ea_bc06_98e893221c89);
windows_core::imp::interface_hierarchy!(IWMInterlaceProps, windows_core::IUnknown);
impl IWMInterlaceProps {
pub unsafe fn SetProcessType(&self, iprocesstype: i32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetProcessType)(windows_core::Interface::as_raw(self), iprocesstype).ok() }
}
pub unsafe fn SetInitInverseTeleCinePattern(&self, iinitpattern: i32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetInitInverseTeleCinePattern)(windows_core::Interface::as_raw(self), iinitpattern).ok() }
}
pub unsafe fn SetLastFrame(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetLastFrame)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IWMInterlaceProps_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetProcessType: unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
pub SetInitInverseTeleCinePattern: unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
pub SetLastFrame: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IWMInterlaceProps_Impl: windows_core::IUnknownImpl {
fn SetProcessType(&self, iprocesstype: i32) -> windows_core::Result<()>;
fn SetInitInverseTeleCinePattern(&self, iinitpattern: i32) -> windows_core::Result<()>;
fn SetLastFrame(&self) -> windows_core::Result<()>;
}
impl IWMInterlaceProps_Vtbl {
pub const fn new<Identity: IWMInterlaceProps_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetProcessType<Identity: IWMInterlaceProps_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, iprocesstype: i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMInterlaceProps_Impl::SetProcessType(this, core::mem::transmute_copy(&iprocesstype)).into()
}
}
unsafe extern "system" fn SetInitInverseTeleCinePattern<Identity: IWMInterlaceProps_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, iinitpattern: i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMInterlaceProps_Impl::SetInitInverseTeleCinePattern(this, core::mem::transmute_copy(&iinitpattern)).into()
}
}
unsafe extern "system" fn SetLastFrame<Identity: IWMInterlaceProps_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMInterlaceProps_Impl::SetLastFrame(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetProcessType: SetProcessType::<Identity, OFFSET>,
SetInitInverseTeleCinePattern: SetInitInverseTeleCinePattern::<Identity, OFFSET>,
SetLastFrame: SetLastFrame::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IWMInterlaceProps as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IWMInterlaceProps {}
windows_core::imp::define_interface!(IWMResamplerProps, IWMResamplerProps_Vtbl, 0xe7e9984f_f09f_4da4_903f_6e2e0efe56b5);
windows_core::imp::interface_hierarchy!(IWMResamplerProps, windows_core::IUnknown);
impl IWMResamplerProps {
pub unsafe fn SetHalfFilterLength(&self, lhalffilterlen: i32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetHalfFilterLength)(windows_core::Interface::as_raw(self), lhalffilterlen).ok() }
}
pub unsafe fn SetUserChannelMtx(&self, userchannelmtx: *mut f32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetUserChannelMtx)(windows_core::Interface::as_raw(self), userchannelmtx as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IWMResamplerProps_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetHalfFilterLength: unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
pub SetUserChannelMtx: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f32) -> windows_core::HRESULT,
}
pub trait IWMResamplerProps_Impl: windows_core::IUnknownImpl {
fn SetHalfFilterLength(&self, lhalffilterlen: i32) -> windows_core::Result<()>;
fn SetUserChannelMtx(&self, userchannelmtx: *mut f32) -> windows_core::Result<()>;
}
impl IWMResamplerProps_Vtbl {
pub const fn new<Identity: IWMResamplerProps_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetHalfFilterLength<Identity: IWMResamplerProps_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, lhalffilterlen: i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMResamplerProps_Impl::SetHalfFilterLength(this, core::mem::transmute_copy(&lhalffilterlen)).into()
}
}
unsafe extern "system" fn SetUserChannelMtx<Identity: IWMResamplerProps_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, userchannelmtx: *mut f32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMResamplerProps_Impl::SetUserChannelMtx(this, core::mem::transmute_copy(&userchannelmtx)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetHalfFilterLength: SetHalfFilterLength::<Identity, OFFSET>,
SetUserChannelMtx: SetUserChannelMtx::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IWMResamplerProps as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IWMResamplerProps {}
windows_core::imp::define_interface!(IWMResizerProps, IWMResizerProps_Vtbl, 0x57665d4c_0414_4faa_905b_10e546f81c33);
windows_core::imp::interface_hierarchy!(IWMResizerProps, windows_core::IUnknown);
impl IWMResizerProps {
pub unsafe fn SetResizerQuality(&self, lquality: i32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetResizerQuality)(windows_core::Interface::as_raw(self), lquality).ok() }
}
pub unsafe fn SetInterlaceMode(&self, lmode: i32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetInterlaceMode)(windows_core::Interface::as_raw(self), lmode).ok() }
}
pub unsafe fn SetClipRegion(&self, lcliporixsrc: i32, lcliporiysrc: i32, lclipwidthsrc: i32, lclipheightsrc: i32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetClipRegion)(windows_core::Interface::as_raw(self), lcliporixsrc, lcliporiysrc, lclipwidthsrc, lclipheightsrc).ok() }
}
pub unsafe fn SetFullCropRegion(&self, lcliporixsrc: i32, lcliporiysrc: i32, lclipwidthsrc: i32, lclipheightsrc: i32, lcliporixdst: i32, lcliporiydst: i32, lclipwidthdst: i32, lclipheightdst: i32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetFullCropRegion)(windows_core::Interface::as_raw(self), lcliporixsrc, lcliporiysrc, lclipwidthsrc, lclipheightsrc, lcliporixdst, lcliporiydst, lclipwidthdst, lclipheightdst).ok() }
}
pub unsafe fn GetFullCropRegion(&self, lcliporixsrc: *mut i32, lcliporiysrc: *mut i32, lclipwidthsrc: *mut i32, lclipheightsrc: *mut i32, lcliporixdst: *mut i32, lcliporiydst: *mut i32, lclipwidthdst: *mut i32, lclipheightdst: *mut i32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetFullCropRegion)(windows_core::Interface::as_raw(self), lcliporixsrc as _, lcliporiysrc as _, lclipwidthsrc as _, lclipheightsrc as _, lcliporixdst as _, lcliporiydst as _, lclipwidthdst as _, lclipheightdst as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IWMResizerProps_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetResizerQuality: unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
pub SetInterlaceMode: unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
pub SetClipRegion: unsafe extern "system" fn(*mut core::ffi::c_void, i32, i32, i32, i32) -> windows_core::HRESULT,
pub SetFullCropRegion: unsafe extern "system" fn(*mut core::ffi::c_void, i32, i32, i32, i32, i32, i32, i32, i32) -> windows_core::HRESULT,
pub GetFullCropRegion: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32, *mut i32, *mut i32, *mut i32, *mut i32, *mut i32, *mut i32, *mut i32) -> windows_core::HRESULT,
}
pub trait IWMResizerProps_Impl: windows_core::IUnknownImpl {
fn SetResizerQuality(&self, lquality: i32) -> windows_core::Result<()>;
fn SetInterlaceMode(&self, lmode: i32) -> windows_core::Result<()>;
fn SetClipRegion(&self, lcliporixsrc: i32, lcliporiysrc: i32, lclipwidthsrc: i32, lclipheightsrc: i32) -> windows_core::Result<()>;
fn SetFullCropRegion(&self, lcliporixsrc: i32, lcliporiysrc: i32, lclipwidthsrc: i32, lclipheightsrc: i32, lcliporixdst: i32, lcliporiydst: i32, lclipwidthdst: i32, lclipheightdst: i32) -> windows_core::Result<()>;
fn GetFullCropRegion(&self, lcliporixsrc: *mut i32, lcliporiysrc: *mut i32, lclipwidthsrc: *mut i32, lclipheightsrc: *mut i32, lcliporixdst: *mut i32, lcliporiydst: *mut i32, lclipwidthdst: *mut i32, lclipheightdst: *mut i32) -> windows_core::Result<()>;
}
impl IWMResizerProps_Vtbl {
pub const fn new<Identity: IWMResizerProps_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetResizerQuality<Identity: IWMResizerProps_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, lquality: i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMResizerProps_Impl::SetResizerQuality(this, core::mem::transmute_copy(&lquality)).into()
}
}
unsafe extern "system" fn SetInterlaceMode<Identity: IWMResizerProps_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, lmode: i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMResizerProps_Impl::SetInterlaceMode(this, core::mem::transmute_copy(&lmode)).into()
}
}
unsafe extern "system" fn SetClipRegion<Identity: IWMResizerProps_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, lcliporixsrc: i32, lcliporiysrc: i32, lclipwidthsrc: i32, lclipheightsrc: i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMResizerProps_Impl::SetClipRegion(this, core::mem::transmute_copy(&lcliporixsrc), core::mem::transmute_copy(&lcliporiysrc), core::mem::transmute_copy(&lclipwidthsrc), core::mem::transmute_copy(&lclipheightsrc)).into()
}
}
unsafe extern "system" fn SetFullCropRegion<Identity: IWMResizerProps_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, lcliporixsrc: i32, lcliporiysrc: i32, lclipwidthsrc: i32, lclipheightsrc: i32, lcliporixdst: i32, lcliporiydst: i32, lclipwidthdst: i32, lclipheightdst: i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMResizerProps_Impl::SetFullCropRegion(this, core::mem::transmute_copy(&lcliporixsrc), core::mem::transmute_copy(&lcliporiysrc), core::mem::transmute_copy(&lclipwidthsrc), core::mem::transmute_copy(&lclipheightsrc), core::mem::transmute_copy(&lcliporixdst), core::mem::transmute_copy(&lcliporiydst), core::mem::transmute_copy(&lclipwidthdst), core::mem::transmute_copy(&lclipheightdst)).into()
}
}
unsafe extern "system" fn GetFullCropRegion<Identity: IWMResizerProps_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, lcliporixsrc: *mut i32, lcliporiysrc: *mut i32, lclipwidthsrc: *mut i32, lclipheightsrc: *mut i32, lcliporixdst: *mut i32, lcliporiydst: *mut i32, lclipwidthdst: *mut i32, lclipheightdst: *mut i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMResizerProps_Impl::GetFullCropRegion(this, core::mem::transmute_copy(&lcliporixsrc), core::mem::transmute_copy(&lcliporiysrc), core::mem::transmute_copy(&lclipwidthsrc), core::mem::transmute_copy(&lclipheightsrc), core::mem::transmute_copy(&lcliporixdst), core::mem::transmute_copy(&lcliporiydst), core::mem::transmute_copy(&lclipwidthdst), core::mem::transmute_copy(&lclipheightdst)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetResizerQuality: SetResizerQuality::<Identity, OFFSET>,
SetInterlaceMode: SetInterlaceMode::<Identity, OFFSET>,
SetClipRegion: SetClipRegion::<Identity, OFFSET>,
SetFullCropRegion: SetFullCropRegion::<Identity, OFFSET>,
GetFullCropRegion: GetFullCropRegion::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IWMResizerProps as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IWMResizerProps {}
windows_core::imp::define_interface!(IWMSampleExtensionSupport, IWMSampleExtensionSupport_Vtbl, 0x9bca9884_0604_4c2a_87da_793ff4d586c3);
windows_core::imp::interface_hierarchy!(IWMSampleExtensionSupport, windows_core::IUnknown);
impl IWMSampleExtensionSupport {
pub unsafe fn SetUseSampleExtensions(&self, fuseextensions: bool) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetUseSampleExtensions)(windows_core::Interface::as_raw(self), fuseextensions.into()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IWMSampleExtensionSupport_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetUseSampleExtensions: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::BOOL) -> windows_core::HRESULT,
}
pub trait IWMSampleExtensionSupport_Impl: windows_core::IUnknownImpl {
fn SetUseSampleExtensions(&self, fuseextensions: windows_core::BOOL) -> windows_core::Result<()>;
}
impl IWMSampleExtensionSupport_Vtbl {
pub const fn new<Identity: IWMSampleExtensionSupport_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetUseSampleExtensions<Identity: IWMSampleExtensionSupport_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, fuseextensions: windows_core::BOOL) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMSampleExtensionSupport_Impl::SetUseSampleExtensions(this, core::mem::transmute_copy(&fuseextensions)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), SetUseSampleExtensions: SetUseSampleExtensions::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IWMSampleExtensionSupport as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IWMSampleExtensionSupport {}
windows_core::imp::define_interface!(IWMValidate, IWMValidate_Vtbl, 0xcee3def2_3808_414d_be66_fafd472210bc);
windows_core::imp::interface_hierarchy!(IWMValidate, windows_core::IUnknown);
impl IWMValidate {
pub unsafe fn SetIdentifier(&self, guidvalidationid: windows_core::GUID) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetIdentifier)(windows_core::Interface::as_raw(self), core::mem::transmute(guidvalidationid)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IWMValidate_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetIdentifier: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::GUID) -> windows_core::HRESULT,
}
pub trait IWMValidate_Impl: windows_core::IUnknownImpl {
fn SetIdentifier(&self, guidvalidationid: &windows_core::GUID) -> windows_core::Result<()>;
}
impl IWMValidate_Vtbl {
pub const fn new<Identity: IWMValidate_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetIdentifier<Identity: IWMValidate_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, guidvalidationid: windows_core::GUID) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMValidate_Impl::SetIdentifier(this, core::mem::transmute(&guidvalidationid)).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), SetIdentifier: SetIdentifier::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IWMValidate as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IWMValidate {}
windows_core::imp::define_interface!(IWMVideoDecoderHurryup, IWMVideoDecoderHurryup_Vtbl, 0x352bb3bd_2d4d_4323_9e71_dcdcfbd53ca6);
windows_core::imp::interface_hierarchy!(IWMVideoDecoderHurryup, windows_core::IUnknown);
impl IWMVideoDecoderHurryup {
pub unsafe fn SetHurryup(&self, lhurryup: i32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetHurryup)(windows_core::Interface::as_raw(self), lhurryup).ok() }
}
pub unsafe fn GetHurryup(&self, plhurryup: *mut i32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetHurryup)(windows_core::Interface::as_raw(self), plhurryup as _).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IWMVideoDecoderHurryup_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetHurryup: unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
pub GetHurryup: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
}
pub trait IWMVideoDecoderHurryup_Impl: windows_core::IUnknownImpl {
fn SetHurryup(&self, lhurryup: i32) -> windows_core::Result<()>;
fn GetHurryup(&self, plhurryup: *mut i32) -> windows_core::Result<()>;
}
impl IWMVideoDecoderHurryup_Vtbl {
pub const fn new<Identity: IWMVideoDecoderHurryup_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetHurryup<Identity: IWMVideoDecoderHurryup_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, lhurryup: i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMVideoDecoderHurryup_Impl::SetHurryup(this, core::mem::transmute_copy(&lhurryup)).into()
}
}
unsafe extern "system" fn GetHurryup<Identity: IWMVideoDecoderHurryup_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, plhurryup: *mut i32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMVideoDecoderHurryup_Impl::GetHurryup(this, core::mem::transmute_copy(&plhurryup)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetHurryup: SetHurryup::<Identity, OFFSET>,
GetHurryup: GetHurryup::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IWMVideoDecoderHurryup as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IWMVideoDecoderHurryup {}
windows_core::imp::define_interface!(IWMVideoDecoderReconBuffer, IWMVideoDecoderReconBuffer_Vtbl, 0x45bda2ac_88e2_4923_98ba_3949080711a3);
windows_core::imp::interface_hierarchy!(IWMVideoDecoderReconBuffer, windows_core::IUnknown);
impl IWMVideoDecoderReconBuffer {
pub unsafe fn GetReconstructedVideoFrameSize(&self, pdwsize: *mut u32) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).GetReconstructedVideoFrameSize)(windows_core::Interface::as_raw(self), pdwsize as _).ok() }
}
#[cfg(feature = "Win32_Media_DxMediaObjects")]
pub unsafe fn GetReconstructedVideoFrame<P0>(&self, pbuf: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::DxMediaObjects::IMediaBuffer>,
{
unsafe { (windows_core::Interface::vtable(self).GetReconstructedVideoFrame)(windows_core::Interface::as_raw(self), pbuf.param().abi()).ok() }
}
#[cfg(feature = "Win32_Media_DxMediaObjects")]
pub unsafe fn SetReconstructedVideoFrame<P0>(&self, pbuf: P0) -> windows_core::Result<()>
where
P0: windows_core::Param<super::DxMediaObjects::IMediaBuffer>,
{
unsafe { (windows_core::Interface::vtable(self).SetReconstructedVideoFrame)(windows_core::Interface::as_raw(self), pbuf.param().abi()).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IWMVideoDecoderReconBuffer_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetReconstructedVideoFrameSize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
#[cfg(feature = "Win32_Media_DxMediaObjects")]
pub GetReconstructedVideoFrame: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Media_DxMediaObjects"))]
GetReconstructedVideoFrame: usize,
#[cfg(feature = "Win32_Media_DxMediaObjects")]
pub SetReconstructedVideoFrame: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT,
#[cfg(not(feature = "Win32_Media_DxMediaObjects"))]
SetReconstructedVideoFrame: usize,
}
#[cfg(feature = "Win32_Media_DxMediaObjects")]
pub trait IWMVideoDecoderReconBuffer_Impl: windows_core::IUnknownImpl {
fn GetReconstructedVideoFrameSize(&self, pdwsize: *mut u32) -> windows_core::Result<()>;
fn GetReconstructedVideoFrame(&self, pbuf: windows_core::Ref<super::DxMediaObjects::IMediaBuffer>) -> windows_core::Result<()>;
fn SetReconstructedVideoFrame(&self, pbuf: windows_core::Ref<super::DxMediaObjects::IMediaBuffer>) -> windows_core::Result<()>;
}
#[cfg(feature = "Win32_Media_DxMediaObjects")]
impl IWMVideoDecoderReconBuffer_Vtbl {
pub const fn new<Identity: IWMVideoDecoderReconBuffer_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetReconstructedVideoFrameSize<Identity: IWMVideoDecoderReconBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pdwsize: *mut u32) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMVideoDecoderReconBuffer_Impl::GetReconstructedVideoFrameSize(this, core::mem::transmute_copy(&pdwsize)).into()
}
}
unsafe extern "system" fn GetReconstructedVideoFrame<Identity: IWMVideoDecoderReconBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbuf: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMVideoDecoderReconBuffer_Impl::GetReconstructedVideoFrame(this, core::mem::transmute_copy(&pbuf)).into()
}
}
unsafe extern "system" fn SetReconstructedVideoFrame<Identity: IWMVideoDecoderReconBuffer_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void, pbuf: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMVideoDecoderReconBuffer_Impl::SetReconstructedVideoFrame(this, core::mem::transmute_copy(&pbuf)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetReconstructedVideoFrameSize: GetReconstructedVideoFrameSize::<Identity, OFFSET>,
GetReconstructedVideoFrame: GetReconstructedVideoFrame::<Identity, OFFSET>,
SetReconstructedVideoFrame: SetReconstructedVideoFrame::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IWMVideoDecoderReconBuffer as windows_core::Interface>::IID
}
}
#[cfg(feature = "Win32_Media_DxMediaObjects")]
impl windows_core::RuntimeName for IWMVideoDecoderReconBuffer {}
windows_core::imp::define_interface!(IWMVideoForceKeyFrame, IWMVideoForceKeyFrame_Vtbl, 0x9f8496be_5b9a_41b9_a9e8_f21cd80596c2);
windows_core::imp::interface_hierarchy!(IWMVideoForceKeyFrame, windows_core::IUnknown);
impl IWMVideoForceKeyFrame {
pub unsafe fn SetKeyFrame(&self) -> windows_core::Result<()> {
unsafe { (windows_core::Interface::vtable(self).SetKeyFrame)(windows_core::Interface::as_raw(self)).ok() }
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IWMVideoForceKeyFrame_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub SetKeyFrame: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
pub trait IWMVideoForceKeyFrame_Impl: windows_core::IUnknownImpl {
fn SetKeyFrame(&self) -> windows_core::Result<()>;
}
impl IWMVideoForceKeyFrame_Vtbl {
pub const fn new<Identity: IWMVideoForceKeyFrame_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn SetKeyFrame<Identity: IWMVideoForceKeyFrame_Impl, const OFFSET: isize>(this: *mut core::ffi::c_void) -> windows_core::HRESULT {
unsafe {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IWMVideoForceKeyFrame_Impl::SetKeyFrame(this).into()
}
}
Self { base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(), SetKeyFrame: SetKeyFrame::<Identity, OFFSET> }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IWMVideoForceKeyFrame as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IWMVideoForceKeyFrame {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct KSMETHOD_OPMVIDEOOUTPUT(pub i32);
pub const KSMETHOD_OPMVIDEOOUTPUT_FINISHINITIALIZATION: KSMETHOD_OPMVIDEOOUTPUT = KSMETHOD_OPMVIDEOOUTPUT(1i32);
pub const KSMETHOD_OPMVIDEOOUTPUT_GETINFORMATION: KSMETHOD_OPMVIDEOOUTPUT = KSMETHOD_OPMVIDEOOUTPUT(2i32);
pub const KSMETHOD_OPMVIDEOOUTPUT_STARTINITIALIZATION: KSMETHOD_OPMVIDEOOUTPUT = KSMETHOD_OPMVIDEOOUTPUT(0i32);
pub const KSPROPERTYSETID_ANYCAMERACONTROL: windows_core::GUID = windows_core::GUID::from_u128(0x94dd0c30_28c7_4efb_9d6b_812300fb0c7f);
pub const KSPROPSETID_OPMVideoOutput: windows_core::GUID = windows_core::GUID::from_u128(0x06f414bb_f43a_4fe2_a566_774b4c81f0db);
pub const LOCAL_D3DFMT_DEFINES: u32 = 1u32;
pub const LOOK_DOWNSTREAM_ONLY: windows_core::GUID = windows_core::GUID::from_u128(0xac798be1_98e3_11d1_b3f1_00aa003761c5);
pub const LOOK_UPSTREAM_ONLY: windows_core::GUID = windows_core::GUID::from_u128(0xac798be0_98e3_11d1_b3f1_00aa003761c5);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MACROBLOCK_DATA {
pub flags: u32,
pub motionVectorX: i16,
pub motionVectorY: i16,
pub QPDelta: i32,
}
pub const MACROBLOCK_FLAG_DIRTY: u32 = 2u32;
pub const MACROBLOCK_FLAG_HAS_MOTION_VECTOR: u32 = 16u32;
pub const MACROBLOCK_FLAG_HAS_QP: u32 = 32u32;
pub const MACROBLOCK_FLAG_MOTION: u32 = 4u32;
pub const MACROBLOCK_FLAG_SKIP: u32 = 1u32;
pub const MACROBLOCK_FLAG_VIDEO: u32 = 8u32;
pub const MAX_SUBSTREAMS: u32 = 15u32;
pub const MEAudioSessionDeviceRemoved: MF_EVENT_TYPE = MF_EVENT_TYPE(315i32);
pub const MEAudioSessionDisconnected: MF_EVENT_TYPE = MF_EVENT_TYPE(320i32);
pub const MEAudioSessionExclusiveModeOverride: MF_EVENT_TYPE = MF_EVENT_TYPE(321i32);
pub const MEAudioSessionFormatChanged: MF_EVENT_TYPE = MF_EVENT_TYPE(319i32);
pub const MEAudioSessionGroupingParamChanged: MF_EVENT_TYPE = MF_EVENT_TYPE(317i32);
pub const MEAudioSessionIconChanged: MF_EVENT_TYPE = MF_EVENT_TYPE(318i32);
pub const MEAudioSessionNameChanged: MF_EVENT_TYPE = MF_EVENT_TYPE(313i32);
pub const MEAudioSessionServerShutdown: MF_EVENT_TYPE = MF_EVENT_TYPE(316i32);
pub const MEAudioSessionVolumeChanged: MF_EVENT_TYPE = MF_EVENT_TYPE(314i32);
pub const MEBufferingStarted: MF_EVENT_TYPE = MF_EVENT_TYPE(122i32);
pub const MEBufferingStopped: MF_EVENT_TYPE = MF_EVENT_TYPE(123i32);
pub const MEByteStreamCharacteristicsChanged: MF_EVENT_TYPE = MF_EVENT_TYPE(700i32);
pub const MECaptureAudioSessionDeviceRemoved: MF_EVENT_TYPE = MF_EVENT_TYPE(323i32);
pub const MECaptureAudioSessionDisconnected: MF_EVENT_TYPE = MF_EVENT_TYPE(325i32);
pub const MECaptureAudioSessionExclusiveModeOverride: MF_EVENT_TYPE = MF_EVENT_TYPE(326i32);
pub const MECaptureAudioSessionFormatChanged: MF_EVENT_TYPE = MF_EVENT_TYPE(324i32);
pub const MECaptureAudioSessionServerShutdown: MF_EVENT_TYPE = MF_EVENT_TYPE(327i32);
pub const MECaptureAudioSessionVolumeChanged: MF_EVENT_TYPE = MF_EVENT_TYPE(322i32);
pub const MEConnectEnd: MF_EVENT_TYPE = MF_EVENT_TYPE(125i32);
pub const MEConnectStart: MF_EVENT_TYPE = MF_EVENT_TYPE(124i32);
pub const MEContentProtectionMessage: MF_EVENT_TYPE = MF_EVENT_TYPE(402i32);
pub const MEContentProtectionMetadata: MF_EVENT_TYPE = MF_EVENT_TYPE(900i32);
pub const MEDIASINK_CANNOT_MATCH_CLOCK: u32 = 2u32;
pub const MEDIASINK_CAN_PREROLL: u32 = 16u32;
pub const MEDIASINK_CLOCK_REQUIRED: u32 = 8u32;
pub const MEDIASINK_FIXED_STREAMS: u32 = 1u32;
pub const MEDIASINK_RATELESS: u32 = 4u32;
pub const MEDIASINK_REQUIRE_REFERENCE_MEDIATYPE: u32 = 32u32;
pub const MEDIASUBTYPE_420O: windows_core::GUID = windows_core::GUID::from_u128(0x4f303234_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_708_608Data: windows_core::GUID = windows_core::GUID::from_u128(0x0af414bc_4ed2_445e_9839_8f095568ab3c);
pub const MEDIASUBTYPE_A2B10G10R10: windows_core::GUID = windows_core::GUID::from_u128(0x576f7893_bdf6_48c4_875f_ae7b81834567);
pub const MEDIASUBTYPE_A2R10G10B10: windows_core::GUID = windows_core::GUID::from_u128(0x2f8bb76d_b644_4550_acf3_d30caa65d5c5);
pub const MEDIASUBTYPE_AI44: windows_core::GUID = windows_core::GUID::from_u128(0x34344941_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_AIFF: windows_core::GUID = windows_core::GUID::from_u128(0xe436eb8d_524f_11ce_9f53_0020af0ba770);
pub const MEDIASUBTYPE_ARGB1555: windows_core::GUID = windows_core::GUID::from_u128(0x297c55af_e209_4cb3_b757_c76d6b9c88a8);
pub const MEDIASUBTYPE_ARGB1555_D3D_DX7_RT: windows_core::GUID = windows_core::GUID::from_u128(0x35314137_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_ARGB1555_D3D_DX9_RT: windows_core::GUID = windows_core::GUID::from_u128(0x35314139_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_ARGB32: windows_core::GUID = windows_core::GUID::from_u128(0x773c9ac0_3274_11d0_b724_00aa006c1a01);
pub const MEDIASUBTYPE_ARGB32_D3D_DX7_RT: windows_core::GUID = windows_core::GUID::from_u128(0x38384137_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_ARGB32_D3D_DX9_RT: windows_core::GUID = windows_core::GUID::from_u128(0x38384139_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_ARGB4444: windows_core::GUID = windows_core::GUID::from_u128(0x6e6415e6_5c24_425f_93cd_80102b3d1cca);
pub const MEDIASUBTYPE_ARGB4444_D3D_DX7_RT: windows_core::GUID = windows_core::GUID::from_u128(0x34344137_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_ARGB4444_D3D_DX9_RT: windows_core::GUID = windows_core::GUID::from_u128(0x34344139_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_AU: windows_core::GUID = windows_core::GUID::from_u128(0xe436eb8c_524f_11ce_9f53_0020af0ba770);
pub const MEDIASUBTYPE_AVC1: windows_core::GUID = windows_core::GUID::from_u128(0x31435641_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_AYUV: windows_core::GUID = windows_core::GUID::from_u128(0x56555941_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_AnalogVideo_NTSC_M: windows_core::GUID = windows_core::GUID::from_u128(0x0482dde2_7817_11cf_8a03_00aa006ecb65);
pub const MEDIASUBTYPE_AnalogVideo_PAL_B: windows_core::GUID = windows_core::GUID::from_u128(0x0482dde5_7817_11cf_8a03_00aa006ecb65);
pub const MEDIASUBTYPE_AnalogVideo_PAL_D: windows_core::GUID = windows_core::GUID::from_u128(0x0482dde6_7817_11cf_8a03_00aa006ecb65);
pub const MEDIASUBTYPE_AnalogVideo_PAL_G: windows_core::GUID = windows_core::GUID::from_u128(0x0482dde7_7817_11cf_8a03_00aa006ecb65);
pub const MEDIASUBTYPE_AnalogVideo_PAL_H: windows_core::GUID = windows_core::GUID::from_u128(0x0482dde8_7817_11cf_8a03_00aa006ecb65);
pub const MEDIASUBTYPE_AnalogVideo_PAL_I: windows_core::GUID = windows_core::GUID::from_u128(0x0482dde9_7817_11cf_8a03_00aa006ecb65);
pub const MEDIASUBTYPE_AnalogVideo_PAL_M: windows_core::GUID = windows_core::GUID::from_u128(0x0482ddea_7817_11cf_8a03_00aa006ecb65);
pub const MEDIASUBTYPE_AnalogVideo_PAL_N: windows_core::GUID = windows_core::GUID::from_u128(0x0482ddeb_7817_11cf_8a03_00aa006ecb65);
pub const MEDIASUBTYPE_AnalogVideo_PAL_N_COMBO: windows_core::GUID = windows_core::GUID::from_u128(0x0482ddec_7817_11cf_8a03_00aa006ecb65);
pub const MEDIASUBTYPE_AnalogVideo_SECAM_B: windows_core::GUID = windows_core::GUID::from_u128(0x0482ddf0_7817_11cf_8a03_00aa006ecb65);
pub const MEDIASUBTYPE_AnalogVideo_SECAM_D: windows_core::GUID = windows_core::GUID::from_u128(0x0482ddf1_7817_11cf_8a03_00aa006ecb65);
pub const MEDIASUBTYPE_AnalogVideo_SECAM_G: windows_core::GUID = windows_core::GUID::from_u128(0x0482ddf2_7817_11cf_8a03_00aa006ecb65);
pub const MEDIASUBTYPE_AnalogVideo_SECAM_H: windows_core::GUID = windows_core::GUID::from_u128(0x0482ddf3_7817_11cf_8a03_00aa006ecb65);
pub const MEDIASUBTYPE_AnalogVideo_SECAM_K: windows_core::GUID = windows_core::GUID::from_u128(0x0482ddf4_7817_11cf_8a03_00aa006ecb65);
pub const MEDIASUBTYPE_AnalogVideo_SECAM_K1: windows_core::GUID = windows_core::GUID::from_u128(0x0482ddf5_7817_11cf_8a03_00aa006ecb65);
pub const MEDIASUBTYPE_AnalogVideo_SECAM_L: windows_core::GUID = windows_core::GUID::from_u128(0x0482ddf6_7817_11cf_8a03_00aa006ecb65);
pub const MEDIASUBTYPE_Asf: windows_core::GUID = windows_core::GUID::from_u128(0x3db80f90_9412_11d1_aded_0000f8754b99);
pub const MEDIASUBTYPE_Avi: windows_core::GUID = windows_core::GUID::from_u128(0xe436eb88_524f_11ce_9f53_0020af0ba770);
pub const MEDIASUBTYPE_CC_CONTAINER: windows_core::GUID = windows_core::GUID::from_u128(0x7ea626db_54da_437b_be9f_f73073adfa3c);
pub const MEDIASUBTYPE_CFCC: windows_core::GUID = windows_core::GUID::from_u128(0x43434643_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_CLJR: windows_core::GUID = windows_core::GUID::from_u128(0x524a4c43_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_CLPL: windows_core::GUID = windows_core::GUID::from_u128(0x4c504c43_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_CPLA: windows_core::GUID = windows_core::GUID::from_u128(0x414c5043_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_DOLBY_AC3_SPDIF: windows_core::GUID = windows_core::GUID::from_u128(0x00000092_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_DOLBY_DDPLUS: windows_core::GUID = windows_core::GUID::from_u128(0xa7fb87af_2d02_42fb_a4d4_05cd93843bdd);
pub const MEDIASUBTYPE_DOLBY_TRUEHD: windows_core::GUID = windows_core::GUID::from_u128(0xeb27cec4_163e_4ca3_8b74_8e25f91b517e);
pub const MEDIASUBTYPE_DRM_Audio: windows_core::GUID = windows_core::GUID::from_u128(0x00000009_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_DTS2: windows_core::GUID = windows_core::GUID::from_u128(0x00002001_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_DTS_HD: windows_core::GUID = windows_core::GUID::from_u128(0xa2e58eb7_0fa9_48bb_a40c_fa0e156d0645);
pub const MEDIASUBTYPE_DTS_HD_HRA: windows_core::GUID = windows_core::GUID::from_u128(0xa61ac364_ad0e_4744_89ff_213ce0df8804);
pub const MEDIASUBTYPE_DVB_SUBTITLES: windows_core::GUID = windows_core::GUID::from_u128(0x34ffcbc3_d5b3_4171_9002_d4c60301697f);
pub const MEDIASUBTYPE_DVCS: windows_core::GUID = windows_core::GUID::from_u128(0x53435644_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_DVM: windows_core::GUID = windows_core::GUID::from_u128(0x00002000_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_DVSD: windows_core::GUID = windows_core::GUID::from_u128(0x44535644_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_DssAudio: windows_core::GUID = windows_core::GUID::from_u128(0xa0af4f82_e163_11d0_bad9_00609744111a);
pub const MEDIASUBTYPE_DssVideo: windows_core::GUID = windows_core::GUID::from_u128(0xa0af4f81_e163_11d0_bad9_00609744111a);
pub const MEDIASUBTYPE_DtvCcData: windows_core::GUID = windows_core::GUID::from_u128(0xf52addaa_36f0_43f5_95ea_6d866484262a);
pub const MEDIASUBTYPE_H264: windows_core::GUID = windows_core::GUID::from_u128(0x34363248_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_I420: windows_core::GUID = windows_core::GUID::from_u128(0x30323449_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_IA44: windows_core::GUID = windows_core::GUID::from_u128(0x34344149_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_IEEE_FLOAT: windows_core::GUID = windows_core::GUID::from_u128(0x00000003_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_IF09: windows_core::GUID = windows_core::GUID::from_u128(0x39304649_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_IJPG: windows_core::GUID = windows_core::GUID::from_u128(0x47504a49_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_IMC1: windows_core::GUID = windows_core::GUID::from_u128(0x31434d49_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_IMC2: windows_core::GUID = windows_core::GUID::from_u128(0x32434d49_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_IMC3: windows_core::GUID = windows_core::GUID::from_u128(0x33434d49_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_IMC4: windows_core::GUID = windows_core::GUID::from_u128(0x34434d49_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_ISDB_CAPTIONS: windows_core::GUID = windows_core::GUID::from_u128(0x059dd67d_2e55_4d41_8d1b_01f5e4f50607);
pub const MEDIASUBTYPE_ISDB_SUPERIMPOSE: windows_core::GUID = windows_core::GUID::from_u128(0x36dc6d28_f1a6_4216_9048_9cfcefeb5eba);
pub const MEDIASUBTYPE_IYUV: windows_core::GUID = windows_core::GUID::from_u128(0x56555949_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_Line21_BytePair: windows_core::GUID = windows_core::GUID::from_u128(0x6e8d4a22_310c_11d0_b79a_00aa003767a7);
pub const MEDIASUBTYPE_Line21_GOPPacket: windows_core::GUID = windows_core::GUID::from_u128(0x6e8d4a23_310c_11d0_b79a_00aa003767a7);
pub const MEDIASUBTYPE_Line21_VBIRawData: windows_core::GUID = windows_core::GUID::from_u128(0x6e8d4a24_310c_11d0_b79a_00aa003767a7);
pub const MEDIASUBTYPE_M4S2: windows_core::GUID = windows_core::GUID::from_u128(0x3253344d_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_MDVF: windows_core::GUID = windows_core::GUID::from_u128(0x4656444d_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_MJPG: windows_core::GUID = windows_core::GUID::from_u128(0x47504a4d_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_MP42: windows_core::GUID = windows_core::GUID::from_u128(0x3234504d_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_MP43: windows_core::GUID = windows_core::GUID::from_u128(0x3334504d_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_MP4S: windows_core::GUID = windows_core::GUID::from_u128(0x5334504d_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_MPEG1Audio: windows_core::GUID = windows_core::GUID::from_u128(0xe436eb87_524f_11ce_9f53_0020af0ba770);
pub const MEDIASUBTYPE_MPEG1AudioPayload: windows_core::GUID = windows_core::GUID::from_u128(0x00000050_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_MPEG1Packet: windows_core::GUID = windows_core::GUID::from_u128(0xe436eb80_524f_11ce_9f53_0020af0ba770);
pub const MEDIASUBTYPE_MPEG1Payload: windows_core::GUID = windows_core::GUID::from_u128(0xe436eb81_524f_11ce_9f53_0020af0ba770);
pub const MEDIASUBTYPE_MPEG1System: windows_core::GUID = windows_core::GUID::from_u128(0xe436eb84_524f_11ce_9f53_0020af0ba770);
pub const MEDIASUBTYPE_MPEG1Video: windows_core::GUID = windows_core::GUID::from_u128(0xe436eb86_524f_11ce_9f53_0020af0ba770);
pub const MEDIASUBTYPE_MPEG1VideoCD: windows_core::GUID = windows_core::GUID::from_u128(0xe436eb85_524f_11ce_9f53_0020af0ba770);
pub const MEDIASUBTYPE_MPEG_ADTS_AAC: windows_core::GUID = windows_core::GUID::from_u128(0x00001600_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_MPEG_HEAAC: windows_core::GUID = windows_core::GUID::from_u128(0x00001610_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_MPEG_LOAS: windows_core::GUID = windows_core::GUID::from_u128(0x00001602_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_MPEG_RAW_AAC: windows_core::GUID = windows_core::GUID::from_u128(0x00001601_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_MPG4: windows_core::GUID = windows_core::GUID::from_u128(0x3447504d_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_MSAUDIO1: windows_core::GUID = windows_core::GUID::from_u128(0x00000160_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_MSS1: windows_core::GUID = windows_core::GUID::from_u128(0x3153534d_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_MSS2: windows_core::GUID = windows_core::GUID::from_u128(0x3253534d_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_NOKIA_MPEG_ADTS_AAC: windows_core::GUID = windows_core::GUID::from_u128(0x00001608_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_NOKIA_MPEG_RAW_AAC: windows_core::GUID = windows_core::GUID::from_u128(0x00001609_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_NV11: windows_core::GUID = windows_core::GUID::from_u128(0x3131564e_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_NV12: windows_core::GUID = windows_core::GUID::from_u128(0x3231564e_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_NV24: windows_core::GUID = windows_core::GUID::from_u128(0x3432564e_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_None: windows_core::GUID = windows_core::GUID::from_u128(0xe436eb8e_524f_11ce_9f53_0020af0ba770);
pub const MEDIASUBTYPE_Overlay: windows_core::GUID = windows_core::GUID::from_u128(0xe436eb7f_524f_11ce_9f53_0020af0ba770);
pub const MEDIASUBTYPE_P010: windows_core::GUID = windows_core::GUID::from_u128(0x30313050_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_P016: windows_core::GUID = windows_core::GUID::from_u128(0x36313050_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_P208: windows_core::GUID = windows_core::GUID::from_u128(0x38303250_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_P210: windows_core::GUID = windows_core::GUID::from_u128(0x30313250_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_P216: windows_core::GUID = windows_core::GUID::from_u128(0x36313250_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_P408: windows_core::GUID = windows_core::GUID::from_u128(0x38303450_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_PCM: windows_core::GUID = windows_core::GUID::from_u128(0x00000001_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_PCMAudio_Obsolete: windows_core::GUID = windows_core::GUID::from_u128(0xe436eb8a_524f_11ce_9f53_0020af0ba770);
pub const MEDIASUBTYPE_Plum: windows_core::GUID = windows_core::GUID::from_u128(0x6d756c50_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_QTJpeg: windows_core::GUID = windows_core::GUID::from_u128(0x6765706a_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_QTMovie: windows_core::GUID = windows_core::GUID::from_u128(0xe436eb89_524f_11ce_9f53_0020af0ba770);
pub const MEDIASUBTYPE_QTRle: windows_core::GUID = windows_core::GUID::from_u128(0x20656c72_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_QTRpza: windows_core::GUID = windows_core::GUID::from_u128(0x617a7072_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_QTSmc: windows_core::GUID = windows_core::GUID::from_u128(0x20636d73_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_RAW_AAC1: windows_core::GUID = windows_core::GUID::from_u128(0x000000ff_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_RAW_SPORT: windows_core::GUID = windows_core::GUID::from_u128(0x00000240_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_RGB1: windows_core::GUID = windows_core::GUID::from_u128(0xe436eb78_524f_11ce_9f53_0020af0ba770);
pub const MEDIASUBTYPE_RGB16_D3D_DX7_RT: windows_core::GUID = windows_core::GUID::from_u128(0x36315237_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_RGB16_D3D_DX9_RT: windows_core::GUID = windows_core::GUID::from_u128(0x36315239_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_RGB24: windows_core::GUID = windows_core::GUID::from_u128(0xe436eb7d_524f_11ce_9f53_0020af0ba770);
pub const MEDIASUBTYPE_RGB32: windows_core::GUID = windows_core::GUID::from_u128(0xe436eb7e_524f_11ce_9f53_0020af0ba770);
pub const MEDIASUBTYPE_RGB32_D3D_DX7_RT: windows_core::GUID = windows_core::GUID::from_u128(0x32335237_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_RGB32_D3D_DX9_RT: windows_core::GUID = windows_core::GUID::from_u128(0x32335239_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_RGB4: windows_core::GUID = windows_core::GUID::from_u128(0xe436eb79_524f_11ce_9f53_0020af0ba770);
pub const MEDIASUBTYPE_RGB555: windows_core::GUID = windows_core::GUID::from_u128(0xe436eb7c_524f_11ce_9f53_0020af0ba770);
pub const MEDIASUBTYPE_RGB565: windows_core::GUID = windows_core::GUID::from_u128(0xe436eb7b_524f_11ce_9f53_0020af0ba770);
pub const MEDIASUBTYPE_RGB8: windows_core::GUID = windows_core::GUID::from_u128(0xe436eb7a_524f_11ce_9f53_0020af0ba770);
pub const MEDIASUBTYPE_S340: windows_core::GUID = windows_core::GUID::from_u128(0x30343353_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_S342: windows_core::GUID = windows_core::GUID::from_u128(0x32343353_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_SPDIF_TAG_241h: windows_core::GUID = windows_core::GUID::from_u128(0x00000241_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_TELETEXT: windows_core::GUID = windows_core::GUID::from_u128(0xf72a76e3_eb0a_11d0_ace4_0000c0cc16ba);
pub const MEDIASUBTYPE_TVMJ: windows_core::GUID = windows_core::GUID::from_u128(0x4a4d5654_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_UYVY: windows_core::GUID = windows_core::GUID::from_u128(0x59565955_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_V216: windows_core::GUID = windows_core::GUID::from_u128(0x36313256_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_V410: windows_core::GUID = windows_core::GUID::from_u128(0x30313456_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_VBI: windows_core::GUID = windows_core::GUID::from_u128(0x663da43c_03e8_4e9a_9cd5_bf11ed0def76);
pub const MEDIASUBTYPE_VODAFONE_MPEG_ADTS_AAC: windows_core::GUID = windows_core::GUID::from_u128(0x0000160a_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_VODAFONE_MPEG_RAW_AAC: windows_core::GUID = windows_core::GUID::from_u128(0x0000160b_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_VPS: windows_core::GUID = windows_core::GUID::from_u128(0xa1b3f620_9792_4d8d_81a4_86af25772090);
pub const MEDIASUBTYPE_VPVBI: windows_core::GUID = windows_core::GUID::from_u128(0x5a9b6a41_1a22_11d1_bad9_00609744111a);
pub const MEDIASUBTYPE_VPVideo: windows_core::GUID = windows_core::GUID::from_u128(0x5a9b6a40_1a22_11d1_bad9_00609744111a);
pub const MEDIASUBTYPE_WAKE: windows_core::GUID = windows_core::GUID::from_u128(0x454b4157_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_WAVE: windows_core::GUID = windows_core::GUID::from_u128(0xe436eb8b_524f_11ce_9f53_0020af0ba770);
pub const MEDIASUBTYPE_WMASPDIF: windows_core::GUID = windows_core::GUID::from_u128(0x00000164_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_WMAUDIO2: windows_core::GUID = windows_core::GUID::from_u128(0x00000161_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_WMAUDIO3: windows_core::GUID = windows_core::GUID::from_u128(0x00000162_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_WMAUDIO4: windows_core::GUID = windows_core::GUID::from_u128(0x00000168_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_WMAUDIO_LOSSLESS: windows_core::GUID = windows_core::GUID::from_u128(0x00000163_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_WMV1: windows_core::GUID = windows_core::GUID::from_u128(0x31564d57_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_WMV2: windows_core::GUID = windows_core::GUID::from_u128(0x32564d57_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_WMV3: windows_core::GUID = windows_core::GUID::from_u128(0x33564d57_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_WMVA: windows_core::GUID = windows_core::GUID::from_u128(0x41564d57_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_WMVB: windows_core::GUID = windows_core::GUID::from_u128(0x42564d57_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_WMVP: windows_core::GUID = windows_core::GUID::from_u128(0x50564d57_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_WMVR: windows_core::GUID = windows_core::GUID::from_u128(0x52564d57_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_WSS: windows_core::GUID = windows_core::GUID::from_u128(0x2791d576_8e7a_466f_9e90_5d3f3083738b);
pub const MEDIASUBTYPE_WVC1: windows_core::GUID = windows_core::GUID::from_u128(0x31435657_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_WVP2: windows_core::GUID = windows_core::GUID::from_u128(0x32505657_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_X264: windows_core::GUID = windows_core::GUID::from_u128(0x34363258_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_XDS: windows_core::GUID = windows_core::GUID::from_u128(0x01ca73e3_dce6_4575_afe1_2bf1c902caf3);
pub const MEDIASUBTYPE_Y210: windows_core::GUID = windows_core::GUID::from_u128(0x30313259_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_Y211: windows_core::GUID = windows_core::GUID::from_u128(0x31313259_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_Y216: windows_core::GUID = windows_core::GUID::from_u128(0x36313259_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_Y411: windows_core::GUID = windows_core::GUID::from_u128(0x31313459_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_Y41P: windows_core::GUID = windows_core::GUID::from_u128(0x50313459_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_Y41T: windows_core::GUID = windows_core::GUID::from_u128(0x54313459_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_Y42T: windows_core::GUID = windows_core::GUID::from_u128(0x54323459_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_YUY2: windows_core::GUID = windows_core::GUID::from_u128(0x32595559_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_YUYV: windows_core::GUID = windows_core::GUID::from_u128(0x56595559_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_YV12: windows_core::GUID = windows_core::GUID::from_u128(0x32315659_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_YVU9: windows_core::GUID = windows_core::GUID::from_u128(0x39555659_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_YVYU: windows_core::GUID = windows_core::GUID::from_u128(0x55595659_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_dv25: windows_core::GUID = windows_core::GUID::from_u128(0x35327664_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_dv50: windows_core::GUID = windows_core::GUID::from_u128(0x30357664_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_dvh1: windows_core::GUID = windows_core::GUID::from_u128(0x31687664_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_dvhd: windows_core::GUID = windows_core::GUID::from_u128(0x64687664_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_dvsl: windows_core::GUID = windows_core::GUID::from_u128(0x6c737664_0000_0010_8000_00aa00389b71);
pub const MEDIASUBTYPE_v210: windows_core::GUID = windows_core::GUID::from_u128(0x30313276_0000_0010_8000_00aa00389b71);
pub const MEDIATYPE_AUXLine21Data: windows_core::GUID = windows_core::GUID::from_u128(0x670aea80_3a82_11d0_b79b_00aa003767a7);
pub const MEDIATYPE_AUXTeletextPage: windows_core::GUID = windows_core::GUID::from_u128(0x11264acb_37de_4eba_8c35_7f04a1a68332);
pub const MEDIATYPE_AnalogAudio: windows_core::GUID = windows_core::GUID::from_u128(0x0482dee1_7817_11cf_8a03_00aa006ecb65);
pub const MEDIATYPE_AnalogVideo: windows_core::GUID = windows_core::GUID::from_u128(0x0482dde1_7817_11cf_8a03_00aa006ecb65);
pub const MEDIATYPE_Audio: windows_core::GUID = windows_core::GUID::from_u128(0x73647561_0000_0010_8000_00aa00389b71);
pub const MEDIATYPE_CC_CONTAINER: windows_core::GUID = windows_core::GUID::from_u128(0xaeb312e9_3357_43ca_b701_97ec198e2b62);
pub const MEDIATYPE_DTVCCData: windows_core::GUID = windows_core::GUID::from_u128(0xfb77e152_53b2_499c_b46b_509fc33edfd7);
pub const MEDIATYPE_File: windows_core::GUID = windows_core::GUID::from_u128(0x656c6966_0000_0010_8000_00aa00389b71);
pub const MEDIATYPE_Interleaved: windows_core::GUID = windows_core::GUID::from_u128(0x73766169_0000_0010_8000_00aa00389b71);
pub const MEDIATYPE_LMRT: windows_core::GUID = windows_core::GUID::from_u128(0x74726c6d_0000_0010_8000_00aa00389b71);
pub const MEDIATYPE_MPEG1SystemStream: windows_core::GUID = windows_core::GUID::from_u128(0xe436eb82_524f_11ce_9f53_0020af0ba770);
pub const MEDIATYPE_MSTVCaption: windows_core::GUID = windows_core::GUID::from_u128(0xb88b8a89_b049_4c80_adcf_5898985e22c1);
pub const MEDIATYPE_Midi: windows_core::GUID = windows_core::GUID::from_u128(0x7364696d_0000_0010_8000_00aa00389b71);
pub const MEDIATYPE_ScriptCommand: windows_core::GUID = windows_core::GUID::from_u128(0x73636d64_0000_0010_8000_00aa00389b71);
pub const MEDIATYPE_Stream: windows_core::GUID = windows_core::GUID::from_u128(0xe436eb83_524f_11ce_9f53_0020af0ba770);
pub const MEDIATYPE_Text: windows_core::GUID = windows_core::GUID::from_u128(0x73747874_0000_0010_8000_00aa00389b71);
pub const MEDIATYPE_Timecode: windows_core::GUID = windows_core::GUID::from_u128(0x0482dee3_7817_11cf_8a03_00aa006ecb65);
pub const MEDIATYPE_URL_STREAM: windows_core::GUID = windows_core::GUID::from_u128(0x736c7275_0000_0010_8000_00aa00389b71);
pub const MEDIATYPE_VBI: windows_core::GUID = windows_core::GUID::from_u128(0xf72a76e1_eb0a_11d0_ace4_0000c0cc16ba);
pub const MEDIATYPE_Video: windows_core::GUID = windows_core::GUID::from_u128(0x73646976_0000_0010_8000_00aa00389b71);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MEDIA_EVENT_GENERATOR_GET_EVENT_FLAGS(pub u32);
pub const MEDeviceStreamCreated: windows_core::GUID = windows_core::GUID::from_u128(0x0252a1cf_3540_43b4_9164_d72eb405fa40);
pub const MEDeviceThermalStateChanged: MF_EVENT_TYPE = MF_EVENT_TYPE(950i32);
pub const MEEnablerCompleted: MF_EVENT_TYPE = MF_EVENT_TYPE(119i32);
pub const MEEnablerProgress: MF_EVENT_TYPE = MF_EVENT_TYPE(118i32);
pub const MEEncodingParameters: MF_EVENT_TYPE = MF_EVENT_TYPE(803i32);
pub const MEEndOfPresentation: MF_EVENT_TYPE = MF_EVENT_TYPE(211i32);
pub const MEEndOfPresentationSegment: MF_EVENT_TYPE = MF_EVENT_TYPE(218i32);
pub const MEEndOfStream: MF_EVENT_TYPE = MF_EVENT_TYPE(212i32);
pub const MEError: MF_EVENT_TYPE = MF_EVENT_TYPE(1i32);
pub const MEExtendedType: MF_EVENT_TYPE = MF_EVENT_TYPE(2i32);
pub const MEGenericV1Anchor: MF_EVENT_TYPE = MF_EVENT_TYPE(3i32);
pub const MEIndividualizationCompleted: MF_EVENT_TYPE = MF_EVENT_TYPE(117i32);
pub const MEIndividualizationStart: MF_EVENT_TYPE = MF_EVENT_TYPE(116i32);
pub const MELicenseAcquisitionCompleted: MF_EVENT_TYPE = MF_EVENT_TYPE(115i32);
pub const MELicenseAcquisitionStart: MF_EVENT_TYPE = MF_EVENT_TYPE(114i32);
pub const MEMediaSample: MF_EVENT_TYPE = MF_EVENT_TYPE(213i32);
pub const MENewPresentation: MF_EVENT_TYPE = MF_EVENT_TYPE(113i32);
pub const MENewStream: MF_EVENT_TYPE = MF_EVENT_TYPE(205i32);
pub const MENonFatalError: MF_EVENT_TYPE = MF_EVENT_TYPE(3i32);
pub const MEPolicyChanged: MF_EVENT_TYPE = MF_EVENT_TYPE(401i32);
pub const MEPolicyError: MF_EVENT_TYPE = MF_EVENT_TYPE(120i32);
pub const MEPolicyReport: MF_EVENT_TYPE = MF_EVENT_TYPE(121i32);
pub const MEPolicySet: MF_EVENT_TYPE = MF_EVENT_TYPE(403i32);
pub const MEQualityNotify: MF_EVENT_TYPE = MF_EVENT_TYPE(311i32);
pub const MEReconnectEnd: MF_EVENT_TYPE = MF_EVENT_TYPE(127i32);
pub const MEReconnectStart: MF_EVENT_TYPE = MF_EVENT_TYPE(126i32);
pub const MERendererEvent: MF_EVENT_TYPE = MF_EVENT_TYPE(128i32);
pub const MEReservedMax: MF_EVENT_TYPE = MF_EVENT_TYPE(10000i32);
pub const MESequencerSourceTopologyUpdated: MF_EVENT_TYPE = MF_EVENT_TYPE(222i32);
pub const MESessionCapabilitiesChanged: MF_EVENT_TYPE = MF_EVENT_TYPE(110i32);
pub const MESessionClosed: MF_EVENT_TYPE = MF_EVENT_TYPE(106i32);
pub const MESessionEnded: MF_EVENT_TYPE = MF_EVENT_TYPE(107i32);
pub const MESessionNotifyPresentationTime: MF_EVENT_TYPE = MF_EVENT_TYPE(112i32);
pub const MESessionPaused: MF_EVENT_TYPE = MF_EVENT_TYPE(104i32);
pub const MESessionRateChanged: MF_EVENT_TYPE = MF_EVENT_TYPE(108i32);
pub const MESessionScrubSampleComplete: MF_EVENT_TYPE = MF_EVENT_TYPE(109i32);
pub const MESessionStarted: MF_EVENT_TYPE = MF_EVENT_TYPE(103i32);
pub const MESessionStopped: MF_EVENT_TYPE = MF_EVENT_TYPE(105i32);
pub const MESessionStreamSinkFormatChanged: MF_EVENT_TYPE = MF_EVENT_TYPE(129i32);
pub const MESessionTopologiesCleared: MF_EVENT_TYPE = MF_EVENT_TYPE(102i32);
pub const MESessionTopologySet: MF_EVENT_TYPE = MF_EVENT_TYPE(101i32);
pub const MESessionTopologyStatus: MF_EVENT_TYPE = MF_EVENT_TYPE(111i32);
pub const MESessionUnknown: MF_EVENT_TYPE = MF_EVENT_TYPE(100i32);
pub const MESessionV1Anchor: MF_EVENT_TYPE = MF_EVENT_TYPE(129i32);
pub const MESinkInvalidated: MF_EVENT_TYPE = MF_EVENT_TYPE(312i32);
pub const MESinkUnknown: MF_EVENT_TYPE = MF_EVENT_TYPE(300i32);
pub const MESinkV1Anchor: MF_EVENT_TYPE = MF_EVENT_TYPE(321i32);
pub const MESinkV2Anchor: MF_EVENT_TYPE = MF_EVENT_TYPE(327i32);
pub const MESourceCharacteristicsChanged: MF_EVENT_TYPE = MF_EVENT_TYPE(219i32);
pub const MESourceMetadataChanged: MF_EVENT_TYPE = MF_EVENT_TYPE(221i32);
pub const MESourcePaused: MF_EVENT_TYPE = MF_EVENT_TYPE(209i32);
pub const MESourceRateChangeRequested: MF_EVENT_TYPE = MF_EVENT_TYPE(220i32);
pub const MESourceRateChanged: MF_EVENT_TYPE = MF_EVENT_TYPE(217i32);
pub const MESourceSeeked: MF_EVENT_TYPE = MF_EVENT_TYPE(203i32);
pub const MESourceStarted: MF_EVENT_TYPE = MF_EVENT_TYPE(201i32);
pub const MESourceStopped: MF_EVENT_TYPE = MF_EVENT_TYPE(207i32);
pub const MESourceUnknown: MF_EVENT_TYPE = MF_EVENT_TYPE(200i32);
pub const MESourceV1Anchor: MF_EVENT_TYPE = MF_EVENT_TYPE(222i32);
pub const MEStreamFormatChanged: MF_EVENT_TYPE = MF_EVENT_TYPE(216i32);
pub const MEStreamPaused: MF_EVENT_TYPE = MF_EVENT_TYPE(210i32);
pub const MEStreamSeeked: MF_EVENT_TYPE = MF_EVENT_TYPE(204i32);
pub const MEStreamSinkDeviceChanged: MF_EVENT_TYPE = MF_EVENT_TYPE(310i32);
pub const MEStreamSinkFormatChanged: MF_EVENT_TYPE = MF_EVENT_TYPE(309i32);
pub const MEStreamSinkFormatInvalidated: MF_EVENT_TYPE = MF_EVENT_TYPE(802i32);
pub const MEStreamSinkMarker: MF_EVENT_TYPE = MF_EVENT_TYPE(306i32);
pub const MEStreamSinkPaused: MF_EVENT_TYPE = MF_EVENT_TYPE(303i32);
pub const MEStreamSinkPrerolled: MF_EVENT_TYPE = MF_EVENT_TYPE(307i32);
pub const MEStreamSinkRateChanged: MF_EVENT_TYPE = MF_EVENT_TYPE(304i32);
pub const MEStreamSinkRequestSample: MF_EVENT_TYPE = MF_EVENT_TYPE(305i32);
pub const MEStreamSinkScrubSampleComplete: MF_EVENT_TYPE = MF_EVENT_TYPE(308i32);
pub const MEStreamSinkStarted: MF_EVENT_TYPE = MF_EVENT_TYPE(301i32);
pub const MEStreamSinkStopped: MF_EVENT_TYPE = MF_EVENT_TYPE(302i32);
pub const MEStreamStarted: MF_EVENT_TYPE = MF_EVENT_TYPE(202i32);
pub const MEStreamStopped: MF_EVENT_TYPE = MF_EVENT_TYPE(208i32);
pub const MEStreamThinMode: MF_EVENT_TYPE = MF_EVENT_TYPE(215i32);
pub const MEStreamTick: MF_EVENT_TYPE = MF_EVENT_TYPE(214i32);
pub const METransformDrainComplete: MF_EVENT_TYPE = MF_EVENT_TYPE(603i32);
pub const METransformHaveOutput: MF_EVENT_TYPE = MF_EVENT_TYPE(602i32);
pub const METransformInputStreamStateChanged: MF_EVENT_TYPE = MF_EVENT_TYPE(605i32);
pub const METransformMarker: MF_EVENT_TYPE = MF_EVENT_TYPE(604i32);
pub const METransformNeedInput: MF_EVENT_TYPE = MF_EVENT_TYPE(601i32);
pub const METransformUnknown: MF_EVENT_TYPE = MF_EVENT_TYPE(600i32);
pub const METrustUnknown: MF_EVENT_TYPE = MF_EVENT_TYPE(400i32);
pub const METrustV1Anchor: MF_EVENT_TYPE = MF_EVENT_TYPE(403i32);
pub const MEUnknown: MF_EVENT_TYPE = MF_EVENT_TYPE(0i32);
pub const MEUpdatedStream: MF_EVENT_TYPE = MF_EVENT_TYPE(206i32);
pub const MEVideoCaptureDevicePreempted: MF_EVENT_TYPE = MF_EVENT_TYPE(801i32);
pub const MEVideoCaptureDeviceRemoved: MF_EVENT_TYPE = MF_EVENT_TYPE(800i32);
pub const MEWMDRMIndividualizationCompleted: MF_EVENT_TYPE = MF_EVENT_TYPE(508i32);
pub const MEWMDRMIndividualizationProgress: MF_EVENT_TYPE = MF_EVENT_TYPE(513i32);
pub const MEWMDRMLicenseAcquisitionCompleted: MF_EVENT_TYPE = MF_EVENT_TYPE(506i32);
pub const MEWMDRMLicenseBackupCompleted: MF_EVENT_TYPE = MF_EVENT_TYPE(500i32);
pub const MEWMDRMLicenseBackupProgress: MF_EVENT_TYPE = MF_EVENT_TYPE(501i32);
pub const MEWMDRMLicenseRestoreCompleted: MF_EVENT_TYPE = MF_EVENT_TYPE(502i32);
pub const MEWMDRMLicenseRestoreProgress: MF_EVENT_TYPE = MF_EVENT_TYPE(503i32);
pub const MEWMDRMLicenseStoreCleaned: MF_EVENT_TYPE = MF_EVENT_TYPE(515i32);
pub const MEWMDRMProximityCompleted: MF_EVENT_TYPE = MF_EVENT_TYPE(514i32);
pub const MEWMDRMRevocationDownloadCompleted: MF_EVENT_TYPE = MF_EVENT_TYPE(516i32);
pub const MEWMDRMV1Anchor: MF_EVENT_TYPE = MF_EVENT_TYPE(516i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF2DBuffer_LockFlags(pub i32);
pub const MF2DBuffer_LockFlags_ForceDWORD: MF2DBuffer_LockFlags = MF2DBuffer_LockFlags(2147483647i32);
pub const MF2DBuffer_LockFlags_LockTypeMask: MF2DBuffer_LockFlags = MF2DBuffer_LockFlags(3i32);
pub const MF2DBuffer_LockFlags_Read: MF2DBuffer_LockFlags = MF2DBuffer_LockFlags(1i32);
pub const MF2DBuffer_LockFlags_ReadWrite: MF2DBuffer_LockFlags = MF2DBuffer_LockFlags(3i32);
pub const MF2DBuffer_LockFlags_Write: MF2DBuffer_LockFlags = MF2DBuffer_LockFlags(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF3DVideoOutputType(pub i32);
pub const MF3DVideoOutputType_BaseView: MF3DVideoOutputType = MF3DVideoOutputType(0i32);
pub const MF3DVideoOutputType_Stereo: MF3DVideoOutputType = MF3DVideoOutputType(1i32);
pub const MFAMRNBByteStreamHandler: windows_core::GUID = windows_core::GUID::from_u128(0xefe6208a_0a2c_49fa_8a01_3768b559b6da);
pub const MFAMRNBSinkClassFactory: windows_core::GUID = windows_core::GUID::from_u128(0xb0271158_70d2_4c5b_9f94_76f549d90fdf);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MFARGB {
pub rgbBlue: u8,
pub rgbGreen: u8,
pub rgbRed: u8,
pub rgbAlpha: u8,
}
pub const MFASFINDEXER_APPROX_SEEK_TIME_UNKNOWN: u64 = 18446744073709551615u64;
pub const MFASFINDEXER_NO_FIXED_INTERVAL: u32 = 4294967295u32;
pub const MFASFINDEXER_PER_ENTRY_BYTES_DYNAMIC: u32 = 65535u32;
pub const MFASFINDEXER_READ_FOR_REVERSEPLAYBACK_OUTOFDATASEGMENT: u64 = 18446744073709551615u64;
pub const MFASFINDEXER_TYPE_TIMECODE: windows_core::GUID = windows_core::GUID::from_u128(0x49815231_6bad_44fd_810a_3f60984ec7fd);
pub const MFASFMutexType_Bitrate: windows_core::GUID = windows_core::GUID::from_u128(0x72178c2c_e45b_11d5_bc2a_00b0d0f3f4ab);
pub const MFASFMutexType_Language: windows_core::GUID = windows_core::GUID::from_u128(0x72178c2b_e45b_11d5_bc2a_00b0d0f3f4ab);
pub const MFASFMutexType_Presentation: windows_core::GUID = windows_core::GUID::from_u128(0x72178c2d_e45b_11d5_bc2a_00b0d0f3f4ab);
pub const MFASFMutexType_Unknown: windows_core::GUID = windows_core::GUID::from_u128(0x72178c2e_e45b_11d5_bc2a_00b0d0f3f4ab);
pub const MFASFSPLITTER_PACKET_BOUNDARY: windows_core::GUID = windows_core::GUID::from_u128(0xfe584a05_e8d6_42e3_b176_f1211705fb6f);
pub const MFASFSampleExtension_ContentType: windows_core::GUID = windows_core::GUID::from_u128(0xd590dc20_07bc_436c_9cf7_f3bbfbf1a4dc);
pub const MFASFSampleExtension_Encryption_KeyID: windows_core::GUID = windows_core::GUID::from_u128(0x76376591_795f_4da1_86ed_9d46eca109a9);
pub const MFASFSampleExtension_Encryption_SampleID: windows_core::GUID = windows_core::GUID::from_u128(0x6698b84e_0afa_4330_aeb2_1c0a98d7a44d);
pub const MFASFSampleExtension_FileName: windows_core::GUID = windows_core::GUID::from_u128(0xe165ec0e_19ed_45d7_b4a7_25cbd1e28e9b);
pub const MFASFSampleExtension_OutputCleanPoint: windows_core::GUID = windows_core::GUID::from_u128(0xf72a3c6f_6eb4_4ebc_b192_09ad9759e828);
pub const MFASFSampleExtension_PixelAspectRatio: windows_core::GUID = windows_core::GUID::from_u128(0x1b1ee554_f9ea_4bc8_821a_376b74e4c4b8);
pub const MFASFSampleExtension_SMPTE: windows_core::GUID = windows_core::GUID::from_u128(0x399595ec_8667_4e2d_8fdb_98814ce76c1e);
pub const MFASFSampleExtension_SampleDuration: windows_core::GUID = windows_core::GUID::from_u128(0xc6bd9450_867f_4907_83a3_c77921b733ad);
pub const MFASF_DEFAULT_BUFFER_WINDOW_MS: u32 = 3000u32;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFASF_INDEXER_FLAGS(pub i32);
pub const MFASF_INDEXER_READ_FOR_REVERSEPLAYBACK: MFASF_INDEXER_FLAGS = MFASF_INDEXER_FLAGS(2i32);
pub const MFASF_INDEXER_WRITE_FOR_LIVEREAD: MFASF_INDEXER_FLAGS = MFASF_INDEXER_FLAGS(4i32);
pub const MFASF_INDEXER_WRITE_NEW_INDEX: MFASF_INDEXER_FLAGS = MFASF_INDEXER_FLAGS(1i32);
pub const MFASF_INVALID_STREAM_NUMBER: u32 = 128u32;
pub const MFASF_MAX_STREAM_NUMBER: u32 = 127u32;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFASF_MULTIPLEXERFLAGS(pub i32);
pub const MFASF_MULTIPLEXER_AUTOADJUST_BITRATE: MFASF_MULTIPLEXERFLAGS = MFASF_MULTIPLEXERFLAGS(1i32);
pub const MFASF_PAYLOADEXTENSION_MAX_SIZE: u32 = 255u32;
pub const MFASF_PAYLOADEXTENSION_VARIABLE_SIZE: u32 = 65535u32;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFASF_SPLITTERFLAGS(pub i32);
pub const MFASF_SPLITTER_REVERSE: MFASF_SPLITTERFLAGS = MFASF_SPLITTERFLAGS(1i32);
pub const MFASF_SPLITTER_WMDRM: MFASF_SPLITTERFLAGS = MFASF_SPLITTERFLAGS(2i32);
pub const MFASF_STREAMSELECTOR_DISABLE_THINNING: MFASF_STREAMSELECTOR_FLAGS = MFASF_STREAMSELECTOR_FLAGS(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFASF_STREAMSELECTOR_FLAGS(pub i32);
pub const MFASF_STREAMSELECTOR_USE_AVERAGE_BITRATE: MFASF_STREAMSELECTOR_FLAGS = MFASF_STREAMSELECTOR_FLAGS(2i32);
windows_core::imp::define_interface!(MFASYNCRESULT, MFASYNCRESULT_Vtbl, 0);
impl core::ops::Deref for MFASYNCRESULT {
type Target = IMFAsyncResult;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(MFASYNCRESULT, windows_core::IUnknown, IMFAsyncResult);
#[repr(C)]
#[doc(hidden)]
pub struct MFASYNCRESULT_Vtbl {
pub base__: IMFAsyncResult_Vtbl,
}
pub trait MFASYNCRESULT_Impl: IMFAsyncResult_Impl {}
impl MFASYNCRESULT_Vtbl {
pub const fn new<Identity: MFASYNCRESULT_Impl, const OFFSET: isize>() -> Self {
Self { base__: IMFAsyncResult_Vtbl::new::<Identity, OFFSET>() }
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<MFASYNCRESULT as windows_core::Interface>::IID || iid == &<IMFAsyncResult as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for MFASYNCRESULT {}
pub const MFASYNC_BLOCKING_CALLBACK: u32 = 4u32;
pub const MFASYNC_CALLBACK_QUEUE_ALL: u32 = 4294967295u32;
pub const MFASYNC_CALLBACK_QUEUE_IO: u32 = 3u32;
pub const MFASYNC_CALLBACK_QUEUE_LONG_FUNCTION: u32 = 7u32;
pub const MFASYNC_CALLBACK_QUEUE_MULTITHREADED: u32 = 5u32;
pub const MFASYNC_CALLBACK_QUEUE_PRIVATE_MASK: u32 = 4294901760u32;
pub const MFASYNC_CALLBACK_QUEUE_RT: u32 = 2u32;
pub const MFASYNC_CALLBACK_QUEUE_STANDARD: u32 = 1u32;
pub const MFASYNC_CALLBACK_QUEUE_TIMER: u32 = 4u32;
pub const MFASYNC_CALLBACK_QUEUE_UNDEFINED: u32 = 0u32;
pub const MFASYNC_FAST_IO_PROCESSING_CALLBACK: u32 = 1u32;
pub const MFASYNC_LOCALIZE_REMOTE_CALLBACK: u32 = 16u32;
pub const MFASYNC_REPLY_CALLBACK: u32 = 8u32;
pub const MFASYNC_SIGNAL_CALLBACK: u32 = 2u32;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFASYNC_WORKQUEUE_TYPE(pub i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MFAYUVSample {
pub bCrValue: u8,
pub bCbValue: u8,
pub bYValue: u8,
pub bSampleAlpha8: u8,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFAudioConstriction(pub i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MFAudioDecoderDegradationInfo {
pub eDegradationReason: MFT_AUDIO_DECODER_DEGRADATION_REASON,
pub eType: MFT_AUDIO_DECODER_DEGRADATION_TYPE,
}
pub const MFAudioFormat_AAC: windows_core::GUID = windows_core::GUID::from_u128(0x00001610_0000_0010_8000_00aa00389b71);
pub const MFAudioFormat_AAC_HDCP: windows_core::GUID = windows_core::GUID::from_u128(0x419bce76_8b72_400f_adeb_84b57d63484d);
pub const MFAudioFormat_ADTS: windows_core::GUID = windows_core::GUID::from_u128(0x00001600_0000_0010_8000_00aa00389b71);
pub const MFAudioFormat_ADTS_HDCP: windows_core::GUID = windows_core::GUID::from_u128(0xda4963a3_14d8_4dcf_92b7_193eb84363db);
pub const MFAudioFormat_ALAC: windows_core::GUID = windows_core::GUID::from_u128(0x00006c61_0000_0010_8000_00aa00389b71);
pub const MFAudioFormat_AMR_NB: windows_core::GUID = windows_core::GUID::from_u128(0x00007361_0000_0010_8000_00aa00389b71);
pub const MFAudioFormat_AMR_WB: windows_core::GUID = windows_core::GUID::from_u128(0x00007362_0000_0010_8000_00aa00389b71);
pub const MFAudioFormat_AMR_WP: windows_core::GUID = windows_core::GUID::from_u128(0x00007363_0000_0010_8000_00aa00389b71);
pub const MFAudioFormat_Base: windows_core::GUID = windows_core::GUID::from_u128(0x00000000_0000_0010_8000_00aa00389b71);
pub const MFAudioFormat_Base_HDCP: windows_core::GUID = windows_core::GUID::from_u128(0x3884b5bc_e277_43fd_983d_038aa8d9b605);
pub const MFAudioFormat_DRM: windows_core::GUID = windows_core::GUID::from_u128(0x00000009_0000_0010_8000_00aa00389b71);
pub const MFAudioFormat_DTS: windows_core::GUID = windows_core::GUID::from_u128(0x00000008_0000_0010_8000_00aa00389b71);
pub const MFAudioFormat_DTS_HD: windows_core::GUID = windows_core::GUID::from_u128(0xa2e58eb7_0fa9_48bb_a40c_fa0e156d0645);
pub const MFAudioFormat_DTS_LBR: windows_core::GUID = windows_core::GUID::from_u128(0xc2fe6f0a_4e3c_4df1_9b60_50863091e4b9);
pub const MFAudioFormat_DTS_RAW: windows_core::GUID = windows_core::GUID::from_u128(0xe06d8033_db46_11cf_b4d1_00805f6cbbea);
pub const MFAudioFormat_DTS_UHD: windows_core::GUID = windows_core::GUID::from_u128(0x87020117_ace3_42de_b73e_c656706263f8);
pub const MFAudioFormat_DTS_UHDY: windows_core::GUID = windows_core::GUID::from_u128(0x9b9cca00_91b9_4ccc_883a_8f787ac3cc86);
pub const MFAudioFormat_DTS_XLL: windows_core::GUID = windows_core::GUID::from_u128(0x45b37c1b_8c70_4e59_a7be_a1e42c81c80d);
pub const MFAudioFormat_Dolby_AC3: windows_core::GUID = windows_core::GUID::from_u128(0xe06d802c_db46_11cf_b4d1_00805f6cbbea);
pub const MFAudioFormat_Dolby_AC3_HDCP: windows_core::GUID = windows_core::GUID::from_u128(0x97663a80_8ffb_4445_a6ba_792d908f497f);
pub const MFAudioFormat_Dolby_AC3_SPDIF: windows_core::GUID = windows_core::GUID::from_u128(0x00000092_0000_0010_8000_00aa00389b71);
pub const MFAudioFormat_Dolby_AC4: windows_core::GUID = windows_core::GUID::from_u128(0x0000ac40_0000_0010_8000_00aa00389b71);
pub const MFAudioFormat_Dolby_AC4_V1: windows_core::GUID = windows_core::GUID::from_u128(0x36b7927c_3d87_4a2a_9196_a21ad9e935e6);
pub const MFAudioFormat_Dolby_AC4_V1_ES: windows_core::GUID = windows_core::GUID::from_u128(0x9d8dccc6_d156_4fb8_979c_a85be7d21dfa);
pub const MFAudioFormat_Dolby_AC4_V2: windows_core::GUID = windows_core::GUID::from_u128(0x7998b2a0_17dd_49b6_8dfa_9b278552a2ac);
pub const MFAudioFormat_Dolby_AC4_V2_ES: windows_core::GUID = windows_core::GUID::from_u128(0x7e58c9f9_b070_45f4_8ccd_a99a0417c1ac);
pub const MFAudioFormat_Dolby_DDPlus: windows_core::GUID = windows_core::GUID::from_u128(0xa7fb87af_2d02_42fb_a4d4_05cd93843bdd);
pub const MFAudioFormat_FLAC: windows_core::GUID = windows_core::GUID::from_u128(0x0000f1ac_0000_0010_8000_00aa00389b71);
pub const MFAudioFormat_Float: windows_core::GUID = windows_core::GUID::from_u128(0x00000003_0000_0010_8000_00aa00389b71);
pub const MFAudioFormat_Float_SpatialObjects: windows_core::GUID = windows_core::GUID::from_u128(0xfa39cd94_bc64_4ab1_9b71_dcd09d5a7e7a);
pub const MFAudioFormat_LPCM: windows_core::GUID = windows_core::GUID::from_u128(0xe06d8032_db46_11cf_b4d1_00805f6cbbea);
pub const MFAudioFormat_MP3: windows_core::GUID = windows_core::GUID::from_u128(0x00000055_0000_0010_8000_00aa00389b71);
pub const MFAudioFormat_MPEG: windows_core::GUID = windows_core::GUID::from_u128(0x00000050_0000_0010_8000_00aa00389b71);
pub const MFAudioFormat_MSP1: windows_core::GUID = windows_core::GUID::from_u128(0x0000000a_0000_0010_8000_00aa00389b71);
pub const MFAudioFormat_Opus: windows_core::GUID = windows_core::GUID::from_u128(0x0000704f_0000_0010_8000_00aa00389b71);
pub const MFAudioFormat_PCM: windows_core::GUID = windows_core::GUID::from_u128(0x00000001_0000_0010_8000_00aa00389b71);
pub const MFAudioFormat_PCM_HDCP: windows_core::GUID = windows_core::GUID::from_u128(0xa5e7ff01_8411_4acc_a865_5f4941288d80);
pub const MFAudioFormat_Vorbis: windows_core::GUID = windows_core::GUID::from_u128(0x8d2fd10b_5841_4a6b_8905_588fec1aded9);
pub const MFAudioFormat_WMASPDIF: windows_core::GUID = windows_core::GUID::from_u128(0x00000164_0000_0010_8000_00aa00389b71);
pub const MFAudioFormat_WMAudioV8: windows_core::GUID = windows_core::GUID::from_u128(0x00000161_0000_0010_8000_00aa00389b71);
pub const MFAudioFormat_WMAudioV9: windows_core::GUID = windows_core::GUID::from_u128(0x00000162_0000_0010_8000_00aa00389b71);
pub const MFAudioFormat_WMAudio_Lossless: windows_core::GUID = windows_core::GUID::from_u128(0x00000163_0000_0010_8000_00aa00389b71);
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct MFBYTESTREAM_BUFFERING_PARAMS {
pub cbTotalFileSize: u64,
pub cbPlayableDataSize: u64,
pub prgBuckets: *mut MF_LEAKY_BUCKET_PAIR,
pub cBuckets: u32,
pub qwNetBufferingTime: u64,
pub qwExtraBufferingTimeDuringSeek: u64,
pub qwPlayDuration: u64,
pub dRate: f32,
}
impl Default for MFBYTESTREAM_BUFFERING_PARAMS {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const MFBYTESTREAM_DOES_NOT_USE_NETWORK: u32 = 2048u32;
pub const MFBYTESTREAM_HAS_SLOW_SEEK: u32 = 256u32;
pub const MFBYTESTREAM_IS_DIRECTORY: u32 = 128u32;
pub const MFBYTESTREAM_IS_PARTIALLY_DOWNLOADED: u32 = 512u32;
pub const MFBYTESTREAM_IS_READABLE: u32 = 1u32;
pub const MFBYTESTREAM_IS_REMOTE: u32 = 8u32;
pub const MFBYTESTREAM_IS_SEEKABLE: u32 = 4u32;
pub const MFBYTESTREAM_IS_WRITABLE: u32 = 2u32;
pub const MFBYTESTREAM_SEEK_FLAG_CANCEL_PENDING_IO: u32 = 1u32;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFBYTESTREAM_SEEK_ORIGIN(pub i32);
pub const MFBYTESTREAM_SHARE_WRITE: u32 = 1024u32;
pub const MFCAPTURE_METADATA_SCANLINE_VERTICAL: u32 = 4u32;
pub const MFCAPTURE_METADATA_SCAN_BOTTOM_TOP: u32 = 2u32;
pub const MFCAPTURE_METADATA_SCAN_RIGHT_LEFT: u32 = 1u32;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFCLOCK_CHARACTERISTICS_FLAGS(pub i32);
pub const MFCLOCK_CHARACTERISTICS_FLAG_ALWAYS_RUNNING: MFCLOCK_CHARACTERISTICS_FLAGS = MFCLOCK_CHARACTERISTICS_FLAGS(4i32);
pub const MFCLOCK_CHARACTERISTICS_FLAG_FREQUENCY_10MHZ: MFCLOCK_CHARACTERISTICS_FLAGS = MFCLOCK_CHARACTERISTICS_FLAGS(2i32);
pub const MFCLOCK_CHARACTERISTICS_FLAG_IS_SYSTEM_CLOCK: MFCLOCK_CHARACTERISTICS_FLAGS = MFCLOCK_CHARACTERISTICS_FLAGS(8i32);
pub const MFCLOCK_FREQUENCY_HNS: u32 = 10000000u32;
pub const MFCLOCK_JITTER_DPC: u32 = 4000u32;
pub const MFCLOCK_JITTER_ISR: u32 = 1000u32;
pub const MFCLOCK_JITTER_PASSIVE: u32 = 10000u32;
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MFCLOCK_PROPERTIES {
pub qwCorrelationRate: u64,
pub guidClockId: windows_core::GUID,
pub dwClockFlags: u32,
pub qwClockFrequency: u64,
pub dwClockTolerance: u32,
pub dwClockJitter: u32,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFCLOCK_RELATIONAL_FLAGS(pub i32);
pub const MFCLOCK_RELATIONAL_FLAG_JITTER_NEVER_AHEAD: MFCLOCK_RELATIONAL_FLAGS = MFCLOCK_RELATIONAL_FLAGS(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFCLOCK_STATE(pub i32);
pub const MFCLOCK_STATE_INVALID: MFCLOCK_STATE = MFCLOCK_STATE(0i32);
pub const MFCLOCK_STATE_PAUSED: MFCLOCK_STATE = MFCLOCK_STATE(3i32);
pub const MFCLOCK_STATE_RUNNING: MFCLOCK_STATE = MFCLOCK_STATE(1i32);
pub const MFCLOCK_STATE_STOPPED: MFCLOCK_STATE = MFCLOCK_STATE(2i32);
pub const MFCLOCK_TOLERANCE_UNKNOWN: u32 = 50000u32;
pub const MFCONNECTOR_AGP: windows_core::GUID = windows_core::GUID::from_u128(0xac3aef60_ce43_11d9_92db_000bdb28ff98);
pub const MFCONNECTOR_COMPONENT: windows_core::GUID = windows_core::GUID::from_u128(0x57cd596b_ce47_11d9_92db_000bdb28ff98);
pub const MFCONNECTOR_COMPOSITE: windows_core::GUID = windows_core::GUID::from_u128(0x57cd596a_ce47_11d9_92db_000bdb28ff98);
pub const MFCONNECTOR_DISPLAYPORT_EMBEDDED: windows_core::GUID = windows_core::GUID::from_u128(0x57cd5973_ce47_11d9_92db_000bdb28ff98);
pub const MFCONNECTOR_DISPLAYPORT_EXTERNAL: windows_core::GUID = windows_core::GUID::from_u128(0x57cd5972_ce47_11d9_92db_000bdb28ff98);
pub const MFCONNECTOR_DVI: windows_core::GUID = windows_core::GUID::from_u128(0x57cd596c_ce47_11d9_92db_000bdb28ff98);
pub const MFCONNECTOR_D_JPN: windows_core::GUID = windows_core::GUID::from_u128(0x57cd5970_ce47_11d9_92db_000bdb28ff98);
pub const MFCONNECTOR_HDMI: windows_core::GUID = windows_core::GUID::from_u128(0x57cd596d_ce47_11d9_92db_000bdb28ff98);
pub const MFCONNECTOR_LVDS: windows_core::GUID = windows_core::GUID::from_u128(0x57cd596e_ce47_11d9_92db_000bdb28ff98);
pub const MFCONNECTOR_MIRACAST: windows_core::GUID = windows_core::GUID::from_u128(0x57cd5977_ce47_11d9_92db_000bdb28ff98);
pub const MFCONNECTOR_PCI: windows_core::GUID = windows_core::GUID::from_u128(0xac3aef5d_ce43_11d9_92db_000bdb28ff98);
pub const MFCONNECTOR_PCIX: windows_core::GUID = windows_core::GUID::from_u128(0xac3aef5e_ce43_11d9_92db_000bdb28ff98);
pub const MFCONNECTOR_PCI_Express: windows_core::GUID = windows_core::GUID::from_u128(0xac3aef5f_ce43_11d9_92db_000bdb28ff98);
pub const MFCONNECTOR_SDI: windows_core::GUID = windows_core::GUID::from_u128(0x57cd5971_ce47_11d9_92db_000bdb28ff98);
pub const MFCONNECTOR_SPDIF: windows_core::GUID = windows_core::GUID::from_u128(0x0b94a712_ad3e_4cee_83ce_ce32e3db6522);
pub const MFCONNECTOR_SVIDEO: windows_core::GUID = windows_core::GUID::from_u128(0x57cd5969_ce47_11d9_92db_000bdb28ff98);
pub const MFCONNECTOR_TRANSPORT_AGNOSTIC_DIGITAL_MODE_A: windows_core::GUID = windows_core::GUID::from_u128(0x57cd5978_ce47_11d9_92db_000bdb28ff98);
pub const MFCONNECTOR_TRANSPORT_AGNOSTIC_DIGITAL_MODE_B: windows_core::GUID = windows_core::GUID::from_u128(0x57cd5979_ce47_11d9_92db_000bdb28ff98);
pub const MFCONNECTOR_UDI_EMBEDDED: windows_core::GUID = windows_core::GUID::from_u128(0x57cd5975_ce47_11d9_92db_000bdb28ff98);
pub const MFCONNECTOR_UDI_EXTERNAL: windows_core::GUID = windows_core::GUID::from_u128(0x57cd5974_ce47_11d9_92db_000bdb28ff98);
pub const MFCONNECTOR_UNKNOWN: windows_core::GUID = windows_core::GUID::from_u128(0xac3aef5c_ce43_11d9_92db_000bdb28ff98);
pub const MFCONNECTOR_VGA: windows_core::GUID = windows_core::GUID::from_u128(0x57cd5968_ce47_11d9_92db_000bdb28ff98);
pub const MFCONTENTPROTECTIONDEVICE_FUNCTIONID_START: u32 = 67108864u32;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct MFCONTENTPROTECTIONDEVICE_INPUT_DATA {
pub HWProtectionFunctionID: u32,
pub PrivateDataByteCount: u32,
pub HWProtectionDataByteCount: u32,
pub Reserved: u32,
pub InputData: [u8; 4],
}
impl Default for MFCONTENTPROTECTIONDEVICE_INPUT_DATA {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct MFCONTENTPROTECTIONDEVICE_OUTPUT_DATA {
pub PrivateDataByteCount: u32,
pub MaxHWProtectionDataByteCount: u32,
pub HWProtectionDataByteCount: u32,
pub Status: windows_core::HRESULT,
pub TransportTimeInHundredsOfNanoseconds: i64,
pub ExecutionTimeInHundredsOfNanoseconds: i64,
pub OutputData: [u8; 4],
}
impl Default for MFCONTENTPROTECTIONDEVICE_OUTPUT_DATA {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct MFCONTENTPROTECTIONDEVICE_REALTIMECLIENT_DATA {
pub TaskIndex: u32,
pub ClassName: [u16; 260],
pub BasePriority: i32,
}
impl Default for MFCONTENTPROTECTIONDEVICE_REALTIMECLIENT_DATA {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const MFCONTENTPROTECTIONDEVICE_REALTIMECLIENT_DATA_FUNCTIONID: u32 = 67108864u32;
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MFCameraExtrinsic_CalibratedTransform {
pub CalibrationId: windows_core::GUID,
pub Position: MF_FLOAT3,
pub Orientation: MF_QUATERNION,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct MFCameraExtrinsics {
pub TransformCount: u32,
pub CalibratedTransforms: [MFCameraExtrinsic_CalibratedTransform; 1],
}
impl Default for MFCameraExtrinsics {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MFCameraIntrinsic_CameraModel {
pub FocalLength_x: f32,
pub FocalLength_y: f32,
pub PrincipalPoint_x: f32,
pub PrincipalPoint_y: f32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MFCameraIntrinsic_DistortionModel {
pub Radial_k1: f32,
pub Radial_k2: f32,
pub Radial_k3: f32,
pub Tangential_p1: f32,
pub Tangential_p2: f32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MFCameraIntrinsic_DistortionModel6KT {
pub Radial_k1: f32,
pub Radial_k2: f32,
pub Radial_k3: f32,
pub Radial_k4: f32,
pub Radial_k5: f32,
pub Radial_k6: f32,
pub Tangential_p1: f32,
pub Tangential_p2: f32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MFCameraIntrinsic_DistortionModelArcTan {
pub Radial_k0: f32,
pub DistortionCenter_x: f32,
pub DistortionCenter_y: f32,
pub Tangential_x: f32,
pub Tangential_y: f32,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFCameraIntrinsic_DistortionModelType(pub i32);
pub const MFCameraIntrinsic_DistortionModelType_6KT: MFCameraIntrinsic_DistortionModelType = MFCameraIntrinsic_DistortionModelType(0i32);
pub const MFCameraIntrinsic_DistortionModelType_ArcTan: MFCameraIntrinsic_DistortionModelType = MFCameraIntrinsic_DistortionModelType(1i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MFCameraIntrinsic_PinholeCameraModel {
pub FocalLength: MF_FLOAT2,
pub PrincipalPoint: MF_FLOAT2,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFCameraOcclusionState(pub i32);
impl MFCameraOcclusionState {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for MFCameraOcclusionState {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for MFCameraOcclusionState {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for MFCameraOcclusionState {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for MFCameraOcclusionState {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for MFCameraOcclusionState {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const MFCameraOcclusionState_OccludedByCameraHardware: MFCameraOcclusionState = MFCameraOcclusionState(2i32);
pub const MFCameraOcclusionState_OccludedByLid: MFCameraOcclusionState = MFCameraOcclusionState(1i32);
pub const MFCameraOcclusionState_Open: MFCameraOcclusionState = MFCameraOcclusionState(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFDepthMeasurement(pub i32);
pub const MFENABLETYPE_MF_RebootRequired: windows_core::GUID = windows_core::GUID::from_u128(0x6d4d3d4b_0ece_4652_8b3a_f2d24260d887);
pub const MFENABLETYPE_MF_UpdateRevocationInformation: windows_core::GUID = windows_core::GUID::from_u128(0xe558b0b5_b3c4_44a0_924c_50d178932385);
pub const MFENABLETYPE_MF_UpdateUntrustedComponent: windows_core::GUID = windows_core::GUID::from_u128(0x9879f3d6_cee2_48e6_b573_9767ab172f16);
pub const MFENABLETYPE_WMDRMV1_LicenseAcquisition: windows_core::GUID = windows_core::GUID::from_u128(0x4ff6eeaf_0b43_4797_9b85_abf31815e7b0);
pub const MFENABLETYPE_WMDRMV7_Individualization: windows_core::GUID = windows_core::GUID::from_u128(0xacd2c84a_b303_4f65_bc2c_2c848d01a989);
pub const MFENABLETYPE_WMDRMV7_LicenseAcquisition: windows_core::GUID = windows_core::GUID::from_u128(0x003306df_4a06_4884_a097_ef6d22ec84a3);
pub const MFEVRDLL: u32 = 0u32;
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MFExtendedCameraIntrinsic_IntrinsicModel {
pub Width: u32,
pub Height: u32,
pub SplitFrameId: u32,
pub CameraModel: MFCameraIntrinsic_CameraModel,
}
pub const MFFLACBytestreamHandler: windows_core::GUID = windows_core::GUID::from_u128(0x0e41cfb8_0506_40f4_a516_77cc23642d91);
pub const MFFLACSinkClassFactory: windows_core::GUID = windows_core::GUID::from_u128(0x7d39c56f_6075_47c9_9bae_8cf9e531b5f5);
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct MFFOLDDOWN_MATRIX {
pub cbSize: u32,
pub cSrcChannels: u32,
pub cDstChannels: u32,
pub dwChannelMask: u32,
pub Coeff: [i32; 64],
}
impl Default for MFFOLDDOWN_MATRIX {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFFrameSourceTypes(pub i32);
pub const MFFrameSourceTypes_Color: MFFrameSourceTypes = MFFrameSourceTypes(1i32);
pub const MFFrameSourceTypes_Custom: MFFrameSourceTypes = MFFrameSourceTypes(128i32);
pub const MFFrameSourceTypes_Depth: MFFrameSourceTypes = MFFrameSourceTypes(4i32);
pub const MFFrameSourceTypes_Image: MFFrameSourceTypes = MFFrameSourceTypes(8i32);
pub const MFFrameSourceTypes_Infrared: MFFrameSourceTypes = MFFrameSourceTypes(2i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct MFINPUTTRUSTAUTHORITY_ACCESS_ACTION {
pub Action: MFPOLICYMANAGER_ACTION,
pub pbTicket: *mut u8,
pub cbTicket: u32,
}
impl Default for MFINPUTTRUSTAUTHORITY_ACCESS_ACTION {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct MFINPUTTRUSTAUTHORITY_ACCESS_PARAMS {
pub dwSize: u32,
pub dwVer: u32,
pub cbSignatureOffset: u32,
pub cbSignatureSize: u32,
pub cbExtensionOffset: u32,
pub cbExtensionSize: u32,
pub cActions: u32,
pub rgOutputActions: [MFINPUTTRUSTAUTHORITY_ACCESS_ACTION; 1],
}
impl Default for MFINPUTTRUSTAUTHORITY_ACCESS_PARAMS {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const MFImageFormat_JPEG: windows_core::GUID = windows_core::GUID::from_u128(0x19e4a5aa_5662_4fc5_a0c0_1758028e1057);
pub const MFImageFormat_RGB32: windows_core::GUID = windows_core::GUID::from_u128(0x00000016_0000_0010_8000_00aa00389b71);
pub const MFMEDIASOURCE_CAN_PAUSE: MFMEDIASOURCE_CHARACTERISTICS = MFMEDIASOURCE_CHARACTERISTICS(4i32);
pub const MFMEDIASOURCE_CAN_SEEK: MFMEDIASOURCE_CHARACTERISTICS = MFMEDIASOURCE_CHARACTERISTICS(2i32);
pub const MFMEDIASOURCE_CAN_SKIPBACKWARD: MFMEDIASOURCE_CHARACTERISTICS = MFMEDIASOURCE_CHARACTERISTICS(64i32);
pub const MFMEDIASOURCE_CAN_SKIPFORWARD: MFMEDIASOURCE_CHARACTERISTICS = MFMEDIASOURCE_CHARACTERISTICS(32i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFMEDIASOURCE_CHARACTERISTICS(pub i32);
pub const MFMEDIASOURCE_DOES_NOT_USE_NETWORK: MFMEDIASOURCE_CHARACTERISTICS = MFMEDIASOURCE_CHARACTERISTICS(128i32);
pub const MFMEDIASOURCE_HAS_MULTIPLE_PRESENTATIONS: MFMEDIASOURCE_CHARACTERISTICS = MFMEDIASOURCE_CHARACTERISTICS(16i32);
pub const MFMEDIASOURCE_HAS_SLOW_SEEK: MFMEDIASOURCE_CHARACTERISTICS = MFMEDIASOURCE_CHARACTERISTICS(8i32);
pub const MFMEDIASOURCE_IS_LIVE: MFMEDIASOURCE_CHARACTERISTICS = MFMEDIASOURCE_CHARACTERISTICS(1i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MFMPEG2DLNASINKSTATS {
pub cBytesWritten: u64,
pub fPAL: windows_core::BOOL,
pub fccVideo: u32,
pub dwVideoWidth: u32,
pub dwVideoHeight: u32,
pub cVideoFramesReceived: u64,
pub cVideoFramesEncoded: u64,
pub cVideoFramesSkipped: u64,
pub cBlackVideoFramesEncoded: u64,
pub cVideoFramesDuplicated: u64,
pub cAudioSamplesPerSec: u32,
pub cAudioChannels: u32,
pub cAudioBytesReceived: u64,
pub cAudioFramesEncoded: u64,
}
pub const MFMPEG4Format_Base: windows_core::GUID = windows_core::GUID::from_u128(0x00000000_767a_494d_b478_f29d25dc9037);
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct MFMediaKeyStatus {
pub pbKeyId: *mut u8,
pub cbKeyId: u32,
pub eMediaKeyStatus: MF_MEDIAKEY_STATUS,
}
impl Default for MFMediaKeyStatus {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const MFMediaType_Audio: windows_core::GUID = windows_core::GUID::from_u128(0x73647561_0000_0010_8000_00aa00389b71);
pub const MFMediaType_Binary: windows_core::GUID = windows_core::GUID::from_u128(0x72178c25_e45b_11d5_bc2a_00b0d0f3f4ab);
pub const MFMediaType_Default: windows_core::GUID = windows_core::GUID::from_u128(0x81a412e6_8103_4b06_857f_1862781024ac);
pub const MFMediaType_FileTransfer: windows_core::GUID = windows_core::GUID::from_u128(0x72178c26_e45b_11d5_bc2a_00b0d0f3f4ab);
pub const MFMediaType_HTML: windows_core::GUID = windows_core::GUID::from_u128(0x72178c24_e45b_11d5_bc2a_00b0d0f3f4ab);
pub const MFMediaType_Image: windows_core::GUID = windows_core::GUID::from_u128(0x72178c23_e45b_11d5_bc2a_00b0d0f3f4ab);
pub const MFMediaType_Metadata: windows_core::GUID = windows_core::GUID::from_u128(0x2c8fa20c_82bb_4782_90a0_98a2a5bd8ef8);
pub const MFMediaType_MultiplexedFrames: windows_core::GUID = windows_core::GUID::from_u128(0x6ea542b0_281f_4231_a464_fe2f5022501c);
pub const MFMediaType_Perception: windows_core::GUID = windows_core::GUID::from_u128(0x597ff6f9_6ea2_4670_85b4_ea84073fe940);
pub const MFMediaType_Protected: windows_core::GUID = windows_core::GUID::from_u128(0x7b4b6fe6_9d04_4494_be14_7e0bd076c8e4);
pub const MFMediaType_SAMI: windows_core::GUID = windows_core::GUID::from_u128(0xe69669a0_3dcd_40cb_9e2e_3708387c0616);
pub const MFMediaType_Script: windows_core::GUID = windows_core::GUID::from_u128(0x72178c22_e45b_11d5_bc2a_00b0d0f3f4ab);
pub const MFMediaType_Stream: windows_core::GUID = windows_core::GUID::from_u128(0xe436eb83_524f_11ce_9f53_0020af0ba770);
pub const MFMediaType_Subtitle: windows_core::GUID = windows_core::GUID::from_u128(0xa6d13581_ed50_4e65_ae08_26065576aacc);
pub const MFMediaType_Video: windows_core::GUID = windows_core::GUID::from_u128(0x73646976_0000_0010_8000_00aa00389b71);
pub const MFNETSOURCE_ACCELERATEDSTREAMINGDURATION: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f277_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_AUTORECONNECTLIMIT: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f27a_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_AUTORECONNECTPROGRESS: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f282_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_AVGBANDWIDTHBPS_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(8i32);
pub const MFNETSOURCE_BROWSERUSERAGENT: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f28b_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_BROWSERWEBPAGE: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f28c_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_BUFFERINGCOUNT_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(21i32);
pub const MFNETSOURCE_BUFFERINGTIME: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f276_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_BUFFERPROGRESS_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(17i32);
pub const MFNETSOURCE_BUFFERSIZE_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(16i32);
pub const MFNETSOURCE_BYTESRECEIVED_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(9i32);
pub const MFNETSOURCE_CACHEENABLED: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f279_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_CACHE_ACTIVE_COMPLETE: MFNETSOURCE_CACHE_STATE = MFNETSOURCE_CACHE_STATE(2i32);
pub const MFNETSOURCE_CACHE_ACTIVE_WRITING: MFNETSOURCE_CACHE_STATE = MFNETSOURCE_CACHE_STATE(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFNETSOURCE_CACHE_STATE(pub i32);
pub const MFNETSOURCE_CACHE_STATE_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(12i32);
pub const MFNETSOURCE_CACHE_UNAVAILABLE: MFNETSOURCE_CACHE_STATE = MFNETSOURCE_CACHE_STATE(0i32);
pub const MFNETSOURCE_CLIENTGUID: windows_core::GUID = windows_core::GUID::from_u128(0x60a2c4a6_f197_4c14_a5bf_88830d2458af);
pub const MFNETSOURCE_CONNECTIONBANDWIDTH: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f278_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_CONTENTBITRATE_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(14i32);
pub const MFNETSOURCE_CREDENTIAL_MANAGER: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f280_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_CROSS_ORIGIN_SUPPORT: windows_core::GUID = windows_core::GUID::from_u128(0x9842207c_b02c_4271_a2fc_72e49308e5c2);
pub const MFNETSOURCE_DOWNLOADPROGRESS_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(28i32);
pub const MFNETSOURCE_DRMNET_LICENSE_REPRESENTATION: windows_core::GUID = windows_core::GUID::from_u128(0x47eae1bd_bdfe_42e2_82f3_54a48c17962d);
pub const MFNETSOURCE_ENABLE_DOWNLOAD: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f29d_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_ENABLE_HTTP: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f299_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_ENABLE_MSB: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f296_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_ENABLE_PRIVATEMODE: windows_core::GUID = windows_core::GUID::from_u128(0x824779d8_f18b_4405_8cf1_464fb5aa8f71);
pub const MFNETSOURCE_ENABLE_RTSP: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f298_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_ENABLE_STREAMING: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f29c_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_ENABLE_TCP: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f295_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_ENABLE_UDP: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f294_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_FILE: MFNETSOURCE_PROTOCOL_TYPE = MFNETSOURCE_PROTOCOL_TYPE(3i32);
pub const MFNETSOURCE_FRIENDLYNAME: windows_core::GUID = windows_core::GUID::from_u128(0x5b2a7757_bc6b_447e_aa06_0dda1c646e2f);
pub const MFNETSOURCE_HOSTEXE: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f28f_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_HOSTVERSION: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f291_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_HTTP: MFNETSOURCE_PROTOCOL_TYPE = MFNETSOURCE_PROTOCOL_TYPE(1i32);
pub const MFNETSOURCE_HTTP_DOWNLOAD_SESSION_PROVIDER: windows_core::GUID = windows_core::GUID::from_u128(0x7d55081e_307d_4d6d_a663_a93be97c4b5c);
pub const MFNETSOURCE_INCORRECTLYSIGNEDPACKETS_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(22i32);
pub const MFNETSOURCE_LASTBWSWITCHTS_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(18i32);
pub const MFNETSOURCE_LINKBANDWIDTH_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(13i32);
pub const MFNETSOURCE_LOGPARAMS: windows_core::GUID = windows_core::GUID::from_u128(0x64936ae8_9418_453a_8cda_3e0a668b353b);
pub const MFNETSOURCE_LOGURL: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f293_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_LOSTPACKETS_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(1i32);
pub const MFNETSOURCE_MAXBITRATE_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(24i32);
pub const MFNETSOURCE_MAXBUFFERTIMEMS: windows_core::GUID = windows_core::GUID::from_u128(0x408b24e6_4038_4401_b5b2_fe701a9ebf10);
pub const MFNETSOURCE_MAXUDPACCELERATEDSTREAMINGDURATION: windows_core::GUID = windows_core::GUID::from_u128(0x4aab2879_bbe1_4994_9ff0_5495bd250129);
pub const MFNETSOURCE_MULTICAST: MFNETSOURCE_PROTOCOL_TYPE = MFNETSOURCE_PROTOCOL_TYPE(4i32);
pub const MFNETSOURCE_OUTPACKETS_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(6i32);
pub const MFNETSOURCE_PEERMANAGER: windows_core::GUID = windows_core::GUID::from_u128(0x48b29adb_febf_45ee_a9bf_efb81c492efc);
pub const MFNETSOURCE_PLAYERID: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f28e_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_PLAYERUSERAGENT: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f292_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_PLAYERVERSION: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f28d_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_PPBANDWIDTH: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f281_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_PREVIEWMODEENABLED: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f27f_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_PROTOCOL: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f27d_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_PROTOCOL_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(10i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFNETSOURCE_PROTOCOL_TYPE(pub i32);
pub const MFNETSOURCE_PROXYBYPASSFORLOCAL: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f286_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_PROXYEXCEPTIONLIST: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f285_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_PROXYHOSTNAME: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f284_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_PROXYINFO: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f29b_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_PROXYLOCATORFACTORY: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f283_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_PROXYPORT: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f288_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_PROXYRERUNAUTODETECTION: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f289_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_PROXYSETTINGS: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f287_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_RECEPTION_QUALITY_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(25i32);
pub const MFNETSOURCE_RECOVEREDBYECCPACKETS_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(4i32);
pub const MFNETSOURCE_RECOVEREDBYRTXPACKETS_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(5i32);
pub const MFNETSOURCE_RECOVEREDPACKETS_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(26i32);
pub const MFNETSOURCE_RECVPACKETS_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(0i32);
pub const MFNETSOURCE_RECVRATE_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(7i32);
pub const MFNETSOURCE_RESENDSENABLED: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f27b_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_RESENDSRECEIVED_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(3i32);
pub const MFNETSOURCE_RESENDSREQUESTED_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(2i32);
pub const MFNETSOURCE_RESOURCE_FILTER: windows_core::GUID = windows_core::GUID::from_u128(0x815d0ff6_265a_4477_9e46_7b80ad80b5fb);
pub const MFNETSOURCE_RTSP: MFNETSOURCE_PROTOCOL_TYPE = MFNETSOURCE_PROTOCOL_TYPE(2i32);
pub const MFNETSOURCE_SEEKRANGEEND_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(20i32);
pub const MFNETSOURCE_SEEKRANGESTART_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(19i32);
pub const MFNETSOURCE_SIGNEDSESSION_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(23i32);
pub const MFNETSOURCE_SPEEDFACTOR_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(15i32);
pub const MFNETSOURCE_SSLCERTIFICATE_MANAGER: windows_core::GUID = windows_core::GUID::from_u128(0x55e6cb27_e69b_4267_940c_2d7ec5bb8a0f);
pub const MFNETSOURCE_STATISTICS: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f274_0505_4c5d_ae71_0a556344efa1);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFNETSOURCE_STATISTICS_IDS(pub i32);
pub const MFNETSOURCE_STATISTICS_SERVICE: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f275_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_STREAM_LANGUAGE: windows_core::GUID = windows_core::GUID::from_u128(0x9ab44318_f7cd_4f2d_8d6d_fa35b492cecb);
pub const MFNETSOURCE_TCP: MFNETSOURCE_TRANSPORT_TYPE = MFNETSOURCE_TRANSPORT_TYPE(1i32);
pub const MFNETSOURCE_THINNINGENABLED: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f27c_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_TRANSPORT: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f27e_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_TRANSPORT_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(11i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFNETSOURCE_TRANSPORT_TYPE(pub i32);
pub const MFNETSOURCE_UDP: MFNETSOURCE_TRANSPORT_TYPE = MFNETSOURCE_TRANSPORT_TYPE(0i32);
pub const MFNETSOURCE_UDP_PORT_RANGE: windows_core::GUID = windows_core::GUID::from_u128(0x3cb1f29a_0505_4c5d_ae71_0a556344efa1);
pub const MFNETSOURCE_UNDEFINED: MFNETSOURCE_PROTOCOL_TYPE = MFNETSOURCE_PROTOCOL_TYPE(0i32);
pub const MFNETSOURCE_UNPREDEFINEDPROTOCOLNAME_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(29i32);
pub const MFNETSOURCE_VBR_ID: MFNETSOURCE_STATISTICS_IDS = MFNETSOURCE_STATISTICS_IDS(27i32);
pub const MFNET_AUTHENTICATION_CLEAR_TEXT: MFNetAuthenticationFlags = MFNetAuthenticationFlags(2i32);
pub const MFNET_AUTHENTICATION_LOGGED_ON_USER: MFNetAuthenticationFlags = MFNetAuthenticationFlags(4i32);
pub const MFNET_AUTHENTICATION_PROXY: MFNetAuthenticationFlags = MFNetAuthenticationFlags(1i32);
pub const MFNET_CREDENTIAL_ALLOW_CLEAR_TEXT: MFNetCredentialOptions = MFNetCredentialOptions(4i32);
pub const MFNET_CREDENTIAL_DONT_CACHE: MFNetCredentialOptions = MFNetCredentialOptions(2i32);
pub const MFNET_CREDENTIAL_SAVE: MFNetCredentialOptions = MFNetCredentialOptions(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFNET_PROXYSETTINGS(pub i32);
pub const MFNET_PROXYSETTING_AUTO: MFNET_PROXYSETTINGS = MFNET_PROXYSETTINGS(2i32);
pub const MFNET_PROXYSETTING_BROWSER: MFNET_PROXYSETTINGS = MFNET_PROXYSETTINGS(3i32);
pub const MFNET_PROXYSETTING_MANUAL: MFNET_PROXYSETTINGS = MFNET_PROXYSETTINGS(1i32);
pub const MFNET_PROXYSETTING_NONE: MFNET_PROXYSETTINGS = MFNET_PROXYSETTINGS(0i32);
pub const MFNET_SAVEJOB_SERVICE: windows_core::GUID = windows_core::GUID::from_u128(0xb85a587f_3d02_4e52_9565_55d3ec1e7ff7);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFNetAuthenticationFlags(pub i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MFNetCredentialManagerGetParam {
pub hrOp: windows_core::HRESULT,
pub fAllowLoggedOnUser: windows_core::BOOL,
pub fClearTextPackage: windows_core::BOOL,
pub pszUrl: windows_core::PCWSTR,
pub pszSite: windows_core::PCWSTR,
pub pszRealm: windows_core::PCWSTR,
pub pszPackage: windows_core::PCWSTR,
pub nRetries: i32,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFNetCredentialOptions(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFNetCredentialRequirements(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFNominalRange(pub i32);
pub const MFNominalRange_0_255: MFNominalRange = MFNominalRange(1i32);
pub const MFNominalRange_16_235: MFNominalRange = MFNominalRange(2i32);
pub const MFNominalRange_48_208: MFNominalRange = MFNominalRange(3i32);
pub const MFNominalRange_64_127: MFNominalRange = MFNominalRange(4i32);
pub const MFNominalRange_ForceDWORD: MFNominalRange = MFNominalRange(2147483647i32);
pub const MFNominalRange_Last: MFNominalRange = MFNominalRange(5i32);
pub const MFNominalRange_Normal: MFNominalRange = MFNominalRange(1i32);
pub const MFNominalRange_Unknown: MFNominalRange = MFNominalRange(0i32);
pub const MFNominalRange_Wide: MFNominalRange = MFNominalRange(2i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MFOffset {
pub fract: u16,
pub value: i16,
}
pub type MFPERIODICCALLBACK = Option<unsafe extern "system" fn(pcontext: windows_core::Ref<windows_core::IUnknown>)>;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFPMPSESSION_CREATION_FLAGS(pub i32);
pub const MFPMPSESSION_IN_PROCESS: MFPMPSESSION_CREATION_FLAGS = MFPMPSESSION_CREATION_FLAGS(2i32);
pub const MFPMPSESSION_UNPROTECTED_PROCESS: MFPMPSESSION_CREATION_FLAGS = MFPMPSESSION_CREATION_FLAGS(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFPOLICYMANAGER_ACTION(pub i32);
pub const MFPROTECTIONATTRIBUTE_BEST_EFFORT: windows_core::GUID = windows_core::GUID::from_u128(0xc8e06331_75f0_4ec1_8e77_17578f773b46);
pub const MFPROTECTIONATTRIBUTE_CONSTRICTVIDEO_IMAGESIZE: windows_core::GUID = windows_core::GUID::from_u128(0x008476fc_4b58_4d80_a790_e7297673161d);
pub const MFPROTECTIONATTRIBUTE_FAIL_OVER: windows_core::GUID = windows_core::GUID::from_u128(0x8536abc5_38f1_4151_9cce_f55d941229ac);
pub const MFPROTECTIONATTRIBUTE_HDCP_SRM: windows_core::GUID = windows_core::GUID::from_u128(0x6f302107_3477_4468_8a08_eef9db10e20f);
pub const MFPROTECTION_ACP: windows_core::GUID = windows_core::GUID::from_u128(0xc3fd11c6_f8b7_4d20_b008_1db17d61f2da);
pub const MFPROTECTION_CGMSA: windows_core::GUID = windows_core::GUID::from_u128(0xe57e69e9_226b_4d31_b4e3_d3db008736dd);
pub const MFPROTECTION_CONSTRICTAUDIO: windows_core::GUID = windows_core::GUID::from_u128(0xffc99b44_df48_4e16_8e66_096892c1578a);
pub const MFPROTECTION_CONSTRICTVIDEO: windows_core::GUID = windows_core::GUID::from_u128(0x193370ce_c5e4_4c3a_8a66_6959b4da4442);
pub const MFPROTECTION_CONSTRICTVIDEO_NOOPM: windows_core::GUID = windows_core::GUID::from_u128(0xa580e8cd_c247_4957_b983_3c2eebd1ff59);
pub const MFPROTECTION_DISABLE: windows_core::GUID = windows_core::GUID::from_u128(0x8cc6d81b_fec6_4d8f_964b_cfba0b0dad0d);
pub const MFPROTECTION_DISABLE_SCREEN_SCRAPE: windows_core::GUID = windows_core::GUID::from_u128(0xa21179a4_b7cd_40d8_9614_8ef2371ba78d);
pub const MFPROTECTION_FFT: windows_core::GUID = windows_core::GUID::from_u128(0x462a56b2_2866_4bb6_980d_6d8d9edb1a8c);
pub const MFPROTECTION_GRAPHICS_TRANSFER_AES_ENCRYPTION: windows_core::GUID = windows_core::GUID::from_u128(0xc873de64_d8a5_49e6_88bb_fb963fd3d4ce);
pub const MFPROTECTION_HARDWARE: windows_core::GUID = windows_core::GUID::from_u128(0x4ee7f0c1_9ed7_424f_b6be_996b33528856);
pub const MFPROTECTION_HDCP: windows_core::GUID = windows_core::GUID::from_u128(0xae7cc03d_c828_4021_acb7_d578d27aaf13);
pub const MFPROTECTION_HDCP_WITH_TYPE_ENFORCEMENT: windows_core::GUID = windows_core::GUID::from_u128(0xa4a585e8_ed60_442d_814d_db4d4220a06d);
pub const MFPROTECTION_PROTECTED_SURFACE: windows_core::GUID = windows_core::GUID::from_u128(0x4f5d9566_e742_4a25_8d1f_d287b5fa0ade);
pub const MFPROTECTION_TRUSTEDAUDIODRIVERS: windows_core::GUID = windows_core::GUID::from_u128(0x65bdf3d2_0168_4816_a533_55d47b027101);
pub const MFPROTECTION_VIDEO_FRAMES: windows_core::GUID = windows_core::GUID::from_u128(0x36a59cbc_7401_4a8c_bc20_46a7c9e597f0);
pub const MFPROTECTION_WMDRMOTA: windows_core::GUID = windows_core::GUID::from_u128(0xa267a6a1_362e_47d0_8805_4628598a23e4);
#[repr(C)]
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct MFP_ACQUIRE_USER_CREDENTIAL_EVENT {
pub header: MFP_EVENT_HEADER,
pub dwUserData: usize,
pub fProceedWithAuthentication: windows_core::BOOL,
pub hrAuthenticationStatus: windows_core::HRESULT,
pub pwszURL: windows_core::PCWSTR,
pub pwszSite: windows_core::PCWSTR,
pub pwszRealm: windows_core::PCWSTR,
pub pwszPackage: windows_core::PCWSTR,
pub nRetries: i32,
pub flags: u32,
pub pCredential: core::mem::ManuallyDrop<Option<IMFNetCredential>>,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFP_CREATION_OPTIONS(pub i32);
pub const MFP_CREDENTIAL_CLEAR_TEXT: _MFP_CREDENTIAL_FLAGS = _MFP_CREDENTIAL_FLAGS(8i32);
pub const MFP_CREDENTIAL_DO_NOT_CACHE: _MFP_CREDENTIAL_FLAGS = _MFP_CREDENTIAL_FLAGS(4i32);
pub const MFP_CREDENTIAL_LOGGED_ON_USER: _MFP_CREDENTIAL_FLAGS = _MFP_CREDENTIAL_FLAGS(32i32);
pub const MFP_CREDENTIAL_PROMPT: _MFP_CREDENTIAL_FLAGS = _MFP_CREDENTIAL_FLAGS(1i32);
pub const MFP_CREDENTIAL_PROXY: _MFP_CREDENTIAL_FLAGS = _MFP_CREDENTIAL_FLAGS(16i32);
pub const MFP_CREDENTIAL_SAVE: _MFP_CREDENTIAL_FLAGS = _MFP_CREDENTIAL_FLAGS(2i32);
#[repr(C)]
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct MFP_ERROR_EVENT {
pub header: MFP_EVENT_HEADER,
}
#[repr(C)]
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct MFP_EVENT_HEADER {
pub eEventType: MFP_EVENT_TYPE,
pub hrEvent: windows_core::HRESULT,
pub pMediaPlayer: core::mem::ManuallyDrop<Option<IMFPMediaPlayer>>,
pub eState: MFP_MEDIAPLAYER_STATE,
pub pPropertyStore: core::mem::ManuallyDrop<Option<super::super::UI::Shell::PropertiesSystem::IPropertyStore>>,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFP_EVENT_TYPE(pub i32);
pub const MFP_EVENT_TYPE_ACQUIRE_USER_CREDENTIAL: MFP_EVENT_TYPE = MFP_EVENT_TYPE(12i32);
pub const MFP_EVENT_TYPE_ERROR: MFP_EVENT_TYPE = MFP_EVENT_TYPE(10i32);
pub const MFP_EVENT_TYPE_FRAME_STEP: MFP_EVENT_TYPE = MFP_EVENT_TYPE(7i32);
pub const MFP_EVENT_TYPE_MEDIAITEM_CLEARED: MFP_EVENT_TYPE = MFP_EVENT_TYPE(8i32);
pub const MFP_EVENT_TYPE_MEDIAITEM_CREATED: MFP_EVENT_TYPE = MFP_EVENT_TYPE(5i32);
pub const MFP_EVENT_TYPE_MEDIAITEM_SET: MFP_EVENT_TYPE = MFP_EVENT_TYPE(6i32);
pub const MFP_EVENT_TYPE_MF: MFP_EVENT_TYPE = MFP_EVENT_TYPE(9i32);
pub const MFP_EVENT_TYPE_PAUSE: MFP_EVENT_TYPE = MFP_EVENT_TYPE(1i32);
pub const MFP_EVENT_TYPE_PLAY: MFP_EVENT_TYPE = MFP_EVENT_TYPE(0i32);
pub const MFP_EVENT_TYPE_PLAYBACK_ENDED: MFP_EVENT_TYPE = MFP_EVENT_TYPE(11i32);
pub const MFP_EVENT_TYPE_POSITION_SET: MFP_EVENT_TYPE = MFP_EVENT_TYPE(3i32);
pub const MFP_EVENT_TYPE_RATE_SET: MFP_EVENT_TYPE = MFP_EVENT_TYPE(4i32);
pub const MFP_EVENT_TYPE_STOP: MFP_EVENT_TYPE = MFP_EVENT_TYPE(2i32);
#[repr(C)]
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct MFP_FRAME_STEP_EVENT {
pub header: MFP_EVENT_HEADER,
pub pMediaItem: core::mem::ManuallyDrop<Option<IMFPMediaItem>>,
}
pub const MFP_MEDIAITEM_CAN_PAUSE: _MFP_MEDIAITEM_CHARACTERISTICS = _MFP_MEDIAITEM_CHARACTERISTICS(4i32);
pub const MFP_MEDIAITEM_CAN_SEEK: _MFP_MEDIAITEM_CHARACTERISTICS = _MFP_MEDIAITEM_CHARACTERISTICS(2i32);
#[repr(C)]
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct MFP_MEDIAITEM_CLEARED_EVENT {
pub header: MFP_EVENT_HEADER,
pub pMediaItem: core::mem::ManuallyDrop<Option<IMFPMediaItem>>,
}
#[repr(C)]
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct MFP_MEDIAITEM_CREATED_EVENT {
pub header: MFP_EVENT_HEADER,
pub pMediaItem: core::mem::ManuallyDrop<Option<IMFPMediaItem>>,
pub dwUserData: usize,
}
pub const MFP_MEDIAITEM_HAS_SLOW_SEEK: _MFP_MEDIAITEM_CHARACTERISTICS = _MFP_MEDIAITEM_CHARACTERISTICS(8i32);
pub const MFP_MEDIAITEM_IS_LIVE: _MFP_MEDIAITEM_CHARACTERISTICS = _MFP_MEDIAITEM_CHARACTERISTICS(1i32);
#[repr(C)]
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct MFP_MEDIAITEM_SET_EVENT {
pub header: MFP_EVENT_HEADER,
pub pMediaItem: core::mem::ManuallyDrop<Option<IMFPMediaItem>>,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFP_MEDIAPLAYER_STATE(pub i32);
pub const MFP_MEDIAPLAYER_STATE_EMPTY: MFP_MEDIAPLAYER_STATE = MFP_MEDIAPLAYER_STATE(0i32);
pub const MFP_MEDIAPLAYER_STATE_PAUSED: MFP_MEDIAPLAYER_STATE = MFP_MEDIAPLAYER_STATE(3i32);
pub const MFP_MEDIAPLAYER_STATE_PLAYING: MFP_MEDIAPLAYER_STATE = MFP_MEDIAPLAYER_STATE(2i32);
pub const MFP_MEDIAPLAYER_STATE_SHUTDOWN: MFP_MEDIAPLAYER_STATE = MFP_MEDIAPLAYER_STATE(4i32);
pub const MFP_MEDIAPLAYER_STATE_STOPPED: MFP_MEDIAPLAYER_STATE = MFP_MEDIAPLAYER_STATE(1i32);
#[repr(C)]
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct MFP_MF_EVENT {
pub header: MFP_EVENT_HEADER,
pub MFEventType: u32,
pub pMFMediaEvent: core::mem::ManuallyDrop<Option<IMFMediaEvent>>,
pub pMediaItem: core::mem::ManuallyDrop<Option<IMFPMediaItem>>,
}
pub const MFP_OPTION_FREE_THREADED_CALLBACK: MFP_CREATION_OPTIONS = MFP_CREATION_OPTIONS(1i32);
pub const MFP_OPTION_NONE: MFP_CREATION_OPTIONS = MFP_CREATION_OPTIONS(0i32);
pub const MFP_OPTION_NO_MMCSS: MFP_CREATION_OPTIONS = MFP_CREATION_OPTIONS(2i32);
pub const MFP_OPTION_NO_REMOTE_DESKTOP_OPTIMIZATION: MFP_CREATION_OPTIONS = MFP_CREATION_OPTIONS(4i32);
#[repr(C)]
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct MFP_PAUSE_EVENT {
pub header: MFP_EVENT_HEADER,
pub pMediaItem: core::mem::ManuallyDrop<Option<IMFPMediaItem>>,
}
#[repr(C)]
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct MFP_PLAYBACK_ENDED_EVENT {
pub header: MFP_EVENT_HEADER,
pub pMediaItem: core::mem::ManuallyDrop<Option<IMFPMediaItem>>,
}
#[repr(C)]
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct MFP_PLAY_EVENT {
pub header: MFP_EVENT_HEADER,
pub pMediaItem: core::mem::ManuallyDrop<Option<IMFPMediaItem>>,
}
pub const MFP_POSITIONTYPE_100NS: windows_core::GUID = windows_core::GUID::from_u128(0x00000000_0000_0000_0000_000000000000);
#[repr(C)]
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct MFP_POSITION_SET_EVENT {
pub header: MFP_EVENT_HEADER,
pub pMediaItem: core::mem::ManuallyDrop<Option<IMFPMediaItem>>,
}
#[repr(C)]
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct MFP_RATE_SET_EVENT {
pub header: MFP_EVENT_HEADER,
pub pMediaItem: core::mem::ManuallyDrop<Option<IMFPMediaItem>>,
pub flRate: f32,
}
#[repr(C)]
#[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct MFP_STOP_EVENT {
pub header: MFP_EVENT_HEADER,
pub pMediaItem: core::mem::ManuallyDrop<Option<IMFPMediaItem>>,
}
#[repr(C)]
#[derive(Clone, Copy)]
pub union MFPaletteEntry {
pub ARGB: MFARGB,
pub AYCbCr: MFAYUVSample,
}
impl Default for MFPaletteEntry {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MFPinholeCameraIntrinsic_IntrinsicModel {
pub Width: u32,
pub Height: u32,
pub CameraModel: MFCameraIntrinsic_PinholeCameraModel,
pub DistortionModel: MFCameraIntrinsic_DistortionModel,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct MFPinholeCameraIntrinsics {
pub IntrinsicModelCount: u32,
pub IntrinsicModels: [MFPinholeCameraIntrinsic_IntrinsicModel; 1],
}
impl Default for MFPinholeCameraIntrinsics {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFRATE_DIRECTION(pub i32);
pub const MFRATE_FORWARD: MFRATE_DIRECTION = MFRATE_DIRECTION(0i32);
pub const MFRATE_REVERSE: MFRATE_DIRECTION = MFRATE_DIRECTION(1i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct MFRR_COMPONENTS {
pub dwRRInfoVersion: u32,
pub dwRRComponents: u32,
pub pRRComponents: *mut MFRR_COMPONENT_HASH_INFO,
}
impl Default for MFRR_COMPONENTS {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct MFRR_COMPONENT_HASH_INFO {
pub ulReason: u32,
pub rgHeaderHash: [u16; 43],
pub rgPublicKeyHash: [u16; 43],
pub wszName: [u16; 260],
}
impl Default for MFRR_COMPONENT_HASH_INFO {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const MFRR_INFO_VERSION: u32 = 0u32;
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MFRatio {
pub Numerator: u32,
pub Denominator: u32,
}
pub const MFSEQUENCER_INVALID_ELEMENT_ID: u32 = 4294967295u32;
pub const MFSESSIONCAP_DOES_NOT_USE_NETWORK: u32 = 64u32;
pub const MFSESSIONCAP_PAUSE: u32 = 4u32;
pub const MFSESSIONCAP_RATE_FORWARD: u32 = 16u32;
pub const MFSESSIONCAP_RATE_REVERSE: u32 = 32u32;
pub const MFSESSIONCAP_SEEK: u32 = 2u32;
pub const MFSESSIONCAP_START: u32 = 1u32;
pub const MFSESSION_GETFULLTOPOLOGY_CURRENT: MFSESSION_GETFULLTOPOLOGY_FLAGS = MFSESSION_GETFULLTOPOLOGY_FLAGS(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFSESSION_GETFULLTOPOLOGY_FLAGS(pub i32);
pub const MFSESSION_SETTOPOLOGY_CLEAR_CURRENT: MFSESSION_SETTOPOLOGY_FLAGS = MFSESSION_SETTOPOLOGY_FLAGS(4i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFSESSION_SETTOPOLOGY_FLAGS(pub i32);
pub const MFSESSION_SETTOPOLOGY_IMMEDIATE: MFSESSION_SETTOPOLOGY_FLAGS = MFSESSION_SETTOPOLOGY_FLAGS(1i32);
pub const MFSESSION_SETTOPOLOGY_NORESOLUTION: MFSESSION_SETTOPOLOGY_FLAGS = MFSESSION_SETTOPOLOGY_FLAGS(2i32);
pub const MFSHUTDOWN_COMPLETED: MFSHUTDOWN_STATUS = MFSHUTDOWN_STATUS(1i32);
pub const MFSHUTDOWN_INITIATED: MFSHUTDOWN_STATUS = MFSHUTDOWN_STATUS(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFSHUTDOWN_STATUS(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFSINK_WMDRMACTION(pub i32);
pub const MFSINK_WMDRMACTION_ENCODE: MFSINK_WMDRMACTION = MFSINK_WMDRMACTION(1i32);
pub const MFSINK_WMDRMACTION_LAST: MFSINK_WMDRMACTION = MFSINK_WMDRMACTION(3i32);
pub const MFSINK_WMDRMACTION_TRANSCODE: MFSINK_WMDRMACTION = MFSINK_WMDRMACTION(2i32);
pub const MFSINK_WMDRMACTION_TRANSCRYPT: MFSINK_WMDRMACTION = MFSINK_WMDRMACTION(3i32);
pub const MFSINK_WMDRMACTION_UNDEFINED: MFSINK_WMDRMACTION = MFSINK_WMDRMACTION(0i32);
pub const MFSTARTUP_FULL: u32 = 0u32;
pub const MFSTARTUP_LITE: u32 = 1u32;
pub const MFSTARTUP_NOSOCKET: u32 = 1u32;
pub const MFSTREAMSINK_MARKER_DEFAULT: MFSTREAMSINK_MARKER_TYPE = MFSTREAMSINK_MARKER_TYPE(0i32);
pub const MFSTREAMSINK_MARKER_ENDOFSEGMENT: MFSTREAMSINK_MARKER_TYPE = MFSTREAMSINK_MARKER_TYPE(1i32);
pub const MFSTREAMSINK_MARKER_EVENT: MFSTREAMSINK_MARKER_TYPE = MFSTREAMSINK_MARKER_TYPE(3i32);
pub const MFSTREAMSINK_MARKER_TICK: MFSTREAMSINK_MARKER_TYPE = MFSTREAMSINK_MARKER_TYPE(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFSTREAMSINK_MARKER_TYPE(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFSampleAllocatorUsage(pub i32);
pub const MFSampleAllocatorUsage_DoesNotAllocate: MFSampleAllocatorUsage = MFSampleAllocatorUsage(2i32);
pub const MFSampleAllocatorUsage_UsesCustomAllocator: MFSampleAllocatorUsage = MFSampleAllocatorUsage(1i32);
pub const MFSampleAllocatorUsage_UsesProvidedAllocator: MFSampleAllocatorUsage = MFSampleAllocatorUsage(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFSampleEncryptionProtectionScheme(pub i32);
pub const MFSampleExtension_3DVideo: windows_core::GUID = windows_core::GUID::from_u128(0xf86f97a4_dd54_4e2e_9a5e_55fc2d74a005);
pub const MFSampleExtension_3DVideo_MultiView: MFVideo3DSampleFormat = MFVideo3DSampleFormat(1i32);
pub const MFSampleExtension_3DVideo_Packed: MFVideo3DSampleFormat = MFVideo3DSampleFormat(0i32);
pub const MFSampleExtension_3DVideo_SampleFormat: windows_core::GUID = windows_core::GUID::from_u128(0x08671772_e36f_4cff_97b3_d72e20987a48);
pub const MFSampleExtension_AccumulatedNonRefPicPercent: windows_core::GUID = windows_core::GUID::from_u128(0x79ea74df_a740_445b_bc98_c9ed1f260eee);
pub const MFSampleExtension_BottomFieldFirst: windows_core::GUID = windows_core::GUID::from_u128(0x941ce0a3_6ae3_4dda_9a08_a64298340617);
pub const MFSampleExtension_CameraExtrinsics: windows_core::GUID = windows_core::GUID::from_u128(0x6b761658_b7ec_4c3b_8225_8623cabec31d);
pub const MFSampleExtension_CaptureMetadata: windows_core::GUID = windows_core::GUID::from_u128(0x2ebe23a8_faf5_444a_a6a2_eb810880ab5d);
pub const MFSampleExtension_ChromaOnly: windows_core::GUID = windows_core::GUID::from_u128(0x1eb9179c_a01f_4845_8c04_0e65a26eb04f);
pub const MFSampleExtension_CleanPoint: windows_core::GUID = windows_core::GUID::from_u128(0x9cdf01d8_a0f0_43ba_b077_eaa06cbd728a);
pub const MFSampleExtension_ClosedCaption_CEA708: windows_core::GUID = windows_core::GUID::from_u128(0x26f09068_e744_47dc_aa03_dbf20403bde6);
pub const MFSampleExtension_ClosedCaption_CEA708_MAX_SIZE: u32 = 256u32;
pub const MFSampleExtension_Content_KeyID: windows_core::GUID = windows_core::GUID::from_u128(0xc6c7f5b0_acca_415b_87d9_10441469efc6);
pub const MFSampleExtension_DecodeTimestamp: windows_core::GUID = windows_core::GUID::from_u128(0x73a954d4_09e2_4861_befc_94bd97c08e6e);
pub const MFSampleExtension_Depth_MaxReliableDepth: windows_core::GUID = windows_core::GUID::from_u128(0xe45545d1_1f0f_4a32_a8a7_6101a24ea8be);
pub const MFSampleExtension_Depth_MinReliableDepth: windows_core::GUID = windows_core::GUID::from_u128(0x5f8582b2_e36b_47c8_9b87_fee1ca72c5b0);
pub const MFSampleExtension_DerivedFromTopField: windows_core::GUID = windows_core::GUID::from_u128(0x6852465a_ae1c_4553_8e9b_c3420fcb1637);
pub const MFSampleExtension_DescrambleData: windows_core::GUID = windows_core::GUID::from_u128(0x43483be6_4903_4314_b032_2951365936fc);
pub const MFSampleExtension_DeviceReferenceSystemTime: windows_core::GUID = windows_core::GUID::from_u128(0x6523775a_ba2d_405f_b2c5_01ff88e2e8f6);
pub const MFSampleExtension_DeviceTimestamp: windows_core::GUID = windows_core::GUID::from_u128(0x8f3e35e7_2dcd_4887_8622_2a58baa652b0);
pub const MFSampleExtension_DirtyRects: windows_core::GUID = windows_core::GUID::from_u128(0x9ba70225_b342_4e97_9126_0b566ab7ea7e);
pub const MFSampleExtension_Discontinuity: windows_core::GUID = windows_core::GUID::from_u128(0x9cdf01d9_a0f0_43ba_b077_eaa06cbd728a);
pub const MFSampleExtension_Encryption_ClearSliceHeaderData: windows_core::GUID = windows_core::GUID::from_u128(0x5509a4f4_320d_4e6c_8d1a_94c66dd20cb0);
pub const MFSampleExtension_Encryption_CryptByteBlock: windows_core::GUID = windows_core::GUID::from_u128(0x9d84289b_0c7f_4713_ab95_108ab42ad801);
pub const MFSampleExtension_Encryption_HardwareProtection: windows_core::GUID = windows_core::GUID::from_u128(0x9a2b2d2b_8270_43e3_8448_994f426e8886);
pub const MFSampleExtension_Encryption_HardwareProtection_KeyInfo: windows_core::GUID = windows_core::GUID::from_u128(0xb2372080_455b_4dd7_9989_1a955784b754);
pub const MFSampleExtension_Encryption_HardwareProtection_KeyInfoID: windows_core::GUID = windows_core::GUID::from_u128(0x8cbfcceb_94a5_4de1_8231_a85e47cf81e7);
pub const MFSampleExtension_Encryption_HardwareProtection_VideoDecryptorContext: windows_core::GUID = windows_core::GUID::from_u128(0x693470c8_e837_47a0_88cb_535b905e3582);
pub const MFSampleExtension_Encryption_KeyID: windows_core::GUID = windows_core::GUID::from_u128(0x76376591_795f_4da1_86ed_9d46eca109a9);
pub const MFSampleExtension_Encryption_NALUTypes: windows_core::GUID = windows_core::GUID::from_u128(0xb0f067c7_714c_416c_8d59_5f4ddf8913b6);
pub const MFSampleExtension_Encryption_Opaque_Data: windows_core::GUID = windows_core::GUID::from_u128(0x224d77e5_1391_4ffb_9f41_b432f68c611d);
pub const MFSampleExtension_Encryption_ProtectionScheme: windows_core::GUID = windows_core::GUID::from_u128(0xd054d096_28bb_45da_87ec_74f351871406);
pub const MFSampleExtension_Encryption_ResumeVideoOutput: windows_core::GUID = windows_core::GUID::from_u128(0xa435aba5_afde_4cf5_bc1c_f6acaf13949d);
pub const MFSampleExtension_Encryption_SEIData: windows_core::GUID = windows_core::GUID::from_u128(0x3cf0e972_4542_4687_9999_585f565fba7d);
pub const MFSampleExtension_Encryption_SPSPPSData: windows_core::GUID = windows_core::GUID::from_u128(0xaede0fa2_0e0c_453c_b7f3_de8693364d11);
pub const MFSampleExtension_Encryption_SampleID: windows_core::GUID = windows_core::GUID::from_u128(0x6698b84e_0afa_4330_aeb2_1c0a98d7a44d);
pub const MFSampleExtension_Encryption_SkipByteBlock: windows_core::GUID = windows_core::GUID::from_u128(0x0d550548_8317_4ab1_845f_d06306e293e3);
pub const MFSampleExtension_Encryption_SubSampleMappingSplit: windows_core::GUID = windows_core::GUID::from_u128(0xfe0254b9_2aa5_4edc_99f7_17e89dbf9174);
pub const MFSampleExtension_Encryption_SubSample_Mapping: windows_core::GUID = windows_core::GUID::from_u128(0x8444f27a_69a1_48da_bd08_11cef36830d2);
pub const MFSampleExtension_ExtendedCameraIntrinsics: windows_core::GUID = windows_core::GUID::from_u128(0x560bc4a5_4de0_4113_9cdc_832db9740f3d);
pub const MFSampleExtension_FeatureMap: windows_core::GUID = windows_core::GUID::from_u128(0xa032d165_46fc_400a_b449_49de53e62a6e);
pub const MFSampleExtension_ForwardedDecodeUnitType: windows_core::GUID = windows_core::GUID::from_u128(0x089e57c7_47d3_4a26_bf9c_4b64fafb5d1e);
pub const MFSampleExtension_ForwardedDecodeUnits: windows_core::GUID = windows_core::GUID::from_u128(0x424c754c_97c8_48d6_8777_fc41f7b60879);
pub const MFSampleExtension_FrameCorruption: windows_core::GUID = windows_core::GUID::from_u128(0xb4dd4a8c_0beb_44c4_8b75_b02b913b04f0);
pub const MFSampleExtension_GenKeyCtx: windows_core::GUID = windows_core::GUID::from_u128(0x188120cb_d7da_4b59_9b3e_9252fd37301c);
pub const MFSampleExtension_GenKeyFunc: windows_core::GUID = windows_core::GUID::from_u128(0x441ca1ee_6b1f_4501_903a_de87df42f6ed);
pub const MFSampleExtension_HDCP_FrameCounter: windows_core::GUID = windows_core::GUID::from_u128(0x9d389c60_f507_4aa6_a40a_71027a02f3de);
pub const MFSampleExtension_HDCP_OptionalHeader: windows_core::GUID = windows_core::GUID::from_u128(0x9a2e7390_121f_455f_8376_c97428e0b540);
pub const MFSampleExtension_HDCP_StreamID: windows_core::GUID = windows_core::GUID::from_u128(0x177e5d74_c370_4a7a_95a2_36833c01d0af);
pub const MFSampleExtension_Interlaced: windows_core::GUID = windows_core::GUID::from_u128(0xb1d5830a_deb8_40e3_90fa_389943716461);
pub const MFSampleExtension_LastSlice: windows_core::GUID = windows_core::GUID::from_u128(0x2b5d5457_5547_4f07_b8c8_b4a3a9a1daac);
pub const MFSampleExtension_LongTermReferenceFrameInfo: windows_core::GUID = windows_core::GUID::from_u128(0x9154733f_e1bd_41bf_81d3_fcd918f71332);
pub const MFSampleExtension_MDLCacheCookie: windows_core::GUID = windows_core::GUID::from_u128(0x5f002af9_d8f9_41a3_b6c3_a2ad43f647ad);
pub const MFSampleExtension_MULTIPLEXED_MANAGER: windows_core::GUID = windows_core::GUID::from_u128(0x8dcdee79_6b5a_4c45_8db9_20b395f02fcf);
pub const MFSampleExtension_MaxDecodeFrameSize: windows_core::GUID = windows_core::GUID::from_u128(0xd3cc654f_f9f3_4a13_889f_f04eb2b5b957);
pub const MFSampleExtension_MeanAbsoluteDifference: windows_core::GUID = windows_core::GUID::from_u128(0x1cdbde11_08b4_4311_a6dd_0f9f371907aa);
pub const MFSampleExtension_MoveRegions: windows_core::GUID = windows_core::GUID::from_u128(0xe2a6c693_3a8b_4b8d_95d0_f60281a12fb7);
pub const MFSampleExtension_NALULengthInfo: windows_core::GUID = windows_core::GUID::from_u128(0x19124e7c_ad4b_465f_bb18_20186287b6af);
pub const MFSampleExtension_PacketCrossOffsets: windows_core::GUID = windows_core::GUID::from_u128(0x2789671d_389f_40bb_90d9_c282f77f9abd);
pub const MFSampleExtension_PhotoThumbnail: windows_core::GUID = windows_core::GUID::from_u128(0x74bbc85c_c8bb_42dc_b586_da17ffd35dcc);
pub const MFSampleExtension_PhotoThumbnailMediaType: windows_core::GUID = windows_core::GUID::from_u128(0x61ad5420_ebf8_4143_89af_6bf25f672def);
pub const MFSampleExtension_PinholeCameraIntrinsics: windows_core::GUID = windows_core::GUID::from_u128(0x4ee3b6c5_6a15_4e72_9761_70c1db8b9fe3);
pub const MFSampleExtension_ROIRectangle: windows_core::GUID = windows_core::GUID::from_u128(0x3414a438_4998_4d2c_be82_be3ca0b24d43);
pub const MFSampleExtension_RepeatFirstField: windows_core::GUID = windows_core::GUID::from_u128(0x304d257c_7493_4fbd_b149_9228de8d9a99);
pub const MFSampleExtension_RepeatFrame: windows_core::GUID = windows_core::GUID::from_u128(0x88be738f_0711_4f42_b458_344aed42ec2f);
pub const MFSampleExtension_SampleKeyID: windows_core::GUID = windows_core::GUID::from_u128(0x9ed713c8_9b87_4b26_8297_a93b0c5a8acc);
pub const MFSampleExtension_SingleField: windows_core::GUID = windows_core::GUID::from_u128(0x9d85f816_658b_455a_bde0_9fa7e15ab8f9);
pub const MFSampleExtension_Spatial_CameraCoordinateSystem: windows_core::GUID = windows_core::GUID::from_u128(0x9d13c82f_2199_4e67_91cd_d1a4181f2534);
pub const MFSampleExtension_Spatial_CameraProjectionTransform: windows_core::GUID = windows_core::GUID::from_u128(0x47f9fcb5_2a02_4f26_a477_792fdf95886a);
pub const MFSampleExtension_Spatial_CameraViewTransform: windows_core::GUID = windows_core::GUID::from_u128(0x4e251fa4_830f_4770_859a_4b8d99aa809b);
pub const MFSampleExtension_TargetGlobalLuminance: windows_core::GUID = windows_core::GUID::from_u128(0x3f60ef36_31ef_4daf_8360_940397e41ef3);
pub const MFSampleExtension_Timestamp: windows_core::GUID = windows_core::GUID::from_u128(0x1e436999_69be_4c7a_9369_70068c0260cb);
pub const MFSampleExtension_Token: windows_core::GUID = windows_core::GUID::from_u128(0x8294da66_f328_4805_b551_00deb4c57a61);
pub const MFSampleExtension_VideoDSPMode: windows_core::GUID = windows_core::GUID::from_u128(0xc12d55cb_d7d9_476d_81f3_69117f163ea0);
pub const MFSampleExtension_VideoEncodePictureType: windows_core::GUID = windows_core::GUID::from_u128(0x973704e6_cd14_483c_8f20_c9fc0928bad5);
pub const MFSampleExtension_VideoEncodeQP: windows_core::GUID = windows_core::GUID::from_u128(0xb2efe478_f979_4c66_b95e_ee2b82c82f36);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFSensorDeviceMode(pub i32);
pub const MFSensorDeviceMode_Controller: MFSensorDeviceMode = MFSensorDeviceMode(0i32);
pub const MFSensorDeviceMode_Shared: MFSensorDeviceMode = MFSensorDeviceMode(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFSensorDeviceType(pub i32);
pub const MFSensorDeviceType_Device: MFSensorDeviceType = MFSensorDeviceType(1i32);
pub const MFSensorDeviceType_FrameProvider: MFSensorDeviceType = MFSensorDeviceType(3i32);
pub const MFSensorDeviceType_MediaSource: MFSensorDeviceType = MFSensorDeviceType(2i32);
pub const MFSensorDeviceType_SensorTransform: MFSensorDeviceType = MFSensorDeviceType(4i32);
pub const MFSensorDeviceType_Unknown: MFSensorDeviceType = MFSensorDeviceType(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFSensorStreamType(pub i32);
pub const MFSensorStreamType_Input: MFSensorStreamType = MFSensorStreamType(1i32);
pub const MFSensorStreamType_Output: MFSensorStreamType = MFSensorStreamType(2i32);
pub const MFSensorStreamType_Unknown: MFSensorStreamType = MFSensorStreamType(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFSequencerTopologyFlags(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFStandardVideoFormat(pub i32);
pub const MFStdVideoFormat_ATSC_HD1080i: MFStandardVideoFormat = MFStandardVideoFormat(8i32);
pub const MFStdVideoFormat_ATSC_HD720p: MFStandardVideoFormat = MFStandardVideoFormat(9i32);
pub const MFStdVideoFormat_ATSC_SD480i: MFStandardVideoFormat = MFStandardVideoFormat(7i32);
pub const MFStdVideoFormat_DVD_NTSC: MFStandardVideoFormat = MFStandardVideoFormat(3i32);
pub const MFStdVideoFormat_DVD_PAL: MFStandardVideoFormat = MFStandardVideoFormat(4i32);
pub const MFStdVideoFormat_DV_NTSC: MFStandardVideoFormat = MFStandardVideoFormat(6i32);
pub const MFStdVideoFormat_DV_PAL: MFStandardVideoFormat = MFStandardVideoFormat(5i32);
pub const MFStdVideoFormat_NTSC: MFStandardVideoFormat = MFStandardVideoFormat(1i32);
pub const MFStdVideoFormat_PAL: MFStandardVideoFormat = MFStandardVideoFormat(2i32);
pub const MFStdVideoFormat_reserved: MFStandardVideoFormat = MFStandardVideoFormat(0i32);
pub const MFStreamExtension_CameraExtrinsics: windows_core::GUID = windows_core::GUID::from_u128(0x686196d0_13e2_41d9_9638_ef032c272a52);
pub const MFStreamExtension_ExtendedCameraIntrinsics: windows_core::GUID = windows_core::GUID::from_u128(0xaa74b3df_9a2c_48d6_8393_5bd1c1a81e6e);
pub const MFStreamExtension_PinholeCameraIntrinsics: windows_core::GUID = windows_core::GUID::from_u128(0xdbac0455_0ec8_4aef_9c32_7a3ee3456f53);
pub const MFStreamFormat_MPEG2Program: windows_core::GUID = windows_core::GUID::from_u128(0x263067d1_d330_45dc_b669_34d986e4e3e1);
pub const MFStreamFormat_MPEG2Transport: windows_core::GUID = windows_core::GUID::from_u128(0xe06d8023_db46_11cf_b4d1_00805f6cbbea);
pub const MFSubtitleFormat_ATSC: windows_core::GUID = windows_core::GUID::from_u128(0x7fa7faa3_feae_4e16_aedf_36b9acfbb099);
pub const MFSubtitleFormat_CustomUserData: windows_core::GUID = windows_core::GUID::from_u128(0x1bb3d849_6614_4d80_8882_ed24aa82da92);
pub const MFSubtitleFormat_PGS: windows_core::GUID = windows_core::GUID::from_u128(0x71f40e4a_1278_4442_b30d_39dd1d7722bc);
pub const MFSubtitleFormat_SRT: windows_core::GUID = windows_core::GUID::from_u128(0x5e467f2e_77ca_4ca5_8391_d142ed4b76c8);
pub const MFSubtitleFormat_SSA: windows_core::GUID = windows_core::GUID::from_u128(0x57176a1b_1a9e_4eea_abef_c61760198ac4);
pub const MFSubtitleFormat_TTML: windows_core::GUID = windows_core::GUID::from_u128(0x73e73992_9a10_4356_9557_7194e91e3e54);
pub const MFSubtitleFormat_VobSub: windows_core::GUID = windows_core::GUID::from_u128(0x6b8e40f4_8d2c_4ced_ad91_5960e45b4433);
pub const MFSubtitleFormat_WebVTT: windows_core::GUID = windows_core::GUID::from_u128(0xc886d215_f485_40bb_8db6_fadbc619a45d);
pub const MFSubtitleFormat_XML: windows_core::GUID = windows_core::GUID::from_u128(0x2006f94f_29ca_4195_b8db_00ded8ff0c97);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFTIMER_FLAGS(pub i32);
pub const MFTIMER_RELATIVE: MFTIMER_FLAGS = MFTIMER_FLAGS(1i32);
pub const MFTOPOLOGY_DXVA_DEFAULT: MFTOPOLOGY_DXVA_MODE = MFTOPOLOGY_DXVA_MODE(0i32);
pub const MFTOPOLOGY_DXVA_FULL: MFTOPOLOGY_DXVA_MODE = MFTOPOLOGY_DXVA_MODE(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFTOPOLOGY_DXVA_MODE(pub i32);
pub const MFTOPOLOGY_DXVA_NONE: MFTOPOLOGY_DXVA_MODE = MFTOPOLOGY_DXVA_MODE(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFTOPOLOGY_HARDWARE_MODE(pub i32);
pub const MFTOPOLOGY_HWMODE_SOFTWARE_ONLY: MFTOPOLOGY_HARDWARE_MODE = MFTOPOLOGY_HARDWARE_MODE(0i32);
pub const MFTOPOLOGY_HWMODE_USE_HARDWARE: MFTOPOLOGY_HARDWARE_MODE = MFTOPOLOGY_HARDWARE_MODE(1i32);
pub const MFTOPOLOGY_HWMODE_USE_ONLY_HARDWARE: MFTOPOLOGY_HARDWARE_MODE = MFTOPOLOGY_HARDWARE_MODE(2i32);
#[repr(C)]
#[derive(Clone, Copy)]
pub struct MFTOPONODE_ATTRIBUTE_UPDATE {
pub NodeId: u64,
pub guidAttributeKey: windows_core::GUID,
pub attrType: MF_ATTRIBUTE_TYPE,
pub Anonymous: MFTOPONODE_ATTRIBUTE_UPDATE_0,
}
impl Default for MFTOPONODE_ATTRIBUTE_UPDATE {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy)]
pub union MFTOPONODE_ATTRIBUTE_UPDATE_0 {
pub u32: u32,
pub u64: u64,
pub d: f64,
}
impl Default for MFTOPONODE_ATTRIBUTE_UPDATE_0 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const MFT_AUDIO_DECODER_AUDIO_ENDPOINT_ID: windows_core::GUID = windows_core::GUID::from_u128(0xc7ccdd6e_5398_4695_8be7_51b3e95111bd);
pub const MFT_AUDIO_DECODER_DEGRADATION_INFO_ATTRIBUTE: windows_core::GUID = windows_core::GUID::from_u128(0x6c3386ad_ec20_430d_b2a5_505c7178d9c4);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFT_AUDIO_DECODER_DEGRADATION_REASON(pub i32);
pub const MFT_AUDIO_DECODER_DEGRADATION_REASON_LICENSING_REQUIREMENT: MFT_AUDIO_DECODER_DEGRADATION_REASON = MFT_AUDIO_DECODER_DEGRADATION_REASON(1i32);
pub const MFT_AUDIO_DECODER_DEGRADATION_REASON_NONE: MFT_AUDIO_DECODER_DEGRADATION_REASON = MFT_AUDIO_DECODER_DEGRADATION_REASON(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFT_AUDIO_DECODER_DEGRADATION_TYPE(pub i32);
pub const MFT_AUDIO_DECODER_DEGRADATION_TYPE_DOWNMIX2CHANNEL: MFT_AUDIO_DECODER_DEGRADATION_TYPE = MFT_AUDIO_DECODER_DEGRADATION_TYPE(1i32);
pub const MFT_AUDIO_DECODER_DEGRADATION_TYPE_DOWNMIX6CHANNEL: MFT_AUDIO_DECODER_DEGRADATION_TYPE = MFT_AUDIO_DECODER_DEGRADATION_TYPE(2i32);
pub const MFT_AUDIO_DECODER_DEGRADATION_TYPE_DOWNMIX8CHANNEL: MFT_AUDIO_DECODER_DEGRADATION_TYPE = MFT_AUDIO_DECODER_DEGRADATION_TYPE(3i32);
pub const MFT_AUDIO_DECODER_DEGRADATION_TYPE_NONE: MFT_AUDIO_DECODER_DEGRADATION_TYPE = MFT_AUDIO_DECODER_DEGRADATION_TYPE(0i32);
pub const MFT_AUDIO_DECODER_SPATIAL_METADATA_CLIENT: windows_core::GUID = windows_core::GUID::from_u128(0x05987df4_1270_4999_925f_8e939a7c0af7);
pub const MFT_CATEGORY_AUDIO_DECODER: windows_core::GUID = windows_core::GUID::from_u128(0x9ea73fb4_ef7a_4559_8d5d_719d8f0426c7);
pub const MFT_CATEGORY_AUDIO_EFFECT: windows_core::GUID = windows_core::GUID::from_u128(0x11064c48_3648_4ed0_932e_05ce8ac811b7);
pub const MFT_CATEGORY_AUDIO_ENCODER: windows_core::GUID = windows_core::GUID::from_u128(0x91c64bd0_f91e_4d8c_9276_db248279d975);
pub const MFT_CATEGORY_DEMULTIPLEXER: windows_core::GUID = windows_core::GUID::from_u128(0xa8700a7a_939b_44c5_99d7_76226b23b3f1);
pub const MFT_CATEGORY_ENCRYPTOR: windows_core::GUID = windows_core::GUID::from_u128(0xb0c687be_01cd_44b5_b8b2_7c1d7e058b1f);
pub const MFT_CATEGORY_MULTIPLEXER: windows_core::GUID = windows_core::GUID::from_u128(0x059c561e_05ae_4b61_b69d_55b61ee54a7b);
pub const MFT_CATEGORY_OTHER: windows_core::GUID = windows_core::GUID::from_u128(0x90175d57_b7ea_4901_aeb3_933a8747756f);
pub const MFT_CATEGORY_VIDEO_DECODER: windows_core::GUID = windows_core::GUID::from_u128(0xd6c02d4b_6833_45b4_971a_05a4b04bab91);
pub const MFT_CATEGORY_VIDEO_EFFECT: windows_core::GUID = windows_core::GUID::from_u128(0x12e17c21_532c_4a6e_8a1c_40825a736397);
pub const MFT_CATEGORY_VIDEO_ENCODER: windows_core::GUID = windows_core::GUID::from_u128(0xf79eac7d_e545_4387_bdee_d647d7bde42a);
pub const MFT_CATEGORY_VIDEO_PROCESSOR: windows_core::GUID = windows_core::GUID::from_u128(0x302ea3fc_aa5f_47f9_9f7a_c2188bb16302);
pub const MFT_CATEGORY_VIDEO_RENDERER_EFFECT: windows_core::GUID = windows_core::GUID::from_u128(0x145cd8b4_92f4_4b23_8ae7_e0df06c2da95);
pub const MFT_CODEC_MERIT_Attribute: windows_core::GUID = windows_core::GUID::from_u128(0x88a7cb15_7b07_4a34_9128_e64c6703c4d3);
pub const MFT_CONNECTED_STREAM_ATTRIBUTE: windows_core::GUID = windows_core::GUID::from_u128(0x71eeb820_a59f_4de2_bcec_38db1dd611a4);
pub const MFT_CONNECTED_TO_HW_STREAM: windows_core::GUID = windows_core::GUID::from_u128(0x34e6e728_06d6_4491_a553_4795650db912);
pub const MFT_DECODER_EXPOSE_OUTPUT_TYPES_IN_NATIVE_ORDER: windows_core::GUID = windows_core::GUID::from_u128(0xef80833f_f8fa_44d9_80d8_41ed6232670c);
pub const MFT_DECODER_FINAL_VIDEO_RESOLUTION_HINT: windows_core::GUID = windows_core::GUID::from_u128(0xdc2f8496_15c4_407a_b6f0_1b66ab5fbf53);
pub const MFT_DECODER_QUALITY_MANAGEMENT_CUSTOM_CONTROL: windows_core::GUID = windows_core::GUID::from_u128(0xa24e30d7_de25_4558_bbfb_71070a2d332e);
pub const MFT_DECODER_QUALITY_MANAGEMENT_RECOVERY_WITHOUT_ARTIFACTS: windows_core::GUID = windows_core::GUID::from_u128(0xd8980deb_0a48_425f_8623_611db41d3810);
pub const MFT_DRAIN_NO_TAILS: MFT_DRAIN_TYPE = MFT_DRAIN_TYPE(1i32);
pub const MFT_DRAIN_PRODUCE_TAILS: MFT_DRAIN_TYPE = MFT_DRAIN_TYPE(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFT_DRAIN_TYPE(pub i32);
pub const MFT_ENCODER_ERROR: windows_core::GUID = windows_core::GUID::from_u128(0xc8d1eda4_98e4_41d5_9297_44f53852f90e);
pub const MFT_ENCODER_SUPPORTS_CONFIG_EVENT: windows_core::GUID = windows_core::GUID::from_u128(0x86a355ae_3a77_4ec4_9f31_01149a4e92de);
pub const MFT_END_STREAMING_AWARE: windows_core::GUID = windows_core::GUID::from_u128(0x70fbc845_b07e_4089_b064_399dc6110f29);
pub const MFT_ENUM_ADAPTER_LUID: windows_core::GUID = windows_core::GUID::from_u128(0x1d39518c_e220_4da8_a07f_ba172552d6b1);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFT_ENUM_FLAG(pub i32);
impl MFT_ENUM_FLAG {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for MFT_ENUM_FLAG {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for MFT_ENUM_FLAG {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for MFT_ENUM_FLAG {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for MFT_ENUM_FLAG {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for MFT_ENUM_FLAG {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const MFT_ENUM_FLAG_ALL: MFT_ENUM_FLAG = MFT_ENUM_FLAG(63i32);
pub const MFT_ENUM_FLAG_ASYNCMFT: MFT_ENUM_FLAG = MFT_ENUM_FLAG(2i32);
pub const MFT_ENUM_FLAG_FIELDOFUSE: MFT_ENUM_FLAG = MFT_ENUM_FLAG(8i32);
pub const MFT_ENUM_FLAG_HARDWARE: MFT_ENUM_FLAG = MFT_ENUM_FLAG(4i32);
pub const MFT_ENUM_FLAG_LOCALMFT: MFT_ENUM_FLAG = MFT_ENUM_FLAG(16i32);
pub const MFT_ENUM_FLAG_SORTANDFILTER: MFT_ENUM_FLAG = MFT_ENUM_FLAG(64i32);
pub const MFT_ENUM_FLAG_SORTANDFILTER_APPROVED_ONLY: MFT_ENUM_FLAG = MFT_ENUM_FLAG(192i32);
pub const MFT_ENUM_FLAG_SORTANDFILTER_WEB_ONLY: MFT_ENUM_FLAG = MFT_ENUM_FLAG(320i32);
pub const MFT_ENUM_FLAG_SORTANDFILTER_WEB_ONLY_EDGEMODE: MFT_ENUM_FLAG = MFT_ENUM_FLAG(576i32);
pub const MFT_ENUM_FLAG_SYNCMFT: MFT_ENUM_FLAG = MFT_ENUM_FLAG(1i32);
pub const MFT_ENUM_FLAG_TRANSCODE_ONLY: MFT_ENUM_FLAG = MFT_ENUM_FLAG(32i32);
pub const MFT_ENUM_FLAG_UNTRUSTED_STOREMFT: MFT_ENUM_FLAG = MFT_ENUM_FLAG(1024i32);
pub const MFT_ENUM_HARDWARE_URL_Attribute: windows_core::GUID = windows_core::GUID::from_u128(0x2fb866ac_b078_4942_ab6c_003d05cda674);
pub const MFT_ENUM_HARDWARE_VENDOR_ID_Attribute: windows_core::GUID = windows_core::GUID::from_u128(0x3aecb0cc_035b_4bcc_8185_2b8d551ef3af);
pub const MFT_ENUM_TRANSCODE_ONLY_ATTRIBUTE: windows_core::GUID = windows_core::GUID::from_u128(0x111ea8cd_b62a_4bdb_89f6_67ffcdc2458b);
pub const MFT_ENUM_VIDEO_RENDERER_EXTENSION_PROFILE: windows_core::GUID = windows_core::GUID::from_u128(0x62c56928_9a4e_443b_b9dc_cac830c24100);
pub const MFT_FIELDOFUSE_UNLOCK_Attribute: windows_core::GUID = windows_core::GUID::from_u128(0x8ec2e9fd_9148_410d_831e_702439461a8e);
pub const MFT_FRIENDLY_NAME_Attribute: windows_core::GUID = windows_core::GUID::from_u128(0x314ffbae_5b41_4c95_9c19_4e7d586face3);
pub const MFT_GFX_DRIVER_VERSION_ID_Attribute: windows_core::GUID = windows_core::GUID::from_u128(0xf34b9093_05e0_4b16_993d_3e2a2cde6ad3);
pub const MFT_HW_TIMESTAMP_WITH_QPC_Attribute: windows_core::GUID = windows_core::GUID::from_u128(0x8d030fb8_cc43_4258_a22e_9210bef89be4);
pub const MFT_INPUT_DATA_BUFFER_PLACEHOLDER: _MFT_INPUT_DATA_BUFFER_FLAGS = _MFT_INPUT_DATA_BUFFER_FLAGS(-1i32);
pub const MFT_INPUT_STATUS_ACCEPT_DATA: _MFT_INPUT_STATUS_FLAGS = _MFT_INPUT_STATUS_FLAGS(1i32);
pub const MFT_INPUT_STREAM_DOES_NOT_ADDREF: _MFT_INPUT_STREAM_INFO_FLAGS = _MFT_INPUT_STREAM_INFO_FLAGS(256i32);
pub const MFT_INPUT_STREAM_FIXED_SAMPLE_SIZE: _MFT_INPUT_STREAM_INFO_FLAGS = _MFT_INPUT_STREAM_INFO_FLAGS(4i32);
pub const MFT_INPUT_STREAM_HOLDS_BUFFERS: _MFT_INPUT_STREAM_INFO_FLAGS = _MFT_INPUT_STREAM_INFO_FLAGS(8i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MFT_INPUT_STREAM_INFO {
pub hnsMaxLatency: i64,
pub dwFlags: u32,
pub cbSize: u32,
pub cbMaxLookahead: u32,
pub cbAlignment: u32,
}
pub const MFT_INPUT_STREAM_OPTIONAL: _MFT_INPUT_STREAM_INFO_FLAGS = _MFT_INPUT_STREAM_INFO_FLAGS(1024i32);
pub const MFT_INPUT_STREAM_PROCESSES_IN_PLACE: _MFT_INPUT_STREAM_INFO_FLAGS = _MFT_INPUT_STREAM_INFO_FLAGS(2048i32);
pub const MFT_INPUT_STREAM_REMOVABLE: _MFT_INPUT_STREAM_INFO_FLAGS = _MFT_INPUT_STREAM_INFO_FLAGS(512i32);
pub const MFT_INPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER: _MFT_INPUT_STREAM_INFO_FLAGS = _MFT_INPUT_STREAM_INFO_FLAGS(2i32);
pub const MFT_INPUT_STREAM_WHOLE_SAMPLES: _MFT_INPUT_STREAM_INFO_FLAGS = _MFT_INPUT_STREAM_INFO_FLAGS(1i32);
pub const MFT_INPUT_TYPES_Attributes: windows_core::GUID = windows_core::GUID::from_u128(0x4276c9b1_759d_4bf3_9cd0_0d723d138f96);
pub const MFT_MESSAGE_COMMAND_DRAIN: MFT_MESSAGE_TYPE = MFT_MESSAGE_TYPE(1i32);
pub const MFT_MESSAGE_COMMAND_FLUSH: MFT_MESSAGE_TYPE = MFT_MESSAGE_TYPE(0i32);
pub const MFT_MESSAGE_COMMAND_FLUSH_OUTPUT_STREAM: MFT_MESSAGE_TYPE = MFT_MESSAGE_TYPE(268435464i32);
pub const MFT_MESSAGE_COMMAND_MARKER: MFT_MESSAGE_TYPE = MFT_MESSAGE_TYPE(536870912i32);
pub const MFT_MESSAGE_COMMAND_SET_OUTPUT_STREAM_STATE: MFT_MESSAGE_TYPE = MFT_MESSAGE_TYPE(268435463i32);
pub const MFT_MESSAGE_COMMAND_TICK: MFT_MESSAGE_TYPE = MFT_MESSAGE_TYPE(4i32);
pub const MFT_MESSAGE_DROP_SAMPLES: MFT_MESSAGE_TYPE = MFT_MESSAGE_TYPE(3i32);
pub const MFT_MESSAGE_NOTIFY_BEGIN_STREAMING: MFT_MESSAGE_TYPE = MFT_MESSAGE_TYPE(268435456i32);
pub const MFT_MESSAGE_NOTIFY_END_OF_STREAM: MFT_MESSAGE_TYPE = MFT_MESSAGE_TYPE(268435458i32);
pub const MFT_MESSAGE_NOTIFY_END_STREAMING: MFT_MESSAGE_TYPE = MFT_MESSAGE_TYPE(268435457i32);
pub const MFT_MESSAGE_NOTIFY_EVENT: MFT_MESSAGE_TYPE = MFT_MESSAGE_TYPE(268435462i32);
pub const MFT_MESSAGE_NOTIFY_REACQUIRE_RESOURCES: MFT_MESSAGE_TYPE = MFT_MESSAGE_TYPE(268435461i32);
pub const MFT_MESSAGE_NOTIFY_RELEASE_RESOURCES: MFT_MESSAGE_TYPE = MFT_MESSAGE_TYPE(268435460i32);
pub const MFT_MESSAGE_NOTIFY_START_OF_STREAM: MFT_MESSAGE_TYPE = MFT_MESSAGE_TYPE(268435459i32);
pub const MFT_MESSAGE_SET_D3D_MANAGER: MFT_MESSAGE_TYPE = MFT_MESSAGE_TYPE(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFT_MESSAGE_TYPE(pub i32);
pub const MFT_OUTPUT_BOUND_UPPER_UNBOUNDED: u64 = 9223372036854775807u64;
#[repr(C)]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct MFT_OUTPUT_DATA_BUFFER {
pub dwStreamID: u32,
pub pSample: core::mem::ManuallyDrop<Option<IMFSample>>,
pub dwStatus: u32,
pub pEvents: core::mem::ManuallyDrop<Option<IMFCollection>>,
}
pub const MFT_OUTPUT_DATA_BUFFER_FORMAT_CHANGE: _MFT_OUTPUT_DATA_BUFFER_FLAGS = _MFT_OUTPUT_DATA_BUFFER_FLAGS(256i32);
pub const MFT_OUTPUT_DATA_BUFFER_INCOMPLETE: _MFT_OUTPUT_DATA_BUFFER_FLAGS = _MFT_OUTPUT_DATA_BUFFER_FLAGS(16777216i32);
pub const MFT_OUTPUT_DATA_BUFFER_NO_SAMPLE: _MFT_OUTPUT_DATA_BUFFER_FLAGS = _MFT_OUTPUT_DATA_BUFFER_FLAGS(768i32);
pub const MFT_OUTPUT_DATA_BUFFER_STREAM_END: _MFT_OUTPUT_DATA_BUFFER_FLAGS = _MFT_OUTPUT_DATA_BUFFER_FLAGS(512i32);
pub const MFT_OUTPUT_STATUS_SAMPLE_READY: _MFT_OUTPUT_STATUS_FLAGS = _MFT_OUTPUT_STATUS_FLAGS(1i32);
pub const MFT_OUTPUT_STREAM_CAN_PROVIDE_SAMPLES: _MFT_OUTPUT_STREAM_INFO_FLAGS = _MFT_OUTPUT_STREAM_INFO_FLAGS(512i32);
pub const MFT_OUTPUT_STREAM_DISCARDABLE: _MFT_OUTPUT_STREAM_INFO_FLAGS = _MFT_OUTPUT_STREAM_INFO_FLAGS(8i32);
pub const MFT_OUTPUT_STREAM_FIXED_SAMPLE_SIZE: _MFT_OUTPUT_STREAM_INFO_FLAGS = _MFT_OUTPUT_STREAM_INFO_FLAGS(4i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MFT_OUTPUT_STREAM_INFO {
pub dwFlags: u32,
pub cbSize: u32,
pub cbAlignment: u32,
}
pub const MFT_OUTPUT_STREAM_LAZY_READ: _MFT_OUTPUT_STREAM_INFO_FLAGS = _MFT_OUTPUT_STREAM_INFO_FLAGS(1024i32);
pub const MFT_OUTPUT_STREAM_OPTIONAL: _MFT_OUTPUT_STREAM_INFO_FLAGS = _MFT_OUTPUT_STREAM_INFO_FLAGS(16i32);
pub const MFT_OUTPUT_STREAM_PROVIDES_SAMPLES: _MFT_OUTPUT_STREAM_INFO_FLAGS = _MFT_OUTPUT_STREAM_INFO_FLAGS(256i32);
pub const MFT_OUTPUT_STREAM_REMOVABLE: _MFT_OUTPUT_STREAM_INFO_FLAGS = _MFT_OUTPUT_STREAM_INFO_FLAGS(2048i32);
pub const MFT_OUTPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER: _MFT_OUTPUT_STREAM_INFO_FLAGS = _MFT_OUTPUT_STREAM_INFO_FLAGS(2i32);
pub const MFT_OUTPUT_STREAM_WHOLE_SAMPLES: _MFT_OUTPUT_STREAM_INFO_FLAGS = _MFT_OUTPUT_STREAM_INFO_FLAGS(1i32);
pub const MFT_OUTPUT_TYPES_Attributes: windows_core::GUID = windows_core::GUID::from_u128(0x8eae8cf3_a44f_4306_ba5c_bf5dda242818);
pub const MFT_POLICY_SET_AWARE: windows_core::GUID = windows_core::GUID::from_u128(0x5a633b19_cc39_4fa8_8ca5_59981b7a0018);
pub const MFT_PREFERRED_ENCODER_PROFILE: windows_core::GUID = windows_core::GUID::from_u128(0x53004909_1ef5_46d7_a18e_5a75f8b5905f);
pub const MFT_PREFERRED_OUTPUTTYPE_Attribute: windows_core::GUID = windows_core::GUID::from_u128(0x7e700499_396a_49ee_b1b4_f628021e8c9d);
pub const MFT_PROCESS_LOCAL_Attribute: windows_core::GUID = windows_core::GUID::from_u128(0x543186e4_4649_4e65_b588_4aa352aff379);
pub const MFT_PROCESS_OUTPUT_DISCARD_WHEN_NO_BUFFER: _MFT_PROCESS_OUTPUT_FLAGS = _MFT_PROCESS_OUTPUT_FLAGS(1i32);
pub const MFT_PROCESS_OUTPUT_REGENERATE_LAST_OUTPUT: _MFT_PROCESS_OUTPUT_FLAGS = _MFT_PROCESS_OUTPUT_FLAGS(2i32);
pub const MFT_PROCESS_OUTPUT_STATUS_NEW_STREAMS: _MFT_PROCESS_OUTPUT_STATUS = _MFT_PROCESS_OUTPUT_STATUS(256i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MFT_REGISTER_TYPE_INFO {
pub guidMajorType: windows_core::GUID,
pub guidSubtype: windows_core::GUID,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct MFT_REGISTRATION_INFO {
pub clsid: windows_core::GUID,
pub guidCategory: windows_core::GUID,
pub uiFlags: u32,
pub pszName: windows_core::PCWSTR,
pub cInTypes: u32,
pub pInTypes: *mut MFT_REGISTER_TYPE_INFO,
pub cOutTypes: u32,
pub pOutTypes: *mut MFT_REGISTER_TYPE_INFO,
}
impl Default for MFT_REGISTRATION_INFO {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const MFT_REMUX_MARK_I_PICTURE_AS_CLEAN_POINT: windows_core::GUID = windows_core::GUID::from_u128(0x364e8f85_3f2e_436c_b2a2_4440a012a9e8);
pub const MFT_SET_TYPE_TEST_ONLY: _MFT_SET_TYPE_FLAGS = _MFT_SET_TYPE_FLAGS(1i32);
pub const MFT_STREAMS_UNLIMITED: u32 = 4294967295u32;
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MFT_STREAM_STATE_PARAM {
pub StreamId: u32,
pub State: MF_STREAM_STATE,
}
pub const MFT_SUPPORT_3DVIDEO: windows_core::GUID = windows_core::GUID::from_u128(0x093f81b1_4f2e_4631_8168_7934032a01d3);
pub const MFT_SUPPORT_DYNAMIC_FORMAT_CHANGE: windows_core::GUID = windows_core::GUID::from_u128(0x53476a11_3f13_49fb_ac42_ee2733c96741);
pub const MFT_TRANSFORM_CLSID_Attribute: windows_core::GUID = windows_core::GUID::from_u128(0x6821c42b_65a4_4e82_99bc_9a88205ecd0c);
pub const MFT_USING_HARDWARE_DRM: windows_core::GUID = windows_core::GUID::from_u128(0x34faa77d_d79e_4957_b8ce_362b2684996c);
pub const MFTranscodeContainerType_3GP: windows_core::GUID = windows_core::GUID::from_u128(0x34c50167_4472_4f34_9ea0_c49fbacf037d);
pub const MFTranscodeContainerType_AC3: windows_core::GUID = windows_core::GUID::from_u128(0x6d8d91c3_8c91_4ed1_8742_8c347d5b44d0);
pub const MFTranscodeContainerType_ADTS: windows_core::GUID = windows_core::GUID::from_u128(0x132fd27d_0f02_43de_a301_38fbbbb3834e);
pub const MFTranscodeContainerType_AMR: windows_core::GUID = windows_core::GUID::from_u128(0x025d5ad3_621a_475b_964d_66b1c824f079);
pub const MFTranscodeContainerType_ASF: windows_core::GUID = windows_core::GUID::from_u128(0x430f6f6e_b6bf_4fc1_a0bd_9ee46eee2afb);
pub const MFTranscodeContainerType_AVI: windows_core::GUID = windows_core::GUID::from_u128(0x7edfe8af_402f_4d76_a33c_619fd157d0f1);
pub const MFTranscodeContainerType_FLAC: windows_core::GUID = windows_core::GUID::from_u128(0x31344aa3_05a9_42b5_901b_8e9d4257f75e);
pub const MFTranscodeContainerType_FMPEG4: windows_core::GUID = windows_core::GUID::from_u128(0x9ba876f1_419f_4b77_a1e0_35959d9d4004);
pub const MFTranscodeContainerType_MP3: windows_core::GUID = windows_core::GUID::from_u128(0xe438b912_83f1_4de6_9e3a_9ffbc6dd24d1);
pub const MFTranscodeContainerType_MPEG2: windows_core::GUID = windows_core::GUID::from_u128(0xbfc2dbf9_7bb4_4f8f_afde_e112c44ba882);
pub const MFTranscodeContainerType_MPEG4: windows_core::GUID = windows_core::GUID::from_u128(0xdc6cd05d_b9d0_40ef_bd35_fa622c1ab28a);
pub const MFTranscodeContainerType_WAVE: windows_core::GUID = windows_core::GUID::from_u128(0x64c3453c_0f26_4741_be63_87bdf8bb935b);
#[repr(C)]
#[derive(Clone, Copy)]
pub struct MFVIDEOFORMAT {
pub dwSize: u32,
pub videoInfo: MFVideoInfo,
pub guidFormat: windows_core::GUID,
pub compressedInfo: MFVideoCompressedInfo,
pub surfaceInfo: MFVideoSurfaceInfo,
}
impl Default for MFVIDEOFORMAT {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const MFVP_MESSAGE_BEGINSTREAMING: MFVP_MESSAGE_TYPE = MFVP_MESSAGE_TYPE(3i32);
pub const MFVP_MESSAGE_CANCELSTEP: MFVP_MESSAGE_TYPE = MFVP_MESSAGE_TYPE(7i32);
pub const MFVP_MESSAGE_ENDOFSTREAM: MFVP_MESSAGE_TYPE = MFVP_MESSAGE_TYPE(5i32);
pub const MFVP_MESSAGE_ENDSTREAMING: MFVP_MESSAGE_TYPE = MFVP_MESSAGE_TYPE(4i32);
pub const MFVP_MESSAGE_FLUSH: MFVP_MESSAGE_TYPE = MFVP_MESSAGE_TYPE(0i32);
pub const MFVP_MESSAGE_INVALIDATEMEDIATYPE: MFVP_MESSAGE_TYPE = MFVP_MESSAGE_TYPE(1i32);
pub const MFVP_MESSAGE_PROCESSINPUTNOTIFY: MFVP_MESSAGE_TYPE = MFVP_MESSAGE_TYPE(2i32);
pub const MFVP_MESSAGE_STEP: MFVP_MESSAGE_TYPE = MFVP_MESSAGE_TYPE(6i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFVP_MESSAGE_TYPE(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFVideo3DFormat(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFVideo3DSampleFormat(pub i32);
pub const MFVideo3DSampleFormat_BaseView: MFVideo3DFormat = MFVideo3DFormat(0i32);
pub const MFVideo3DSampleFormat_MultiView: MFVideo3DFormat = MFVideo3DFormat(1i32);
pub const MFVideo3DSampleFormat_Packed_LeftRight: MFVideo3DFormat = MFVideo3DFormat(2i32);
pub const MFVideo3DSampleFormat_Packed_TopBottom: MFVideo3DFormat = MFVideo3DFormat(3i32);
pub const MFVideoARMode_Mask: MFVideoAspectRatioMode = MFVideoAspectRatioMode(7i32);
pub const MFVideoARMode_NonLinearStretch: MFVideoAspectRatioMode = MFVideoAspectRatioMode(4i32);
pub const MFVideoARMode_None: MFVideoAspectRatioMode = MFVideoAspectRatioMode(0i32);
pub const MFVideoARMode_PreservePicture: MFVideoAspectRatioMode = MFVideoAspectRatioMode(1i32);
pub const MFVideoARMode_PreservePixel: MFVideoAspectRatioMode = MFVideoAspectRatioMode(2i32);
#[repr(C)]
#[cfg(all(feature = "Win32_Graphics_Direct3D9", feature = "Win32_Graphics_Gdi"))]
pub struct MFVideoAlphaBitmap {
pub GetBitmapFromDC: windows_core::BOOL,
pub bitmap: MFVideoAlphaBitmap_0,
pub params: MFVideoAlphaBitmapParams,
}
#[cfg(all(feature = "Win32_Graphics_Direct3D9", feature = "Win32_Graphics_Gdi"))]
impl Clone for MFVideoAlphaBitmap {
fn clone(&self) -> Self {
unsafe { core::mem::transmute_copy(self) }
}
}
#[cfg(all(feature = "Win32_Graphics_Direct3D9", feature = "Win32_Graphics_Gdi"))]
impl Default for MFVideoAlphaBitmap {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[cfg(all(feature = "Win32_Graphics_Direct3D9", feature = "Win32_Graphics_Gdi"))]
pub union MFVideoAlphaBitmap_0 {
pub hdc: super::super::Graphics::Gdi::HDC,
pub pDDS: core::mem::ManuallyDrop<Option<super::super::Graphics::Direct3D9::IDirect3DSurface9>>,
}
#[cfg(all(feature = "Win32_Graphics_Direct3D9", feature = "Win32_Graphics_Gdi"))]
impl Clone for MFVideoAlphaBitmap_0 {
fn clone(&self) -> Self {
unsafe { core::mem::transmute_copy(self) }
}
}
#[cfg(all(feature = "Win32_Graphics_Direct3D9", feature = "Win32_Graphics_Gdi"))]
impl Default for MFVideoAlphaBitmap_0 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFVideoAlphaBitmapFlags(pub i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MFVideoAlphaBitmapParams {
pub dwFlags: u32,
pub clrSrcKey: super::super::Foundation::COLORREF,
pub rcSrc: super::super::Foundation::RECT,
pub nrcDest: MFVideoNormalizedRect,
pub fAlpha: f32,
pub dwFilterMode: u32,
}
pub const MFVideoAlphaBitmap_Alpha: MFVideoAlphaBitmapFlags = MFVideoAlphaBitmapFlags(32i32);
pub const MFVideoAlphaBitmap_BitMask: MFVideoAlphaBitmapFlags = MFVideoAlphaBitmapFlags(63i32);
pub const MFVideoAlphaBitmap_DestRect: MFVideoAlphaBitmapFlags = MFVideoAlphaBitmapFlags(8i32);
pub const MFVideoAlphaBitmap_EntireDDS: MFVideoAlphaBitmapFlags = MFVideoAlphaBitmapFlags(1i32);
pub const MFVideoAlphaBitmap_FilterMode: MFVideoAlphaBitmapFlags = MFVideoAlphaBitmapFlags(16i32);
pub const MFVideoAlphaBitmap_SrcColorKey: MFVideoAlphaBitmapFlags = MFVideoAlphaBitmapFlags(2i32);
pub const MFVideoAlphaBitmap_SrcRect: MFVideoAlphaBitmapFlags = MFVideoAlphaBitmapFlags(4i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MFVideoArea {
pub OffsetX: MFOffset,
pub OffsetY: MFOffset,
pub Area: super::super::Foundation::SIZE,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFVideoAspectRatioMode(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFVideoChromaSubsampling(pub i32);
pub const MFVideoChromaSubsampling_Cosited: MFVideoChromaSubsampling = MFVideoChromaSubsampling(7i32);
pub const MFVideoChromaSubsampling_DV_PAL: MFVideoChromaSubsampling = MFVideoChromaSubsampling(6i32);
pub const MFVideoChromaSubsampling_ForceDWORD: MFVideoChromaSubsampling = MFVideoChromaSubsampling(2147483647i32);
pub const MFVideoChromaSubsampling_Horizontally_Cosited: MFVideoChromaSubsampling = MFVideoChromaSubsampling(4i32);
pub const MFVideoChromaSubsampling_Last: MFVideoChromaSubsampling = MFVideoChromaSubsampling(8i32);
pub const MFVideoChromaSubsampling_MPEG1: MFVideoChromaSubsampling = MFVideoChromaSubsampling(1i32);
pub const MFVideoChromaSubsampling_MPEG2: MFVideoChromaSubsampling = MFVideoChromaSubsampling(5i32);
pub const MFVideoChromaSubsampling_ProgressiveChroma: MFVideoChromaSubsampling = MFVideoChromaSubsampling(8i32);
pub const MFVideoChromaSubsampling_Unknown: MFVideoChromaSubsampling = MFVideoChromaSubsampling(0i32);
pub const MFVideoChromaSubsampling_Vertically_AlignedChromaPlanes: MFVideoChromaSubsampling = MFVideoChromaSubsampling(1i32);
pub const MFVideoChromaSubsampling_Vertically_Cosited: MFVideoChromaSubsampling = MFVideoChromaSubsampling(2i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MFVideoCompressedInfo {
pub AvgBitrate: i64,
pub AvgBitErrorRate: i64,
pub MaxKeyFrameSpacing: u32,
}
pub const MFVideoDRMFlag_AnalogProtected: MFVideoDRMFlags = MFVideoDRMFlags(1i32);
pub const MFVideoDRMFlag_DigitallyProtected: MFVideoDRMFlags = MFVideoDRMFlags(2i32);
pub const MFVideoDRMFlag_None: MFVideoDRMFlags = MFVideoDRMFlags(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFVideoDRMFlags(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFVideoDSPMode(pub i32);
pub const MFVideoDSPMode_Passthrough: MFVideoDSPMode = MFVideoDSPMode(1i32);
pub const MFVideoDSPMode_Stabilization: MFVideoDSPMode = MFVideoDSPMode(4i32);
pub const MFVideoFlag_AnalogProtected: MFVideoFlags = MFVideoFlags(32i32);
pub const MFVideoFlag_BottomUpLinearRep: MFVideoFlags = MFVideoFlags(524288i32);
pub const MFVideoFlag_DigitallyProtected: MFVideoFlags = MFVideoFlags(64i32);
pub const MFVideoFlag_FieldRepeatCountMask: MFVideoFlags = MFVideoFlags(1792i32);
pub const MFVideoFlag_FieldRepeatCountShift: MFVideoFlags = MFVideoFlags(8i32);
pub const MFVideoFlag_LowerFieldFirst: MFVideoFlags = MFVideoFlags(262144i32);
pub const MFVideoFlag_PAD_TO_16x9: MFVideoFlags = MFVideoFlags(2i32);
pub const MFVideoFlag_PAD_TO_4x3: MFVideoFlags = MFVideoFlags(1i32);
pub const MFVideoFlag_PAD_TO_Mask: MFVideoFlags = MFVideoFlags(3i32);
pub const MFVideoFlag_PAD_TO_None: MFVideoFlags = MFVideoFlags(0i32);
pub const MFVideoFlag_PanScanEnabled: MFVideoFlags = MFVideoFlags(131072i32);
pub const MFVideoFlag_ProgressiveContent: MFVideoFlags = MFVideoFlags(128i32);
pub const MFVideoFlag_ProgressiveSeqReset: MFVideoFlags = MFVideoFlags(2048i32);
pub const MFVideoFlag_SrcContentHint16x9: MFVideoFlags = MFVideoFlags(4i32);
pub const MFVideoFlag_SrcContentHint235_1: MFVideoFlags = MFVideoFlags(8i32);
pub const MFVideoFlag_SrcContentHintMask: MFVideoFlags = MFVideoFlags(28i32);
pub const MFVideoFlag_SrcContentHintNone: MFVideoFlags = MFVideoFlags(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFVideoFlags(pub i32);
pub const MFVideoFlags_DXVASurface: MFVideoFlags = MFVideoFlags(1048576i32);
pub const MFVideoFlags_ForceQWORD: MFVideoFlags = MFVideoFlags(2147483647i32);
pub const MFVideoFlags_RenderTargetSurface: MFVideoFlags = MFVideoFlags(4194304i32);
pub const MFVideoFormat_420O: windows_core::GUID = windows_core::GUID::from_u128(0x4f303234_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_A16B16G16R16F: windows_core::GUID = windows_core::GUID::from_u128(0x00000071_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_A2R10G10B10: windows_core::GUID = windows_core::GUID::from_u128(0x0000001f_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_AI44: windows_core::GUID = windows_core::GUID::from_u128(0x34344941_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_ARGB32: windows_core::GUID = windows_core::GUID::from_u128(0x00000015_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_AV1: windows_core::GUID = windows_core::GUID::from_u128(0x31305641_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_AYUV: windows_core::GUID = windows_core::GUID::from_u128(0x56555941_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_Base: windows_core::GUID = windows_core::GUID::from_u128(0x00000000_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_Base_HDCP: windows_core::GUID = windows_core::GUID::from_u128(0xeac3b9d5_bd14_4237_8f1f_bab428e49312);
pub const MFVideoFormat_D16: windows_core::GUID = windows_core::GUID::from_u128(0x00000050_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_DV25: windows_core::GUID = windows_core::GUID::from_u128(0x35327664_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_DV50: windows_core::GUID = windows_core::GUID::from_u128(0x30357664_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_DVH1: windows_core::GUID = windows_core::GUID::from_u128(0x31687664_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_DVHD: windows_core::GUID = windows_core::GUID::from_u128(0x64687664_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_DVSD: windows_core::GUID = windows_core::GUID::from_u128(0x64737664_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_DVSL: windows_core::GUID = windows_core::GUID::from_u128(0x6c737664_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_H263: windows_core::GUID = windows_core::GUID::from_u128(0x33363248_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_H264: windows_core::GUID = windows_core::GUID::from_u128(0x34363248_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_H264_ES: windows_core::GUID = windows_core::GUID::from_u128(0x3f40f4f0_5622_4ff8_b6d8_a17a584bee5e);
pub const MFVideoFormat_H264_HDCP: windows_core::GUID = windows_core::GUID::from_u128(0x5d0ce9dd_9817_49da_bdfd_f5f5b98f18a6);
pub const MFVideoFormat_H265: windows_core::GUID = windows_core::GUID::from_u128(0x35363248_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_HEVC: windows_core::GUID = windows_core::GUID::from_u128(0x43564548_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_HEVC_ES: windows_core::GUID = windows_core::GUID::from_u128(0x53564548_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_HEVC_HDCP: windows_core::GUID = windows_core::GUID::from_u128(0x3cfe0fe6_05c4_47dc_9d70_4bdb2959720f);
pub const MFVideoFormat_I420: windows_core::GUID = windows_core::GUID::from_u128(0x30323449_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_IYUV: windows_core::GUID = windows_core::GUID::from_u128(0x56555949_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_L16: windows_core::GUID = windows_core::GUID::from_u128(0x00000051_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_L8: windows_core::GUID = windows_core::GUID::from_u128(0x00000032_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_M4S2: windows_core::GUID = windows_core::GUID::from_u128(0x3253344d_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_MJPG: windows_core::GUID = windows_core::GUID::from_u128(0x47504a4d_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_MP43: windows_core::GUID = windows_core::GUID::from_u128(0x3334504d_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_MP4S: windows_core::GUID = windows_core::GUID::from_u128(0x5334504d_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_MP4V: windows_core::GUID = windows_core::GUID::from_u128(0x5634504d_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_MPEG2: windows_core::GUID = windows_core::GUID::from_u128(0xe06d8026_db46_11cf_b4d1_00805f6cbbea);
pub const MFVideoFormat_MPG1: windows_core::GUID = windows_core::GUID::from_u128(0x3147504d_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_MSS1: windows_core::GUID = windows_core::GUID::from_u128(0x3153534d_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_MSS2: windows_core::GUID = windows_core::GUID::from_u128(0x3253534d_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_NV11: windows_core::GUID = windows_core::GUID::from_u128(0x3131564e_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_NV12: windows_core::GUID = windows_core::GUID::from_u128(0x3231564e_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_NV21: windows_core::GUID = windows_core::GUID::from_u128(0x3132564e_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_ORAW: windows_core::GUID = windows_core::GUID::from_u128(0x5741524f_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_P010: windows_core::GUID = windows_core::GUID::from_u128(0x30313050_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_P016: windows_core::GUID = windows_core::GUID::from_u128(0x36313050_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_P210: windows_core::GUID = windows_core::GUID::from_u128(0x30313250_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_P216: windows_core::GUID = windows_core::GUID::from_u128(0x36313250_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_RGB24: windows_core::GUID = windows_core::GUID::from_u128(0x00000014_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_RGB32: windows_core::GUID = windows_core::GUID::from_u128(0x00000016_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_RGB555: windows_core::GUID = windows_core::GUID::from_u128(0x00000018_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_RGB565: windows_core::GUID = windows_core::GUID::from_u128(0x00000017_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_RGB8: windows_core::GUID = windows_core::GUID::from_u128(0x00000029_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_Theora: windows_core::GUID = windows_core::GUID::from_u128(0x6f656874_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_UYVY: windows_core::GUID = windows_core::GUID::from_u128(0x59565955_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_VP10: windows_core::GUID = windows_core::GUID::from_u128(0x30315056_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_VP80: windows_core::GUID = windows_core::GUID::from_u128(0x30385056_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_VP90: windows_core::GUID = windows_core::GUID::from_u128(0x30395056_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_WMV1: windows_core::GUID = windows_core::GUID::from_u128(0x31564d57_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_WMV2: windows_core::GUID = windows_core::GUID::from_u128(0x32564d57_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_WMV3: windows_core::GUID = windows_core::GUID::from_u128(0x33564d57_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_WVC1: windows_core::GUID = windows_core::GUID::from_u128(0x31435657_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_Y210: windows_core::GUID = windows_core::GUID::from_u128(0x30313259_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_Y216: windows_core::GUID = windows_core::GUID::from_u128(0x36313259_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_Y410: windows_core::GUID = windows_core::GUID::from_u128(0x30313459_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_Y416: windows_core::GUID = windows_core::GUID::from_u128(0x36313459_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_Y41P: windows_core::GUID = windows_core::GUID::from_u128(0x50313459_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_Y41T: windows_core::GUID = windows_core::GUID::from_u128(0x54313459_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_Y42T: windows_core::GUID = windows_core::GUID::from_u128(0x54323459_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_YUY2: windows_core::GUID = windows_core::GUID::from_u128(0x32595559_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_YV12: windows_core::GUID = windows_core::GUID::from_u128(0x32315659_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_YVU9: windows_core::GUID = windows_core::GUID::from_u128(0x39555659_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_YVYU: windows_core::GUID = windows_core::GUID::from_u128(0x55595659_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_v210: windows_core::GUID = windows_core::GUID::from_u128(0x30313276_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_v216: windows_core::GUID = windows_core::GUID::from_u128(0x36313276_0000_0010_8000_00aa00389b71);
pub const MFVideoFormat_v410: windows_core::GUID = windows_core::GUID::from_u128(0x30313476_0000_0010_8000_00aa00389b71);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MFVideoInfo {
pub dwWidth: u32,
pub dwHeight: u32,
pub PixelAspectRatio: MFRatio,
pub SourceChromaSubsampling: MFVideoChromaSubsampling,
pub InterlaceMode: MFVideoInterlaceMode,
pub TransferFunction: MFVideoTransferFunction,
pub ColorPrimaries: MFVideoPrimaries,
pub TransferMatrix: MFVideoTransferMatrix,
pub SourceLighting: MFVideoLighting,
pub FramesPerSecond: MFRatio,
pub NominalRange: MFNominalRange,
pub GeometricAperture: MFVideoArea,
pub MinimumDisplayAperture: MFVideoArea,
pub PanScanAperture: MFVideoArea,
pub VideoFlags: u64,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFVideoInterlaceMode(pub i32);
pub const MFVideoInterlace_FieldInterleavedLowerFirst: MFVideoInterlaceMode = MFVideoInterlaceMode(4i32);
pub const MFVideoInterlace_FieldInterleavedUpperFirst: MFVideoInterlaceMode = MFVideoInterlaceMode(3i32);
pub const MFVideoInterlace_FieldSingleLower: MFVideoInterlaceMode = MFVideoInterlaceMode(6i32);
pub const MFVideoInterlace_FieldSingleUpper: MFVideoInterlaceMode = MFVideoInterlaceMode(5i32);
pub const MFVideoInterlace_ForceDWORD: MFVideoInterlaceMode = MFVideoInterlaceMode(2147483647i32);
pub const MFVideoInterlace_Last: MFVideoInterlaceMode = MFVideoInterlaceMode(8i32);
pub const MFVideoInterlace_MixedInterlaceOrProgressive: MFVideoInterlaceMode = MFVideoInterlaceMode(7i32);
pub const MFVideoInterlace_Progressive: MFVideoInterlaceMode = MFVideoInterlaceMode(2i32);
pub const MFVideoInterlace_Unknown: MFVideoInterlaceMode = MFVideoInterlaceMode(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFVideoLighting(pub i32);
pub const MFVideoLighting_ForceDWORD: MFVideoLighting = MFVideoLighting(2147483647i32);
pub const MFVideoLighting_Last: MFVideoLighting = MFVideoLighting(5i32);
pub const MFVideoLighting_Unknown: MFVideoLighting = MFVideoLighting(0i32);
pub const MFVideoLighting_bright: MFVideoLighting = MFVideoLighting(1i32);
pub const MFVideoLighting_dark: MFVideoLighting = MFVideoLighting(4i32);
pub const MFVideoLighting_dim: MFVideoLighting = MFVideoLighting(3i32);
pub const MFVideoLighting_office: MFVideoLighting = MFVideoLighting(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFVideoMixPrefs(pub i32);
pub const MFVideoMixPrefs_AllowDropToBob: MFVideoMixPrefs = MFVideoMixPrefs(4i32);
pub const MFVideoMixPrefs_AllowDropToHalfInterlace: MFVideoMixPrefs = MFVideoMixPrefs(2i32);
pub const MFVideoMixPrefs_EnableRotation: MFVideoMixPrefs = MFVideoMixPrefs(16i32);
pub const MFVideoMixPrefs_ForceBob: MFVideoMixPrefs = MFVideoMixPrefs(8i32);
pub const MFVideoMixPrefs_ForceHalfInterlace: MFVideoMixPrefs = MFVideoMixPrefs(1i32);
pub const MFVideoMixPrefs_Mask: MFVideoMixPrefs = MFVideoMixPrefs(31i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MFVideoNormalizedRect {
pub left: f32,
pub top: f32,
pub right: f32,
pub bottom: f32,
}
pub const MFVideoPadFlag_PAD_TO_16x9: MFVideoPadFlags = MFVideoPadFlags(2i32);
pub const MFVideoPadFlag_PAD_TO_4x3: MFVideoPadFlags = MFVideoPadFlags(1i32);
pub const MFVideoPadFlag_PAD_TO_None: MFVideoPadFlags = MFVideoPadFlags(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFVideoPadFlags(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFVideoPrimaries(pub i32);
pub const MFVideoPrimaries_ACES: MFVideoPrimaries = MFVideoPrimaries(12i32);
pub const MFVideoPrimaries_BT2020: MFVideoPrimaries = MFVideoPrimaries(9i32);
pub const MFVideoPrimaries_BT470_2_SysBG: MFVideoPrimaries = MFVideoPrimaries(4i32);
pub const MFVideoPrimaries_BT470_2_SysM: MFVideoPrimaries = MFVideoPrimaries(3i32);
pub const MFVideoPrimaries_BT709: MFVideoPrimaries = MFVideoPrimaries(2i32);
pub const MFVideoPrimaries_DCI_P3: MFVideoPrimaries = MFVideoPrimaries(11i32);
pub const MFVideoPrimaries_EBU3213: MFVideoPrimaries = MFVideoPrimaries(7i32);
pub const MFVideoPrimaries_ForceDWORD: MFVideoPrimaries = MFVideoPrimaries(2147483647i32);
pub const MFVideoPrimaries_Last: MFVideoPrimaries = MFVideoPrimaries(13i32);
pub const MFVideoPrimaries_SMPTE170M: MFVideoPrimaries = MFVideoPrimaries(5i32);
pub const MFVideoPrimaries_SMPTE240M: MFVideoPrimaries = MFVideoPrimaries(6i32);
pub const MFVideoPrimaries_SMPTE_C: MFVideoPrimaries = MFVideoPrimaries(8i32);
pub const MFVideoPrimaries_Unknown: MFVideoPrimaries = MFVideoPrimaries(0i32);
pub const MFVideoPrimaries_XYZ: MFVideoPrimaries = MFVideoPrimaries(10i32);
pub const MFVideoPrimaries_reserved: MFVideoPrimaries = MFVideoPrimaries(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFVideoRenderPrefs(pub i32);
pub const MFVideoRenderPrefs_AllowBatching: MFVideoRenderPrefs = MFVideoRenderPrefs(32i32);
pub const MFVideoRenderPrefs_AllowOutputThrottling: MFVideoRenderPrefs = MFVideoRenderPrefs(4i32);
pub const MFVideoRenderPrefs_AllowScaling: MFVideoRenderPrefs = MFVideoRenderPrefs(128i32);
pub const MFVideoRenderPrefs_DoNotClipToDevice: MFVideoRenderPrefs = MFVideoRenderPrefs(2i32);
pub const MFVideoRenderPrefs_DoNotRenderBorder: MFVideoRenderPrefs = MFVideoRenderPrefs(1i32);
pub const MFVideoRenderPrefs_DoNotRepaintOnStop: MFVideoRenderPrefs = MFVideoRenderPrefs(256i32);
pub const MFVideoRenderPrefs_ForceBatching: MFVideoRenderPrefs = MFVideoRenderPrefs(16i32);
pub const MFVideoRenderPrefs_ForceOutputThrottling: MFVideoRenderPrefs = MFVideoRenderPrefs(8i32);
pub const MFVideoRenderPrefs_ForceScaling: MFVideoRenderPrefs = MFVideoRenderPrefs(64i32);
pub const MFVideoRenderPrefs_Mask: MFVideoRenderPrefs = MFVideoRenderPrefs(511i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFVideoRotationFormat(pub i32);
pub const MFVideoRotationFormat_0: MFVideoRotationFormat = MFVideoRotationFormat(0i32);
pub const MFVideoRotationFormat_180: MFVideoRotationFormat = MFVideoRotationFormat(180i32);
pub const MFVideoRotationFormat_270: MFVideoRotationFormat = MFVideoRotationFormat(270i32);
pub const MFVideoRotationFormat_90: MFVideoRotationFormat = MFVideoRotationFormat(90i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFVideoSphericalFormat(pub i32);
pub const MFVideoSphericalFormat_3DMesh: MFVideoSphericalFormat = MFVideoSphericalFormat(3i32);
pub const MFVideoSphericalFormat_CubeMap: MFVideoSphericalFormat = MFVideoSphericalFormat(2i32);
pub const MFVideoSphericalFormat_Equirectangular: MFVideoSphericalFormat = MFVideoSphericalFormat(1i32);
pub const MFVideoSphericalFormat_Unsupported: MFVideoSphericalFormat = MFVideoSphericalFormat(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFVideoSphericalProjectionMode(pub i32);
pub const MFVideoSphericalProjectionMode_Flat: MFVideoSphericalProjectionMode = MFVideoSphericalProjectionMode(1i32);
pub const MFVideoSphericalProjectionMode_Spherical: MFVideoSphericalProjectionMode = MFVideoSphericalProjectionMode(0i32);
pub const MFVideoSrcContentHintFlag_16x9: MFVideoSrcContentHintFlags = MFVideoSrcContentHintFlags(1i32);
pub const MFVideoSrcContentHintFlag_235_1: MFVideoSrcContentHintFlags = MFVideoSrcContentHintFlags(2i32);
pub const MFVideoSrcContentHintFlag_None: MFVideoSrcContentHintFlags = MFVideoSrcContentHintFlags(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFVideoSrcContentHintFlags(pub i32);
#[repr(C)]
#[derive(Clone, Copy)]
pub struct MFVideoSurfaceInfo {
pub Format: u32,
pub PaletteEntries: u32,
pub Palette: [MFPaletteEntry; 1],
}
impl Default for MFVideoSurfaceInfo {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const MFVideoTransFunc_10: MFVideoTransferFunction = MFVideoTransferFunction(1i32);
pub const MFVideoTransFunc_10_rel: MFVideoTransferFunction = MFVideoTransferFunction(17i32);
pub const MFVideoTransFunc_18: MFVideoTransferFunction = MFVideoTransferFunction(2i32);
pub const MFVideoTransFunc_20: MFVideoTransferFunction = MFVideoTransferFunction(3i32);
pub const MFVideoTransFunc_2020: MFVideoTransferFunction = MFVideoTransferFunction(13i32);
pub const MFVideoTransFunc_2020_const: MFVideoTransferFunction = MFVideoTransferFunction(12i32);
pub const MFVideoTransFunc_2084: MFVideoTransferFunction = MFVideoTransferFunction(15i32);
pub const MFVideoTransFunc_22: MFVideoTransferFunction = MFVideoTransferFunction(4i32);
pub const MFVideoTransFunc_240M: MFVideoTransferFunction = MFVideoTransferFunction(6i32);
pub const MFVideoTransFunc_26: MFVideoTransferFunction = MFVideoTransferFunction(14i32);
pub const MFVideoTransFunc_28: MFVideoTransferFunction = MFVideoTransferFunction(8i32);
pub const MFVideoTransFunc_709: MFVideoTransferFunction = MFVideoTransferFunction(5i32);
pub const MFVideoTransFunc_709_sym: MFVideoTransferFunction = MFVideoTransferFunction(11i32);
pub const MFVideoTransFunc_ForceDWORD: MFVideoTransferFunction = MFVideoTransferFunction(2147483647i32);
pub const MFVideoTransFunc_HLG: MFVideoTransferFunction = MFVideoTransferFunction(16i32);
pub const MFVideoTransFunc_Last: MFVideoTransferFunction = MFVideoTransferFunction(18i32);
pub const MFVideoTransFunc_Log_100: MFVideoTransferFunction = MFVideoTransferFunction(9i32);
pub const MFVideoTransFunc_Log_316: MFVideoTransferFunction = MFVideoTransferFunction(10i32);
pub const MFVideoTransFunc_Unknown: MFVideoTransferFunction = MFVideoTransferFunction(0i32);
pub const MFVideoTransFunc_sRGB: MFVideoTransferFunction = MFVideoTransferFunction(7i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFVideoTransferFunction(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFVideoTransferMatrix(pub i32);
pub const MFVideoTransferMatrix_BT2020_10: MFVideoTransferMatrix = MFVideoTransferMatrix(4i32);
pub const MFVideoTransferMatrix_BT2020_12: MFVideoTransferMatrix = MFVideoTransferMatrix(5i32);
pub const MFVideoTransferMatrix_BT601: MFVideoTransferMatrix = MFVideoTransferMatrix(2i32);
pub const MFVideoTransferMatrix_BT709: MFVideoTransferMatrix = MFVideoTransferMatrix(1i32);
pub const MFVideoTransferMatrix_ForceDWORD: MFVideoTransferMatrix = MFVideoTransferMatrix(2147483647i32);
pub const MFVideoTransferMatrix_Last: MFVideoTransferMatrix = MFVideoTransferMatrix(6i32);
pub const MFVideoTransferMatrix_SMPTE240M: MFVideoTransferMatrix = MFVideoTransferMatrix(3i32);
pub const MFVideoTransferMatrix_Unknown: MFVideoTransferMatrix = MFVideoTransferMatrix(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFVirtualCameraAccess(pub i32);
pub const MFVirtualCameraAccess_AllUsers: MFVirtualCameraAccess = MFVirtualCameraAccess(1i32);
pub const MFVirtualCameraAccess_CurrentUser: MFVirtualCameraAccess = MFVirtualCameraAccess(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFVirtualCameraLifetime(pub i32);
pub const MFVirtualCameraLifetime_Session: MFVirtualCameraLifetime = MFVirtualCameraLifetime(0i32);
pub const MFVirtualCameraLifetime_System: MFVirtualCameraLifetime = MFVirtualCameraLifetime(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFVirtualCameraType(pub i32);
pub const MFVirtualCameraType_SoftwareCameraSource: MFVirtualCameraType = MFVirtualCameraType(0i32);
pub const MFWaveFormatExConvertFlag_ForceExtensible: MFWaveFormatExConvertFlags = MFWaveFormatExConvertFlags(1i32);
pub const MFWaveFormatExConvertFlag_Normal: MFWaveFormatExConvertFlags = MFWaveFormatExConvertFlags(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MFWaveFormatExConvertFlags(pub i32);
pub const MF_1024_BYTE_ALIGNMENT: u32 = 1023u32;
pub const MF_128_BYTE_ALIGNMENT: u32 = 127u32;
pub const MF_16_BYTE_ALIGNMENT: u32 = 15u32;
pub const MF_1_BYTE_ALIGNMENT: u32 = 0u32;
pub const MF_2048_BYTE_ALIGNMENT: u32 = 2047u32;
pub const MF_256_BYTE_ALIGNMENT: u32 = 255u32;
pub const MF_2_BYTE_ALIGNMENT: u32 = 1u32;
pub const MF_32_BYTE_ALIGNMENT: u32 = 31u32;
pub const MF_4096_BYTE_ALIGNMENT: u32 = 4095u32;
pub const MF_4_BYTE_ALIGNMENT: u32 = 3u32;
pub const MF_512_BYTE_ALIGNMENT: u32 = 511u32;
pub const MF_64_BYTE_ALIGNMENT: u32 = 63u32;
pub const MF_8192_BYTE_ALIGNMENT: u32 = 8191u32;
pub const MF_8_BYTE_ALIGNMENT: u32 = 7u32;
pub const MF_ACCESSMODE_READ: MF_FILE_ACCESSMODE = MF_FILE_ACCESSMODE(1i32);
pub const MF_ACCESSMODE_READWRITE: MF_FILE_ACCESSMODE = MF_FILE_ACCESSMODE(3i32);
pub const MF_ACCESSMODE_WRITE: MF_FILE_ACCESSMODE = MF_FILE_ACCESSMODE(2i32);
pub const MF_ACCESS_CONTROLLED_MEDIASOURCE_SERVICE: windows_core::GUID = windows_core::GUID::from_u128(0x014a5031_2f05_4c6a_9f9c_7d0dc4eda5f4);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_ACTIVATE_CUSTOM_MIXER(pub i32);
pub const MF_ACTIVATE_CUSTOM_MIXER_ALLOWFAIL: MF_ACTIVATE_CUSTOM_MIXER = MF_ACTIVATE_CUSTOM_MIXER(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_ACTIVATE_CUSTOM_PRESENTER(pub i32);
pub const MF_ACTIVATE_CUSTOM_PRESENTER_ALLOWFAIL: MF_ACTIVATE_CUSTOM_PRESENTER = MF_ACTIVATE_CUSTOM_PRESENTER(1i32);
pub const MF_ACTIVATE_CUSTOM_VIDEO_MIXER_ACTIVATE: windows_core::GUID = windows_core::GUID::from_u128(0xba491361_be50_451e_95ab_6d4accc7dad8);
pub const MF_ACTIVATE_CUSTOM_VIDEO_MIXER_CLSID: windows_core::GUID = windows_core::GUID::from_u128(0xba491360_be50_451e_95ab_6d4accc7dad8);
pub const MF_ACTIVATE_CUSTOM_VIDEO_MIXER_FLAGS: windows_core::GUID = windows_core::GUID::from_u128(0xba491362_be50_451e_95ab_6d4accc7dad8);
pub const MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_ACTIVATE: windows_core::GUID = windows_core::GUID::from_u128(0xba491365_be50_451e_95ab_6d4accc7dad8);
pub const MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_CLSID: windows_core::GUID = windows_core::GUID::from_u128(0xba491364_be50_451e_95ab_6d4accc7dad8);
pub const MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_FLAGS: windows_core::GUID = windows_core::GUID::from_u128(0xba491366_be50_451e_95ab_6d4accc7dad8);
pub const MF_ACTIVATE_MFT_LOCKED: windows_core::GUID = windows_core::GUID::from_u128(0xc1f6093c_7f65_4fbd_9e39_5faec3c4fbd7);
pub const MF_ACTIVATE_VIDEO_WINDOW: windows_core::GUID = windows_core::GUID::from_u128(0x9a2dbbdd_f57e_4162_82b9_6831377682d3);
pub const MF_API_VERSION: u32 = 112u32;
pub const MF_ASFPROFILE_MAXPACKETSIZE: windows_core::GUID = windows_core::GUID::from_u128(0x22587627_47de_4168_87f5_b5aa9b12a8f0);
pub const MF_ASFPROFILE_MINPACKETSIZE: windows_core::GUID = windows_core::GUID::from_u128(0x22587626_47de_4168_87f5_b5aa9b12a8f0);
pub const MF_ASFSTREAMCONFIG_LEAKYBUCKET1: windows_core::GUID = windows_core::GUID::from_u128(0xc69b5901_ea1a_4c9b_b692_e2a0d29a8add);
pub const MF_ASFSTREAMCONFIG_LEAKYBUCKET2: windows_core::GUID = windows_core::GUID::from_u128(0xc69b5902_ea1a_4c9b_b692_e2a0d29a8add);
pub const MF_ATTRIBUTES_MATCH_ALL_ITEMS: MF_ATTRIBUTES_MATCH_TYPE = MF_ATTRIBUTES_MATCH_TYPE(2i32);
pub const MF_ATTRIBUTES_MATCH_INTERSECTION: MF_ATTRIBUTES_MATCH_TYPE = MF_ATTRIBUTES_MATCH_TYPE(3i32);
pub const MF_ATTRIBUTES_MATCH_OUR_ITEMS: MF_ATTRIBUTES_MATCH_TYPE = MF_ATTRIBUTES_MATCH_TYPE(0i32);
pub const MF_ATTRIBUTES_MATCH_SMALLER: MF_ATTRIBUTES_MATCH_TYPE = MF_ATTRIBUTES_MATCH_TYPE(4i32);
pub const MF_ATTRIBUTES_MATCH_THEIR_ITEMS: MF_ATTRIBUTES_MATCH_TYPE = MF_ATTRIBUTES_MATCH_TYPE(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_ATTRIBUTES_MATCH_TYPE(pub i32);
pub const MF_ATTRIBUTE_BLOB: MF_ATTRIBUTE_TYPE = MF_ATTRIBUTE_TYPE(4113i32);
pub const MF_ATTRIBUTE_DOUBLE: MF_ATTRIBUTE_TYPE = MF_ATTRIBUTE_TYPE(5i32);
pub const MF_ATTRIBUTE_GUID: MF_ATTRIBUTE_TYPE = MF_ATTRIBUTE_TYPE(72i32);
pub const MF_ATTRIBUTE_IUNKNOWN: MF_ATTRIBUTE_TYPE = MF_ATTRIBUTE_TYPE(13i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_ATTRIBUTE_SERIALIZE_OPTIONS(pub i32);
pub const MF_ATTRIBUTE_SERIALIZE_UNKNOWN_BYREF: MF_ATTRIBUTE_SERIALIZE_OPTIONS = MF_ATTRIBUTE_SERIALIZE_OPTIONS(1i32);
pub const MF_ATTRIBUTE_STRING: MF_ATTRIBUTE_TYPE = MF_ATTRIBUTE_TYPE(31i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_ATTRIBUTE_TYPE(pub i32);
pub const MF_ATTRIBUTE_UINT32: MF_ATTRIBUTE_TYPE = MF_ATTRIBUTE_TYPE(19i32);
pub const MF_ATTRIBUTE_UINT64: MF_ATTRIBUTE_TYPE = MF_ATTRIBUTE_TYPE(21i32);
pub const MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ID: windows_core::GUID = windows_core::GUID::from_u128(0xb10aaec3_ef71_4cc3_b873_05a9a08b9f8e);
pub const MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ROLE: windows_core::GUID = windows_core::GUID::from_u128(0x6ba644ff_27c5_4d02_9887_c28619fdb91b);
pub const MF_AUDIO_RENDERER_ATTRIBUTE_FLAGS: windows_core::GUID = windows_core::GUID::from_u128(0xede4b5e0_f805_4d6c_99b3_db01bf95dfab);
pub const MF_AUDIO_RENDERER_ATTRIBUTE_FLAGS_CROSSPROCESS: u32 = 1u32;
pub const MF_AUDIO_RENDERER_ATTRIBUTE_FLAGS_DONT_ALLOW_FORMAT_CHANGES: u32 = 4u32;
pub const MF_AUDIO_RENDERER_ATTRIBUTE_FLAGS_NOPERSIST: u32 = 2u32;
pub const MF_AUDIO_RENDERER_ATTRIBUTE_SESSION_ID: windows_core::GUID = windows_core::GUID::from_u128(0xede4b5e3_f805_4d6c_99b3_db01bf95dfab);
pub const MF_AUDIO_RENDERER_ATTRIBUTE_STREAM_CATEGORY: windows_core::GUID = windows_core::GUID::from_u128(0xa9770471_92ec_4df4_94fe_81c36f0c3a7a);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_AUVRHP_ROOMMODEL(pub i32);
pub const MF_BD_MVC_PLANE_OFFSET_METADATA: windows_core::GUID = windows_core::GUID::from_u128(0x62a654e4_b76c_4901_9823_2cb615d47318);
pub const MF_BOOT_DRIVER_VERIFICATION_FAILED: u32 = 1048576u32;
pub const MF_BYTESTREAMHANDLER_ACCEPTS_SHARE_WRITE: windows_core::GUID = windows_core::GUID::from_u128(0xa6e1f733_3001_4915_8150_1558a2180ec8);
pub const MF_BYTESTREAM_CONTENT_TYPE: windows_core::GUID = windows_core::GUID::from_u128(0xfc358289_3cb6_460c_a424_b6681260375a);
pub const MF_BYTESTREAM_DLNA_PROFILE_ID: windows_core::GUID = windows_core::GUID::from_u128(0xfc35828d_3cb6_460c_a424_b6681260375a);
pub const MF_BYTESTREAM_DURATION: windows_core::GUID = windows_core::GUID::from_u128(0xfc35828a_3cb6_460c_a424_b6681260375a);
pub const MF_BYTESTREAM_EFFECTIVE_URL: windows_core::GUID = windows_core::GUID::from_u128(0x9afa0209_89d1_42af_8456_1de6b562d691);
pub const MF_BYTESTREAM_IFO_FILE_URI: windows_core::GUID = windows_core::GUID::from_u128(0xfc35828c_3cb6_460c_a424_b6681260375a);
pub const MF_BYTESTREAM_LAST_MODIFIED_TIME: windows_core::GUID = windows_core::GUID::from_u128(0xfc35828b_3cb6_460c_a424_b6681260375a);
pub const MF_BYTESTREAM_ORIGIN_NAME: windows_core::GUID = windows_core::GUID::from_u128(0xfc358288_3cb6_460c_a424_b6681260375a);
pub const MF_BYTESTREAM_SERVICE: windows_core::GUID = windows_core::GUID::from_u128(0xab025e2b_16d9_4180_a127_ba6c70156161);
pub const MF_BYTESTREAM_TRANSCODED: windows_core::GUID = windows_core::GUID::from_u128(0xb6c5c282_4dc9_4db9_ab48_cf3b6d8bc5e0);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MF_BYTE_STREAM_CACHE_RANGE {
pub qwStartOffset: u64,
pub qwEndOffset: u64,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_CAMERA_CONTROL_CONFIGURATION_TYPE(pub i32);
pub const MF_CAMERA_CONTROL_CONFIGURATION_TYPE_POSTSTART: MF_CAMERA_CONTROL_CONFIGURATION_TYPE = MF_CAMERA_CONTROL_CONFIGURATION_TYPE(1i32);
pub const MF_CAMERA_CONTROL_CONFIGURATION_TYPE_PRESTART: MF_CAMERA_CONTROL_CONFIGURATION_TYPE = MF_CAMERA_CONTROL_CONFIGURATION_TYPE(0i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MF_CAMERA_CONTROL_RANGE_INFO {
pub minValue: i32,
pub maxValue: i32,
pub stepValue: i32,
pub defaultValue: i32,
}
pub const MF_CAPTURE_ENGINE_ALL_EFFECTS_REMOVED: windows_core::GUID = windows_core::GUID::from_u128(0xfded7521_8ed8_431a_a96b_f3e2565e981c);
pub const MF_CAPTURE_ENGINE_AUDIO_PROCESSING: windows_core::GUID = windows_core::GUID::from_u128(0x10f1be5e_7e11_410b_973d_f4b6109000fe);
pub const MF_CAPTURE_ENGINE_AUDIO_PROCESSING_DEFAULT: MF_CAPTURE_ENGINE_AUDIO_PROCESSING_MODE = MF_CAPTURE_ENGINE_AUDIO_PROCESSING_MODE(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_CAPTURE_ENGINE_AUDIO_PROCESSING_MODE(pub i32);
pub const MF_CAPTURE_ENGINE_AUDIO_PROCESSING_RAW: MF_CAPTURE_ENGINE_AUDIO_PROCESSING_MODE = MF_CAPTURE_ENGINE_AUDIO_PROCESSING_MODE(1i32);
pub const MF_CAPTURE_ENGINE_CAMERA_STREAM_BLOCKED: windows_core::GUID = windows_core::GUID::from_u128(0xa4209417_8d39_46f3_b759_5912528f4207);
pub const MF_CAPTURE_ENGINE_CAMERA_STREAM_UNBLOCKED: windows_core::GUID = windows_core::GUID::from_u128(0x9be9eef0_cdaf_4717_8564_834aae66415c);
pub const MF_CAPTURE_ENGINE_D3D_MANAGER: windows_core::GUID = windows_core::GUID::from_u128(0x76e25e7b_d595_4283_962c_c594afd78ddf);
pub const MF_CAPTURE_ENGINE_DECODER_MFT_FIELDOFUSE_UNLOCK_Attribute: windows_core::GUID = windows_core::GUID::from_u128(0x2b8ad2e8_7acb_4321_a606_325c4249f4fc);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_CAPTURE_ENGINE_DEVICE_TYPE(pub i32);
pub const MF_CAPTURE_ENGINE_DEVICE_TYPE_AUDIO: MF_CAPTURE_ENGINE_DEVICE_TYPE = MF_CAPTURE_ENGINE_DEVICE_TYPE(0i32);
pub const MF_CAPTURE_ENGINE_DEVICE_TYPE_VIDEO: MF_CAPTURE_ENGINE_DEVICE_TYPE = MF_CAPTURE_ENGINE_DEVICE_TYPE(1i32);
pub const MF_CAPTURE_ENGINE_DISABLE_DXVA: windows_core::GUID = windows_core::GUID::from_u128(0xf9818862_179d_433f_a32f_74cbcf74466d);
pub const MF_CAPTURE_ENGINE_DISABLE_HARDWARE_TRANSFORMS: windows_core::GUID = windows_core::GUID::from_u128(0xb7c42a6b_3207_4495_b4e7_81f9c35d5991);
pub const MF_CAPTURE_ENGINE_EFFECT_ADDED: windows_core::GUID = windows_core::GUID::from_u128(0xaa8dc7b5_a048_4e13_8ebe_f23c46c830c1);
pub const MF_CAPTURE_ENGINE_EFFECT_REMOVED: windows_core::GUID = windows_core::GUID::from_u128(0xc6e8db07_fb09_4a48_89c6_bf92a04222c9);
pub const MF_CAPTURE_ENGINE_ENABLE_CAMERA_STREAMSTATE_NOTIFICATION: windows_core::GUID = windows_core::GUID::from_u128(0x4c808e9d_aaed_4713_90fb_cb24064ab8da);
pub const MF_CAPTURE_ENGINE_ENCODER_MFT_FIELDOFUSE_UNLOCK_Attribute: windows_core::GUID = windows_core::GUID::from_u128(0x54c63a00_78d5_422f_aa3e_5e99ac649269);
pub const MF_CAPTURE_ENGINE_ERROR: windows_core::GUID = windows_core::GUID::from_u128(0x46b89fc6_33cc_4399_9dad_784de77d587c);
pub const MF_CAPTURE_ENGINE_EVENT_GENERATOR_GUID: windows_core::GUID = windows_core::GUID::from_u128(0xabfa8ad5_fc6d_4911_87e0_961945f8f7ce);
pub const MF_CAPTURE_ENGINE_EVENT_STREAM_INDEX: windows_core::GUID = windows_core::GUID::from_u128(0x82697f44_b1cf_42eb_9753_f86d649c8865);
pub const MF_CAPTURE_ENGINE_INITIALIZED: windows_core::GUID = windows_core::GUID::from_u128(0x219992bc_cf92_4531_a1ae_96e1e886c8f1);
pub const MF_CAPTURE_ENGINE_MEDIASOURCE: MF_CAPTURE_ENGINE_SOURCE = MF_CAPTURE_ENGINE_SOURCE(4294967295u32);
pub const MF_CAPTURE_ENGINE_MEDIASOURCE_CONFIG: windows_core::GUID = windows_core::GUID::from_u128(0xbc6989d2_0fc1_46e1_a74f_efd36bc788de);
pub const MF_CAPTURE_ENGINE_MEDIA_CATEGORY: windows_core::GUID = windows_core::GUID::from_u128(0x8e3f5bd5_dbbf_42f0_8542_d07a3971762a);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_CAPTURE_ENGINE_MEDIA_CATEGORY_TYPE(pub i32);
pub const MF_CAPTURE_ENGINE_MEDIA_CATEGORY_TYPE_COMMUNICATIONS: MF_CAPTURE_ENGINE_MEDIA_CATEGORY_TYPE = MF_CAPTURE_ENGINE_MEDIA_CATEGORY_TYPE(1i32);
pub const MF_CAPTURE_ENGINE_MEDIA_CATEGORY_TYPE_FARFIELDSPEECH: MF_CAPTURE_ENGINE_MEDIA_CATEGORY_TYPE = MF_CAPTURE_ENGINE_MEDIA_CATEGORY_TYPE(5i32);
pub const MF_CAPTURE_ENGINE_MEDIA_CATEGORY_TYPE_GAMECHAT: MF_CAPTURE_ENGINE_MEDIA_CATEGORY_TYPE = MF_CAPTURE_ENGINE_MEDIA_CATEGORY_TYPE(3i32);
pub const MF_CAPTURE_ENGINE_MEDIA_CATEGORY_TYPE_MEDIA: MF_CAPTURE_ENGINE_MEDIA_CATEGORY_TYPE = MF_CAPTURE_ENGINE_MEDIA_CATEGORY_TYPE(2i32);
pub const MF_CAPTURE_ENGINE_MEDIA_CATEGORY_TYPE_OTHER: MF_CAPTURE_ENGINE_MEDIA_CATEGORY_TYPE = MF_CAPTURE_ENGINE_MEDIA_CATEGORY_TYPE(0i32);
pub const MF_CAPTURE_ENGINE_MEDIA_CATEGORY_TYPE_SPEECH: MF_CAPTURE_ENGINE_MEDIA_CATEGORY_TYPE = MF_CAPTURE_ENGINE_MEDIA_CATEGORY_TYPE(4i32);
pub const MF_CAPTURE_ENGINE_MEDIA_CATEGORY_TYPE_UNIFORMSPEECH: MF_CAPTURE_ENGINE_MEDIA_CATEGORY_TYPE = MF_CAPTURE_ENGINE_MEDIA_CATEGORY_TYPE(6i32);
pub const MF_CAPTURE_ENGINE_MEDIA_CATEGORY_TYPE_VOICETYPING: MF_CAPTURE_ENGINE_MEDIA_CATEGORY_TYPE = MF_CAPTURE_ENGINE_MEDIA_CATEGORY_TYPE(7i32);
pub const MF_CAPTURE_ENGINE_OUTPUT_MEDIA_TYPE_SET: windows_core::GUID = windows_core::GUID::from_u128(0xcaaad994_83ec_45e9_a30a_1f20aadb9831);
pub const MF_CAPTURE_ENGINE_PHOTO_TAKEN: windows_core::GUID = windows_core::GUID::from_u128(0x3c50c445_7304_48eb_865d_bba19ba3af5c);
pub const MF_CAPTURE_ENGINE_PREFERRED_SOURCE_STREAM_FOR_AUDIO: MF_CAPTURE_ENGINE_SOURCE = MF_CAPTURE_ENGINE_SOURCE(4294967287u32);
pub const MF_CAPTURE_ENGINE_PREFERRED_SOURCE_STREAM_FOR_METADATA: MF_CAPTURE_ENGINE_SOURCE = MF_CAPTURE_ENGINE_SOURCE(4294967286u32);
pub const MF_CAPTURE_ENGINE_PREFERRED_SOURCE_STREAM_FOR_PHOTO: MF_CAPTURE_ENGINE_SOURCE = MF_CAPTURE_ENGINE_SOURCE(4294967288u32);
pub const MF_CAPTURE_ENGINE_PREFERRED_SOURCE_STREAM_FOR_VIDEO_PREVIEW: MF_CAPTURE_ENGINE_SOURCE = MF_CAPTURE_ENGINE_SOURCE(4294967290u32);
pub const MF_CAPTURE_ENGINE_PREFERRED_SOURCE_STREAM_FOR_VIDEO_RECORD: MF_CAPTURE_ENGINE_SOURCE = MF_CAPTURE_ENGINE_SOURCE(4294967289u32);
pub const MF_CAPTURE_ENGINE_PREVIEW_STARTED: windows_core::GUID = windows_core::GUID::from_u128(0xa416df21_f9d3_4a74_991b_b817298952c4);
pub const MF_CAPTURE_ENGINE_PREVIEW_STOPPED: windows_core::GUID = windows_core::GUID::from_u128(0x13d5143c_1edd_4e50_a2ef_350a47678060);
pub const MF_CAPTURE_ENGINE_RECORD_SINK_AUDIO_MAX_PROCESSED_SAMPLES: windows_core::GUID = windows_core::GUID::from_u128(0x9896e12a_f707_4500_b6bd_db8eb810b50f);
pub const MF_CAPTURE_ENGINE_RECORD_SINK_AUDIO_MAX_UNPROCESSED_SAMPLES: windows_core::GUID = windows_core::GUID::from_u128(0x1cddb141_a7f4_4d58_9896_4d15a53c4efe);
pub const MF_CAPTURE_ENGINE_RECORD_SINK_VIDEO_MAX_PROCESSED_SAMPLES: windows_core::GUID = windows_core::GUID::from_u128(0xe7b4a49e_382c_4aef_a946_aed5490b7111);
pub const MF_CAPTURE_ENGINE_RECORD_SINK_VIDEO_MAX_UNPROCESSED_SAMPLES: windows_core::GUID = windows_core::GUID::from_u128(0xb467f705_7913_4894_9d42_a215fea23da9);
pub const MF_CAPTURE_ENGINE_RECORD_STARTED: windows_core::GUID = windows_core::GUID::from_u128(0xac2b027b_ddf9_48a0_89be_38ab35ef45c0);
pub const MF_CAPTURE_ENGINE_RECORD_STOPPED: windows_core::GUID = windows_core::GUID::from_u128(0x55e5200a_f98f_4c0d_a9ec_9eb25ed3d773);
pub const MF_CAPTURE_ENGINE_SELECTEDCAMERAPROFILE: windows_core::GUID = windows_core::GUID::from_u128(0x03160b7e_1c6f_4db2_ad56_a7c430f82392);
pub const MF_CAPTURE_ENGINE_SELECTEDCAMERAPROFILE_INDEX: windows_core::GUID = windows_core::GUID::from_u128(0x3ce88613_2214_46c3_b417_82f8a313c9c3);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_CAPTURE_ENGINE_SINK_TYPE(pub i32);
pub const MF_CAPTURE_ENGINE_SINK_TYPE_PHOTO: MF_CAPTURE_ENGINE_SINK_TYPE = MF_CAPTURE_ENGINE_SINK_TYPE(2i32);
pub const MF_CAPTURE_ENGINE_SINK_TYPE_PREVIEW: MF_CAPTURE_ENGINE_SINK_TYPE = MF_CAPTURE_ENGINE_SINK_TYPE(1i32);
pub const MF_CAPTURE_ENGINE_SINK_TYPE_RECORD: MF_CAPTURE_ENGINE_SINK_TYPE = MF_CAPTURE_ENGINE_SINK_TYPE(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_CAPTURE_ENGINE_SOURCE(pub u32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_CAPTURE_ENGINE_STREAM_CATEGORY(pub i32);
pub const MF_CAPTURE_ENGINE_STREAM_CATEGORY_AUDIO: MF_CAPTURE_ENGINE_STREAM_CATEGORY = MF_CAPTURE_ENGINE_STREAM_CATEGORY(4i32);
pub const MF_CAPTURE_ENGINE_STREAM_CATEGORY_METADATA: MF_CAPTURE_ENGINE_STREAM_CATEGORY = MF_CAPTURE_ENGINE_STREAM_CATEGORY(6i32);
pub const MF_CAPTURE_ENGINE_STREAM_CATEGORY_PHOTO_DEPENDENT: MF_CAPTURE_ENGINE_STREAM_CATEGORY = MF_CAPTURE_ENGINE_STREAM_CATEGORY(3i32);
pub const MF_CAPTURE_ENGINE_STREAM_CATEGORY_PHOTO_INDEPENDENT: MF_CAPTURE_ENGINE_STREAM_CATEGORY = MF_CAPTURE_ENGINE_STREAM_CATEGORY(2i32);
pub const MF_CAPTURE_ENGINE_STREAM_CATEGORY_UNSUPPORTED: MF_CAPTURE_ENGINE_STREAM_CATEGORY = MF_CAPTURE_ENGINE_STREAM_CATEGORY(5i32);
pub const MF_CAPTURE_ENGINE_STREAM_CATEGORY_VIDEO_CAPTURE: MF_CAPTURE_ENGINE_STREAM_CATEGORY = MF_CAPTURE_ENGINE_STREAM_CATEGORY(1i32);
pub const MF_CAPTURE_ENGINE_STREAM_CATEGORY_VIDEO_PREVIEW: MF_CAPTURE_ENGINE_STREAM_CATEGORY = MF_CAPTURE_ENGINE_STREAM_CATEGORY(0i32);
pub const MF_CAPTURE_ENGINE_USE_AUDIO_DEVICE_ONLY: windows_core::GUID = windows_core::GUID::from_u128(0x1c8077da_8466_4dc4_8b8e_276b3f85923b);
pub const MF_CAPTURE_ENGINE_USE_VIDEO_DEVICE_ONLY: windows_core::GUID = windows_core::GUID::from_u128(0x7e025171_cf32_4f2e_8f19_410577b73a66);
pub const MF_CAPTURE_METADATA_DIGITALWINDOW: windows_core::GUID = windows_core::GUID::from_u128(0x276f72a2_59c8_4f69_97b4_068b8c0ec044);
pub const MF_CAPTURE_METADATA_EXIF: windows_core::GUID = windows_core::GUID::from_u128(0x2e9575b8_8c31_4a02_8575_42b197b71592);
pub const MF_CAPTURE_METADATA_EXPOSURE_COMPENSATION: windows_core::GUID = windows_core::GUID::from_u128(0xd198aa75_4b62_4345_abf3_3c31fa12c299);
pub const MF_CAPTURE_METADATA_EXPOSURE_TIME: windows_core::GUID = windows_core::GUID::from_u128(0x16b9ae99_cd84_4063_879d_a28c7633729e);
pub const MF_CAPTURE_METADATA_FACEROICHARACTERIZATIONS: windows_core::GUID = windows_core::GUID::from_u128(0xb927a1a8_18ef_46d3_b3af_69372f94d9b2);
pub const MF_CAPTURE_METADATA_FACEROIS: windows_core::GUID = windows_core::GUID::from_u128(0x864f25a6_349f_46b1_a30e_54cc22928a47);
pub const MF_CAPTURE_METADATA_FACEROITIMESTAMPS: windows_core::GUID = windows_core::GUID::from_u128(0xe94d50cc_3da0_44d4_bb34_83198a741868);
pub const MF_CAPTURE_METADATA_FIRST_SCANLINE_START_TIME_QPC: windows_core::GUID = windows_core::GUID::from_u128(0x6a2c49f1_e052_46b6_b2d9_73c1558709af);
pub const MF_CAPTURE_METADATA_FLASH: windows_core::GUID = windows_core::GUID::from_u128(0x4a51520b_fb36_446c_9df2_68171b9a0389);
pub const MF_CAPTURE_METADATA_FLASH_POWER: windows_core::GUID = windows_core::GUID::from_u128(0x9c0e0d49_0205_491a_bc9d_2d6e1f4d5684);
pub const MF_CAPTURE_METADATA_FOCUSSTATE: windows_core::GUID = windows_core::GUID::from_u128(0xa87ee154_997f_465d_b91f_29d53b982b88);
pub const MF_CAPTURE_METADATA_FRAME_BACKGROUND_MASK: windows_core::GUID = windows_core::GUID::from_u128(0x03f14dd3_75dd_433a_a8e2_1e3f5f2a50a0);
pub const MF_CAPTURE_METADATA_FRAME_ILLUMINATION: windows_core::GUID = windows_core::GUID::from_u128(0x6d688ffc_63d3_46fe_bada_5b947db0d080);
pub const MF_CAPTURE_METADATA_FRAME_RAWSTREAM: windows_core::GUID = windows_core::GUID::from_u128(0x9252077b_2680_49b9_ae02_b19075973b70);
pub const MF_CAPTURE_METADATA_HISTOGRAM: windows_core::GUID = windows_core::GUID::from_u128(0x85358432_2ef6_4ba9_a3fb_06d82974b895);
pub const MF_CAPTURE_METADATA_ISO_GAINS: windows_core::GUID = windows_core::GUID::from_u128(0x05802ac9_0e1d_41c7_a8c8_7e7369f84e1e);
pub const MF_CAPTURE_METADATA_ISO_SPEED: windows_core::GUID = windows_core::GUID::from_u128(0xe528a68f_b2e3_44fe_8b65_07bf4b5a13ff);
pub const MF_CAPTURE_METADATA_LAST_SCANLINE_END_TIME_QPC: windows_core::GUID = windows_core::GUID::from_u128(0xdccadecb_c4d4_400d_b418_10e88525e1f6);
pub const MF_CAPTURE_METADATA_LENS_POSITION: windows_core::GUID = windows_core::GUID::from_u128(0xb5fc8e86_11d1_4e70_819b_723a89fa4520);
pub const MF_CAPTURE_METADATA_PHOTO_FRAME_FLASH: windows_core::GUID = windows_core::GUID::from_u128(0x0f9dd6c6_6003_45d8_bd59_f1f53e3d04e8);
pub const MF_CAPTURE_METADATA_REQUESTED_FRAME_SETTING_ID: windows_core::GUID = windows_core::GUID::from_u128(0xbb3716d9_8a61_47a4_8197_459c7ff174d5);
pub const MF_CAPTURE_METADATA_SCANLINE_DIRECTION: windows_core::GUID = windows_core::GUID::from_u128(0x6496a3ba_1907_49e6_b0c3_123795f380a9);
pub const MF_CAPTURE_METADATA_SCANLINE_TIME_QPC_ACCURACY: windows_core::GUID = windows_core::GUID::from_u128(0x4cd79c51_f765_4b09_b1e1_27d1f7ebea09);
pub const MF_CAPTURE_METADATA_SCENE_MODE: windows_core::GUID = windows_core::GUID::from_u128(0x9cc3b54d_5ed3_4bae_b388_7670aef59e13);
pub const MF_CAPTURE_METADATA_SENSORFRAMERATE: windows_core::GUID = windows_core::GUID::from_u128(0xdb51357e_9d3d_4962_b06d_07ce650d9a0a);
pub const MF_CAPTURE_METADATA_UVC_PAYLOADHEADER: windows_core::GUID = windows_core::GUID::from_u128(0xf9f88a87_e1dd_441e_95cb_42e21a64f1d9);
pub const MF_CAPTURE_METADATA_WHITEBALANCE: windows_core::GUID = windows_core::GUID::from_u128(0xc736fd77_0fb9_4e2e_97a2_fcd490739ee9);
pub const MF_CAPTURE_METADATA_WHITEBALANCE_GAINS: windows_core::GUID = windows_core::GUID::from_u128(0xe7570c8f_2dcb_4c7c_aace_22ece7cce647);
pub const MF_CAPTURE_METADATA_ZOOMFACTOR: windows_core::GUID = windows_core::GUID::from_u128(0xe50b0b81_e501_42c2_abf2_857ecb13fa5c);
pub const MF_CAPTURE_SINK_PREPARED: windows_core::GUID = windows_core::GUID::from_u128(0x7bfce257_12b1_4409_8c34_d445daab7578);
pub const MF_CAPTURE_SOURCE_CURRENT_DEVICE_MEDIA_TYPE_SET: windows_core::GUID = windows_core::GUID::from_u128(0xe7e75e4c_039c_4410_815b_8741307b63aa);
pub const MF_COMPONENT_CERT_REVOKED: u32 = 32768u32;
pub const MF_COMPONENT_HS_CERT_REVOKED: u32 = 131072u32;
pub const MF_COMPONENT_INVALID_EKU: u32 = 16384u32;
pub const MF_COMPONENT_INVALID_ROOT: u32 = 65536u32;
pub const MF_COMPONENT_LS_CERT_REVOKED: u32 = 262144u32;
pub const MF_COMPONENT_REVOKED: u32 = 8192u32;
pub const MF_CONNECT_ALLOW_CONVERTER: MF_CONNECT_METHOD = MF_CONNECT_METHOD(1i32);
pub const MF_CONNECT_ALLOW_DECODER: MF_CONNECT_METHOD = MF_CONNECT_METHOD(3i32);
pub const MF_CONNECT_AS_OPTIONAL: MF_CONNECT_METHOD = MF_CONNECT_METHOD(65536i32);
pub const MF_CONNECT_AS_OPTIONAL_BRANCH: MF_CONNECT_METHOD = MF_CONNECT_METHOD(131072i32);
pub const MF_CONNECT_DIRECT: MF_CONNECT_METHOD = MF_CONNECT_METHOD(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_CONNECT_METHOD(pub i32);
pub const MF_CONNECT_RESOLVE_INDEPENDENT_OUTPUTTYPES: MF_CONNECT_METHOD = MF_CONNECT_METHOD(4i32);
pub const MF_CONTENTDECRYPTIONMODULE_SERVICE: windows_core::GUID = windows_core::GUID::from_u128(0x15320c45_ff80_484a_9dcb_0df894e69a01);
pub const MF_CONTENT_DECRYPTOR_SERVICE: windows_core::GUID = windows_core::GUID::from_u128(0x68a72927_fc7b_44ee_85f4_7c51bd55a659);
pub const MF_CONTENT_PROTECTION_DEVICE_SERVICE: windows_core::GUID = windows_core::GUID::from_u128(0xff58436f_76a0_41fe_b566_10cc53962edd);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_CROSS_ORIGIN_POLICY(pub i32);
pub const MF_CROSS_ORIGIN_POLICY_ANONYMOUS: MF_CROSS_ORIGIN_POLICY = MF_CROSS_ORIGIN_POLICY(1i32);
pub const MF_CROSS_ORIGIN_POLICY_NONE: MF_CROSS_ORIGIN_POLICY = MF_CROSS_ORIGIN_POLICY(0i32);
pub const MF_CROSS_ORIGIN_POLICY_USE_CREDENTIALS: MF_CROSS_ORIGIN_POLICY = MF_CROSS_ORIGIN_POLICY(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_CUSTOM_DECODE_UNIT_TYPE(pub i32);
pub const MF_D3D11_RESOURCE: MF_MT_D3D_RESOURCE_VERSION_ENUM = MF_MT_D3D_RESOURCE_VERSION_ENUM(0i32);
pub const MF_D3D12_RESOURCE: MF_MT_D3D_RESOURCE_VERSION_ENUM = MF_MT_D3D_RESOURCE_VERSION_ENUM(1i32);
pub const MF_D3D12_SYNCHRONIZATION_OBJECT: windows_core::GUID = windows_core::GUID::from_u128(0x2a7c8d6a_85a6_494d_a046_06ea1a138f4b);
pub const MF_DECODER_FWD_CUSTOM_SEI_DECODE_ORDER: windows_core::GUID = windows_core::GUID::from_u128(0xf13bbe3c_36d4_410a_b985_7a951a1e6294);
pub const MF_DECODE_UNIT_NAL: MF_CUSTOM_DECODE_UNIT_TYPE = MF_CUSTOM_DECODE_UNIT_TYPE(0i32);
pub const MF_DECODE_UNIT_SEI: MF_CUSTOM_DECODE_UNIT_TYPE = MF_CUSTOM_DECODE_UNIT_TYPE(1i32);
pub const MF_DEVICEMFT_CONNECTED_FILTER_KSCONTROL: windows_core::GUID = windows_core::GUID::from_u128(0x6a2c4fa6_d179_41cd_9523_822371ea40e5);
pub const MF_DEVICEMFT_CONNECTED_PIN_KSCONTROL: windows_core::GUID = windows_core::GUID::from_u128(0xe63310f7_b244_4ef8_9a7d_24c74e32ebd0);
pub const MF_DEVICEMFT_EXTENSION_PLUGIN_CLSID: windows_core::GUID = windows_core::GUID::from_u128(0x0844dbae_34fa_48a0_a783_8e696fb1c9a8);
pub const MF_DEVICEMFT_SENSORPROFILE_COLLECTION: windows_core::GUID = windows_core::GUID::from_u128(0x36ebdc44_b12c_441b_89f4_08b2f41a9cfc);
pub const MF_DEVICESTREAM_ATTRIBUTE_FACEAUTH_CAPABILITY: windows_core::GUID = windows_core::GUID::from_u128(0xcb6fd12a_2248_4e41_ad46_e78bb90ab9fc);
pub const MF_DEVICESTREAM_ATTRIBUTE_FRAMESOURCE_TYPES: windows_core::GUID = windows_core::GUID::from_u128(0x17145fd1_1b2b_423c_8001_2b6833ed3588);
pub const MF_DEVICESTREAM_ATTRIBUTE_SECURE_CAPABILITY: windows_core::GUID = windows_core::GUID::from_u128(0x940fd626_ea6e_4684_9840_36bd6ec9fbef);
pub const MF_DEVICESTREAM_EXTENSION_PLUGIN_CLSID: windows_core::GUID = windows_core::GUID::from_u128(0x048e6558_60c4_4173_bd5b_6a3ca2896aee);
pub const MF_DEVICESTREAM_EXTENSION_PLUGIN_CONNECTION_POINT: windows_core::GUID = windows_core::GUID::from_u128(0x37f9375c_e664_4ea4_aae4_cb6d1daca1f4);
pub const MF_DEVICESTREAM_FILTER_KSCONTROL: windows_core::GUID = windows_core::GUID::from_u128(0x46783cca_3df5_4923_a9ef_36b7223edde0);
pub const MF_DEVICESTREAM_FRAMESERVER_HIDDEN: windows_core::GUID = windows_core::GUID::from_u128(0xf402567b_4d91_4179_96d1_74c8480c2034);
pub const MF_DEVICESTREAM_FRAMESERVER_SHARED: windows_core::GUID = windows_core::GUID::from_u128(0x1cb378e9_b279_41d4_af97_34a243e68320);
pub const MF_DEVICESTREAM_IMAGE_STREAM: windows_core::GUID = windows_core::GUID::from_u128(0xa7ffb865_e7b2_43b0_9f6f_9af2a0e50fc0);
pub const MF_DEVICESTREAM_INDEPENDENT_IMAGE_STREAM: windows_core::GUID = windows_core::GUID::from_u128(0x03eeec7e_d605_4576_8b29_6580b490d7d3);
pub const MF_DEVICESTREAM_MAX_FRAME_BUFFERS: windows_core::GUID = windows_core::GUID::from_u128(0x1684cebe_3175_4985_882c_0efd3e8ac11e);
pub const MF_DEVICESTREAM_MULTIPLEXED_MANAGER: windows_core::GUID = windows_core::GUID::from_u128(0x6ea542b0_281f_4231_a464_fe2f5022501c);
pub const MF_DEVICESTREAM_PIN_KSCONTROL: windows_core::GUID = windows_core::GUID::from_u128(0xef3ef9a7_87f2_48ca_be02_674878918e98);
pub const MF_DEVICESTREAM_REQUIRED_CAPABILITIES: windows_core::GUID = windows_core::GUID::from_u128(0x6d8b957e_7cf6_43f4_af56_9c0e1e4fcbe1);
pub const MF_DEVICESTREAM_REQUIRED_SDDL: windows_core::GUID = windows_core::GUID::from_u128(0x331ae85d_c0d3_49ba_83ba_82a12d63cdd6);
pub const MF_DEVICESTREAM_SENSORSTREAM_ID: windows_core::GUID = windows_core::GUID::from_u128(0xe35b9fe4_0659_4cad_bb51_33160be7e413);
pub const MF_DEVICESTREAM_SOURCE_ATTRIBUTES: windows_core::GUID = windows_core::GUID::from_u128(0x2f8cb617_361b_434f_85ea_99a03e1ce4e0);
pub const MF_DEVICESTREAM_STREAM_CATEGORY: windows_core::GUID = windows_core::GUID::from_u128(0x2939e7b8_a62e_4579_b674_d4073dfabbba);
pub const MF_DEVICESTREAM_STREAM_ID: windows_core::GUID = windows_core::GUID::from_u128(0x11bd5120_d124_446b_88e6_17060257fff9);
pub const MF_DEVICESTREAM_TAKEPHOTO_TRIGGER: windows_core::GUID = windows_core::GUID::from_u128(0x1d180e34_538c_4fbb_a75a_859af7d261a6);
pub const MF_DEVICESTREAM_TRANSFORM_STREAM_ID: windows_core::GUID = windows_core::GUID::from_u128(0xe63937b7_daaf_4d49_815f_d826f8ad31e7);
pub const MF_DEVICE_THERMAL_STATE_CHANGED: windows_core::GUID = windows_core::GUID::from_u128(0x70ccd0af_fc9f_4deb_a875_9fecd16c5bd4);
pub const MF_DEVSOURCE_ATTRIBUTE_ENABLE_MS_CAMERA_EFFECTS: windows_core::GUID = windows_core::GUID::from_u128(0x28a5531a_57dd_4fd5_aaa7_385abf57d785);
pub const MF_DEVSOURCE_ATTRIBUTE_FRIENDLY_NAME: windows_core::GUID = windows_core::GUID::from_u128(0x60d0e559_52f8_4fa2_bbce_acdb34a8ec01);
pub const MF_DEVSOURCE_ATTRIBUTE_MEDIA_TYPE: windows_core::GUID = windows_core::GUID::from_u128(0x56a819ca_0c78_4de4_a0a7_3ddaba0f24d4);
pub const MF_DEVSOURCE_ATTRIBUTE_SOURCE_PASSWORD: windows_core::GUID = windows_core::GUID::from_u128(0xa0fd7e16_42d9_49df_84c0_e82c5eab8874);
pub const MF_DEVSOURCE_ATTRIBUTE_SOURCE_STREAM_URL: windows_core::GUID = windows_core::GUID::from_u128(0x9d7b40d2_3617_4043_93e3_8d6da9bb3492);
pub const MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE: windows_core::GUID = windows_core::GUID::from_u128(0xc60ac5fe_252a_478f_a0ef_bc8fa5f7cad3);
pub const MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_ENDPOINT_ID: windows_core::GUID = windows_core::GUID::from_u128(0x30da9258_feb9_47a7_a453_763a7a8e1c5f);
pub const MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_GUID: windows_core::GUID = windows_core::GUID::from_u128(0x14dd9a1c_7cff_41be_b1b9_ba1ac6ecb571);
pub const MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_ROLE: windows_core::GUID = windows_core::GUID::from_u128(0xbc9d118e_8c67_4a18_85d4_12d300400552);
pub const MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_SYMBOLIC_LINK: windows_core::GUID = windows_core::GUID::from_u128(0x98d24b5e_5930_4614_b5a1_f600f9355a78);
pub const MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_CATEGORY: windows_core::GUID = windows_core::GUID::from_u128(0x77f0ae69_c3bd_4509_941d_467e4d24899e);
pub const MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_GUID: windows_core::GUID = windows_core::GUID::from_u128(0x8ac3587a_4ae7_42d8_99e0_0a6013eef90f);
pub const MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_HW_SOURCE: windows_core::GUID = windows_core::GUID::from_u128(0xde7046ba_54d6_4487_a2a4_ec7c0d1bd163);
pub const MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_MAX_BUFFERS: windows_core::GUID = windows_core::GUID::from_u128(0x7dd9b730_4f2d_41d5_8f95_0cc9a912ba26);
pub const MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_PROVIDER_DEVICE_ID: windows_core::GUID = windows_core::GUID::from_u128(0x36689d42_a06c_40ae_84cf_f5a034067cc4);
pub const MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_SYMBOLIC_LINK: windows_core::GUID = windows_core::GUID::from_u128(0x58f0aad8_22bf_4f8a_bb3d_d2c4978c6e2f);
pub const MF_DEVSOURCE_ATTRIBUTE_SOURCE_USERNAME: windows_core::GUID = windows_core::GUID::from_u128(0x05d01add_949f_46eb_bc8e_8b0d2b32d79d);
pub const MF_DEVSOURCE_ATTRIBUTE_SOURCE_XADDRESS: windows_core::GUID = windows_core::GUID::from_u128(0xbca0be52_c327_44c7_9b7d_7fa8d9b5bcda);
pub const MF_DISABLE_FRAME_CORRUPTION_INFO: windows_core::GUID = windows_core::GUID::from_u128(0x7086e16c_49c5_4201_882a_8538f38cf13a);
pub const MF_DISABLE_LOCALLY_REGISTERED_PLUGINS: windows_core::GUID = windows_core::GUID::from_u128(0x66b16da9_add4_47e0_a16b_5af1fb483634);
pub const MF_DMFT_FRAME_BUFFER_INFO: windows_core::GUID = windows_core::GUID::from_u128(0x396ce1c9_67a9_454c_8797_95a45799d804);
pub const MF_DROP_MODE_1: MF_QUALITY_DROP_MODE = MF_QUALITY_DROP_MODE(1i32);
pub const MF_DROP_MODE_2: MF_QUALITY_DROP_MODE = MF_QUALITY_DROP_MODE(2i32);
pub const MF_DROP_MODE_3: MF_QUALITY_DROP_MODE = MF_QUALITY_DROP_MODE(3i32);
pub const MF_DROP_MODE_4: MF_QUALITY_DROP_MODE = MF_QUALITY_DROP_MODE(4i32);
pub const MF_DROP_MODE_5: MF_QUALITY_DROP_MODE = MF_QUALITY_DROP_MODE(5i32);
pub const MF_DROP_MODE_NONE: MF_QUALITY_DROP_MODE = MF_QUALITY_DROP_MODE(0i32);
pub const MF_ENABLE_3DVIDEO_OUTPUT: windows_core::GUID = windows_core::GUID::from_u128(0xbdad7bca_0e5f_4b10_ab16_26de381b6293);
pub const MF_EVENT_DO_THINNING: windows_core::GUID = windows_core::GUID::from_u128(0x321ea6fb_dad9_46e4_b31d_d2eae7090e30);
pub const MF_EVENT_FLAG_NONE: MEDIA_EVENT_GENERATOR_GET_EVENT_FLAGS = MEDIA_EVENT_GENERATOR_GET_EVENT_FLAGS(0u32);
pub const MF_EVENT_FLAG_NO_WAIT: MEDIA_EVENT_GENERATOR_GET_EVENT_FLAGS = MEDIA_EVENT_GENERATOR_GET_EVENT_FLAGS(1u32);
pub const MF_EVENT_MFT_CONTEXT: windows_core::GUID = windows_core::GUID::from_u128(0xb7cd31f1_899e_4b41_80c9_26a896d32977);
pub const MF_EVENT_MFT_INPUT_STREAM_ID: windows_core::GUID = windows_core::GUID::from_u128(0xf29c2cca_7ae6_42d2_b284_bf837cc874e2);
pub const MF_EVENT_OUTPUT_NODE: windows_core::GUID = windows_core::GUID::from_u128(0x830f1a8b_c060_46dd_a801_1c95dec9b107);
pub const MF_EVENT_PRESENTATION_TIME_OFFSET: windows_core::GUID = windows_core::GUID::from_u128(0x5ad914d1_9b45_4a8d_a2c0_81d1e50bfb07);
pub const MF_EVENT_SCRUBSAMPLE_TIME: windows_core::GUID = windows_core::GUID::from_u128(0x9ac712b3_dcb8_44d5_8d0c_37455a2782e3);
pub const MF_EVENT_SESSIONCAPS: windows_core::GUID = windows_core::GUID::from_u128(0x7e5ebcd0_11b8_4abe_afad_10f6599a7f42);
pub const MF_EVENT_SESSIONCAPS_DELTA: windows_core::GUID = windows_core::GUID::from_u128(0x7e5ebcd1_11b8_4abe_afad_10f6599a7f42);
pub const MF_EVENT_SOURCE_ACTUAL_START: windows_core::GUID = windows_core::GUID::from_u128(0xa8cc55a9_6b31_419f_845d_ffb351a2434b);
pub const MF_EVENT_SOURCE_CHARACTERISTICS: windows_core::GUID = windows_core::GUID::from_u128(0x47db8490_8b22_4f52_afda_9ce1b2d3cfa8);
pub const MF_EVENT_SOURCE_CHARACTERISTICS_OLD: windows_core::GUID = windows_core::GUID::from_u128(0x47db8491_8b22_4f52_afda_9ce1b2d3cfa8);
pub const MF_EVENT_SOURCE_FAKE_START: windows_core::GUID = windows_core::GUID::from_u128(0xa8cc55a7_6b31_419f_845d_ffb351a2434b);
pub const MF_EVENT_SOURCE_PROJECTSTART: windows_core::GUID = windows_core::GUID::from_u128(0xa8cc55a8_6b31_419f_845d_ffb351a2434b);
pub const MF_EVENT_SOURCE_TOPOLOGY_CANCELED: windows_core::GUID = windows_core::GUID::from_u128(0xdb62f650_9a5e_4704_acf3_563bc6a73364);
pub const MF_EVENT_START_PRESENTATION_TIME: windows_core::GUID = windows_core::GUID::from_u128(0x5ad914d0_9b45_4a8d_a2c0_81d1e50bfb07);
pub const MF_EVENT_START_PRESENTATION_TIME_AT_OUTPUT: windows_core::GUID = windows_core::GUID::from_u128(0x5ad914d2_9b45_4a8d_a2c0_81d1e50bfb07);
pub const MF_EVENT_STREAM_METADATA_CONTENT_KEYIDS: windows_core::GUID = windows_core::GUID::from_u128(0x5063449d_cc29_4fc6_a75a_d247b35af85c);
pub const MF_EVENT_STREAM_METADATA_KEYDATA: windows_core::GUID = windows_core::GUID::from_u128(0xcd59a4a1_4a3b_4bbd_8665_72a40fbea776);
pub const MF_EVENT_STREAM_METADATA_SYSTEMID: windows_core::GUID = windows_core::GUID::from_u128(0x1ea2ef64_ba16_4a36_8719_fe7560ba32ad);
pub const MF_EVENT_TOPOLOGY_STATUS: windows_core::GUID = windows_core::GUID::from_u128(0x30c5018d_9a53_454b_ad9e_6d5f8fa7c43b);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_EVENT_TYPE(pub i32);
pub const MF_E_ALLOCATOR_ALREADY_COMMITED: windows_core::HRESULT = windows_core::HRESULT(0xC00DA7FA_u32 as _);
pub const MF_E_ALLOCATOR_NOT_COMMITED: windows_core::HRESULT = windows_core::HRESULT(0xC00DA7F9_u32 as _);
pub const MF_E_ALLOCATOR_NOT_INITIALIZED: windows_core::HRESULT = windows_core::HRESULT(0xC00DA7F8_u32 as _);
pub const MF_E_ALL_PROCESS_RESTART_REQUIRED: windows_core::HRESULT = windows_core::HRESULT(0xC00D716C_u32 as _);
pub const MF_E_ALREADY_INITIALIZED: windows_core::HRESULT = windows_core::HRESULT(0xC00D4650_u32 as _);
pub const MF_E_ASF_DROPPED_PACKET: windows_core::HRESULT = windows_core::HRESULT(0xC00D3AA1_u32 as _);
pub const MF_E_ASF_FILESINK_BITRATE_UNKNOWN: windows_core::HRESULT = windows_core::HRESULT(0xC00D4A40_u32 as _);
pub const MF_E_ASF_INDEXNOTLOADED: windows_core::HRESULT = windows_core::HRESULT(0xC00D3A9E_u32 as _);
pub const MF_E_ASF_INVALIDDATA: windows_core::HRESULT = windows_core::HRESULT(0xC00D3A9A_u32 as _);
pub const MF_E_ASF_MISSINGDATA: windows_core::HRESULT = windows_core::HRESULT(0xC00D3A99_u32 as _);
pub const MF_E_ASF_NOINDEX: windows_core::HRESULT = windows_core::HRESULT(0xC00D3A9C_u32 as _);
pub const MF_E_ASF_OPAQUEPACKET: windows_core::HRESULT = windows_core::HRESULT(0xC00D3A9B_u32 as _);
pub const MF_E_ASF_OUTOFRANGE: windows_core::HRESULT = windows_core::HRESULT(0xC00D3A9D_u32 as _);
pub const MF_E_ASF_PARSINGINCOMPLETE: windows_core::HRESULT = windows_core::HRESULT(0xC00D3A98_u32 as _);
pub const MF_E_ASF_TOO_MANY_PAYLOADS: windows_core::HRESULT = windows_core::HRESULT(0xC00D3A9F_u32 as _);
pub const MF_E_ASF_UNSUPPORTED_STREAM_TYPE: windows_core::HRESULT = windows_core::HRESULT(0xC00D3AA0_u32 as _);
pub const MF_E_ATTRIBUTENOTFOUND: windows_core::HRESULT = windows_core::HRESULT(0xC00D36E6_u32 as _);
pub const MF_E_AUDIO_BUFFER_SIZE_ERROR: windows_core::HRESULT = windows_core::HRESULT(0xC00D4E88_u32 as _);
pub const MF_E_AUDIO_CLIENT_WRAPPER_SPOOF_ERROR: windows_core::HRESULT = windows_core::HRESULT(0xC00D4E89_u32 as _);
pub const MF_E_AUDIO_PLAYBACK_DEVICE_INVALIDATED: windows_core::HRESULT = windows_core::HRESULT(0xC00D4E86_u32 as _);
pub const MF_E_AUDIO_PLAYBACK_DEVICE_IN_USE: windows_core::HRESULT = windows_core::HRESULT(0xC00D4E85_u32 as _);
pub const MF_E_AUDIO_RECORDING_DEVICE_INVALIDATED: windows_core::HRESULT = windows_core::HRESULT(0xC00D3EA1_u32 as _);
pub const MF_E_AUDIO_RECORDING_DEVICE_IN_USE: windows_core::HRESULT = windows_core::HRESULT(0xC00D3EA0_u32 as _);
pub const MF_E_AUDIO_SERVICE_NOT_RUNNING: windows_core::HRESULT = windows_core::HRESULT(0xC00D4E87_u32 as _);
pub const MF_E_BACKUP_RESTRICTED_LICENSE: windows_core::HRESULT = windows_core::HRESULT(0xC00D714E_u32 as _);
pub const MF_E_BAD_OPL_STRUCTURE_FORMAT: windows_core::HRESULT = windows_core::HRESULT(0xC00D717D_u32 as _);
pub const MF_E_BAD_STARTUP_VERSION: windows_core::HRESULT = windows_core::HRESULT(0xC00D36E3_u32 as _);
pub const MF_E_BANDWIDTH_OVERRUN: windows_core::HRESULT = windows_core::HRESULT(0xC00D4651_u32 as _);
pub const MF_E_BUFFERTOOSMALL: windows_core::HRESULT = windows_core::HRESULT(0xC00D36B1_u32 as _);
pub const MF_E_BYTESTREAM_NOT_SEEKABLE: windows_core::HRESULT = windows_core::HRESULT(0xC00D36EE_u32 as _);
pub const MF_E_BYTESTREAM_UNKNOWN_LENGTH: windows_core::HRESULT = windows_core::HRESULT(0xC00D36FB_u32 as _);
pub const MF_E_CANNOT_CREATE_SINK: windows_core::HRESULT = windows_core::HRESULT(0xC00D36FA_u32 as _);
pub const MF_E_CANNOT_FIND_KEYFRAME_SAMPLE: windows_core::HRESULT = windows_core::HRESULT(0xC00D3E9D_u32 as _);
pub const MF_E_CANNOT_INDEX_IN_PLACE: windows_core::HRESULT = windows_core::HRESULT(0xC00D4657_u32 as _);
pub const MF_E_CANNOT_PARSE_BYTESTREAM: windows_core::HRESULT = windows_core::HRESULT(0xC00D36F0_u32 as _);
pub const MF_E_CAPTURE_ENGINE_ALL_EFFECTS_REMOVED: windows_core::HRESULT = windows_core::HRESULT(0xC00DABE5_u32 as _);
pub const MF_E_CAPTURE_ENGINE_INVALID_OP: windows_core::HRESULT = windows_core::HRESULT(0xC00DABE4_u32 as _);
pub const MF_E_CAPTURE_NO_SAMPLES_IN_QUEUE: windows_core::HRESULT = windows_core::HRESULT(0xC00DABEB_u32 as _);
pub const MF_E_CAPTURE_PROPERTY_SET_DURING_PHOTO: windows_core::HRESULT = windows_core::HRESULT(0xC00DABEA_u32 as _);
pub const MF_E_CAPTURE_SINK_MIRROR_ERROR: windows_core::HRESULT = windows_core::HRESULT(0xC00DABE2_u32 as _);
pub const MF_E_CAPTURE_SINK_OUTPUT_NOT_SET: windows_core::HRESULT = windows_core::HRESULT(0xC00DABE1_u32 as _);
pub const MF_E_CAPTURE_SINK_ROTATE_ERROR: windows_core::HRESULT = windows_core::HRESULT(0xC00DABE3_u32 as _);
pub const MF_E_CAPTURE_SOURCE_DEVICE_EXTENDEDPROP_OP_IN_PROGRESS: windows_core::HRESULT = windows_core::HRESULT(0xC00DABE9_u32 as _);
pub const MF_E_CAPTURE_SOURCE_NO_AUDIO_STREAM_PRESENT: windows_core::HRESULT = windows_core::HRESULT(0xC00DABE8_u32 as _);
pub const MF_E_CAPTURE_SOURCE_NO_INDEPENDENT_PHOTO_STREAM_PRESENT: windows_core::HRESULT = windows_core::HRESULT(0xC00DABE6_u32 as _);
pub const MF_E_CAPTURE_SOURCE_NO_VIDEO_STREAM_PRESENT: windows_core::HRESULT = windows_core::HRESULT(0xC00DABE7_u32 as _);
pub const MF_E_CLOCK_AUDIO_DEVICE_POSITION_UNEXPECTED: windows_core::HRESULT = windows_core::HRESULT(0xD9C45_u32 as _);
pub const MF_E_CLOCK_AUDIO_RENDER_POSITION_UNEXPECTED: windows_core::HRESULT = windows_core::HRESULT(0xD9C46_u32 as _);
pub const MF_E_CLOCK_AUDIO_RENDER_TIME_UNEXPECTED: windows_core::HRESULT = windows_core::HRESULT(0xD9C47_u32 as _);
pub const MF_E_CLOCK_INVALID_CONTINUITY_KEY: windows_core::HRESULT = windows_core::HRESULT(0xC00D9C40_u32 as _);
pub const MF_E_CLOCK_NOT_SIMPLE: windows_core::HRESULT = windows_core::HRESULT(0xC00D9C43_u32 as _);
pub const MF_E_CLOCK_NO_TIME_SOURCE: windows_core::HRESULT = windows_core::HRESULT(0xC00D9C41_u32 as _);
pub const MF_E_CLOCK_STATE_ALREADY_SET: windows_core::HRESULT = windows_core::HRESULT(0xC00D9C42_u32 as _);
pub const MF_E_CODE_EXPIRED: windows_core::HRESULT = windows_core::HRESULT(0xC00D715E_u32 as _);
pub const MF_E_COMPONENT_REVOKED: windows_core::HRESULT = windows_core::HRESULT(0xC00D7151_u32 as _);
pub const MF_E_CONTENT_PROTECTION_SYSTEM_NOT_ENABLED: windows_core::HRESULT = windows_core::HRESULT(0xC00D7185_u32 as _);
pub const MF_E_DEBUGGING_NOT_ALLOWED: windows_core::HRESULT = windows_core::HRESULT(0xC00D715D_u32 as _);
pub const MF_E_DISABLED_IN_SAFEMODE: windows_core::HRESULT = windows_core::HRESULT(0xC00D36EF_u32 as _);
pub const MF_E_DRM_HARDWARE_INCONSISTENT: windows_core::HRESULT = windows_core::HRESULT(0xC00D714B_u32 as _);
pub const MF_E_DRM_MIGRATION_NOT_SUPPORTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D7187_u32 as _);
pub const MF_E_DRM_UNSUPPORTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D3700_u32 as _);
pub const MF_E_DROPTIME_NOT_SUPPORTED: windows_core::HRESULT = windows_core::HRESULT(0xC00DA02A_u32 as _);
pub const MF_E_DURATION_TOO_LONG: windows_core::HRESULT = windows_core::HRESULT(0xC00D3707_u32 as _);
pub const MF_E_DXGI_DEVICE_NOT_INITIALIZED: windows_core::HRESULT = windows_core::HRESULT(0x80041000_u32 as _);
pub const MF_E_DXGI_NEW_VIDEO_DEVICE: windows_core::HRESULT = windows_core::HRESULT(0x80041001_u32 as _);
pub const MF_E_DXGI_VIDEO_DEVICE_LOCKED: windows_core::HRESULT = windows_core::HRESULT(0x80041002_u32 as _);
pub const MF_E_END_OF_STREAM: windows_core::HRESULT = windows_core::HRESULT(0xC00D3E84_u32 as _);
pub const MF_E_FLUSH_NEEDED: windows_core::HRESULT = windows_core::HRESULT(0xC00D4653_u32 as _);
pub const MF_E_FORMAT_CHANGE_NOT_SUPPORTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D36FE_u32 as _);
pub const MF_E_GRL_ABSENT: windows_core::HRESULT = windows_core::HRESULT(0xC00D7172_u32 as _);
pub const MF_E_GRL_EXTENSIBLE_ENTRY_NOT_FOUND: windows_core::HRESULT = windows_core::HRESULT(0xC00D7161_u32 as _);
pub const MF_E_GRL_INVALID_FORMAT: windows_core::HRESULT = windows_core::HRESULT(0xC00D716A_u32 as _);
pub const MF_E_GRL_RENEWAL_NOT_FOUND: windows_core::HRESULT = windows_core::HRESULT(0xC00D7160_u32 as _);
pub const MF_E_GRL_UNRECOGNIZED_FORMAT: windows_core::HRESULT = windows_core::HRESULT(0xC00D716B_u32 as _);
pub const MF_E_GRL_VERSION_TOO_LOW: windows_core::HRESULT = windows_core::HRESULT(0xC00D715F_u32 as _);
pub const MF_E_HARDWARE_DRM_UNSUPPORTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D3706_u32 as _);
pub const MF_E_HDCP_AUTHENTICATION_FAILURE: windows_core::HRESULT = windows_core::HRESULT(0xC00D7188_u32 as _);
pub const MF_E_HDCP_LINK_FAILURE: windows_core::HRESULT = windows_core::HRESULT(0xC00D7189_u32 as _);
pub const MF_E_HIGH_SECURITY_LEVEL_CONTENT_NOT_ALLOWED: windows_core::HRESULT = windows_core::HRESULT(0xC00D7178_u32 as _);
pub const MF_E_HW_ACCELERATED_THUMBNAIL_NOT_SUPPORTED: windows_core::HRESULT = windows_core::HRESULT(0xC00DABEC_u32 as _);
pub const MF_E_HW_MFT_FAILED_START_STREAMING: windows_core::HRESULT = windows_core::HRESULT(0xC00D3704_u32 as _);
pub const MF_E_HW_STREAM_NOT_CONNECTED: windows_core::HRESULT = windows_core::HRESULT(0xC00DA7FD_u32 as _);
pub const MF_E_INCOMPATIBLE_SAMPLE_PROTECTION: windows_core::HRESULT = windows_core::HRESULT(0xC00D7176_u32 as _);
pub const MF_E_INDEX_NOT_COMMITTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D4655_u32 as _);
pub const MF_E_INSUFFICIENT_BUFFER: windows_core::HRESULT = windows_core::HRESULT(0xC00D7170_u32 as _);
pub const MF_E_INVALIDINDEX: windows_core::HRESULT = windows_core::HRESULT(0xC00D36BF_u32 as _);
pub const MF_E_INVALIDMEDIATYPE: windows_core::HRESULT = windows_core::HRESULT(0xC00D36B4_u32 as _);
pub const MF_E_INVALIDNAME: windows_core::HRESULT = windows_core::HRESULT(0xC00D36BC_u32 as _);
pub const MF_E_INVALIDREQUEST: windows_core::HRESULT = windows_core::HRESULT(0xC00D36B2_u32 as _);
pub const MF_E_INVALIDSTREAMNUMBER: windows_core::HRESULT = windows_core::HRESULT(0xC00D36B3_u32 as _);
pub const MF_E_INVALIDTYPE: windows_core::HRESULT = windows_core::HRESULT(0xC00D36BD_u32 as _);
pub const MF_E_INVALID_AKE_CHANNEL_PARAMETERS: windows_core::HRESULT = windows_core::HRESULT(0xC00D7184_u32 as _);
pub const MF_E_INVALID_ASF_STREAMID: windows_core::HRESULT = windows_core::HRESULT(0xC00D4659_u32 as _);
pub const MF_E_INVALID_CODEC_MERIT: windows_core::HRESULT = windows_core::HRESULT(0xC00D3703_u32 as _);
pub const MF_E_INVALID_FILE_FORMAT: windows_core::HRESULT = windows_core::HRESULT(0xC00D36BE_u32 as _);
pub const MF_E_INVALID_FORMAT: windows_core::HRESULT = windows_core::HRESULT(0xC00D3E8C_u32 as _);
pub const MF_E_INVALID_KEY: windows_core::HRESULT = windows_core::HRESULT(0xC00D36E2_u32 as _);
pub const MF_E_INVALID_POSITION: windows_core::HRESULT = windows_core::HRESULT(0xC00D36E5_u32 as _);
pub const MF_E_INVALID_PROFILE: windows_core::HRESULT = windows_core::HRESULT(0xC00D4654_u32 as _);
pub const MF_E_INVALID_STATE_TRANSITION: windows_core::HRESULT = windows_core::HRESULT(0xC00D3E82_u32 as _);
pub const MF_E_INVALID_STREAM_DATA: windows_core::HRESULT = windows_core::HRESULT(0xC00D36CB_u32 as _);
pub const MF_E_INVALID_STREAM_STATE: windows_core::HRESULT = windows_core::HRESULT(0xC00DA7FC_u32 as _);
pub const MF_E_INVALID_TIMESTAMP: windows_core::HRESULT = windows_core::HRESULT(0xC00D36C0_u32 as _);
pub const MF_E_INVALID_WORKQUEUE: windows_core::HRESULT = windows_core::HRESULT(0xC00D36FF_u32 as _);
pub const MF_E_ITA_ERROR_PARSING_SAP_PARAMETERS: windows_core::HRESULT = windows_core::HRESULT(0xC00D717B_u32 as _);
pub const MF_E_ITA_OPL_DATA_NOT_INITIALIZED: windows_core::HRESULT = windows_core::HRESULT(0xC00D7180_u32 as _);
pub const MF_E_ITA_UNRECOGNIZED_ANALOG_VIDEO_OUTPUT: windows_core::HRESULT = windows_core::HRESULT(0xC00D7181_u32 as _);
pub const MF_E_ITA_UNRECOGNIZED_ANALOG_VIDEO_PROTECTION_GUID: windows_core::HRESULT = windows_core::HRESULT(0xC00D717E_u32 as _);
pub const MF_E_ITA_UNRECOGNIZED_DIGITAL_VIDEO_OUTPUT: windows_core::HRESULT = windows_core::HRESULT(0xC00D7182_u32 as _);
pub const MF_E_ITA_UNSUPPORTED_ACTION: windows_core::HRESULT = windows_core::HRESULT(0xC00D717A_u32 as _);
pub const MF_E_KERNEL_UNTRUSTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D7162_u32 as _);
pub const MF_E_LATE_SAMPLE: windows_core::HRESULT = windows_core::HRESULT(0xC00D4652_u32 as _);
pub const MF_E_LICENSE_INCORRECT_RIGHTS: windows_core::HRESULT = windows_core::HRESULT(0xC00D7148_u32 as _);
pub const MF_E_LICENSE_OUTOFDATE: windows_core::HRESULT = windows_core::HRESULT(0xC00D7149_u32 as _);
pub const MF_E_LICENSE_REQUIRED: windows_core::HRESULT = windows_core::HRESULT(0xC00D714A_u32 as _);
pub const MF_E_LICENSE_RESTORE_NEEDS_INDIVIDUALIZATION: windows_core::HRESULT = windows_core::HRESULT(0xC00D714F_u32 as _);
pub const MF_E_LICENSE_RESTORE_NO_RIGHTS: windows_core::HRESULT = windows_core::HRESULT(0xC00D714D_u32 as _);
pub const MF_E_MEDIAPROC_WRONGSTATE: windows_core::HRESULT = windows_core::HRESULT(0xC00D36F2_u32 as _);
pub const MF_E_MEDIA_EXTENSION_APPSERVICE_CONNECTION_FAILED: windows_core::HRESULT = windows_core::HRESULT(0xC00DB3B0_u32 as _);
pub const MF_E_MEDIA_EXTENSION_APPSERVICE_REQUEST_FAILED: windows_core::HRESULT = windows_core::HRESULT(0xC00DB3B1_u32 as _);
pub const MF_E_MEDIA_EXTENSION_PACKAGE_INTEGRITY_CHECK_FAILED: windows_core::HRESULT = windows_core::HRESULT(0xC00DB3B2_u32 as _);
pub const MF_E_MEDIA_EXTENSION_PACKAGE_LICENSE_INVALID: windows_core::HRESULT = windows_core::HRESULT(0xC00DB3B3_u32 as _);
pub const MF_E_MEDIA_SOURCE_NOT_STARTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D3E91_u32 as _);
pub const MF_E_MEDIA_SOURCE_NO_STREAMS_SELECTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D3E9C_u32 as _);
pub const MF_E_MEDIA_SOURCE_WRONGSTATE: windows_core::HRESULT = windows_core::HRESULT(0xC00D3E9B_u32 as _);
pub const MF_E_METADATA_TOO_LONG: windows_core::HRESULT = windows_core::HRESULT(0xC00D4A43_u32 as _);
pub const MF_E_MISSING_ASF_LEAKYBUCKET: windows_core::HRESULT = windows_core::HRESULT(0xC00D4658_u32 as _);
pub const MF_E_MP3_BAD_CRC: windows_core::HRESULT = windows_core::HRESULT(0xC00D3E99_u32 as _);
pub const MF_E_MP3_NOTFOUND: windows_core::HRESULT = windows_core::HRESULT(0xC00D3E86_u32 as _);
pub const MF_E_MP3_NOTMP3: windows_core::HRESULT = windows_core::HRESULT(0xC00D3E88_u32 as _);
pub const MF_E_MP3_NOTSUPPORTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D3E89_u32 as _);
pub const MF_E_MP3_OUTOFDATA: windows_core::HRESULT = windows_core::HRESULT(0xC00D3E87_u32 as _);
pub const MF_E_MULTIPLE_BEGIN: windows_core::HRESULT = windows_core::HRESULT(0xC00D36D9_u32 as _);
pub const MF_E_MULTIPLE_SUBSCRIBERS: windows_core::HRESULT = windows_core::HRESULT(0xC00D36DA_u32 as _);
pub const MF_E_NETWORK_RESOURCE_FAILURE: windows_core::HRESULT = windows_core::HRESULT(0xC00D4268_u32 as _);
pub const MF_E_NET_BAD_CONTROL_DATA: windows_core::HRESULT = windows_core::HRESULT(0xC00D427A_u32 as _);
pub const MF_E_NET_BAD_REQUEST: windows_core::HRESULT = windows_core::HRESULT(0xC00D427F_u32 as _);
pub const MF_E_NET_BUSY: windows_core::HRESULT = windows_core::HRESULT(0xC00D428A_u32 as _);
pub const MF_E_NET_BWLEVEL_NOT_SUPPORTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D426D_u32 as _);
pub const MF_E_NET_CACHESTREAM_NOT_FOUND: windows_core::HRESULT = windows_core::HRESULT(0xC00D4271_u32 as _);
pub const MF_E_NET_CACHE_NO_DATA: windows_core::HRESULT = windows_core::HRESULT(0xC00D427D_u32 as _);
pub const MF_E_NET_CANNOTCONNECT: windows_core::HRESULT = windows_core::HRESULT(0xC00D4287_u32 as _);
pub const MF_E_NET_CLIENT_CLOSE: windows_core::HRESULT = windows_core::HRESULT(0xC00D4279_u32 as _);
pub const MF_E_NET_COMPANION_DRIVER_DISCONNECT: windows_core::HRESULT = windows_core::HRESULT(0xC00D4295_u32 as _);
pub const MF_E_NET_CONNECTION_FAILURE: windows_core::HRESULT = windows_core::HRESULT(0xC00D4283_u32 as _);
pub const MF_E_NET_EOL: windows_core::HRESULT = windows_core::HRESULT(0xC00D427E_u32 as _);
pub const MF_E_NET_ERROR_FROM_PROXY: windows_core::HRESULT = windows_core::HRESULT(0xC00D428C_u32 as _);
pub const MF_E_NET_INCOMPATIBLE_PUSHSERVER: windows_core::HRESULT = windows_core::HRESULT(0xC00D4284_u32 as _);
pub const MF_E_NET_INCOMPATIBLE_SERVER: windows_core::HRESULT = windows_core::HRESULT(0xC00D427B_u32 as _);
pub const MF_E_NET_INTERNAL_SERVER_ERROR: windows_core::HRESULT = windows_core::HRESULT(0xC00D4280_u32 as _);
pub const MF_E_NET_INVALID_PRESENTATION_DESCRIPTOR: windows_core::HRESULT = windows_core::HRESULT(0xC00D4270_u32 as _);
pub const MF_E_NET_INVALID_PUSH_PUBLISHING_POINT: windows_core::HRESULT = windows_core::HRESULT(0xC00D4289_u32 as _);
pub const MF_E_NET_INVALID_PUSH_TEMPLATE: windows_core::HRESULT = windows_core::HRESULT(0xC00D4288_u32 as _);
pub const MF_E_NET_MANUALSS_NOT_SUPPORTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D426F_u32 as _);
pub const MF_E_NET_NOCONNECTION: windows_core::HRESULT = windows_core::HRESULT(0xC00D4282_u32 as _);
pub const MF_E_NET_PROTOCOL_DISABLED: windows_core::HRESULT = windows_core::HRESULT(0xC00D4294_u32 as _);
pub const MF_E_NET_PROXY_ACCESSDENIED: windows_core::HRESULT = windows_core::HRESULT(0xC00D4286_u32 as _);
pub const MF_E_NET_PROXY_TIMEOUT: windows_core::HRESULT = windows_core::HRESULT(0xC00D428D_u32 as _);
pub const MF_E_NET_READ: windows_core::HRESULT = windows_core::HRESULT(0xC00D426A_u32 as _);
pub const MF_E_NET_REDIRECT: windows_core::HRESULT = windows_core::HRESULT(0xC00D4275_u32 as _);
pub const MF_E_NET_REDIRECT_TO_PROXY: windows_core::HRESULT = windows_core::HRESULT(0xC00D4276_u32 as _);
pub const MF_E_NET_REQUIRE_ASYNC: windows_core::HRESULT = windows_core::HRESULT(0xC00D426C_u32 as _);
pub const MF_E_NET_REQUIRE_INPUT: windows_core::HRESULT = windows_core::HRESULT(0xC00D4274_u32 as _);
pub const MF_E_NET_REQUIRE_NETWORK: windows_core::HRESULT = windows_core::HRESULT(0xC00D426B_u32 as _);
pub const MF_E_NET_RESOURCE_GONE: windows_core::HRESULT = windows_core::HRESULT(0xC00D428B_u32 as _);
pub const MF_E_NET_SERVER_ACCESSDENIED: windows_core::HRESULT = windows_core::HRESULT(0xC00D4285_u32 as _);
pub const MF_E_NET_SERVER_UNAVAILABLE: windows_core::HRESULT = windows_core::HRESULT(0xC00D428E_u32 as _);
pub const MF_E_NET_SESSION_INVALID: windows_core::HRESULT = windows_core::HRESULT(0xC00D4290_u32 as _);
pub const MF_E_NET_SESSION_NOT_FOUND: windows_core::HRESULT = windows_core::HRESULT(0xC00D4281_u32 as _);
pub const MF_E_NET_STREAMGROUPS_NOT_SUPPORTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D426E_u32 as _);
pub const MF_E_NET_TIMEOUT: windows_core::HRESULT = windows_core::HRESULT(0xC00D4278_u32 as _);
pub const MF_E_NET_TOO_MANY_REDIRECTS: windows_core::HRESULT = windows_core::HRESULT(0xC00D4277_u32 as _);
pub const MF_E_NET_TOO_MUCH_DATA: windows_core::HRESULT = windows_core::HRESULT(0xC00D428F_u32 as _);
pub const MF_E_NET_UDP_BLOCKED: windows_core::HRESULT = windows_core::HRESULT(0xC00D4292_u32 as _);
pub const MF_E_NET_UNSAFE_URL: windows_core::HRESULT = windows_core::HRESULT(0xC00D427C_u32 as _);
pub const MF_E_NET_UNSUPPORTED_CONFIGURATION: windows_core::HRESULT = windows_core::HRESULT(0xC00D4293_u32 as _);
pub const MF_E_NET_WRITE: windows_core::HRESULT = windows_core::HRESULT(0xC00D4269_u32 as _);
pub const MF_E_NEW_VIDEO_DEVICE: windows_core::HRESULT = windows_core::HRESULT(0xC00D4E25_u32 as _);
pub const MF_E_NON_PE_PROCESS: windows_core::HRESULT = windows_core::HRESULT(0xC00D7165_u32 as _);
pub const MF_E_NOTACCEPTING: windows_core::HRESULT = windows_core::HRESULT(0xC00D36B5_u32 as _);
pub const MF_E_NOT_AVAILABLE: windows_core::HRESULT = windows_core::HRESULT(0xC00D36D6_u32 as _);
pub const MF_E_NOT_FOUND: windows_core::HRESULT = windows_core::HRESULT(0xC00D36D5_u32 as _);
pub const MF_E_NOT_INITIALIZED: windows_core::HRESULT = windows_core::HRESULT(0xC00D36B6_u32 as _);
pub const MF_E_NOT_PROTECTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D3E9A_u32 as _);
pub const MF_E_NO_AUDIO_PLAYBACK_DEVICE: windows_core::HRESULT = windows_core::HRESULT(0xC00D4E84_u32 as _);
pub const MF_E_NO_AUDIO_RECORDING_DEVICE: windows_core::HRESULT = windows_core::HRESULT(0xC00D3E9F_u32 as _);
pub const MF_E_NO_BITPUMP: windows_core::HRESULT = windows_core::HRESULT(0xC00D36F6_u32 as _);
pub const MF_E_NO_CAPTURE_DEVICES_AVAILABLE: windows_core::HRESULT = windows_core::HRESULT(0xC00DABE0_u32 as _);
pub const MF_E_NO_CLOCK: windows_core::HRESULT = windows_core::HRESULT(0xC00D36D7_u32 as _);
pub const MF_E_NO_CONTENT_PROTECTION_MANAGER: windows_core::HRESULT = windows_core::HRESULT(0xC00D714C_u32 as _);
pub const MF_E_NO_DURATION: windows_core::HRESULT = windows_core::HRESULT(0xC00D3E8A_u32 as _);
pub const MF_E_NO_EVENTS_AVAILABLE: windows_core::HRESULT = windows_core::HRESULT(0xC00D3E80_u32 as _);
pub const MF_E_NO_INDEX: windows_core::HRESULT = windows_core::HRESULT(0xC00D4656_u32 as _);
pub const MF_E_NO_MORE_DROP_MODES: windows_core::HRESULT = windows_core::HRESULT(0xC00DA028_u32 as _);
pub const MF_E_NO_MORE_QUALITY_LEVELS: windows_core::HRESULT = windows_core::HRESULT(0xC00DA029_u32 as _);
pub const MF_E_NO_MORE_TYPES: windows_core::HRESULT = windows_core::HRESULT(0xC00D36B9_u32 as _);
pub const MF_E_NO_PMP_HOST: windows_core::HRESULT = windows_core::HRESULT(0xC00D717F_u32 as _);
pub const MF_E_NO_SAMPLE_DURATION: windows_core::HRESULT = windows_core::HRESULT(0xC00D36C9_u32 as _);
pub const MF_E_NO_SAMPLE_TIMESTAMP: windows_core::HRESULT = windows_core::HRESULT(0xC00D36C8_u32 as _);
pub const MF_E_NO_SOURCE_IN_CACHE: windows_core::HRESULT = windows_core::HRESULT(0xC00D61AE_u32 as _);
pub const MF_E_NO_VIDEO_SAMPLE_AVAILABLE: windows_core::HRESULT = windows_core::HRESULT(0xC00D4E26_u32 as _);
pub const MF_E_OFFLINE_MODE: windows_core::HRESULT = windows_core::HRESULT(0xC00D4291_u32 as _);
pub const MF_E_OPERATION_CANCELLED: windows_core::HRESULT = windows_core::HRESULT(0xC00D36ED_u32 as _);
pub const MF_E_OPERATION_IN_PROGRESS: windows_core::HRESULT = windows_core::HRESULT(0xC00D3705_u32 as _);
pub const MF_E_OPERATION_UNSUPPORTED_AT_D3D_FEATURE_LEVEL: windows_core::HRESULT = windows_core::HRESULT(0xC00D3708_u32 as _);
pub const MF_E_OPL_NOT_SUPPORTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D715A_u32 as _);
pub const MF_E_OUT_OF_RANGE: windows_core::HRESULT = windows_core::HRESULT(0xC00D3702_u32 as _);
pub const MF_E_PEAUTH_NOT_STARTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D7175_u32 as _);
pub const MF_E_PEAUTH_PUBLICKEY_REVOKED: windows_core::HRESULT = windows_core::HRESULT(0xC00D7171_u32 as _);
pub const MF_E_PEAUTH_SESSION_NOT_STARTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D716F_u32 as _);
pub const MF_E_PEAUTH_UNTRUSTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D7163_u32 as _);
pub const MF_E_PE_SESSIONS_MAXED: windows_core::HRESULT = windows_core::HRESULT(0xC00D7177_u32 as _);
pub const MF_E_PE_UNTRUSTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D7174_u32 as _);
pub const MF_E_PLATFORM_NOT_INITIALIZED: windows_core::HRESULT = windows_core::HRESULT(0xC00D36B0_u32 as _);
pub const MF_E_POLICY_MGR_ACTION_OUTOFBOUNDS: windows_core::HRESULT = windows_core::HRESULT(0xC00D717C_u32 as _);
pub const MF_E_POLICY_UNSUPPORTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D7159_u32 as _);
pub const MF_E_PROCESS_RESTART_REQUIRED: windows_core::HRESULT = windows_core::HRESULT(0xC00D716D_u32 as _);
pub const MF_E_PROPERTY_EMPTY: windows_core::HRESULT = windows_core::HRESULT(0xC00D36E9_u32 as _);
pub const MF_E_PROPERTY_NOT_ALLOWED: windows_core::HRESULT = windows_core::HRESULT(0xC00D3E8F_u32 as _);
pub const MF_E_PROPERTY_NOT_EMPTY: windows_core::HRESULT = windows_core::HRESULT(0xC00D36EA_u32 as _);
pub const MF_E_PROPERTY_NOT_FOUND: windows_core::HRESULT = windows_core::HRESULT(0xC00D3E8D_u32 as _);
pub const MF_E_PROPERTY_READ_ONLY: windows_core::HRESULT = windows_core::HRESULT(0xC00D3E8E_u32 as _);
pub const MF_E_PROPERTY_TYPE_NOT_ALLOWED: windows_core::HRESULT = windows_core::HRESULT(0xC00D36E7_u32 as _);
pub const MF_E_PROPERTY_TYPE_NOT_SUPPORTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D36E8_u32 as _);
pub const MF_E_PROPERTY_VECTOR_NOT_ALLOWED: windows_core::HRESULT = windows_core::HRESULT(0xC00D36EB_u32 as _);
pub const MF_E_PROPERTY_VECTOR_REQUIRED: windows_core::HRESULT = windows_core::HRESULT(0xC00D36EC_u32 as _);
pub const MF_E_QM_INVALIDSTATE: windows_core::HRESULT = windows_core::HRESULT(0xC00DA02C_u32 as _);
pub const MF_E_QUALITYKNOB_WAIT_LONGER: windows_core::HRESULT = windows_core::HRESULT(0xC00DA02B_u32 as _);
pub const MF_E_RATE_CHANGE_PREEMPTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D36D4_u32 as _);
pub const MF_E_REBOOT_REQUIRED: windows_core::HRESULT = windows_core::HRESULT(0xC00D7167_u32 as _);
pub const MF_E_RESOLUTION_REQUIRES_PMP_CREATION_CALLBACK: windows_core::HRESULT = windows_core::HRESULT(0xC00D7183_u32 as _);
pub const MF_E_REVERSE_UNSUPPORTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D36D2_u32 as _);
pub const MF_E_RT_OUTOFMEMORY: windows_core::HRESULT = windows_core::HRESULT(0xC00D36F7_u32 as _);
pub const MF_E_RT_THROUGHPUT_NOT_AVAILABLE: windows_core::HRESULT = windows_core::HRESULT(0xC00D36F3_u32 as _);
pub const MF_E_RT_TOO_MANY_CLASSES: windows_core::HRESULT = windows_core::HRESULT(0xC00D36F4_u32 as _);
pub const MF_E_RT_UNAVAILABLE: windows_core::HRESULT = windows_core::HRESULT(0xC00D36CF_u32 as _);
pub const MF_E_RT_WORKQUEUE_CLASS_NOT_SPECIFIED: windows_core::HRESULT = windows_core::HRESULT(0xC00D36F8_u32 as _);
pub const MF_E_RT_WOULDBLOCK: windows_core::HRESULT = windows_core::HRESULT(0xC00D36F5_u32 as _);
pub const MF_E_SAMPLEALLOCATOR_CANCELED: windows_core::HRESULT = windows_core::HRESULT(0xC00D4A3D_u32 as _);
pub const MF_E_SAMPLEALLOCATOR_EMPTY: windows_core::HRESULT = windows_core::HRESULT(0xC00D4A3E_u32 as _);
pub const MF_E_SAMPLE_HAS_TOO_MANY_BUFFERS: windows_core::HRESULT = windows_core::HRESULT(0xC00D36DF_u32 as _);
pub const MF_E_SAMPLE_NOT_WRITABLE: windows_core::HRESULT = windows_core::HRESULT(0xC00D36E0_u32 as _);
pub const MF_E_SEQUENCER_UNKNOWN_SEGMENT_ID: windows_core::HRESULT = windows_core::HRESULT(0xC00D61AC_u32 as _);
pub const MF_E_SESSION_PAUSEWHILESTOPPED: windows_core::HRESULT = windows_core::HRESULT(0xC00D36FC_u32 as _);
pub const MF_E_SHUTDOWN: windows_core::HRESULT = windows_core::HRESULT(0xC00D3E85_u32 as _);
pub const MF_E_SIGNATURE_VERIFICATION_FAILED: windows_core::HRESULT = windows_core::HRESULT(0xC00D715C_u32 as _);
pub const MF_E_SINK_ALREADYSTOPPED: windows_core::HRESULT = windows_core::HRESULT(0xC00D4A3F_u32 as _);
pub const MF_E_SINK_HEADERS_NOT_FOUND: windows_core::HRESULT = windows_core::HRESULT(0xC00D4A45_u32 as _);
pub const MF_E_SINK_NO_SAMPLES_PROCESSED: windows_core::HRESULT = windows_core::HRESULT(0xC00D4A44_u32 as _);
pub const MF_E_SINK_NO_STREAMS: windows_core::HRESULT = windows_core::HRESULT(0xC00D4A41_u32 as _);
pub const MF_E_SOURCERESOLVER_MUTUALLY_EXCLUSIVE_FLAGS: windows_core::HRESULT = windows_core::HRESULT(0xC00D36F1_u32 as _);
pub const MF_E_STATE_TRANSITION_PENDING: windows_core::HRESULT = windows_core::HRESULT(0xC00D36DC_u32 as _);
pub const MF_E_STREAMSINKS_FIXED: windows_core::HRESULT = windows_core::HRESULT(0xC00D4A3B_u32 as _);
pub const MF_E_STREAMSINKS_OUT_OF_SYNC: windows_core::HRESULT = windows_core::HRESULT(0xC00D4A3A_u32 as _);
pub const MF_E_STREAMSINK_EXISTS: windows_core::HRESULT = windows_core::HRESULT(0xC00D4A3C_u32 as _);
pub const MF_E_STREAMSINK_REMOVED: windows_core::HRESULT = windows_core::HRESULT(0xC00D4A38_u32 as _);
pub const MF_E_STREAM_ERROR: windows_core::HRESULT = windows_core::HRESULT(0xC00DA7FB_u32 as _);
pub const MF_E_TEST_SIGNED_COMPONENTS_NOT_ALLOWED: windows_core::HRESULT = windows_core::HRESULT(0xC00D7179_u32 as _);
pub const MF_E_THINNING_UNSUPPORTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D36D1_u32 as _);
pub const MF_E_TIMELINECONTROLLER_CANNOT_ATTACH: windows_core::HRESULT = windows_core::HRESULT(0xC00DAFCA_u32 as _);
pub const MF_E_TIMELINECONTROLLER_NOT_ALLOWED: windows_core::HRESULT = windows_core::HRESULT(0xC00DAFC9_u32 as _);
pub const MF_E_TIMELINECONTROLLER_UNSUPPORTED_SOURCE_TYPE: windows_core::HRESULT = windows_core::HRESULT(0xC00DAFC8_u32 as _);
pub const MF_E_TIMER_ORPHANED: windows_core::HRESULT = windows_core::HRESULT(0xC00D36DB_u32 as _);
pub const MF_E_TOPOLOGY_VERIFICATION_FAILED: windows_core::HRESULT = windows_core::HRESULT(0xC00D715B_u32 as _);
pub const MF_E_TOPO_CANNOT_CONNECT: windows_core::HRESULT = windows_core::HRESULT(0xC00D5213_u32 as _);
pub const MF_E_TOPO_CANNOT_FIND_DECRYPTOR: windows_core::HRESULT = windows_core::HRESULT(0xC00D5211_u32 as _);
pub const MF_E_TOPO_CODEC_NOT_FOUND: windows_core::HRESULT = windows_core::HRESULT(0xC00D5212_u32 as _);
pub const MF_E_TOPO_INVALID_OPTIONAL_NODE: windows_core::HRESULT = windows_core::HRESULT(0xC00D520E_u32 as _);
pub const MF_E_TOPO_INVALID_TIME_ATTRIBUTES: windows_core::HRESULT = windows_core::HRESULT(0xC00D5215_u32 as _);
pub const MF_E_TOPO_LOOPS_IN_TOPOLOGY: windows_core::HRESULT = windows_core::HRESULT(0xC00D5216_u32 as _);
pub const MF_E_TOPO_MISSING_PRESENTATION_DESCRIPTOR: windows_core::HRESULT = windows_core::HRESULT(0xC00D5217_u32 as _);
pub const MF_E_TOPO_MISSING_SOURCE: windows_core::HRESULT = windows_core::HRESULT(0xC00D521A_u32 as _);
pub const MF_E_TOPO_MISSING_STREAM_DESCRIPTOR: windows_core::HRESULT = windows_core::HRESULT(0xC00D5218_u32 as _);
pub const MF_E_TOPO_SINK_ACTIVATES_UNSUPPORTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D521B_u32 as _);
pub const MF_E_TOPO_STREAM_DESCRIPTOR_NOT_SELECTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D5219_u32 as _);
pub const MF_E_TOPO_UNSUPPORTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D5214_u32 as _);
pub const MF_E_TRANSCODE_INVALID_PROFILE: windows_core::HRESULT = windows_core::HRESULT(0xC00DA413_u32 as _);
pub const MF_E_TRANSCODE_NO_CONTAINERTYPE: windows_core::HRESULT = windows_core::HRESULT(0xC00DA410_u32 as _);
pub const MF_E_TRANSCODE_NO_MATCHING_ENCODER: windows_core::HRESULT = windows_core::HRESULT(0xC00DA412_u32 as _);
pub const MF_E_TRANSCODE_PROFILE_NO_MATCHING_STREAMS: windows_core::HRESULT = windows_core::HRESULT(0xC00DA411_u32 as _);
pub const MF_E_TRANSFORM_ASYNC_LOCKED: windows_core::HRESULT = windows_core::HRESULT(0xC00D6D77_u32 as _);
pub const MF_E_TRANSFORM_ASYNC_MFT_NOT_SUPPORTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D6D7A_u32 as _);
pub const MF_E_TRANSFORM_CANNOT_CHANGE_MEDIATYPE_WHILE_PROCESSING: windows_core::HRESULT = windows_core::HRESULT(0xC00D6D74_u32 as _);
pub const MF_E_TRANSFORM_CANNOT_INITIALIZE_ACM_DRIVER: windows_core::HRESULT = windows_core::HRESULT(0xC00D6D78_u32 as _);
pub const MF_E_TRANSFORM_CONFLICTS_WITH_OTHER_CURRENTLY_ENABLED_FEATURES: windows_core::HRESULT = windows_core::HRESULT(0xC00D6D70_u32 as _);
pub const MF_E_TRANSFORM_EXATTRIBUTE_NOT_SUPPORTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D6D7C_u32 as _);
pub const MF_E_TRANSFORM_INPUT_REMAINING: windows_core::HRESULT = windows_core::HRESULT(0xC00D6D62_u32 as _);
pub const MF_E_TRANSFORM_NEED_MORE_INPUT: windows_core::HRESULT = windows_core::HRESULT(0xC00D6D72_u32 as _);
pub const MF_E_TRANSFORM_NOT_POSSIBLE_FOR_CURRENT_INPUT_MEDIATYPE: windows_core::HRESULT = windows_core::HRESULT(0xC00D6D6E_u32 as _);
pub const MF_E_TRANSFORM_NOT_POSSIBLE_FOR_CURRENT_MEDIATYPE_COMBINATION: windows_core::HRESULT = windows_core::HRESULT(0xC00D6D6F_u32 as _);
pub const MF_E_TRANSFORM_NOT_POSSIBLE_FOR_CURRENT_OUTPUT_MEDIATYPE: windows_core::HRESULT = windows_core::HRESULT(0xC00D6D6D_u32 as _);
pub const MF_E_TRANSFORM_NOT_POSSIBLE_FOR_CURRENT_SPKR_CONFIG: windows_core::HRESULT = windows_core::HRESULT(0xC00D6D73_u32 as _);
pub const MF_E_TRANSFORM_PROFILE_INVALID_OR_CORRUPT: windows_core::HRESULT = windows_core::HRESULT(0xC00D6D64_u32 as _);
pub const MF_E_TRANSFORM_PROFILE_MISSING: windows_core::HRESULT = windows_core::HRESULT(0xC00D6D63_u32 as _);
pub const MF_E_TRANSFORM_PROFILE_TRUNCATED: windows_core::HRESULT = windows_core::HRESULT(0xC00D6D65_u32 as _);
pub const MF_E_TRANSFORM_PROPERTY_ARRAY_VALUE_WRONG_NUM_DIM: windows_core::HRESULT = windows_core::HRESULT(0xC00D6D69_u32 as _);
pub const MF_E_TRANSFORM_PROPERTY_NOT_WRITEABLE: windows_core::HRESULT = windows_core::HRESULT(0xC00D6D68_u32 as _);
pub const MF_E_TRANSFORM_PROPERTY_PID_NOT_RECOGNIZED: windows_core::HRESULT = windows_core::HRESULT(0xC00D6D66_u32 as _);
pub const MF_E_TRANSFORM_PROPERTY_VALUE_INCOMPATIBLE: windows_core::HRESULT = windows_core::HRESULT(0xC00D6D6C_u32 as _);
pub const MF_E_TRANSFORM_PROPERTY_VALUE_OUT_OF_RANGE: windows_core::HRESULT = windows_core::HRESULT(0xC00D6D6B_u32 as _);
pub const MF_E_TRANSFORM_PROPERTY_VALUE_SIZE_WRONG: windows_core::HRESULT = windows_core::HRESULT(0xC00D6D6A_u32 as _);
pub const MF_E_TRANSFORM_PROPERTY_VARIANT_TYPE_WRONG: windows_core::HRESULT = windows_core::HRESULT(0xC00D6D67_u32 as _);
pub const MF_E_TRANSFORM_STREAM_CHANGE: windows_core::HRESULT = windows_core::HRESULT(0xC00D6D61_u32 as _);
pub const MF_E_TRANSFORM_STREAM_INVALID_RESOLUTION: windows_core::HRESULT = windows_core::HRESULT(0xC00D6D79_u32 as _);
pub const MF_E_TRANSFORM_TYPE_NOT_SET: windows_core::HRESULT = windows_core::HRESULT(0xC00D6D60_u32 as _);
pub const MF_E_TRUST_DISABLED: windows_core::HRESULT = windows_core::HRESULT(0xC00D7152_u32 as _);
pub const MF_E_UNAUTHORIZED: windows_core::HRESULT = windows_core::HRESULT(0xC00D3701_u32 as _);
pub const MF_E_UNEXPECTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D36BB_u32 as _);
pub const MF_E_UNRECOVERABLE_ERROR_OCCURRED: windows_core::HRESULT = windows_core::HRESULT(0xC00D36DE_u32 as _);
pub const MF_E_UNSUPPORTED_BYTESTREAM_TYPE: windows_core::HRESULT = windows_core::HRESULT(0xC00D36C4_u32 as _);
pub const MF_E_UNSUPPORTED_CAPTION: windows_core::HRESULT = windows_core::HRESULT(0xC00D36E4_u32 as _);
pub const MF_E_UNSUPPORTED_CAPTURE_DEVICE_PRESENT: windows_core::HRESULT = windows_core::HRESULT(0xC00DABED_u32 as _);
pub const MF_E_UNSUPPORTED_CHARACTERISTICS: windows_core::HRESULT = windows_core::HRESULT(0xC00D3E9E_u32 as _);
pub const MF_E_UNSUPPORTED_CONTENT_PROTECTION_SYSTEM: windows_core::HRESULT = windows_core::HRESULT(0xC00D7186_u32 as _);
pub const MF_E_UNSUPPORTED_D3D_TYPE: windows_core::HRESULT = windows_core::HRESULT(0xC00D6D76_u32 as _);
pub const MF_E_UNSUPPORTED_FORMAT: windows_core::HRESULT = windows_core::HRESULT(0xC00D3E98_u32 as _);
pub const MF_E_UNSUPPORTED_MEDIATYPE_AT_D3D_FEATURE_LEVEL: windows_core::HRESULT = windows_core::HRESULT(0xC00D3709_u32 as _);
pub const MF_E_UNSUPPORTED_RATE: windows_core::HRESULT = windows_core::HRESULT(0xC00D36D0_u32 as _);
pub const MF_E_UNSUPPORTED_RATE_TRANSITION: windows_core::HRESULT = windows_core::HRESULT(0xC00D36D3_u32 as _);
pub const MF_E_UNSUPPORTED_REPRESENTATION: windows_core::HRESULT = windows_core::HRESULT(0xC00D36B7_u32 as _);
pub const MF_E_UNSUPPORTED_SCHEME: windows_core::HRESULT = windows_core::HRESULT(0xC00D36C3_u32 as _);
pub const MF_E_UNSUPPORTED_SERVICE: windows_core::HRESULT = windows_core::HRESULT(0xC00D36BA_u32 as _);
pub const MF_E_UNSUPPORTED_STATE_TRANSITION: windows_core::HRESULT = windows_core::HRESULT(0xC00D36DD_u32 as _);
pub const MF_E_UNSUPPORTED_TIME_FORMAT: windows_core::HRESULT = windows_core::HRESULT(0xC00D36C5_u32 as _);
pub const MF_E_USERMODE_UNTRUSTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D716E_u32 as _);
pub const MF_E_VIDEO_DEVICE_LOCKED: windows_core::HRESULT = windows_core::HRESULT(0xC00D4E24_u32 as _);
pub const MF_E_VIDEO_RECORDING_DEVICE_INVALIDATED: windows_core::HRESULT = windows_core::HRESULT(0xC00D3EA2_u32 as _);
pub const MF_E_VIDEO_RECORDING_DEVICE_PREEMPTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D3EA3_u32 as _);
pub const MF_E_VIDEO_REN_COPYPROT_FAILED: windows_core::HRESULT = windows_core::HRESULT(0xC00D4E22_u32 as _);
pub const MF_E_VIDEO_REN_NO_DEINTERLACE_HW: windows_core::HRESULT = windows_core::HRESULT(0xC00D4E21_u32 as _);
pub const MF_E_VIDEO_REN_NO_PROCAMP_HW: windows_core::HRESULT = windows_core::HRESULT(0xC00D4E20_u32 as _);
pub const MF_E_VIDEO_REN_SURFACE_NOT_SHARED: windows_core::HRESULT = windows_core::HRESULT(0xC00D4E23_u32 as _);
pub const MF_E_WMDRMOTA_ACTION_ALREADY_SET: windows_core::HRESULT = windows_core::HRESULT(0xC00D7154_u32 as _);
pub const MF_E_WMDRMOTA_ACTION_MISMATCH: windows_core::HRESULT = windows_core::HRESULT(0xC00D7157_u32 as _);
pub const MF_E_WMDRMOTA_DRM_ENCRYPTION_SCHEME_NOT_SUPPORTED: windows_core::HRESULT = windows_core::HRESULT(0xC00D7156_u32 as _);
pub const MF_E_WMDRMOTA_DRM_HEADER_NOT_AVAILABLE: windows_core::HRESULT = windows_core::HRESULT(0xC00D7155_u32 as _);
pub const MF_E_WMDRMOTA_INVALID_POLICY: windows_core::HRESULT = windows_core::HRESULT(0xC00D7158_u32 as _);
pub const MF_E_WMDRMOTA_NO_ACTION: windows_core::HRESULT = windows_core::HRESULT(0xC00D7153_u32 as _);
pub const MF_FILEFLAGS_ALLOW_WRITE_SHARING: MF_FILE_FLAGS = MF_FILE_FLAGS(2i32);
pub const MF_FILEFLAGS_NOBUFFERING: MF_FILE_FLAGS = MF_FILE_FLAGS(1i32);
pub const MF_FILEFLAGS_NONE: MF_FILE_FLAGS = MF_FILE_FLAGS(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_FILE_ACCESSMODE(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_FILE_FLAGS(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_FILE_OPENMODE(pub i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MF_FLOAT2 {
pub x: f32,
pub y: f32,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MF_FLOAT3 {
pub x: f32,
pub y: f32,
pub z: f32,
}
pub const MF_FRAMESERVER_VCAMEVENT_EXTENDED_CUSTOM_EVENT: windows_core::GUID = windows_core::GUID::from_u128(0x6e59489c_47d3_4467_83ef_12d34e871665);
pub const MF_FRAMESERVER_VCAMEVENT_EXTENDED_PIPELINE_SHUTDOWN: windows_core::GUID = windows_core::GUID::from_u128(0x45a81b31_43f8_4e5d_8ce2_22dce026996d);
pub const MF_FRAMESERVER_VCAMEVENT_EXTENDED_SOURCE_INITIALIZE: windows_core::GUID = windows_core::GUID::from_u128(0xe52c4dff_e46d_4d0b_bc75_ddd4c8723f96);
pub const MF_FRAMESERVER_VCAMEVENT_EXTENDED_SOURCE_START: windows_core::GUID = windows_core::GUID::from_u128(0xb1eeb989_b456_4f4a_ae40_079c28e24af8);
pub const MF_FRAMESERVER_VCAMEVENT_EXTENDED_SOURCE_STOP: windows_core::GUID = windows_core::GUID::from_u128(0xb7fe7a61_fe91_415e_8608_d37dedb1a58b);
pub const MF_FRAMESERVER_VCAMEVENT_EXTENDED_SOURCE_UNINITIALIZE: windows_core::GUID = windows_core::GUID::from_u128(0xa0ebaba7_a422_4e33_8401_b37d2800aa67);
pub const MF_GRL_ABSENT: u32 = 4096u32;
pub const MF_GRL_LOAD_FAILED: u32 = 16u32;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_HDCP_STATUS(pub i32);
pub const MF_HDCP_STATUS_OFF: MF_HDCP_STATUS = MF_HDCP_STATUS(1i32);
pub const MF_HDCP_STATUS_ON: MF_HDCP_STATUS = MF_HDCP_STATUS(0i32);
pub const MF_HDCP_STATUS_ON_WITH_TYPE_ENFORCEMENT: MF_HDCP_STATUS = MF_HDCP_STATUS(2i32);
pub const MF_HISTOGRAM_CHANNEL_B: u32 = 8u32;
pub const MF_HISTOGRAM_CHANNEL_Cb: u32 = 16u32;
pub const MF_HISTOGRAM_CHANNEL_Cr: u32 = 32u32;
pub const MF_HISTOGRAM_CHANNEL_G: u32 = 4u32;
pub const MF_HISTOGRAM_CHANNEL_R: u32 = 2u32;
pub const MF_HISTOGRAM_CHANNEL_Y: u32 = 1u32;
pub const MF_INDEPENDENT_STILL_IMAGE: windows_core::GUID = windows_core::GUID::from_u128(0xea12af41_0710_42c9_a127_daa3e78483a5);
pub const MF_INDEX_SIZE_ERR: u32 = 2154823681u32;
pub const MF_INVALID_ACCESS_ERR: u32 = 2154823695u32;
pub const MF_INVALID_GRL_SIGNATURE: u32 = 32u32;
pub const MF_INVALID_PRESENTATION_TIME: u64 = 9223372036854775808u64;
pub const MF_INVALID_STATE_ERR: u32 = 2154823691u32;
pub const MF_I_MANUAL_PROXY: windows_core::HRESULT = windows_core::HRESULT(0x400D4272_u32 as _);
pub const MF_KERNEL_MODE_COMPONENT_LOAD: u32 = 2u32;
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MF_LEAKY_BUCKET_PAIR {
pub dwBitrate: u32,
pub msBufferWindow: u32,
}
pub const MF_LICENSE_URL_TAMPERED: MF_URL_TRUST_STATUS = MF_URL_TRUST_STATUS(2i32);
pub const MF_LICENSE_URL_TRUSTED: MF_URL_TRUST_STATUS = MF_URL_TRUST_STATUS(1i32);
pub const MF_LICENSE_URL_UNTRUSTED: MF_URL_TRUST_STATUS = MF_URL_TRUST_STATUS(0i32);
pub const MF_LOCAL_MFT_REGISTRATION_SERVICE: windows_core::GUID = windows_core::GUID::from_u128(0xddf5cf9c_4506_45aa_abf0_6d5d94dd1b4a);
pub const MF_LOCAL_PLUGIN_CONTROL_POLICY: windows_core::GUID = windows_core::GUID::from_u128(0xd91b0085_c86d_4f81_8822_8c68e1d7fa04);
pub const MF_LOW_LATENCY: windows_core::GUID = windows_core::GUID::from_u128(0x9c27891a_ed7a_40e1_88e8_b22727a024ee);
pub const MF_LUMA_KEY_ENABLE: windows_core::GUID = windows_core::GUID::from_u128(0x7369820f_76de_43ca_9284_47b8f37e0649);
pub const MF_LUMA_KEY_LOWER: windows_core::GUID = windows_core::GUID::from_u128(0x93d7b8d5_0b81_4715_aea0_8725871621e9);
pub const MF_LUMA_KEY_UPPER: windows_core::GUID = windows_core::GUID::from_u128(0xd09f39bb_4602_4c31_a706_a12171a5110a);
pub const MF_MEDIAENGINE_KEYERR_CLIENT: MF_MEDIA_ENGINE_KEYERR = MF_MEDIA_ENGINE_KEYERR(2i32);
pub const MF_MEDIAENGINE_KEYERR_DOMAIN: MF_MEDIA_ENGINE_KEYERR = MF_MEDIA_ENGINE_KEYERR(6i32);
pub const MF_MEDIAENGINE_KEYERR_HARDWARECHANGE: MF_MEDIA_ENGINE_KEYERR = MF_MEDIA_ENGINE_KEYERR(5i32);
pub const MF_MEDIAENGINE_KEYERR_OUTPUT: MF_MEDIA_ENGINE_KEYERR = MF_MEDIA_ENGINE_KEYERR(4i32);
pub const MF_MEDIAENGINE_KEYERR_SERVICE: MF_MEDIA_ENGINE_KEYERR = MF_MEDIA_ENGINE_KEYERR(3i32);
pub const MF_MEDIAENGINE_KEYERR_UNKNOWN: MF_MEDIA_ENGINE_KEYERR = MF_MEDIA_ENGINE_KEYERR(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_MEDIAKEYSESSION_MESSAGETYPE(pub i32);
pub const MF_MEDIAKEYSESSION_MESSAGETYPE_INDIVIDUALIZATION_REQUEST: MF_MEDIAKEYSESSION_MESSAGETYPE = MF_MEDIAKEYSESSION_MESSAGETYPE(3i32);
pub const MF_MEDIAKEYSESSION_MESSAGETYPE_LICENSE_RELEASE: MF_MEDIAKEYSESSION_MESSAGETYPE = MF_MEDIAKEYSESSION_MESSAGETYPE(2i32);
pub const MF_MEDIAKEYSESSION_MESSAGETYPE_LICENSE_RENEWAL: MF_MEDIAKEYSESSION_MESSAGETYPE = MF_MEDIAKEYSESSION_MESSAGETYPE(1i32);
pub const MF_MEDIAKEYSESSION_MESSAGETYPE_LICENSE_REQUEST: MF_MEDIAKEYSESSION_MESSAGETYPE = MF_MEDIAKEYSESSION_MESSAGETYPE(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_MEDIAKEYSESSION_TYPE(pub i32);
pub const MF_MEDIAKEYSESSION_TYPE_PERSISTENT_LICENSE: MF_MEDIAKEYSESSION_TYPE = MF_MEDIAKEYSESSION_TYPE(1i32);
pub const MF_MEDIAKEYSESSION_TYPE_PERSISTENT_RELEASE_MESSAGE: MF_MEDIAKEYSESSION_TYPE = MF_MEDIAKEYSESSION_TYPE(2i32);
pub const MF_MEDIAKEYSESSION_TYPE_PERSISTENT_USAGE_RECORD: MF_MEDIAKEYSESSION_TYPE = MF_MEDIAKEYSESSION_TYPE(3i32);
pub const MF_MEDIAKEYSESSION_TYPE_TEMPORARY: MF_MEDIAKEYSESSION_TYPE = MF_MEDIAKEYSESSION_TYPE(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_MEDIAKEYS_REQUIREMENT(pub i32);
pub const MF_MEDIAKEYS_REQUIREMENT_NOT_ALLOWED: MF_MEDIAKEYS_REQUIREMENT = MF_MEDIAKEYS_REQUIREMENT(3i32);
pub const MF_MEDIAKEYS_REQUIREMENT_OPTIONAL: MF_MEDIAKEYS_REQUIREMENT = MF_MEDIAKEYS_REQUIREMENT(2i32);
pub const MF_MEDIAKEYS_REQUIREMENT_REQUIRED: MF_MEDIAKEYS_REQUIREMENT = MF_MEDIAKEYS_REQUIREMENT(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_MEDIAKEY_STATUS(pub i32);
pub const MF_MEDIAKEY_STATUS_EXPIRED: MF_MEDIAKEY_STATUS = MF_MEDIAKEY_STATUS(1i32);
pub const MF_MEDIAKEY_STATUS_INTERNAL_ERROR: MF_MEDIAKEY_STATUS = MF_MEDIAKEY_STATUS(5i32);
pub const MF_MEDIAKEY_STATUS_OUTPUT_DOWNSCALED: MF_MEDIAKEY_STATUS = MF_MEDIAKEY_STATUS(2i32);
pub const MF_MEDIAKEY_STATUS_OUTPUT_NOT_ALLOWED: MF_MEDIAKEY_STATUS = MF_MEDIAKEY_STATUS(3i32);
pub const MF_MEDIAKEY_STATUS_OUTPUT_RESTRICTED: MF_MEDIAKEY_STATUS = MF_MEDIAKEY_STATUS(7i32);
pub const MF_MEDIAKEY_STATUS_RELEASED: MF_MEDIAKEY_STATUS = MF_MEDIAKEY_STATUS(6i32);
pub const MF_MEDIAKEY_STATUS_STATUS_PENDING: MF_MEDIAKEY_STATUS = MF_MEDIAKEY_STATUS(4i32);
pub const MF_MEDIAKEY_STATUS_USABLE: MF_MEDIAKEY_STATUS = MF_MEDIAKEY_STATUS(0i32);
pub const MF_MEDIASINK_AUTOFINALIZE_SUPPORTED: windows_core::GUID = windows_core::GUID::from_u128(0x48c131be_135a_41cb_8290_03652509c999);
pub const MF_MEDIASINK_ENABLE_AUTOFINALIZE: windows_core::GUID = windows_core::GUID::from_u128(0x34014265_cb7e_4cde_ac7c_effd3b3c2530);
pub const MF_MEDIASOURCE_EXPOSE_ALL_STREAMS: windows_core::GUID = windows_core::GUID::from_u128(0xe7f250b8_8fd9_4a09_b6c1_6a315c7c720e);
pub const MF_MEDIASOURCE_SERVICE: windows_core::GUID = windows_core::GUID::from_u128(0xf09992f7_9fba_4c4a_a37f_8c47b4e1dfe7);
pub const MF_MEDIATYPE_EQUAL_FORMAT_DATA: u32 = 4u32;
pub const MF_MEDIATYPE_EQUAL_FORMAT_TYPES: u32 = 2u32;
pub const MF_MEDIATYPE_EQUAL_FORMAT_USER_DATA: u32 = 8u32;
pub const MF_MEDIATYPE_EQUAL_MAJOR_TYPES: u32 = 1u32;
pub const MF_MEDIATYPE_MULTIPLEXED_MANAGER: windows_core::GUID = windows_core::GUID::from_u128(0x13c78fb5_f275_4ea0_bb5f_0249832b0d6e);
pub const MF_MEDIA_ENGINE_AUDIOONLY: MF_MEDIA_ENGINE_CREATEFLAGS = MF_MEDIA_ENGINE_CREATEFLAGS(1i32);
pub const MF_MEDIA_ENGINE_AUDIO_CATEGORY: windows_core::GUID = windows_core::GUID::from_u128(0xc8d4c51d_350e_41f2_ba46_faebbb0857f6);
pub const MF_MEDIA_ENGINE_AUDIO_ENDPOINT_ROLE: windows_core::GUID = windows_core::GUID::from_u128(0xd2cb93d1_116a_44f2_9385_f7d0fda2fb46);
pub const MF_MEDIA_ENGINE_BROWSER_COMPATIBILITY_MODE: windows_core::GUID = windows_core::GUID::from_u128(0x4e0212e2_e18f_41e1_95e5_c0e7e9235bc3);
pub const MF_MEDIA_ENGINE_BROWSER_COMPATIBILITY_MODE_IE10: windows_core::GUID = windows_core::GUID::from_u128(0x11a47afd_6589_4124_b312_6158ec517fc3);
pub const MF_MEDIA_ENGINE_BROWSER_COMPATIBILITY_MODE_IE11: windows_core::GUID = windows_core::GUID::from_u128(0x1cf1315f_ce3f_4035_9391_16142f775189);
pub const MF_MEDIA_ENGINE_BROWSER_COMPATIBILITY_MODE_IE9: windows_core::GUID = windows_core::GUID::from_u128(0x052c2d39_40c0_4188_ab86_f828273b7522);
pub const MF_MEDIA_ENGINE_BROWSER_COMPATIBILITY_MODE_IE_EDGE: windows_core::GUID = windows_core::GUID::from_u128(0xa6f3e465_3aca_442c_a3f0_ad6ddad839ae);
pub const MF_MEDIA_ENGINE_CALLBACK: windows_core::GUID = windows_core::GUID::from_u128(0xc60381b8_83a4_41f8_a3d0_de05076849a9);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_MEDIA_ENGINE_CANPLAY(pub i32);
pub const MF_MEDIA_ENGINE_CANPLAY_MAYBE: MF_MEDIA_ENGINE_CANPLAY = MF_MEDIA_ENGINE_CANPLAY(1i32);
pub const MF_MEDIA_ENGINE_CANPLAY_NOT_SUPPORTED: MF_MEDIA_ENGINE_CANPLAY = MF_MEDIA_ENGINE_CANPLAY(0i32);
pub const MF_MEDIA_ENGINE_CANPLAY_PROBABLY: MF_MEDIA_ENGINE_CANPLAY = MF_MEDIA_ENGINE_CANPLAY(2i32);
pub const MF_MEDIA_ENGINE_COMPATIBILITY_MODE: windows_core::GUID = windows_core::GUID::from_u128(0x3ef26ad4_dc54_45de_b9af_76c8c66bfa8e);
pub const MF_MEDIA_ENGINE_COMPATIBILITY_MODE_WIN10: windows_core::GUID = windows_core::GUID::from_u128(0x5b25e089_6ca7_4139_a2cb_fcaab39552a3);
pub const MF_MEDIA_ENGINE_COMPATIBILITY_MODE_WWA_EDGE: windows_core::GUID = windows_core::GUID::from_u128(0x15b29098_9f01_4e4d_b65a_c06c6c89da2a);
pub const MF_MEDIA_ENGINE_CONTENT_PROTECTION_FLAGS: windows_core::GUID = windows_core::GUID::from_u128(0xe0350223_5aaf_4d76_a7c3_06de70894db4);
pub const MF_MEDIA_ENGINE_CONTENT_PROTECTION_MANAGER: windows_core::GUID = windows_core::GUID::from_u128(0xfdd6dfaa_bd85_4af3_9e0f_a01d539d876a);
pub const MF_MEDIA_ENGINE_CONTINUE_ON_CODEC_ERROR: windows_core::GUID = windows_core::GUID::from_u128(0xdbcdb7f9_48e4_4295_b70d_d518234eeb38);
pub const MF_MEDIA_ENGINE_COREWINDOW: windows_core::GUID = windows_core::GUID::from_u128(0xfccae4dc_0b7f_41c2_9f96_4659948acddc);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_MEDIA_ENGINE_CREATEFLAGS(pub i32);
pub const MF_MEDIA_ENGINE_CREATEFLAGS_MASK: MF_MEDIA_ENGINE_CREATEFLAGS = MF_MEDIA_ENGINE_CREATEFLAGS(31i32);
pub const MF_MEDIA_ENGINE_DISABLE_LOCAL_PLUGINS: MF_MEDIA_ENGINE_CREATEFLAGS = MF_MEDIA_ENGINE_CREATEFLAGS(16i32);
pub const MF_MEDIA_ENGINE_DXGI_MANAGER: windows_core::GUID = windows_core::GUID::from_u128(0x065702da_1094_486d_8617_ee7cc4ee4648);
pub const MF_MEDIA_ENGINE_EME_CALLBACK: windows_core::GUID = windows_core::GUID::from_u128(0x494553a7_a481_4cb7_bec5_380903513731);
pub const MF_MEDIA_ENGINE_ENABLE_PROTECTED_CONTENT: MF_MEDIA_ENGINE_PROTECTION_FLAGS = MF_MEDIA_ENGINE_PROTECTION_FLAGS(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_MEDIA_ENGINE_ERR(pub i32);
pub const MF_MEDIA_ENGINE_ERR_ABORTED: MF_MEDIA_ENGINE_ERR = MF_MEDIA_ENGINE_ERR(1i32);
pub const MF_MEDIA_ENGINE_ERR_DECODE: MF_MEDIA_ENGINE_ERR = MF_MEDIA_ENGINE_ERR(3i32);
pub const MF_MEDIA_ENGINE_ERR_ENCRYPTED: MF_MEDIA_ENGINE_ERR = MF_MEDIA_ENGINE_ERR(5i32);
pub const MF_MEDIA_ENGINE_ERR_NETWORK: MF_MEDIA_ENGINE_ERR = MF_MEDIA_ENGINE_ERR(2i32);
pub const MF_MEDIA_ENGINE_ERR_NOERROR: MF_MEDIA_ENGINE_ERR = MF_MEDIA_ENGINE_ERR(0i32);
pub const MF_MEDIA_ENGINE_ERR_SRC_NOT_SUPPORTED: MF_MEDIA_ENGINE_ERR = MF_MEDIA_ENGINE_ERR(4i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_MEDIA_ENGINE_EVENT(pub i32);
pub const MF_MEDIA_ENGINE_EVENT_ABORT: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(4i32);
pub const MF_MEDIA_ENGINE_EVENT_AUDIOENDPOINTCHANGE: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(1016i32);
pub const MF_MEDIA_ENGINE_EVENT_BALANCECHANGE: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(1003i32);
pub const MF_MEDIA_ENGINE_EVENT_BUFFERINGENDED: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(1006i32);
pub const MF_MEDIA_ENGINE_EVENT_BUFFERINGSTARTED: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(1005i32);
pub const MF_MEDIA_ENGINE_EVENT_CANPLAY: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(14i32);
pub const MF_MEDIA_ENGINE_EVENT_CANPLAYTHROUGH: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(15i32);
pub const MF_MEDIA_ENGINE_EVENT_DELAYLOADEVENT_CHANGED: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(1013i32);
pub const MF_MEDIA_ENGINE_EVENT_DOWNLOADCOMPLETE: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(1004i32);
pub const MF_MEDIA_ENGINE_EVENT_DURATIONCHANGE: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(21i32);
pub const MF_MEDIA_ENGINE_EVENT_EMPTIED: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(6i32);
pub const MF_MEDIA_ENGINE_EVENT_ENDED: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(19i32);
pub const MF_MEDIA_ENGINE_EVENT_ERROR: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(5i32);
pub const MF_MEDIA_ENGINE_EVENT_FIRSTFRAMEREADY: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(1009i32);
pub const MF_MEDIA_ENGINE_EVENT_FORMATCHANGE: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(1000i32);
pub const MF_MEDIA_ENGINE_EVENT_FRAMESTEPCOMPLETED: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(1007i32);
pub const MF_MEDIA_ENGINE_EVENT_LOADEDDATA: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(11i32);
pub const MF_MEDIA_ENGINE_EVENT_LOADEDMETADATA: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(10i32);
pub const MF_MEDIA_ENGINE_EVENT_LOADSTART: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(1i32);
pub const MF_MEDIA_ENGINE_EVENT_NOTIFYSTABLESTATE: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(1008i32);
pub const MF_MEDIA_ENGINE_EVENT_OPMINFO: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(1011i32);
pub const MF_MEDIA_ENGINE_EVENT_PAUSE: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(9i32);
pub const MF_MEDIA_ENGINE_EVENT_PLAY: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(8i32);
pub const MF_MEDIA_ENGINE_EVENT_PLAYING: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(13i32);
pub const MF_MEDIA_ENGINE_EVENT_PROGRESS: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(2i32);
pub const MF_MEDIA_ENGINE_EVENT_PURGEQUEUEDEVENTS: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(1001i32);
pub const MF_MEDIA_ENGINE_EVENT_RATECHANGE: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(20i32);
pub const MF_MEDIA_ENGINE_EVENT_RESOURCELOST: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(1012i32);
pub const MF_MEDIA_ENGINE_EVENT_SEEKED: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(17i32);
pub const MF_MEDIA_ENGINE_EVENT_SEEKING: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(16i32);
pub const MF_MEDIA_ENGINE_EVENT_STALLED: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(7i32);
pub const MF_MEDIA_ENGINE_EVENT_STREAMRENDERINGERROR: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(1014i32);
pub const MF_MEDIA_ENGINE_EVENT_SUPPORTEDRATES_CHANGED: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(1015i32);
pub const MF_MEDIA_ENGINE_EVENT_SUSPEND: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(3i32);
pub const MF_MEDIA_ENGINE_EVENT_TIMELINE_MARKER: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(1002i32);
pub const MF_MEDIA_ENGINE_EVENT_TIMEUPDATE: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(18i32);
pub const MF_MEDIA_ENGINE_EVENT_TRACKSCHANGE: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(1010i32);
pub const MF_MEDIA_ENGINE_EVENT_VOLUMECHANGE: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(22i32);
pub const MF_MEDIA_ENGINE_EVENT_WAITING: MF_MEDIA_ENGINE_EVENT = MF_MEDIA_ENGINE_EVENT(12i32);
pub const MF_MEDIA_ENGINE_EXTENSION: windows_core::GUID = windows_core::GUID::from_u128(0x3109fd46_060d_4b62_8dcf_faff811318d2);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_MEDIA_ENGINE_EXTENSION_TYPE(pub i32);
pub const MF_MEDIA_ENGINE_EXTENSION_TYPE_BYTESTREAM: MF_MEDIA_ENGINE_EXTENSION_TYPE = MF_MEDIA_ENGINE_EXTENSION_TYPE(1i32);
pub const MF_MEDIA_ENGINE_EXTENSION_TYPE_MEDIASOURCE: MF_MEDIA_ENGINE_EXTENSION_TYPE = MF_MEDIA_ENGINE_EXTENSION_TYPE(0i32);
pub const MF_MEDIA_ENGINE_FORCEMUTE: MF_MEDIA_ENGINE_CREATEFLAGS = MF_MEDIA_ENGINE_CREATEFLAGS(4i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_MEDIA_ENGINE_FRAME_PROTECTION_FLAGS(pub i32);
pub const MF_MEDIA_ENGINE_FRAME_PROTECTION_FLAG_PROTECTED: MF_MEDIA_ENGINE_FRAME_PROTECTION_FLAGS = MF_MEDIA_ENGINE_FRAME_PROTECTION_FLAGS(1i32);
pub const MF_MEDIA_ENGINE_FRAME_PROTECTION_FLAG_REQUIRES_ANTI_SCREEN_SCRAPE_PROTECTION: MF_MEDIA_ENGINE_FRAME_PROTECTION_FLAGS = MF_MEDIA_ENGINE_FRAME_PROTECTION_FLAGS(4i32);
pub const MF_MEDIA_ENGINE_FRAME_PROTECTION_FLAG_REQUIRES_SURFACE_PROTECTION: MF_MEDIA_ENGINE_FRAME_PROTECTION_FLAGS = MF_MEDIA_ENGINE_FRAME_PROTECTION_FLAGS(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_MEDIA_ENGINE_KEYERR(pub i32);
pub const MF_MEDIA_ENGINE_MEDIA_PLAYER_MODE: windows_core::GUID = windows_core::GUID::from_u128(0x3ddd8d45_5aa1_4112_82e5_36f6a2197e6e);
pub const MF_MEDIA_ENGINE_NEEDKEY_CALLBACK: windows_core::GUID = windows_core::GUID::from_u128(0x7ea80843_b6e4_432c_8ea4_7848ffe4220e);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_MEDIA_ENGINE_NETWORK(pub i32);
pub const MF_MEDIA_ENGINE_NETWORK_EMPTY: MF_MEDIA_ENGINE_NETWORK = MF_MEDIA_ENGINE_NETWORK(0i32);
pub const MF_MEDIA_ENGINE_NETWORK_IDLE: MF_MEDIA_ENGINE_NETWORK = MF_MEDIA_ENGINE_NETWORK(1i32);
pub const MF_MEDIA_ENGINE_NETWORK_LOADING: MF_MEDIA_ENGINE_NETWORK = MF_MEDIA_ENGINE_NETWORK(2i32);
pub const MF_MEDIA_ENGINE_NETWORK_NO_SOURCE: MF_MEDIA_ENGINE_NETWORK = MF_MEDIA_ENGINE_NETWORK(3i32);
pub const MF_MEDIA_ENGINE_OPM_ESTABLISHED: MF_MEDIA_ENGINE_OPM_STATUS = MF_MEDIA_ENGINE_OPM_STATUS(1i32);
pub const MF_MEDIA_ENGINE_OPM_FAILED: MF_MEDIA_ENGINE_OPM_STATUS = MF_MEDIA_ENGINE_OPM_STATUS(5i32);
pub const MF_MEDIA_ENGINE_OPM_FAILED_BDA: MF_MEDIA_ENGINE_OPM_STATUS = MF_MEDIA_ENGINE_OPM_STATUS(3i32);
pub const MF_MEDIA_ENGINE_OPM_FAILED_UNSIGNED_DRIVER: MF_MEDIA_ENGINE_OPM_STATUS = MF_MEDIA_ENGINE_OPM_STATUS(4i32);
pub const MF_MEDIA_ENGINE_OPM_FAILED_VM: MF_MEDIA_ENGINE_OPM_STATUS = MF_MEDIA_ENGINE_OPM_STATUS(2i32);
pub const MF_MEDIA_ENGINE_OPM_HWND: windows_core::GUID = windows_core::GUID::from_u128(0xa0be8ee7_0572_4f2c_a801_2a151bd3e726);
pub const MF_MEDIA_ENGINE_OPM_NOT_REQUESTED: MF_MEDIA_ENGINE_OPM_STATUS = MF_MEDIA_ENGINE_OPM_STATUS(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_MEDIA_ENGINE_OPM_STATUS(pub i32);
pub const MF_MEDIA_ENGINE_PLAYBACK_HWND: windows_core::GUID = windows_core::GUID::from_u128(0xd988879b_67c9_4d92_baa7_6eadd446039d);
pub const MF_MEDIA_ENGINE_PLAYBACK_VISUAL: windows_core::GUID = windows_core::GUID::from_u128(0x6debd26f_6ab9_4d7e_b0ee_c61a73ffad15);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_MEDIA_ENGINE_PRELOAD(pub i32);
pub const MF_MEDIA_ENGINE_PRELOAD_AUTOMATIC: MF_MEDIA_ENGINE_PRELOAD = MF_MEDIA_ENGINE_PRELOAD(4i32);
pub const MF_MEDIA_ENGINE_PRELOAD_EMPTY: MF_MEDIA_ENGINE_PRELOAD = MF_MEDIA_ENGINE_PRELOAD(1i32);
pub const MF_MEDIA_ENGINE_PRELOAD_METADATA: MF_MEDIA_ENGINE_PRELOAD = MF_MEDIA_ENGINE_PRELOAD(3i32);
pub const MF_MEDIA_ENGINE_PRELOAD_MISSING: MF_MEDIA_ENGINE_PRELOAD = MF_MEDIA_ENGINE_PRELOAD(0i32);
pub const MF_MEDIA_ENGINE_PRELOAD_NONE: MF_MEDIA_ENGINE_PRELOAD = MF_MEDIA_ENGINE_PRELOAD(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_MEDIA_ENGINE_PROTECTION_FLAGS(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_MEDIA_ENGINE_READY(pub i32);
pub const MF_MEDIA_ENGINE_READY_HAVE_CURRENT_DATA: MF_MEDIA_ENGINE_READY = MF_MEDIA_ENGINE_READY(2i32);
pub const MF_MEDIA_ENGINE_READY_HAVE_ENOUGH_DATA: MF_MEDIA_ENGINE_READY = MF_MEDIA_ENGINE_READY(4i32);
pub const MF_MEDIA_ENGINE_READY_HAVE_FUTURE_DATA: MF_MEDIA_ENGINE_READY = MF_MEDIA_ENGINE_READY(3i32);
pub const MF_MEDIA_ENGINE_READY_HAVE_METADATA: MF_MEDIA_ENGINE_READY = MF_MEDIA_ENGINE_READY(1i32);
pub const MF_MEDIA_ENGINE_READY_HAVE_NOTHING: MF_MEDIA_ENGINE_READY = MF_MEDIA_ENGINE_READY(0i32);
pub const MF_MEDIA_ENGINE_REAL_TIME_MODE: MF_MEDIA_ENGINE_CREATEFLAGS = MF_MEDIA_ENGINE_CREATEFLAGS(8i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_MEDIA_ENGINE_S3D_PACKING_MODE(pub i32);
pub const MF_MEDIA_ENGINE_S3D_PACKING_MODE_NONE: MF_MEDIA_ENGINE_S3D_PACKING_MODE = MF_MEDIA_ENGINE_S3D_PACKING_MODE(0i32);
pub const MF_MEDIA_ENGINE_S3D_PACKING_MODE_SIDE_BY_SIDE: MF_MEDIA_ENGINE_S3D_PACKING_MODE = MF_MEDIA_ENGINE_S3D_PACKING_MODE(1i32);
pub const MF_MEDIA_ENGINE_S3D_PACKING_MODE_TOP_BOTTOM: MF_MEDIA_ENGINE_S3D_PACKING_MODE = MF_MEDIA_ENGINE_S3D_PACKING_MODE(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_MEDIA_ENGINE_SEEK_MODE(pub i32);
pub const MF_MEDIA_ENGINE_SEEK_MODE_APPROXIMATE: MF_MEDIA_ENGINE_SEEK_MODE = MF_MEDIA_ENGINE_SEEK_MODE(1i32);
pub const MF_MEDIA_ENGINE_SEEK_MODE_NORMAL: MF_MEDIA_ENGINE_SEEK_MODE = MF_MEDIA_ENGINE_SEEK_MODE(0i32);
pub const MF_MEDIA_ENGINE_SOURCE_RESOLVER_CONFIG_STORE: windows_core::GUID = windows_core::GUID::from_u128(0x0ac0c497_b3c4_48c9_9cde_bb8ca2442ca3);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_MEDIA_ENGINE_STATISTIC(pub i32);
pub const MF_MEDIA_ENGINE_STATISTIC_BUFFER_PROGRESS: MF_MEDIA_ENGINE_STATISTIC = MF_MEDIA_ENGINE_STATISTIC(3i32);
pub const MF_MEDIA_ENGINE_STATISTIC_BYTES_DOWNLOADED: MF_MEDIA_ENGINE_STATISTIC = MF_MEDIA_ENGINE_STATISTIC(2i32);
pub const MF_MEDIA_ENGINE_STATISTIC_FRAMES_CORRUPTED: MF_MEDIA_ENGINE_STATISTIC = MF_MEDIA_ENGINE_STATISTIC(6i32);
pub const MF_MEDIA_ENGINE_STATISTIC_FRAMES_DROPPED: MF_MEDIA_ENGINE_STATISTIC = MF_MEDIA_ENGINE_STATISTIC(1i32);
pub const MF_MEDIA_ENGINE_STATISTIC_FRAMES_PER_SECOND: MF_MEDIA_ENGINE_STATISTIC = MF_MEDIA_ENGINE_STATISTIC(4i32);
pub const MF_MEDIA_ENGINE_STATISTIC_FRAMES_RENDERED: MF_MEDIA_ENGINE_STATISTIC = MF_MEDIA_ENGINE_STATISTIC(0i32);
pub const MF_MEDIA_ENGINE_STATISTIC_PLAYBACK_JITTER: MF_MEDIA_ENGINE_STATISTIC = MF_MEDIA_ENGINE_STATISTIC(5i32);
pub const MF_MEDIA_ENGINE_STATISTIC_TOTAL_FRAME_DELAY: MF_MEDIA_ENGINE_STATISTIC = MF_MEDIA_ENGINE_STATISTIC(7i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_MEDIA_ENGINE_STREAMTYPE_FAILED(pub i32);
pub const MF_MEDIA_ENGINE_STREAMTYPE_FAILED_AUDIO: MF_MEDIA_ENGINE_STREAMTYPE_FAILED = MF_MEDIA_ENGINE_STREAMTYPE_FAILED(1i32);
pub const MF_MEDIA_ENGINE_STREAMTYPE_FAILED_UNKNOWN: MF_MEDIA_ENGINE_STREAMTYPE_FAILED = MF_MEDIA_ENGINE_STREAMTYPE_FAILED(0i32);
pub const MF_MEDIA_ENGINE_STREAMTYPE_FAILED_VIDEO: MF_MEDIA_ENGINE_STREAMTYPE_FAILED = MF_MEDIA_ENGINE_STREAMTYPE_FAILED(2i32);
pub const MF_MEDIA_ENGINE_STREAM_CONTAINS_ALPHA_CHANNEL: windows_core::GUID = windows_core::GUID::from_u128(0x5cbfaf44_d2b2_4cfb_80a7_d429c74c789d);
pub const MF_MEDIA_ENGINE_SYNCHRONOUS_CLOSE: windows_core::GUID = windows_core::GUID::from_u128(0xc3c2e12f_7e0e_4e43_b91c_dc992ccdfa5e);
pub const MF_MEDIA_ENGINE_TELEMETRY_APPLICATION_ID: windows_core::GUID = windows_core::GUID::from_u128(0x1e7b273b_a7e4_402a_8f51_c48e88a2cabc);
pub const MF_MEDIA_ENGINE_TIMEDTEXT: windows_core::GUID = windows_core::GUID::from_u128(0x805ea411_92e0_4e59_9b6e_5c7d7915e64f);
pub const MF_MEDIA_ENGINE_TRACK_ID: windows_core::GUID = windows_core::GUID::from_u128(0x65bea312_4043_4815_8eab_44dce2ef8f2a);
pub const MF_MEDIA_ENGINE_USE_PMP_FOR_ALL_CONTENT: MF_MEDIA_ENGINE_PROTECTION_FLAGS = MF_MEDIA_ENGINE_PROTECTION_FLAGS(2i32);
pub const MF_MEDIA_ENGINE_USE_UNPROTECTED_PMP: MF_MEDIA_ENGINE_PROTECTION_FLAGS = MF_MEDIA_ENGINE_PROTECTION_FLAGS(4i32);
pub const MF_MEDIA_ENGINE_VIDEO_OUTPUT_FORMAT: windows_core::GUID = windows_core::GUID::from_u128(0x5066893c_8cf9_42bc_8b8a_472212e52726);
pub const MF_MEDIA_ENGINE_WAITFORSTABLE_STATE: MF_MEDIA_ENGINE_CREATEFLAGS = MF_MEDIA_ENGINE_CREATEFLAGS(2i32);
pub const MF_MEDIA_PROTECTION_MANAGER_PROPERTIES: windows_core::GUID = windows_core::GUID::from_u128(0x38bd81a9_acea_4c73_89b2_5532c0aeca79);
pub const MF_MEDIA_SHARING_ENGINE_DEVICE: windows_core::GUID = windows_core::GUID::from_u128(0xb461c58a_7a08_4b98_99a8_70fd5f3badfd);
pub const MF_MEDIA_SHARING_ENGINE_DEVICE_NAME: windows_core::GUID = windows_core::GUID::from_u128(0x771e05d1_862f_4299_95ac_ae81fd14f3e7);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_MEDIA_SHARING_ENGINE_EVENT(pub i32);
pub const MF_MEDIA_SHARING_ENGINE_EVENT_DISCONNECT: MF_MEDIA_SHARING_ENGINE_EVENT = MF_MEDIA_SHARING_ENGINE_EVENT(2000i32);
pub const MF_MEDIA_SHARING_ENGINE_INITIAL_SEEK_TIME: windows_core::GUID = windows_core::GUID::from_u128(0x6f3497f5_d528_4a4f_8dd7_db36657ec4c9);
pub const MF_METADATAFACIALEXPRESSION_SMILE: u32 = 1u32;
pub const MF_METADATATIMESTAMPS_DEVICE: u32 = 1u32;
pub const MF_METADATATIMESTAMPS_PRESENTATION: u32 = 2u32;
pub const MF_METADATA_PROVIDER_SERVICE: windows_core::GUID = windows_core::GUID::from_u128(0xdb214084_58a4_4d2e_b84f_6f755b2f7a0d);
pub const MF_MINCRYPT_FAILURE: u32 = 268435456u32;
pub const MF_MP2DLNA_AUDIO_BIT_RATE: windows_core::GUID = windows_core::GUID::from_u128(0x2d1c070e_2b5f_4ab3_a7e6_8d943ba8d00a);
pub const MF_MP2DLNA_ENCODE_QUALITY: windows_core::GUID = windows_core::GUID::from_u128(0xb52379d7_1d46_4fb6_a317_a4a5f60959f8);
pub const MF_MP2DLNA_STATISTICS: windows_core::GUID = windows_core::GUID::from_u128(0x75e488a3_d5ad_4898_85e0_bcce24a722d7);
pub const MF_MP2DLNA_USE_MMCSS: windows_core::GUID = windows_core::GUID::from_u128(0x54f3e2ee_a2a2_497d_9834_973afde521eb);
pub const MF_MP2DLNA_VIDEO_BIT_RATE: windows_core::GUID = windows_core::GUID::from_u128(0xe88548de_73b4_42d7_9c75_adfa0a2a6e4c);
pub const MF_MPEG4SINK_MAX_CODED_SEQUENCES_PER_FRAGMENT: windows_core::GUID = windows_core::GUID::from_u128(0xfc1b3bd6_692d_4ce5_9299_738aa5463e9a);
pub const MF_MPEG4SINK_MINIMUM_PROPERTIES_SIZE: windows_core::GUID = windows_core::GUID::from_u128(0xdca1ed52_450e_4a22_8c62_4ed452f7a187);
pub const MF_MPEG4SINK_MIN_FRAGMENT_DURATION: windows_core::GUID = windows_core::GUID::from_u128(0xa30b570c_8efd_45e8_94fe_27c84b5bdff6);
pub const MF_MPEG4SINK_MOOV_BEFORE_MDAT: windows_core::GUID = windows_core::GUID::from_u128(0xf672e3ac_e1e6_4f10_b5ec_5f3b30828816);
pub const MF_MPEG4SINK_SPSPPS_PASSTHROUGH: windows_core::GUID = windows_core::GUID::from_u128(0x5601a134_2005_4ad2_b37d_22a6c554deb2);
pub const MF_MSE_ACTIVELIST_CALLBACK: windows_core::GUID = windows_core::GUID::from_u128(0x949bda0f_4549_46d5_ad7f_b846e1ab1652);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_MSE_APPEND_MODE(pub i32);
pub const MF_MSE_APPEND_MODE_SEGMENTS: MF_MSE_APPEND_MODE = MF_MSE_APPEND_MODE(0i32);
pub const MF_MSE_APPEND_MODE_SEQUENCE: MF_MSE_APPEND_MODE = MF_MSE_APPEND_MODE(1i32);
pub const MF_MSE_BUFFERLIST_CALLBACK: windows_core::GUID = windows_core::GUID::from_u128(0x42e669b0_d60e_4afb_a85b_d8e5fe6bdab5);
pub const MF_MSE_CALLBACK: windows_core::GUID = windows_core::GUID::from_u128(0x9063a7c0_42c5_4ffd_a8a8_6fcf9ea3d00c);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_MSE_ERROR(pub i32);
pub const MF_MSE_ERROR_DECODE: MF_MSE_ERROR = MF_MSE_ERROR(2i32);
pub const MF_MSE_ERROR_NETWORK: MF_MSE_ERROR = MF_MSE_ERROR(1i32);
pub const MF_MSE_ERROR_NOERROR: MF_MSE_ERROR = MF_MSE_ERROR(0i32);
pub const MF_MSE_ERROR_UNKNOWN_ERROR: MF_MSE_ERROR = MF_MSE_ERROR(3i32);
pub const MF_MSE_OPUS_SUPPORT: windows_core::GUID = windows_core::GUID::from_u128(0x4d224cc1_8cc4_48a3_a7a7_e4c16ce6388a);
pub const MF_MSE_OPUS_SUPPORT_OFF: MF_MSE_OPUS_SUPPORT_TYPE = MF_MSE_OPUS_SUPPORT_TYPE(1i32);
pub const MF_MSE_OPUS_SUPPORT_ON: MF_MSE_OPUS_SUPPORT_TYPE = MF_MSE_OPUS_SUPPORT_TYPE(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_MSE_OPUS_SUPPORT_TYPE(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_MSE_READY(pub i32);
pub const MF_MSE_READY_CLOSED: MF_MSE_READY = MF_MSE_READY(1i32);
pub const MF_MSE_READY_ENDED: MF_MSE_READY = MF_MSE_READY(3i32);
pub const MF_MSE_READY_OPEN: MF_MSE_READY = MF_MSE_READY(2i32);
pub const MF_MSE_VP9_SUPPORT: windows_core::GUID = windows_core::GUID::from_u128(0x92d78429_d88b_4ff0_8322_803efa6e9626);
pub const MF_MSE_VP9_SUPPORT_DEFAULT: MF_MSE_VP9_SUPPORT_TYPE = MF_MSE_VP9_SUPPORT_TYPE(0i32);
pub const MF_MSE_VP9_SUPPORT_OFF: MF_MSE_VP9_SUPPORT_TYPE = MF_MSE_VP9_SUPPORT_TYPE(2i32);
pub const MF_MSE_VP9_SUPPORT_ON: MF_MSE_VP9_SUPPORT_TYPE = MF_MSE_VP9_SUPPORT_TYPE(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_MSE_VP9_SUPPORT_TYPE(pub i32);
pub const MF_MT_AAC_AUDIO_PROFILE_LEVEL_INDICATION: windows_core::GUID = windows_core::GUID::from_u128(0x7632f0e6_9538_4d61_acda_ea29c8c14456);
pub const MF_MT_AAC_PAYLOAD_TYPE: windows_core::GUID = windows_core::GUID::from_u128(0xbfbabe79_7434_4d1c_94f0_72a3b9e17188);
pub const MF_MT_ALL_SAMPLES_INDEPENDENT: windows_core::GUID = windows_core::GUID::from_u128(0xc9173739_5e56_461c_b713_46fb995cb95f);
pub const MF_MT_ALPHA_MODE: windows_core::GUID = windows_core::GUID::from_u128(0x5d959b0d_4cbf_4d04_919f_3f5f7f284211);
pub const MF_MT_AM_FORMAT_TYPE: windows_core::GUID = windows_core::GUID::from_u128(0x73d1072d_1870_4174_a063_29ff4ff6c11e);
pub const MF_MT_ARBITRARY_FORMAT: windows_core::GUID = windows_core::GUID::from_u128(0x5a75b249_0d7d_49a1_a1c3_e0d87f0cade5);
pub const MF_MT_ARBITRARY_HEADER: windows_core::GUID = windows_core::GUID::from_u128(0x9e6bd6f5_0109_4f95_84ac_9309153a19fc);
pub const MF_MT_AUDIO_AVG_BYTES_PER_SECOND: windows_core::GUID = windows_core::GUID::from_u128(0x1aab75c8_cfef_451c_ab95_ac034b8e1731);
pub const MF_MT_AUDIO_BITS_PER_SAMPLE: windows_core::GUID = windows_core::GUID::from_u128(0xf2deb57f_40fa_4764_aa33_ed4f2d1ff669);
pub const MF_MT_AUDIO_BLOCK_ALIGNMENT: windows_core::GUID = windows_core::GUID::from_u128(0x322de230_9eeb_43bd_ab7a_ff412251541d);
pub const MF_MT_AUDIO_CHANNEL_MASK: windows_core::GUID = windows_core::GUID::from_u128(0x55fb5765_644a_4caf_8479_938983bb1588);
pub const MF_MT_AUDIO_FLAC_MAX_BLOCK_SIZE: windows_core::GUID = windows_core::GUID::from_u128(0x8b81adae_4b5a_4d40_8022_f38d09ca3c5c);
pub const MF_MT_AUDIO_FLOAT_SAMPLES_PER_SECOND: windows_core::GUID = windows_core::GUID::from_u128(0xfb3b724a_cfb5_4319_aefe_6e42b2406132);
pub const MF_MT_AUDIO_FOLDDOWN_MATRIX: windows_core::GUID = windows_core::GUID::from_u128(0x9d62927c_36be_4cf2_b5c4_a3926e3e8711);
pub const MF_MT_AUDIO_NUM_CHANNELS: windows_core::GUID = windows_core::GUID::from_u128(0x37e48bf5_645e_4c5b_89de_ada9e29b696a);
pub const MF_MT_AUDIO_PREFER_WAVEFORMATEX: windows_core::GUID = windows_core::GUID::from_u128(0xa901aaba_e037_458a_bdf6_545be2074042);
pub const MF_MT_AUDIO_SAMPLES_PER_BLOCK: windows_core::GUID = windows_core::GUID::from_u128(0xaab15aac_e13a_4995_9222_501ea15c6877);
pub const MF_MT_AUDIO_SAMPLES_PER_SECOND: windows_core::GUID = windows_core::GUID::from_u128(0x5faeeae7_0290_4c31_9e8a_c534f68d9dba);
pub const MF_MT_AUDIO_VALID_BITS_PER_SAMPLE: windows_core::GUID = windows_core::GUID::from_u128(0xd9bf8d6a_9530_4b7c_9ddf_ff6fd58bbd06);
pub const MF_MT_AUDIO_WMADRC_AVGREF: windows_core::GUID = windows_core::GUID::from_u128(0x9d62927f_36be_4cf2_b5c4_a3926e3e8711);
pub const MF_MT_AUDIO_WMADRC_AVGTARGET: windows_core::GUID = windows_core::GUID::from_u128(0x9d629280_36be_4cf2_b5c4_a3926e3e8711);
pub const MF_MT_AUDIO_WMADRC_PEAKREF: windows_core::GUID = windows_core::GUID::from_u128(0x9d62927d_36be_4cf2_b5c4_a3926e3e8711);
pub const MF_MT_AUDIO_WMADRC_PEAKTARGET: windows_core::GUID = windows_core::GUID::from_u128(0x9d62927e_36be_4cf2_b5c4_a3926e3e8711);
pub const MF_MT_AVG_BITRATE: windows_core::GUID = windows_core::GUID::from_u128(0x20332624_fb0d_4d9e_bd0d_cbf6786c102e);
pub const MF_MT_AVG_BIT_ERROR_RATE: windows_core::GUID = windows_core::GUID::from_u128(0x799cabd6_3508_4db4_a3c7_569cd533deb1);
pub const MF_MT_COMPRESSED: windows_core::GUID = windows_core::GUID::from_u128(0x3afd0cee_18f2_4ba5_a110_8bea502e1f92);
pub const MF_MT_CONTAINER_RATE_SCALING: windows_core::GUID = windows_core::GUID::from_u128(0x83877f5e_0444_4e28_8479_6db0989b8c09);
pub const MF_MT_CUSTOM_VIDEO_PRIMARIES: windows_core::GUID = windows_core::GUID::from_u128(0x47537213_8cfb_4722_aa34_fbc9e24d77b8);
pub const MF_MT_D3D12_CPU_READBACK: windows_core::GUID = windows_core::GUID::from_u128(0x28ee9fe3_d481_46a6_b98a_7f69d5280e82);
pub const MF_MT_D3D12_RESOURCE_FLAG_ALLOW_CROSS_ADAPTER: windows_core::GUID = windows_core::GUID::from_u128(0xa6a1e439_2f96_4ab5_98dc_adf74973505d);
pub const MF_MT_D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL: windows_core::GUID = windows_core::GUID::from_u128(0xb1138dc3_01d5_4c14_9bdc_cdc9336f55b9);
pub const MF_MT_D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET: windows_core::GUID = windows_core::GUID::from_u128(0xeeac2585_3430_498c_84a2_77b1bba570f6);
pub const MF_MT_D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS: windows_core::GUID = windows_core::GUID::from_u128(0x0a4940b2_cfd6_4738_9d02_98113734015a);
pub const MF_MT_D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS: windows_core::GUID = windows_core::GUID::from_u128(0x82c85647_5057_4960_9559_f45b8e271427);
pub const MF_MT_D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE: windows_core::GUID = windows_core::GUID::from_u128(0xba06bfac_ffe3_474a_ab55_161ee4417a2e);
pub const MF_MT_D3D12_TEXTURE_LAYOUT: windows_core::GUID = windows_core::GUID::from_u128(0x97c85caa_0beb_4ee1_9715_f22fad8c10f5);
pub const MF_MT_D3D_RESOURCE_VERSION: windows_core::GUID = windows_core::GUID::from_u128(0x174f1e85_fe26_453d_b52e_5bdd4e55b944);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_MT_D3D_RESOURCE_VERSION_ENUM(pub i32);
pub const MF_MT_DECODER_MAX_DPB_COUNT: windows_core::GUID = windows_core::GUID::from_u128(0x67be144c_88b7_4ca9_9628_c808d5262217);
pub const MF_MT_DECODER_USE_MAX_RESOLUTION: windows_core::GUID = windows_core::GUID::from_u128(0x4c547c24_af9a_4f38_96ad_978773cf53e7);
pub const MF_MT_DEFAULT_STRIDE: windows_core::GUID = windows_core::GUID::from_u128(0x644b4e48_1e02_4516_b0eb_c01ca9d49ac6);
pub const MF_MT_DEPTH_MEASUREMENT: windows_core::GUID = windows_core::GUID::from_u128(0xfd5ac489_0917_4bb6_9d54_3122bf70144b);
pub const MF_MT_DEPTH_VALUE_UNIT: windows_core::GUID = windows_core::GUID::from_u128(0x21a800f5_3189_4797_beba_f13cd9a31a5e);
pub const MF_MT_DRM_FLAGS: windows_core::GUID = windows_core::GUID::from_u128(0x8772f323_355a_4cc7_bb78_6d61a048ae82);
pub const MF_MT_DV_AAUX_CTRL_PACK_0: windows_core::GUID = windows_core::GUID::from_u128(0xf731004e_1dd1_4515_aabe_f0c06aa536ac);
pub const MF_MT_DV_AAUX_CTRL_PACK_1: windows_core::GUID = windows_core::GUID::from_u128(0xcd1f470d_1f04_4fe0_bfb9_d07ae0386ad8);
pub const MF_MT_DV_AAUX_SRC_PACK_0: windows_core::GUID = windows_core::GUID::from_u128(0x84bd5d88_0fb8_4ac8_be4b_a8848bef98f3);
pub const MF_MT_DV_AAUX_SRC_PACK_1: windows_core::GUID = windows_core::GUID::from_u128(0x720e6544_0225_4003_a651_0196563a958e);
pub const MF_MT_DV_VAUX_CTRL_PACK: windows_core::GUID = windows_core::GUID::from_u128(0x2f84e1c4_0da1_4788_938e_0dfbfbb34b48);
pub const MF_MT_DV_VAUX_SRC_PACK: windows_core::GUID = windows_core::GUID::from_u128(0x41402d9d_7b57_43c6_b129_2cb997f15009);
pub const MF_MT_FIXED_SIZE_SAMPLES: windows_core::GUID = windows_core::GUID::from_u128(0xb8ebefaf_b718_4e04_b0a9_116775e3321b);
pub const MF_MT_FORWARD_CUSTOM_NALU: windows_core::GUID = windows_core::GUID::from_u128(0xed336efd_244f_428d_9153_28f399458890);
pub const MF_MT_FORWARD_CUSTOM_SEI: windows_core::GUID = windows_core::GUID::from_u128(0xe27362f1_b136_41d1_9594_3a7e4febf2d1);
pub const MF_MT_FRAME_RATE: windows_core::GUID = windows_core::GUID::from_u128(0xc459a2e8_3d2c_4e44_b132_fee5156c7bb0);
pub const MF_MT_FRAME_RATE_RANGE_MAX: windows_core::GUID = windows_core::GUID::from_u128(0xe3371d41_b4cf_4a05_bd4e_20b88bb2c4d6);
pub const MF_MT_FRAME_RATE_RANGE_MIN: windows_core::GUID = windows_core::GUID::from_u128(0xd2e7558c_dc1f_403f_9a72_d28bb1eb3b5e);
pub const MF_MT_FRAME_SIZE: windows_core::GUID = windows_core::GUID::from_u128(0x1652c33d_d6b2_4012_b834_72030849a37d);
pub const MF_MT_GEOMETRIC_APERTURE: windows_core::GUID = windows_core::GUID::from_u128(0x66758743_7e5f_400d_980a_aa8596c85696);
pub const MF_MT_H264_CAPABILITIES: windows_core::GUID = windows_core::GUID::from_u128(0xbb3bd508_490a_11e0_99e4_1316dfd72085);
pub const MF_MT_H264_LAYOUT_PER_STREAM: windows_core::GUID = windows_core::GUID::from_u128(0x85e299b2_90e3_4fe8_b2f5_c067e0bfe57a);
pub const MF_MT_H264_MAX_CODEC_CONFIG_DELAY: windows_core::GUID = windows_core::GUID::from_u128(0xf5929986_4c45_4fbb_bb49_6cc534d05b9b);
pub const MF_MT_H264_MAX_MB_PER_SEC: windows_core::GUID = windows_core::GUID::from_u128(0x45256d30_7215_4576_9336_b0f1bcd59bb2);
pub const MF_MT_H264_RATE_CONTROL_MODES: windows_core::GUID = windows_core::GUID::from_u128(0x705177d8_45cb_11e0_ac7d_b91ce0d72085);
pub const MF_MT_H264_RESOLUTION_SCALING: windows_core::GUID = windows_core::GUID::from_u128(0xe3854272_f715_4757_ba90_1b696c773457);
pub const MF_MT_H264_SIMULCAST_SUPPORT: windows_core::GUID = windows_core::GUID::from_u128(0x9ea2d63d_53f0_4a34_b94e_9de49a078cb3);
pub const MF_MT_H264_SUPPORTED_RATE_CONTROL_MODES: windows_core::GUID = windows_core::GUID::from_u128(0x6a8ac47e_519c_4f18_9bb3_7eeaaea5594d);
pub const MF_MT_H264_SUPPORTED_SLICE_MODES: windows_core::GUID = windows_core::GUID::from_u128(0xc8be1937_4d64_4549_8343_a8086c0bfda5);
pub const MF_MT_H264_SUPPORTED_SYNC_FRAME_TYPES: windows_core::GUID = windows_core::GUID::from_u128(0x89a52c01_f282_48d2_b522_22e6ae633199);
pub const MF_MT_H264_SUPPORTED_USAGES: windows_core::GUID = windows_core::GUID::from_u128(0x60b1a998_dc01_40ce_9736_aba845a2dbdc);
pub const MF_MT_H264_SVC_CAPABILITIES: windows_core::GUID = windows_core::GUID::from_u128(0xf8993abe_d937_4a8f_bbca_6966fe9e1152);
pub const MF_MT_H264_USAGE: windows_core::GUID = windows_core::GUID::from_u128(0x359ce3a5_af00_49ca_a2f4_2ac94ca82b61);
pub const MF_MT_IMAGE_LOSS_TOLERANT: windows_core::GUID = windows_core::GUID::from_u128(0xed062cf4_e34e_4922_be99_934032133d7c);
pub const MF_MT_INTERLACE_MODE: windows_core::GUID = windows_core::GUID::from_u128(0xe2724bb8_e676_4806_b4b2_a8d6efb44ccd);
pub const MF_MT_IN_BAND_PARAMETER_SET: windows_core::GUID = windows_core::GUID::from_u128(0x75da5090_910b_4a03_896c_7b898feea5af);
pub const MF_MT_MAJOR_TYPE: windows_core::GUID = windows_core::GUID::from_u128(0x48eba18e_f8c9_4687_bf11_0a74c9f96a8f);
pub const MF_MT_MAX_FRAME_AVERAGE_LUMINANCE_LEVEL: windows_core::GUID = windows_core::GUID::from_u128(0x58d4bf57_6f52_4733_a195_a9e29ecf9e27);
pub const MF_MT_MAX_KEYFRAME_SPACING: windows_core::GUID = windows_core::GUID::from_u128(0xc16eb52b_73a1_476f_8d62_839d6a020652);
pub const MF_MT_MAX_LUMINANCE_LEVEL: windows_core::GUID = windows_core::GUID::from_u128(0x50253128_c110_4de4_98ae_46a324fae6da);
pub const MF_MT_MAX_MASTERING_LUMINANCE: windows_core::GUID = windows_core::GUID::from_u128(0xd6c6b997_272f_4ca1_8d00_8042111a0ff6);
pub const MF_MT_MINIMUM_DISPLAY_APERTURE: windows_core::GUID = windows_core::GUID::from_u128(0xd7388766_18fe_48c6_a177_ee894867c8c4);
pub const MF_MT_MIN_MASTERING_LUMINANCE: windows_core::GUID = windows_core::GUID::from_u128(0x839a4460_4e7e_4b4f_ae79_cc08905c7b27);
pub const MF_MT_MPEG2_CONTENT_PACKET: windows_core::GUID = windows_core::GUID::from_u128(0x825d55e4_4f12_4197_9eb3_59b6e4710f06);
pub const MF_MT_MPEG2_FLAGS: windows_core::GUID = windows_core::GUID::from_u128(0x31e3991d_f701_4b2f_b426_8ae3bda9e04b);
pub const MF_MT_MPEG2_HDCP: windows_core::GUID = windows_core::GUID::from_u128(0x168f1b4a_3e91_450f_aea7_e4baeadae5ba);
pub const MF_MT_MPEG2_LEVEL: windows_core::GUID = windows_core::GUID::from_u128(0x96f66574_11c5_4015_8666_bff516436da7);
pub const MF_MT_MPEG2_ONE_FRAME_PER_PACKET: windows_core::GUID = windows_core::GUID::from_u128(0x91a49eb5_1d20_4b42_ace8_804269bf95ed);
pub const MF_MT_MPEG2_PROFILE: windows_core::GUID = windows_core::GUID::from_u128(0xad76a80b_2d5c_4e0b_b375_64e520137036);
pub const MF_MT_MPEG2_STANDARD: windows_core::GUID = windows_core::GUID::from_u128(0xa20af9e8_928a_4b26_aaa9_f05c74cac47c);
pub const MF_MT_MPEG2_TIMECODE: windows_core::GUID = windows_core::GUID::from_u128(0x5229ba10_e29d_4f80_a59c_df4f180207d2);
pub const MF_MT_MPEG4_CURRENT_SAMPLE_ENTRY: windows_core::GUID = windows_core::GUID::from_u128(0x9aa7e155_b64a_4c1d_a500_455d600b6560);
pub const MF_MT_MPEG4_SAMPLE_DESCRIPTION: windows_core::GUID = windows_core::GUID::from_u128(0x261e9d83_9529_4b8f_a111_8b9c950a81a9);
pub const MF_MT_MPEG4_TRACK_TYPE: windows_core::GUID = windows_core::GUID::from_u128(0x54f486dd_9327_4f6d_80ab_6f709ebb4cce);
pub const MF_MT_MPEG_SEQUENCE_HEADER: windows_core::GUID = windows_core::GUID::from_u128(0x3c036de7_3ad0_4c9e_9216_ee6d6ac21cb3);
pub const MF_MT_MPEG_START_TIME_CODE: windows_core::GUID = windows_core::GUID::from_u128(0x91f67885_4333_4280_97cd_bd5a6c03a06e);
pub const MF_MT_ORIGINAL_4CC: windows_core::GUID = windows_core::GUID::from_u128(0xd7be3fe0_2bc7_492d_b843_61a1919b70c3);
pub const MF_MT_ORIGINAL_WAVE_FORMAT_TAG: windows_core::GUID = windows_core::GUID::from_u128(0x8cbbc843_9fd9_49c2_882f_a72586c408ad);
pub const MF_MT_OUTPUT_BUFFER_NUM: windows_core::GUID = windows_core::GUID::from_u128(0xa505d3ac_f930_436e_8ede_93a509ce23b2);
pub const MF_MT_PAD_CONTROL_FLAGS: windows_core::GUID = windows_core::GUID::from_u128(0x4d0e73e5_80ea_4354_a9d0_1176ceb028ea);
pub const MF_MT_PALETTE: windows_core::GUID = windows_core::GUID::from_u128(0x6d283f42_9846_4410_afd9_654d503b1a54);
pub const MF_MT_PAN_SCAN_APERTURE: windows_core::GUID = windows_core::GUID::from_u128(0x79614dde_9187_48fb_b8c7_4d52689de649);
pub const MF_MT_PAN_SCAN_ENABLED: windows_core::GUID = windows_core::GUID::from_u128(0x4b7f6bc3_8b13_40b2_a993_abf630b8204e);
pub const MF_MT_PIXEL_ASPECT_RATIO: windows_core::GUID = windows_core::GUID::from_u128(0xc6376a1e_8d0a_4027_be45_6d9a0ad39bb6);
pub const MF_MT_REALTIME_CONTENT: windows_core::GUID = windows_core::GUID::from_u128(0xbb12d222_2bdb_425e_91ec_2308e189a58f);
pub const MF_MT_SAMPLE_SIZE: windows_core::GUID = windows_core::GUID::from_u128(0xdad3ab78_1990_408b_bce2_eba673dacc10);
pub const MF_MT_SECURE: windows_core::GUID = windows_core::GUID::from_u128(0xc5acc4fd_0304_4ecf_809f_47bc97ff63bd);
pub const MF_MT_SOURCE_CONTENT_HINT: windows_core::GUID = windows_core::GUID::from_u128(0x68aca3cc_22d0_44e6_85f8_28167197fa38);
pub const MF_MT_SPATIAL_AUDIO_DATA_PRESENT: windows_core::GUID = windows_core::GUID::from_u128(0x6842f6e7_d43e_4ebb_9c9c_c96f41784863);
pub const MF_MT_SPATIAL_AUDIO_MAX_DYNAMIC_OBJECTS: windows_core::GUID = windows_core::GUID::from_u128(0xdcfba24a_2609_4240_a721_3faea76a4df9);
pub const MF_MT_SPATIAL_AUDIO_MAX_METADATA_ITEMS: windows_core::GUID = windows_core::GUID::from_u128(0x11aa80b4_e0da_47c6_8060_96c1259ae50d);
pub const MF_MT_SPATIAL_AUDIO_MIN_METADATA_ITEM_OFFSET_SPACING: windows_core::GUID = windows_core::GUID::from_u128(0x83e96ec9_1184_417e_8254_9f269158fc06);
pub const MF_MT_SPATIAL_AUDIO_OBJECT_METADATA_FORMAT_ID: windows_core::GUID = windows_core::GUID::from_u128(0x2ab71bc0_6223_4ba7_ad64_7b94b47ae792);
pub const MF_MT_SPATIAL_AUDIO_OBJECT_METADATA_LENGTH: windows_core::GUID = windows_core::GUID::from_u128(0x094ba8be_d723_489f_92fa_766777b34726);
pub const MF_MT_SUBTYPE: windows_core::GUID = windows_core::GUID::from_u128(0xf7e34c9a_42e8_4714_b74b_cb29d72c35e5);
pub const MF_MT_TIMESTAMP_CAN_BE_DTS: windows_core::GUID = windows_core::GUID::from_u128(0x24974215_1b7b_41e4_8625_ac469f2dedaa);
pub const MF_MT_TRANSFER_FUNCTION: windows_core::GUID = windows_core::GUID::from_u128(0x5fb0fce9_be5c_4935_a811_ec838f8eed93);
pub const MF_MT_USER_DATA: windows_core::GUID = windows_core::GUID::from_u128(0xb6bc765f_4c3b_40a4_bd51_2535b66fe09d);
pub const MF_MT_VIDEO_3D: windows_core::GUID = windows_core::GUID::from_u128(0xcb5e88cf_7b5b_476b_85aa_1ca5ae187555);
pub const MF_MT_VIDEO_3D_FIRST_IS_LEFT: windows_core::GUID = windows_core::GUID::from_u128(0xec298493_0ada_4ea1_a4fe_cbbd36ce9331);
pub const MF_MT_VIDEO_3D_FORMAT: windows_core::GUID = windows_core::GUID::from_u128(0x5315d8a0_87c5_4697_b793_6606c67c049b);
pub const MF_MT_VIDEO_3D_LEFT_IS_BASE: windows_core::GUID = windows_core::GUID::from_u128(0x6d4b7bff_5629_4404_948c_c634f4ce26d4);
pub const MF_MT_VIDEO_3D_NUM_VIEWS: windows_core::GUID = windows_core::GUID::from_u128(0xbb077e8a_dcbf_42eb_af60_418df98aa495);
pub const MF_MT_VIDEO_CHROMA_SITING: windows_core::GUID = windows_core::GUID::from_u128(0x65df2370_c773_4c33_aa64_843e068efb0c);
pub const MF_MT_VIDEO_H264_NO_FMOASO: windows_core::GUID = windows_core::GUID::from_u128(0xed461cd6_ec9f_416a_a8a3_26d7d31018d7);
pub const MF_MT_VIDEO_LEVEL: windows_core::GUID = windows_core::GUID::from_u128(0x96f66574_11c5_4015_8666_bff516436da7);
pub const MF_MT_VIDEO_LIGHTING: windows_core::GUID = windows_core::GUID::from_u128(0x53a0529c_890b_4216_8bf9_599367ad6d20);
pub const MF_MT_VIDEO_NOMINAL_RANGE: windows_core::GUID = windows_core::GUID::from_u128(0xc21b8ee5_b956_4071_8daf_325edf5cab11);
pub const MF_MT_VIDEO_NO_FRAME_ORDERING: windows_core::GUID = windows_core::GUID::from_u128(0x3f5b106f_6bc2_4ee3_b7ed_8902c18f5351);
pub const MF_MT_VIDEO_PRIMARIES: windows_core::GUID = windows_core::GUID::from_u128(0xdbfbe4d7_0740_4ee0_8192_850ab0e21935);
pub const MF_MT_VIDEO_PROFILE: windows_core::GUID = windows_core::GUID::from_u128(0xad76a80b_2d5c_4e0b_b375_64e520137036);
pub const MF_MT_VIDEO_RENDERER_EXTENSION_PROFILE: windows_core::GUID = windows_core::GUID::from_u128(0x8437d4b9_d448_4fcd_9b6b_839bf96c7798);
pub const MF_MT_VIDEO_ROTATION: windows_core::GUID = windows_core::GUID::from_u128(0xc380465d_2271_428c_9b83_ecea3b4a85c1);
pub const MF_MT_WRAPPED_TYPE: windows_core::GUID = windows_core::GUID::from_u128(0x4d3f7b23_d02f_4e6c_9bee_e4bf2c6c695d);
pub const MF_MT_YUV_MATRIX: windows_core::GUID = windows_core::GUID::from_u128(0x3e23d450_2c75_4d25_a00e_b91670d12327);
pub const MF_MULTITHREADED_WORKQUEUE: MFASYNC_WORKQUEUE_TYPE = MFASYNC_WORKQUEUE_TYPE(2i32);
pub const MF_NALU_LENGTH_INFORMATION: windows_core::GUID = windows_core::GUID::from_u128(0x19124e7c_ad4b_465f_bb18_20186287b6af);
pub const MF_NALU_LENGTH_SET: windows_core::GUID = windows_core::GUID::from_u128(0xa7911d53_12a4_4965_ae70_6eadd6ff0551);
pub const MF_NOT_FOUND_ERR: u32 = 2154823688u32;
pub const MF_NOT_SUPPORTED_ERR: u32 = 2154823689u32;
pub const MF_NUM_DROP_MODES: MF_QUALITY_DROP_MODE = MF_QUALITY_DROP_MODE(6i32);
pub const MF_NUM_QUALITY_LEVELS: MF_QUALITY_LEVEL = MF_QUALITY_LEVEL(6i32);
pub const MF_OBJECT_BYTESTREAM: MF_OBJECT_TYPE = MF_OBJECT_TYPE(1i32);
pub const MF_OBJECT_INVALID: MF_OBJECT_TYPE = MF_OBJECT_TYPE(2i32);
pub const MF_OBJECT_MEDIASOURCE: MF_OBJECT_TYPE = MF_OBJECT_TYPE(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_OBJECT_TYPE(pub i32);
pub const MF_OPENMODE_APPEND_IF_EXIST: MF_FILE_OPENMODE = MF_FILE_OPENMODE(3i32);
pub const MF_OPENMODE_DELETE_IF_EXIST: MF_FILE_OPENMODE = MF_FILE_OPENMODE(4i32);
pub const MF_OPENMODE_FAIL_IF_EXIST: MF_FILE_OPENMODE = MF_FILE_OPENMODE(1i32);
pub const MF_OPENMODE_FAIL_IF_NOT_EXIST: MF_FILE_OPENMODE = MF_FILE_OPENMODE(0i32);
pub const MF_OPENMODE_RESET_IF_EXIST: MF_FILE_OPENMODE = MF_FILE_OPENMODE(2i32);
pub const MF_OPM_ACP_LEVEL_ONE: MF_OPM_ACP_PROTECTION_LEVEL = MF_OPM_ACP_PROTECTION_LEVEL(1i32);
pub const MF_OPM_ACP_LEVEL_THREE: MF_OPM_ACP_PROTECTION_LEVEL = MF_OPM_ACP_PROTECTION_LEVEL(3i32);
pub const MF_OPM_ACP_LEVEL_TWO: MF_OPM_ACP_PROTECTION_LEVEL = MF_OPM_ACP_PROTECTION_LEVEL(2i32);
pub const MF_OPM_ACP_OFF: MF_OPM_ACP_PROTECTION_LEVEL = MF_OPM_ACP_PROTECTION_LEVEL(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_OPM_ACP_PROTECTION_LEVEL(pub i32);
pub const MF_OPM_CGMSA_COPY_FREELY: MF_OPM_CGMSA_PROTECTION_LEVEL = MF_OPM_CGMSA_PROTECTION_LEVEL(1i32);
pub const MF_OPM_CGMSA_COPY_NEVER: MF_OPM_CGMSA_PROTECTION_LEVEL = MF_OPM_CGMSA_PROTECTION_LEVEL(4i32);
pub const MF_OPM_CGMSA_COPY_NO_MORE: MF_OPM_CGMSA_PROTECTION_LEVEL = MF_OPM_CGMSA_PROTECTION_LEVEL(2i32);
pub const MF_OPM_CGMSA_COPY_ONE_GENERATION: MF_OPM_CGMSA_PROTECTION_LEVEL = MF_OPM_CGMSA_PROTECTION_LEVEL(3i32);
pub const MF_OPM_CGMSA_OFF: MF_OPM_CGMSA_PROTECTION_LEVEL = MF_OPM_CGMSA_PROTECTION_LEVEL(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_OPM_CGMSA_PROTECTION_LEVEL(pub i32);
pub const MF_OPM_CGMSA_REDISTRIBUTION_CONTROL_REQUIRED: MF_OPM_CGMSA_PROTECTION_LEVEL = MF_OPM_CGMSA_PROTECTION_LEVEL(8i32);
pub const MF_OPTIONAL_NODE_REJECTED_MEDIA_TYPE: MF_TOPOLOGY_RESOLUTION_STATUS_FLAGS = MF_TOPOLOGY_RESOLUTION_STATUS_FLAGS(1i32);
pub const MF_OPTIONAL_NODE_REJECTED_PROTECTED_PROCESS: MF_TOPOLOGY_RESOLUTION_STATUS_FLAGS = MF_TOPOLOGY_RESOLUTION_STATUS_FLAGS(2i32);
pub const MF_PARSE_ERR: u32 = 2154823761u32;
pub const MF_PD_ADAPTIVE_STREAMING: windows_core::GUID = windows_core::GUID::from_u128(0xea0d5d97_29f9_488b_ae6b_7d6b4136112b);
pub const MF_PD_APP_CONTEXT: windows_core::GUID = windows_core::GUID::from_u128(0x6c990d32_bb8e_477a_8598_0d5d96fcd88a);
pub const MF_PD_ASF_CODECLIST: windows_core::GUID = windows_core::GUID::from_u128(0xe4bb3509_c18d_4df1_bb99_7a36b3cc4119);
pub const MF_PD_ASF_CONTENTENCRYPTIONEX_ENCRYPTION_DATA: windows_core::GUID = windows_core::GUID::from_u128(0x62508be5_ecdf_4924_a359_72bab3397b9d);
pub const MF_PD_ASF_CONTENTENCRYPTION_KEYID: windows_core::GUID = windows_core::GUID::from_u128(0x8520fe3e_277e_46ea_99e4_e30a86db12be);
pub const MF_PD_ASF_CONTENTENCRYPTION_LICENSE_URL: windows_core::GUID = windows_core::GUID::from_u128(0x8520fe40_277e_46ea_99e4_e30a86db12be);
pub const MF_PD_ASF_CONTENTENCRYPTION_SECRET_DATA: windows_core::GUID = windows_core::GUID::from_u128(0x8520fe3f_277e_46ea_99e4_e30a86db12be);
pub const MF_PD_ASF_CONTENTENCRYPTION_TYPE: windows_core::GUID = windows_core::GUID::from_u128(0x8520fe3d_277e_46ea_99e4_e30a86db12be);
pub const MF_PD_ASF_DATA_LENGTH: windows_core::GUID = windows_core::GUID::from_u128(0xe7d5b3e8_1f29_45d3_8822_3e78fae272ed);
pub const MF_PD_ASF_DATA_START_OFFSET: windows_core::GUID = windows_core::GUID::from_u128(0xe7d5b3e7_1f29_45d3_8822_3e78fae272ed);
pub const MF_PD_ASF_FILEPROPERTIES_CREATION_TIME: windows_core::GUID = windows_core::GUID::from_u128(0x3de649b6_d76d_4e66_9ec9_78120fb4c7e3);
pub const MF_PD_ASF_FILEPROPERTIES_FILE_ID: windows_core::GUID = windows_core::GUID::from_u128(0x3de649b4_d76d_4e66_9ec9_78120fb4c7e3);
pub const MF_PD_ASF_FILEPROPERTIES_FLAGS: windows_core::GUID = windows_core::GUID::from_u128(0x3de649bb_d76d_4e66_9ec9_78120fb4c7e3);
pub const MF_PD_ASF_FILEPROPERTIES_MAX_BITRATE: windows_core::GUID = windows_core::GUID::from_u128(0x3de649be_d76d_4e66_9ec9_78120fb4c7e3);
pub const MF_PD_ASF_FILEPROPERTIES_MAX_PACKET_SIZE: windows_core::GUID = windows_core::GUID::from_u128(0x3de649bd_d76d_4e66_9ec9_78120fb4c7e3);
pub const MF_PD_ASF_FILEPROPERTIES_MIN_PACKET_SIZE: windows_core::GUID = windows_core::GUID::from_u128(0x3de649bc_d76d_4e66_9ec9_78120fb4c7e3);
pub const MF_PD_ASF_FILEPROPERTIES_PACKETS: windows_core::GUID = windows_core::GUID::from_u128(0x3de649b7_d76d_4e66_9ec9_78120fb4c7e3);
pub const MF_PD_ASF_FILEPROPERTIES_PLAY_DURATION: windows_core::GUID = windows_core::GUID::from_u128(0x3de649b8_d76d_4e66_9ec9_78120fb4c7e3);
pub const MF_PD_ASF_FILEPROPERTIES_PREROLL: windows_core::GUID = windows_core::GUID::from_u128(0x3de649ba_d76d_4e66_9ec9_78120fb4c7e3);
pub const MF_PD_ASF_FILEPROPERTIES_SEND_DURATION: windows_core::GUID = windows_core::GUID::from_u128(0x3de649b9_d76d_4e66_9ec9_78120fb4c7e3);
pub const MF_PD_ASF_INFO_HAS_AUDIO: windows_core::GUID = windows_core::GUID::from_u128(0x80e62295_2296_4a44_b31c_d103c6fed23c);
pub const MF_PD_ASF_INFO_HAS_NON_AUDIO_VIDEO: windows_core::GUID = windows_core::GUID::from_u128(0x80e62297_2296_4a44_b31c_d103c6fed23c);
pub const MF_PD_ASF_INFO_HAS_VIDEO: windows_core::GUID = windows_core::GUID::from_u128(0x80e62296_2296_4a44_b31c_d103c6fed23c);
pub const MF_PD_ASF_LANGLIST: windows_core::GUID = windows_core::GUID::from_u128(0xf23de43c_9977_460d_a6ec_32937f160f7d);
pub const MF_PD_ASF_LANGLIST_LEGACYORDER: windows_core::GUID = windows_core::GUID::from_u128(0xf23de43d_9977_460d_a6ec_32937f160f7d);
pub const MF_PD_ASF_MARKER: windows_core::GUID = windows_core::GUID::from_u128(0x5134330e_83a6_475e_a9d5_4fb875fb2e31);
pub const MF_PD_ASF_METADATA_IS_VBR: windows_core::GUID = windows_core::GUID::from_u128(0x5fc6947a_ef60_445d_b449_442ecc78b4c1);
pub const MF_PD_ASF_METADATA_LEAKY_BUCKET_PAIRS: windows_core::GUID = windows_core::GUID::from_u128(0x5fc6947d_ef60_445d_b449_442ecc78b4c1);
pub const MF_PD_ASF_METADATA_V8_BUFFERAVERAGE: windows_core::GUID = windows_core::GUID::from_u128(0x5fc6947c_ef60_445d_b449_442ecc78b4c1);
pub const MF_PD_ASF_METADATA_V8_VBRPEAK: windows_core::GUID = windows_core::GUID::from_u128(0x5fc6947b_ef60_445d_b449_442ecc78b4c1);
pub const MF_PD_ASF_SCRIPT: windows_core::GUID = windows_core::GUID::from_u128(0xe29cd0d7_d602_4923_a7fe_73fd97ecc650);
pub const MF_PD_AUDIO_ENCODING_BITRATE: windows_core::GUID = windows_core::GUID::from_u128(0x6c990d35_bb8e_477a_8598_0d5d96fcd88a);
pub const MF_PD_AUDIO_ISVARIABLEBITRATE: windows_core::GUID = windows_core::GUID::from_u128(0x33026ee0_e387_4582_ae0a_34a2ad3baa18);
pub const MF_PD_DURATION: windows_core::GUID = windows_core::GUID::from_u128(0x6c990d33_bb8e_477a_8598_0d5d96fcd88a);
pub const MF_PD_LAST_MODIFIED_TIME: windows_core::GUID = windows_core::GUID::from_u128(0x6c990d38_bb8e_477a_8598_0d5d96fcd88a);
pub const MF_PD_MIME_TYPE: windows_core::GUID = windows_core::GUID::from_u128(0x6c990d37_bb8e_477a_8598_0d5d96fcd88a);
pub const MF_PD_PLAYBACK_BOUNDARY_TIME: windows_core::GUID = windows_core::GUID::from_u128(0x6c990d3b_bb8e_477a_8598_0d5d96fcd88a);
pub const MF_PD_PLAYBACK_ELEMENT_ID: windows_core::GUID = windows_core::GUID::from_u128(0x6c990d39_bb8e_477a_8598_0d5d96fcd88a);
pub const MF_PD_PMPHOST_CONTEXT: windows_core::GUID = windows_core::GUID::from_u128(0x6c990d31_bb8e_477a_8598_0d5d96fcd88a);
pub const MF_PD_PREFERRED_LANGUAGE: windows_core::GUID = windows_core::GUID::from_u128(0x6c990d3a_bb8e_477a_8598_0d5d96fcd88a);
pub const MF_PD_SAMI_STYLELIST: windows_core::GUID = windows_core::GUID::from_u128(0xe0b73c7f_486d_484e_9872_4de5192a7bf8);
pub const MF_PD_TOTAL_FILE_SIZE: windows_core::GUID = windows_core::GUID::from_u128(0x6c990d34_bb8e_477a_8598_0d5d96fcd88a);
pub const MF_PD_VIDEO_ENCODING_BITRATE: windows_core::GUID = windows_core::GUID::from_u128(0x6c990d36_bb8e_477a_8598_0d5d96fcd88a);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_PLUGIN_CONTROL_POLICY(pub i32);
pub const MF_PLUGIN_CONTROL_POLICY_USE_ALL_PLUGINS: MF_PLUGIN_CONTROL_POLICY = MF_PLUGIN_CONTROL_POLICY(0i32);
pub const MF_PLUGIN_CONTROL_POLICY_USE_APPROVED_PLUGINS: MF_PLUGIN_CONTROL_POLICY = MF_PLUGIN_CONTROL_POLICY(1i32);
pub const MF_PLUGIN_CONTROL_POLICY_USE_WEB_PLUGINS: MF_PLUGIN_CONTROL_POLICY = MF_PLUGIN_CONTROL_POLICY(2i32);
pub const MF_PLUGIN_CONTROL_POLICY_USE_WEB_PLUGINS_EDGEMODE: MF_PLUGIN_CONTROL_POLICY = MF_PLUGIN_CONTROL_POLICY(3i32);
pub const MF_PMP_SERVER_CONTEXT: windows_core::GUID = windows_core::GUID::from_u128(0x2f00c910_d2cf_4278_8b6a_d077fac3a25f);
pub const MF_POLICY_ID: windows_core::GUID = windows_core::GUID::from_u128(0xb160c24d_c059_48f1_a901_9ee298a9a8c3);
pub const MF_PREFERRED_SOURCE_URI: windows_core::GUID = windows_core::GUID::from_u128(0x5fc85488_436a_4db8_90af_4db402ae5c57);
pub const MF_PROGRESSIVE_CODING_CONTENT: windows_core::GUID = windows_core::GUID::from_u128(0x8f020eea_1508_471f_9da6_507d7cfa40db);
pub const MF_PROPERTY_HANDLER_SERVICE: windows_core::GUID = windows_core::GUID::from_u128(0xa3face02_32b8_41dd_90e7_5fef7c8991b5);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_Plugin_Type(pub i32);
pub const MF_Plugin_Type_MFT: MF_Plugin_Type = MF_Plugin_Type(0i32);
pub const MF_Plugin_Type_MFT_MatchOutputType: MF_Plugin_Type = MF_Plugin_Type(2i32);
pub const MF_Plugin_Type_MediaSource: MF_Plugin_Type = MF_Plugin_Type(1i32);
pub const MF_Plugin_Type_Other: MF_Plugin_Type = MF_Plugin_Type(-1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_QUALITY_ADVISE_FLAGS(pub i32);
pub const MF_QUALITY_CANNOT_KEEP_UP: MF_QUALITY_ADVISE_FLAGS = MF_QUALITY_ADVISE_FLAGS(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_QUALITY_DROP_MODE(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_QUALITY_LEVEL(pub i32);
pub const MF_QUALITY_NORMAL: MF_QUALITY_LEVEL = MF_QUALITY_LEVEL(0i32);
pub const MF_QUALITY_NORMAL_MINUS_1: MF_QUALITY_LEVEL = MF_QUALITY_LEVEL(1i32);
pub const MF_QUALITY_NORMAL_MINUS_2: MF_QUALITY_LEVEL = MF_QUALITY_LEVEL(2i32);
pub const MF_QUALITY_NORMAL_MINUS_3: MF_QUALITY_LEVEL = MF_QUALITY_LEVEL(3i32);
pub const MF_QUALITY_NORMAL_MINUS_4: MF_QUALITY_LEVEL = MF_QUALITY_LEVEL(4i32);
pub const MF_QUALITY_NORMAL_MINUS_5: MF_QUALITY_LEVEL = MF_QUALITY_LEVEL(5i32);
pub const MF_QUALITY_NOTIFY_PROCESSING_LATENCY: windows_core::GUID = windows_core::GUID::from_u128(0xf6b44af8_604d_46fe_a95d_45479b10c9bc);
pub const MF_QUALITY_NOTIFY_SAMPLE_LAG: windows_core::GUID = windows_core::GUID::from_u128(0x30d15206_ed2a_4760_be17_eb4a9f12295c);
pub const MF_QUALITY_SERVICES: windows_core::GUID = windows_core::GUID::from_u128(0xb7e2be11_2f96_4640_b52c_282365bdf16c);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MF_QUATERNION {
pub x: f32,
pub y: f32,
pub z: f32,
pub w: f32,
}
pub const MF_QUOTA_EXCEEDED_ERR: u32 = 2154823702u32;
pub const MF_RATE_CONTROL_SERVICE: windows_core::GUID = windows_core::GUID::from_u128(0x866fa297_b802_4bf8_9dc9_5e3b6a9f53c9);
pub const MF_READWRITE_D3D_OPTIONAL: windows_core::GUID = windows_core::GUID::from_u128(0x216479d9_3071_42ca_bb6c_4c22102e1d18);
pub const MF_READWRITE_DISABLE_CONVERTERS: windows_core::GUID = windows_core::GUID::from_u128(0x98d5b065_1374_4847_8d5d_31520fee7156);
pub const MF_READWRITE_ENABLE_AUTOFINALIZE: windows_core::GUID = windows_core::GUID::from_u128(0xdd7ca129_8cd1_4dc5_9dde_ce168675de61);
pub const MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS: windows_core::GUID = windows_core::GUID::from_u128(0xa634a91c_822b_41b9_a494_4de4643612b0);
pub const MF_READWRITE_MMCSS_CLASS: windows_core::GUID = windows_core::GUID::from_u128(0x39384300_d0eb_40b1_87a0_3318871b5a53);
pub const MF_READWRITE_MMCSS_CLASS_AUDIO: windows_core::GUID = windows_core::GUID::from_u128(0x430847da_0890_4b0e_938c_054332c547e1);
pub const MF_READWRITE_MMCSS_PRIORITY: windows_core::GUID = windows_core::GUID::from_u128(0x43ad19ce_f33f_4ba9_a580_e4cd12f2d144);
pub const MF_READWRITE_MMCSS_PRIORITY_AUDIO: windows_core::GUID = windows_core::GUID::from_u128(0x273db885_2de2_4db2_a6a7_fdb66fb40b61);
pub const MF_REMOTE_PROXY: windows_core::GUID = windows_core::GUID::from_u128(0x2f00c90e_d2cf_4278_8b6a_d077fac3a25f);
pub const MF_RESOLUTION_BYTESTREAM: MF_RESOLUTION_FLAGS = MF_RESOLUTION_FLAGS(2i32);
pub const MF_RESOLUTION_CONTENT_DOES_NOT_HAVE_TO_MATCH_EXTENSION_OR_MIME_TYPE: MF_RESOLUTION_FLAGS = MF_RESOLUTION_FLAGS(16i32);
pub const MF_RESOLUTION_DISABLE_LOCAL_PLUGINS: MF_RESOLUTION_FLAGS = MF_RESOLUTION_FLAGS(64i32);
pub const MF_RESOLUTION_ENABLE_STORE_PLUGINS: MF_RESOLUTION_FLAGS = MF_RESOLUTION_FLAGS(1024i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_RESOLUTION_FLAGS(pub i32);
impl MF_RESOLUTION_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for MF_RESOLUTION_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for MF_RESOLUTION_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for MF_RESOLUTION_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for MF_RESOLUTION_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for MF_RESOLUTION_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const MF_RESOLUTION_KEEP_BYTE_STREAM_ALIVE_ON_FAIL: MF_RESOLUTION_FLAGS = MF_RESOLUTION_FLAGS(32i32);
pub const MF_RESOLUTION_MEDIASOURCE: MF_RESOLUTION_FLAGS = MF_RESOLUTION_FLAGS(1i32);
pub const MF_RESOLUTION_PLUGIN_CONTROL_POLICY_APPROVED_ONLY: MF_RESOLUTION_FLAGS = MF_RESOLUTION_FLAGS(128i32);
pub const MF_RESOLUTION_PLUGIN_CONTROL_POLICY_WEB_ONLY: MF_RESOLUTION_FLAGS = MF_RESOLUTION_FLAGS(256i32);
pub const MF_RESOLUTION_PLUGIN_CONTROL_POLICY_WEB_ONLY_EDGEMODE: MF_RESOLUTION_FLAGS = MF_RESOLUTION_FLAGS(512i32);
pub const MF_RESOLUTION_READ: MF_RESOLUTION_FLAGS = MF_RESOLUTION_FLAGS(65536i32);
pub const MF_RESOLUTION_WRITE: MF_RESOLUTION_FLAGS = MF_RESOLUTION_FLAGS(131072i32);
pub const MF_SAMI_SERVICE: windows_core::GUID = windows_core::GUID::from_u128(0x49a89ae7_b4d9_4ef2_aa5c_f65a3e05ae4e);
pub const MF_SAMPLEGRABBERSINK_IGNORE_CLOCK: windows_core::GUID = windows_core::GUID::from_u128(0x0efda2c0_2b69_4e2e_ab8d_46dcbff7d25d);
pub const MF_SAMPLEGRABBERSINK_SAMPLE_TIME_OFFSET: windows_core::GUID = windows_core::GUID::from_u128(0x62e3d776_8100_4e03_a6e8_bd3857ac9c47);
pub const MF_SAMPLE_ENCRYPTION_PROTECTION_SCHEME_AES_CBC: MFSampleEncryptionProtectionScheme = MFSampleEncryptionProtectionScheme(2i32);
pub const MF_SAMPLE_ENCRYPTION_PROTECTION_SCHEME_AES_CTR: MFSampleEncryptionProtectionScheme = MFSampleEncryptionProtectionScheme(1i32);
pub const MF_SAMPLE_ENCRYPTION_PROTECTION_SCHEME_NONE: MFSampleEncryptionProtectionScheme = MFSampleEncryptionProtectionScheme(0i32);
pub const MF_SA_AUDIO_ENDPOINT_AWARE: windows_core::GUID = windows_core::GUID::from_u128(0xc0381701_805c_42b2_ac8d_e2b4bf21f4f8);
pub const MF_SA_BUFFERS_PER_SAMPLE: windows_core::GUID = windows_core::GUID::from_u128(0x873c5171_1e3d_4e25_988d_b433ce041983);
pub const MF_SA_D3D11_ALLOCATE_DISPLAYABLE_RESOURCES: windows_core::GUID = windows_core::GUID::from_u128(0xeeface6d_2ea9_4adf_bbdf_7bbc482a1b6d);
pub const MF_SA_D3D11_ALLOW_DYNAMIC_YUV_TEXTURE: windows_core::GUID = windows_core::GUID::from_u128(0xce06d49f_0613_4b9d_86a6_d8c4f9c10075);
pub const MF_SA_D3D11_AWARE: windows_core::GUID = windows_core::GUID::from_u128(0x206b4fc8_fcf9_4c51_afe3_9764369e33a0);
pub const MF_SA_D3D11_BINDFLAGS: windows_core::GUID = windows_core::GUID::from_u128(0xeacf97ad_065c_4408_bee3_fdcbfd128be2);
pub const MF_SA_D3D11_HW_PROTECTED: windows_core::GUID = windows_core::GUID::from_u128(0x3a8ba9d9_92ca_4307_a391_6999dbf3b6ce);
pub const MF_SA_D3D11_SHARED: windows_core::GUID = windows_core::GUID::from_u128(0x7b8f32c3_6d96_4b89_9203_dd38b61414f3);
pub const MF_SA_D3D11_SHARED_WITHOUT_MUTEX: windows_core::GUID = windows_core::GUID::from_u128(0x39dbd44d_2e44_4931_a4c8_352d3dc42115);
pub const MF_SA_D3D11_USAGE: windows_core::GUID = windows_core::GUID::from_u128(0xe85fe442_2ca3_486e_a9c7_109dda609880);
pub const MF_SA_D3D12_CLEAR_VALUE: windows_core::GUID = windows_core::GUID::from_u128(0x86ba9a39_0526_495d_9ab5_54ec9fad6fc3);
pub const MF_SA_D3D12_HEAP_FLAGS: windows_core::GUID = windows_core::GUID::from_u128(0x496b3266_d28f_4f8c_93a7_4a596b1a31a1);
pub const MF_SA_D3D12_HEAP_TYPE: windows_core::GUID = windows_core::GUID::from_u128(0x56f26a76_bbc1_4ce0_bb11_e22368d874ed);
pub const MF_SA_D3D_AWARE: windows_core::GUID = windows_core::GUID::from_u128(0xeaa35c29_775e_488e_9b61_b3283e49583b);
pub const MF_SA_MINIMUM_OUTPUT_SAMPLE_COUNT: windows_core::GUID = windows_core::GUID::from_u128(0x851745d5_c3d6_476d_9527_498ef2d10d18);
pub const MF_SA_MINIMUM_OUTPUT_SAMPLE_COUNT_PROGRESSIVE: windows_core::GUID = windows_core::GUID::from_u128(0x0f5523a5_1cb2_47c5_a550_2eeb84b4d14a);
pub const MF_SA_REQUIRED_SAMPLE_COUNT: windows_core::GUID = windows_core::GUID::from_u128(0x18802c61_324b_4952_abd0_176ff5c696ff);
pub const MF_SA_REQUIRED_SAMPLE_COUNT_PROGRESSIVE: windows_core::GUID = windows_core::GUID::from_u128(0xb172d58e_fa77_4e48_8d2a_1df2d850eac2);
pub const MF_SDK_VERSION: u32 = 2u32;
pub const MF_SD_AMBISONICS_SAMPLE3D_DESCRIPTION: windows_core::GUID = windows_core::GUID::from_u128(0xf715cf3e_a964_4c3f_94ae_9d6ba7264641);
pub const MF_SD_ASF_EXTSTRMPROP_AVG_BUFFERSIZE: windows_core::GUID = windows_core::GUID::from_u128(0x48f8a524_305d_422d_8524_2502dda33680);
pub const MF_SD_ASF_EXTSTRMPROP_AVG_DATA_BITRATE: windows_core::GUID = windows_core::GUID::from_u128(0x48f8a523_305d_422d_8524_2502dda33680);
pub const MF_SD_ASF_EXTSTRMPROP_LANGUAGE_ID_INDEX: windows_core::GUID = windows_core::GUID::from_u128(0x48f8a522_305d_422d_8524_2502dda33680);
pub const MF_SD_ASF_EXTSTRMPROP_MAX_BUFFERSIZE: windows_core::GUID = windows_core::GUID::from_u128(0x48f8a526_305d_422d_8524_2502dda33680);
pub const MF_SD_ASF_EXTSTRMPROP_MAX_DATA_BITRATE: windows_core::GUID = windows_core::GUID::from_u128(0x48f8a525_305d_422d_8524_2502dda33680);
pub const MF_SD_ASF_METADATA_DEVICE_CONFORMANCE_TEMPLATE: windows_core::GUID = windows_core::GUID::from_u128(0x245e929d_c44e_4f7e_bb3c_77d4dfd27f8a);
pub const MF_SD_ASF_STREAMBITRATES_BITRATE: windows_core::GUID = windows_core::GUID::from_u128(0xa8e182ed_afc8_43d0_b0d1_f65bad9da558);
pub const MF_SD_AUDIO_ENCODER_DELAY: windows_core::GUID = windows_core::GUID::from_u128(0x8e85422c_73de_403f_9a35_550ad6e8b951);
pub const MF_SD_AUDIO_ENCODER_PADDING: windows_core::GUID = windows_core::GUID::from_u128(0x529c7f2c_ac4b_4e3f_bfc3_0902194982cb);
pub const MF_SD_LANGUAGE: windows_core::GUID = windows_core::GUID::from_u128(0x00af2180_bdc2_423c_abca_f503593bc121);
pub const MF_SD_MEDIASOURCE_STATUS: windows_core::GUID = windows_core::GUID::from_u128(0x1913678b_fc0f_44da_8f43_1ba3b526f4ae);
pub const MF_SD_MUTUALLY_EXCLUSIVE: windows_core::GUID = windows_core::GUID::from_u128(0x023ef79c_388d_487f_ac17_696cd6e3c6f5);
pub const MF_SD_PROTECTED: windows_core::GUID = windows_core::GUID::from_u128(0x00af2181_bdc2_423c_abca_f503593bc121);
pub const MF_SD_SAMI_LANGUAGE: windows_core::GUID = windows_core::GUID::from_u128(0x36fcb98a_6cd0_44cb_acb9_a8f5600dd0bb);
pub const MF_SD_STREAM_NAME: windows_core::GUID = windows_core::GUID::from_u128(0x4f1b099d_d314_41e5_a781_7fefaa4c501f);
pub const MF_SD_VIDEO_SPHERICAL: windows_core::GUID = windows_core::GUID::from_u128(0xa51da449_3fdc_478c_bcb5_30be76595f55);
pub const MF_SD_VIDEO_SPHERICAL_FORMAT: windows_core::GUID = windows_core::GUID::from_u128(0x4a8fc407_6ea1_46c8_b567_6971d4a139c3);
pub const MF_SD_VIDEO_SPHERICAL_INITIAL_VIEWDIRECTION: windows_core::GUID = windows_core::GUID::from_u128(0x11d25a49_bb62_467f_9db1_c17165716c49);
pub const MF_SERVICE_LOOKUP_ALL: MF_SERVICE_LOOKUP_TYPE = MF_SERVICE_LOOKUP_TYPE(4i32);
pub const MF_SERVICE_LOOKUP_DOWNSTREAM: MF_SERVICE_LOOKUP_TYPE = MF_SERVICE_LOOKUP_TYPE(2i32);
pub const MF_SERVICE_LOOKUP_DOWNSTREAM_DIRECT: MF_SERVICE_LOOKUP_TYPE = MF_SERVICE_LOOKUP_TYPE(3i32);
pub const MF_SERVICE_LOOKUP_GLOBAL: MF_SERVICE_LOOKUP_TYPE = MF_SERVICE_LOOKUP_TYPE(5i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_SERVICE_LOOKUP_TYPE(pub i32);
pub const MF_SERVICE_LOOKUP_UPSTREAM: MF_SERVICE_LOOKUP_TYPE = MF_SERVICE_LOOKUP_TYPE(0i32);
pub const MF_SERVICE_LOOKUP_UPSTREAM_DIRECT: MF_SERVICE_LOOKUP_TYPE = MF_SERVICE_LOOKUP_TYPE(1i32);
pub const MF_SESSION_APPROX_EVENT_OCCURRENCE_TIME: windows_core::GUID = windows_core::GUID::from_u128(0x190e852f_6238_42d1_b5af_69ea338ef850);
pub const MF_SESSION_CONTENT_PROTECTION_MANAGER: windows_core::GUID = windows_core::GUID::from_u128(0x1e83d482_1f1c_4571_8405_88f4b2181f74);
pub const MF_SESSION_GLOBAL_TIME: windows_core::GUID = windows_core::GUID::from_u128(0x1e83d482_1f1c_4571_8405_88f4b2181f72);
pub const MF_SESSION_QUALITY_MANAGER: windows_core::GUID = windows_core::GUID::from_u128(0x1e83d482_1f1c_4571_8405_88f4b2181f73);
pub const MF_SESSION_REMOTE_SOURCE_MODE: windows_core::GUID = windows_core::GUID::from_u128(0xf4033ef4_9bb3_4378_941f_85a0856bc244);
pub const MF_SESSION_SERVER_CONTEXT: windows_core::GUID = windows_core::GUID::from_u128(0xafe5b291_50fa_46e8_b9be_0c0c3ce4b3a5);
pub const MF_SESSION_TOPOLOADER: windows_core::GUID = windows_core::GUID::from_u128(0x1e83d482_1f1c_4571_8405_88f4b2181f71);
pub const MF_SHARING_ENGINE_CALLBACK: windows_core::GUID = windows_core::GUID::from_u128(0x57dc1e95_d252_43fa_9bbc_180070eefe6d);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_SHARING_ENGINE_EVENT(pub i32);
pub const MF_SHARING_ENGINE_EVENT_DISCONNECT: MF_SHARING_ENGINE_EVENT = MF_SHARING_ENGINE_EVENT(2000i32);
pub const MF_SHARING_ENGINE_EVENT_ERROR: MF_SHARING_ENGINE_EVENT = MF_SHARING_ENGINE_EVENT(2501i32);
pub const MF_SHARING_ENGINE_EVENT_LOCALRENDERINGENDED: MF_SHARING_ENGINE_EVENT = MF_SHARING_ENGINE_EVENT(2002i32);
pub const MF_SHARING_ENGINE_EVENT_LOCALRENDERINGSTARTED: MF_SHARING_ENGINE_EVENT = MF_SHARING_ENGINE_EVENT(2001i32);
pub const MF_SHARING_ENGINE_EVENT_STOPPED: MF_SHARING_ENGINE_EVENT = MF_SHARING_ENGINE_EVENT(2003i32);
pub const MF_SHARING_ENGINE_SHAREDRENDERER: windows_core::GUID = windows_core::GUID::from_u128(0xefa446a0_73e7_404e_8ae2_fef60af5a32b);
pub const MF_SHUTDOWN_RENDERER_ON_ENGINE_SHUTDOWN: windows_core::GUID = windows_core::GUID::from_u128(0xc112d94d_6b9c_48f8_b6f9_7950ff9ab71e);
pub const MF_SINK_VIDEO_DISPLAY_ASPECT_RATIO_DENOMINATOR: windows_core::GUID = windows_core::GUID::from_u128(0x6ea1eb97_1fe0_4f10_a6e4_1f4f661564e0);
pub const MF_SINK_VIDEO_DISPLAY_ASPECT_RATIO_NUMERATOR: windows_core::GUID = windows_core::GUID::from_u128(0xd0f33b22_b78a_4879_b455_f03ef3fa82cd);
pub const MF_SINK_VIDEO_NATIVE_HEIGHT: windows_core::GUID = windows_core::GUID::from_u128(0xf0ca6705_490c_43e8_941c_c0b3206b9a65);
pub const MF_SINK_VIDEO_NATIVE_WIDTH: windows_core::GUID = windows_core::GUID::from_u128(0xe6d6a707_1505_4747_9b10_72d2d158cb3a);
pub const MF_SINK_VIDEO_PTS: windows_core::GUID = windows_core::GUID::from_u128(0x2162bde7_421e_4b90_9b33_e58fbf1d58b6);
pub const MF_SINK_WRITER_ALL_STREAMS: MF_SINK_WRITER_CONSTANTS = MF_SINK_WRITER_CONSTANTS(4294967294u32);
pub const MF_SINK_WRITER_ASYNC_CALLBACK: windows_core::GUID = windows_core::GUID::from_u128(0x48cb183e_7b0b_46f4_822e_5e1d2dda4354);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_SINK_WRITER_CONSTANTS(pub u32);
pub const MF_SINK_WRITER_D3D_MANAGER: windows_core::GUID = windows_core::GUID::from_u128(0xec822da2_e1e9_4b29_a0d8_563c719f5269);
pub const MF_SINK_WRITER_DISABLE_THROTTLING: windows_core::GUID = windows_core::GUID::from_u128(0x08b845d8_2b74_4afe_9d53_be16d2d5ae4f);
pub const MF_SINK_WRITER_ENCODER_CONFIG: windows_core::GUID = windows_core::GUID::from_u128(0xad91cd04_a7cc_4ac7_99b6_a57b9a4a7c70);
pub const MF_SINK_WRITER_INVALID_STREAM_INDEX: MF_SINK_WRITER_CONSTANTS = MF_SINK_WRITER_CONSTANTS(4294967295u32);
pub const MF_SINK_WRITER_MEDIASINK: MF_SINK_WRITER_CONSTANTS = MF_SINK_WRITER_CONSTANTS(4294967295u32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MF_SINK_WRITER_STATISTICS {
pub cb: u32,
pub llLastTimestampReceived: i64,
pub llLastTimestampEncoded: i64,
pub llLastTimestampProcessed: i64,
pub llLastStreamTickReceived: i64,
pub llLastSinkSampleRequest: i64,
pub qwNumSamplesReceived: u64,
pub qwNumSamplesEncoded: u64,
pub qwNumSamplesProcessed: u64,
pub qwNumStreamTicksReceived: u64,
pub dwByteCountQueued: u32,
pub qwByteCountProcessed: u64,
pub dwNumOutstandingSinkSampleRequests: u32,
pub dwAverageSampleRateReceived: u32,
pub dwAverageSampleRateEncoded: u32,
pub dwAverageSampleRateProcessed: u32,
}
pub const MF_SOURCE_PRESENTATION_PROVIDER_SERVICE: windows_core::GUID = windows_core::GUID::from_u128(0xe002aadc_f4af_4ee5_9847_053edf840426);
pub const MF_SOURCE_READERF_ALLEFFECTSREMOVED: MF_SOURCE_READER_FLAG = MF_SOURCE_READER_FLAG(512i32);
pub const MF_SOURCE_READERF_CURRENTMEDIATYPECHANGED: MF_SOURCE_READER_FLAG = MF_SOURCE_READER_FLAG(32i32);
pub const MF_SOURCE_READERF_ENDOFSTREAM: MF_SOURCE_READER_FLAG = MF_SOURCE_READER_FLAG(2i32);
pub const MF_SOURCE_READERF_ERROR: MF_SOURCE_READER_FLAG = MF_SOURCE_READER_FLAG(1i32);
pub const MF_SOURCE_READERF_NATIVEMEDIATYPECHANGED: MF_SOURCE_READER_FLAG = MF_SOURCE_READER_FLAG(16i32);
pub const MF_SOURCE_READERF_NEWSTREAM: MF_SOURCE_READER_FLAG = MF_SOURCE_READER_FLAG(4i32);
pub const MF_SOURCE_READERF_STREAMTICK: MF_SOURCE_READER_FLAG = MF_SOURCE_READER_FLAG(256i32);
pub const MF_SOURCE_READER_ALL_STREAMS: MF_SOURCE_READER_CONSTANTS = MF_SOURCE_READER_CONSTANTS(-2i32);
pub const MF_SOURCE_READER_ANY_STREAM: MF_SOURCE_READER_CONSTANTS = MF_SOURCE_READER_CONSTANTS(-2i32);
pub const MF_SOURCE_READER_ASYNC_CALLBACK: windows_core::GUID = windows_core::GUID::from_u128(0x1e3dbeac_bb43_4c35_b507_cd644464c965);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_SOURCE_READER_CONSTANTS(pub i32);
pub const MF_SOURCE_READER_CONTROLF_DRAIN: MF_SOURCE_READER_CONTROL_FLAG = MF_SOURCE_READER_CONTROL_FLAG(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_SOURCE_READER_CONTROL_FLAG(pub i32);
impl MF_SOURCE_READER_CONTROL_FLAG {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for MF_SOURCE_READER_CONTROL_FLAG {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for MF_SOURCE_READER_CONTROL_FLAG {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for MF_SOURCE_READER_CONTROL_FLAG {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for MF_SOURCE_READER_CONTROL_FLAG {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for MF_SOURCE_READER_CONTROL_FLAG {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_SOURCE_READER_CURRENT_TYPE_CONSTANTS(pub i32);
pub const MF_SOURCE_READER_CURRENT_TYPE_INDEX: MF_SOURCE_READER_CURRENT_TYPE_CONSTANTS = MF_SOURCE_READER_CURRENT_TYPE_CONSTANTS(-1i32);
pub const MF_SOURCE_READER_D3D11_BIND_FLAGS: windows_core::GUID = windows_core::GUID::from_u128(0x33f3197b_f73a_4e14_8d85_0e4c4368788d);
pub const MF_SOURCE_READER_D3D_MANAGER: windows_core::GUID = windows_core::GUID::from_u128(0xec822da2_e1e9_4b29_a0d8_563c719f5269);
pub const MF_SOURCE_READER_DISABLE_CAMERA_PLUGINS: windows_core::GUID = windows_core::GUID::from_u128(0x9d3365dd_058f_4cfb_9f97_b314cc99c8ad);
pub const MF_SOURCE_READER_DISABLE_DXVA: windows_core::GUID = windows_core::GUID::from_u128(0xaa456cfd_3943_4a1e_a77d_1838c0ea2e35);
pub const MF_SOURCE_READER_DISCONNECT_MEDIASOURCE_ON_SHUTDOWN: windows_core::GUID = windows_core::GUID::from_u128(0x56b67165_219e_456d_a22e_2d3004c7fe56);
pub const MF_SOURCE_READER_ENABLE_ADVANCED_VIDEO_PROCESSING: windows_core::GUID = windows_core::GUID::from_u128(0x0f81da2c_b537_4672_a8b2_a681b17307a3);
pub const MF_SOURCE_READER_ENABLE_TRANSCODE_ONLY_TRANSFORMS: windows_core::GUID = windows_core::GUID::from_u128(0xdfd4f008_b5fd_4e78_ae44_62a1e67bbe27);
pub const MF_SOURCE_READER_ENABLE_VIDEO_PROCESSING: windows_core::GUID = windows_core::GUID::from_u128(0xfb394f3d_ccf1_42ee_bbb3_f9b845d5681d);
pub const MF_SOURCE_READER_FIRST_AUDIO_STREAM: MF_SOURCE_READER_CONSTANTS = MF_SOURCE_READER_CONSTANTS(-3i32);
pub const MF_SOURCE_READER_FIRST_VIDEO_STREAM: MF_SOURCE_READER_CONSTANTS = MF_SOURCE_READER_CONSTANTS(-4i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_SOURCE_READER_FLAG(pub i32);
impl MF_SOURCE_READER_FLAG {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for MF_SOURCE_READER_FLAG {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for MF_SOURCE_READER_FLAG {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for MF_SOURCE_READER_FLAG {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for MF_SOURCE_READER_FLAG {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for MF_SOURCE_READER_FLAG {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const MF_SOURCE_READER_INVALID_STREAM_INDEX: MF_SOURCE_READER_CONSTANTS = MF_SOURCE_READER_CONSTANTS(-1i32);
pub const MF_SOURCE_READER_MEDIASOURCE: MF_SOURCE_READER_CONSTANTS = MF_SOURCE_READER_CONSTANTS(-1i32);
pub const MF_SOURCE_READER_MEDIASOURCE_CHARACTERISTICS: windows_core::GUID = windows_core::GUID::from_u128(0x6d23f5c8_c5d7_4a9b_9971_5d11f8bca880);
pub const MF_SOURCE_READER_MEDIASOURCE_CONFIG: windows_core::GUID = windows_core::GUID::from_u128(0x9085abeb_0354_48f9_abb5_200df838c68e);
pub const MF_SOURCE_STREAM_SUPPORTS_HW_CONNECTION: windows_core::GUID = windows_core::GUID::from_u128(0xa38253aa_6314_42fd_a3ce_bb27b6859946);
pub const MF_STANDARD_WORKQUEUE: MFASYNC_WORKQUEUE_TYPE = MFASYNC_WORKQUEUE_TYPE(0i32);
pub const MF_STF_VERSION_DATE: windows_core::GUID = windows_core::GUID::from_u128(0x31a165d5_df67_4095_8e44_8868fc20dbfd);
pub const MF_STF_VERSION_INFO: windows_core::GUID = windows_core::GUID::from_u128(0x6770bd39_ef82_44ee_a49b_934beb24aef7);
pub const MF_STREAM_SINK_SUPPORTS_HW_CONNECTION: windows_core::GUID = windows_core::GUID::from_u128(0x9b465cbf_0597_4f9e_9f3c_b97eeef90359);
pub const MF_STREAM_SINK_SUPPORTS_ROTATION: windows_core::GUID = windows_core::GUID::from_u128(0xb3e96280_bd05_41a5_97ad_8a7fee24b912);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_STREAM_STATE(pub i32);
pub const MF_STREAM_STATE_PAUSED: MF_STREAM_STATE = MF_STREAM_STATE(1i32);
pub const MF_STREAM_STATE_RUNNING: MF_STREAM_STATE = MF_STREAM_STATE(2i32);
pub const MF_STREAM_STATE_STOPPED: MF_STREAM_STATE = MF_STREAM_STATE(0i32);
pub const MF_ST_MEDIASOURCE_COLLECTION: windows_core::GUID = windows_core::GUID::from_u128(0x616de972_83ad_4950_8170_630d19cbe307);
pub const MF_SYNTAX_ERR: u32 = 2154823692u32;
pub const MF_S_ACTIVATE_REPLACED: windows_core::HRESULT = windows_core::HRESULT(0xD36FD_u32 as _);
pub const MF_S_ASF_PARSEINPROGRESS: windows_core::HRESULT = windows_core::HRESULT(0x400D3A98_u32 as _);
pub const MF_S_CLOCK_STOPPED: windows_core::HRESULT = windows_core::HRESULT(0xD9C44_u32 as _);
pub const MF_S_MULTIPLE_BEGIN: windows_core::HRESULT = windows_core::HRESULT(0xD36D8_u32 as _);
pub const MF_S_PE_TRUSTED: windows_core::HRESULT = windows_core::HRESULT(0xD7173_u32 as _);
pub const MF_S_PROTECTION_NOT_REQUIRED: windows_core::HRESULT = windows_core::HRESULT(0xD7150_u32 as _);
pub const MF_S_SEQUENCER_CONTEXT_CANCELED: windows_core::HRESULT = windows_core::HRESULT(0xD61AD_u32 as _);
pub const MF_S_SEQUENCER_SEGMENT_AT_END_OF_STREAM: windows_core::HRESULT = windows_core::HRESULT(0xD61AF_u32 as _);
pub const MF_S_SINK_NOT_FINALIZED: windows_core::HRESULT = windows_core::HRESULT(0xD4A42_u32 as _);
pub const MF_S_TRANSFORM_DO_NOT_PROPAGATE_EVENT: windows_core::HRESULT = windows_core::HRESULT(0xD6D75_u32 as _);
pub const MF_S_VIDEO_DISABLED_WITH_UNKNOWN_SOFTWARE_OUTPUT: windows_core::HRESULT = windows_core::HRESULT(0xD7169_u32 as _);
pub const MF_S_WAIT_FOR_POLICY_SET: windows_core::HRESULT = windows_core::HRESULT(0xD7168_u32 as _);
pub const MF_SampleProtectionSalt: windows_core::GUID = windows_core::GUID::from_u128(0x5403deee_b9ee_438f_aa83_3804997e569d);
pub const MF_TEST_SIGNED_COMPONENT_LOADING: u32 = 16777216u32;
pub const MF_TIMECODE_SERVICE: windows_core::GUID = windows_core::GUID::from_u128(0xa0d502a7_0eb3_4885_b1b9_9feb0d083454);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_TIMED_TEXT_ALIGNMENT(pub i32);
pub const MF_TIMED_TEXT_ALIGNMENT_CENTER: MF_TIMED_TEXT_ALIGNMENT = MF_TIMED_TEXT_ALIGNMENT(2i32);
pub const MF_TIMED_TEXT_ALIGNMENT_END: MF_TIMED_TEXT_ALIGNMENT = MF_TIMED_TEXT_ALIGNMENT(1i32);
pub const MF_TIMED_TEXT_ALIGNMENT_START: MF_TIMED_TEXT_ALIGNMENT = MF_TIMED_TEXT_ALIGNMENT(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_TIMED_TEXT_BOUTEN_POSITION(pub i32);
pub const MF_TIMED_TEXT_BOUTEN_POSITION_AFTER: MF_TIMED_TEXT_BOUTEN_POSITION = MF_TIMED_TEXT_BOUTEN_POSITION(1i32);
pub const MF_TIMED_TEXT_BOUTEN_POSITION_BEFORE: MF_TIMED_TEXT_BOUTEN_POSITION = MF_TIMED_TEXT_BOUTEN_POSITION(0i32);
pub const MF_TIMED_TEXT_BOUTEN_POSITION_OUTSIDE: MF_TIMED_TEXT_BOUTEN_POSITION = MF_TIMED_TEXT_BOUTEN_POSITION(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_TIMED_TEXT_BOUTEN_TYPE(pub i32);
pub const MF_TIMED_TEXT_BOUTEN_TYPE_AUTO: MF_TIMED_TEXT_BOUTEN_TYPE = MF_TIMED_TEXT_BOUTEN_TYPE(1i32);
pub const MF_TIMED_TEXT_BOUTEN_TYPE_FILLEDCIRCLE: MF_TIMED_TEXT_BOUTEN_TYPE = MF_TIMED_TEXT_BOUTEN_TYPE(2i32);
pub const MF_TIMED_TEXT_BOUTEN_TYPE_FILLEDDOT: MF_TIMED_TEXT_BOUTEN_TYPE = MF_TIMED_TEXT_BOUTEN_TYPE(4i32);
pub const MF_TIMED_TEXT_BOUTEN_TYPE_FILLEDSESAME: MF_TIMED_TEXT_BOUTEN_TYPE = MF_TIMED_TEXT_BOUTEN_TYPE(6i32);
pub const MF_TIMED_TEXT_BOUTEN_TYPE_NONE: MF_TIMED_TEXT_BOUTEN_TYPE = MF_TIMED_TEXT_BOUTEN_TYPE(0i32);
pub const MF_TIMED_TEXT_BOUTEN_TYPE_OPENCIRCLE: MF_TIMED_TEXT_BOUTEN_TYPE = MF_TIMED_TEXT_BOUTEN_TYPE(3i32);
pub const MF_TIMED_TEXT_BOUTEN_TYPE_OPENDOT: MF_TIMED_TEXT_BOUTEN_TYPE = MF_TIMED_TEXT_BOUTEN_TYPE(5i32);
pub const MF_TIMED_TEXT_BOUTEN_TYPE_OPENSESAME: MF_TIMED_TEXT_BOUTEN_TYPE = MF_TIMED_TEXT_BOUTEN_TYPE(7i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_TIMED_TEXT_CUE_EVENT(pub i32);
pub const MF_TIMED_TEXT_CUE_EVENT_ACTIVE: MF_TIMED_TEXT_CUE_EVENT = MF_TIMED_TEXT_CUE_EVENT(0i32);
pub const MF_TIMED_TEXT_CUE_EVENT_CLEAR: MF_TIMED_TEXT_CUE_EVENT = MF_TIMED_TEXT_CUE_EVENT(2i32);
pub const MF_TIMED_TEXT_CUE_EVENT_INACTIVE: MF_TIMED_TEXT_CUE_EVENT = MF_TIMED_TEXT_CUE_EVENT(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_TIMED_TEXT_DECORATION(pub i32);
pub const MF_TIMED_TEXT_DECORATION_LINE_THROUGH: MF_TIMED_TEXT_DECORATION = MF_TIMED_TEXT_DECORATION(2i32);
pub const MF_TIMED_TEXT_DECORATION_NONE: MF_TIMED_TEXT_DECORATION = MF_TIMED_TEXT_DECORATION(0i32);
pub const MF_TIMED_TEXT_DECORATION_OVERLINE: MF_TIMED_TEXT_DECORATION = MF_TIMED_TEXT_DECORATION(4i32);
pub const MF_TIMED_TEXT_DECORATION_UNDERLINE: MF_TIMED_TEXT_DECORATION = MF_TIMED_TEXT_DECORATION(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_TIMED_TEXT_DISPLAY_ALIGNMENT(pub i32);
pub const MF_TIMED_TEXT_DISPLAY_ALIGNMENT_AFTER: MF_TIMED_TEXT_DISPLAY_ALIGNMENT = MF_TIMED_TEXT_DISPLAY_ALIGNMENT(1i32);
pub const MF_TIMED_TEXT_DISPLAY_ALIGNMENT_BEFORE: MF_TIMED_TEXT_DISPLAY_ALIGNMENT = MF_TIMED_TEXT_DISPLAY_ALIGNMENT(0i32);
pub const MF_TIMED_TEXT_DISPLAY_ALIGNMENT_CENTER: MF_TIMED_TEXT_DISPLAY_ALIGNMENT = MF_TIMED_TEXT_DISPLAY_ALIGNMENT(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_TIMED_TEXT_ERROR_CODE(pub i32);
pub const MF_TIMED_TEXT_ERROR_CODE_DATA_FORMAT: MF_TIMED_TEXT_ERROR_CODE = MF_TIMED_TEXT_ERROR_CODE(2i32);
pub const MF_TIMED_TEXT_ERROR_CODE_FATAL: MF_TIMED_TEXT_ERROR_CODE = MF_TIMED_TEXT_ERROR_CODE(1i32);
pub const MF_TIMED_TEXT_ERROR_CODE_INTERNAL: MF_TIMED_TEXT_ERROR_CODE = MF_TIMED_TEXT_ERROR_CODE(4i32);
pub const MF_TIMED_TEXT_ERROR_CODE_NETWORK: MF_TIMED_TEXT_ERROR_CODE = MF_TIMED_TEXT_ERROR_CODE(3i32);
pub const MF_TIMED_TEXT_ERROR_CODE_NOERROR: MF_TIMED_TEXT_ERROR_CODE = MF_TIMED_TEXT_ERROR_CODE(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_TIMED_TEXT_FONT_STYLE(pub i32);
pub const MF_TIMED_TEXT_FONT_STYLE_ITALIC: MF_TIMED_TEXT_FONT_STYLE = MF_TIMED_TEXT_FONT_STYLE(2i32);
pub const MF_TIMED_TEXT_FONT_STYLE_NORMAL: MF_TIMED_TEXT_FONT_STYLE = MF_TIMED_TEXT_FONT_STYLE(0i32);
pub const MF_TIMED_TEXT_FONT_STYLE_OBLIQUE: MF_TIMED_TEXT_FONT_STYLE = MF_TIMED_TEXT_FONT_STYLE(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_TIMED_TEXT_RUBY_ALIGN(pub i32);
pub const MF_TIMED_TEXT_RUBY_ALIGN_CENTER: MF_TIMED_TEXT_RUBY_ALIGN = MF_TIMED_TEXT_RUBY_ALIGN(0i32);
pub const MF_TIMED_TEXT_RUBY_ALIGN_END: MF_TIMED_TEXT_RUBY_ALIGN = MF_TIMED_TEXT_RUBY_ALIGN(2i32);
pub const MF_TIMED_TEXT_RUBY_ALIGN_SPACEAROUND: MF_TIMED_TEXT_RUBY_ALIGN = MF_TIMED_TEXT_RUBY_ALIGN(3i32);
pub const MF_TIMED_TEXT_RUBY_ALIGN_SPACEBETWEEN: MF_TIMED_TEXT_RUBY_ALIGN = MF_TIMED_TEXT_RUBY_ALIGN(4i32);
pub const MF_TIMED_TEXT_RUBY_ALIGN_START: MF_TIMED_TEXT_RUBY_ALIGN = MF_TIMED_TEXT_RUBY_ALIGN(1i32);
pub const MF_TIMED_TEXT_RUBY_ALIGN_WITHBASE: MF_TIMED_TEXT_RUBY_ALIGN = MF_TIMED_TEXT_RUBY_ALIGN(5i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_TIMED_TEXT_RUBY_POSITION(pub i32);
pub const MF_TIMED_TEXT_RUBY_POSITION_AFTER: MF_TIMED_TEXT_RUBY_POSITION = MF_TIMED_TEXT_RUBY_POSITION(1i32);
pub const MF_TIMED_TEXT_RUBY_POSITION_BEFORE: MF_TIMED_TEXT_RUBY_POSITION = MF_TIMED_TEXT_RUBY_POSITION(0i32);
pub const MF_TIMED_TEXT_RUBY_POSITION_OUTSIDE: MF_TIMED_TEXT_RUBY_POSITION = MF_TIMED_TEXT_RUBY_POSITION(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_TIMED_TEXT_RUBY_RESERVE(pub i32);
pub const MF_TIMED_TEXT_RUBY_RESERVE_AFTER: MF_TIMED_TEXT_RUBY_RESERVE = MF_TIMED_TEXT_RUBY_RESERVE(2i32);
pub const MF_TIMED_TEXT_RUBY_RESERVE_BEFORE: MF_TIMED_TEXT_RUBY_RESERVE = MF_TIMED_TEXT_RUBY_RESERVE(1i32);
pub const MF_TIMED_TEXT_RUBY_RESERVE_BOTH: MF_TIMED_TEXT_RUBY_RESERVE = MF_TIMED_TEXT_RUBY_RESERVE(3i32);
pub const MF_TIMED_TEXT_RUBY_RESERVE_NONE: MF_TIMED_TEXT_RUBY_RESERVE = MF_TIMED_TEXT_RUBY_RESERVE(0i32);
pub const MF_TIMED_TEXT_RUBY_RESERVE_OUTSIDE: MF_TIMED_TEXT_RUBY_RESERVE = MF_TIMED_TEXT_RUBY_RESERVE(4i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_TIMED_TEXT_SCROLL_MODE(pub i32);
pub const MF_TIMED_TEXT_SCROLL_MODE_POP_ON: MF_TIMED_TEXT_SCROLL_MODE = MF_TIMED_TEXT_SCROLL_MODE(0i32);
pub const MF_TIMED_TEXT_SCROLL_MODE_ROLL_UP: MF_TIMED_TEXT_SCROLL_MODE = MF_TIMED_TEXT_SCROLL_MODE(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_TIMED_TEXT_TRACK_KIND(pub i32);
pub const MF_TIMED_TEXT_TRACK_KIND_CAPTIONS: MF_TIMED_TEXT_TRACK_KIND = MF_TIMED_TEXT_TRACK_KIND(2i32);
pub const MF_TIMED_TEXT_TRACK_KIND_METADATA: MF_TIMED_TEXT_TRACK_KIND = MF_TIMED_TEXT_TRACK_KIND(3i32);
pub const MF_TIMED_TEXT_TRACK_KIND_SUBTITLES: MF_TIMED_TEXT_TRACK_KIND = MF_TIMED_TEXT_TRACK_KIND(1i32);
pub const MF_TIMED_TEXT_TRACK_KIND_UNKNOWN: MF_TIMED_TEXT_TRACK_KIND = MF_TIMED_TEXT_TRACK_KIND(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_TIMED_TEXT_TRACK_READY_STATE(pub i32);
pub const MF_TIMED_TEXT_TRACK_READY_STATE_ERROR: MF_TIMED_TEXT_TRACK_READY_STATE = MF_TIMED_TEXT_TRACK_READY_STATE(3i32);
pub const MF_TIMED_TEXT_TRACK_READY_STATE_LOADED: MF_TIMED_TEXT_TRACK_READY_STATE = MF_TIMED_TEXT_TRACK_READY_STATE(2i32);
pub const MF_TIMED_TEXT_TRACK_READY_STATE_LOADING: MF_TIMED_TEXT_TRACK_READY_STATE = MF_TIMED_TEXT_TRACK_READY_STATE(1i32);
pub const MF_TIMED_TEXT_TRACK_READY_STATE_NONE: MF_TIMED_TEXT_TRACK_READY_STATE = MF_TIMED_TEXT_TRACK_READY_STATE(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_TIMED_TEXT_UNIT_TYPE(pub i32);
pub const MF_TIMED_TEXT_UNIT_TYPE_PERCENTAGE: MF_TIMED_TEXT_UNIT_TYPE = MF_TIMED_TEXT_UNIT_TYPE(1i32);
pub const MF_TIMED_TEXT_UNIT_TYPE_PIXELS: MF_TIMED_TEXT_UNIT_TYPE = MF_TIMED_TEXT_UNIT_TYPE(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_TIMED_TEXT_WRITING_MODE(pub i32);
pub const MF_TIMED_TEXT_WRITING_MODE_LR: MF_TIMED_TEXT_WRITING_MODE = MF_TIMED_TEXT_WRITING_MODE(4i32);
pub const MF_TIMED_TEXT_WRITING_MODE_LRTB: MF_TIMED_TEXT_WRITING_MODE = MF_TIMED_TEXT_WRITING_MODE(0i32);
pub const MF_TIMED_TEXT_WRITING_MODE_RL: MF_TIMED_TEXT_WRITING_MODE = MF_TIMED_TEXT_WRITING_MODE(5i32);
pub const MF_TIMED_TEXT_WRITING_MODE_RLTB: MF_TIMED_TEXT_WRITING_MODE = MF_TIMED_TEXT_WRITING_MODE(1i32);
pub const MF_TIMED_TEXT_WRITING_MODE_TB: MF_TIMED_TEXT_WRITING_MODE = MF_TIMED_TEXT_WRITING_MODE(6i32);
pub const MF_TIMED_TEXT_WRITING_MODE_TBLR: MF_TIMED_TEXT_WRITING_MODE = MF_TIMED_TEXT_WRITING_MODE(3i32);
pub const MF_TIMED_TEXT_WRITING_MODE_TBRL: MF_TIMED_TEXT_WRITING_MODE = MF_TIMED_TEXT_WRITING_MODE(2i32);
pub const MF_TIME_FORMAT_ENTRY_RELATIVE: windows_core::GUID = windows_core::GUID::from_u128(0x4399f178_46d3_4504_afda_20d32e9ba360);
pub const MF_TIME_FORMAT_SEGMENT_OFFSET: windows_core::GUID = windows_core::GUID::from_u128(0xc8b8be77_869c_431d_812e_169693f65a39);
pub const MF_TOPOLOGY_DXVA_MODE: windows_core::GUID = windows_core::GUID::from_u128(0x1e8d34f6_f5ab_4e23_bb88_874aa3a1a74d);
pub const MF_TOPOLOGY_DYNAMIC_CHANGE_NOT_ALLOWED: windows_core::GUID = windows_core::GUID::from_u128(0xd529950b_d484_4527_a9cd_b1909532b5b0);
pub const MF_TOPOLOGY_ENABLE_XVP_FOR_PLAYBACK: windows_core::GUID = windows_core::GUID::from_u128(0x1967731f_cd78_42fc_b026_0992a56e5693);
pub const MF_TOPOLOGY_ENUMERATE_SOURCE_TYPES: windows_core::GUID = windows_core::GUID::from_u128(0x6248c36d_5d0b_4f40_a0bb_b0b305f77698);
pub const MF_TOPOLOGY_HARDWARE_MODE: windows_core::GUID = windows_core::GUID::from_u128(0xd2d362fd_4e4f_4191_a579_c618b66706af);
pub const MF_TOPOLOGY_MAX: MF_TOPOLOGY_TYPE = MF_TOPOLOGY_TYPE(-1i32);
pub const MF_TOPOLOGY_NO_MARKIN_MARKOUT: windows_core::GUID = windows_core::GUID::from_u128(0x7ed3f804_86bb_4b3f_b7e4_7cb43afd4b80);
pub const MF_TOPOLOGY_OUTPUT_NODE: MF_TOPOLOGY_TYPE = MF_TOPOLOGY_TYPE(0i32);
pub const MF_TOPOLOGY_PLAYBACK_FRAMERATE: windows_core::GUID = windows_core::GUID::from_u128(0xc164737a_c2b1_4553_83bb_5a526072448f);
pub const MF_TOPOLOGY_PLAYBACK_MAX_DIMS: windows_core::GUID = windows_core::GUID::from_u128(0x5715cf19_5768_44aa_ad6e_8721f1b0f9bb);
pub const MF_TOPOLOGY_PROJECTSTART: windows_core::GUID = windows_core::GUID::from_u128(0x7ed3f802_86bb_4b3f_b7e4_7cb43afd4b80);
pub const MF_TOPOLOGY_PROJECTSTOP: windows_core::GUID = windows_core::GUID::from_u128(0x7ed3f803_86bb_4b3f_b7e4_7cb43afd4b80);
pub const MF_TOPOLOGY_RESOLUTION_STATUS: windows_core::GUID = windows_core::GUID::from_u128(0x494bbcde_b031_4e38_97c4_d5422dd618dc);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_TOPOLOGY_RESOLUTION_STATUS_FLAGS(pub i32);
pub const MF_TOPOLOGY_RESOLUTION_SUCCEEDED: MF_TOPOLOGY_RESOLUTION_STATUS_FLAGS = MF_TOPOLOGY_RESOLUTION_STATUS_FLAGS(0i32);
pub const MF_TOPOLOGY_SOURCESTREAM_NODE: MF_TOPOLOGY_TYPE = MF_TOPOLOGY_TYPE(1i32);
pub const MF_TOPOLOGY_START_TIME_ON_PRESENTATION_SWITCH: windows_core::GUID = windows_core::GUID::from_u128(0xc8cc113f_7951_4548_aad6_9ed6202e62b3);
pub const MF_TOPOLOGY_STATIC_PLAYBACK_OPTIMIZATIONS: windows_core::GUID = windows_core::GUID::from_u128(0xb86cac42_41a6_4b79_897a_1ab0e52b4a1b);
pub const MF_TOPOLOGY_TEE_NODE: MF_TOPOLOGY_TYPE = MF_TOPOLOGY_TYPE(3i32);
pub const MF_TOPOLOGY_TRANSFORM_NODE: MF_TOPOLOGY_TYPE = MF_TOPOLOGY_TYPE(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_TOPOLOGY_TYPE(pub i32);
pub const MF_TOPONODE_ATTRIBUTE_EDITOR_SERVICE: windows_core::GUID = windows_core::GUID::from_u128(0x65656e1a_077f_4472_83ef_316f11d5087a);
pub const MF_TOPONODE_CONNECT_METHOD: windows_core::GUID = windows_core::GUID::from_u128(0x494bbcf1_b031_4e38_97c4_d5422dd618dc);
pub const MF_TOPONODE_D3DAWARE: windows_core::GUID = windows_core::GUID::from_u128(0x494bbced_b031_4e38_97c4_d5422dd618dc);
pub const MF_TOPONODE_DECODER: windows_core::GUID = windows_core::GUID::from_u128(0x494bbd02_b031_4e38_97c4_d5422dd618dc);
pub const MF_TOPONODE_DECRYPTOR: windows_core::GUID = windows_core::GUID::from_u128(0x494bbcfa_b031_4e38_97c4_d5422dd618dc);
pub const MF_TOPONODE_DISABLE_PREROLL: windows_core::GUID = windows_core::GUID::from_u128(0x14932f9e_9087_4bb4_8412_5167145cbe04);
pub const MF_TOPONODE_DISCARDABLE: windows_core::GUID = windows_core::GUID::from_u128(0x494bbcfb_b031_4e38_97c4_d5422dd618dc);
pub const MF_TOPONODE_DRAIN: windows_core::GUID = windows_core::GUID::from_u128(0x494bbce9_b031_4e38_97c4_d5422dd618dc);
pub const MF_TOPONODE_DRAIN_ALWAYS: MF_TOPONODE_DRAIN_MODE = MF_TOPONODE_DRAIN_MODE(1i32);
pub const MF_TOPONODE_DRAIN_DEFAULT: MF_TOPONODE_DRAIN_MODE = MF_TOPONODE_DRAIN_MODE(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_TOPONODE_DRAIN_MODE(pub i32);
pub const MF_TOPONODE_DRAIN_NEVER: MF_TOPONODE_DRAIN_MODE = MF_TOPONODE_DRAIN_MODE(2i32);
pub const MF_TOPONODE_ERRORCODE: windows_core::GUID = windows_core::GUID::from_u128(0x494bbcee_b031_4e38_97c4_d5422dd618dc);
pub const MF_TOPONODE_ERROR_MAJORTYPE: windows_core::GUID = windows_core::GUID::from_u128(0x494bbcfd_b031_4e38_97c4_d5422dd618dc);
pub const MF_TOPONODE_ERROR_SUBTYPE: windows_core::GUID = windows_core::GUID::from_u128(0x494bbcfe_b031_4e38_97c4_d5422dd618dc);
pub const MF_TOPONODE_FLUSH: windows_core::GUID = windows_core::GUID::from_u128(0x494bbce8_b031_4e38_97c4_d5422dd618dc);
pub const MF_TOPONODE_FLUSH_ALWAYS: MF_TOPONODE_FLUSH_MODE = MF_TOPONODE_FLUSH_MODE(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_TOPONODE_FLUSH_MODE(pub i32);
pub const MF_TOPONODE_FLUSH_NEVER: MF_TOPONODE_FLUSH_MODE = MF_TOPONODE_FLUSH_MODE(2i32);
pub const MF_TOPONODE_FLUSH_SEEK: MF_TOPONODE_FLUSH_MODE = MF_TOPONODE_FLUSH_MODE(1i32);
pub const MF_TOPONODE_LOCKED: windows_core::GUID = windows_core::GUID::from_u128(0x494bbcf7_b031_4e38_97c4_d5422dd618dc);
pub const MF_TOPONODE_MARKIN_HERE: windows_core::GUID = windows_core::GUID::from_u128(0x494bbd00_b031_4e38_97c4_d5422dd618dc);
pub const MF_TOPONODE_MARKOUT_HERE: windows_core::GUID = windows_core::GUID::from_u128(0x494bbd01_b031_4e38_97c4_d5422dd618dc);
pub const MF_TOPONODE_MEDIASTART: windows_core::GUID = windows_core::GUID::from_u128(0x835c58ea_e075_4bc7_bcba_4de000df9ae6);
pub const MF_TOPONODE_MEDIASTOP: windows_core::GUID = windows_core::GUID::from_u128(0x835c58eb_e075_4bc7_bcba_4de000df9ae6);
pub const MF_TOPONODE_NOSHUTDOWN_ON_REMOVE: windows_core::GUID = windows_core::GUID::from_u128(0x14932f9c_9087_4bb4_8412_5167145cbe04);
pub const MF_TOPONODE_PRESENTATION_DESCRIPTOR: windows_core::GUID = windows_core::GUID::from_u128(0x835c58ed_e075_4bc7_bcba_4de000df9ae6);
pub const MF_TOPONODE_PRIMARYOUTPUT: windows_core::GUID = windows_core::GUID::from_u128(0x6304ef99_16b2_4ebe_9d67_e4c539b3a259);
pub const MF_TOPONODE_RATELESS: windows_core::GUID = windows_core::GUID::from_u128(0x14932f9d_9087_4bb4_8412_5167145cbe04);
pub const MF_TOPONODE_SEQUENCE_ELEMENTID: windows_core::GUID = windows_core::GUID::from_u128(0x835c58ef_e075_4bc7_bcba_4de000df9ae6);
pub const MF_TOPONODE_SOURCE: windows_core::GUID = windows_core::GUID::from_u128(0x835c58ec_e075_4bc7_bcba_4de000df9ae6);
pub const MF_TOPONODE_STREAMID: windows_core::GUID = windows_core::GUID::from_u128(0x14932f9b_9087_4bb4_8412_5167145cbe04);
pub const MF_TOPONODE_STREAM_DESCRIPTOR: windows_core::GUID = windows_core::GUID::from_u128(0x835c58ee_e075_4bc7_bcba_4de000df9ae6);
pub const MF_TOPONODE_TRANSFORM_OBJECTID: windows_core::GUID = windows_core::GUID::from_u128(0x88dcc0c9_293e_4e8b_9aeb_0ad64cc016b0);
pub const MF_TOPONODE_WORKQUEUE_ID: windows_core::GUID = windows_core::GUID::from_u128(0x494bbcf8_b031_4e38_97c4_d5422dd618dc);
pub const MF_TOPONODE_WORKQUEUE_ITEM_PRIORITY: windows_core::GUID = windows_core::GUID::from_u128(0xa1ff99be_5e97_4a53_b494_568c642c0ff3);
pub const MF_TOPONODE_WORKQUEUE_MMCSS_CLASS: windows_core::GUID = windows_core::GUID::from_u128(0x494bbcf9_b031_4e38_97c4_d5422dd618dc);
pub const MF_TOPONODE_WORKQUEUE_MMCSS_PRIORITY: windows_core::GUID = windows_core::GUID::from_u128(0x5001f840_2816_48f4_9364_ad1ef661a123);
pub const MF_TOPONODE_WORKQUEUE_MMCSS_TASKID: windows_core::GUID = windows_core::GUID::from_u128(0x494bbcff_b031_4e38_97c4_d5422dd618dc);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_TOPOSTATUS(pub i32);
pub const MF_TOPOSTATUS_DYNAMIC_CHANGED: MF_TOPOSTATUS = MF_TOPOSTATUS(210i32);
pub const MF_TOPOSTATUS_ENDED: MF_TOPOSTATUS = MF_TOPOSTATUS(400i32);
pub const MF_TOPOSTATUS_INVALID: MF_TOPOSTATUS = MF_TOPOSTATUS(0i32);
pub const MF_TOPOSTATUS_READY: MF_TOPOSTATUS = MF_TOPOSTATUS(100i32);
pub const MF_TOPOSTATUS_SINK_SWITCHED: MF_TOPOSTATUS = MF_TOPOSTATUS(300i32);
pub const MF_TOPOSTATUS_STARTED_SOURCE: MF_TOPOSTATUS = MF_TOPOSTATUS(200i32);
pub const MF_TRANSCODE_ADJUST_PROFILE: windows_core::GUID = windows_core::GUID::from_u128(0x9c37c21b_060f_487c_a690_80d7f50d1c72);
pub const MF_TRANSCODE_ADJUST_PROFILE_DEFAULT: MF_TRANSCODE_ADJUST_PROFILE_FLAGS = MF_TRANSCODE_ADJUST_PROFILE_FLAGS(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_TRANSCODE_ADJUST_PROFILE_FLAGS(pub i32);
pub const MF_TRANSCODE_ADJUST_PROFILE_USE_SOURCE_ATTRIBUTES: MF_TRANSCODE_ADJUST_PROFILE_FLAGS = MF_TRANSCODE_ADJUST_PROFILE_FLAGS(1i32);
pub const MF_TRANSCODE_CONTAINERTYPE: windows_core::GUID = windows_core::GUID::from_u128(0x150ff23f_4abc_478b_ac4f_e1916fba1cca);
pub const MF_TRANSCODE_DONOT_INSERT_ENCODER: windows_core::GUID = windows_core::GUID::from_u128(0xf45aa7ce_ab24_4012_a11b_dc8220201410);
pub const MF_TRANSCODE_ENCODINGPROFILE: windows_core::GUID = windows_core::GUID::from_u128(0x6947787c_f508_4ea9_b1e9_a1fe3a49fbc9);
pub const MF_TRANSCODE_QUALITYVSSPEED: windows_core::GUID = windows_core::GUID::from_u128(0x98332df8_03cd_476b_89fa_3f9e442dec9f);
#[repr(C)]
#[derive(Clone, Debug, Default, PartialEq)]
pub struct MF_TRANSCODE_SINK_INFO {
pub dwVideoStreamID: u32,
pub pVideoMediaType: core::mem::ManuallyDrop<Option<IMFMediaType>>,
pub dwAudioStreamID: u32,
pub pAudioMediaType: core::mem::ManuallyDrop<Option<IMFMediaType>>,
}
pub const MF_TRANSCODE_SKIP_METADATA_TRANSFER: windows_core::GUID = windows_core::GUID::from_u128(0x4e4469ef_b571_4959_8f83_3dcfba33a393);
pub const MF_TRANSCODE_TOPOLOGYMODE: windows_core::GUID = windows_core::GUID::from_u128(0x3e3df610_394a_40b2_9dea_3bab650bebf2);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_TRANSCODE_TOPOLOGYMODE_FLAGS(pub i32);
pub const MF_TRANSCODE_TOPOLOGYMODE_HARDWARE_ALLOWED: MF_TRANSCODE_TOPOLOGYMODE_FLAGS = MF_TRANSCODE_TOPOLOGYMODE_FLAGS(1i32);
pub const MF_TRANSCODE_TOPOLOGYMODE_SOFTWARE_ONLY: MF_TRANSCODE_TOPOLOGYMODE_FLAGS = MF_TRANSCODE_TOPOLOGYMODE_FLAGS(0i32);
pub const MF_TRANSFORM_ASYNC: windows_core::GUID = windows_core::GUID::from_u128(0xf81a699a_649a_497d_8c73_29f8fed6ad7a);
pub const MF_TRANSFORM_ASYNC_UNLOCK: windows_core::GUID = windows_core::GUID::from_u128(0xe5666d6b_3422_4eb6_a421_da7db1f8e207);
pub const MF_TRANSFORM_CATEGORY_Attribute: windows_core::GUID = windows_core::GUID::from_u128(0xceabba49_506d_4757_a6ff_66c184987e4e);
pub const MF_TRANSFORM_FLAGS_Attribute: windows_core::GUID = windows_core::GUID::from_u128(0x9359bb7e_6275_46c4_a025_1c01e45f1a86);
pub const MF_TYPE_ERR: u32 = 2154840069u32;
pub const MF_UNKNOWN_DURATION: u32 = 0u32;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_URL_TRUST_STATUS(pub i32);
pub const MF_USER_DATA_PAYLOAD: windows_core::GUID = windows_core::GUID::from_u128(0xd1d4985d_dc92_457a_b3a0_651a33a31047);
pub const MF_USER_EXTENDED_ATTRIBUTES: windows_core::GUID = windows_core::GUID::from_u128(0xc02abac6_feb2_4541_922f_920b43702722);
pub const MF_USER_MODE_COMPONENT_LOAD: u32 = 1u32;
pub const MF_VERSION: u32 = 131184u32;
pub const MF_VIDEODSP_MODE: windows_core::GUID = windows_core::GUID::from_u128(0x16d720f0_768c_11de_8a39_0800200c9a66);
pub const MF_VIDEO_MAX_MB_PER_SEC: windows_core::GUID = windows_core::GUID::from_u128(0xe3f2e203_d445_4b8c_9211_ae390d3ba017);
pub const MF_VIDEO_PROCESSOR_ALGORITHM: windows_core::GUID = windows_core::GUID::from_u128(0x4a0a1e1f_272c_4fb6_9eb1_db330cbc97ca);
pub const MF_VIDEO_PROCESSOR_ALGORITHM_DEFAULT: MF_VIDEO_PROCESSOR_ALGORITHM_TYPE = MF_VIDEO_PROCESSOR_ALGORITHM_TYPE(0i32);
pub const MF_VIDEO_PROCESSOR_ALGORITHM_MRF_CRF_444: MF_VIDEO_PROCESSOR_ALGORITHM_TYPE = MF_VIDEO_PROCESSOR_ALGORITHM_TYPE(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_VIDEO_PROCESSOR_ALGORITHM_TYPE(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_VIDEO_PROCESSOR_MIRROR(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MF_VIDEO_PROCESSOR_ROTATION(pub i32);
pub const MF_VIDEO_RENDERER_EFFECT_APP_SERVICE_NAME: windows_core::GUID = windows_core::GUID::from_u128(0xc6052a80_6d9c_40a3_9db8_f027a25c9ab9);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MF_VIDEO_SPHERICAL_VIEWDIRECTION {
pub iHeading: i32,
pub iPitch: i32,
pub iRoll: i32,
}
pub const MF_VIRTUALCAMERA_ASSOCIATED_CAMERA_SOURCES: windows_core::GUID = windows_core::GUID::from_u128(0x1bb79e7c_5d83_438c_94d8_e5f0df6d3279);
pub const MF_VIRTUALCAMERA_CONFIGURATION_APP_PACKAGE_FAMILY_NAME: windows_core::GUID = windows_core::GUID::from_u128(0x658abe51_8044_462e_97ea_e676fd72055f);
pub const MF_VIRTUALCAMERA_PROVIDE_ASSOCIATED_CAMERA_SOURCES: windows_core::GUID = windows_core::GUID::from_u128(0xf0273718_4a4d_4ac5_a15d_305eb5e90667);
pub const MF_WINDOW_WORKQUEUE: MFASYNC_WORKQUEUE_TYPE = MFASYNC_WORKQUEUE_TYPE(1i32);
pub const MF_WORKQUEUE_SERVICES: windows_core::GUID = windows_core::GUID::from_u128(0x8e37d489_41e0_413a_9068_287c886d8dda);
pub const MF_WRAPPED_BUFFER_SERVICE: windows_core::GUID = windows_core::GUID::from_u128(0xab544072_c269_4ebc_a552_1c3b32bed5ca);
pub const MF_WRAPPED_OBJECT: windows_core::GUID = windows_core::GUID::from_u128(0x2b182c4c_d6ac_49f4_8915_f71887db70cd);
pub const MF_WRAPPED_SAMPLE_SERVICE: windows_core::GUID = windows_core::GUID::from_u128(0x31f52bf2_d03e_4048_80d0_9c1046d87c61);
pub const MF_WVC1_PROG_SINGLE_SLICE_CONTENT: windows_core::GUID = windows_core::GUID::from_u128(0x67ec2559_0f2f_4420_a4dd_2f8ee7a5738b);
pub const MF_XVP_CALLER_ALLOCATES_OUTPUT: windows_core::GUID = windows_core::GUID::from_u128(0x04a2cabc_0cab_40b1_a1b9_75bc3658f000);
pub const MF_XVP_DISABLE_FRC: windows_core::GUID = windows_core::GUID::from_u128(0x2c0afa19_7a97_4d5a_9ee8_16d4fc518d8c);
pub const MF_XVP_SAMPLE_LOCK_TIMEOUT: windows_core::GUID = windows_core::GUID::from_u128(0xaa4ddb29_5134_4363_ac72_83ec4bc10426);
pub const MFaudioConstriction14_14: MFAudioConstriction = MFAudioConstriction(3i32);
pub const MFaudioConstriction44_16: MFAudioConstriction = MFAudioConstriction(2i32);
pub const MFaudioConstriction48_16: MFAudioConstriction = MFAudioConstriction(1i32);
pub const MFaudioConstrictionMute: MFAudioConstriction = MFAudioConstriction(4i32);
pub const MFaudioConstrictionOff: MFAudioConstriction = MFAudioConstriction(0i32);
pub const MICARRAY_EXTERN_BEAM: MIC_ARRAY_MODE = MIC_ARRAY_MODE(2048i32);
pub const MICARRAY_FIXED_BEAM: MIC_ARRAY_MODE = MIC_ARRAY_MODE(1024i32);
pub const MICARRAY_SIMPLE_SUM: MIC_ARRAY_MODE = MIC_ARRAY_MODE(256i32);
pub const MICARRAY_SINGLE_BEAM: MIC_ARRAY_MODE = MIC_ARRAY_MODE(512i32);
pub const MICARRAY_SINGLE_CHAN: MIC_ARRAY_MODE = MIC_ARRAY_MODE(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MIC_ARRAY_MODE(pub i32);
pub const MIRROR_HORIZONTAL: MF_VIDEO_PROCESSOR_MIRROR = MF_VIDEO_PROCESSOR_MIRROR(1i32);
pub const MIRROR_NONE: MF_VIDEO_PROCESSOR_MIRROR = MF_VIDEO_PROCESSOR_MIRROR(0i32);
pub const MIRROR_VERTICAL: MF_VIDEO_PROCESSOR_MIRROR = MF_VIDEO_PROCESSOR_MIRROR(2i32);
pub const MODE_NOT_SET: AEC_SYSTEM_MODE = AEC_SYSTEM_MODE(6i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct MOVEREGION_INFO {
pub FrameNumber: u32,
pub NumMoveRegions: u32,
pub MoveRegions: [MOVE_RECT; 1],
}
impl Default for MOVEREGION_INFO {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MOVE_RECT {
pub SourcePoint: super::super::Foundation::POINT,
pub DestRect: super::super::Foundation::RECT,
}
pub const MP3ACMCodecWrapper: windows_core::GUID = windows_core::GUID::from_u128(0x11103421_354c_4cca_a7a3_1aff9a5b6701);
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Gdi")]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct MPEG1VIDEOINFO {
pub hdr: VIDEOINFOHEADER,
pub dwStartTimeCode: u32,
pub cbSequenceHeader: u32,
pub bSequenceHeader: [u8; 1],
}
#[cfg(feature = "Win32_Graphics_Gdi")]
impl Default for MPEG1VIDEOINFO {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Gdi")]
#[derive(Clone, Copy)]
pub struct MPEG2VIDEOINFO {
pub hdr: VIDEOINFOHEADER2,
pub dwStartTimeCode: u32,
pub cbSequenceHeader: u32,
pub dwProfile: u32,
pub dwLevel: u32,
pub dwFlags: MPEG2VIDEOINFO_FLAGS,
pub dwSequenceHeader: [u32; 1],
}
#[cfg(feature = "Win32_Graphics_Gdi")]
impl Default for MPEG2VIDEOINFO {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct MPEG2VIDEOINFO_FLAGS(pub u32);
impl MPEG2VIDEOINFO_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for MPEG2VIDEOINFO_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for MPEG2VIDEOINFO_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for MPEG2VIDEOINFO_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for MPEG2VIDEOINFO_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for MPEG2VIDEOINFO_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const MR_AUDIO_POLICY_SERVICE: windows_core::GUID = windows_core::GUID::from_u128(0x911fd737_6775_4ab0_a614_297862fdac88);
pub const MR_BUFFER_SERVICE: windows_core::GUID = windows_core::GUID::from_u128(0xa562248c_9ac6_4ffc_9fba_3af8f8ad1a4d);
pub const MR_CAPTURE_POLICY_VOLUME_SERVICE: windows_core::GUID = windows_core::GUID::from_u128(0x24030acd_107a_4265_975c_414e33e65f2a);
pub const MR_POLICY_VOLUME_SERVICE: windows_core::GUID = windows_core::GUID::from_u128(0x1abaa2ac_9d3b_47c6_ab48_c59506de784d);
pub const MR_STREAM_VOLUME_SERVICE: windows_core::GUID = windows_core::GUID::from_u128(0xf8b5fa2f_32ef_46f5_b172_1321212fb2c4);
pub const MR_VIDEO_ACCELERATION_SERVICE: windows_core::GUID = windows_core::GUID::from_u128(0xefef5175_5c7d_4ce2_bbbd_34ff8bca6554);
pub const MR_VIDEO_MIXER_SERVICE: windows_core::GUID = windows_core::GUID::from_u128(0x073cd2fc_6cf4_40b7_8859_e89552c841f8);
pub const MR_VIDEO_RENDER_SERVICE: windows_core::GUID = windows_core::GUID::from_u128(0x1092a86c_ab1a_459a_a336_831fbc4d11ff);
pub const MSAMRNBDecoder: windows_core::GUID = windows_core::GUID::from_u128(0x265011ae_5481_4f77_a295_abb6ffe8d63e);
pub const MSAMRNBEncoder: windows_core::GUID = windows_core::GUID::from_u128(0x2fae8afe_04a3_423a_a814_85db454712b0);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MT_ARBITRARY_HEADER {
pub majortype: windows_core::GUID,
pub subtype: windows_core::GUID,
pub bFixedSizeSamples: windows_core::BOOL,
pub bTemporalCompression: windows_core::BOOL,
pub lSampleSize: u32,
pub formattype: windows_core::GUID,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct MT_CUSTOM_VIDEO_PRIMARIES {
pub fRx: f32,
pub fRy: f32,
pub fGx: f32,
pub fGy: f32,
pub fBx: f32,
pub fBy: f32,
pub fWx: f32,
pub fWy: f32,
}
pub const MULawCodecWrapper: windows_core::GUID = windows_core::GUID::from_u128(0x92b66080_5e2d_449e_90c4_c41f268e5514);
pub const OPENMODE_APPEND_IF_EXIST: FILE_OPENMODE = FILE_OPENMODE(3i32);
pub const OPENMODE_DELETE_IF_EXIST: FILE_OPENMODE = FILE_OPENMODE(4i32);
pub const OPENMODE_FAIL_IF_EXIST: FILE_OPENMODE = FILE_OPENMODE(1i32);
pub const OPENMODE_FAIL_IF_NOT_EXIST: FILE_OPENMODE = FILE_OPENMODE(0i32);
pub const OPENMODE_RESET_IF_EXIST: FILE_OPENMODE = FILE_OPENMODE(2i32);
pub const OPM_128_BIT_RANDOM_NUMBER_SIZE: OPM_TYPE = OPM_TYPE(16i32);
#[repr(C, packed(1))]
#[derive(Clone, Copy)]
pub struct OPM_ACP_AND_CGMSA_SIGNALING {
pub rnRandomNumber: OPM_RANDOM_NUMBER,
pub ulStatusFlags: u32,
pub ulAvailableTVProtectionStandards: u32,
pub ulActiveTVProtectionStandard: u32,
pub ulReserved: u32,
pub ulAspectRatioValidMask1: u32,
pub ulAspectRatioData1: u32,
pub ulAspectRatioValidMask2: u32,
pub ulAspectRatioData2: u32,
pub ulAspectRatioValidMask3: u32,
pub ulAspectRatioData3: u32,
pub ulReserved2: [u32; 4],
pub ulReserved3: [u32; 4],
}
impl Default for OPM_ACP_AND_CGMSA_SIGNALING {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const OPM_ACP_LEVEL_ONE: OPM_ACP_PROTECTION_LEVEL = OPM_ACP_PROTECTION_LEVEL(1i32);
pub const OPM_ACP_LEVEL_THREE: OPM_ACP_PROTECTION_LEVEL = OPM_ACP_PROTECTION_LEVEL(3i32);
pub const OPM_ACP_LEVEL_TWO: OPM_ACP_PROTECTION_LEVEL = OPM_ACP_PROTECTION_LEVEL(2i32);
pub const OPM_ACP_OFF: OPM_ACP_PROTECTION_LEVEL = OPM_ACP_PROTECTION_LEVEL(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct OPM_ACP_PROTECTION_LEVEL(pub i32);
#[repr(C, packed(1))]
#[cfg(feature = "Win32_Graphics_Direct3D9")]
#[derive(Clone, Copy, Default)]
pub struct OPM_ACTUAL_OUTPUT_FORMAT {
pub rnRandomNumber: OPM_RANDOM_NUMBER,
pub ulStatusFlags: u32,
pub ulDisplayWidth: u32,
pub ulDisplayHeight: u32,
pub dsfSampleInterleaveFormat: DXVA2_SampleFormat,
pub d3dFormat: super::super::Graphics::Direct3D9::D3DFORMAT,
pub ulFrequencyNumerator: u32,
pub ulFrequencyDenominator: u32,
}
pub const OPM_ASPECT_RATIO_EN300294_BOX_14_BY_9_CENTER: OPM_IMAGE_ASPECT_RATIO_EN300294 = OPM_IMAGE_ASPECT_RATIO_EN300294(1i32);
pub const OPM_ASPECT_RATIO_EN300294_BOX_14_BY_9_TOP: OPM_IMAGE_ASPECT_RATIO_EN300294 = OPM_IMAGE_ASPECT_RATIO_EN300294(2i32);
pub const OPM_ASPECT_RATIO_EN300294_BOX_16_BY_9_CENTER: OPM_IMAGE_ASPECT_RATIO_EN300294 = OPM_IMAGE_ASPECT_RATIO_EN300294(3i32);
pub const OPM_ASPECT_RATIO_EN300294_BOX_16_BY_9_TOP: OPM_IMAGE_ASPECT_RATIO_EN300294 = OPM_IMAGE_ASPECT_RATIO_EN300294(4i32);
pub const OPM_ASPECT_RATIO_EN300294_BOX_GT_16_BY_9_CENTER: OPM_IMAGE_ASPECT_RATIO_EN300294 = OPM_IMAGE_ASPECT_RATIO_EN300294(5i32);
pub const OPM_ASPECT_RATIO_EN300294_FULL_FORMAT_16_BY_9_ANAMORPHIC: OPM_IMAGE_ASPECT_RATIO_EN300294 = OPM_IMAGE_ASPECT_RATIO_EN300294(7i32);
pub const OPM_ASPECT_RATIO_EN300294_FULL_FORMAT_4_BY_3: OPM_IMAGE_ASPECT_RATIO_EN300294 = OPM_IMAGE_ASPECT_RATIO_EN300294(0i32);
pub const OPM_ASPECT_RATIO_EN300294_FULL_FORMAT_4_BY_3_PROTECTED_CENTER: OPM_IMAGE_ASPECT_RATIO_EN300294 = OPM_IMAGE_ASPECT_RATIO_EN300294(6i32);
pub const OPM_BUS_IMPLEMENTATION_MODIFIER_DAUGHTER_BOARD_CONNECTOR: OPM_BUS_TYPE = OPM_BUS_TYPE(262144i32);
pub const OPM_BUS_IMPLEMENTATION_MODIFIER_DAUGHTER_BOARD_CONNECTOR_INSIDE_OF_NUAE: OPM_BUS_TYPE = OPM_BUS_TYPE(327680i32);
pub const OPM_BUS_IMPLEMENTATION_MODIFIER_INSIDE_OF_CHIPSET: OPM_BUS_TYPE = OPM_BUS_TYPE(65536i32);
pub const OPM_BUS_IMPLEMENTATION_MODIFIER_MASK: OPM_TYPE = OPM_TYPE(32767i32);
pub const OPM_BUS_IMPLEMENTATION_MODIFIER_NON_STANDARD: OPM_BUS_TYPE = OPM_BUS_TYPE(-2147483648i32);
pub const OPM_BUS_IMPLEMENTATION_MODIFIER_TRACKS_ON_MOTHER_BOARD_TO_CHIP: OPM_BUS_TYPE = OPM_BUS_TYPE(131072i32);
pub const OPM_BUS_IMPLEMENTATION_MODIFIER_TRACKS_ON_MOTHER_BOARD_TO_SOCKET: OPM_BUS_TYPE = OPM_BUS_TYPE(196608i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct OPM_BUS_TYPE(pub i32);
pub const OPM_BUS_TYPE_AGP: OPM_BUS_TYPE = OPM_BUS_TYPE(4i32);
pub const OPM_BUS_TYPE_MASK: OPM_TYPE = OPM_TYPE(65535i32);
pub const OPM_BUS_TYPE_OTHER: OPM_BUS_TYPE = OPM_BUS_TYPE(0i32);
pub const OPM_BUS_TYPE_PCI: OPM_BUS_TYPE = OPM_BUS_TYPE(1i32);
pub const OPM_BUS_TYPE_PCIEXPRESS: OPM_BUS_TYPE = OPM_BUS_TYPE(3i32);
pub const OPM_BUS_TYPE_PCIX: OPM_BUS_TYPE = OPM_BUS_TYPE(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct OPM_CGMSA(pub i32);
pub const OPM_CGMSA_COPY_FREELY: OPM_CGMSA = OPM_CGMSA(1i32);
pub const OPM_CGMSA_COPY_NEVER: OPM_CGMSA = OPM_CGMSA(4i32);
pub const OPM_CGMSA_COPY_NO_MORE: OPM_CGMSA = OPM_CGMSA(2i32);
pub const OPM_CGMSA_COPY_ONE_GENERATION: OPM_CGMSA = OPM_CGMSA(3i32);
pub const OPM_CGMSA_OFF: OPM_CGMSA = OPM_CGMSA(0i32);
pub const OPM_CGMSA_REDISTRIBUTION_CONTROL_REQUIRED: OPM_CGMSA = OPM_CGMSA(8i32);
#[repr(C, packed(1))]
#[derive(Clone, Copy)]
pub struct OPM_CONFIGURE_PARAMETERS {
pub omac: OPM_OMAC,
pub guidSetting: windows_core::GUID,
pub ulSequenceNumber: u32,
pub cbParametersSize: u32,
pub abParameters: [u8; 4056],
}
impl Default for OPM_CONFIGURE_PARAMETERS {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const OPM_CONFIGURE_SETTING_DATA_SIZE: OPM_TYPE = OPM_TYPE(4056i32);
#[repr(C, packed(1))]
#[derive(Clone, Copy)]
pub struct OPM_CONNECTED_HDCP_DEVICE_INFORMATION {
pub rnRandomNumber: OPM_RANDOM_NUMBER,
pub ulStatusFlags: u32,
pub ulHDCPFlags: u32,
pub ksvB: OPM_HDCP_KEY_SELECTION_VECTOR,
pub Reserved: [u8; 11],
pub Reserved2: [u8; 16],
pub Reserved3: [u8; 16],
}
impl Default for OPM_CONNECTED_HDCP_DEVICE_INFORMATION {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct OPM_CONNECTOR_TYPE(pub i32);
pub const OPM_CONNECTOR_TYPE_COMPONENT_VIDEO: OPM_CONNECTOR_TYPE = OPM_CONNECTOR_TYPE(3i32);
pub const OPM_CONNECTOR_TYPE_COMPOSITE_VIDEO: OPM_CONNECTOR_TYPE = OPM_CONNECTOR_TYPE(2i32);
pub const OPM_CONNECTOR_TYPE_DISPLAYPORT_EMBEDDED: OPM_CONNECTOR_TYPE = OPM_CONNECTOR_TYPE(11i32);
pub const OPM_CONNECTOR_TYPE_DISPLAYPORT_EXTERNAL: OPM_CONNECTOR_TYPE = OPM_CONNECTOR_TYPE(10i32);
pub const OPM_CONNECTOR_TYPE_DVI: OPM_CONNECTOR_TYPE = OPM_CONNECTOR_TYPE(4i32);
pub const OPM_CONNECTOR_TYPE_D_JPN: OPM_CONNECTOR_TYPE = OPM_CONNECTOR_TYPE(8i32);
pub const OPM_CONNECTOR_TYPE_HDMI: OPM_CONNECTOR_TYPE = OPM_CONNECTOR_TYPE(5i32);
pub const OPM_CONNECTOR_TYPE_LVDS: OPM_CONNECTOR_TYPE = OPM_CONNECTOR_TYPE(6i32);
pub const OPM_CONNECTOR_TYPE_MIRACAST: OPM_CONNECTOR_TYPE = OPM_CONNECTOR_TYPE(15i32);
pub const OPM_CONNECTOR_TYPE_OTHER: OPM_CONNECTOR_TYPE = OPM_CONNECTOR_TYPE(-1i32);
pub const OPM_CONNECTOR_TYPE_RESERVED: OPM_CONNECTOR_TYPE = OPM_CONNECTOR_TYPE(14i32);
pub const OPM_CONNECTOR_TYPE_SDI: OPM_CONNECTOR_TYPE = OPM_CONNECTOR_TYPE(9i32);
pub const OPM_CONNECTOR_TYPE_SVIDEO: OPM_CONNECTOR_TYPE = OPM_CONNECTOR_TYPE(1i32);
pub const OPM_CONNECTOR_TYPE_TRANSPORT_AGNOSTIC_DIGITAL_MODE_A: OPM_CONNECTOR_TYPE = OPM_CONNECTOR_TYPE(16i32);
pub const OPM_CONNECTOR_TYPE_TRANSPORT_AGNOSTIC_DIGITAL_MODE_B: OPM_CONNECTOR_TYPE = OPM_CONNECTOR_TYPE(17i32);
pub const OPM_CONNECTOR_TYPE_UDI_EMBEDDED: OPM_CONNECTOR_TYPE = OPM_CONNECTOR_TYPE(13i32);
pub const OPM_CONNECTOR_TYPE_UDI_EXTERNAL: OPM_CONNECTOR_TYPE = OPM_CONNECTOR_TYPE(12i32);
pub const OPM_CONNECTOR_TYPE_VGA: OPM_CONNECTOR_TYPE = OPM_CONNECTOR_TYPE(0i32);
pub const OPM_COPP_COMPATIBLE_BUS_TYPE_INTEGRATED: OPM_BUS_TYPE = OPM_BUS_TYPE(-2147483648i32);
pub const OPM_COPP_COMPATIBLE_CONNECTOR_TYPE_INTERNAL: OPM_CONNECTOR_TYPE = OPM_CONNECTOR_TYPE(-2147483648i32);
#[repr(C, packed(1))]
#[derive(Clone, Copy)]
pub struct OPM_COPP_COMPATIBLE_GET_INFO_PARAMETERS {
pub rnRandomNumber: OPM_RANDOM_NUMBER,
pub guidInformation: windows_core::GUID,
pub ulSequenceNumber: u32,
pub cbParametersSize: u32,
pub abParameters: [u8; 4056],
}
impl Default for OPM_COPP_COMPATIBLE_GET_INFO_PARAMETERS {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const OPM_DPCP_OFF: OPM_DPCP_PROTECTION_LEVEL = OPM_DPCP_PROTECTION_LEVEL(0i32);
pub const OPM_DPCP_ON: OPM_DPCP_PROTECTION_LEVEL = OPM_DPCP_PROTECTION_LEVEL(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct OPM_DPCP_PROTECTION_LEVEL(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct OPM_DVI_CHARACTERISTIC(pub i32);
pub const OPM_DVI_CHARACTERISTIC_1_0: OPM_DVI_CHARACTERISTIC = OPM_DVI_CHARACTERISTIC(1i32);
pub const OPM_DVI_CHARACTERISTIC_1_1_OR_ABOVE: OPM_DVI_CHARACTERISTIC = OPM_DVI_CHARACTERISTIC(2i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct OPM_ENCRYPTED_INITIALIZATION_PARAMETERS {
pub abEncryptedInitializationParameters: [u8; 256],
}
impl Default for OPM_ENCRYPTED_INITIALIZATION_PARAMETERS {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const OPM_ENCRYPTED_INITIALIZATION_PARAMETERS_SIZE: OPM_TYPE = OPM_TYPE(256i32);
pub const OPM_GET_ACP_AND_CGMSA_SIGNALING: windows_core::GUID = windows_core::GUID::from_u128(0x6629a591_3b79_4cf3_924a_11e8e7811671);
pub const OPM_GET_ACTUAL_OUTPUT_FORMAT: windows_core::GUID = windows_core::GUID::from_u128(0xd7bf1ba3_ad13_4f8e_af98_0dcb3ca204cc);
pub const OPM_GET_ACTUAL_PROTECTION_LEVEL: windows_core::GUID = windows_core::GUID::from_u128(0x1957210a_7766_452a_b99a_d27aed54f03a);
pub const OPM_GET_ADAPTER_BUS_TYPE: windows_core::GUID = windows_core::GUID::from_u128(0xc6f4d673_6174_4184_8e35_f6db5200bcba);
pub const OPM_GET_CODEC_INFO: windows_core::GUID = windows_core::GUID::from_u128(0x4f374491_8f5f_4445_9dba_95588f6b58b4);
#[repr(C, packed(1))]
#[derive(Clone, Copy, Default)]
pub struct OPM_GET_CODEC_INFO_INFORMATION {
pub rnRandomNumber: OPM_RANDOM_NUMBER,
pub Merit: u32,
}
#[repr(C, packed(1))]
#[derive(Clone, Copy)]
pub struct OPM_GET_CODEC_INFO_PARAMETERS {
pub cbVerifier: u32,
pub Verifier: [u8; 4052],
}
impl Default for OPM_GET_CODEC_INFO_PARAMETERS {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const OPM_GET_CONNECTED_HDCP_DEVICE_INFORMATION: windows_core::GUID = windows_core::GUID::from_u128(0x0db59d74_a992_492e_a0bd_c23fda564e00);
pub const OPM_GET_CONNECTOR_TYPE: windows_core::GUID = windows_core::GUID::from_u128(0x81d0bfd5_6afe_48c2_99c0_95a08f97c5da);
pub const OPM_GET_CURRENT_HDCP_SRM_VERSION: windows_core::GUID = windows_core::GUID::from_u128(0x99c5ceff_5f1d_4879_81c1_c52443c9482b);
pub const OPM_GET_DVI_CHARACTERISTICS: windows_core::GUID = windows_core::GUID::from_u128(0xa470b3bb_5dd7_4172_839c_3d3776e0ebf5);
pub const OPM_GET_INFORMATION_PARAMETERS_SIZE: OPM_TYPE = OPM_TYPE(4056i32);
#[repr(C, packed(1))]
#[derive(Clone, Copy)]
pub struct OPM_GET_INFO_PARAMETERS {
pub omac: OPM_OMAC,
pub rnRandomNumber: OPM_RANDOM_NUMBER,
pub guidInformation: windows_core::GUID,
pub ulSequenceNumber: u32,
pub cbParametersSize: u32,
pub abParameters: [u8; 4056],
}
impl Default for OPM_GET_INFO_PARAMETERS {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const OPM_GET_OUTPUT_HARDWARE_PROTECTION_SUPPORT: windows_core::GUID = windows_core::GUID::from_u128(0x3b129589_2af8_4ef0_96a2_704a845a218e);
pub const OPM_GET_OUTPUT_ID: windows_core::GUID = windows_core::GUID::from_u128(0x72cb6df3_244f_40ce_b09e_20506af6302f);
pub const OPM_GET_SUPPORTED_PROTECTION_TYPES: windows_core::GUID = windows_core::GUID::from_u128(0x38f2a801_9a6c_48bb_9107_b6696e6f1797);
pub const OPM_GET_VIRTUAL_PROTECTION_LEVEL: windows_core::GUID = windows_core::GUID::from_u128(0xb2075857_3eda_4d5d_88db_748f8c1a0549);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct OPM_HDCP_FLAGS(pub i32);
impl OPM_HDCP_FLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for OPM_HDCP_FLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for OPM_HDCP_FLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for OPM_HDCP_FLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for OPM_HDCP_FLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for OPM_HDCP_FLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const OPM_HDCP_FLAG_NONE: OPM_HDCP_FLAGS = OPM_HDCP_FLAGS(0i32);
pub const OPM_HDCP_FLAG_REPEATER: OPM_HDCP_FLAGS = OPM_HDCP_FLAGS(1i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct OPM_HDCP_KEY_SELECTION_VECTOR {
pub abKeySelectionVector: [u8; 5],
}
impl Default for OPM_HDCP_KEY_SELECTION_VECTOR {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const OPM_HDCP_KEY_SELECTION_VECTOR_SIZE: OPM_TYPE = OPM_TYPE(5i32);
pub const OPM_HDCP_OFF: OPM_HDCP_PROTECTION_LEVEL = OPM_HDCP_PROTECTION_LEVEL(0i32);
pub const OPM_HDCP_ON: OPM_HDCP_PROTECTION_LEVEL = OPM_HDCP_PROTECTION_LEVEL(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct OPM_HDCP_PROTECTION_LEVEL(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct OPM_HDCP_STATUS(pub i32);
pub const OPM_HDCP_STATUS_OFF: OPM_HDCP_STATUS = OPM_HDCP_STATUS(1i32);
pub const OPM_HDCP_STATUS_ON: OPM_HDCP_STATUS = OPM_HDCP_STATUS(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct OPM_HDCP_TYPE(pub i32);
pub const OPM_HDCP_TYPE_0: OPM_HDCP_TYPE = OPM_HDCP_TYPE(0i32);
pub const OPM_HDCP_TYPE_1: OPM_HDCP_TYPE = OPM_HDCP_TYPE(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct OPM_IMAGE_ASPECT_RATIO_EN300294(pub i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct OPM_OMAC {
pub abOMAC: [u8; 16],
}
impl Default for OPM_OMAC {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const OPM_OMAC_SIZE: OPM_TYPE = OPM_TYPE(16i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct OPM_OUTPUT_HARDWARE_PROTECTION(pub i32);
pub const OPM_OUTPUT_HARDWARE_PROTECTION_NOT_SUPPORTED: OPM_OUTPUT_HARDWARE_PROTECTION = OPM_OUTPUT_HARDWARE_PROTECTION(0i32);
pub const OPM_OUTPUT_HARDWARE_PROTECTION_SUPPORTED: OPM_OUTPUT_HARDWARE_PROTECTION = OPM_OUTPUT_HARDWARE_PROTECTION(1i32);
#[repr(C, packed(1))]
#[derive(Clone, Copy, Default)]
pub struct OPM_OUTPUT_ID_DATA {
pub rnRandomNumber: OPM_RANDOM_NUMBER,
pub ulStatusFlags: u32,
pub OutputId: u64,
}
pub const OPM_PROTECTION_STANDARD_ARIBTRB15_1125I: OPM_PROTECTION_STANDARD_TYPE = OPM_PROTECTION_STANDARD_TYPE(16384u32);
pub const OPM_PROTECTION_STANDARD_ARIBTRB15_525I: OPM_PROTECTION_STANDARD_TYPE = OPM_PROTECTION_STANDARD_TYPE(2048u32);
pub const OPM_PROTECTION_STANDARD_ARIBTRB15_525P: OPM_PROTECTION_STANDARD_TYPE = OPM_PROTECTION_STANDARD_TYPE(4096u32);
pub const OPM_PROTECTION_STANDARD_ARIBTRB15_750P: OPM_PROTECTION_STANDARD_TYPE = OPM_PROTECTION_STANDARD_TYPE(8192u32);
pub const OPM_PROTECTION_STANDARD_CEA805A_TYPEA_1125I: OPM_PROTECTION_STANDARD_TYPE = OPM_PROTECTION_STANDARD_TYPE(128u32);
pub const OPM_PROTECTION_STANDARD_CEA805A_TYPEA_525P: OPM_PROTECTION_STANDARD_TYPE = OPM_PROTECTION_STANDARD_TYPE(32u32);
pub const OPM_PROTECTION_STANDARD_CEA805A_TYPEA_750P: OPM_PROTECTION_STANDARD_TYPE = OPM_PROTECTION_STANDARD_TYPE(64u32);
pub const OPM_PROTECTION_STANDARD_CEA805A_TYPEB_1125I: OPM_PROTECTION_STANDARD_TYPE = OPM_PROTECTION_STANDARD_TYPE(1024u32);
pub const OPM_PROTECTION_STANDARD_CEA805A_TYPEB_525P: OPM_PROTECTION_STANDARD_TYPE = OPM_PROTECTION_STANDARD_TYPE(256u32);
pub const OPM_PROTECTION_STANDARD_CEA805A_TYPEB_750P: OPM_PROTECTION_STANDARD_TYPE = OPM_PROTECTION_STANDARD_TYPE(512u32);
pub const OPM_PROTECTION_STANDARD_EIA608B_525: OPM_PROTECTION_STANDARD_TYPE = OPM_PROTECTION_STANDARD_TYPE(8u32);
pub const OPM_PROTECTION_STANDARD_EN300294_625I: OPM_PROTECTION_STANDARD_TYPE = OPM_PROTECTION_STANDARD_TYPE(16u32);
pub const OPM_PROTECTION_STANDARD_IEC61880_2_525I: OPM_PROTECTION_STANDARD_TYPE = OPM_PROTECTION_STANDARD_TYPE(2u32);
pub const OPM_PROTECTION_STANDARD_IEC61880_525I: OPM_PROTECTION_STANDARD_TYPE = OPM_PROTECTION_STANDARD_TYPE(1u32);
pub const OPM_PROTECTION_STANDARD_IEC62375_625P: OPM_PROTECTION_STANDARD_TYPE = OPM_PROTECTION_STANDARD_TYPE(4u32);
pub const OPM_PROTECTION_STANDARD_NONE: OPM_PROTECTION_STANDARD_TYPE = OPM_PROTECTION_STANDARD_TYPE(0u32);
pub const OPM_PROTECTION_STANDARD_OTHER: OPM_PROTECTION_STANDARD_TYPE = OPM_PROTECTION_STANDARD_TYPE(2147483648u32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct OPM_PROTECTION_STANDARD_TYPE(pub u32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct OPM_PROTECTION_TYPE(pub i32);
pub const OPM_PROTECTION_TYPE_ACP: OPM_PROTECTION_TYPE = OPM_PROTECTION_TYPE(2i32);
pub const OPM_PROTECTION_TYPE_CGMSA: OPM_PROTECTION_TYPE = OPM_PROTECTION_TYPE(4i32);
pub const OPM_PROTECTION_TYPE_COPP_COMPATIBLE_HDCP: OPM_PROTECTION_TYPE = OPM_PROTECTION_TYPE(1i32);
pub const OPM_PROTECTION_TYPE_DPCP: OPM_PROTECTION_TYPE = OPM_PROTECTION_TYPE(16i32);
pub const OPM_PROTECTION_TYPE_HDCP: OPM_PROTECTION_TYPE = OPM_PROTECTION_TYPE(8i32);
pub const OPM_PROTECTION_TYPE_NONE: OPM_PROTECTION_TYPE = OPM_PROTECTION_TYPE(0i32);
pub const OPM_PROTECTION_TYPE_OTHER: OPM_PROTECTION_TYPE = OPM_PROTECTION_TYPE(-2147483648i32);
pub const OPM_PROTECTION_TYPE_SIZE: OPM_TYPE = OPM_TYPE(4i32);
pub const OPM_PROTECTION_TYPE_TYPE_ENFORCEMENT_HDCP: OPM_PROTECTION_TYPE = OPM_PROTECTION_TYPE(32i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct OPM_RANDOM_NUMBER {
pub abRandomNumber: [u8; 16],
}
impl Default for OPM_RANDOM_NUMBER {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C, packed(1))]
#[derive(Clone, Copy)]
pub struct OPM_REQUESTED_INFORMATION {
pub omac: OPM_OMAC,
pub cbRequestedInformationSize: u32,
pub abRequestedInformation: [u8; 4076],
}
impl Default for OPM_REQUESTED_INFORMATION {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const OPM_REQUESTED_INFORMATION_SIZE: OPM_TYPE = OPM_TYPE(4076i32);
pub const OPM_SET_ACP_AND_CGMSA_SIGNALING: windows_core::GUID = windows_core::GUID::from_u128(0x09a631a5_d684_4c60_8e4d_d3bb0f0be3ee);
#[repr(C, packed(1))]
#[derive(Clone, Copy)]
pub struct OPM_SET_ACP_AND_CGMSA_SIGNALING_PARAMETERS {
pub ulNewTVProtectionStandard: u32,
pub ulAspectRatioChangeMask1: u32,
pub ulAspectRatioData1: u32,
pub ulAspectRatioChangeMask2: u32,
pub ulAspectRatioData2: u32,
pub ulAspectRatioChangeMask3: u32,
pub ulAspectRatioData3: u32,
pub ulReserved: [u32; 4],
pub ulReserved2: [u32; 4],
pub ulReserved3: u32,
}
impl Default for OPM_SET_ACP_AND_CGMSA_SIGNALING_PARAMETERS {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const OPM_SET_HDCP_SRM: windows_core::GUID = windows_core::GUID::from_u128(0x8b5ef5d1_c30d_44ff_84a5_ea71dce78f13);
#[repr(C, packed(1))]
#[derive(Clone, Copy, Default)]
pub struct OPM_SET_HDCP_SRM_PARAMETERS {
pub ulSRMVersion: u32,
}
pub const OPM_SET_PROTECTION_LEVEL: windows_core::GUID = windows_core::GUID::from_u128(0x9bb9327c_4eb5_4727_9f00_b42b0919c0da);
pub const OPM_SET_PROTECTION_LEVEL_ACCORDING_TO_CSS_DVD: windows_core::GUID = windows_core::GUID::from_u128(0x39ce333e_4cc0_44ae_bfcc_da50b5f82e72);
#[repr(C, packed(1))]
#[derive(Clone, Copy, Default)]
pub struct OPM_SET_PROTECTION_LEVEL_PARAMETERS {
pub ulProtectionType: u32,
pub ulProtectionLevel: u32,
pub Reserved: u32,
pub Reserved2: u32,
}
#[repr(C, packed(1))]
#[derive(Clone, Copy, Default)]
pub struct OPM_STANDARD_INFORMATION {
pub rnRandomNumber: OPM_RANDOM_NUMBER,
pub ulStatusFlags: u32,
pub ulInformation: u32,
pub ulReserved: u32,
pub ulReserved2: u32,
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct OPM_STATUS(pub i32);
pub const OPM_STATUS_LINK_LOST: OPM_STATUS = OPM_STATUS(1i32);
pub const OPM_STATUS_NORMAL: OPM_STATUS = OPM_STATUS(0i32);
pub const OPM_STATUS_RENEGOTIATION_REQUIRED: OPM_STATUS = OPM_STATUS(2i32);
pub const OPM_STATUS_REVOKED_HDCP_DEVICE_ATTACHED: OPM_STATUS = OPM_STATUS(8i32);
pub const OPM_STATUS_TAMPERING_DETECTED: OPM_STATUS = OPM_STATUS(4i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct OPM_TYPE(pub i32);
pub const OPM_TYPE_ENFORCEMENT_HDCP_OFF: OPM_TYPE_ENFORCEMENT_HDCP_PROTECTION_LEVEL = OPM_TYPE_ENFORCEMENT_HDCP_PROTECTION_LEVEL(0i32);
pub const OPM_TYPE_ENFORCEMENT_HDCP_ON_WITH_NO_TYPE_RESTRICTION: OPM_TYPE_ENFORCEMENT_HDCP_PROTECTION_LEVEL = OPM_TYPE_ENFORCEMENT_HDCP_PROTECTION_LEVEL(1i32);
pub const OPM_TYPE_ENFORCEMENT_HDCP_ON_WITH_TYPE1_RESTRICTION: OPM_TYPE_ENFORCEMENT_HDCP_PROTECTION_LEVEL = OPM_TYPE_ENFORCEMENT_HDCP_PROTECTION_LEVEL(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct OPM_TYPE_ENFORCEMENT_HDCP_PROTECTION_LEVEL(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct OPM_VIDEO_OUTPUT_SEMANTICS(pub i32);
pub const OPM_VOS_COPP_SEMANTICS: OPM_VIDEO_OUTPUT_SEMANTICS = OPM_VIDEO_OUTPUT_SEMANTICS(0i32);
pub const OPM_VOS_OPM_INDIRECT_DISPLAY: OPM_VIDEO_OUTPUT_SEMANTICS = OPM_VIDEO_OUTPUT_SEMANTICS(2i32);
pub const OPM_VOS_OPM_SEMANTICS: OPM_VIDEO_OUTPUT_SEMANTICS = OPM_VIDEO_OUTPUT_SEMANTICS(1i32);
pub const OPTIBEAM_ARRAY_AND_AEC: AEC_SYSTEM_MODE = AEC_SYSTEM_MODE(4i32);
pub const OPTIBEAM_ARRAY_ONLY: AEC_SYSTEM_MODE = AEC_SYSTEM_MODE(2i32);
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub type PDXVAHDSW_CreateDevice = Option<unsafe extern "system" fn(pd3ddevice: windows_core::Ref<super::super::Graphics::Direct3D9::IDirect3DDevice9Ex>, phdevice: *mut super::super::Foundation::HANDLE) -> windows_core::HRESULT>;
pub type PDXVAHDSW_CreateVideoProcessor = Option<unsafe extern "system" fn(hdevice: super::super::Foundation::HANDLE, pvpguid: *const windows_core::GUID, phvideoprocessor: *mut super::super::Foundation::HANDLE) -> windows_core::HRESULT>;
pub type PDXVAHDSW_DestroyDevice = Option<unsafe extern "system" fn(hdevice: super::super::Foundation::HANDLE) -> windows_core::HRESULT>;
pub type PDXVAHDSW_DestroyVideoProcessor = Option<unsafe extern "system" fn(hvideoprocessor: super::super::Foundation::HANDLE) -> windows_core::HRESULT>;
pub type PDXVAHDSW_GetVideoProcessBltStatePrivate = Option<unsafe extern "system" fn(hvideoprocessor: super::super::Foundation::HANDLE, pdata: *mut DXVAHD_BLT_STATE_PRIVATE_DATA) -> windows_core::HRESULT>;
pub type PDXVAHDSW_GetVideoProcessStreamStatePrivate = Option<unsafe extern "system" fn(hvideoprocessor: super::super::Foundation::HANDLE, streamnumber: u32, pdata: *mut DXVAHD_STREAM_STATE_PRIVATE_DATA) -> windows_core::HRESULT>;
pub type PDXVAHDSW_GetVideoProcessorCaps = Option<unsafe extern "system" fn(hdevice: super::super::Foundation::HANDLE, pcontentdesc: *const DXVAHD_CONTENT_DESC, usage: DXVAHD_DEVICE_USAGE, count: u32, pcaps: *mut DXVAHD_VPCAPS) -> windows_core::HRESULT>;
pub type PDXVAHDSW_GetVideoProcessorCustomRates = Option<unsafe extern "system" fn(hdevice: super::super::Foundation::HANDLE, pvpguid: *const windows_core::GUID, count: u32, prates: *mut DXVAHD_CUSTOM_RATE_DATA) -> windows_core::HRESULT>;
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub type PDXVAHDSW_GetVideoProcessorDeviceCaps = Option<unsafe extern "system" fn(hdevice: super::super::Foundation::HANDLE, pcontentdesc: *const DXVAHD_CONTENT_DESC, usage: DXVAHD_DEVICE_USAGE, pcaps: *mut DXVAHD_VPDEVCAPS) -> windows_core::HRESULT>;
pub type PDXVAHDSW_GetVideoProcessorFilterRange = Option<unsafe extern "system" fn(hdevice: super::super::Foundation::HANDLE, filter: DXVAHD_FILTER, prange: *mut DXVAHD_FILTER_RANGE_DATA) -> windows_core::HRESULT>;
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub type PDXVAHDSW_GetVideoProcessorInputFormats = Option<unsafe extern "system" fn(hdevice: super::super::Foundation::HANDLE, pcontentdesc: *const DXVAHD_CONTENT_DESC, usage: DXVAHD_DEVICE_USAGE, count: u32, pformats: *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> windows_core::HRESULT>;
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub type PDXVAHDSW_GetVideoProcessorOutputFormats = Option<unsafe extern "system" fn(hdevice: super::super::Foundation::HANDLE, pcontentdesc: *const DXVAHD_CONTENT_DESC, usage: DXVAHD_DEVICE_USAGE, count: u32, pformats: *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> windows_core::HRESULT>;
pub type PDXVAHDSW_Plugin = Option<unsafe extern "system" fn(size: u32, pcallbacks: *mut core::ffi::c_void) -> windows_core::HRESULT>;
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub type PDXVAHDSW_ProposeVideoPrivateFormat = Option<unsafe extern "system" fn(hdevice: super::super::Foundation::HANDLE, pformat: *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> windows_core::HRESULT>;
pub type PDXVAHDSW_SetVideoProcessBltState = Option<unsafe extern "system" fn(hvideoprocessor: super::super::Foundation::HANDLE, state: DXVAHD_BLT_STATE, datasize: u32, pdata: *const core::ffi::c_void) -> windows_core::HRESULT>;
pub type PDXVAHDSW_SetVideoProcessStreamState = Option<unsafe extern "system" fn(hvideoprocessor: super::super::Foundation::HANDLE, streamnumber: u32, state: DXVAHD_STREAM_STATE, datasize: u32, pdata: *const core::ffi::c_void) -> windows_core::HRESULT>;
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub type PDXVAHDSW_VideoProcessBltHD = Option<unsafe extern "system" fn(hvideoprocessor: super::super::Foundation::HANDLE, poutputsurface: windows_core::Ref<super::super::Graphics::Direct3D9::IDirect3DSurface9>, outputframe: u32, streamcount: u32, pstreams: *const DXVAHD_STREAM_DATA) -> windows_core::HRESULT>;
#[cfg(feature = "Win32_Graphics_Direct3D9")]
pub type PDXVAHD_CreateDevice = Option<unsafe extern "system" fn(pd3ddevice: windows_core::Ref<super::super::Graphics::Direct3D9::IDirect3DDevice9Ex>, pcontentdesc: *const DXVAHD_CONTENT_DESC, usage: DXVAHD_DEVICE_USAGE, pplugin: PDXVAHDSW_Plugin, ppdevice: windows_core::OutRef<IDXVAHD_Device>) -> windows_core::HRESULT>;
pub const PEACTION_COPY: MFPOLICYMANAGER_ACTION = MFPOLICYMANAGER_ACTION(2i32);
pub const PEACTION_EXPORT: MFPOLICYMANAGER_ACTION = MFPOLICYMANAGER_ACTION(3i32);
pub const PEACTION_EXTRACT: MFPOLICYMANAGER_ACTION = MFPOLICYMANAGER_ACTION(4i32);
pub const PEACTION_LAST: MFPOLICYMANAGER_ACTION = MFPOLICYMANAGER_ACTION(7i32);
pub const PEACTION_NO: MFPOLICYMANAGER_ACTION = MFPOLICYMANAGER_ACTION(0i32);
pub const PEACTION_PLAY: MFPOLICYMANAGER_ACTION = MFPOLICYMANAGER_ACTION(1i32);
pub const PEACTION_RESERVED1: MFPOLICYMANAGER_ACTION = MFPOLICYMANAGER_ACTION(5i32);
pub const PEACTION_RESERVED2: MFPOLICYMANAGER_ACTION = MFPOLICYMANAGER_ACTION(6i32);
pub const PEACTION_RESERVED3: MFPOLICYMANAGER_ACTION = MFPOLICYMANAGER_ACTION(7i32);
pub const PIN_CATEGORY_ANALOGVIDEOIN: windows_core::GUID = windows_core::GUID::from_u128(0xfb6c4283_0353_11d1_905f_0000c0cc16ba);
pub const PIN_CATEGORY_CAPTURE: windows_core::GUID = windows_core::GUID::from_u128(0xfb6c4281_0353_11d1_905f_0000c0cc16ba);
pub const PIN_CATEGORY_CC: windows_core::GUID = windows_core::GUID::from_u128(0xfb6c4289_0353_11d1_905f_0000c0cc16ba);
pub const PIN_CATEGORY_EDS: windows_core::GUID = windows_core::GUID::from_u128(0xfb6c4287_0353_11d1_905f_0000c0cc16ba);
pub const PIN_CATEGORY_NABTS: windows_core::GUID = windows_core::GUID::from_u128(0xfb6c4286_0353_11d1_905f_0000c0cc16ba);
pub const PIN_CATEGORY_PREVIEW: windows_core::GUID = windows_core::GUID::from_u128(0xfb6c4282_0353_11d1_905f_0000c0cc16ba);
pub const PIN_CATEGORY_STILL: windows_core::GUID = windows_core::GUID::from_u128(0xfb6c428a_0353_11d1_905f_0000c0cc16ba);
pub const PIN_CATEGORY_TELETEXT: windows_core::GUID = windows_core::GUID::from_u128(0xfb6c4288_0353_11d1_905f_0000c0cc16ba);
pub const PIN_CATEGORY_TIMECODE: windows_core::GUID = windows_core::GUID::from_u128(0xfb6c428b_0353_11d1_905f_0000c0cc16ba);
pub const PIN_CATEGORY_VBI: windows_core::GUID = windows_core::GUID::from_u128(0xfb6c4284_0353_11d1_905f_0000c0cc16ba);
pub const PIN_CATEGORY_VIDEOPORT: windows_core::GUID = windows_core::GUID::from_u128(0xfb6c4285_0353_11d1_905f_0000c0cc16ba);
pub const PIN_CATEGORY_VIDEOPORT_VBI: windows_core::GUID = windows_core::GUID::from_u128(0xfb6c428c_0353_11d1_905f_0000c0cc16ba);
pub const PLAYTO_SOURCE_AUDIO: PLAYTO_SOURCE_CREATEFLAGS = PLAYTO_SOURCE_CREATEFLAGS(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct PLAYTO_SOURCE_CREATEFLAGS(pub i32);
impl PLAYTO_SOURCE_CREATEFLAGS {
pub const fn contains(&self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}
impl core::ops::BitOr for PLAYTO_SOURCE_CREATEFLAGS {
type Output = Self;
fn bitor(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}
impl core::ops::BitAnd for PLAYTO_SOURCE_CREATEFLAGS {
type Output = Self;
fn bitand(self, other: Self) -> Self {
Self(self.0 & other.0)
}
}
impl core::ops::BitOrAssign for PLAYTO_SOURCE_CREATEFLAGS {
fn bitor_assign(&mut self, other: Self) {
self.0.bitor_assign(other.0)
}
}
impl core::ops::BitAndAssign for PLAYTO_SOURCE_CREATEFLAGS {
fn bitand_assign(&mut self, other: Self) {
self.0.bitand_assign(other.0)
}
}
impl core::ops::Not for PLAYTO_SOURCE_CREATEFLAGS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const PLAYTO_SOURCE_IMAGE: PLAYTO_SOURCE_CREATEFLAGS = PLAYTO_SOURCE_CREATEFLAGS(1i32);
pub const PLAYTO_SOURCE_NONE: PLAYTO_SOURCE_CREATEFLAGS = PLAYTO_SOURCE_CREATEFLAGS(0i32);
pub const PLAYTO_SOURCE_PROTECTED: PLAYTO_SOURCE_CREATEFLAGS = PLAYTO_SOURCE_CREATEFLAGS(8i32);
pub const PLAYTO_SOURCE_VIDEO: PLAYTO_SOURCE_CREATEFLAGS = PLAYTO_SOURCE_CREATEFLAGS(4i32);
pub const PRESENTATION_CURRENT_POSITION: u64 = 9223372036854775807u64;
pub const REQUIRE_PROMPT: MFNetCredentialRequirements = MFNetCredentialRequirements(1i32);
pub const REQUIRE_SAVE_SELECTED: MFNetCredentialRequirements = MFNetCredentialRequirements(2i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct ROI_AREA {
pub rect: super::super::Foundation::RECT,
pub QPDelta: i32,
}
pub const ROTATION_NONE: MF_VIDEO_PROCESSOR_ROTATION = MF_VIDEO_PROCESSOR_ROTATION(0i32);
pub const ROTATION_NORMAL: MF_VIDEO_PROCESSOR_ROTATION = MF_VIDEO_PROCESSOR_ROTATION(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct SAMPLE_PROTECTION_VERSION(pub i32);
pub const SAMPLE_PROTECTION_VERSION_AES128CTR: SAMPLE_PROTECTION_VERSION = SAMPLE_PROTECTION_VERSION(4i32);
pub const SAMPLE_PROTECTION_VERSION_BASIC_LOKI: SAMPLE_PROTECTION_VERSION = SAMPLE_PROTECTION_VERSION(1i32);
pub const SAMPLE_PROTECTION_VERSION_NO: SAMPLE_PROTECTION_VERSION = SAMPLE_PROTECTION_VERSION(0i32);
pub const SAMPLE_PROTECTION_VERSION_RC4: SAMPLE_PROTECTION_VERSION = SAMPLE_PROTECTION_VERSION(3i32);
pub const SAMPLE_PROTECTION_VERSION_SCATTER: SAMPLE_PROTECTION_VERSION = SAMPLE_PROTECTION_VERSION(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct SEEK_ORIGIN(pub i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct SENSORPROFILEID {
pub Type: windows_core::GUID,
pub Index: u32,
pub Unused: u32,
}
pub const SHA_HASH_LEN: u32 = 20u32;
pub const SINGLE_CHANNEL_AEC: AEC_SYSTEM_MODE = AEC_SYSTEM_MODE(0i32);
pub const SINGLE_CHANNEL_NSAGC: AEC_SYSTEM_MODE = AEC_SYSTEM_MODE(5i32);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct STREAM_MEDIUM {
pub gidMedium: windows_core::GUID,
pub unMediumInstance: u32,
}
pub const SYSFXUI_DONOTSHOW_BASSBOOST: u32 = 8u32;
pub const SYSFXUI_DONOTSHOW_BASSMANAGEMENT: u32 = 4u32;
pub const SYSFXUI_DONOTSHOW_CHANNELPHANTOMING: u32 = 128u32;
pub const SYSFXUI_DONOTSHOW_HEADPHONEVIRTUALIZATION: u32 = 16u32;
pub const SYSFXUI_DONOTSHOW_LOUDNESSEQUALIZATION: u32 = 1u32;
pub const SYSFXUI_DONOTSHOW_ROOMCORRECTION: u32 = 2u32;
pub const SYSFXUI_DONOTSHOW_SPEAKERFILLING: u32 = 64u32;
pub const SYSFXUI_DONOTSHOW_VIRTUALSURROUND: u32 = 32u32;
pub const SequencerTopologyFlags_Last: MFSequencerTopologyFlags = MFSequencerTopologyFlags(1i32);
pub const TIME_FORMAT_BYTE: windows_core::GUID = windows_core::GUID::from_u128(0x7b785571_8c82_11cf_bc0c_00aa00ac74f6);
pub const TIME_FORMAT_FIELD: windows_core::GUID = windows_core::GUID::from_u128(0x7b785573_8c82_11cf_bc0c_00aa00ac74f6);
pub const TIME_FORMAT_FRAME: windows_core::GUID = windows_core::GUID::from_u128(0x7b785570_8c82_11cf_bc0c_00aa00ac74f6);
pub const TIME_FORMAT_MEDIA_TIME: windows_core::GUID = windows_core::GUID::from_u128(0x7b785574_8c82_11cf_bc0c_00aa00ac74f6);
pub const TIME_FORMAT_NONE: windows_core::GUID = windows_core::GUID::from_u128(0x00000000_0000_0000_0000_000000000000);
pub const TIME_FORMAT_SAMPLE: windows_core::GUID = windows_core::GUID::from_u128(0x7b785572_8c82_11cf_bc0c_00aa00ac74f6);
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct TOC_DESCRIPTOR {
pub guidID: windows_core::GUID,
pub wStreamNumber: u16,
pub guidType: windows_core::GUID,
pub wLanguageIndex: u16,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct TOC_ENTRY_DESCRIPTOR {
pub qwStartTime: u64,
pub qwEndTime: u64,
pub qwStartPacketOffset: u64,
pub qwEndPacketOffset: u64,
pub qwRepresentativeFrameTime: u64,
}
pub const TOC_ENTRY_MAX_TITLE_SIZE: u32 = 65535u32;
pub const TOC_MAX_DESCRIPTION_SIZE: u32 = 65535u32;
pub const TOC_POS_INHEADER: TOC_POS_TYPE = TOC_POS_TYPE(0i32);
pub const TOC_POS_TOPLEVELOBJECT: TOC_POS_TYPE = TOC_POS_TYPE(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct TOC_POS_TYPE(pub i32);
pub const UUID_UdriTagTables: windows_core::GUID = windows_core::GUID::from_u128(0xe1b98d74_9778_4878_b664_eb2020364d88);
pub const UUID_WMDRMTagTables: windows_core::GUID = windows_core::GUID::from_u128(0x5dcd1101_9263_45bb_a4d5_c415ab8c589c);
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Gdi")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct VIDEOINFOHEADER {
pub rcSource: super::super::Foundation::RECT,
pub rcTarget: super::super::Foundation::RECT,
pub dwBitRate: u32,
pub dwBitErrorRate: u32,
pub AvgTimePerFrame: i64,
pub bmiHeader: super::super::Graphics::Gdi::BITMAPINFOHEADER,
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Gdi")]
#[derive(Clone, Copy)]
pub struct VIDEOINFOHEADER2 {
pub rcSource: super::super::Foundation::RECT,
pub rcTarget: super::super::Foundation::RECT,
pub dwBitRate: u32,
pub dwBitErrorRate: u32,
pub AvgTimePerFrame: i64,
pub dwInterlaceFlags: u32,
pub dwCopyProtectFlags: u32,
pub dwPictAspectRatioX: u32,
pub dwPictAspectRatioY: u32,
pub Anonymous: VIDEOINFOHEADER2_0,
pub dwReserved2: u32,
pub bmiHeader: super::super::Graphics::Gdi::BITMAPINFOHEADER,
}
#[cfg(feature = "Win32_Graphics_Gdi")]
impl Default for VIDEOINFOHEADER2 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[cfg(feature = "Win32_Graphics_Gdi")]
#[derive(Clone, Copy)]
pub union VIDEOINFOHEADER2_0 {
pub dwControlFlags: u32,
pub dwReserved1: u32,
}
#[cfg(feature = "Win32_Graphics_Gdi")]
impl Default for VIDEOINFOHEADER2_0 {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const VIDEO_ZOOM_RECT: windows_core::GUID = windows_core::GUID::from_u128(0x7aaa1638_1b7f_4c93_bd89_5b9c9fb6fcf0);
pub const VRHP_BIGROOM: MF_AUVRHP_ROOMMODEL = MF_AUVRHP_ROOMMODEL(2i32);
pub const VRHP_CUSTUMIZEDROOM: MF_AUVRHP_ROOMMODEL = MF_AUVRHP_ROOMMODEL(3i32);
pub const VRHP_MEDIUMROOM: MF_AUVRHP_ROOMMODEL = MF_AUVRHP_ROOMMODEL(1i32);
pub const VRHP_SMALLROOM: MF_AUVRHP_ROOMMODEL = MF_AUVRHP_ROOMMODEL(0i32);
pub const VorbisDecoderMFT: windows_core::GUID = windows_core::GUID::from_u128(0x1a198ef2_60e5_4ea8_90d8_da1f2832c288);
pub const WMAAECMA_E_NO_ACTIVE_RENDER_STREAM: u32 = 2278293514u32;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct WMT_PROP_DATATYPE(pub i32);
pub const WMT_PROP_TYPE_BINARY: WMT_PROP_DATATYPE = WMT_PROP_DATATYPE(2i32);
pub const WMT_PROP_TYPE_BOOL: WMT_PROP_DATATYPE = WMT_PROP_DATATYPE(3i32);
pub const WMT_PROP_TYPE_DWORD: WMT_PROP_DATATYPE = WMT_PROP_DATATYPE(0i32);
pub const WMT_PROP_TYPE_GUID: WMT_PROP_DATATYPE = WMT_PROP_DATATYPE(6i32);
pub const WMT_PROP_TYPE_QWORD: WMT_PROP_DATATYPE = WMT_PROP_DATATYPE(4i32);
pub const WMT_PROP_TYPE_STRING: WMT_PROP_DATATYPE = WMT_PROP_DATATYPE(1i32);
pub const WMT_PROP_TYPE_WORD: WMT_PROP_DATATYPE = WMT_PROP_DATATYPE(5i32);
pub const WMV_DYNAMIC_BITRATE: WMV_DYNAMIC_FLAGS = WMV_DYNAMIC_FLAGS(1i32);
pub const WMV_DYNAMIC_COMPLEXITY: WMV_DYNAMIC_FLAGS = WMV_DYNAMIC_FLAGS(4i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct WMV_DYNAMIC_FLAGS(pub i32);
pub const WMV_DYNAMIC_RESOLUTION: WMV_DYNAMIC_FLAGS = WMV_DYNAMIC_FLAGS(2i32);
pub const WM_CODEC_ONEPASS_CBR: u32 = 1u32;
pub const WM_CODEC_ONEPASS_VBR: u32 = 2u32;
pub const WM_CODEC_TWOPASS_CBR: u32 = 4u32;
pub const WM_CODEC_TWOPASS_VBR_PEAKCONSTRAINED: u32 = 16u32;
pub const WM_CODEC_TWOPASS_VBR_UNCONSTRAINED: u32 = 8u32;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct _MFP_CREDENTIAL_FLAGS(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct _MFP_MEDIAITEM_CHARACTERISTICS(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct _MFT_INPUT_DATA_BUFFER_FLAGS(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct _MFT_INPUT_STATUS_FLAGS(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct _MFT_INPUT_STREAM_INFO_FLAGS(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct _MFT_OUTPUT_DATA_BUFFER_FLAGS(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct _MFT_OUTPUT_STATUS_FLAGS(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct _MFT_OUTPUT_STREAM_INFO_FLAGS(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct _MFT_PROCESS_OUTPUT_FLAGS(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct _MFT_PROCESS_OUTPUT_STATUS(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct _MFT_SET_TYPE_FLAGS(pub i32);
pub const _msoBegin: SEEK_ORIGIN = SEEK_ORIGIN(0i32);
pub const _msoCurrent: SEEK_ORIGIN = SEEK_ORIGIN(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVAudioChannelConfig(pub i32);
pub const eAVAudioChannelConfig_BACK_CENTER: eAVAudioChannelConfig = eAVAudioChannelConfig(256i32);
pub const eAVAudioChannelConfig_BACK_LEFT: eAVAudioChannelConfig = eAVAudioChannelConfig(16i32);
pub const eAVAudioChannelConfig_BACK_RIGHT: eAVAudioChannelConfig = eAVAudioChannelConfig(32i32);
pub const eAVAudioChannelConfig_FRONT_CENTER: eAVAudioChannelConfig = eAVAudioChannelConfig(4i32);
pub const eAVAudioChannelConfig_FRONT_LEFT: eAVAudioChannelConfig = eAVAudioChannelConfig(1i32);
pub const eAVAudioChannelConfig_FRONT_LEFT_OF_CENTER: eAVAudioChannelConfig = eAVAudioChannelConfig(64i32);
pub const eAVAudioChannelConfig_FRONT_RIGHT: eAVAudioChannelConfig = eAVAudioChannelConfig(2i32);
pub const eAVAudioChannelConfig_FRONT_RIGHT_OF_CENTER: eAVAudioChannelConfig = eAVAudioChannelConfig(128i32);
pub const eAVAudioChannelConfig_LOW_FREQUENCY: eAVAudioChannelConfig = eAVAudioChannelConfig(8i32);
pub const eAVAudioChannelConfig_SIDE_LEFT: eAVAudioChannelConfig = eAVAudioChannelConfig(512i32);
pub const eAVAudioChannelConfig_SIDE_RIGHT: eAVAudioChannelConfig = eAVAudioChannelConfig(1024i32);
pub const eAVAudioChannelConfig_TOP_BACK_CENTER: eAVAudioChannelConfig = eAVAudioChannelConfig(65536i32);
pub const eAVAudioChannelConfig_TOP_BACK_LEFT: eAVAudioChannelConfig = eAVAudioChannelConfig(32768i32);
pub const eAVAudioChannelConfig_TOP_BACK_RIGHT: eAVAudioChannelConfig = eAVAudioChannelConfig(131072i32);
pub const eAVAudioChannelConfig_TOP_CENTER: eAVAudioChannelConfig = eAVAudioChannelConfig(2048i32);
pub const eAVAudioChannelConfig_TOP_FRONT_CENTER: eAVAudioChannelConfig = eAVAudioChannelConfig(8192i32);
pub const eAVAudioChannelConfig_TOP_FRONT_LEFT: eAVAudioChannelConfig = eAVAudioChannelConfig(4096i32);
pub const eAVAudioChannelConfig_TOP_FRONT_RIGHT: eAVAudioChannelConfig = eAVAudioChannelConfig(16384i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVDDSurroundMode(pub i32);
pub const eAVDDSurroundMode_No: eAVDDSurroundMode = eAVDDSurroundMode(1i32);
pub const eAVDDSurroundMode_NotIndicated: eAVDDSurroundMode = eAVDDSurroundMode(0i32);
pub const eAVDDSurroundMode_Yes: eAVDDSurroundMode = eAVDDSurroundMode(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVDSPLoudnessEqualization(pub i32);
pub const eAVDSPLoudnessEqualization_AUTO: eAVDSPLoudnessEqualization = eAVDSPLoudnessEqualization(2i32);
pub const eAVDSPLoudnessEqualization_OFF: eAVDSPLoudnessEqualization = eAVDSPLoudnessEqualization(0i32);
pub const eAVDSPLoudnessEqualization_ON: eAVDSPLoudnessEqualization = eAVDSPLoudnessEqualization(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVDSPSpeakerFill(pub i32);
pub const eAVDSPSpeakerFill_AUTO: eAVDSPSpeakerFill = eAVDSPSpeakerFill(2i32);
pub const eAVDSPSpeakerFill_OFF: eAVDSPSpeakerFill = eAVDSPSpeakerFill(0i32);
pub const eAVDSPSpeakerFill_ON: eAVDSPSpeakerFill = eAVDSPSpeakerFill(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVDecAACDownmixMode(pub i32);
pub const eAVDecAACUseARIBDownmix: eAVDecAACDownmixMode = eAVDecAACDownmixMode(1i32);
pub const eAVDecAACUseISODownmix: eAVDecAACDownmixMode = eAVDecAACDownmixMode(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVDecAudioDualMono(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVDecAudioDualMonoReproMode(pub i32);
pub const eAVDecAudioDualMonoReproMode_LEFT_MONO: eAVDecAudioDualMonoReproMode = eAVDecAudioDualMonoReproMode(1i32);
pub const eAVDecAudioDualMonoReproMode_MIX_MONO: eAVDecAudioDualMonoReproMode = eAVDecAudioDualMonoReproMode(3i32);
pub const eAVDecAudioDualMonoReproMode_RIGHT_MONO: eAVDecAudioDualMonoReproMode = eAVDecAudioDualMonoReproMode(2i32);
pub const eAVDecAudioDualMonoReproMode_STEREO: eAVDecAudioDualMonoReproMode = eAVDecAudioDualMonoReproMode(0i32);
pub const eAVDecAudioDualMono_IsDualMono: eAVDecAudioDualMono = eAVDecAudioDualMono(1i32);
pub const eAVDecAudioDualMono_IsNotDualMono: eAVDecAudioDualMono = eAVDecAudioDualMono(0i32);
pub const eAVDecAudioDualMono_UnSpecified: eAVDecAudioDualMono = eAVDecAudioDualMono(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVDecDDMatrixDecodingMode(pub i32);
pub const eAVDecDDMatrixDecodingMode_AUTO: eAVDecDDMatrixDecodingMode = eAVDecDDMatrixDecodingMode(2i32);
pub const eAVDecDDMatrixDecodingMode_OFF: eAVDecDDMatrixDecodingMode = eAVDecDDMatrixDecodingMode(0i32);
pub const eAVDecDDMatrixDecodingMode_ON: eAVDecDDMatrixDecodingMode = eAVDecDDMatrixDecodingMode(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVDecDDOperationalMode(pub i32);
pub const eAVDecDDOperationalMode_CUSTOM0: eAVDecDDOperationalMode = eAVDecDDOperationalMode(3i32);
pub const eAVDecDDOperationalMode_CUSTOM1: eAVDecDDOperationalMode = eAVDecDDOperationalMode(4i32);
pub const eAVDecDDOperationalMode_LINE: eAVDecDDOperationalMode = eAVDecDDOperationalMode(1i32);
pub const eAVDecDDOperationalMode_NONE: eAVDecDDOperationalMode = eAVDecDDOperationalMode(0i32);
pub const eAVDecDDOperationalMode_PORTABLE11: eAVDecDDOperationalMode = eAVDecDDOperationalMode(6i32);
pub const eAVDecDDOperationalMode_PORTABLE14: eAVDecDDOperationalMode = eAVDecDDOperationalMode(7i32);
pub const eAVDecDDOperationalMode_PORTABLE8: eAVDecDDOperationalMode = eAVDecDDOperationalMode(5i32);
pub const eAVDecDDOperationalMode_RF: eAVDecDDOperationalMode = eAVDecDDOperationalMode(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVDecDDStereoDownMixMode(pub i32);
pub const eAVDecDDStereoDownMixMode_Auto: eAVDecDDStereoDownMixMode = eAVDecDDStereoDownMixMode(0i32);
pub const eAVDecDDStereoDownMixMode_LoRo: eAVDecDDStereoDownMixMode = eAVDecDDStereoDownMixMode(2i32);
pub const eAVDecDDStereoDownMixMode_LtRt: eAVDecDDStereoDownMixMode = eAVDecDDStereoDownMixMode(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVDecHEAACDynamicRangeControl(pub i32);
pub const eAVDecHEAACDynamicRangeControl_OFF: eAVDecHEAACDynamicRangeControl = eAVDecHEAACDynamicRangeControl(0i32);
pub const eAVDecHEAACDynamicRangeControl_ON: eAVDecHEAACDynamicRangeControl = eAVDecHEAACDynamicRangeControl(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVDecVideoCodecType(pub i32);
pub const eAVDecVideoCodecType_H264: eAVDecVideoCodecType = eAVDecVideoCodecType(2i32);
pub const eAVDecVideoCodecType_MPEG2: eAVDecVideoCodecType = eAVDecVideoCodecType(1i32);
pub const eAVDecVideoCodecType_NOTPLAYING: eAVDecVideoCodecType = eAVDecVideoCodecType(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVDecVideoDXVABusEncryption(pub i32);
pub const eAVDecVideoDXVABusEncryption_AES: eAVDecVideoDXVABusEncryption = eAVDecVideoDXVABusEncryption(2i32);
pub const eAVDecVideoDXVABusEncryption_NONE: eAVDecVideoDXVABusEncryption = eAVDecVideoDXVABusEncryption(0i32);
pub const eAVDecVideoDXVABusEncryption_PRIVATE: eAVDecVideoDXVABusEncryption = eAVDecVideoDXVABusEncryption(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVDecVideoDXVAMode(pub i32);
pub const eAVDecVideoDXVAMode_IDCT: eAVDecVideoDXVAMode = eAVDecVideoDXVAMode(3i32);
pub const eAVDecVideoDXVAMode_MC: eAVDecVideoDXVAMode = eAVDecVideoDXVAMode(2i32);
pub const eAVDecVideoDXVAMode_NOTPLAYING: eAVDecVideoDXVAMode = eAVDecVideoDXVAMode(0i32);
pub const eAVDecVideoDXVAMode_SW: eAVDecVideoDXVAMode = eAVDecVideoDXVAMode(1i32);
pub const eAVDecVideoDXVAMode_VLD: eAVDecVideoDXVAMode = eAVDecVideoDXVAMode(4i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVDecVideoH264ErrorConcealment(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVDecVideoInputScanType(pub i32);
pub const eAVDecVideoInputScan_Interlaced_LowerFieldFirst: eAVDecVideoInputScanType = eAVDecVideoInputScanType(3i32);
pub const eAVDecVideoInputScan_Interlaced_UpperFieldFirst: eAVDecVideoInputScanType = eAVDecVideoInputScanType(2i32);
pub const eAVDecVideoInputScan_Progressive: eAVDecVideoInputScanType = eAVDecVideoInputScanType(1i32);
pub const eAVDecVideoInputScan_Unknown: eAVDecVideoInputScanType = eAVDecVideoInputScanType(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVDecVideoMPEG2ErrorConcealment(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVDecVideoSWPowerLevel(pub i32);
pub const eAVDecVideoSWPowerLevel_Balanced: eAVDecVideoSWPowerLevel = eAVDecVideoSWPowerLevel(50i32);
pub const eAVDecVideoSWPowerLevel_BatteryLife: eAVDecVideoSWPowerLevel = eAVDecVideoSWPowerLevel(0i32);
pub const eAVDecVideoSWPowerLevel_VideoQuality: eAVDecVideoSWPowerLevel = eAVDecVideoSWPowerLevel(100i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVDecVideoSoftwareDeinterlaceMode(pub i32);
pub const eAVDecVideoSoftwareDeinterlaceMode_BOBDeinterlacing: eAVDecVideoSoftwareDeinterlaceMode = eAVDecVideoSoftwareDeinterlaceMode(2i32);
pub const eAVDecVideoSoftwareDeinterlaceMode_NoDeinterlacing: eAVDecVideoSoftwareDeinterlaceMode = eAVDecVideoSoftwareDeinterlaceMode(0i32);
pub const eAVDecVideoSoftwareDeinterlaceMode_ProgressiveDeinterlacing: eAVDecVideoSoftwareDeinterlaceMode = eAVDecVideoSoftwareDeinterlaceMode(1i32);
pub const eAVDecVideoSoftwareDeinterlaceMode_SmartBOBDeinterlacing: eAVDecVideoSoftwareDeinterlaceMode = eAVDecVideoSoftwareDeinterlaceMode(3i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncAV1PictureType(pub i32);
pub const eAVEncAV1PictureType_Inter: eAVEncAV1PictureType = eAVEncAV1PictureType(2i32);
pub const eAVEncAV1PictureType_Intra_Only: eAVEncAV1PictureType = eAVEncAV1PictureType(1i32);
pub const eAVEncAV1PictureType_Key: eAVEncAV1PictureType = eAVEncAV1PictureType(0i32);
pub const eAVEncAV1PictureType_Switch: eAVEncAV1PictureType = eAVEncAV1PictureType(3i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncAV1VLevel(pub i32);
pub const eAVEncAV1VLevel2: eAVEncAV1VLevel = eAVEncAV1VLevel(0i32);
pub const eAVEncAV1VLevel2_1: eAVEncAV1VLevel = eAVEncAV1VLevel(1i32);
pub const eAVEncAV1VLevel3: eAVEncAV1VLevel = eAVEncAV1VLevel(4i32);
pub const eAVEncAV1VLevel3_1: eAVEncAV1VLevel = eAVEncAV1VLevel(5i32);
pub const eAVEncAV1VLevel4: eAVEncAV1VLevel = eAVEncAV1VLevel(8i32);
pub const eAVEncAV1VLevel4_1: eAVEncAV1VLevel = eAVEncAV1VLevel(9i32);
pub const eAVEncAV1VLevel5: eAVEncAV1VLevel = eAVEncAV1VLevel(12i32);
pub const eAVEncAV1VLevel5_1: eAVEncAV1VLevel = eAVEncAV1VLevel(13i32);
pub const eAVEncAV1VLevel5_2: eAVEncAV1VLevel = eAVEncAV1VLevel(14i32);
pub const eAVEncAV1VLevel5_3: eAVEncAV1VLevel = eAVEncAV1VLevel(15i32);
pub const eAVEncAV1VLevel6: eAVEncAV1VLevel = eAVEncAV1VLevel(16i32);
pub const eAVEncAV1VLevel6_1: eAVEncAV1VLevel = eAVEncAV1VLevel(17i32);
pub const eAVEncAV1VLevel6_2: eAVEncAV1VLevel = eAVEncAV1VLevel(18i32);
pub const eAVEncAV1VLevel6_3: eAVEncAV1VLevel = eAVEncAV1VLevel(19i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncAV1VProfile(pub i32);
pub const eAVEncAV1VProfile_High_444_10: eAVEncAV1VProfile = eAVEncAV1VProfile(6i32);
pub const eAVEncAV1VProfile_High_444_8: eAVEncAV1VProfile = eAVEncAV1VProfile(5i32);
pub const eAVEncAV1VProfile_Main_400_10: eAVEncAV1VProfile = eAVEncAV1VProfile(4i32);
pub const eAVEncAV1VProfile_Main_400_8: eAVEncAV1VProfile = eAVEncAV1VProfile(3i32);
pub const eAVEncAV1VProfile_Main_420_10: eAVEncAV1VProfile = eAVEncAV1VProfile(2i32);
pub const eAVEncAV1VProfile_Main_420_8: eAVEncAV1VProfile = eAVEncAV1VProfile(1i32);
pub const eAVEncAV1VProfile_Professional_400_12: eAVEncAV1VProfile = eAVEncAV1VProfile(8i32);
pub const eAVEncAV1VProfile_Professional_420_12: eAVEncAV1VProfile = eAVEncAV1VProfile(7i32);
pub const eAVEncAV1VProfile_Professional_422_10: eAVEncAV1VProfile = eAVEncAV1VProfile(11i32);
pub const eAVEncAV1VProfile_Professional_422_12: eAVEncAV1VProfile = eAVEncAV1VProfile(12i32);
pub const eAVEncAV1VProfile_Professional_422_8: eAVEncAV1VProfile = eAVEncAV1VProfile(10i32);
pub const eAVEncAV1VProfile_Professional_444_12: eAVEncAV1VProfile = eAVEncAV1VProfile(9i32);
pub const eAVEncAV1VProfile_unknown: eAVEncAV1VProfile = eAVEncAV1VProfile(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncAdaptiveMode(pub i32);
pub const eAVEncAdaptiveMode_FrameRate: eAVEncAdaptiveMode = eAVEncAdaptiveMode(2i32);
pub const eAVEncAdaptiveMode_None: eAVEncAdaptiveMode = eAVEncAdaptiveMode(0i32);
pub const eAVEncAdaptiveMode_Resolution: eAVEncAdaptiveMode = eAVEncAdaptiveMode(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncAudioDualMono(pub i32);
pub const eAVEncAudioDualMono_Off: eAVEncAudioDualMono = eAVEncAudioDualMono(1i32);
pub const eAVEncAudioDualMono_On: eAVEncAudioDualMono = eAVEncAudioDualMono(2i32);
pub const eAVEncAudioDualMono_SameAsInput: eAVEncAudioDualMono = eAVEncAudioDualMono(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncAudioInputContent(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncChromaEncodeMode(pub i32);
pub const eAVEncChromaEncodeMode_420: eAVEncChromaEncodeMode = eAVEncChromaEncodeMode(0i32);
pub const eAVEncChromaEncodeMode_444: eAVEncChromaEncodeMode = eAVEncChromaEncodeMode(1i32);
pub const eAVEncChromaEncodeMode_444_v2: eAVEncChromaEncodeMode = eAVEncChromaEncodeMode(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncCommonRateControlMode(pub i32);
pub const eAVEncCommonRateControlMode_CBR: eAVEncCommonRateControlMode = eAVEncCommonRateControlMode(0i32);
pub const eAVEncCommonRateControlMode_GlobalLowDelayVBR: eAVEncCommonRateControlMode = eAVEncCommonRateControlMode(6i32);
pub const eAVEncCommonRateControlMode_GlobalVBR: eAVEncCommonRateControlMode = eAVEncCommonRateControlMode(5i32);
pub const eAVEncCommonRateControlMode_LowDelayVBR: eAVEncCommonRateControlMode = eAVEncCommonRateControlMode(4i32);
pub const eAVEncCommonRateControlMode_PeakConstrainedVBR: eAVEncCommonRateControlMode = eAVEncCommonRateControlMode(1i32);
pub const eAVEncCommonRateControlMode_Quality: eAVEncCommonRateControlMode = eAVEncCommonRateControlMode(3i32);
pub const eAVEncCommonRateControlMode_UnconstrainedVBR: eAVEncCommonRateControlMode = eAVEncCommonRateControlMode(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncCommonStreamEndHandling(pub i32);
pub const eAVEncCommonStreamEndHandling_DiscardPartial: eAVEncCommonStreamEndHandling = eAVEncCommonStreamEndHandling(0i32);
pub const eAVEncCommonStreamEndHandling_EnsureComplete: eAVEncCommonStreamEndHandling = eAVEncCommonStreamEndHandling(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncDDAtoDConverterType(pub i32);
pub const eAVEncDDAtoDConverterType_HDCD: eAVEncDDAtoDConverterType = eAVEncDDAtoDConverterType(1i32);
pub const eAVEncDDAtoDConverterType_Standard: eAVEncDDAtoDConverterType = eAVEncDDAtoDConverterType(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncDDDynamicRangeCompressionControl(pub i32);
pub const eAVEncDDDynamicRangeCompressionControl_FilmLight: eAVEncDDDynamicRangeCompressionControl = eAVEncDDDynamicRangeCompressionControl(2i32);
pub const eAVEncDDDynamicRangeCompressionControl_FilmStandard: eAVEncDDDynamicRangeCompressionControl = eAVEncDDDynamicRangeCompressionControl(1i32);
pub const eAVEncDDDynamicRangeCompressionControl_MusicLight: eAVEncDDDynamicRangeCompressionControl = eAVEncDDDynamicRangeCompressionControl(4i32);
pub const eAVEncDDDynamicRangeCompressionControl_MusicStandard: eAVEncDDDynamicRangeCompressionControl = eAVEncDDDynamicRangeCompressionControl(3i32);
pub const eAVEncDDDynamicRangeCompressionControl_None: eAVEncDDDynamicRangeCompressionControl = eAVEncDDDynamicRangeCompressionControl(0i32);
pub const eAVEncDDDynamicRangeCompressionControl_Speech: eAVEncDDDynamicRangeCompressionControl = eAVEncDDDynamicRangeCompressionControl(5i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncDDHeadphoneMode(pub i32);
pub const eAVEncDDHeadphoneMode_Encoded: eAVEncDDHeadphoneMode = eAVEncDDHeadphoneMode(2i32);
pub const eAVEncDDHeadphoneMode_NotEncoded: eAVEncDDHeadphoneMode = eAVEncDDHeadphoneMode(1i32);
pub const eAVEncDDHeadphoneMode_NotIndicated: eAVEncDDHeadphoneMode = eAVEncDDHeadphoneMode(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncDDPreferredStereoDownMixMode(pub i32);
pub const eAVEncDDPreferredStereoDownMixMode_LoRo: eAVEncDDPreferredStereoDownMixMode = eAVEncDDPreferredStereoDownMixMode(1i32);
pub const eAVEncDDPreferredStereoDownMixMode_LtRt: eAVEncDDPreferredStereoDownMixMode = eAVEncDDPreferredStereoDownMixMode(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncDDProductionRoomType(pub i32);
pub const eAVEncDDProductionRoomType_Large: eAVEncDDProductionRoomType = eAVEncDDProductionRoomType(1i32);
pub const eAVEncDDProductionRoomType_NotIndicated: eAVEncDDProductionRoomType = eAVEncDDProductionRoomType(0i32);
pub const eAVEncDDProductionRoomType_Small: eAVEncDDProductionRoomType = eAVEncDDProductionRoomType(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncDDService(pub i32);
pub const eAVEncDDService_C: eAVEncDDService = eAVEncDDService(5i32);
pub const eAVEncDDService_CM: eAVEncDDService = eAVEncDDService(0i32);
pub const eAVEncDDService_D: eAVEncDDService = eAVEncDDService(4i32);
pub const eAVEncDDService_E: eAVEncDDService = eAVEncDDService(6i32);
pub const eAVEncDDService_HI: eAVEncDDService = eAVEncDDService(3i32);
pub const eAVEncDDService_ME: eAVEncDDService = eAVEncDDService(1i32);
pub const eAVEncDDService_VI: eAVEncDDService = eAVEncDDService(2i32);
pub const eAVEncDDService_VO: eAVEncDDService = eAVEncDDService(7i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncDDSurroundExMode(pub i32);
pub const eAVEncDDSurroundExMode_No: eAVEncDDSurroundExMode = eAVEncDDSurroundExMode(1i32);
pub const eAVEncDDSurroundExMode_NotIndicated: eAVEncDDSurroundExMode = eAVEncDDSurroundExMode(0i32);
pub const eAVEncDDSurroundExMode_Yes: eAVEncDDSurroundExMode = eAVEncDDSurroundExMode(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncH263PictureType(pub i32);
pub const eAVEncH263PictureType_B: eAVEncH263PictureType = eAVEncH263PictureType(2i32);
pub const eAVEncH263PictureType_I: eAVEncH263PictureType = eAVEncH263PictureType(0i32);
pub const eAVEncH263PictureType_P: eAVEncH263PictureType = eAVEncH263PictureType(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncH263VLevel(pub i32);
pub const eAVEncH263VLevel1: eAVEncH263VLevel = eAVEncH263VLevel(10i32);
pub const eAVEncH263VLevel2: eAVEncH263VLevel = eAVEncH263VLevel(20i32);
pub const eAVEncH263VLevel3: eAVEncH263VLevel = eAVEncH263VLevel(30i32);
pub const eAVEncH263VLevel4: eAVEncH263VLevel = eAVEncH263VLevel(40i32);
pub const eAVEncH263VLevel4_5: eAVEncH263VLevel = eAVEncH263VLevel(45i32);
pub const eAVEncH263VLevel5: eAVEncH263VLevel = eAVEncH263VLevel(50i32);
pub const eAVEncH263VLevel6: eAVEncH263VLevel = eAVEncH263VLevel(60i32);
pub const eAVEncH263VLevel7: eAVEncH263VLevel = eAVEncH263VLevel(70i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncH263VProfile(pub i32);
pub const eAVEncH263VProfile_Base: eAVEncH263VProfile = eAVEncH263VProfile(0i32);
pub const eAVEncH263VProfile_CompatibilityV1: eAVEncH263VProfile = eAVEncH263VProfile(2i32);
pub const eAVEncH263VProfile_CompatibilityV2: eAVEncH263VProfile = eAVEncH263VProfile(1i32);
pub const eAVEncH263VProfile_HighCompression: eAVEncH263VProfile = eAVEncH263VProfile(5i32);
pub const eAVEncH263VProfile_HighLatency: eAVEncH263VProfile = eAVEncH263VProfile(8i32);
pub const eAVEncH263VProfile_Interlace: eAVEncH263VProfile = eAVEncH263VProfile(7i32);
pub const eAVEncH263VProfile_Internet: eAVEncH263VProfile = eAVEncH263VProfile(6i32);
pub const eAVEncH263VProfile_WirelessV2: eAVEncH263VProfile = eAVEncH263VProfile(3i32);
pub const eAVEncH263VProfile_WirelessV3: eAVEncH263VProfile = eAVEncH263VProfile(4i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncH264PictureType(pub i32);
pub const eAVEncH264PictureType_B: eAVEncH264PictureType = eAVEncH264PictureType(2i32);
pub const eAVEncH264PictureType_IDR: eAVEncH264PictureType = eAVEncH264PictureType(0i32);
pub const eAVEncH264PictureType_P: eAVEncH264PictureType = eAVEncH264PictureType(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncH264VLevel(pub i32);
pub const eAVEncH264VLevel1: eAVEncH264VLevel = eAVEncH264VLevel(10i32);
pub const eAVEncH264VLevel1_1: eAVEncH264VLevel = eAVEncH264VLevel(11i32);
pub const eAVEncH264VLevel1_2: eAVEncH264VLevel = eAVEncH264VLevel(12i32);
pub const eAVEncH264VLevel1_3: eAVEncH264VLevel = eAVEncH264VLevel(13i32);
pub const eAVEncH264VLevel1_b: eAVEncH264VLevel = eAVEncH264VLevel(11i32);
pub const eAVEncH264VLevel2: eAVEncH264VLevel = eAVEncH264VLevel(20i32);
pub const eAVEncH264VLevel2_1: eAVEncH264VLevel = eAVEncH264VLevel(21i32);
pub const eAVEncH264VLevel2_2: eAVEncH264VLevel = eAVEncH264VLevel(22i32);
pub const eAVEncH264VLevel3: eAVEncH264VLevel = eAVEncH264VLevel(30i32);
pub const eAVEncH264VLevel3_1: eAVEncH264VLevel = eAVEncH264VLevel(31i32);
pub const eAVEncH264VLevel3_2: eAVEncH264VLevel = eAVEncH264VLevel(32i32);
pub const eAVEncH264VLevel4: eAVEncH264VLevel = eAVEncH264VLevel(40i32);
pub const eAVEncH264VLevel4_1: eAVEncH264VLevel = eAVEncH264VLevel(41i32);
pub const eAVEncH264VLevel4_2: eAVEncH264VLevel = eAVEncH264VLevel(42i32);
pub const eAVEncH264VLevel5: eAVEncH264VLevel = eAVEncH264VLevel(50i32);
pub const eAVEncH264VLevel5_1: eAVEncH264VLevel = eAVEncH264VLevel(51i32);
pub const eAVEncH264VLevel5_2: eAVEncH264VLevel = eAVEncH264VLevel(52i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncH264VProfile(pub i32);
pub const eAVEncH264VProfile_422: eAVEncH264VProfile = eAVEncH264VProfile(122i32);
pub const eAVEncH264VProfile_444: eAVEncH264VProfile = eAVEncH264VProfile(244i32);
pub const eAVEncH264VProfile_Base: eAVEncH264VProfile = eAVEncH264VProfile(66i32);
pub const eAVEncH264VProfile_ConstrainedBase: eAVEncH264VProfile = eAVEncH264VProfile(256i32);
pub const eAVEncH264VProfile_Extended: eAVEncH264VProfile = eAVEncH264VProfile(88i32);
pub const eAVEncH264VProfile_High: eAVEncH264VProfile = eAVEncH264VProfile(100i32);
pub const eAVEncH264VProfile_High10: eAVEncH264VProfile = eAVEncH264VProfile(110i32);
pub const eAVEncH264VProfile_Main: eAVEncH264VProfile = eAVEncH264VProfile(77i32);
pub const eAVEncH264VProfile_MultiviewHigh: eAVEncH264VProfile = eAVEncH264VProfile(118i32);
pub const eAVEncH264VProfile_ScalableBase: eAVEncH264VProfile = eAVEncH264VProfile(83i32);
pub const eAVEncH264VProfile_ScalableHigh: eAVEncH264VProfile = eAVEncH264VProfile(86i32);
pub const eAVEncH264VProfile_Simple: eAVEncH264VProfile = eAVEncH264VProfile(66i32);
pub const eAVEncH264VProfile_StereoHigh: eAVEncH264VProfile = eAVEncH264VProfile(128i32);
pub const eAVEncH264VProfile_UCConstrainedHigh: eAVEncH264VProfile = eAVEncH264VProfile(257i32);
pub const eAVEncH264VProfile_UCScalableConstrainedBase: eAVEncH264VProfile = eAVEncH264VProfile(258i32);
pub const eAVEncH264VProfile_UCScalableConstrainedHigh: eAVEncH264VProfile = eAVEncH264VProfile(259i32);
pub const eAVEncH264VProfile_unknown: eAVEncH264VProfile = eAVEncH264VProfile(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncH265VLevel(pub i32);
pub const eAVEncH265VLevel1: eAVEncH265VLevel = eAVEncH265VLevel(30i32);
pub const eAVEncH265VLevel2: eAVEncH265VLevel = eAVEncH265VLevel(60i32);
pub const eAVEncH265VLevel2_1: eAVEncH265VLevel = eAVEncH265VLevel(63i32);
pub const eAVEncH265VLevel3: eAVEncH265VLevel = eAVEncH265VLevel(90i32);
pub const eAVEncH265VLevel3_1: eAVEncH265VLevel = eAVEncH265VLevel(93i32);
pub const eAVEncH265VLevel4: eAVEncH265VLevel = eAVEncH265VLevel(120i32);
pub const eAVEncH265VLevel4_1: eAVEncH265VLevel = eAVEncH265VLevel(123i32);
pub const eAVEncH265VLevel5: eAVEncH265VLevel = eAVEncH265VLevel(150i32);
pub const eAVEncH265VLevel5_1: eAVEncH265VLevel = eAVEncH265VLevel(153i32);
pub const eAVEncH265VLevel5_2: eAVEncH265VLevel = eAVEncH265VLevel(156i32);
pub const eAVEncH265VLevel6: eAVEncH265VLevel = eAVEncH265VLevel(180i32);
pub const eAVEncH265VLevel6_1: eAVEncH265VLevel = eAVEncH265VLevel(183i32);
pub const eAVEncH265VLevel6_2: eAVEncH265VLevel = eAVEncH265VLevel(186i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncH265VProfile(pub i32);
pub const eAVEncH265VProfile_MainIntra_420_10: eAVEncH265VProfile = eAVEncH265VProfile(12i32);
pub const eAVEncH265VProfile_MainIntra_420_12: eAVEncH265VProfile = eAVEncH265VProfile(13i32);
pub const eAVEncH265VProfile_MainIntra_420_8: eAVEncH265VProfile = eAVEncH265VProfile(11i32);
pub const eAVEncH265VProfile_MainIntra_422_10: eAVEncH265VProfile = eAVEncH265VProfile(14i32);
pub const eAVEncH265VProfile_MainIntra_422_12: eAVEncH265VProfile = eAVEncH265VProfile(15i32);
pub const eAVEncH265VProfile_MainIntra_444_10: eAVEncH265VProfile = eAVEncH265VProfile(17i32);
pub const eAVEncH265VProfile_MainIntra_444_12: eAVEncH265VProfile = eAVEncH265VProfile(18i32);
pub const eAVEncH265VProfile_MainIntra_444_16: eAVEncH265VProfile = eAVEncH265VProfile(19i32);
pub const eAVEncH265VProfile_MainIntra_444_8: eAVEncH265VProfile = eAVEncH265VProfile(16i32);
pub const eAVEncH265VProfile_MainStill_420_8: eAVEncH265VProfile = eAVEncH265VProfile(20i32);
pub const eAVEncH265VProfile_MainStill_444_16: eAVEncH265VProfile = eAVEncH265VProfile(22i32);
pub const eAVEncH265VProfile_MainStill_444_8: eAVEncH265VProfile = eAVEncH265VProfile(21i32);
pub const eAVEncH265VProfile_Main_420_10: eAVEncH265VProfile = eAVEncH265VProfile(2i32);
pub const eAVEncH265VProfile_Main_420_12: eAVEncH265VProfile = eAVEncH265VProfile(3i32);
pub const eAVEncH265VProfile_Main_420_8: eAVEncH265VProfile = eAVEncH265VProfile(1i32);
pub const eAVEncH265VProfile_Main_422_10: eAVEncH265VProfile = eAVEncH265VProfile(4i32);
pub const eAVEncH265VProfile_Main_422_12: eAVEncH265VProfile = eAVEncH265VProfile(5i32);
pub const eAVEncH265VProfile_Main_444_10: eAVEncH265VProfile = eAVEncH265VProfile(7i32);
pub const eAVEncH265VProfile_Main_444_12: eAVEncH265VProfile = eAVEncH265VProfile(8i32);
pub const eAVEncH265VProfile_Main_444_8: eAVEncH265VProfile = eAVEncH265VProfile(6i32);
pub const eAVEncH265VProfile_Monochrome_12: eAVEncH265VProfile = eAVEncH265VProfile(9i32);
pub const eAVEncH265VProfile_Monochrome_16: eAVEncH265VProfile = eAVEncH265VProfile(10i32);
pub const eAVEncH265VProfile_unknown: eAVEncH265VProfile = eAVEncH265VProfile(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncInputVideoSystem(pub i32);
pub const eAVEncInputVideoSystem_Component: eAVEncInputVideoSystem = eAVEncInputVideoSystem(6i32);
pub const eAVEncInputVideoSystem_HDV: eAVEncInputVideoSystem = eAVEncInputVideoSystem(5i32);
pub const eAVEncInputVideoSystem_MAC: eAVEncInputVideoSystem = eAVEncInputVideoSystem(4i32);
pub const eAVEncInputVideoSystem_NTSC: eAVEncInputVideoSystem = eAVEncInputVideoSystem(2i32);
pub const eAVEncInputVideoSystem_PAL: eAVEncInputVideoSystem = eAVEncInputVideoSystem(1i32);
pub const eAVEncInputVideoSystem_SECAM: eAVEncInputVideoSystem = eAVEncInputVideoSystem(3i32);
pub const eAVEncInputVideoSystem_Unspecified: eAVEncInputVideoSystem = eAVEncInputVideoSystem(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncMPACodingMode(pub i32);
pub const eAVEncMPACodingMode_DualChannel: eAVEncMPACodingMode = eAVEncMPACodingMode(2i32);
pub const eAVEncMPACodingMode_JointStereo: eAVEncMPACodingMode = eAVEncMPACodingMode(3i32);
pub const eAVEncMPACodingMode_Mono: eAVEncMPACodingMode = eAVEncMPACodingMode(0i32);
pub const eAVEncMPACodingMode_Stereo: eAVEncMPACodingMode = eAVEncMPACodingMode(1i32);
pub const eAVEncMPACodingMode_Surround: eAVEncMPACodingMode = eAVEncMPACodingMode(4i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncMPAEmphasisType(pub i32);
pub const eAVEncMPAEmphasisType_50_15: eAVEncMPAEmphasisType = eAVEncMPAEmphasisType(1i32);
pub const eAVEncMPAEmphasisType_CCITT_J17: eAVEncMPAEmphasisType = eAVEncMPAEmphasisType(3i32);
pub const eAVEncMPAEmphasisType_None: eAVEncMPAEmphasisType = eAVEncMPAEmphasisType(0i32);
pub const eAVEncMPAEmphasisType_Reserved: eAVEncMPAEmphasisType = eAVEncMPAEmphasisType(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncMPALayer(pub i32);
pub const eAVEncMPALayer_1: eAVEncMPALayer = eAVEncMPALayer(1i32);
pub const eAVEncMPALayer_2: eAVEncMPALayer = eAVEncMPALayer(2i32);
pub const eAVEncMPALayer_3: eAVEncMPALayer = eAVEncMPALayer(3i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncMPVFrameFieldMode(pub i32);
pub const eAVEncMPVFrameFieldMode_FieldMode: eAVEncMPVFrameFieldMode = eAVEncMPVFrameFieldMode(0i32);
pub const eAVEncMPVFrameFieldMode_FrameMode: eAVEncMPVFrameFieldMode = eAVEncMPVFrameFieldMode(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncMPVIntraVLCTable(pub i32);
pub const eAVEncMPVIntraVLCTable_Alternate: eAVEncMPVIntraVLCTable = eAVEncMPVIntraVLCTable(2i32);
pub const eAVEncMPVIntraVLCTable_Auto: eAVEncMPVIntraVLCTable = eAVEncMPVIntraVLCTable(0i32);
pub const eAVEncMPVIntraVLCTable_MPEG1: eAVEncMPVIntraVLCTable = eAVEncMPVIntraVLCTable(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncMPVLevel(pub i32);
pub const eAVEncMPVLevel_High: eAVEncMPVLevel = eAVEncMPVLevel(4i32);
pub const eAVEncMPVLevel_High1440: eAVEncMPVLevel = eAVEncMPVLevel(3i32);
pub const eAVEncMPVLevel_Low: eAVEncMPVLevel = eAVEncMPVLevel(1i32);
pub const eAVEncMPVLevel_Main: eAVEncMPVLevel = eAVEncMPVLevel(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncMPVProfile(pub i32);
pub const eAVEncMPVProfile_422: eAVEncMPVProfile = eAVEncMPVProfile(4i32);
pub const eAVEncMPVProfile_High: eAVEncMPVProfile = eAVEncMPVProfile(3i32);
pub const eAVEncMPVProfile_Main: eAVEncMPVProfile = eAVEncMPVProfile(2i32);
pub const eAVEncMPVProfile_Simple: eAVEncMPVProfile = eAVEncMPVProfile(1i32);
pub const eAVEncMPVProfile_unknown: eAVEncMPVProfile = eAVEncMPVProfile(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncMPVQScaleType(pub i32);
pub const eAVEncMPVQScaleType_Auto: eAVEncMPVQScaleType = eAVEncMPVQScaleType(0i32);
pub const eAVEncMPVQScaleType_Linear: eAVEncMPVQScaleType = eAVEncMPVQScaleType(1i32);
pub const eAVEncMPVQScaleType_NonLinear: eAVEncMPVQScaleType = eAVEncMPVQScaleType(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncMPVScanPattern(pub i32);
pub const eAVEncMPVScanPattern_AlternateScan: eAVEncMPVScanPattern = eAVEncMPVScanPattern(2i32);
pub const eAVEncMPVScanPattern_Auto: eAVEncMPVScanPattern = eAVEncMPVScanPattern(0i32);
pub const eAVEncMPVScanPattern_ZigZagScan: eAVEncMPVScanPattern = eAVEncMPVScanPattern(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncMPVSceneDetection(pub i32);
pub const eAVEncMPVSceneDetection_InsertIPicture: eAVEncMPVSceneDetection = eAVEncMPVSceneDetection(1i32);
pub const eAVEncMPVSceneDetection_None: eAVEncMPVSceneDetection = eAVEncMPVSceneDetection(0i32);
pub const eAVEncMPVSceneDetection_StartNewGOP: eAVEncMPVSceneDetection = eAVEncMPVSceneDetection(2i32);
pub const eAVEncMPVSceneDetection_StartNewLocatableGOP: eAVEncMPVSceneDetection = eAVEncMPVSceneDetection(3i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncMuxOutput(pub i32);
pub const eAVEncMuxOutputAuto: eAVEncMuxOutput = eAVEncMuxOutput(0i32);
pub const eAVEncMuxOutputPS: eAVEncMuxOutput = eAVEncMuxOutput(1i32);
pub const eAVEncMuxOutputTS: eAVEncMuxOutput = eAVEncMuxOutput(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncVP9VProfile(pub i32);
pub const eAVEncVP9VProfile_420_10: eAVEncVP9VProfile = eAVEncVP9VProfile(2i32);
pub const eAVEncVP9VProfile_420_12: eAVEncVP9VProfile = eAVEncVP9VProfile(3i32);
pub const eAVEncVP9VProfile_420_8: eAVEncVP9VProfile = eAVEncVP9VProfile(1i32);
pub const eAVEncVP9VProfile_unknown: eAVEncVP9VProfile = eAVEncVP9VProfile(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncVideoChromaResolution(pub i32);
pub const eAVEncVideoChromaResolution_411: eAVEncVideoChromaResolution = eAVEncVideoChromaResolution(4i32);
pub const eAVEncVideoChromaResolution_420: eAVEncVideoChromaResolution = eAVEncVideoChromaResolution(3i32);
pub const eAVEncVideoChromaResolution_422: eAVEncVideoChromaResolution = eAVEncVideoChromaResolution(2i32);
pub const eAVEncVideoChromaResolution_444: eAVEncVideoChromaResolution = eAVEncVideoChromaResolution(1i32);
pub const eAVEncVideoChromaResolution_SameAsSource: eAVEncVideoChromaResolution = eAVEncVideoChromaResolution(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncVideoChromaSubsampling(pub i32);
pub const eAVEncVideoChromaSubsamplingFormat_Horizontally_Cosited: eAVEncVideoChromaSubsampling = eAVEncVideoChromaSubsampling(4i32);
pub const eAVEncVideoChromaSubsamplingFormat_ProgressiveChroma: eAVEncVideoChromaSubsampling = eAVEncVideoChromaSubsampling(8i32);
pub const eAVEncVideoChromaSubsamplingFormat_SameAsSource: eAVEncVideoChromaSubsampling = eAVEncVideoChromaSubsampling(0i32);
pub const eAVEncVideoChromaSubsamplingFormat_Vertically_AlignedChromaPlanes: eAVEncVideoChromaSubsampling = eAVEncVideoChromaSubsampling(1i32);
pub const eAVEncVideoChromaSubsamplingFormat_Vertically_Cosited: eAVEncVideoChromaSubsampling = eAVEncVideoChromaSubsampling(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncVideoColorLighting(pub i32);
pub const eAVEncVideoColorLighting_Bright: eAVEncVideoColorLighting = eAVEncVideoColorLighting(2i32);
pub const eAVEncVideoColorLighting_Dark: eAVEncVideoColorLighting = eAVEncVideoColorLighting(5i32);
pub const eAVEncVideoColorLighting_Dim: eAVEncVideoColorLighting = eAVEncVideoColorLighting(4i32);
pub const eAVEncVideoColorLighting_Office: eAVEncVideoColorLighting = eAVEncVideoColorLighting(3i32);
pub const eAVEncVideoColorLighting_SameAsSource: eAVEncVideoColorLighting = eAVEncVideoColorLighting(0i32);
pub const eAVEncVideoColorLighting_Unknown: eAVEncVideoColorLighting = eAVEncVideoColorLighting(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncVideoColorNominalRange(pub i32);
pub const eAVEncVideoColorNominalRange_0_255: eAVEncVideoColorNominalRange = eAVEncVideoColorNominalRange(1i32);
pub const eAVEncVideoColorNominalRange_16_235: eAVEncVideoColorNominalRange = eAVEncVideoColorNominalRange(2i32);
pub const eAVEncVideoColorNominalRange_48_208: eAVEncVideoColorNominalRange = eAVEncVideoColorNominalRange(3i32);
pub const eAVEncVideoColorNominalRange_SameAsSource: eAVEncVideoColorNominalRange = eAVEncVideoColorNominalRange(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncVideoColorPrimaries(pub i32);
pub const eAVEncVideoColorPrimaries_BT470_2_SysBG: eAVEncVideoColorPrimaries = eAVEncVideoColorPrimaries(4i32);
pub const eAVEncVideoColorPrimaries_BT470_2_SysM: eAVEncVideoColorPrimaries = eAVEncVideoColorPrimaries(3i32);
pub const eAVEncVideoColorPrimaries_BT709: eAVEncVideoColorPrimaries = eAVEncVideoColorPrimaries(2i32);
pub const eAVEncVideoColorPrimaries_EBU3231: eAVEncVideoColorPrimaries = eAVEncVideoColorPrimaries(7i32);
pub const eAVEncVideoColorPrimaries_Reserved: eAVEncVideoColorPrimaries = eAVEncVideoColorPrimaries(1i32);
pub const eAVEncVideoColorPrimaries_SMPTE170M: eAVEncVideoColorPrimaries = eAVEncVideoColorPrimaries(5i32);
pub const eAVEncVideoColorPrimaries_SMPTE240M: eAVEncVideoColorPrimaries = eAVEncVideoColorPrimaries(6i32);
pub const eAVEncVideoColorPrimaries_SMPTE_C: eAVEncVideoColorPrimaries = eAVEncVideoColorPrimaries(8i32);
pub const eAVEncVideoColorPrimaries_SameAsSource: eAVEncVideoColorPrimaries = eAVEncVideoColorPrimaries(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncVideoColorTransferFunction(pub i32);
pub const eAVEncVideoColorTransferFunction_10: eAVEncVideoColorTransferFunction = eAVEncVideoColorTransferFunction(1i32);
pub const eAVEncVideoColorTransferFunction_18: eAVEncVideoColorTransferFunction = eAVEncVideoColorTransferFunction(2i32);
pub const eAVEncVideoColorTransferFunction_20: eAVEncVideoColorTransferFunction = eAVEncVideoColorTransferFunction(3i32);
pub const eAVEncVideoColorTransferFunction_22: eAVEncVideoColorTransferFunction = eAVEncVideoColorTransferFunction(4i32);
pub const eAVEncVideoColorTransferFunction_22_240M: eAVEncVideoColorTransferFunction = eAVEncVideoColorTransferFunction(6i32);
pub const eAVEncVideoColorTransferFunction_22_709: eAVEncVideoColorTransferFunction = eAVEncVideoColorTransferFunction(5i32);
pub const eAVEncVideoColorTransferFunction_22_8bit_sRGB: eAVEncVideoColorTransferFunction = eAVEncVideoColorTransferFunction(7i32);
pub const eAVEncVideoColorTransferFunction_28: eAVEncVideoColorTransferFunction = eAVEncVideoColorTransferFunction(8i32);
pub const eAVEncVideoColorTransferFunction_SameAsSource: eAVEncVideoColorTransferFunction = eAVEncVideoColorTransferFunction(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncVideoColorTransferMatrix(pub i32);
pub const eAVEncVideoColorTransferMatrix_BT601: eAVEncVideoColorTransferMatrix = eAVEncVideoColorTransferMatrix(2i32);
pub const eAVEncVideoColorTransferMatrix_BT709: eAVEncVideoColorTransferMatrix = eAVEncVideoColorTransferMatrix(1i32);
pub const eAVEncVideoColorTransferMatrix_SMPTE240M: eAVEncVideoColorTransferMatrix = eAVEncVideoColorTransferMatrix(3i32);
pub const eAVEncVideoColorTransferMatrix_SameAsSource: eAVEncVideoColorTransferMatrix = eAVEncVideoColorTransferMatrix(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncVideoContentType(pub i32);
pub const eAVEncVideoContentType_FixedCameraAngle: eAVEncVideoContentType = eAVEncVideoContentType(1i32);
pub const eAVEncVideoContentType_Unknown: eAVEncVideoContentType = eAVEncVideoContentType(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncVideoFilmContent(pub i32);
pub const eAVEncVideoFilmContent_FilmOnly: eAVEncVideoFilmContent = eAVEncVideoFilmContent(1i32);
pub const eAVEncVideoFilmContent_Mixed: eAVEncVideoFilmContent = eAVEncVideoFilmContent(2i32);
pub const eAVEncVideoFilmContent_VideoOnly: eAVEncVideoFilmContent = eAVEncVideoFilmContent(0i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncVideoOutputFrameRateConversion(pub i32);
pub const eAVEncVideoOutputFrameRateConversion_Alias: eAVEncVideoOutputFrameRateConversion = eAVEncVideoOutputFrameRateConversion(2i32);
pub const eAVEncVideoOutputFrameRateConversion_Disable: eAVEncVideoOutputFrameRateConversion = eAVEncVideoOutputFrameRateConversion(0i32);
pub const eAVEncVideoOutputFrameRateConversion_Enable: eAVEncVideoOutputFrameRateConversion = eAVEncVideoOutputFrameRateConversion(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncVideoOutputScanType(pub i32);
pub const eAVEncVideoOutputScan_Automatic: eAVEncVideoOutputScanType = eAVEncVideoOutputScanType(3i32);
pub const eAVEncVideoOutputScan_Interlaced: eAVEncVideoOutputScanType = eAVEncVideoOutputScanType(1i32);
pub const eAVEncVideoOutputScan_Progressive: eAVEncVideoOutputScanType = eAVEncVideoOutputScanType(0i32);
pub const eAVEncVideoOutputScan_SameAsInput: eAVEncVideoOutputScanType = eAVEncVideoOutputScanType(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVEncVideoSourceScanType(pub i32);
pub const eAVEncVideoSourceScan_Automatic: eAVEncVideoSourceScanType = eAVEncVideoSourceScanType(0i32);
pub const eAVEncVideoSourceScan_Interlaced: eAVEncVideoSourceScanType = eAVEncVideoSourceScanType(1i32);
pub const eAVEncVideoSourceScan_Progressive: eAVEncVideoSourceScanType = eAVEncVideoSourceScanType(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVFastDecodeMode(pub i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eAVScenarioInfo(pub i32);
pub const eAVScenarioInfo_Archive: eAVScenarioInfo = eAVScenarioInfo(3i32);
pub const eAVScenarioInfo_CameraRecord: eAVScenarioInfo = eAVScenarioInfo(5i32);
pub const eAVScenarioInfo_DisplayRemoting: eAVScenarioInfo = eAVScenarioInfo(1i32);
pub const eAVScenarioInfo_DisplayRemotingWithFeatureMap: eAVScenarioInfo = eAVScenarioInfo(6i32);
pub const eAVScenarioInfo_LiveStreaming: eAVScenarioInfo = eAVScenarioInfo(4i32);
pub const eAVScenarioInfo_Unknown: eAVScenarioInfo = eAVScenarioInfo(0i32);
pub const eAVScenarioInfo_VideoConference: eAVScenarioInfo = eAVScenarioInfo(2i32);
pub const eAllocationTypeDynamic: EAllocationType = EAllocationType(0i32);
pub const eAllocationTypeIgnore: EAllocationType = EAllocationType(3i32);
pub const eAllocationTypePageable: EAllocationType = EAllocationType(2i32);
pub const eAllocationTypeRT: EAllocationType = EAllocationType(1i32);
pub const eErrorConcealmentOff: eAVDecVideoMPEG2ErrorConcealment = eAVDecVideoMPEG2ErrorConcealment(0i32);
pub const eErrorConcealmentOn: eAVDecVideoMPEG2ErrorConcealment = eAVDecVideoMPEG2ErrorConcealment(1i32);
pub const eErrorConcealmentTypeAdvanced: eAVDecVideoH264ErrorConcealment = eAVDecVideoH264ErrorConcealment(2i32);
pub const eErrorConcealmentTypeBasic: eAVDecVideoH264ErrorConcealment = eAVDecVideoH264ErrorConcealment(1i32);
pub const eErrorConcealmentTypeDXVASetBlack: eAVDecVideoH264ErrorConcealment = eAVDecVideoH264ErrorConcealment(3i32);
pub const eErrorConcealmentTypeDrop: eAVDecVideoH264ErrorConcealment = eAVDecVideoH264ErrorConcealment(0i32);
pub const eVideoDecodeCompliant: eAVFastDecodeMode = eAVFastDecodeMode(0i32);
pub const eVideoDecodeDisableLF: eAVFastDecodeMode = eAVFastDecodeMode(2i32);
pub const eVideoDecodeFastest: eAVFastDecodeMode = eAVFastDecodeMode(32i32);
pub const eVideoDecodeOptimalLF: eAVFastDecodeMode = eAVFastDecodeMode(1i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct eVideoEncoderDisplayContentType(pub i32);
pub const eVideoEncoderDisplayContent_FullScreenVideo: eVideoEncoderDisplayContentType = eVideoEncoderDisplayContentType(1i32);
pub const eVideoEncoderDisplayContent_Unknown: eVideoEncoderDisplayContentType = eVideoEncoderDisplayContentType(0i32);
pub const g_wszSpeechFormatCaps: windows_core::PCWSTR = windows_core::w!("SpeechFormatCap");
pub const g_wszWMCPAudioVBRQuality: windows_core::PCWSTR = windows_core::w!("_VBRQUALITY");
pub const g_wszWMCPAudioVBRSupported: windows_core::PCWSTR = windows_core::w!("_VBRENABLED");
pub const g_wszWMCPCodecName: windows_core::PCWSTR = windows_core::w!("_CODECNAME");
pub const g_wszWMCPDefaultCrisp: windows_core::PCWSTR = windows_core::w!("_DEFAULTCRISP");
pub const g_wszWMCPMaxPasses: windows_core::PCWSTR = windows_core::w!("_PASSESRECOMMENDED");
pub const g_wszWMCPSupportedVBRModes: windows_core::PCWSTR = windows_core::w!("_SUPPORTEDVBRMODES");
pub const msoBegin: MFBYTESTREAM_SEEK_ORIGIN = MFBYTESTREAM_SEEK_ORIGIN(0i32);
pub const msoCurrent: MFBYTESTREAM_SEEK_ORIGIN = MFBYTESTREAM_SEEK_ORIGIN(1i32);